提交 7b5b45ce authored 作者: 刘旭's avatar 刘旭

添加遗漏文件

上级 a02e5f63
import { request } from '../config'
export function getPayList() {
return request({
url: '/pay/list',
method: 'get'
})
}
export function updatePay(data: any) {
return request({
url: '/pay/display',
method: 'put',
data
})
}
<template>
<div class='app-container'>
<el-table v-loading="loading" :data="list" element-loading-text="正在查询中。。。" border fit highlight-current-row>
<el-table-column align="center" label="付款方式" prop="textValue" />
<el-table-column align="center" label="是否启用" prop="appDisplay">
<template #default="scope">
<el-switch v-model="scope.row.appDisplay" @change="handleChange($event, scope.row)" />
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup lang='ts'>
import { ref } from 'vue'
import { getPayList, updatePay } from '@/services/api/config/payment'
import { ElMessage } from 'element-plus';
const loading = ref(true)
const list = ref()
const handleChange = async (e: boolean, row: any) => {
const res: any = await updatePay({ id: row.id, appDisplay: e })
if (res.code === 200) {
init()
ElMessage.success('保存成功')
}
}
const init = async () => {
loading.value = true
const res: any = await getPayList()
if (res.code === 200) {
loading.value = false
list.value = res.data.records
}
}
init()
</script>
<style lang = "scss" scoped>
</style>
\ No newline at end of file
......@@ -41,13 +41,13 @@ export default ({ command, mode }) => {
// '/foo': '',
// 选项写法
"/admin": {
// target: "http://192.168.0.8:8089/",
target: "http://192.168.0.60:82/",
target: "http://192.168.0.8:8089/",
// target: "http://192.168.0.60:82/",
// rewrite: (path) => path.replace(/^\/api/, '') http://192.168.0.9:8089/
},
"/wx": {
target: "http://192.168.0.60:82/",
// target: "http://192.168.0.8:8089/",
// target: "http://192.168.0.60:82/",
target: "http://192.168.0.8:8089/",
// rewrite: (path) => path.replace(/^\/api/, '')
},
// 正则表达式写法
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论