xhj 2 gadi atpakaļ
vecāks
revīzija
9f89ba5d4e

BIN
mine/static/images/gou1.png


BIN
mine/static/images/gou1_h.png


+ 6 - 1
mine/userinfo/userinfo.css

@@ -16,4 +16,9 @@ page{background: #F4F6FA;}
 .submit{position: fixed;left: 40rpx;right: 40rpx;bottom: 60rpx;height: 100rpx !important;line-height: 100rpx !important;background: #FE0419;font-size: 36rpx;color: #fff;text-align: center;border-radius: 10rpx !important;}
 
 .wechat{width: 181rpx !important;height: 54rpx !important;border-radius: 10rpx !important;background: #2AA147;font-size: 24rpx;color: #fff;align-items: center;justify-content: center;position: absolute;right: 30rpx;top: 50%;transform: translateY(-50%);}
-.wechat image{width: 41rpx;height: 33rpx;margin-right: 8rpx;}
+.wechat image{width: 41rpx;height: 33rpx;margin-right: 8rpx;}
+
+.agree{font-size: 24rpx;color: #666;margin: 80rpx 30rpx 30rpx;align-items: flex-start;line-height: 40rpx;padding-bottom: 30px;flex-wrap: wrap;}
+.gou{width: 26rpx;height: 26rpx;margin-right: 16rpx;margin-top: 8rpx;}
+.agree text{color: #4496DE;}
+.agree-c{flex-wrap: wrap;}

+ 20 - 3
mine/userinfo/userinfo.vue

@@ -97,6 +97,11 @@
 					<editor placeholder="请输入个人爱好" v-model="hobbies" id="editor" @ready="onEditorReadyH" @input="bindHobbies" class="textarea hobbies"></editor>
 				</view>
 			</view> -->
+			<view class="agree dflex" @click="agree" v-if="config.CONFIG_PRIVACY_AGREEMENT">
+				<image :src="'../static/images/' + (isAgree ? 'gou1_h.png' : 'gou1.png')" class="gou"></image>
+				已阅读并同意
+				<text @click.stop="jumpUrl('/pages/web/web?url='+it.url)" v-for="it,idx in JSON.parse(config.CONFIG_PRIVACY_AGREEMENT)"><block v-if="idx!=0">、</block>{{it.name}}</text>
+			</view>
 		</view>
 		<view style="height: 200rpx;"></view>
 		<button class="submit" @tap="confirm">确定</button>
@@ -125,21 +130,30 @@
 				cityCode: '',
 				morCity: [],
 				brief: '',
-				hobbies: ''
+				hobbies: '',
+				isAgree:false,
+				config:{}
 			};
 		},
 
 		components: {},
 		props: {},
-		onLoad: function() {
+		onLoad:async function() {
 			let _ts = this;
 			QQMapWX.initMap('3OJBZ-EQEKO-PFNWC-SHHEK-CGWAJ-KRBF7');
 			app.globalData.getCheckSessoin(json => {
 				_ts.sessionKey = json.session_key;
 			});
 			this.getInfo();
+			this.config = await req.getsysConfig()
+			if(!this.config.CONFIG_PRIVACY_AGREEMENT) this.isAgree = true
 		},
 		methods: {
+			jumpUrl(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
 			getInfo() {
 				let that = this;
 				let isShowLoading = false;
@@ -276,6 +290,7 @@
 				// if(!d.birthday) return req.msg("请选择出生日期");
 				// if(!d.district) return req.msg("请选择地区");
 				// if(!d.address) return req.msg("请填写详细地址");
+				if(!this.isAgree) return req.msg("请阅读并同意以下协议");
 				let isShowLoading = false;
 				if (!isShowLoading) {
 					req.loadIng('保存中');
@@ -334,7 +349,9 @@
 					 });
 				}).exec()
 			},
-
+			agree(){
+				this.isAgree = !this.isAgree
+			}
 		}
 	};
 </script>