Forráskód Böngészése

Merge branch 'main' of https://gitlab.com/tea28/client

hejie 3 éve
szülő
commit
53520ef994
2 módosított fájl, 46 hozzáadás és 6 törlés
  1. 43 4
      src/pages/autonym-submit/index.vue
  2. 3 2
      src/pages/product/p_details.vue

+ 43 - 4
src/pages/autonym-submit/index.vue

@@ -14,9 +14,20 @@
 				<view class="list_name">身份证号:</view>
 				<input class="list_input flex_grow" type="text" v-model="code" placeholder="请输入您的身份证号" />
 			</view>
-			<view class="privacy">
+				<div class="checkbox-box flex_r flex_ac">
+					<checkbox-group @change="checkboxChange" class="flex_r flex_ac">
+						<label class="checkbox flex_r flex_ac">
+							<checkbox class='checkboxCom' value="agree" />
+							<view>我同意</view>
+						</label>
+						<navigator url="/pages/agreement/privacy" hover-class="li_hover"><text>《用户服务协议》</text></navigator>
+                        <text>和</text>
+						<navigator url="/pages/agreement/privacy" hover-class="li_hover"><text>《隐私协议》</text></navigator>
+					</checkbox-group>
+				</div>
+			<!-- <view class="privacy">
 				<navigator url="/pages/agreement/privacy" hover-class="li_hover"><text>查看《隐私协议》</text></navigator>
-			</view>
+			</view> -->
 			
 			<view class="btn flex_r flex_ac flex_jc" @tap="submit">提交审核</view>
 		</view>
@@ -41,14 +52,21 @@
 		data() {
 			return {
 				name: "",
-				code: ""
+				code: "",
+				isDisabled: false, //是否选中协议
 			};
+
 		},
 		onLoad() {
 			this.loadData()
 		},
 		methods: {
 			submit() {
+				if(this.isDisabled){
+					appEv.errTips("请阅读并同意相关协议");
+					return;
+				}
+
 				// #ifdef  H5
 				let type = "H5";
 				// #endif
@@ -82,7 +100,11 @@
 						this.amount = res.data.amount
 					}
 				})
-			}
+			},
+			checkboxChange(e) {
+			    var value = e.detail.value;
+			    this.isDisabled = value.length == 0
+			},
 		}
 	};
 </script>
@@ -152,4 +174,21 @@
 	}
 
 	// 提交内容-end
+
+	
+.checkbox-box{
+    margin-top: 60rpx;
+    margin-bottom: -20px;
+    font-size: 28rpx;
+
+}
+.checkbox-box text{
+    /* color: #07d; */
+    /* color: #44A92F; */
+    color: #44a92f;
+}
+.checkbox-box .checkbox .checkboxCom{
+    transform: scale(0.84);
+    -webkit-transform: scale(0.84);
+}
 </style>

+ 3 - 2
src/pages/product/p_details.vue

@@ -223,12 +223,13 @@ export default {
     };
   },
   onLoad: function (e) {
+    this.userinfo = uni.getStorageSync("userinfo");
+    let token = uni.getStorageSync("token");
     this.type = e.type;
     this.goodsDa = e;
-    this.userinfo = uni.getStorageSync("userinfo");
     this.loadData(e);
 
-    if(e.invite && !uni.getStorageSync("token")) this.login(e.invite);
+    if(e.invite && !token) this.login(e.invite);
   },
   onShow: function () {},
   methods: {