增加查看协议

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

View File

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

View File

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