jiuyiUniapp/jiuyi2/components/login/notice.vue

56 lines
1.0 KiB
Vue

<script setup>
/**
* 登录 开屏界面的须知
*/
import {
ref,
defineModel
} from 'vue'
// 工具库
import util from '@/common/js/util';
// 阅读
const read = defineModel('value')
// 反选阅读
function handleRead() {
read.value = !read.value
}
/**
* 查看文章
* @param {Object} id
*/
function article(id) {
uni.navigateTo({
url: util.setUrl('/pages/index/article', {
id,
})
})
}
</script>
<template>
<view class="notice tac c999 f20">
<view class="button" @click="handleRead">
<uni-icons type="checkbox-filled" size="40rpx" color="#000" v-if="read" />
<uni-icons type="circle" size="40rpx" color="#99" v-else />
</view>
<text>已阅读并同意</text>
<text class="mlr10 c333" @click="article(3)">用户协议</text>
<text>和</text>
<text class="mlr10 c333" @click="article(1)">隐私政策</text>
</view>
</template>
<style lang="scss" scoped>
// 须知
.notice {
line-height: 50rpx;
.button {
display: inline-block;
vertical-align: middle;
}
}
</style>