Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into test
This commit is contained in:
commit
39ec8a57cb
|
|
@ -18,6 +18,9 @@
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="$refs.downloadQR.show()">
|
<el-button type="primary" icon="el-icon-plus" @click="$refs.downloadQR.show()">
|
||||||
下载会员充值二维码
|
下载会员充值二维码
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<div style="margin-top: 35px; font-size: 16px; color: #333;">
|
||||||
|
允许充值自定义金额:<el-switch v-model="shopInfo.isCustom" active-value="1" inactive-value="0" size="large" @change="customStatusChange"></el-switch>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-table :data="tableData.data" v-loading="tableData.loading">
|
<el-table :data="tableData.data" v-loading="tableData.loading">
|
||||||
|
|
@ -63,10 +66,11 @@ import handselTypes from './handselTypes'
|
||||||
import addActive from './components/addActive'
|
import addActive from './components/addActive'
|
||||||
import QR from './components/downloadQR.vue'
|
import QR from './components/downloadQR.vue'
|
||||||
import { findActivate, modityActivate } from '@/api/shop'
|
import { findActivate, modityActivate } from '@/api/shop'
|
||||||
|
import { tbShopInfo, tbShopInfoPut } from "@/api/user";
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
addActive,QR
|
addActive, QR
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -79,6 +83,9 @@ export default {
|
||||||
size: 10,
|
size: 10,
|
||||||
loading: false,
|
loading: false,
|
||||||
total: 0
|
total: 0
|
||||||
|
},
|
||||||
|
shopInfo: {
|
||||||
|
isCustom: '0',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -92,6 +99,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
this.getShopInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 切换状态
|
// 切换状态
|
||||||
|
|
@ -131,6 +139,28 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 请求店铺信息
|
||||||
|
async getShopInfo() {
|
||||||
|
try {
|
||||||
|
const res = await tbShopInfo(localStorage.getItem('shopId'))
|
||||||
|
this.shopInfo = res
|
||||||
|
|
||||||
|
if (this.shopInfo.isCustom == null) {
|
||||||
|
this.shopInfo.isCustom = '0'
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(this.shopInfo);
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
customStatusChange() {
|
||||||
|
this.updateShopInfo()
|
||||||
|
},
|
||||||
|
async updateShopInfo() {
|
||||||
|
await tbShopInfoPut(this.shopInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue