cyl/dev
wangxia 3 years ago
parent 911d91240f
commit a4c2ac74a4

File diff suppressed because it is too large Load Diff

@ -0,0 +1,254 @@
<template>
<div class="bocaiTV-container">
<div class="contenttitle">
<span>伯才TV</span>
</div>
<div class="contentContainer">
<div class="block bgf">
<div class="title p12 tc bbdot1">实时播放控制</div>
<div class="control p20 df">
<div class="dfcloumn">
<div class="iconfont icon-xiangzuo1" size="23" color></div>上一页
</div>
<div class="pause dfcloumn">
<div class="iconfont icon-zanting" size="23" color></div>暂停
</div>
<div class="dfcloumn">
<div class="iconfont icon-xiangyou" size="23" color></div>下一页
</div>
</div>
</div>
<div class="showList">
<div class="title">播放列表</div>
<div class="list bgf">
<a-radio-group v-model="radioVal" @change="onChange" class="radiogroup">
<!-- <div class='dib' wx:for='{{sex}}' wx:key='value'> -->
<a-radio value="1">
<div class="dib">{{'播放招工列表'}}</div>
</a-radio>
<a-radio value="2">
<div class="dib">{{'播放招生列表'}}</div>
</a-radio>
<a-radio value="3">
<div class="dib">{{'招生招工交替播放'}}</div>
</a-radio>
<!-- </div> -->
</a-radio-group>
</div>
</div>
<div class="showList">
<div class="title">播放间隔时间</div>
<div class="content p26 df bd1">
<div class>
<i class="iconfont icon-jian" @click="changeTime('minus')"></i>
</div>
<div class style="min-width:40px">
<span style="font-size:30px">{{second}}</span>
</div>
<div class>
<i class="iconfont icon-jia1" @click="changeTime('add')"></i>
</div>
</div>
</div>
<div class="showList">
<div class="title">更换logo</div>
<div class="logocontent bgf bd1">
<!-- <div class="iconfont icon-bocailogo" style></div> -->
<div>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-bocailogo" />
</svg>
</div>
<a class="" >更换图片</a>
</div>
</div>
<div class="dtBtn" style>
<button class>更新配置</button>
</div>
</div>
</div>
</template>
<script>
// import ''
let sp = document.createElement('script')
sp.src = '//at.alicdn.com/t/c/font_3135652_27jwfazqvln.js'
document.body.appendChild(sp)
export default {
//
name: '',
//
components: {},
//
props: {},
//
data() {
return {
second: 8,
radioVal: 1,
}
},
//
computed: {},
//
watch: {},
//
/**
* 组件实例创建完成属性已绑定但DOM还未生成$ el属性还不存在
*/
created() {},
/**
* el 被新创建的 vm.el 替换并挂载到实例上去之后调用该钩子
* 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内
*/
mounted() {},
//
methods: {
onChange(e) {
console.log(e)
},
changeTime(e) {
if (e == 'add') {
this.second += 1
} else {
this.second -= 1
}
if (this.second <= 2) {
this.$message.warning('间隔时间不能少于2秒')
this.second = 2
}
},
},
}
</script>
<style scoped lang="less">
.icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
.contentContainer {
width: 430px;
}
.block {
margin-bottom: 8px;
margin-top: 10px;
border: 1px solid #dddddd;
// box-shadow: 0px 4px 4px 0px #dedede;
}
.p12 {
padding: 12px;
}
.p26 {
padding: 26px;
}
.block .title {
font-size: 20px;
font-weight: 600;
}
.df {
display: flex;
justify-content: space-around;
}
.control > div {
text-align: center;
}
.control > div .iconfont {
font-size: 18px;
line-height: 18px;
margin-bottom: 12px;
}
.control .pause .iconfont {
font-size: 38px;
line-height: 38px;
margin-bottom: 4px;
}
.dfcloumn {
display: flex;
flex-direction: column;
justify-content: flex-end;
text-align: center;
}
.showList .title {
padding: 24px 0px 16px;
font-size: 16px;
font-weight: 600;
}
.radiogroup {
display: flex;
flex-direction: column;
border: 1px solid #dddddd;
label:not(:last-child) {
border-bottom: 1px solid #f0f0f0;
}
label {
display: block;
padding: 17px 24px;
font-size: 16px;
}
.ant-radio {
margin-right: 10px;
}
}
.showList > div .iconfont {
font-size: 38px;
line-height: 38px;
}
.showList .content {
line-height: 38px;
}
.showList .content input {
width: 36px;
height: 36px;
margin-right: 8px;
border: 1px solid #d9d9d9;
vertical-align: middle;
display: inline-block;
text-align: center;
}
.logocontent {
display: flex;
justify-content: space-between;
// padding: 12px 22px;
a{
line-height: 88px;
font-size: 16px;
margin-right: 12px;
color: blue;
text-decoration: underline;
}
> div {
width: 176px;
height: 88px;
text-align: center;
background-color: #ddd;
}
}
.logocontent svg {
width: 124px;
height: 88px;
color: #ccc;
}
.dtBtn {
padding: 34px 0;
button {
width: 92px;
height: 32px;
background: #ff4400;
outline: none;
border: none;
color: #fff;
font-size: 14px;
}
}
.iconfont {
color: #999;
cursor: pointer;
}
</style>

@ -5,7 +5,7 @@
<div class="cropper-content">
<div class="cropper-box">
<div class="cropper">
<vue-cropper ref="cropper" :img="option.img" :outputSize="option.outputSize" :outputType="option.outputType" :info="option.info" :canScale="option.canScale" :autoCrop="option.autoCrop" :autoCropWidth="option.autoCropWidth" :autoCropHeight="option.autoCropHeight" :fixed="option.fixed" :fixedNumber="option.fixedNumber" :canMoveBox="option.canMoveBox" :height="option.height" :infoTrue="option.infoTrue" :maxImgSize="option.maxImgSize" :enlarge="option.enlarge" :mode="option.mode" @realTime="realTime"> </vue-cropper>
<vue-cropper ref="cropper" :img="option.img" :outputSize="option.outputSize" :outputType="option.outputType" :info="option.info" :canScale="option.canScale" :autoCrop="option.autoCrop" :autoCropWidth="option.autoCropWidth" :autoCropHeight="option.autoCropHeight" :fixed="option.fixed" :fixedNumber="option.fixedNumber" :canMoveBox="option.canMoveBox" :height="option.height" :infoTrue="option.infoTrue" :maxImgSize="option.maxImgSize" :enlarge="option.enlarge" :mode="option.mode" @realTime="realTime"></vue-cropper>
</div>
</div>
<div class="previewcontainer">
@ -24,9 +24,7 @@
</div>
</div>
</div>
<template slot="footer">
{{ &nbsp; }}
</template>
<template slot="footer">{{ &nbsp; }}</template>
</a-modal>
<div class="accountcontent w">
<div class="accountSetList">
@ -34,9 +32,11 @@
<div class="avatarbox">
<i @click="uploadavatar" style="cursor: pointer">
<span class="iconfont icon-morentouxiang" v-if="!userbaseInfo.imgSrc"></span>
<img :src="userbaseInfo.imgSrc" alt="" v-else />
<div class="mask"><div>修改头像</div></div></i
>
<img :src="userbaseInfo.imgSrc" alt v-else />
<div class="mask">
<div>修改头像</div>
</div>
</i>
<input type="file" ref="updateicon" @change="filepick($event)" style="display: none" />
</div>
<div class="username" v-if="userinfo.userName">Hi,{{ userinfo.userName }}</div>
@ -45,37 +45,50 @@
<div class="priceinfo">
<ul style="display: none">
<li @click="pushto('/accountsetting/myintegral')" :class="{ tagactive: activelist === 6 }">
<span><i class="iconfont icon-jifen"></i>我的积分</span
><span
><span>{{ userpoint >= 0 ? userpoint : "--" }}</span><i class="iconfont icon-youjiantou"></i
></span>
<span>
<i class="iconfont icon-jifen"></i>我的积分
</span>
<span>
<span>{{ userpoint >= 0 ? userpoint : "--" }}</span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
<li @click="pushto('/accountsetting/mycard')" :class="{ tagactive: activelist === 7 }">
<span><i class="iconfont icon-kaquan"></i>我的卡券</span
><span
><span>{{ cardinfo.recordCount ? cardinfo.recordCount : "0" }}</span><i class="iconfont icon-youjiantou"></i
></span>
<span>
<i class="iconfont icon-kaquan"></i>我的卡券
</span>
<span>
<span>{{ cardinfo.recordCount ? cardinfo.recordCount : "0" }}</span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
<li @click="pushto('/accountsetting/mybalance')" :class="{ tagactive: activelist === 8 }">
<span><i class="iconfont icon-yue"></i>我的余额</span
><span
><span>{{ userbalance >= 0 ? userbalance : "0" }}</span> <i class="iconfont icon-youjiantou"></i
></span>
<span>
<i class="iconfont icon-yue"></i>我的余额
</span>
<span>
<span>{{ userbalance >= 0 ? userbalance : "0" }}</span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
</ul>
</div>
<ul>
<li @click="pushto('/accountsetting/boundtel')" :class="{ tagactive: activelist === 1 }">
<span><i class="iconfont icon-gerenzhongxin-bangdingshouji"></i>绑定手机</span
><span
><span>{{ userinfo.hidetel }}</span>
<span>
<i class="iconfont icon-gerenzhongxin-bangdingshouji"></i>绑定手机
</span>
<span>
<span>{{ userinfo.hidetel }}</span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
<li @click="pushto('/accountsetting/boundwx')" :class="{ tagactive: activelist === 2 }">
<span><i class="iconfont icon-weixin1"></i>绑定微信</span
><span
><span v-if="userinfo.openIdAppDTDL"></span>
<span>
<i class="iconfont icon-weixin1"></i>绑定微信
</span>
<span>
<span v-if="userinfo.openIdAppDTDL"></span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
@ -90,13 +103,15 @@
><span>{{ userbanklist.length }}</span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li> -->
</li>-->
</ul>
<ul>
<li @click="pushto('/accountsetting/loginpsw')" :class="{ tagactive: activelist === 0 }">
<span><i class="iconfont icon-gerenzhongxin-mima"></i>登录密码</span
><span
><span>已设置</span>
<span>
<i class="iconfont icon-gerenzhongxin-mima"></i>登录密码
</span>
<span>
<span>已设置</span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
@ -111,7 +126,17 @@
><span v-else></span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li> -->
</li>-->
</ul>
<ul>
<li @click="pushto('/accountsetting/bocaiTV')" :class="{ tagactive: activelist === 9 }">
<span>
<i class="iconfont icon-tv"></i>伯才TV
</span>
<span>
<i class="iconfont icon-youjiantou"></i>
</span>
</li>
</ul>
</div>
<div class="rightcontent">
@ -129,14 +154,14 @@ import {
getPointApi,
// uploadUserAvatarApi,
userCardApi,
} from "../../../api/userinfo";
import { VueCropper } from "vue-cropper";
import request from "@/utils/request";
} from '../../../api/userinfo'
import { VueCropper } from 'vue-cropper'
import request from '@/utils/request'
export default {
inject: ["reload"],
inject: ['reload'],
//
name: "",
name: '',
//
components: {
VueCropper,
@ -148,20 +173,20 @@ export default {
data() {
return {
userinfo: {}, //
userbalance: "",
userpoint: "",
activelist: "",
userbalance: '',
userpoint: '',
activelist: '',
userbanklist: [],
cardinfo: {},
visible: false,
previewStyle3: {},
previews: {},
userbaseInfo: JSON.parse(localStorage.getItem("LOGIN_DATA")),
userbaseInfo: JSON.parse(localStorage.getItem('LOGIN_DATA')),
option: {
//
img: "", //
img: '', //
outputSize: 1, // (0.1 - 1)
outputType: "png", // jpeg || png || webp
outputType: 'png', // jpeg || png || webp
info: true, //
canScale: true, //
autoCrop: true, //
@ -179,20 +204,20 @@ export default {
infoTrue: true, // truefalse
maxImgSize: 290, //
enlarge: 1, //
mode: "auto", //
mode: 'auto', //
},
};
}
},
//
computed: {
path() {
return this.$route.fullPath;
return this.$route.fullPath
},
},
//
watch: {
path() {
this.changeactive();
this.changeactive()
},
},
//
@ -200,13 +225,13 @@ export default {
* 组件实例创建完成属性已绑定但DOM还未生成$ el属性还不存在
*/
created() {
this.getUserInfo();
this.changeactive();
this.getuserbnak();
this.getUserBalanceInfo();
this.getPoint();
this.getcardcount();
console.log(this.userbaseInfo);
this.getUserInfo()
this.changeactive()
this.getuserbnak()
this.getUserBalanceInfo()
this.getPoint()
this.getcardcount()
console.log(this.userbaseInfo)
},
/**
* el 被新创建的 vm.el 替换并挂载到实例上去之后调用该钩子
@ -217,215 +242,217 @@ export default {
methods: {
async getUserInfo() {
try {
const { data } = await userBaseInfoApi();
const { data } = await userBaseInfoApi()
if (data.status === 200) {
this.userinfo = data.data;
console.log(this.userinfo);
const beforetel = this.userinfo.tel.substr(0, 3);
const aftertel = this.userinfo.tel.substr(7, 4);
this.userinfo.hidetel = beforetel + "****" + aftertel;
const beforeId = this.userinfo.IDCard.substr(0, 1);
const afterId = this.userinfo.IDCard.substr(17, 1);
this.userinfo.hideId = beforeId + "****************" + afterId;
const hidename = this.userinfo.realName.substr(this.userinfo.realName.length - 1, 1);
this.userinfo = data.data
console.log(this.userinfo)
const beforetel = this.userinfo.tel.substr(0, 3)
const aftertel = this.userinfo.tel.substr(7, 4)
this.userinfo.hidetel = beforetel + '****' + aftertel
const beforeId = this.userinfo.IDCard.substr(0, 1)
const afterId = this.userinfo.IDCard.substr(17, 1)
this.userinfo.hideId = beforeId + '****************' + afterId
const hidename = this.userinfo.realName.substr(this.userinfo.realName.length - 1, 1)
// this.userinfo.hidename = hidename;
let newstr = "";
let newstr = ''
for (let i = 0; i < this.userinfo.realName.length - 1; i++) {
newstr += "*";
newstr += '*'
}
this.userinfo.hidename = newstr + hidename;
console.log(aftertel);
console.log(beforetel);
this.userinfo.hidename = newstr + hidename
console.log(aftertel)
console.log(beforetel)
}
console.log(data);
console.log(data)
} catch (error) {
console.log(error);
console.log(error)
}
},
pushto(url) {
this.$router.push(url);
this.$router.push(url)
},
changeactive() {
if (this.path.indexOf("/loginpsw") > -1) {
this.activelist = 0;
} else if (this.path.indexOf("/boundtel") > -1) {
this.activelist = 1;
} else if (this.path.indexOf("/boundwx") > -1) {
this.activelist = 2;
} else if (this.path.indexOf("/boundbankcard") > -1) {
this.activelist = 3;
} else if (this.path.indexOf("/realname") > -1) {
this.activelist = 4;
} else if (this.path.indexOf("/myintegral") > -1) {
this.activelist = 6;
} else if (this.path.indexOf("/mycard") > -1) {
this.activelist = 7;
} else if (this.path.indexOf("/mybalance") > -1) {
this.activelist = 8;
if (this.path.indexOf('/loginpsw') > -1) {
this.activelist = 0
} else if (this.path.indexOf('/boundtel') > -1) {
this.activelist = 1
} else if (this.path.indexOf('/boundwx') > -1) {
this.activelist = 2
} else if (this.path.indexOf('/boundbankcard') > -1) {
this.activelist = 3
} else if (this.path.indexOf('/realname') > -1) {
this.activelist = 4
} else if (this.path.indexOf('/myintegral') > -1) {
this.activelist = 6
} else if (this.path.indexOf('/mycard') > -1) {
this.activelist = 7
} else if (this.path.indexOf('/mybalance') > -1) {
this.activelist = 8
}else if (this.path.indexOf('/bocaiTV') > -1) {
this.activelist = 9
}
},
async getuserbnak() {
try {
const { data } = await getUserBankListApi();
console.log(data);
this.userbanklist = data.data;
const { data } = await getUserBankListApi()
console.log(data)
this.userbanklist = data.data
this.userbanklist.forEach((ele) => {
ele.newbankNo = ele.bankNo.substr(14, 4);
});
ele.newbankNo = ele.bankNo.substr(14, 4)
})
// const newdata = this.userbanklist.bankNo.substr(14, 4);
// console.log(newdata);
} catch (error) {
console.log(error);
console.log(error)
}
},
async getUserBalanceInfo() {
try {
const { data } = await userBalanceApi();
this.userbalance = data.data.balance / 100;
const { data } = await userBalanceApi()
this.userbalance = data.data.balance / 100
console.log(data);
console.log(this.userbalance);
console.log(data)
console.log(this.userbalance)
} catch (error) {
console.log(error);
console.log(error)
}
},
async getPoint() {
try {
const { data } = await getPointApi();
console.log(data);
this.userpoint = data.data.pointTotal;
const { data } = await getPointApi()
console.log(data)
this.userpoint = data.data.pointTotal
} catch (error) {
console.log(error);
console.log(error)
}
},
async getcardcount() {
try {
const { data } = await userCardApi();
console.log(data);
this.cardinfo = data.data;
const { data } = await userCardApi()
console.log(data)
this.cardinfo = data.data
} catch (error) {
console.log(error);
console.log(error)
}
},
uploadavatar() {
//
this.$refs.updateicon.click();
this.$refs.updateicon.click()
},
filepick(e) {
console.log(this.$refs.updateicon);
console.log(e);
const that = this;
this.visible = true;
const imgFile = new FileReader();
imgFile.readAsDataURL(this.$refs.updateicon.files[0]);
console.log(this.$refs.updateicon)
console.log(e)
const that = this
this.visible = true
const imgFile = new FileReader()
imgFile.readAsDataURL(this.$refs.updateicon.files[0])
imgFile.onload = function () {
that.option.img = this.result;
};
that.option.img = this.result
}
// this.option.img = window.URL.createObjectURL(
// this.$refs.updateicon.files[0]
// )
this.filelength = this.$refs.updateicon.files.length;
this.filelength = this.$refs.updateicon.files.length
},
realTime(data) {
// data.div.height = "50px";
// data.div.width = "50px";
// data.w = 50;
// data.h = 50;
console.log(data);
console.log(data)
var previews = data;
var h = 0.5;
var w = 0.2;
var previews = data
var h = 0.5
var w = 0.2
this.previewStyle1 = {
width: previews.w + "px",
height: previews.h + "px",
overflow: "hidden",
margin: "0",
width: previews.w + 'px',
height: previews.h + 'px',
overflow: 'hidden',
margin: '0',
zoom: h,
};
}
this.previewStyle2 = {
width: previews.w + "px",
height: previews.h + "px",
overflow: "hidden",
margin: "0",
width: previews.w + 'px',
height: previews.h + 'px',
overflow: 'hidden',
margin: '0',
zoom: w,
};
}
// 100
this.previewStyle3 = {
width: previews.w + "px",
height: previews.h + "px",
overflow: "hidden",
margin: "0",
width: previews.w + 'px',
height: previews.h + 'px',
overflow: 'hidden',
margin: '0',
zoom: 100 / previews.w,
};
}
// 100
this.previewStyle4 = {
width: previews.w + "px",
height: previews.h + "px",
overflow: "hidden",
margin: "0",
width: previews.w + 'px',
height: previews.h + 'px',
overflow: 'hidden',
margin: '0',
zoom: 100 / previews.h,
};
this.previews = data;
}
this.previews = data
},
modalcancel() {
this.visible = false;
this.$refs.updateicon.value = "";
this.filelength = this.$refs.updateicon.files.length;
this.visible = false
this.$refs.updateicon.value = ''
this.filelength = this.$refs.updateicon.files.length
// console.log(this.filelength)
},
changeavatar() {
let that = this;
let that = this
this.$refs.cropper.getCropBlob((data) => {
// const that = this;
// do something
// console.log(data)
const imgFile = new FileReader();
imgFile.readAsDataURL(data);
const imgFile = new FileReader()
imgFile.readAsDataURL(data)
imgFile.onload = function () {
let formData1 = new FormData();
formData1.append("imgName", "abc.png");
formData1.append("userImg", this.result);
let formData1 = new FormData()
formData1.append('imgName', 'abc.png')
formData1.append('userImg', this.result)
request({
method: "post",
url: "/yishoudan/user/changeUserImgsrc",
method: 'post',
url: '/yishoudan/user/changeUserImgsrc',
data: formData1,
withCredentials: true,
// headers: {'Content-Type': 'application/x-www-form-urlencoded'}
headers: {
"Content-Type": "multipart/form-data;boundary = " + new Date().getTime(),
'Content-Type': 'multipart/form-data;boundary = ' + new Date().getTime(),
},
})
.then(({ data }) => {
console.log(data);
console.log();
console.log(data)
console.log()
if (data.status === 200) {
let userinfo = JSON.parse(localStorage.getItem("LOGIN_DATA"));
let userinfo = JSON.parse(localStorage.getItem('LOGIN_DATA'))
// userinfo.imgSrc =;
localStorage.setItem("LOGIN_DATA", JSON.stringify({ ...userinfo, imgSrc: data.data.url }));
that.reload();
localStorage.setItem('LOGIN_DATA', JSON.stringify({ ...userinfo, imgSrc: data.data.url }))
that.reload()
}
})
.catch((error) => {
console.log(error);
});
console.log(data);
};
this.visible = false;
});
console.log(error)
})
console.log(data)
}
this.visible = false
})
// console.log(this.avatarready)
// console.log(this.filelength)
this.AvatarWaringmsgshow = false;
this.AvatarWaringmsgshow = false
},
},
};
}
</script>
<style scoped lang="less">
@ -524,7 +551,7 @@ export default {
cursor: pointer;
&:nth-child(-n + 2):after {
position: absolute;
content: "";
content: '';
display: inline-block;
height: 1px;
width: 314px;
@ -588,7 +615,7 @@ export default {
}
&:nth-child(-n + 3):after {
position: absolute;
content: "";
content: '';
display: inline-block;
height: 1px;
width: 314px;
@ -639,7 +666,7 @@ export default {
}
.rightcontent {
width: 838px;
height: 600px;
min-height: 600px;
padding: 0 16px;
background-color: #fff;
border: 1px solid #ededed;

@ -178,6 +178,14 @@ const routes = [
"../components/userinfo/usercenter/components/mybalance.vue"
),
},
{
path: "bocaiTV",
name: "bocaiTV",
component: () =>
import(
"../components/userinfo/accountsetting/components/bocaiTV.vue"
),
},
],
},
],

@ -1,4 +1,6 @@
@import "http://at.alicdn.com/t/c/font_3135652_jrvheq4b5p.css";
@import "http://at.alicdn.com/t/c/font_3135652_27jwfazqvln.css";
// 初始化页面样式
body,
h1,
@ -598,3 +600,13 @@ p.bottombox {
.ant-select-selection:active {
box-shadow: none;
}
.bb1 {
border-bottom: 1px solid #ddd;
}
.bbdot1 {
border-bottom: 1px dashed #ddd;
}
.bd1{
border: 1px solid #ddd;
}

@ -1401,6 +1401,9 @@ export function disposeJobListData(jobList) {
} else {
districtStr = districtArr1.join("");
}
if(item.district.indexOf('undefined') > -1){
districtStr = '-丨'
}
//districtStr = districtArr[1] + '丨' + districtArr[2];
}
item["district"] = districtStr;
@ -1561,6 +1564,9 @@ export function disposeJobListData(jobList) {
// districtStr = districtArr[1] + "丨" + districtArr[2];
districtStr = districtArr1.join("");
}
if(item.district.indexOf('undefined') > -1){
districtStr = '-丨'
}
//districtStr = districtArr[1] + '丨' + districtArr[2];
}
jobList["district"] = districtStr;

Loading…
Cancel
Save