|
|
|
|
@ -5,27 +5,58 @@
|
|
|
|
|
<view class="header-title">胥口枢纽闸站状态</view>
|
|
|
|
|
<view class="header-info">
|
|
|
|
|
<view class="info-item">
|
|
|
|
|
<text class="info-label">今日太湖水位:</text>
|
|
|
|
|
<text class="info-value">{{ statistics.water_level.taihu }}m</text>
|
|
|
|
|
<text class="info-label">太湖</text>
|
|
|
|
|
<view class="info-value-group">
|
|
|
|
|
<text class="info-value"
|
|
|
|
|
>水位深度:{{
|
|
|
|
|
statistics.taihu_to_xujiang
|
|
|
|
|
? statistics.taihu_to_xujiang.water_level
|
|
|
|
|
: "-"
|
|
|
|
|
}}m</text
|
|
|
|
|
>
|
|
|
|
|
<text class="info-value"
|
|
|
|
|
>吃水深度:{{
|
|
|
|
|
statistics.taihu_to_xujiang
|
|
|
|
|
? statistics.taihu_to_xujiang.draft_depth
|
|
|
|
|
: "-"
|
|
|
|
|
}}m</text
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="info-item">
|
|
|
|
|
<text class="info-label">今日胥江水位:</text>
|
|
|
|
|
<text class="info-value">{{ statistics.water_level.xujiang }}m</text>
|
|
|
|
|
<text class="info-label">胥江</text>
|
|
|
|
|
<view class="info-value-group">
|
|
|
|
|
<text class="info-value"
|
|
|
|
|
>水位深度:{{
|
|
|
|
|
statistics.xujiang_to_taihu
|
|
|
|
|
? statistics.xujiang_to_taihu.water_level
|
|
|
|
|
: "-"
|
|
|
|
|
}}m</text
|
|
|
|
|
>
|
|
|
|
|
<text class="info-value"
|
|
|
|
|
>吃水深度:{{
|
|
|
|
|
statistics.xujiang_to_taihu
|
|
|
|
|
? statistics.xujiang_to_taihu.draft_depth
|
|
|
|
|
: "-"
|
|
|
|
|
}}m</text
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="batch-row-strict">
|
|
|
|
|
<block v-for="(item,index) in statistics.batches" :key="item.id">
|
|
|
|
|
<block v-for="(item, index) in statistics.batches || []" :key="item.id">
|
|
|
|
|
<block v-if="index < 2">
|
|
|
|
|
<view class="batch-col">
|
|
|
|
|
<view class="batch-tag-strict orange">
|
|
|
|
|
<text class="tag-orange">{{ item.direction==='in'?'去胥江':'去太湖' }}</text>{{ item.name }}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="index < 1" class="batch-divider-strict"></view>
|
|
|
|
|
<view class="batch-tag-strict orange">
|
|
|
|
|
<text class="tag-orange">{{
|
|
|
|
|
item.direction === "in" ? "去胥江" : "去太湖"
|
|
|
|
|
}}</text>
|
|
|
|
|
<view class="batch-num-strict">{{ item.name }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="index < 1" class="batch-divider-strict"></view>
|
|
|
|
|
</block>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -36,17 +67,29 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="process-flow">
|
|
|
|
|
<view class="process-step">
|
|
|
|
|
<image class="icon" src="/static/icon_step_index1.png" mode="aspectFit" />
|
|
|
|
|
<image
|
|
|
|
|
class="icon"
|
|
|
|
|
src="/static/icon_step_index1.png"
|
|
|
|
|
mode="aspectFit"
|
|
|
|
|
/>
|
|
|
|
|
<text class="process-label">先预约</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="arrow">></view>
|
|
|
|
|
<view class="process-step">
|
|
|
|
|
<image class="icon" src="/static/icon_step_index2.png" mode="aspectFit" />
|
|
|
|
|
<image
|
|
|
|
|
class="icon"
|
|
|
|
|
src="/static/icon_step_index2.png"
|
|
|
|
|
mode="aspectFit"
|
|
|
|
|
/>
|
|
|
|
|
<text class="process-label">再购票</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="arrow">></view>
|
|
|
|
|
<view class="process-step">
|
|
|
|
|
<image class="icon" src="/static/icon_step_index3.png" mode="aspectFit" />
|
|
|
|
|
<image
|
|
|
|
|
class="icon"
|
|
|
|
|
src="/static/icon_step_index3.png"
|
|
|
|
|
mode="aspectFit"
|
|
|
|
|
/>
|
|
|
|
|
<text class="process-label">排队过闸</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -55,7 +98,11 @@
|
|
|
|
|
<!-- 四个功能卡片 -->
|
|
|
|
|
<view class="card-grid">
|
|
|
|
|
<view class="func-card" @click="goReservation">
|
|
|
|
|
<image class="card-bg" src="/static/index_radius_green.png" mode="aspectFill" />
|
|
|
|
|
<image
|
|
|
|
|
class="card-bg"
|
|
|
|
|
src="/static/index_radius_green.png"
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
/>
|
|
|
|
|
<view class="func-card-content">
|
|
|
|
|
<text class="func-title">过闸预约</text>
|
|
|
|
|
<text class="func-num">{{ statistics.total_count }}</text>
|
|
|
|
|
@ -63,7 +110,11 @@
|
|
|
|
|
<view class="func-bg-icon clock"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="func-card" @click="goOrder">
|
|
|
|
|
<image class="card-bg" src="/static/index_radius_blue.png" mode="aspectFill" />
|
|
|
|
|
<image
|
|
|
|
|
class="card-bg"
|
|
|
|
|
src="/static/index_radius_blue.png"
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
/>
|
|
|
|
|
<view class="func-card-content">
|
|
|
|
|
<text class="func-title">在线付款</text>
|
|
|
|
|
<text class="func-num">{{ statistics.unpaid_count }}</text>
|
|
|
|
|
@ -71,7 +122,11 @@
|
|
|
|
|
<view class="func-bg-icon ticket"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="func-card" @click="goWaitPass">
|
|
|
|
|
<image class="card-bg" src="/static/index_radius_orange.png" mode="aspectFill" />
|
|
|
|
|
<image
|
|
|
|
|
class="card-bg"
|
|
|
|
|
src="/static/index_radius_orange.png"
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
/>
|
|
|
|
|
<view class="func-card-content">
|
|
|
|
|
<text class="func-title">排队过闸</text>
|
|
|
|
|
<text class="func-num">{{ statistics.paid_count }}</text>
|
|
|
|
|
@ -79,7 +134,11 @@
|
|
|
|
|
<view class="func-bg-icon ship"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="func-card" @click="goInvoiceManage">
|
|
|
|
|
<image class="card-bg" src="/static/index_radius_purple.png" mode="aspectFill" />
|
|
|
|
|
<image
|
|
|
|
|
class="card-bg"
|
|
|
|
|
src="/static/index_radius_purple.png"
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
/>
|
|
|
|
|
<view class="func-card-content">
|
|
|
|
|
<text class="func-title">我的开票</text>
|
|
|
|
|
<text class="func-num">{{ statistics.billed_count }}</text>
|
|
|
|
|
@ -103,7 +162,7 @@
|
|
|
|
|
<text class="info-text">北向南2025040102准备过闸</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 编辑信息弹窗 -->
|
|
|
|
|
<view v-if="showEditPopup" class="edit-popup-mask" @click="closeEditPopup">
|
|
|
|
|
<view class="edit-popup" @click.stop>
|
|
|
|
|
@ -114,7 +173,11 @@
|
|
|
|
|
<view class="edit-popup-content">
|
|
|
|
|
<view class="edit-field">
|
|
|
|
|
<text class="edit-label">姓名</text>
|
|
|
|
|
<input class="edit-input" v-model="editForm.name" placeholder="请输入姓名" />
|
|
|
|
|
<input
|
|
|
|
|
class="edit-input"
|
|
|
|
|
v-model="editForm.name"
|
|
|
|
|
placeholder="请输入姓名"
|
|
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="edit-field">
|
|
|
|
|
<text class="edit-label">交款人类型</text>
|
|
|
|
|
@ -164,190 +227,303 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { API } from '@/config/index.js'
|
|
|
|
|
import { API } from "@/config/index.js";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
batches: [
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
direction: "in",
|
|
|
|
|
name: "2025010101",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
direction: "out",
|
|
|
|
|
name: "2025010102",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
isWeixinBrowser: false,
|
|
|
|
|
userInfo: null,
|
|
|
|
|
showEditPopup: false,
|
|
|
|
|
editForm: {
|
|
|
|
|
name: '',
|
|
|
|
|
name: "",
|
|
|
|
|
payer_type: 1,
|
|
|
|
|
phone: '',
|
|
|
|
|
id_card: ''
|
|
|
|
|
phone: "",
|
|
|
|
|
id_card: "",
|
|
|
|
|
},
|
|
|
|
|
statistics: {
|
|
|
|
|
water_level: {
|
|
|
|
|
taihu: '-',
|
|
|
|
|
xujiang: '-'
|
|
|
|
|
},
|
|
|
|
|
taihu_to_xujiang: null, // 太湖→胥江 { water_level, draft_depth }
|
|
|
|
|
xujiang_to_taihu: null, // 胥江→太湖 { water_level, draft_depth }
|
|
|
|
|
total_count: 0,
|
|
|
|
|
unpaid_count: 0,
|
|
|
|
|
paid_count: 0,
|
|
|
|
|
billed_count: 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
billed_count: 0,
|
|
|
|
|
// 测试数据 - batches
|
|
|
|
|
batches: [
|
|
|
|
|
{
|
|
|
|
|
id: 1,
|
|
|
|
|
direction: "in",
|
|
|
|
|
name: "2025010101",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 2,
|
|
|
|
|
direction: "out",
|
|
|
|
|
name: "2025010102",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
this.isWeixinBrowser = /MicroMessenger/i.test(navigator.userAgent)
|
|
|
|
|
this.isWeixinBrowser = /MicroMessenger/i.test(navigator.userAgent);
|
|
|
|
|
// #endif
|
|
|
|
|
this.fetchUserInfo()
|
|
|
|
|
this.fetchStatistics()
|
|
|
|
|
// 检查 token,如果没有则等待登录完成
|
|
|
|
|
this.waitForTokenAndFetch();
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
// 页面显示时也检查一次,确保数据是最新的
|
|
|
|
|
const token = uni.getStorageSync("token");
|
|
|
|
|
if (token) {
|
|
|
|
|
this.fetchUserInfo();
|
|
|
|
|
this.fetchStatistics();
|
|
|
|
|
this.fetchWaterLevel();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onUnload() {
|
|
|
|
|
// 页面卸载时移除事件监听
|
|
|
|
|
uni.$off("loginSuccess", this.onLoginSuccess);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
// 等待 token 获取成功后调用接口
|
|
|
|
|
waitForTokenAndFetch() {
|
|
|
|
|
const token = uni.getStorageSync("token");
|
|
|
|
|
if (token) {
|
|
|
|
|
// 如果已有 token,直接调用接口
|
|
|
|
|
this.fetchUserInfo();
|
|
|
|
|
this.fetchStatistics();
|
|
|
|
|
this.fetchWaterLevel();
|
|
|
|
|
} else {
|
|
|
|
|
// 如果没有 token,监听登录成功事件
|
|
|
|
|
uni.$on("loginSuccess", this.onLoginSuccess);
|
|
|
|
|
// 同时设置一个超时检查,避免无限等待
|
|
|
|
|
let retryCount = 0;
|
|
|
|
|
const maxRetries = 20; // 最多重试20次,每次500ms,总共10秒
|
|
|
|
|
const checkToken = setInterval(() => {
|
|
|
|
|
retryCount++;
|
|
|
|
|
const currentToken = uni.getStorageSync("token");
|
|
|
|
|
if (currentToken) {
|
|
|
|
|
clearInterval(checkToken);
|
|
|
|
|
this.fetchUserInfo();
|
|
|
|
|
this.fetchStatistics();
|
|
|
|
|
this.fetchWaterLevel();
|
|
|
|
|
} else if (retryCount >= maxRetries) {
|
|
|
|
|
clearInterval(checkToken);
|
|
|
|
|
console.warn("等待 token 超时,可能登录失败");
|
|
|
|
|
}
|
|
|
|
|
}, 500);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 登录成功回调
|
|
|
|
|
onLoginSuccess() {
|
|
|
|
|
// 移除事件监听
|
|
|
|
|
uni.$off("loginSuccess", this.onLoginSuccess);
|
|
|
|
|
// 调用接口
|
|
|
|
|
this.fetchUserInfo();
|
|
|
|
|
this.fetchStatistics();
|
|
|
|
|
this.fetchWaterLevel();
|
|
|
|
|
},
|
|
|
|
|
async fetchWaterLevel() {
|
|
|
|
|
const token = uni.getStorageSync("token");
|
|
|
|
|
if (!token) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const res = await new Promise((resolve, reject) => {
|
|
|
|
|
uni.request({
|
|
|
|
|
url: `${API.GET_WATER_LEVEL}?token=${token}`,
|
|
|
|
|
method: "get",
|
|
|
|
|
success: resolve,
|
|
|
|
|
fail: reject,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
if (res.data && res.data.errcode === 0) {
|
|
|
|
|
const data = res.data.data;
|
|
|
|
|
// 将水位数据存储到 statistics 中
|
|
|
|
|
if (data) {
|
|
|
|
|
console.log("data", data);
|
|
|
|
|
this.statistics.taihu_to_xujiang = data.taihu_to_xujiang || null;
|
|
|
|
|
this.statistics.xujiang_to_taihu = data.xujiang_to_taihu || null;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.statistics);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async fetchStatistics() {
|
|
|
|
|
const token = uni.getStorageSync('token')
|
|
|
|
|
const token = uni.getStorageSync("token");
|
|
|
|
|
if (!token) {
|
|
|
|
|
return
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const res = await new Promise((resolve, reject) => {
|
|
|
|
|
uni.request({
|
|
|
|
|
url: `${API.STATISTICS}?token=${token}`,
|
|
|
|
|
method: 'get',
|
|
|
|
|
method: "get",
|
|
|
|
|
success: resolve,
|
|
|
|
|
fail: reject
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
fail: reject,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
if (res.data && res.data.errcode === 0) {
|
|
|
|
|
this.statistics = res.data.data
|
|
|
|
|
}
|
|
|
|
|
// 保留已有的水位数据,合并新的统计数据
|
|
|
|
|
const existingWaterData = {
|
|
|
|
|
taihu_to_xujiang: this.statistics.taihu_to_xujiang,
|
|
|
|
|
xujiang_to_taihu: this.statistics.xujiang_to_taihu,
|
|
|
|
|
};
|
|
|
|
|
this.statistics = {
|
|
|
|
|
...res.data.data,
|
|
|
|
|
...existingWaterData,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async fetchUserInfo() {
|
|
|
|
|
const token = uni.getStorageSync('token')
|
|
|
|
|
const token = uni.getStorageSync("token");
|
|
|
|
|
if (!token) {
|
|
|
|
|
this.userInfo = null
|
|
|
|
|
return
|
|
|
|
|
this.userInfo = null;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const res = await new Promise((resolve, reject) => {
|
|
|
|
|
uni.request({
|
|
|
|
|
url: `${API.GET_USER_INFO}?token=${token}`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
method: "POST",
|
|
|
|
|
success: resolve,
|
|
|
|
|
fail: reject
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
fail: reject,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
if (res.data) {
|
|
|
|
|
const data = res.data || {}
|
|
|
|
|
const payerType = Number(data.payer_type ?? data.payerType ?? 1)
|
|
|
|
|
this.userInfo = { ...data, payer_type: payerType }
|
|
|
|
|
const data = res.data || {};
|
|
|
|
|
const payerType = Number(data.payer_type ?? data.payerType ?? 1);
|
|
|
|
|
this.userInfo = { ...data, payer_type: payerType };
|
|
|
|
|
this.editForm = {
|
|
|
|
|
name: data.name || '',
|
|
|
|
|
name: data.name || "",
|
|
|
|
|
payer_type: payerType,
|
|
|
|
|
phone: data.phone || '',
|
|
|
|
|
id_card: data.id_card || ''
|
|
|
|
|
}
|
|
|
|
|
phone: data.phone || "",
|
|
|
|
|
id_card: data.id_card || "",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.userInfo = null
|
|
|
|
|
this.userInfo = null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
requireUserInfoComplete() {
|
|
|
|
|
const u = this.userInfo || {}
|
|
|
|
|
const ok = !!(u.name && (u.payer_type ?? u.payerType) && u.phone && u.id_card)
|
|
|
|
|
return ok
|
|
|
|
|
const u = this.userInfo || {};
|
|
|
|
|
const ok = !!(
|
|
|
|
|
u.name &&
|
|
|
|
|
(u.payer_type ?? u.payerType) &&
|
|
|
|
|
u.phone &&
|
|
|
|
|
u.id_card
|
|
|
|
|
);
|
|
|
|
|
return ok;
|
|
|
|
|
},
|
|
|
|
|
openEditPopup() {
|
|
|
|
|
this.showEditPopup = true
|
|
|
|
|
this.showEditPopup = true;
|
|
|
|
|
},
|
|
|
|
|
closeEditPopup() {
|
|
|
|
|
this.showEditPopup = false
|
|
|
|
|
this.showEditPopup = false;
|
|
|
|
|
},
|
|
|
|
|
validateForm() {
|
|
|
|
|
if (!this.editForm.name) {
|
|
|
|
|
uni.showToast({ title: '请输入姓名', icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
uni.showToast({ title: "请输入姓名", icon: "none" });
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (![1, 2].includes(Number(this.editForm.payer_type))) {
|
|
|
|
|
uni.showToast({ title: '请选择交款人类型', icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
uni.showToast({ title: "请选择交款人类型", icon: "none" });
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
const phoneReg = /^1\d{10}$/
|
|
|
|
|
const phoneReg = /^1\d{10}$/;
|
|
|
|
|
if (!phoneReg.test(this.editForm.phone)) {
|
|
|
|
|
uni.showToast({ title: '请输入正确的手机号', icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
uni.showToast({ title: "请输入正确的手机号", icon: "none" });
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
const idReg = /^(?:\d{15}|\d{17}[\dXx])$/
|
|
|
|
|
const idReg = /^(?:\d{15}|\d{17}[\dXx])$/;
|
|
|
|
|
if (!idReg.test(this.editForm.id_card)) {
|
|
|
|
|
uni.showToast({ title: '请输入正确的证件号', icon: 'none' })
|
|
|
|
|
return false
|
|
|
|
|
uni.showToast({ title: "请输入正确的证件号", icon: "none" });
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
return true;
|
|
|
|
|
},
|
|
|
|
|
async submitUserInfo() {
|
|
|
|
|
if (!this.validateForm()) return
|
|
|
|
|
const token = uni.getStorageSync('token')
|
|
|
|
|
if (!this.validateForm()) return;
|
|
|
|
|
const token = uni.getStorageSync("token");
|
|
|
|
|
if (!token) {
|
|
|
|
|
uni.showToast({ title: '请先登录', icon: 'none' })
|
|
|
|
|
return
|
|
|
|
|
uni.showToast({ title: "请先登录", icon: "none" });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
uni.showLoading({ title: '提交中...' })
|
|
|
|
|
uni.showLoading({ title: "提交中..." });
|
|
|
|
|
const res = await new Promise((resolve, reject) => {
|
|
|
|
|
uni.request({
|
|
|
|
|
url: `${API.UPDATE_USER_INFO}?token=${token}`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
method: "POST",
|
|
|
|
|
data: {
|
|
|
|
|
name: this.editForm.name,
|
|
|
|
|
payer_type: Number(this.editForm.payer_type),
|
|
|
|
|
phone: this.editForm.phone,
|
|
|
|
|
id_card: this.editForm.id_card
|
|
|
|
|
id_card: this.editForm.id_card,
|
|
|
|
|
},
|
|
|
|
|
success: resolve,
|
|
|
|
|
fail: reject
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
fail: reject,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
if (res.data && res.data.errcode === 0) {
|
|
|
|
|
uni.showToast({ title: '更新成功', icon: 'success' })
|
|
|
|
|
this.closeEditPopup()
|
|
|
|
|
await this.fetchUserInfo()
|
|
|
|
|
uni.showToast({ title: "更新成功", icon: "success" });
|
|
|
|
|
this.closeEditPopup();
|
|
|
|
|
await this.fetchUserInfo();
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({ title: (res.data && res.data.errmsg) || '更新失败', icon: 'none' })
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: (res.data && res.data.errmsg) || "更新失败",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
uni.showToast({ title: '更新失败', icon: 'none' })
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
uni.showToast({ title: "更新失败", icon: "none" });
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
goReservation() {
|
|
|
|
|
const afterCheck = () => {
|
|
|
|
|
if (this.requireUserInfoComplete()) {
|
|
|
|
|
uni.navigateTo({ url: '/pages/reservation/index' });
|
|
|
|
|
uni.navigateTo({ url: "/pages/reservation/index" });
|
|
|
|
|
} else {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '为了后续流程的使用,请先完善个人信息',
|
|
|
|
|
confirmText: '去完善',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
title: "提示",
|
|
|
|
|
content: "为了后续流程的使用,请先完善个人信息",
|
|
|
|
|
confirmText: "去完善",
|
|
|
|
|
cancelText: "取消",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
this.openEditPopup()
|
|
|
|
|
this.openEditPopup();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
if (!this.userInfo) {
|
|
|
|
|
this.fetchUserInfo().then(afterCheck).catch(afterCheck)
|
|
|
|
|
this.fetchUserInfo().then(afterCheck).catch(afterCheck);
|
|
|
|
|
} else {
|
|
|
|
|
afterCheck()
|
|
|
|
|
afterCheck();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
goWaitPass() {
|
|
|
|
|
uni.navigateTo({ url: '/pages/order/pay_order_list?status=paid' });
|
|
|
|
|
uni.navigateTo({ url: "/pages/order/pay_order_list?status=paid" });
|
|
|
|
|
},
|
|
|
|
|
goOrder() {
|
|
|
|
|
uni.navigateTo({ url: '/pages/order/pay_order_list?status=unpaid' });
|
|
|
|
|
uni.navigateTo({ url: "/pages/order/pay_order_list?status=unpaid" });
|
|
|
|
|
},
|
|
|
|
|
goInvoiceManage() {
|
|
|
|
|
uni.navigateTo({ url: '/pages/index/invoice_manage' });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
uni.navigateTo({ url: "/pages/index/invoice_manage" });
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
@ -387,7 +563,7 @@ export default {
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
width: fit-content;
|
|
|
|
|
margin: 5vh auto 0 auto; /* 水平居中 */
|
|
|
|
|
margin: 2vh auto 0 auto; /* 水平居中 */
|
|
|
|
|
gap: 154rpx; /* 控制每组间距 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -399,25 +575,36 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info-label {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
opacity: 0.95;
|
|
|
|
|
color: #e6eaff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info-value {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
display: block;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-family: sans-serif;
|
|
|
|
|
}
|
|
|
|
|
.info-value-group {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
gap: 4rpx;
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
}
|
|
|
|
|
.info-value-group .info-value {
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.batch-row-strict {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
margin: 4vh 48rpx 0 48rpx;
|
|
|
|
|
margin: 2vh 48rpx 0 48rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -439,7 +626,8 @@ export default {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
margin-bottom: 8rpx;
|
|
|
|
|
font-family: 'PangMenZhengDao', 'SourceHanSansCN', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
|
|
|
font-family: "PangMenZhengDao", "SourceHanSansCN", "PingFang SC",
|
|
|
|
|
"Microsoft YaHei", sans-serif;
|
|
|
|
|
letter-spacing: 3rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -448,21 +636,21 @@ export default {
|
|
|
|
|
padding: 4rpx 12rpx;
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
background: #2b70ee;
|
|
|
|
|
display: flex;
|
|
|
|
|
/* display: flex; */
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tag-orange {
|
|
|
|
|
color: #FF9F43;
|
|
|
|
|
color: #ff9f43;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tag-green {
|
|
|
|
|
color: #28C76F;
|
|
|
|
|
color: #28c76f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tag-blue {
|
|
|
|
|
color: #4FC3FF;
|
|
|
|
|
color: #4fc3ff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.process-card {
|
|
|
|
|
@ -470,7 +658,7 @@ export default {
|
|
|
|
|
border-radius: 22rpx;
|
|
|
|
|
margin: 24rpx;
|
|
|
|
|
padding: 32rpx;
|
|
|
|
|
box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.08);
|
|
|
|
|
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
|
|
|
|
|
position: relative;
|
|
|
|
|
margin-top: -140rpx;
|
|
|
|
|
height: 138px;
|
|
|
|
|
@ -488,7 +676,7 @@ export default {
|
|
|
|
|
border-radius: 0 0 20rpx 20rpx;
|
|
|
|
|
padding: 12rpx 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
box-shadow: 0 4rpx 16rpx rgba(59,124,255,0.12);
|
|
|
|
|
box-shadow: 0 4rpx 16rpx rgba(59, 124, 255, 0.12);
|
|
|
|
|
z-index: 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -526,7 +714,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.arrow {
|
|
|
|
|
color: #B0B8C6;
|
|
|
|
|
color: #b0b8c6;
|
|
|
|
|
font-size: 40rpx;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
margin: 0 12rpx;
|
|
|
|
|
@ -545,7 +733,7 @@ export default {
|
|
|
|
|
border-radius: 32rpx;
|
|
|
|
|
height: 200rpx;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.08);
|
|
|
|
|
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
@ -582,7 +770,8 @@ export default {
|
|
|
|
|
font-size: 58rpx;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-family: 'PangMenZhengDao', 'SourceHanSansCN', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
|
|
|
font-family: "PangMenZhengDao", "SourceHanSansCN", "PingFang SC",
|
|
|
|
|
"Microsoft YaHei", sans-serif;
|
|
|
|
|
letter-spacing: 5rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -734,7 +923,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.notice {
|
|
|
|
|
background: linear-gradient(90deg, #2b70ee 0%, #4FC3FF 100%);
|
|
|
|
|
background: linear-gradient(90deg, #2b70ee 0%, #4fc3ff 100%);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|