Browse Source

支持缓存及会员等级修改

master
sj 2 years ago
parent
commit
bd20e911fd
  1. 6
      src/layout/components/AppMain.vue
  2. 21
      src/views/bxg/shop/user/form.vue
  3. 25
      vue.config.js

6
src/layout/components/AppMain.vue

@ -1,8 +1,10 @@
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
<!-- <keep-alive :include="cachedViews">-->
<!-- 改为所有页面都支持缓存-->
<keep-alive>
<router-view :key="key" />
</keep-alive>
</transition>
</section>

21
src/views/bxg/shop/user/form.vue

@ -17,6 +17,12 @@
<el-input v-model="form.integral" style="width: 370px;"
type="number" oninput="if(value>999999)value=999999"/>
</el-form-item>
<el-form-item label="会员等级" >
<el-select v-model="form.level" filterable clearable>
<el-option v-for="item in levelList"
:value="item.grade" :key="item.id" :label="item.name" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="商户管理">
<el-radio v-model="form.adminid" :label="1">开启</el-radio>
<el-radio v-model="form.adminid" :label="0">关闭</el-radio>
@ -31,6 +37,7 @@
<script>
import { add, edit } from '@/api/bxg/yxUser'
import {initData} from "@/api/bxg/data";
export default {
props: {
isAdd: {
@ -40,6 +47,7 @@ export default {
},
data() {
return {
levelList:[],
loading: false, dialog: false,
form: {
uid: '',
@ -82,7 +90,20 @@ export default {
}
}
},
created() {
this.getLevelList()
},
methods: {
getLevelList() {
initData('bxg/api/yxSystemUserLevel', {
page: 0,
size: 999,
sort: 'id,desc',
}).then(data => {
this.levelList=data.content
// console.log('this.levelList',this.levelList)
})
},
cancel() {
this.resetForm()
},

25
vue.config.js

@ -33,18 +33,19 @@ module.exports = {
host: '0.0.0.0',
port: port,
open: false,
// proxy: {
// // detail: https://cli.vuejs.org/config/#devserver-proxy
// [process.env.VUE_APP_BASE_API]: {
// // target: `http://localhost:48080`,
// // target: `http://api-dashboard.yudao.iocoder.cn`,
// target: `https://bxg.api.cyjyyjy.com`,
// changeOrigin: true,
// pathRewrite: {
// ['^' + process.env.VUE_APP_BASE_API]: ''
// }
// }
// },
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:48080`,
// target: `http://api-dashboard.yudao.iocoder.cn`,
// target: `https://bxg.api.cyjyyjy.com`,
target: `http://127.0.0.1:48080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
}
},
disableHostCheck: true
},
css: {

Loading…
Cancel
Save