diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..dfdb86c --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +VITE_APP_API_URL = /api \ No newline at end of file diff --git a/src/axios/api.js b/src/axios/api.js index 591c3e9..0a5f1b8 100644 --- a/src/axios/api.js +++ b/src/axios/api.js @@ -3,7 +3,7 @@ import { showSuccessToast, showFailToast } from 'vant' import { useRouter } from 'vue-router' const router = useRouter() const instance = axios.create({ - baseURL: import.meta.env.VITE_API_URL, + baseURL: process.env.NODE_ENV === 'production' ? '/api' : '', timeout: 1000 * 30, headers: { 'Content-Type': 'application/json' }, }) diff --git a/src/views/login.vue b/src/views/login.vue index 3bfa441..d6d1a6d 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -10,7 +10,7 @@
{{ `/login ${tg_login}` }}
- + 跳转TG机器人 @@ -167,7 +167,7 @@ onMounted(() => { display: flex; align-items: center; justify-content: space-between; - width: 75vw; + width: 100% !important; .tg-btn-span { display: block; diff --git a/src/views/task/add.vue b/src/views/task/add.vue index c4f269c..790b032 100644 --- a/src/views/task/add.vue +++ b/src/views/task/add.vue @@ -115,7 +115,7 @@ const onConfirm = ({ selectedOptions }) => { form.cycle = template?.cycle + '天' form.price = template?.price let filter_groups = group_id.map(id => { - return group_info.find(item => item.id == id).tg_name + return group_info.find(item => item.id == id).tg_name + '@' + group_info.find(item => item.id == id).tg_url }) form.group = filter_groups.join(','); }; @@ -233,7 +233,7 @@ onBeforeMount(async () => { const handleConfrimPay = (val = '', type) => { console.log('handleConfrimPay', current_order) updatePayHash({ - order_id: current_order.id.toString(), + order_id: current_order.order_id.toString(), hash: val }).then(res => { router.push('/h5') diff --git a/src/views/task/index.vue b/src/views/task/index.vue index 2348d08..b692899 100644 --- a/src/views/task/index.vue +++ b/src/views/task/index.vue @@ -50,9 +50,9 @@ style="margin-left: 12px;" @click="addTask(item)">编辑 支付 - 执行 - 暂停 删除