Merge pull request 'feature/mall_product' (#7) from feature/mall_product into master

Reviewed-on: http://117.33.142.185:3000/zenghuapei/cyywl_server/pulls/7
pull/8/head^2
tianyu 2023-05-31 17:22:06 +08:00
commit da15156869
12 changed files with 133 additions and 84 deletions

View File

@ -55,7 +55,7 @@
<span>{{ scope.row.visible ? '是' : '否' }}</span> <span>{{ scope.row.visible ? '是' : '否' }}</span>
</template> </template>
</el-table-column> </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"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <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"/> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="参数分类" prop="category"> <el-form-item label="参数分类" prop="category">
<el-input v-model="form.category" placeholder="请输入参数分类" /> <el-input v-model="form.category" placeholder="请输入参数分类" />
@ -95,7 +95,8 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <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-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -108,9 +109,13 @@
<script> <script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig } from "@/api/infra/config"; import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig } from "@/api/infra/config";
import Editor from '@/components/Editor/index.vue';
export default { export default {
name: "InfraConfig", name: "InfraConfig",
components: {
Editor
},
data() { data() {
return { return {
// //

View File

@ -8,6 +8,9 @@ export function getUserInfo(){
return request.get('member/user/get'); 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'; import { LOGIN_STATUS, USER_INFO, EXPIRES_TIME, STATE_R_KEY, BACK_URL} from './../config/cache';
const whiteListPage=['pages/users/privacy/index']
function prePage(){ function prePage(){
let pages = getCurrentPages(); let pages = getCurrentPages();
let prePage = pages[pages.length - 1]; 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() export function checkLogin()
{ {

View File

@ -11,9 +11,9 @@
} }
}, },
{ {
"path": "pages/member_loding/index", "path": "pages/member_rule/index",
"style": { "style": {
"navigationBarTitleText": "会员" "navigationBarTitleText": "充值规则"
} }
},{ },{
"path": "pages/notice/index", "path": "pages/notice/index",
@ -201,7 +201,7 @@
{ {
"path": "privacy/index", "path": "privacy/index",
"style": { "style": {
"navigationBarTitleText": "隐私协议" "navigationBarTitleText": "用户协议"
} }
}, },
{ {

View File

@ -24,16 +24,21 @@
</view> </view>
</view> </view>
<view class="box-privilege"> <view class="box-privilege">
<view class=""></view>
<view class="box-title"> <view class="box-title">
<image src='../../static/images/memberTitle.png'></image> <image src='../../static/images/memberTitle.png'></image>
</view> </view>
<view class="privilege-list"> <view class="privilege-list">
<view class="privilege-left">
<view class="privilege-item" v-for="(item,index) in 4" :key="index"> <image src='../../static/images/money_look.png'></image>
<image src='../../static/images/vip1.png'></image> <view class="privilege-text">
<text class="privilege-text"> <text>查看充值注意事项</text>
开通立享大额话费返送 <text>点击右侧按钮</text>
</text> </view>
</view>
<view class="privilege-right" @click="handleRule">
<text>查看</text>
<view></view>
</view> </view>
</view> </view>
</view> </view>
@ -127,6 +132,11 @@
} }
}, },
methods: { methods: {
handleRule(){
uni.navigateTo({
url:'/pages/member_rule/index'
})
},
handleOther(){ handleOther(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/member_others/index' url:'/pages/member_others/index'
@ -439,7 +449,7 @@
justify-content: center; justify-content: center;
&::before { &::before {
content: '特权详情'; content: '注意事项';
position: absolute; position: absolute;
font-size: 34rpx; font-size: 34rpx;
font-family: Adobe Heiti Std; font-family: Adobe Heiti Std;
@ -452,32 +462,66 @@
} }
.privilege-list { .privilege-list {
margin: 54rpx 10rpx 10rpx 10rpx; width: 100%;
margin: 54rpx 30rpx 20rpx 30rpx;
min-height: 110rpx;
background: #FFFFFF;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 3% 20rpx 1% 20rpx;
.privilege-left {
display: flex; display: flex;
justify-content: space-between;
.privilege-item {
display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: #fff;
padding: 6rpx 16rpx;
border-radius: 20rpx; border-radius: 20rpx;
margin: 0 10rpx;
image { image {
width: 96rpx; width: 68rpx;
height: 96rpx; height: 64rpx;
border-radius: 50%; margin-right: 12rpx;
margin-bottom: 15rpx;
} }
.privilege-text { .privilege-text {
display: flex;
flex-direction: column;
text:nth-child(1){
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000; color: #000000;
line-height: 36rpx; }
text-align: center; text:nth-child(2){
font-size: 26rpx; font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FB394B;
}
}
}
.privilege-right{
background-image: url("../../static/images/others-button.png");
background-size: 144rpx 64rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
width: 144rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
view {
position: absolute;
right: 0;
top: -24%;
width: 18rpx;
height: 6rpx;
background: #FEAC49;
border-radius: 3rpx;
} }
} }

View File

@ -1,52 +0,0 @@
<template>
</template>
<script>
import {
memberGradeInfo
} from '@/api/member.js';
export default {
name: "member_loding",
data() {
return {
};
},
async onLoad() {
try{
uni.showLoading({
title: '加载中'
});
const res = await memberGradeInfo()
if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 2,
pagePath: '/pages/member_equity/index'
})
uni.switchTab({
url:'/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 2,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
} finally{
uni.hideLoading();
}
},
methods: {
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,34 @@
<template>
<view class="content">
<image src="../../static/images/rule.png" mode=""></image>
<u-navbar autoBack title="充值规则"></u-navbar>
</view>
</template>
<script>
export default {
name: "member_rule",
data() {
return {
};
},
async onLoad() {
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.content{
image{
margin-top: 10%;
width: 100%;
min-height: 255vh;
}
}
</style>

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 KiB

View File

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