jiazhipeng 10 months ago
parent
commit
cd41337a7d
  1. 2
      manifest.json
  2. 6
      pages.json
  3. 3
      pages/login/login.vue
  4. 2
      pages/user/user.vue
  5. 229
      pages/verification/index.vue
  6. 7
      static/js/CommonFunction.js
  7. 1
      static/js/request.js
  8. 13
      subPackages/user/accountPassword.vue
  9. 141
      subPackages/user/changePassword.vue
  10. 28
      subPackages/user/infoFilling.vue
  11. 170
      subPackages/user/register.vue
  12. 158
      subPackages/user/userInfo.vue

2
manifest.json

@ -81,7 +81,7 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"target" : "http://47.103.142.123:1010/", // "target" : "https://guide.sz-trip.com/", //
"changeOrigin" : true, // "changeOrigin" : true, //
"secure" : true, // https "secure" : true, // https
"pathRewrite" : { "pathRewrite" : {

6
pages.json

@ -65,6 +65,12 @@
"navigationBarTitleText": "账号密码" "navigationBarTitleText": "账号密码"
} }
}, },
{
"path": "user/changePassword",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{ {
"path": "video/index", "path": "video/index",
"style": { "style": {

3
pages/login/login.vue

@ -57,7 +57,8 @@
url: this.$store.state.user.toPath url: this.$store.state.user.toPath
}) })
} else { } else {
uni.navigateBack({}) // uni.navigateBack({})
this.goBack()
} }
}) })
} }

2
pages/user/user.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="bg"> <view class="bg">
<view class="top-box flex-between"> <view class="top-box flex-between" @click="gotoPath('/subPackages/user/userInfo')">
<view class="top-left"> <view class="top-left">
<image src="https://static.ticket.sz-trip.com/tourGuide/images/index/topImg.png" mode="" class="avatar"></image> <image src="https://static.ticket.sz-trip.com/tourGuide/images/index/topImg.png" mode="" class="avatar"></image>
<view class="flex-column"> <view class="flex-column">

229
pages/verification/index.vue

@ -10,7 +10,7 @@
<view class="content-area flex-1 h-1rpx"> <view class="content-area flex-1 h-1rpx">
<view class="type0-container" v-show="type==0"> <view class="type0-container" v-show="type==0">
<image src="https://static.ticket.sz-trip.com/uploads/20241107/3480f83dd4b5346e04ad184f61cc848a.png"></image> <image :src="showImg('/uploads/20241203/e114fd176d9ef85e81e57150274bcc4a.png')"></image>
<view @click="scanCode">点击扫码核销</view> <view @click="scanCode">点击扫码核销</view>
</view> </view>
<view class="type1-container" v-show="type==1"> <view class="type1-container" v-show="type==1">
@ -36,41 +36,41 @@
<view class="order-list" v-else> <view class="order-list" v-else>
<view class="order-item"> <view class="order-item">
<view class="title">订单详情</view> <view class="title">订单详情</view>
<view class="flex"> <view class="flex" >
<view class="label">下单日期:</view> <view class="label">下单日期:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.create_time}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">订单号:</view> <view class="label">订单号:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.order_id}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">订单名称:</view> <view class="label">订单名称:</view>
<view class="text">订单名称订单名称订单名称订单名称 订单名称订单名称订单名称订单名称</view> <view class="text"> {{item.name}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">数量:</view> <view class="label">数量:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.num}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">订单状态:</view> <view class="label">订单状态:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.status_text}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">时段:</view> <view class="label">时段:</view>
<view class="text">2024-11-21</view> <view class="text"></view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">出行人:</view> <view class="label">出行人:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.nickname}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">出行人手机号:</view> <view class="label">出行人手机号:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.phone}}</view>
</view> </view>
<view class="flex"> <view class="flex">
<view class="label">出行人身份证:</view> <view class="label">出行人身份证:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.user_id_number}}</view>
</view> </view>
<view class="hexiao-btn" @click="verifyByPhone">核销</view> <view class="hexiao-btn" @click="verifyByPhone">核销</view>
@ -84,42 +84,44 @@
<view class="pop-order-detail order-item"> <view class="pop-order-detail order-item">
<view class="title flex-shrink-0">确认是否核销</view> <view class="title flex-shrink-0">确认是否核销</view>
<view class="pop-order-content flex-1 h-1rpx"> <view class="pop-order-content flex-1 h-1rpx">
<view class="flex"> <template v-for="(item,i) in orderList">
<view class="label">下单日期:</view> <view class="flex" :key="i">
<view class="text">2024-11-21</view> <view class="label">下单日期:</view>
</view> <view class="text">{{item.create_time}}</view>
<view class="flex"> </view>
<view class="label">订单号:</view> <view class="flex">
<view class="text">2024-11-21</view> <view class="label">订单号:</view>
</view> <view class="text">{{item.order_id}}</view>
<view class="flex"> </view>
<view class="label">订单名称:</view> <view class="flex">
<view class="text"> 订单名称</view> <view class="label">订单名称:</view>
</view> <view class="text"> {{item.name}}</view>
<view class="flex"> </view>
<view class="label">数量:</view> <view class="flex">
<view class="text">2024-11-21</view> <view class="label">数量:</view>
</view> <view class="text">{{item.num}}</view>
<view class="flex"> </view>
<view class="label">订单状态:</view> <view class="flex">
<view class="text">2024-11-21</view> <view class="label">订单状态:</view>
</view> <view class="text">{{item.status_text}}</view>
<view class="flex"> </view>
<view class="label">时段:</view> <view class="flex">
<view class="text">2024-11-21</view> <view class="label">时段:</view>
</view> <view class="text"></view>
<view class="flex"> </view>
<view class="label">出行人:</view> <view class="flex">
<view class="text">2024-11-21</view> <view class="label">出行人:</view>
</view> <view class="text">{{item.nickname}}</view>
<view class="flex"> </view>
<view class="label">出行人手机号:</view> <view class="flex">
<view class="text">2024-11-21</view> <view class="label">出行人手机号:</view>
</view> <view class="text">{{item.phone}}</view>
<view class="flex"> </view>
<view class="flex">
<view class="label">出行人身份证:</view> <view class="label">出行人身份证:</view>
<view class="text">2024-11-21</view> <view class="text">{{item.user_id_number}}</view>
</view> </view>
</template>
</view> </view>
<view class="bottom-btn"> <view class="bottom-btn">
@ -141,7 +143,7 @@
components:{scanCodeVue}, components:{scanCodeVue},
data() { data() {
return { return {
type: 0, type: 1,
HXCode: '', // HXCode: '', //
HXPhone:"", HXPhone:"",
orderList: [], orderList: [],
@ -155,7 +157,6 @@
}, },
methods: { methods: {
scanCode () { scanCode () {
this.showScan = true this.showScan = true
}, },
@ -177,20 +178,38 @@
// //
getOrderByCode (code) { getOrderByCode (code) {
this.Post({ this.Post({
code: code
}, '/api/wx/jsSdk') }, '/api/wx/jsSdk').then(res=>{
if (res && res.code == 1 && res.data) {
this.orderList = [res.data]
this.$refs.popup.open()
}
})
}, },
// //
verifyByCode () { verifyByCode () {
this.$refs.popup.open() if (this.HXCode.trim() == '') {
uni.showToast({title:'请输入核销码',icon:"none"})
return
}
this.getOrderByCode(this.HXCode)
}, },
//
confirmVerify () { confirmVerify () {
this.Post({code: this.HXCode}, '/api/').then(res=>{
uni.showToast({
title:'核销成功',
icon:'none'
})
this.HXCode = ""
this.$refs.popup.close()
this.orderList = []
})
}, },
// //
searchByPhone () { searchByPhone () {
if (this.HXPhone == '') { if (this.HXPhone.trim() == '') {
uni.showToast({title:'请输入手机号',icon:"none"}) uni.showToast({title:'请输入手机号',icon:"none"})
return return
} else if (this.HXPhone.length < 4) { } else if (this.HXPhone.length < 4) {
@ -213,7 +232,6 @@
confirmColor: '#96684F', confirmColor: '#96684F',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
// todo // todo
uni.showToast({title:'核销成功'}) uni.showToast({title:'核销成功'})
_this.orderList = [] _this.orderList = []
@ -223,27 +241,46 @@
}, },
getInfo() { //
this.Post({ initWX () {
scenic_id: this.scenicId, try {
goods_id: this.goodsId, // if (window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger") {
offset: this.list.length, let that = this
limit: 10 this.Post({
}, '/api/scenic/getGoodsCommentByScenicId').then(res => { web_url: encodeURIComponent(window.location.href.split('#')[0]),
if (res) { apis: 'scanQRCode'
this.list = [...this.list, ...res.data] }, '').then(res => {
this.list.forEach(item => { if (res) {
item.close = false let data = res.jssdk
item.needShowExpande = false //
}) wx.config({
console.log('添加close的list',this.list); debug: false,
if (res.data.length < 10) { appId: data.appId,
this.finished = true timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,// + "asdfasdf",//
jsApiList: ['scanQRCode']
});
} }
} })
}) // }
} catch (e) {}
},
//
saoma() {
let that = this
wx.scanQRCode({
needResult: 1, // 01
scanType: ["qrCode", "barCode"], //
success: function (res) {
that.getOrderByCode(res.resultStr.split('?')[1].split('=')[1])
},
fail: function (error) {
console.log(error)
}
});
}, },
}, },
} }

7
static/js/CommonFunction.js

@ -66,7 +66,7 @@ Vue.prototype.showImg = img => {
if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) { if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) {
return img; return img;
} else { } else {
return 'http://47.103.142.123:1010' + img; return 'https://guide.sz-trip.com' + img;
} }
} }
@ -164,4 +164,9 @@ Vue.prototype.ShowDateDay = day => {
break; break;
} }
return stateTxt return stateTxt
}
// 手机号显示加密
Vue.prototype.encryptPhone = (phone) =>{
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
} }

1
static/js/request.js

@ -10,6 +10,7 @@ Vue.prototype.NEWAPIURL = NEWAPIURL
Vue.prototype.Post = (params, apiurl) => { Vue.prototype.Post = (params, apiurl) => {
if (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo')).token) params.merchants_token = JSON.parse(uni.getStorageSync('userInfo')).token if (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo')).token) params.merchants_token = JSON.parse(uni.getStorageSync('userInfo')).token
else if (store.state.user.userInfo.token) params.merchants_token = store.state.user.userInfo.token else if (store.state.user.userInfo.token) params.merchants_token = store.state.user.userInfo.token
params.merchants_token = "f6339f83-a62a-4030-81d3-34429c7d4c95"
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'

13
subPackages/user/accountPassword.vue

@ -5,9 +5,9 @@
<view>{{userInfo.mobile}}</view> <view>{{userInfo.mobile}}</view>
</view> </view>
<view class="item flex-between"> <view class="item flex-between" @click="gotoPath('/subPackages/user/changePassword')">
<view>密码</view> <view>密码</view>
<view>****** <image url="https://static.ticket.sz-trip.com/tourGuide/images/user/rightGray.png"></image></view> <view>******<uni-icons style="vertical-align: text-bottom;" type="right" size="14"></uni-icons></view>
</view> </view>
</view> </view>
</template> </template>
@ -39,12 +39,7 @@
font-size: 28rpx; font-size: 28rpx;
color: #000000; color: #000000;
border-bottom: 1rpx solid #D8D8D8; border-bottom: 1rpx solid #D8D8D8;
image {
width: 11.33rpx;
height: 20rpx;
margin-left: 20rpx;
vertical-align: middle;
}
} }
</style> </style>

141
subPackages/user/changePassword.vue

@ -0,0 +1,141 @@
<template>
<view class="bg">
<view class="item flex-between">
<view>导游ID</view>
<view>{{userInfo.mobile}}</view>
</view>
<view class="item flex-between">
<view>手机号</view>
<view>{{userInfo.mobile}}</view>
</view>
<view class="item flex-between">
<view>短信验证码</view>
<view class="flex">
<input type="text" v-model="verifyCode">
<view @click="getMobileCode()" class="getCode">{{ getCodeBtnTxt }}</view>
</view>
</view>
<view class="item flex-between" >
<view>新密码</view>
<view>
<input type="password" v-model="password">
</view>
</view>
<view class="item flex-between" >
<view>确认密码</view>
<view>
<input type="password" v-model="confirmPassword">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {},
verifyCode: '',
password: '',
confirmPassword: '',
getCodeBtnTxt: '获取验证码',
smsCodeId: ''
}
},
onShow() {
this.userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
console.log(this.userInfo)
},
methods: {
getCode(){
let that = this
if (!this.isCanSend) return;
that.isCanSend = false
var params = {
url: '',
mobile: this.userInfo.mobile,
captchaCode: that.captchaCode,
captchaCodeId: that.captchaCodeId,
}
this.Post({},'/api/uservice/user/getMobileCodeForBind').then(res=>{
this.smsCodeId = res
})
},
changeGetCodeBtn() {
let that = this
let second = 60;
let timer = setInterval(() => {
second--;
if (second) {
that.getCodeBtnTxt = second + "s重新获取"
} else {
clearInterval(timer);
that.isCanSend = true
// Toast
that.getCodeBtnTxt = "获取验证码"
}
}, 1000);
},
bindMobile() {
let that = this
that.mobile = that.userInfo.mobile.trim()
if (that.smsCodeId == 0) {
that.$toast("请先获取验证码")
return;
}
that.mobileCode = that.mobileCode.trim()
if (that.mobileCode.length < 6) {
that.$toast("请输入手机验证码")
return;
}
this.Post({},'/api/uservice/user/getMobileCodeForBind').then(res=>{
uni.showToast({
title:'修改成功,请重新登录',icon:"none"
})
setTimeout(()=>{
that.$store.commit('changeUserInfo', null)
uni.navigateTo({
url:"/pages/login/login"
})
},1000)
})
}
}
}
</script>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
background: #F5F5F5;
padding: 0 26rpx;
}
.item {
height: 110rpx;
font-weight: 500;
font-size: 28rpx;
color: #000000;
border-bottom: 1rpx solid #D8D8D8;
}
input{
text-align: right;
}
.getCode{
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
background: #96684F;
border-radius: 7rpx;
width: 153rpx;
height: 53rpx;
text-align: center;
line-height: 53rpx;
margin-left: 10rpx;
}
</style>

28
subPackages/user/infoFilling.vue

@ -22,7 +22,7 @@
<view class="img-container"> <view class="img-container">
<view v-for="(file,i) in fileList" class="doc-image" :key="i"> <view v-for="(file,i) in fileList" class="doc-image" :key="i">
<image :src="file" class="doc-image" ></image> <image :src="showImg(file)" class="doc-image" ></image>
<view class="doc-del" @click.native="removeFile(i)">x</view> <view class="doc-del" @click.native="removeFile(i)">x</view>
</view> </view>
@ -62,7 +62,7 @@
</view> </view>
<view class="video-upload-image" v-for="(file,i) in fileList" :key="i"> <view class="video-upload-image" v-for="(file,i) in fileList" :key="i">
<video :src="file" class="video-upload-image" preload="metadata" <video :src="showImg(file)" class="video-upload-image" preload="metadata"
:controls="false" :show-progress="false" :show-fullscreen-btn="false" :controls="false" :show-progress="false" :show-fullscreen-btn="false"
:show-play-btn="false" :show-center-play-btn="false" :show-loading="false"></video> :show-play-btn="false" :show-center-play-btn="false" :show-loading="false"></video>
@ -119,9 +119,7 @@
<view :class="['popup-item','flex-center',selection.value.includes(item.id)?'active':'']" <view :class="['popup-item','flex-center',selection.value.includes(item.id)?'active':'']"
v-for="(item,index) in selection.arr" :key="index" @click="changeItemSelect(item)"> v-for="(item,index) in selection.arr" :key="index" @click="changeItemSelect(item)">
{{item.name}} {{item.name}}
<uni-icons v-show="selection.value.includes(item.id)" class="active-img" type="checkmarkempty" size="23" color="#96684F"></uni-icons> <uni-icons v-show="selection.value.includes(item.id)" class="active-img" type="checkmarkempty" size="23" color="#96684F"></uni-icons>
</view> </view>
</view> </view>
@ -151,18 +149,19 @@
{key: 'scenic_ids',value: '擅长景区'}, {key: 'scenic_ids',value: '擅长景区'},
{key: 'lingo_ids',value: '语言能力'}, {key: 'lingo_ids',value: '语言能力'},
{key: 'sparkle_text', value: '核心亮点'}, {key: 'sparkle_text', value: '核心亮点'},
{key:'video_list', value: '讲解视频'} {key:'video_list', value: '讲解视频'},
{key:'honor', value: '荣誉称号'}
], ],
lingoIds: [], lingoIds: [],
scenicIds: [], scenicIds: [],
speakText: [], speakText: [],
honor: [],
selectionItem: null, // selectionItem: null, //
selection: {arr: [], value: [], valueStr: ''}, // selection: {arr: [], value: [], valueStr: ''}, //
fileList: [], fileList: [],
deleteIndex: [], deleteIndex: [],
deleteMode: false, // deleteMode: false, //
} }
}, },
@ -201,6 +200,9 @@
if (this.valueType == 'video_list') { if (this.valueType == 'video_list') {
this.initVideo() this.initVideo()
} }
if (this.valueType == 'honor') {
this.initHonor()
}
} else { } else {
this.goBack() this.goBack()
@ -263,6 +265,15 @@
this.fileList = [] this.fileList = []
} }
}, },
initHonor () {
try {
let fileList = uni.getStorageSync('userVideofileList')
this.fileList = JSON.parse(fileList)
console.log(this.fileList)
} catch(e) {
this.fileList = []
}
},
addText () { addText () {
this.speakText.push({text:''}) this.speakText.push({text:''})
@ -325,7 +336,8 @@
try { try {
let res = JSON.parse(uploadFileRes.data) let res = JSON.parse(uploadFileRes.data)
if (res.code == 1) { if (res.code == 1) {
_this.fileList.push(res.data.fullurl) // _this.fileList.push(res.data.fullurl)
_this.fileList.push(res.data.url)
} }
} catch(e) {} } catch(e) {}
@ -371,7 +383,7 @@
try { try {
let res = JSON.parse(uploadFileRes.data) let res = JSON.parse(uploadFileRes.data)
if (res.code == 1) { if (res.code == 1) {
_this.fileList.push(res.data.fullurl) _this.fileList.push(res.data.url)
} }
} catch(e) {} } catch(e) {}

170
subPackages/user/register.vue

@ -75,6 +75,22 @@
<view class="btn-tao" @click="submit">保存修改</view> <view class="btn-tao" @click="submit">保存修改</view>
</view> </view>
<uni-popup ref="popup" type="bottom">
<view class="popup-box">
<view class="popup-content">
<view :class="['popup-item','flex-center',popData.value==item.id?'active':'']"
v-for="(item,index) in popData.selection" :key="index" @click="changeItemSelect(item)">
{{item.name}}
<uni-icons v-show="popData.value==item.id" class="active-img" type="checkmarkempty" size="23" color="#96684F"></uni-icons>
</view>
</view>
<view class="popup-btns flex-center" @click="popSubmit">
<view>确定</view>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -97,7 +113,13 @@
}, },
groupIds: [], // groupIds: [], //
popData: {
selection: [],
value: null,
valueStr: '',
keyName: '',
},
} }
}, },
mounted() { mounted() {
@ -203,38 +225,38 @@
}); });
}, },
selectSex () { selectSex () {
let _this = this this.popData = {
let itemList = ['男','女'] selection: [{id: 1, name: "男"}, {id: 2,name:"女"}],
let valueList = ['1','2'] value: this.info.gender,
uni.showActionSheet({ valueStr: this.info.genderStr,
itemList: itemList, keyName:"gender"
success: function (res) { }
let index = res.tapIndex; this.$refs.popup.open()
_this.info.genderStr = itemList[index]
_this.info.gender = valueList[index]
},
fail: function (res) {
console.log(res.errMsg);
}
});
}, },
selectRank () { selectRank () {
let _this = this this.popData = {
let itemList = this.groupIds.map(v=>v.name) selection: this.groupIds,
let valueList = this.groupIds.map(v=>v.id) value: this.info.group_id,
uni.showActionSheet({ valueStr: this.info.group_idStr,
itemList: itemList, keyName:"group_id"
success: function (res) { }
let index = res.tapIndex; this.$refs.popup.open()
_this.info.group_idStr = itemList[index] },
_this.info.group_id = valueList[index]
//
}, changeItemSelect (item) {
fail: function (res) { if (this.popData.value == item.id) {
console.log(res.errMsg); this.popData.value = null
} } else {
}); this.popData.value = item.id
this.popData.valueStr = item.name
}
},
popSubmit () {
this.info[this.popData.keyName] = this.popData.value
this.info[this.popData.keyName+"Str"] = this.popData.valueStr
this.$refs.popup.close()
}, },
// //
@ -531,31 +553,65 @@
} }
.popup-box { .popup-box {
border-radius: 20rpx 20rpx 0rpx 0rpx; border-radius: 0rpx;
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
.btn-top{
.popup-item { padding: 26rpx 26rpx 0 26rpx;
width: 697rpx; color: #999999;
height: 99rpx; font-size: 31rpx;
font-weight: 500; box-sizing: border-box;
font-size: 31rpx; }
color: #12293C; .popup-content{
margin: auto; max-height: 500rpx;
} width: 100%;
.popup-item:nth-child(2) { overflow-x: hidden;
border: none; overflow-y: auto;
border-bottom: 1rpx solid #D8D8D8; }
border-top: 1rpx solid #D8D8D8;
} .popup-item {
width: 697rpx;
.popup-items { height: 99rpx;
width: 100%; font-weight: 500;
height: 99rpx; font-size: 31rpx;
font-weight: 500; color: #12293C;
font-size: 31rpx; margin: auto;
color: #12293C; border-bottom: 1rpx solid #D8D8D8;
border-top: 13rpx solid #F2F2F2; position: relative;
}
.popup-item.active{
color: #96684F;
}
.popup-item:last-of-type {
border: none;
}
.active-img{
position: absolute;
right: 10rpx;
}
.popup-btns {
width: 100%;
height: 153rpx;
background: #FFFFFF;
color: #12293C;
border-top: 13rpx solid #F2F2F2;
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(82,82,82,0.25);
padding: 40rpx 26rpx;
box-sizing: border-box;
view{
box-sizing: border-box;
width: 100%;
height: 73.33rpx;
line-height: 73.33rpx;
background: #DC2525;
border-radius: 11rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
}
}
} }
}
</style> </style>

158
subPackages/user/userInfo.vue

@ -29,7 +29,7 @@
</view> </view>
<view class="info-title" style="margin-top: 46rpx;">·工作相关</view> <view class="info-title" style="margin-top: 46rpx;">·工作相关</view>
<view class="userinfo-item" @click="selectRank"> <view class="userinfo-item edit" @click="selectRank">
<span>导游等级</span> <span>导游等级</span>
<view v-if="info.group_idStr">{{info.group_idStr}}</view> <view v-if="info.group_idStr">{{info.group_idStr}}</view>
<view v-else class="empty-value">请选择</view> <view v-else class="empty-value">请选择</view>
@ -39,34 +39,39 @@
<view class="text-overflow" v-if="info.certificate_number">{{info.certificate_number}}</view> <view class="text-overflow" v-if="info.certificate_number">{{info.certificate_number}}</view>
<view v-else class="empty-value">请填写</view> <view v-else class="empty-value">请填写</view>
</view> </view>
<view class="userinfo-item" @click="changeValue('duration')"> <view class="userinfo-item" >
<span>荣誉称号</span>
<view class="text-overflow" v-if="info.honorStr">{{info.honorStr}}</view>
<view v-else class="empty-value">请选择</view>
</view>
<view class="userinfo-item edit" @click="changeValue('duration')">
<span>工作年限</span> <span>工作年限</span>
<view class="text-overflow" v-if="info.duration">{{info.duration}}</view> <view class="text-overflow" v-if="info.duration">{{info.duration}}</view>
<view v-else class="empty-value">请填写</view> <view v-else class="empty-value">请填写</view>
</view> </view>
<view class="userinfo-item" @click="changeValue('lingo_ids')"> <view class="userinfo-item edit" @click="changeValue('lingo_ids')">
<span>语言能力</span> <span>语言能力</span>
<view class="text-overflow" v-if="info.lingo_idsStr">{{info.lingo_idsStr}}</view> <view class="text-overflow" v-if="info.lingo_idsStr">{{info.lingo_idsStr}}</view>
<view v-else class="empty-value">请选择</view> <view v-else class="empty-value">请选择</view>
</view> </view>
<view class="userinfo-item" @click="changeValue('scenic_ids')"> <view class="userinfo-item edit" @click="changeValue('scenic_ids')">
<span>擅长景区</span> <span>擅长景区</span>
<view class="text-overflow" v-if="info.scenic_idsStr">{{info.scenic_idsStr}}</view> <view class="text-overflow" v-if="info.scenic_idsStr">{{info.scenic_idsStr}}</view>
<view v-else class="empty-value">请选择</view> <view v-else class="empty-value">请选择</view>
</view> </view>
<view class="userinfo-item" @click="changeValue('bio')"> <view class="userinfo-item edit" @click="changeValue('bio')">
<span>个性签名</span> <span>个性签名</span>
<view class="text-overflowRows" v-if="info.bio">{{info.bio}}</view> <view class="text-overflowRows" v-if="info.bio">{{info.bio}}</view>
<view v-else class="empty-value">请填写</view> <view v-else class="empty-value">请填写</view>
</view> </view>
<view class="userinfo-item" @click="changeValue('sparkle_text')"> <view class="userinfo-item edit" @click="changeValue('sparkle_text')">
<span>核心亮点</span> <span>核心亮点</span>
<view class="text-overflow" v-if="info.sparkle_textStr">{{info.sparkle_textStr}}</view> <view class="text-overflow" v-if="info.sparkle_textStr">{{info.sparkle_textStr}}</view>
<view v-else class="empty-value">请填写</view> <view v-else class="empty-value">请填写</view>
</view> </view>
<view class="info-title" style="margin-top: 46rpx;">·讲解视频</view> <view class="info-title" style="margin-top: 46rpx;">·讲解视频</view>
<view class="userinfo-item" @click="changeValue('video_list')"> <view class="userinfo-item edit" @click="changeValue('video_list')">
<span>讲解视频</span> <span>讲解视频</span>
<view class="text-overflow" v-if="info.video_list.length>0">{{info.video_list.length}}</view> <view class="text-overflow" v-if="info.video_list.length>0">{{info.video_list.length}}</view>
<view v-else class="empty-value">请选择</view> <view v-else class="empty-value">请选择</view>
@ -75,6 +80,24 @@
<view class="btn-tao" @click="submit">保存修改</view> <view class="btn-tao" @click="submit">保存修改</view>
</view> </view>
<uni-popup ref="popup" type="bottom">
<view class="popup-box">
<view class="popup-content">
<view :class="['popup-item','flex-center',popData.value==item.id?'active':'']"
v-for="(item,index) in popData.selection" :key="index" @click="changeItemSelect(item)">
{{item.name}}
<uni-icons v-show="popData.value==item.id" class="active-img" type="checkmarkempty" size="23" color="#96684F"></uni-icons>
</view>
</view>
<view class="popup-btns flex-center" @click="popSubmit">
<view>确定</view>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -94,9 +117,17 @@
bio:'', video_list: [], bio:'', video_list: [],
sparkle_text: [], sparkle_text: [],
sparkle_textStr: '', sparkle_textStr: '',
honor: [], honorStr: ''
}, },
groupIds: [], // groupIds: [], //
popData: {
selection: [],
value: null,
valueStr: '',
keyName: '',
},
} }
}, },
@ -147,6 +178,7 @@
sparkle_textStr:(resData.sparkle_text || []).map(v=>v.text).join(','), sparkle_textStr:(resData.sparkle_text || []).map(v=>v.text).join(','),
video_list: video_list, video_list: video_list,
honor: [], honorStr: ''
} }
}) })
}, },
@ -203,38 +235,38 @@
}); });
}, },
selectSex () { selectSex () {
let _this = this this.popData = {
let itemList = ['男','女'] selection: [{id: 1, name: "男"}, {id: 2,name:"女"}],
let valueList = ['1','2'] value: this.info.gender,
uni.showActionSheet({ valueStr: this.info.genderStr,
itemList: itemList, keyName:"gender"
success: function (res) { }
let index = res.tapIndex; this.$refs.popup.open()
_this.info.genderStr = itemList[index]
_this.info.gender = valueList[index]
},
fail: function (res) {
console.log(res.errMsg);
}
});
}, },
selectRank () { selectRank () {
let _this = this this.popData = {
let itemList = this.groupIds.map(v=>v.name) selection: this.groupIds,
let valueList = this.groupIds.map(v=>v.id) value: this.info.group_id,
uni.showActionSheet({ valueStr: this.info.group_idStr,
itemList: itemList, keyName:"group_id"
success: function (res) { }
let index = res.tapIndex; this.$refs.popup.open()
_this.info.group_idStr = itemList[index] },
_this.info.group_id = valueList[index]
//
}, changeItemSelect (item) {
fail: function (res) { if (this.popData.value == item.id) {
console.log(res.errMsg); this.popData.value = null
} } else {
}); this.popData.value = item.id
this.popData.valueStr = item.name
}
},
popSubmit () {
this.info[this.popData.keyName] = this.popData.value
this.info[this.popData.keyName+"Str"] = this.popData.valueStr
this.$refs.popup.close()
}, },
// //
@ -484,7 +516,7 @@
color: #999999; color: #999999;
} }
.userinfo-item { .userinfo-item.edit {
& view::after { & view::after {
content: ""; content: "";
width: 20rpx; width: 20rpx;
@ -539,9 +571,21 @@
} }
.popup-box { .popup-box {
border-radius: 20rpx 20rpx 0rpx 0rpx; border-radius: 0rpx;
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
.btn-top{
padding: 26rpx 26rpx 0 26rpx;
color: #999999;
font-size: 31rpx;
box-sizing: border-box;
}
.popup-content{
max-height: 500rpx;
width: 100%;
overflow-x: hidden;
overflow-y: auto;
}
.popup-item { .popup-item {
width: 697rpx; width: 697rpx;
@ -550,20 +594,42 @@
font-size: 31rpx; font-size: 31rpx;
color: #12293C; color: #12293C;
margin: auto; margin: auto;
border-bottom: 1rpx solid #D8D8D8;
position: relative;
}
.popup-item.active{
color: #96684F;
} }
.popup-item:nth-child(2) { .popup-item:last-of-type {
border: none; border: none;
border-bottom: 1rpx solid #D8D8D8; }
border-top: 1rpx solid #D8D8D8; .active-img{
position: absolute;
right: 10rpx;
} }
.popup-items { .popup-btns {
width: 100%; width: 100%;
height: 99rpx; height: 153rpx;
font-weight: 500; background: #FFFFFF;
font-size: 31rpx;
color: #12293C; color: #12293C;
border-top: 13rpx solid #F2F2F2; border-top: 13rpx solid #F2F2F2;
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(82,82,82,0.25);
padding: 40rpx 26rpx;
box-sizing: border-box;
view{
box-sizing: border-box;
width: 100%;
height: 73.33rpx;
line-height: 73.33rpx;
background: #DC2525;
border-radius: 11rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
}
} }
} }
</style> </style>

Loading…
Cancel
Save