Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into test

This commit is contained in:
duan 2024-08-20 16:57:45 +08:00
commit 39ec8a57cb
1 changed files with 32 additions and 2 deletions

View File

@ -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,6 +139,28 @@ 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)
}
}
}