ruanzb 4 年 前
コミット
e0c2895fc2
2 ファイル変更29 行追加3 行削除
  1. 1 1
      pages/card/card.vue
  2. 28 2
      pages/shop-info/shop-info.vue

+ 1 - 1
pages/card/card.vue

@@ -22,7 +22,7 @@
 					{
 						icon:'/static/icon/shangjia.png',
 						name:'商家认证',
-						path:''
+						path:'/pages/shop-info/shop-info?edit=true&phone=1'
 					},
 					{
 						icon:'/static/icon/bank.png',

+ 28 - 2
pages/shop-info/shop-info.vue

@@ -138,7 +138,7 @@
 					</view>
 					<view class="border">
 						<u-form-item label="身份证号码" prop="personIdCard">
-							<u-input :border="false" placeholder="请输入身份证号码" v-model="form.personIdCard" ></u-input>
+							<u-input :border="false" placeholder="请输入身份证号码" v-model="form.personIdCard" :disabled="edit"></u-input>
 						</u-form-item>
 					</view>
 					<view class="photo border">
@@ -314,7 +314,8 @@
 						trigger: ['change', 'blur'],
 					}],
 				},
-				step:1
+				step:1,
+				edit:false
 			}
 		},
 		onReady() {
@@ -352,11 +353,26 @@
 				})
 				return
 			}
+			if(options.edit){
+				this.edit = options.edit
+				this.shopDetail()
+			}
 			this.form.personTel=options.phone
 			this.fetchMallList()
 			this.getShopLabelAll()
 		},
 		methods: {
+			async shopDetail() {
+				let params = {
+					id: this.vuex_shopId
+				}
+				let data = await this.$api.shop.detail(params)
+				let res = data.data
+				Object.assign(this.form,res)
+				this.mallLabel=res.mallName
+				this.shopAddress=res.province +"-"+res.city+"-"+res.area
+				this.$forceUpdate()
+			},
 			prevStep(){
 				if(this.step>1&&this.step<4){
 					this.step--
@@ -383,6 +399,13 @@
 				this.$api.mall.getShopLabelAll(p).then(res => {
 					res.data.records.forEach(item => {
 						item.checked = false
+						if(this.form.labelNames&&!this.$isEmpty(this.form.labelNames)){
+							this.form.labelNames.split(",").map((c)=>{
+								if(item.name==c){
+									item.checked = true
+								}
+							})
+						}
 					})
 					this.checkboxList = res.data.records
 				})
@@ -398,6 +421,9 @@
 				
 			},
 			async chooseImage(name) {
+				if((name=='idCardFront'||name=='idCardContrary')&&this.edit){
+					return
+				}
 				let res = await this.$mpi.chooseImage()
 				this.$api.uploadFile(res[0]).then(res => {
 					this.form[name] = res.data.link