增加协议

This commit is contained in:
GaoHao
2025-01-07 11:01:32 +08:00
parent c47fe17bcf
commit f82c31084d
5 changed files with 52 additions and 65 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1 ">
<view style="font-size: 28upx;" v-html="content"></view>
<view style="font-size: 28upx;" v-html="data.content"></view>
<view class="btn-box u-flex u-row-center" v-if="!isLogin">
<view class="btn cancel" @click="cancel">拒绝</view>
<view class="btn" @click="back">同意</view>
@@ -8,43 +8,39 @@
</view>
</template>
<script>
export default {
data() {
return {
content:'',
isLogin:false
}
},
onLoad() {
this.getGuize();
this.isLogin=uni.getStorageSync('token')?true:false
},
methods: {
cancel(){
// #ifdef H5
uni.navigateBack()
// #endif
// #ifdef APP
plus.runtime.quit();
// #endif
},
back(){
uni.navigateBack()
},
getGuize(){
// this.$Request.getT('/agreement/find?id=1').then(res =>{
// if(res.status === 0){
// this.content = res.data.content;
// }
// });
this.$u.get('app/common/type/154').then(res => {
this.content = res.data.value
});
}
}
}
<script setup>
import { reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app'
import config from '@/commons/config.js';
import {selectUserById} from '@/api/user/user.js';
import {commonType} from '@/api/init.js';
let data = reactive({
content: '',
isLogin:false
})
onLoad(() => {
getGuize()
data.isLogin=uni.getStorageSync('token')?true:false
})
async function getGuize() {
let res = await commonType(154)
data.content = res.value
}
function cancel(){
// #ifdef H5
uni.navigateBack()
// #endif
// #ifdef APP
plus.runtime.quit();
// #endif
}
function back(){
uni.navigateBack()
}
</script>
<style scoped>

View File

@@ -1,6 +1,6 @@
<template>
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1 ">
<view style="font-size: 28upx;" v-html="content"></view>
<view style="font-size: 28upx;" v-html="data.content"></view>
<view class="btn-box u-flex u-row-center" v-if="!isLogin">
<view class="btn cancel" @click="cancel">拒绝</view>
<view class="btn" @click="back">同意</view>
@@ -27,7 +27,7 @@
async function getGuize() {
let res = await commonType(155)
this.content = res.value
data.content = res.value
}
function cancel(){