diff --git a/subPackages/onlineService/detail.vue b/subPackages/onlineService/detail.vue
index e96a3ad..1e6b389 100644
--- a/subPackages/onlineService/detail.vue
+++ b/subPackages/onlineService/detail.vue
@@ -52,6 +52,7 @@ export default {
this.goBack()
} else {
this.getDetail()
+ this.getRecommend()
}
},
@@ -61,6 +62,11 @@ export default {
this.detail = res.data
})
},
+ getRecommend(){
+ this.Post({id: this.id, limit: 5}, '/api/Answer/getCorrelation').then(res=>{
+ this.questionList = res.data
+ })
+ },
viewDetail(item) {
uni.navigateTo({
url: `/subPackages/onlineService/detail?id=${item.id}`
diff --git a/subPackages/user/infoFilling.vue b/subPackages/user/infoFilling.vue
index 7eafa02..b1a547f 100644
--- a/subPackages/user/infoFilling.vue
+++ b/subPackages/user/infoFilling.vue
@@ -1,5 +1,5 @@
-
+
@@ -43,9 +43,7 @@
-
-
+ 添加更多
@@ -76,26 +74,53 @@
-
-
-
-
+
+
+
+
+
+ {{`荣誉称号${i+1}`}}
+ {{item.nameStr}}
+ 请选择
+
+
+ 级别
+ {{item.rankStr}}
+ 请选择
+
+
+ 证明材料
+
+
+
+ x
+
+
+
+
+
+
+
+ + 添加更多
+
+
+
- 保存
+ 保存
取消
保存
-
+
取消
保存
@@ -113,24 +138,42 @@
+
+
+
+
+
@@ -151,19 +194,36 @@
{key: 'scenic_ids',value: '擅长景区'},
{key: 'lingo_ids',value: '语言能力'},
{key: 'sparkle_text', value: '核心亮点'},
- {key:'video_list', value: '讲解视频'}
+ {key:'video_list', value: '讲解视频'},
+ {key:'honor', value: '荣誉称号'}
],
lingoIds: [],
scenicIds: [],
speakText: [],
+ honor: [],
+ honorNameList: [{id: 1, name: "称号1"},{id: 2, name: "称号2"}],
+ honorRankList: [{id: 1, name: "全国级"}, {id: 2, name: "省级"}, {id:3,name:"市级"}],
+
selectionItem: null, // 景点选中更改的值
- selection: {arr: [], value: [], valueStr: ''}, //弹窗值
+ selection: {arr: [], value: [], valueStr: '', single: false}, //弹窗值
fileList: [],
deleteIndex: [],
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"}]},
+ ],
+ 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萨拉开放"}]
+ ]
}
},
onLoad(options) {
@@ -201,6 +261,9 @@
if (this.valueType == 'video_list') {
this.initVideo()
}
+ if (this.valueType == 'honor') {
+ this.initHonor()
+ }
} else {
this.goBack()
@@ -253,6 +316,12 @@
})
this.speakText = arr
},
+ addText () {
+ this.speakText.push({text:''})
+ },
+ delText (index) {
+ this.speakText.splice(index,1)
+ },
// 视频
initVideo () {
try {
@@ -263,18 +332,85 @@
this.fileList = []
}
},
-
- addText () {
- this.speakText.push({text:''})
+ // 荣誉称号
+ initHonor () {
+ let honor = []
+ try {
+ honor = uni.getStorageSync('userHonor')
+ honor = JSON.parse(honor)
+ if (!Array.isArray(honor)) {
+ honor = []
+ }
+ } catch(e) {
+ honor = []
+ }
+
+ if (honor.length<=0) {
+ honor = [
+ {nameStr: '', name: null, rank: null, rankId: null, rankStr: '',fileList: []}
+ ]
+ }
+ this.honor = honor
},
- delText (index) {
- this.speakText.splice(index,1)
+ addHonor() {
+ this.honor.push({nameStr: '', name: null, rank: null,rankId: null, rankStr: '',fileList: []})
+ },
+ // honor 荣誉选择弹窗
+ changeHonorSelection (item, keyName) {
+ this.selectionItem = item
+ this.selection = {arr: this.honorNameList, value: item.name?[item.name]:[], valueStr: '', single: true}
+ this.$refs.popup.open()
+ },
+ openRankOption (item) {
+ this.selectionItem = item
+ this.$refs.popupRank.open()
+ },
+ changeRank (item) {
+ // 全国
+ if (item.id == 1) {
+ this.selectionItem.rank = 1
+ this.selectionItem.rankId = null
+ this.selectionItem.rankStr = "全国级"
+ }
},
-
+ changeArea (e) {
+ console.log(e)
+ let value = e.detail.value
+ // 市级
+ if (Array.isArray(value)) {
+ this.selectionItem.rank = 3
+ this.selectionItem.rankId = value[1]
+ 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
+ let address = this.province[value].name
+ this.selectionItem.rankStr = `省级(${address})`
+ }
+
+ },
+ 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 || []
+ }
+ },
+
+ // 选择弹窗
changeSelection (item) {
this.selectionItem = item
- this.selection = {arr: item.arr, value: JSON.parse(JSON.stringify(item.value)), valueStr: ''}
+ let single = item.single||false
+ let value = []
+ if (single && item.value) {
+ value = [Number(item.value)]
+ } else {
+ value = JSON.parse(JSON.stringify(item.value))
+ }
+ this.selection = {arr: item.arr, value: value, valueStr: '', single: single}
this.$refs.popup.open()
},
// 单个选中
@@ -283,7 +419,12 @@
if (index>=0) {
this.selection.value.splice(index,1)
} else {
- this.selection.value.push(item.id)
+ let single = this.selection.single
+ if (single) {
+ this.selection.value = [item.id]
+ } else {
+ this.selection.value.push(item.id)
+ }
}
},
selectAll() {
@@ -296,11 +437,21 @@
if (['scenic_ids','lingo_ids'].includes(this.valueType)) {
this.selectionItem.value = tempSelect.value
this.selectionItem.valueStr = valueHave.map(x=>x.name).join(',')
+ } else if (['honor'].includes(this.valueType)) {
+ // 修改称号
+ if (tempSelect.value.length>0) {
+ this.selectionItem.name = tempSelect.value[0]
+ this.selectionItem.nameStr = valueHave.map(x=>x.name).join(',')
+ } else {
+ this.selectionItem.name = null
+ this.selectionItem.nameStr = ""
+ }
+ console.log(this.selectionItem, this.honor)
}
this.$refs.popup.close()
},
- uploadImage() {
+ uploadImage(arr) {
let _this = this
let url = this.NEWAPIURL
// #ifdef H5
@@ -310,11 +461,6 @@
uni.chooseImage({
count:1,
success: (res) => {
- // for(let i =0 ;iv.text)
this.inputValueStr = this.inputValue.map(v=>v.text).join(',')
}
-
+ // 视频
if (this.valueType == 'video_list') {
this.inputValue = JSON.parse(JSON.stringify(this.fileList))
this.inputValueStr = ''
}
+ // 荣誉称号
+ if (this.valueType == 'honor') {
+ // 过滤都没填的数据
+ let data = this.honor.filter(v=> !(!v.name&&!v.rank&&v.fileList.length<=0))
+ if (data.length>0) {
+ if (data.every(v=>(v.name&&v.rank&&v.fileList.length>0))) {
+ this.inputValue = JSON.parse(JSON.stringify(data))
+ this.inputValueStr = data[0].nameStr
+ } else {
+ uni.showToast({
+ title: '请补充信息',
+ icon:'none'
+ })
+ return true
+ }
+
+ } else {
+ this.inputValue = []
+ this.inputValueStr = ""
+ }
+ }
+
+
},
submit() {
@@ -498,6 +673,9 @@
background: white;
padding-bottom: 50rpx;
}
+ .bg.honorBG{
+ background: #F1F1F1;
+ }
.empty-value{
font-weight: 500;
@@ -536,7 +714,7 @@
position: relative;
span{
flex-shrink: 0;
- width: 120rpx;
+ width: 140rpx;
}
&>view{
flex: 1;
@@ -583,6 +761,14 @@
margin: auto;
border-bottom: 1rpx solid #D8D8D8;
position: relative;
+
+ .cover-picker{
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ }
}
.popup-item.active{
color: #96684F;
@@ -640,7 +826,7 @@
padding-top: 40rpx;
span{
flex-shrink: 0;
- width: 120rpx;
+ width: 140rpx;
}
.img-container{
flex:1;
@@ -815,4 +1001,30 @@
}
}
+ .honor-item{
+ background: white;
+ border-radius: 13rpx;
+ padding: 0 12rpx;
+ position: relative;
+ margin-bottom: 28rpx;
+ .del-icon{
+ position: absolute;
+ bottom: 5rpx;
+ right: 5rpx;
+ }
+ }
+
+ .icon-select{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+ .icon-select::after{
+ content: "";
+ width: 20rpx;
+ height: 20rpx;
+ margin-left: 6rpx;
+ background-image: url('https://static.ticket.sz-trip.com/tongli/images/user/rightIcon-gray.png');
+ background-size: 100% 100%;
+ }
diff --git a/subPackages/user/register.vue b/subPackages/user/register.vue
index 770fd5d..77de90b 100644
--- a/subPackages/user/register.vue
+++ b/subPackages/user/register.vue
@@ -38,6 +38,11 @@
{{info.certificate_number}}
请填写
+
+ 荣誉称号
+ {{info.honorStr}}
+ 请选择
+
工作年限
{{info.duration}}
@@ -111,6 +116,7 @@
bio:'', video_list: [],
sparkle_text: [],
sparkle_textStr: '',
+ honor: [], honorStr: ''
},
groupIds: [], // 导游等级
@@ -159,6 +165,7 @@
bio:'', video_list: [],
sparkle_text: [],
sparkle_textStr: '',
+ honor: [], honorStr: ''
}
return
}
@@ -193,6 +200,8 @@
sparkle_textStr:(resData.sparkle_text || []).map(v=>v.text).join(','),
video_list: video_list,
+
+ honor: [], honorStr: ''
}
})
},
@@ -289,7 +298,7 @@
// 跳转修改数据
changeValue(valueType) {
- if (!this.canEdit) return
+ // if (!this.canEdit) return
let inputValue = this.info[valueType]
if (valueType == "lingo_ids") {
uni.setStorageSync("userfileList",JSON.stringify(this.info.lingo_idsFileList))
@@ -300,6 +309,9 @@
if (valueType == 'sparkle_text') {
inputValue = this.info.sparkle_textStr
}
+ if (valueType == 'honor') {
+ uni.setStorageSync("userHonor",JSON.stringify(this.info.honor))
+ }
uni.navigateTo({
url: `/subPackages/user/infoFilling?valueType=${valueType}&inputValue=${inputValue}`