增加查看协议

This commit is contained in:
kron
2025-09-04 15:42:59 +08:00
parent c9eaeedc0d
commit 71a79defe7
3 changed files with 36 additions and 8 deletions

View File

@@ -79,6 +79,27 @@ const handleLogin = () => {
}, },
}); });
}; };
const openServiceLink = () => {
uni.navigateTo({
url:
"/pages/webview?url=" +
encodeURIComponent(
"https://static.shelingxingqiu.com/shootServiceAgreement.html"
),
});
};
const openPrivacyLink = () => {
uni.navigateTo({
url:
"/pages/webview?url=" +
encodeURIComponent(
"https://static.shelingxingqiu.com/shootPrivacyPolicy.html"
),
});
};
onShow(() => { onShow(() => {
loading.value = false; loading.value = false;
}); });
@@ -128,12 +149,13 @@ onShow(() => {
<view class="protocol" @click="handleAgree"> <view class="protocol" @click="handleAgree">
<view v-if="!agree" /> <view v-if="!agree" />
<image v-if="agree" src="../static/checked.png" mode="widthFix" /> <image v-if="agree" src="../static/checked.png" mode="widthFix" />
<text <view>
>已同意并阅读<text :style="{ color: '#fff' }">用户协议</text><text <text>已同意并阅读</text>
:style="{ color: '#fff' }" <view @click.stop="openServiceLink">用户协议</view>
>隐私协议</text <text></text>
>内容</text <view @click.stop="openPrivacyLink">隐私协议</view>
> <text>内容</text>
</view>
</view> </view>
</view> </view>
</template> </template>
@@ -200,6 +222,13 @@ onShow(() => {
margin-right: 10px; margin-right: 10px;
border: 1px solid #fff; border: 1px solid #fff;
} }
.protocol > view:last-child {
display: flex;
align-items: center;
}
.protocol > view:last-child > view {
color: #fff;
}
.login-btn { .login-btn {
line-height: 55px; line-height: 55px;
width: 80%; width: 80%;

View File

@@ -9,7 +9,7 @@
{ {
"path": "pages/webview", "path": "pages/webview",
"style": { "style": {
"navigationBarTitleText": "网页浏览" "navigationBarTitleText": ""
} }
}, },
{ {

View File

@@ -5,7 +5,6 @@ import { onLoad } from "@dcloudio/uni-app";
const url = ref(""); const url = ref("");
onLoad((options) => { onLoad((options) => {
url.value = decodeURIComponent(options.url); url.value = decodeURIComponent(options.url);
console.log(url.value);
}); });
</script> </script>