feat: 增加用户协议

pull/7/head
TianYu 2023-05-31 17:21:08 +08:00
parent fd8d47ae81
commit c2debf6b82
7 changed files with 32 additions and 9 deletions

View File

@ -55,7 +55,7 @@
<span>{{ scope.row.visible ? '是' : '否' }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<!-- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
@ -74,7 +74,7 @@
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList"/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="参数分类" prop="category">
<el-input v-model="form.category" placeholder="请输入参数分类" />
@ -95,7 +95,8 @@
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />-->
<editor v-model="form.remark" :min-height="380"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -108,9 +109,13 @@
<script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig } from "@/api/infra/config";
import Editor from '@/components/Editor/index.vue';
export default {
name: "InfraConfig",
components: {
Editor
},
data() {
return {
//

View File

@ -8,6 +8,9 @@ export function getUserInfo(){
return request.get('member/user/get');
}
export function getUserAgreement(){
return request.get('api/order/member/get-app_value-by-key?key=user_privacy')
}
/**
* 设置用户分享

View File

@ -8,6 +8,8 @@ import auth from './wechat';
import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY, BACK_URL} from './../config/cache';
const whiteListPage=['pages/users/privacy/index']
function prePage(){
let pages = getCurrentPages();
let prePage = pages[pages.length - 1];
@ -71,6 +73,12 @@ export function _toLogin(push, pathLogin) {
}
}
export function isWhiteList(){
let path = prePage();
console.log('path111', path)
return whiteListPage.indexOf(path) > -1
}
export function checkLogin()
{

View File

@ -201,7 +201,7 @@
{
"path": "privacy/index",
"style": {
"navigationBarTitleText": "隐私协议"
"navigationBarTitleText": "用户协议"
}
},
{

View File

@ -46,7 +46,7 @@
<u-checkbox-group v-model="checked">
<u-checkbox size="30" shape="circle" activeColor="#F35981" name="同意"></u-checkbox>
</u-checkbox-group>
<view class="text">我已阅读并同意 <span class="link">创盈商城用户协</span></view>
<view class="text">我已阅读并同意 <span class="link" @click="onLinkUserPrivacy"></span></view>
</div>
</div>
<div class="bottom"></div>
@ -104,6 +104,11 @@
},
methods: {
onLinkUserPrivacy(){
uni.navigateTo({
url: '/pages/users/privacy/index'
})
},
async getLogoImage() {
let that = this;
getLogo().then(res => {

View File

@ -1,5 +1,6 @@
<template>
<view class="content">
<u-navbar autoBack title="用户协议"></u-navbar>
<jyf-parser :html="content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</template>
@ -25,9 +26,9 @@
},
mounted() {
getUserAgreement().then(res => {
this.content = res.data.content
this.content = res.data
}).catch(err => {
that.$util.Tips({
this.$util.Tips({
title: err.msg
});
})

View File

@ -6,7 +6,8 @@ import {
} from '@/config/app';
import {
toLogin,
checkLogin
checkLogin,
isWhiteList
} from '../libs/login';
import store from '../store';
@ -25,7 +26,7 @@ function baseRequest(url, method, data, {
header['tenant-id'] = store.state.app.tenantId
if (!noAuth) {
//登录过期自动登录
if (!store.state.app.token && !checkLogin()) {
if (!store.state.app.token && !checkLogin() && !isWhiteList()) {
toLogin();
return Promise.reject({
msg: '未登录'