Browse Source

荣誉称号

master
jiazhipeng 10 months ago
parent
commit
b4cbcb53e9
  1. 62
      subPackages/user/infoFilling.vue
  2. 9
      subPackages/user/register.vue

62
subPackages/user/infoFilling.vue

@ -87,7 +87,7 @@
<view v-if="item.nameStr" class="text-overflow icon-select" >{{item.nameStr}}</view>
<view v-else class="empty-value icon-select" >请选择</view>
</view>
<view class="userinfo-item" @click="openRankOption(item)">
<view class="userinfo-item" @click="openRankOption(item)" v-show="item.name!=1">
<span>级别</span>
<view v-if="item.rankStr" class="text-overflow icon-select" >{{item.rankStr}}</view>
<view v-else class="empty-value icon-select" >请选择</view>
@ -204,7 +204,7 @@
speakText: [],
honor: [],
honorNameList: [{id: 1, name: "称号1"},{id: 2, name: "称号2"}],
honorNameList: [{id: 1, name: "导游资源库"},{id: 2, name: "文明导游"},{id: 3, name: "金牌导游"},{id: 4, name: "品牌导游"}],
honorRankList: [{id: 1, name: "全国级"}, {id: 2, name: "省级"}, {id:3,name:"市级"}],
selectionItem: null, //
@ -215,16 +215,9 @@
deleteMode: false, //
province: [
{id: 1, name: '北京', children: [{id:2, name: '北京'}, {id:3, name: "h萨拉开放"}]},
{id: 4, name: '北京2', children: [{id:5, name: '北京2'}, {id:6, name: "h萨拉开放2"}]},
],
province: [],
mulProvince : [
[
{id: 1, name: '北京',children: [{id:2, name: '北京'}, {id:3, name: "h萨拉开放"}]},
{id: 4, name: '北京2',children: [{id:5, name: '北京2'}, {id:6, name: "h萨拉开放2"}]},
],
[{id:2, name: '北京'}, {id:3, name: "h萨拉开放"}]
[],[]
]
}
},
@ -359,7 +352,29 @@
]
}
this.honor = honor
this.initAddress()
},
initAddress () {
this.Post({id: 1},'/api/common/getAreaList').then(res => {
this.province = res.data || []
this.mulProvince[0] = res.data || []
let data = this.province[0]
if (data) {
this.initChildProvince(data.id)
}
})
},
initChildProvince (parent_id) {
this.Post({id: parent_id},'/api/common/getAreaList').then(res => {
this.mulProvince[1] = res.data || []
this.$forceUpdate()
})
},
addHonor() {
this.honor.push({nameStr: '', name: null, rank: null,rankId: null, rankStr: '',fileList: []})
},
@ -388,23 +403,26 @@
//
if (Array.isArray(value)) {
this.selectionItem.rank = 3
this.selectionItem.rankId = value[1]
this.selectionItem.rankId = this.mulProvince[1][value[1]].id
let address = this.mulProvince[0][value[0]].name+this.mulProvince[1][value[1]].name
this.selectionItem.rankStr = `市级(${address}`
} else {
this.selectionItem.rank = 2
this.selectionItem.rankId = value
this.selectionItem.rankId =this.mulProvince[0][value].id
let address = this.province[value].name
this.selectionItem.rankStr = `省级(${address}`
}
console.log(this.selectionItem)
},
// console.log('');
pickerColumnchange (e) {
if(e.detail.column === 0){
let index = e.detail.value
// console.log('');
// this.newProvinceDataList[1] = [];
this.mulProvince[1] = this.mulProvince[0][index].children || []
let data = this.mulProvince[0][index]
if (data) {
this.initChildProvince(data.id)
}
}
},
@ -632,8 +650,16 @@
if (this.valueType == 'honor') {
//
let data = this.honor.filter(v=> !(!v.name&&!v.rank&&v.fileList.length<=0))
data.forEach(v=>{
if (v.name == 1) {
v.rank = null
v.rankId = null
v.rankStr = ''
}
})
if (data.length>0) {
if (data.every(v=>(v.name&&v.rank&&v.fileList.length>0))) {
if (data.every(v=>(v.name&&(v.name==1 || v.name!=1&&v.rank)&&v.fileList.length>0))) {
this.inputValue = JSON.parse(JSON.stringify(data))
this.inputValueStr = data[0].nameStr
} else {
@ -685,7 +711,7 @@
min-height: 100vh;
overflow-x: hidden;
background: white;
padding-bottom: 50rpx;
padding-bottom: 200rpx;
}
.bg.honorBG{
background: #F1F1F1;

9
subPackages/user/register.vue

@ -176,11 +176,16 @@
let lingo_idsFileList = []
let video_list = []
let honor = []
try {
lingo_idsFileList = (resData.lingo_image_list || '').split(',').filter(v=>v)
video_list = (resData.video_list || '').split(',').filter(v=>v)
honor = JSON.parse(resData.honor)
} catch(e){}
console.log(honor ,'honor')
this.info = {
id: resData.id,avatar: resData.avatar,
nickname: resData.nickname, mobile: resData.mobile,
@ -395,10 +400,12 @@
console.log(this.info)
let param = {
method: "POST",
...this.info,guide_id: this.info.id,
lingo_image_list: this.info.lingo_idsFileList.join(','),
video_list: this.info.video_list.join(','),
sparkle_text: JSON.stringify(this.info.sparkle_text)
sparkle_text: JSON.stringify(this.info.sparkle_text),
honor: this.info.honor&&this.info.honor.length>0?JSON.stringify(this.info.honor):'',
}
let api = "/api/guide/applyGuide"
if (this.status == 2) api = "/api/guide/updateGuideDetails"

Loading…
Cancel
Save