This commit is contained in:
yyx 2025-07-10 14:40:22 +08:00
parent 6f341d1917
commit a33112e76e
5 changed files with 8 additions and 7 deletions

1
.env.production Normal file
View File

@ -0,0 +1 @@
VITE_APP_API_URL = /api

View File

@ -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' },
})

View File

@ -10,7 +10,7 @@
<div class="tg-btn-span"> {{ `/login ${tg_login}` }}</div>
<van-icon name="notes-o" />
</div>
<van-button round block type="primary" @click="goPage" style="margin-top: 12px;">
<van-button round block type="primary" @click="goPage" style="margin-top: 12px;width: 100%;">
跳转TG机器人
</van-button>
</div>
@ -167,7 +167,7 @@ onMounted(() => {
display: flex;
align-items: center;
justify-content: space-between;
width: 75vw;
width: 100% !important;
.tg-btn-span {
display: block;

View File

@ -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')

View File

@ -50,9 +50,9 @@
style="margin-left: 12px;" @click="addTask(item)">编辑</van-button>
<van-button type="primary" size="small" style="margin-left: 12px;"
v-if="item.order_status == 0 || item.order_status == 8" @click="payTask(item)">支付</van-button>
<van-button type="primary" size="small" style="margin-left: 12px;" v-if="item.status == 2"
<van-button type="primary" size="small" style="margin-left: 12px;" v-if="item.status == 5"
@click="handleTask(item.id, '2')">执行</van-button>
<van-button type="primary" size="small" style="margin-left: 12px;"
<van-button type="primary" size="small" v-if="item.status == 2" style="margin-left: 12px;"
@click="handleTask(item.id, '5')">暂停</van-button>
<van-button type="danger" size="small" style="margin-left: 12px;"
v-if="item.status == 6 || item.status == 0" @click="deleteTask(item.id)">删除</van-button>