purui 3 ヶ月 前
コミット
9e701cbd81
1 ファイル変更11 行追加2 行削除
  1. 11 2
      packages/merchant/src/pages/login/index.vue

+ 11 - 2
packages/merchant/src/pages/login/index.vue

@@ -22,7 +22,12 @@ const formData = ref({
   socialState: '9b2ffbc1-7425-4155-9894-9d5c08541d62',
   socialCodeValid: true,
 })
+const agree = ref(false)
 const handleLogin = async () => {
+  if(!agree.value){
+	  await uni.showToast({ title: "请勾选阅读并同意服务使用协议",icon:"none" })
+	  return false
+  }	
   const { msg, code, data } = await login(formData.value)
   if (code !== 0) {
     await uni.showToast({ title: msg })
@@ -34,6 +39,9 @@ const handleLogin = async () => {
     uni.reLaunch({ url: '/pages/home/index' })
   }
 }
+const agreeChange = ({ value }) =>{
+	agree.value = value
+}
 onLoad(() => {
   if (isLogined.value) {
     uni.reLaunch({ url: '/pages/home/index' })
@@ -79,9 +87,10 @@ onShareAppMessage(async () => ({}))
       <div class="w-full mt-[50px]">
         <wd-button block :round="false" @click="handleLogin">登录</wd-button>
       </div>
-      <div class="mt-8">
+      <div class="mt-8 flex">
+		<wd-checkbox :modelValue="agree" shape="circle" @change="agreeChange"></wd-checkbox> 
         <span class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-tight">
-          登录即代表您已阅读并同意筑巢荟的
+          已阅读并同意筑巢荟的
         </span>
         <span
           class="text-[#2357e9] text-xs font-normal font-['PingFang_SC'] leading-tight"