diff --git a/src/views/user_manage/active_list.vue b/src/views/user_manage/active_list.vue index 2df7e2f..2d0dc88 100644 --- a/src/views/user_manage/active_list.vue +++ b/src/views/user_manage/active_list.vue @@ -18,6 +18,9 @@ 下载会员充值二维码 +
+ 允许充值自定义金额: +
@@ -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) } } } - \ No newline at end of file +