cmy 1 vuosi sitten
vanhempi
commit
17b04b13b1
5 muutettua tiedostoa jossa 61 lisäystä ja 52 poistoa
  1. 1 1
      api/wx.js
  2. 4 4
      pages/index/index.vue
  3. 2 2
      pages/public/wxLogin.vue
  4. 53 44
      pages/user/model/modelrz.vue
  5. 1 1
      pages/userhome/user.vue

+ 1 - 1
api/wx.js

@@ -2,7 +2,7 @@ import request from '@/utils/request'
 // 微信分享信息
 export function share(data) {
 	return request({
-		url: '/api/share',
+		url: '/api/pub/getShareInfo',
 		method: 'get',
 		data
 	});

+ 4 - 4
pages/index/index.vue

@@ -152,10 +152,10 @@
 			let url = currentPage.route; //当前页面url
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
 			let shareObj = {
-				title: "母婴界严选", // 默认是小程序的名称(可以写slogan等)
-				path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
-				imageUrl: this.shareData.img,
-				desc: this.shareData.synopsis,
+				title:this.shareData.title, // 默认是小程序的名称(可以写slogan等)
+				path: this.shareData.query, // 默认是当前页面,必须是以‘/’开头的完整路径
+				// imageUrl: this.shareData.img,
+				desc: this.shareData.content,
 				success: function(res) {
 					// 转发成功之后的回调
 					if (res.errMsg == 'shareAppMessage:ok') {}

+ 2 - 2
pages/public/wxLogin.vue

@@ -163,10 +163,10 @@
 						nickname: user.userInfo.nickName,
 						gender: user.userInfo.gender,
 						// #ifndef MP
-						spread: spread_spid,
+						parent_uid: spread_spid,
 						// #endif
 						// #ifdef MP
-						spread: spread_code
+						parent_uid: spread_code
 						// #endif
 					})
 					.then(({

+ 53 - 44
pages/user/model/modelrz.vue

@@ -306,12 +306,12 @@
 			};
 		},
 		async onLoad(options) {
+				this.modelid = options.modelid
 			if (options.type == 1) {
 				this.type = 1;
 				await this.getUserCardInfo()
 			} else if (options.type == 2) {
 				this.type = 2
-				this.modelid = options.modelid
 			}
 			this.init()
 		},
@@ -436,6 +436,9 @@
 					is_type_audit: 1
 				}
 				uni.setStorageSync('modeldata',data)
+				
+				
+				
 				uni.navigateTo({
 					url: '/pages/user/model/model?mtype=' + that.modelid + '&look=2'
 				})
@@ -643,11 +646,47 @@
 						}
 					});
 				})
-
 			},
-
 			// 实名认证
 			confirm(e) {
+				const that = this;
+				if(!that.rendl()){
+					return
+				}
+				that.loding = true;
+				subInfoAudit({
+						avatar: that.updata.avatar,
+						name: that.updata.name,
+						mobile: that.updata.phone,
+						idcard: that.updata.cardId,
+						service_type: that.updata.timetype.code,
+						service_min_price: that.updata.minMoney,
+						service_max_price: that.updata.maxMoney,
+						service_area: that.updata.onCity.map((arr) => {
+							return arr.district
+						}),
+						service_project: that.updata.checkedType,
+						service_intro_content: that.updata.mymask,
+						service_intro_imgs: that.updata.imageList,
+						work_year: that.updata.work_year,
+						ancestral_place: that.updata.ancestral_place,
+						education: that.updata.education,
+						minority: that.updata.minority,
+						service_audit_imgs: that.updata.service_audit_imgs,
+						service_imgs: that.updata.service_imgs,
+						user_work_type_id: that.updata.word.id,
+					})
+					.then((e) => {
+						that.loding = false;
+						this.$api.msg(e.msg);
+					})
+					.catch(err => {
+						this.loding = false;
+						console.log(err);
+					});
+			},
+			// 认证
+			rendl(){
 				const that = this;
 				if (!that.updata.avatar) {
 					uni.showModal({
@@ -655,16 +694,16 @@
 						content: '请上传头像',
 						showCancel: false,
 					});
-					return
+					return false
 				}
-
+				
 				if (!that.updata.name) {
 					uni.showModal({
 						title: '错误',
 						content: '请填写姓名',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (!that.updata.cardId) {
 					uni.showModal({
@@ -679,7 +718,7 @@
 						content: '请填写正确的身份证号',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (!that.updata.phone) {
 					uni.showModal({
@@ -687,7 +726,7 @@
 						content: '请填写手机号',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (!that.updata.timetype.code) {
 					uni.showModal({
@@ -695,7 +734,7 @@
 						content: '请选择收费时间类型',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (!that.updata.minMoney) {
 					uni.showModal({
@@ -703,7 +742,7 @@
 						content: '请填写最低收费价',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (!that.updata.maxMoney) {
 					uni.showModal({
@@ -711,7 +750,7 @@
 						content: '请填写最高收费价',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (that.updata.onCity.length == 0) {
 					uni.showModal({
@@ -719,7 +758,7 @@
 						content: '请选择服务区域',
 						showCancel: false,
 					});
-					return
+					return false
 				}
 				if (that.updata.checkedType.length == 0) {
 					uni.showModal({
@@ -727,39 +766,9 @@
 						content: '请选择服务内容',
 						showCancel: false,
 					});
-					return
+					return false
 				}
-				that.loding = true;
-				subInfoAudit({
-						avatar: that.updata.avatar,
-						name: that.updata.name,
-						mobile: that.updata.phone,
-						idcard: that.updata.cardId,
-						service_type: that.updata.timetype.code,
-						service_min_price: that.updata.minMoney,
-						service_max_price: that.updata.maxMoney,
-						service_area: that.updata.onCity.map((arr) => {
-							return arr.district
-						}),
-						service_project: that.updata.checkedType,
-						service_intro_content: that.updata.mymask,
-						service_intro_imgs: that.updata.imageList,
-						work_year: that.updata.work_year,
-						ancestral_place: that.updata.ancestral_place,
-						education: that.updata.education,
-						minority: that.updata.minority,
-						service_audit_imgs: that.updata.service_audit_imgs,
-						service_imgs: that.updata.service_imgs,
-						user_work_type_id: that.updata.word.id,
-					})
-					.then((e) => {
-						that.loding = false;
-						this.$api.msg(e.msg);
-					})
-					.catch(err => {
-						this.loding = false;
-						console.log(err);
-					});
+				return true
 			}
 		}
 	};

+ 1 - 1
pages/userhome/user.vue

@@ -227,7 +227,7 @@
 			navcard() {
 				// 判断是否已经认证
 				if (this.user.work_type_id <=0) {
-					this.navTo('/pages/user/model/modelrz')
+					this.navTo('/pages/user/model/modelrz?modelid='+this.user.show_template_id)
 				} else {
 					if (this.user.show_template_id) {
 						this.navTo('/pages/user/model/model?mtype=' + this.user.show_template_id+'&look=1')