feat(uniapp_v2): 二开功能迁移与小程序主包优化
- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动 - queue、assets 使用独立分包以降低主包体积 - 修复首页单根节点与支付结果页 v-if 链 - 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错 - 配置域名与 manifest 应用名称;cache/store 防御性处理 Made-with: Cursor
This commit is contained in:
108
pro_v3.5.1/view/uniapp_v2/pages/users/privacy/index.vue
Normal file
108
pro_v3.5.1/view/uniapp_v2/pages/users/privacy/index.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="content">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<rich-text :nodes="content"></rich-text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 || APP-PLUS -->
|
||||
<view v-html="content"></view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let sysHeight = uni.getWindowInfo().statusBarHeight;
|
||||
import { getUserAgreement, getPayVipInfoApi } from '@/api/user.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content: ``,
|
||||
sysHeight: sysHeight || 0,
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
pageName() {
|
||||
let list = {
|
||||
privacy: '隐私协议',
|
||||
cancel: '注销协议',
|
||||
user: '用户协议',
|
||||
supplier: '供应商入驻协议'
|
||||
};
|
||||
uni.setNavigationBarTitle({
|
||||
title: list[this.type]
|
||||
});
|
||||
return list[this.type];
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.type = e.type;
|
||||
if (e) {
|
||||
if(e.type == 'payVip'){
|
||||
getPayVipInfoApi().then(res=>{
|
||||
this.content = res.data.member_explain.content;
|
||||
}).catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err.msg
|
||||
});
|
||||
});
|
||||
}else{
|
||||
getUserAgreement(e.type).then((res) => {
|
||||
this.content = res.data.content;
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err.msg
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
getUserAgreement('privacy').then((res) => {
|
||||
this.content = res.data.content;
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err.msg
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
.content {
|
||||
padding: 0 30rpx 40rpx 30rpx;
|
||||
}
|
||||
.sys-head {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
.sys-title {
|
||||
height: 43px;
|
||||
line-height: 43px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user