diff --git a/.gitignore b/.gitignore index 08b2553..a3df5aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -node_modules +/node_modules +/dist +package-lock.json +/unpackage \ No newline at end of file diff --git a/App.vue b/App.vue index 9baab65..4f33a6a 100644 --- a/App.vue +++ b/App.vue @@ -8,19 +8,19 @@ export default { onLaunch: function() { console.log('App Launch') - + }, onShow: async function() { - console.log('App Show') - await this.autoLogin() + // if (this.getUserInfoData()) { + // } else { + // console.log('App Show') + await this.autoLogin() + // } }, onHide: function() { console.log('App Hide') }, - - - methods: { async autoLogin() { try { @@ -31,6 +31,14 @@ // 登录失败的处理可以在 wxLogin 中统一处理 // 这里可以添加特殊的错误处理逻辑 } + }, + async getUserInfoData() { + try { + await getUserInfo() + } catch (error) { + console.error('获取用户信息失败:', error) + // 获取用户信息失败的处理逻辑 + } } } } diff --git a/config/http.js b/config/http.js index 1b70aaa..4a4e618 100644 --- a/config/http.js +++ b/config/http.js @@ -19,7 +19,7 @@ const request = (option) => { method: option.method, data: option.data, header: { - "Content-Type": "application/x-www-form-urlencoded", + "Content-Type": "application/json", ...option.headers, 'appid': appid, 'Authorization': "Bearer " + uni.getStorageSync('token'), diff --git a/config/url.js b/config/url.js index 3875e5b..e186903 100644 --- a/config/url.js +++ b/config/url.js @@ -1,5 +1,5 @@ export const URL = "https://my.gxfs123.com/api" //正式服务器 // export const URL = "https://fansdev.gxfs123.com/api" //测试服务器 -// export const URL = "http://192.168.10.76:8080" //本地调试 +// export const URL = "http://192.168.5.13:8080" //本地调试 export const appid = "wx2165f0be356ae7a9" //小程序appid \ No newline at end of file diff --git a/config/user.js b/config/user.js index bc241c7..4cc8a34 100644 --- a/config/user.js +++ b/config/user.js @@ -20,7 +20,6 @@ export const getMyIndexInfo = (data) => { // 添加押金提现API export const withdrawDeposit = (orderNo) => { - console.log('调用提现API,订单号:', orderNo) return request({ url: `/app/withdraw/add/${orderNo}`, method: 'get', @@ -131,6 +130,7 @@ export const confirmPaymentAndRent = (orderId) => { //投诉反馈 export const addUserFeedback = (data) => { + console.log(data); return request({ url: '/app/feedback/add', method: 'post', diff --git a/pages.json b/pages.json index eda2660..1a23f98 100644 --- a/pages.json +++ b/pages.json @@ -39,9 +39,9 @@ } }, { - "path": "pages/order/details", + "path": "pages/expressReturn/addExpressReturn", "style": { - "navigationBarTitleText": "订单详情", + "navigationBarTitleText": "快递归还", "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black" } @@ -96,6 +96,21 @@ "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black" } + }, + { + "path": "pages/expressReturn/index", + "style": { + "navigationBarTitleText": "快递归还列表", + "navigationStyle": "default" + } + }, + { + "path": "pages/expressReturn/detail", + "style": { + "navigationBarTitleText": "归还详情", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } } ], "globalStyle": { diff --git a/pages/device/detail.vue b/pages/device/detail.vue index 62a9861..41cedbb 100644 --- a/pages/device/detail.vue +++ b/pages/device/detail.vue @@ -125,7 +125,7 @@ + 无法免押点这里 --> @@ -195,7 +195,7 @@ const showPhoneAuthPopup = ref(false) // 生命周期 onLoad 钩子 - onLoad((options) => { + onLoad(async(options) => { if (options.deviceNo != uni.getStorageSync('deviceId') || !uni.getStorageSync('deviceId')) { deviceId.value = options.deviceNo uni.setStorageSync('deviceId', options.deviceNo) @@ -203,16 +203,17 @@ deviceId.value = uni.getStorageSync('deviceId') // uni.removeStorageSync('deviceId') } - checkOrderStatus() + await checkOrderStatus() + await fetchDeviceInfo() }) onMounted(async () => { await checkUserPhone() }) - onShow(async () => { - await fetchDeviceInfo() - }) + // onShow(async () => { + // await fetchDeviceInfo() + // }) const checkUserPhone = async () => { try { diff --git a/pages/expressReturn/addExpressReturn.vue b/pages/expressReturn/addExpressReturn.vue new file mode 100644 index 0000000..95c4e91 --- /dev/null +++ b/pages/expressReturn/addExpressReturn.vue @@ -0,0 +1,267 @@ + + + + + \ No newline at end of file diff --git a/pages/expressReturn/detail.vue b/pages/expressReturn/detail.vue new file mode 100644 index 0000000..0c03db8 --- /dev/null +++ b/pages/expressReturn/detail.vue @@ -0,0 +1,366 @@ + + + + + \ No newline at end of file diff --git a/pages/expressReturn/index.vue b/pages/expressReturn/index.vue new file mode 100644 index 0000000..9d6b3ba --- /dev/null +++ b/pages/expressReturn/index.vue @@ -0,0 +1,289 @@ + + + + + \ No newline at end of file diff --git a/pages/feedback/index.vue b/pages/feedback/index.vue index ef5e3a5..d8d5477 100644 --- a/pages/feedback/index.vue +++ b/pages/feedback/index.vue @@ -1,333 +1,314 @@