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> <template>
<section class="app-main"> <section class="app-main">
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews"> <!-- <keep-alive :include="cachedViews">-->
<router-view :key="key" /> <!-- 改为所有页面都支持缓存-->
<keep-alive>
<router-view :key="key" />
</keep-alive> </keep-alive>
</transition> </transition>
</section> </section>

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

@ -17,6 +17,12 @@
<el-input v-model="form.integral" style="width: 370px;" <el-input v-model="form.integral" style="width: 370px;"
type="number" oninput="if(value>999999)value=999999"/> type="number" oninput="if(value>999999)value=999999"/>
</el-form-item> </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-form-item label="商户管理">
<el-radio v-model="form.adminid" :label="1">开启</el-radio> <el-radio v-model="form.adminid" :label="1">开启</el-radio>
<el-radio v-model="form.adminid" :label="0">关闭</el-radio> <el-radio v-model="form.adminid" :label="0">关闭</el-radio>
@ -31,6 +37,7 @@
<script> <script>
import { add, edit } from '@/api/bxg/yxUser' import { add, edit } from '@/api/bxg/yxUser'
import {initData} from "@/api/bxg/data";
export default { export default {
props: { props: {
isAdd: { isAdd: {
@ -40,6 +47,7 @@ export default {
}, },
data() { data() {
return { return {
levelList:[],
loading: false, dialog: false, loading: false, dialog: false,
form: { form: {
uid: '', uid: '',
@ -82,7 +90,20 @@ export default {
} }
} }
}, },
created() {
this.getLevelList()
},
methods: { 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() { cancel() {
this.resetForm() this.resetForm()
}, },

25
vue.config.js

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

Loading…
Cancel
Save