修改隐私政策

main
ihzero 2024-05-13 23:45:28 +08:00
parent 06569963e7
commit dfc0eb2eec
6 changed files with 56 additions and 8 deletions

View File

@ -2,3 +2,5 @@
VITE_COMMON_API_PREFIX = /api-base VITE_COMMON_API_PREFIX = /api-base
VITE_COMMON_API_URL = http://store-manage.hmily.club/api VITE_COMMON_API_URL = http://store-manage.hmily.club/api
VITE_COMMON_URL = http://store-manage.hmily.club

View File

@ -1,3 +1,5 @@
VITE_COMMON_API_PREFIX = /api-base VITE_COMMON_API_PREFIX = /api-base
VITE_COMMON_API_URL = http://store.manage.zlgj168.com/api VITE_COMMON_API_URL = http://store.manage.zlgj168.com/api
VITE_COMMON_URL = http://store.manage.zlgj168.com

View File

@ -15,6 +15,13 @@
"login": false "login": false
} }
}, },
{
"path": "pages/webview/index",
"style": {
"navigationBarTitleText": "隐私协议",
"navigationStyle": "default"
}
},
{ {
"path": "pages/home/index", "path": "pages/home/index",
"style": { "style": {

View File

@ -1,20 +1,20 @@
<template> <template>
<view class="w-full flex flex-col"> <view class="w-full flex flex-col">
<view class="mt-20vh flex-center"> <view class="mt-20vh flex-center">
<image class="w-200rpx h-200rpx" src="@/static/logo.png"></image> <image class="w-200rpx h-200rpx" src="@/static/logo.png"></image>
</view> </view>
<view class="text-35rpx text-hex-333333 font-600 mt-80rpx">托管门店助手</view> <view class="text-35rpx text-hex-333333 font-600 mt-80rpx"
>托管门店助手</view
>
<view class="text-27rpx text-hex-333333">欢迎登录</view> <view class="text-27rpx text-hex-333333">欢迎登录</view>
<view class="flex-1 flex flex-col justify-end mt-0rpx"> <view class="flex-1 flex flex-col justify-end mt-0rpx">
<LoginForm></LoginForm> <LoginForm></LoginForm>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import LoginForm from './LoginForm.vue' import LoginForm from './LoginForm.vue'
</script>
<style scoped lang="scss">
</style> </script>
<style scoped lang="scss"></style>

View File

@ -29,6 +29,19 @@
</uv-input> </uv-input>
</view> </view>
</uv-form-item> </uv-form-item>
<view class="mt-40rpx">
<uv-checkbox-group
shape="circle"
activeColor="#ff0000"
v-model="checkboxValue"
>
<uv-checkbox :customStyle="{ marginBottom: '8px' }" :name="true">
<view @click.stop="handleW" class="text-24rpx"
>登录并同意隐私政策</view
>
</uv-checkbox>
</uv-checkbox-group>
</view>
</uv-form> </uv-form>
<view class="mt-115rpx"> <view class="mt-115rpx">
<uv-button block type="primary" shape="circle" @click="onValidate" <uv-button block type="primary" shape="circle" @click="onValidate"
@ -40,7 +53,7 @@
<script setup> <script setup>
import { ref, reactive, computed } from 'vue' import { ref, reactive, computed } from 'vue'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const checkboxValue = ref([false])
const userStore = useUserStore() const userStore = useUserStore()
const form = ref({ const form = ref({
@ -67,6 +80,10 @@ const rules = computed(() => {
const formRef = ref(null) const formRef = ref(null)
const handleW = () => {
uni.navigateTo({ url: '/pages/webview/index' })
}
const onValidate = () => { const onValidate = () => {
formRef.value.validate().then(() => { formRef.value.validate().then(() => {
handleClick() handleClick()
@ -74,6 +91,7 @@ const onValidate = () => {
} }
const handleClick = async () => { const handleClick = async () => {
checkboxValue.value = [true]
try { try {
const { username, password } = form.value const { username, password } = form.value
await userStore.login({ await userStore.login({

View File

@ -0,0 +1,19 @@
<template>
<view>
<web-view :webview-styles="{paddingTop: '44px'}" v-if="url" :src="url"></web-view>
</view>
</template>
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import CuNavbar from '@/components/cu-navbar/index'
const url = ref(`${import.meta.env.VITE_COMMON_URL}/privacy`)
onLoad((e) => {
if(e.url) url.value = e.url
})
</script>