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>
|
||||
<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 class="head-container">
|
||||
<el-table :data="tableData.data" v-loading="tableData.loading">
|
||||
|
|
@ -63,10 +66,11 @@ import handselTypes from './handselTypes'
|
|||
import addActive from './components/addActive'
|
||||
import QR from './components/downloadQR.vue'
|
||||
import { findActivate, modityActivate } from '@/api/shop'
|
||||
import { tbShopInfo, tbShopInfoPut } from "@/api/user";
|
||||
import dayjs from 'dayjs'
|
||||
export default {
|
||||
components: {
|
||||
addActive,QR
|
||||
addActive, QR
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -79,6 +83,9 @@ export default {
|
|||
size: 10,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
shopInfo: {
|
||||
isCustom: '0',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -92,6 +99,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.getTableData()
|
||||
this.getShopInfo()
|
||||
},
|
||||
methods: {
|
||||
// 切换状态
|
||||
|
|
@ -131,7 +139,29 @@ export default {
|
|||
} catch (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)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue