diff --git a/pages/my/hehuo.vue b/pages/my/hehuo.vue index 464d583..1041f2f 100644 --- a/pages/my/hehuo.vue +++ b/pages/my/hehuo.vue @@ -45,6 +45,15 @@ + + 请选合作项目 + + + {{item.value}} + + + 上传身份证正面 @@ -140,6 +149,7 @@ export default { data() { return { + selected:[], pickVal: [0, 0, 0], // 选择器默认值 pickVal2:[], // 辅助城市名字线索 cityArr: [], // 所有城市 @@ -156,14 +166,41 @@ back:'', certification:[], bb:'1', - cityData:'' + cityData:'', + typeId: '', + typeList:[] } }, onLoad() { this.getChannel(); - this.loadProvinces() + this.loadProvinces(); + this.fuwuType() }, methods: { + gukeBtn(item) { + var index = this.selected.indexOf(item); + if (index === -1) { + this.selected.push(item); + } else { + this.selected.splice(index, 1); + } + var data = []; + for (var i = 0; i < this.selected.length; i++) { + data.push(this.selected[i].id) + } + this.typeId = data.join(",") + }, + fuwuType(){ + this.$Request.get("/app/dict/list", { + type: '服务类型' + }).then(res => { + if (res.code == 0) { + if (res.data) { + this.typeList = res.data + } + } + }); + }, loadProvinces() { // 加载省份 uni.request({ url: 'http://test-api.tiananhub.com/api/province/GetListProvince', @@ -315,6 +352,10 @@ this.$queue.showToast('请输入年龄') return; } + if (!this.typeId) { + this.$queue.showToast('请选合作项目') + return; + } if (this.front == '') { this.$queue.showToast('请上身份证正面') return; @@ -323,6 +364,7 @@ this.$queue.showToast('请上身份证反面') return; } + this.certification = this.certification.toString(); let userId = this.$queue.getData('userId'); let data = { @@ -333,7 +375,8 @@ city: this.cityData, front: this.front, back:this.back, - certification:this.certification + certification:this.certification, + classifyId: this.typeId, } this.$Request.postJson('/app/artificer/insertAgency', data).then(res => { if (res.code == 0) { @@ -477,9 +520,39 @@ } -