Explorar o código

修复部分bug

Huanyi hai 2 semanas
pai
achega
1d52d53e97
Modificáronse 38 ficheiros con 139 adicións e 86 borrados
  1. 7 6
      pages/index/index.vue
  2. 4 3
      pages/login/index.vue
  3. 1 0
      pages/mine/agreement/index.vue
  4. 4 3
      pages/mine/complaint/index.vue
  5. 11 8
      pages/mine/index.vue
  6. 1 0
      pages/mine/privacy/index.vue
  7. 3 3
      pages/mine/settings/index.vue
  8. 4 3
      pages/order/add-model/index.vue
  9. 17 5
      pages/order/detail/index.vue
  10. 3 1
      pages/order/index.vue
  11. 23 19
      pages/order/list/index.vue
  12. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  13. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/index.js.map
  14. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/agreement/index.js.map
  15. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/complaint/index.js.map
  16. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/index.js.map
  17. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/privacy/index.js.map
  18. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/settings/index.js.map
  19. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/add-model/index.js.map
  20. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/detail/index.js.map
  21. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/index.js.map
  22. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/list/index.js.map
  23. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/utils/request.js.map
  24. 1 1
      unpackage/dist/dev/mp-weixin/common/vendor.js
  25. 1 0
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  26. 4 3
      unpackage/dist/dev/mp-weixin/pages/login/index.js
  27. 1 0
      unpackage/dist/dev/mp-weixin/pages/mine/agreement/index.js
  28. 4 3
      unpackage/dist/dev/mp-weixin/pages/mine/complaint/index.js
  29. 6 3
      unpackage/dist/dev/mp-weixin/pages/mine/index.js
  30. 1 0
      unpackage/dist/dev/mp-weixin/pages/mine/privacy/index.js
  31. 3 3
      unpackage/dist/dev/mp-weixin/pages/mine/settings/index.js
  32. 4 3
      unpackage/dist/dev/mp-weixin/pages/order/add-model/index.js
  33. 18 6
      unpackage/dist/dev/mp-weixin/pages/order/detail/index.js
  34. 3 0
      unpackage/dist/dev/mp-weixin/pages/order/index.js
  35. 7 5
      unpackage/dist/dev/mp-weixin/pages/order/list/index.js
  36. 0 0
      unpackage/dist/dev/mp-weixin/pages/order/list/index.wxml
  37. 4 4
      unpackage/dist/dev/mp-weixin/utils/request.js
  38. 4 4
      utils/request.js

+ 7 - 6
pages/index/index.vue

@@ -112,12 +112,12 @@ import { getPhone } from '@/api/system/phone.js';
 
 export default {
 	components: { ErpTabBar, ErpNavBar },
-		data() {
-			return {
-				assets,
-				statusBarHeight: 0,
-				currentBanner: 0,
-				expertPhone: '13888888888',
+	data() {
+		return {
+			assets,
+			statusBarHeight: 0,
+			currentBanner: 0,
+			expertPhone: '13888888888',
 			banners: [
 				{
 					url: '/static/index/banner1.jpg',
@@ -152,6 +152,7 @@ export default {
 				}
 			} catch (e) {
 				console.error('加载联系电话失败', e);
+				uni.showToast({ title: e || '加载联系电话失败', icon: 'none' });
 			}
 		},
 		handleBannerChange(e) { this.currentBanner = e.detail.current; },

+ 4 - 3
pages/login/index.vue

@@ -188,7 +188,7 @@ export default {
 			} catch (error) {
 				uni.hideLoading();
 				console.error('登录错误:', error);
-				uni.showToast({ title: '登录失败,请重试', icon: 'none' });
+				uni.showToast({ title: error || '登录失败', icon: 'none' });
 			}
 		},
 		async onChooseAvatar(e) {
@@ -205,7 +205,7 @@ export default {
 			} catch (err) {
 				uni.hideLoading();
 				console.error('[微信信息] 头像上传失败:', err);
-				uni.showToast({ title: '头像上传失败', icon: 'none' });
+				uni.showToast({ title: err || '头像上传失败', icon: 'none' });
 			}
 		},
 		onNicknameBlur(e) {
@@ -254,7 +254,7 @@ export default {
 			} catch (error) {
 				uni.hideLoading();
 				console.error('注册错误:', error);
-				uni.showToast({ title: '注册失败,请重试', icon: 'none' });
+				uni.showToast({ title: error || '注册失败', icon: 'none' });
 			}
 		},
 		showProtocol(type) {
@@ -273,6 +273,7 @@ export default {
 			this.protocols.privacy = { title: privacyRes.data.title, content: privacyRes.data.content };
 		} catch (e) {
 			console.error('[协议] 加载失败', e);
+			uni.showToast({ title: e || '加载协议失败', icon: 'none' });
 		}
 	}
 }

+ 1 - 0
pages/mine/agreement/index.vue

@@ -35,6 +35,7 @@ export default {
 			this.agreementNodes = res.data.content;
 		} catch (e) {
 			console.error('[用户协议] 加载失败', e);
+			uni.showToast({ title: e || '加载用户协议失败', icon: 'none' });
 		}
 	},
 	methods: {

+ 4 - 3
pages/mine/complaint/index.vue

@@ -74,7 +74,7 @@ export default {
 	},
 	computed: {
 		isFormValid() {
-			return !this.uploading && this.formData.type && this.formData.content && this.formData.content.trim().length >= 5;
+			return !this.uploading && this.formData.type && this.formData.content && this.formData.content.trim().length >= 1;
 		}
 	},
 	onLoad() {
@@ -89,6 +89,7 @@ export default {
 					if (this.types.length) this.formData.type = this.types[0].value;
 				}
 			} catch (e) {
+				uni.showToast({ title: e || '加载反馈类型失败', icon: 'none' });
 				this.types = [
 					{ label: '系统投诉', value: 'complaint' },
 					{ label: '改进建议', value: 'suggestion' },
@@ -119,7 +120,7 @@ export default {
 							} catch (err) {
 								this.formData.images.splice(placeholderIndex, 1);
 								this.imageOssMap.splice(placeholderIndex, 1);
-								uni.showToast({ title: '图片上传失败', icon: 'none' });
+								uni.showToast({ title: err || '图片上传失败', icon: 'none' });
 							}
 						}
 					} finally {
@@ -153,7 +154,7 @@ export default {
 				setTimeout(() => { uni.navigateBack(); }, 1500);
 			} catch (e) {
 				uni.hideLoading();
-				uni.showToast({ title: e.message || '提交失败', icon: 'none' });
+				uni.showToast({ title: e || '提交失败', icon: 'none' });
 			}
 		}
 	}

+ 11 - 8
pages/mine/index.vue

@@ -53,8 +53,8 @@
 						</view>
 					</view>
 					<view class="stat-grid">
-					<view class="stat-item" v-for="(item, index) in orderStates" :key="index"
-						@click="goToOrderList(item.tabIndex)">
+						<view class="stat-item" v-for="(item, index) in orderStates" :key="index"
+							@click="goToOrderList(item.tabIndex)">
 							<image class="stat-icon" :src="item.icon" mode="aspectFit"></image>
 							<text class="stat-label">{{ item.label }}</text>
 						</view>
@@ -96,12 +96,12 @@ import { getPhone } from '@/api/system/phone.js';
 
 export default {
 	components: { ErpTabBar, ErpNavBar },
-		data() {
-			return {
-				assets,
-				isLogin: false,
-				customerInfo: null,
-				servicePhone: '13888888888',
+	data() {
+		return {
+			assets,
+			isLogin: false,
+			customerInfo: null,
+			servicePhone: '13888888888',
 			orderStates: [
 				{ label: '待审核', tabIndex: 2, icon: assets.minePendingReview },
 				{ label: '待签批', tabIndex: 4, icon: assets.minePendingSign },
@@ -132,6 +132,7 @@ export default {
 				}
 			} catch (e) {
 				console.error('加载客服电话失败', e);
+				uni.showToast({ title: e || '加载客服电话失败', icon: 'none' });
 			}
 		},
 		async loadCustomerInfo() {
@@ -140,6 +141,7 @@ export default {
 				this.customerInfo = res.data;
 			} catch (e) {
 				console.error('[mine] 加载客户信息失败', e);
+				uni.showToast({ title: e || '加载客户信息失败', icon: 'none' });
 			}
 		},
 		goToLogin() {
@@ -173,6 +175,7 @@ export default {
 							await logout();
 						} catch (e) {
 							console.error('[mine] 退出登录接口失败', e);
+							uni.showToast({ title: e || '退出失败', icon: 'none' });
 						}
 						uni.removeStorageSync('token');
 						uni.removeStorageSync('isLogin');

+ 1 - 0
pages/mine/privacy/index.vue

@@ -35,6 +35,7 @@ export default {
 			this.privacyNodes = res.data.content;
 		} catch (e) {
 			console.error('[隐私政策] 加载失败', e);
+			uni.showToast({ title: e || '加载隐私政策失败', icon: 'none' });
 		}
 	},
 	methods: {

+ 3 - 3
pages/mine/settings/index.vue

@@ -90,7 +90,7 @@ export default {
 				this.pendingAvatarOssId = null;
 			} catch (e) {
 				uni.hideLoading();
-				uni.showToast({ title: '加载失败', icon: 'none' });
+				uni.showToast({ title: e || '加载失败', icon: 'none' });
 			}
 		},
 		doChooseImage() {
@@ -107,7 +107,7 @@ export default {
 						this.pendingAvatarOssId = uploadRes.ossId;
 						uni.showToast({ title: '头像上传成功', icon: 'success' });
 					} catch (e) {
-						uni.showToast({ title: '头像上传失败', icon: 'none' });
+						uni.showToast({ title: e || '头像上传失败', icon: 'none' });
 						this.myInfo.avatarUrl = '';
 					} finally {
 						this.uploading = false;
@@ -150,7 +150,7 @@ export default {
 						setTimeout(() => { uni.navigateBack(); }, 1200);
 					} catch (e) {
 						uni.hideLoading();
-						uni.showToast({ title: e.message || '保存失败', icon: 'none' });
+						uni.showToast({ title: e || '保存失败', icon: 'none' });
 					}
 				}
 			});

+ 4 - 3
pages/order/add-model/index.vue

@@ -249,7 +249,7 @@ export default {
 				}
 				this.typeHasMore = this.typeList.length < total;
 			} catch (e) {
-				uni.showToast({ title: '加载型号失败', icon: 'none' });
+				uni.showToast({ title: e || '加载型号失败', icon: 'none' });
 			} finally {
 				this.typeLoading = false;
 			}
@@ -271,7 +271,7 @@ export default {
 				}
 				this.packageHasMore = this.packageList.length < total;
 			} catch (e) {
-				uni.showToast({ title: '加载包装方式失败', icon: 'none' });
+				uni.showToast({ title: e || '加载包装方式失败', icon: 'none' });
 			} finally {
 				this.packageLoading = false;
 			}
@@ -294,7 +294,7 @@ export default {
 				}
 				this.surfaceHasMore = this.surfaceList.length < total;
 			} catch (e) {
-				uni.showToast({ title: '加载表面处理失败', icon: 'none' });
+				uni.showToast({ title: e || '加载表面处理失败', icon: 'none' });
 			} finally {
 				this.surfaceLoading = false;
 			}
@@ -414,6 +414,7 @@ export default {
 				}, 1000);
 			} catch (e) {
 				uni.hideLoading();
+				uni.showToast({ title: e || '添加失败', icon: 'none' });
 			}
 		}
 	}

+ 17 - 5
pages/order/detail/index.vue

@@ -47,7 +47,7 @@
 				<view class="data-group-card shadow-less">
 					<view class="card-head">订单详情</view>
 					<view class="data-item"><text class="l">订单单号</text><text class="v selectable">{{ order.orderNo
-					}}</text></view>
+							}}</text></view>
 					<!-- ERP单号 -->
 					<view class="data-item" v-if="order.erpDocCode">
 						<text class="l">ERP 单号</text>
@@ -79,6 +79,7 @@
 <script>
 import ErpNavBar from '@/components/erp-nav-bar.vue';
 import { getOrderDetail } from '@/api/erp/order.js';
+import { getPhone } from '@/api/system/phone.js';
 export default {
 	components: { ErpNavBar },
 	data() {
@@ -87,6 +88,7 @@ export default {
 			headerHeight: 120, // px
 			rowId: '',
 			loading: false,
+			salesPhone: '',
 			order: {
 				orderNo: '-',
 				status: 1,
@@ -121,6 +123,7 @@ export default {
 		if (options.rowId) {
 			this.rowId = options.rowId;
 			this.loadOrderDetail();
+			this.loadPhone();
 		}
 	},
 	methods: {
@@ -136,7 +139,7 @@ export default {
 				}
 
 				// 状态展示映射(与 ErpOrderStatus 枚举对齐)
-			const statusMap = {
+				const statusMap = {
 					'-1': { name: '已撤销', type: 'cancelled' },
 					0: { name: '待审核', type: 'pending' },
 					1: { name: '已驳回', type: 'expired' },
@@ -168,7 +171,7 @@ export default {
 				};
 			} catch (e) {
 				console.error('加载订单详情失败', e);
-				uni.showToast({ title: '加载失败', icon: 'none' });
+				uni.showToast({ title: e || '加载失败', icon: 'none' });
 			} finally {
 				this.loading = false;
 			}
@@ -189,8 +192,17 @@ export default {
 				}
 			});
 		},
-		callSales() { uni.makePhoneCall({ phoneNumber: '13888888888' }); },
-		goHome() { uni.reLaunch({ url: '/pages/order/index' }); }
+		callSales() { uni.makePhoneCall({ phoneNumber: this.salesPhone }); },
+		goHome() { uni.reLaunch({ url: '/pages/order/index' }); },
+		async loadPhone() {
+			try {
+				const res = await getPhone();
+				this.salesPhone = res.data.salesPhone || '13888888888';
+			} catch (e) {
+				console.error('加载联系电话失败', e);
+				uni.showToast({ title: e || '加载联系电话失败', icon: 'none' });
+			}
+		}
 	}
 }
 </script>

+ 3 - 1
pages/order/index.vue

@@ -154,6 +154,7 @@ export default {
 				this.selectedModels = res.data || [];
 			} catch (e) {
 				console.error('加载型号列表失败', e);
+				uni.showToast({ title: e || '加载型号列表失败', icon: 'none' });
 			} finally {
 				this.isLoading = false;
 			}
@@ -172,6 +173,7 @@ export default {
 				// 登录成功后加载列表
 				this.loadOrderItems();
 			} catch (e) {
+				uni.showToast({ title: e || '登录状态校验失败', icon: 'none' });
 				uni.removeStorageSync('token');
 				uni.removeStorageSync('isLogin');
 				this.isLoggedIn = false;
@@ -222,7 +224,7 @@ export default {
 				}, 1500);
 			} catch (e) {
 				uni.hideLoading();
-				// request.js 会统一处理并提示异常信息
+				uni.showToast({ title: e || '下单失败', icon: 'none' });
 			}
 		}
 	}

+ 23 - 19
pages/order/list/index.vue

@@ -46,14 +46,15 @@
 							<text class="summary-unit">支</text>
 						</view>
 					</view>
-			<view class="card-foot">
-				<text class="time">{{ item.time }}</text>
-				<view class="btns">
-					<view class="btn-audit" v-if="item.status > 0" @click.stop="showAuditHistory(item)">审核记录</view>
-					<view class="btn-cancel" v-if="item.status === 0" @click.stop="onCancel(item)">撤销</view>
-					<view class="btn-view primary" @click.stop="goDetail(item)">订单详情</view>
-				</view>
-			</view>
+					<view class="card-foot">
+						<text class="time">{{ item.time }}</text>
+						<view class="btns">
+							<view class="btn-audit" v-if="item.status > 0" @click.stop="showAuditHistory(item)">审核记录
+							</view>
+							<view class="btn-cancel" v-if="item.status === 0" @click.stop="onCancel(item)">撤销</view>
+							<view class="btn-view primary" @click.stop="goDetail(item)">订单详情</view>
+						</view>
+					</view>
 				</view>
 
 				<!-- 加载提示区 -->
@@ -93,7 +94,8 @@
 						<view class="audit-dot" :class="item.auditResult === 1 ? 'pass' : 'reject'"></view>
 						<view class="audit-content">
 							<view class="audit-row">
-								<text class="audit-result" :class="item.auditResult === 1 ? 'pass' : 'reject'">{{ item.auditResult === 1 ? '通过' : '驳回' }}</text>
+								<text class="audit-result" :class="item.auditResult === 1 ? 'pass' : 'reject'">{{
+									item.auditResult === 1 ? '通过' : '驳回' }}</text>
 								<text class="audit-auditor">{{ item.auditorName || '未知' }}</text>
 							</view>
 							<text class="audit-reason" v-if="item.rejectReason">驳回理由:{{ item.rejectReason }}</text>
@@ -165,17 +167,17 @@ export default {
 				}
 				const res = await listOrder(params);
 				const rows = res.rows || [];
-				
+
 				const formattedRows = rows.map(item => {
 					// 状态展示映射(与 ErpOrderStatus 枚举对齐)
-				const statusMap = {
-					'-1': { name: '已撤销', type: 'cancelled' },
-					0: { name: '待审核', type: 'pending' },
-					1: { name: '已驳回', type: 'expired' },
-					2: { name: '待签批', type: 'process' },
-					3: { name: '生产中', type: 'making' },
-					4: { name: '已完成', type: 'finish' }
-				};
+					const statusMap = {
+						'-1': { name: '已撤销', type: 'cancelled' },
+						0: { name: '待审核', type: 'pending' },
+						1: { name: '已驳回', type: 'expired' },
+						2: { name: '待签批', type: 'process' },
+						3: { name: '生产中', type: 'making' },
+						4: { name: '已完成', type: 'finish' }
+					};
 					const s = statusMap[item.status] || { name: '未知', type: 'expired' };
 
 					return {
@@ -199,6 +201,7 @@ export default {
 				this.noMore = this.displayList.length >= (res.total || 0);
 			} catch (e) {
 				console.error('加载订单列表失败', e);
+				uni.showToast({ title: e || '加载订单列表失败', icon: 'none' });
 			} finally {
 				this.loading = false;
 			}
@@ -218,7 +221,7 @@ export default {
 							this.refresh();
 						} catch (e) {
 							uni.hideLoading();
-							uni.showToast({ title: '撤销失败', icon: 'none' });
+							uni.showToast({ title: e || '撤销失败', icon: 'none' });
 						}
 					}
 				}
@@ -230,6 +233,7 @@ export default {
 				const res = await getAuditHistory(item.rowId);
 				this.auditHistoryList = res.data || [];
 			} catch (e) {
+				uni.showToast({ title: e || '加载审核记录失败', icon: 'none' });
 				this.auditHistoryList = [];
 			} finally {
 				uni.hideLoading();

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/agreement/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/complaint/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/privacy/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/settings/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/add-model/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/detail/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/list/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/utils/request.js.map


+ 1 - 1
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -7086,7 +7086,7 @@ function isConsoleWritable() {
 function initRuntimeSocketService() {
   const hosts = "192.168.1.205,10.0.0.254,127.0.0.1";
   const port = "8090";
-  const id = "mp-weixin_7I8vuw";
+  const id = "mp-weixin_JsfeqX";
   const lazy = typeof swan !== "undefined";
   let restoreError = lazy ? () => {
   } : initOnError();

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -46,6 +46,7 @@ const _sfc_main = {
         }
       } catch (e) {
         common_vendor.index.__f__("error", "at pages/index/index.vue:154", "加载联系电话失败", e);
+        common_vendor.index.showToast({ title: e || "加载联系电话失败", icon: "none" });
       }
     },
     handleBannerChange(e) {

+ 4 - 3
unpackage/dist/dev/mp-weixin/pages/login/index.js

@@ -70,7 +70,7 @@ const _sfc_main = {
       } catch (error) {
         common_vendor.index.hideLoading();
         common_vendor.index.__f__("error", "at pages/login/index.vue:190", "登录错误:", error);
-        common_vendor.index.showToast({ title: "登录失败,请重试", icon: "none" });
+        common_vendor.index.showToast({ title: error || "登录失败", icon: "none" });
       }
     },
     async onChooseAvatar(e) {
@@ -87,7 +87,7 @@ const _sfc_main = {
       } catch (err) {
         common_vendor.index.hideLoading();
         common_vendor.index.__f__("error", "at pages/login/index.vue:207", "[微信信息] 头像上传失败:", err);
-        common_vendor.index.showToast({ title: "头像上传失败", icon: "none" });
+        common_vendor.index.showToast({ title: err || "头像上传失败", icon: "none" });
       }
     },
     onNicknameBlur(e) {
@@ -128,7 +128,7 @@ const _sfc_main = {
       } catch (error) {
         common_vendor.index.hideLoading();
         common_vendor.index.__f__("error", "at pages/login/index.vue:256", "注册错误:", error);
-        common_vendor.index.showToast({ title: "注册失败,请重试", icon: "none" });
+        common_vendor.index.showToast({ title: error || "注册失败", icon: "none" });
       }
     },
     showProtocol(type) {
@@ -149,6 +149,7 @@ const _sfc_main = {
       this.protocols.privacy = { title: privacyRes.data.title, content: privacyRes.data.content };
     } catch (e) {
       common_vendor.index.__f__("error", "at pages/login/index.vue:275", "[协议] 加载失败", e);
+      common_vendor.index.showToast({ title: e || "加载协议失败", icon: "none" });
     }
   }
 };

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/mine/agreement/index.js

@@ -24,6 +24,7 @@ const _sfc_main = {
       this.agreementNodes = res.data.content;
     } catch (e) {
       common_vendor.index.__f__("error", "at pages/mine/agreement/index.vue:37", "[用户协议] 加载失败", e);
+      common_vendor.index.showToast({ title: e || "加载用户协议失败", icon: "none" });
     }
   },
   methods: {

+ 4 - 3
unpackage/dist/dev/mp-weixin/pages/mine/complaint/index.js

@@ -20,7 +20,7 @@ const _sfc_main = {
   },
   computed: {
     isFormValid() {
-      return !this.uploading && this.formData.type && this.formData.content && this.formData.content.trim().length >= 5;
+      return !this.uploading && this.formData.type && this.formData.content && this.formData.content.trim().length >= 1;
     }
   },
   onLoad() {
@@ -36,6 +36,7 @@ const _sfc_main = {
             this.formData.type = this.types[0].value;
         }
       } catch (e) {
+        common_vendor.index.showToast({ title: e || "加载反馈类型失败", icon: "none" });
         this.types = [
           { label: "系统投诉", value: "complaint" },
           { label: "改进建议", value: "suggestion" },
@@ -68,7 +69,7 @@ const _sfc_main = {
               } catch (err) {
                 this.formData.images.splice(placeholderIndex, 1);
                 this.imageOssMap.splice(placeholderIndex, 1);
-                common_vendor.index.showToast({ title: "图片上传失败", icon: "none" });
+                common_vendor.index.showToast({ title: err || "图片上传失败", icon: "none" });
               }
             }
           } finally {
@@ -105,7 +106,7 @@ const _sfc_main = {
         }, 1500);
       } catch (e) {
         common_vendor.index.hideLoading();
-        common_vendor.index.showToast({ title: e.message || "提交失败", icon: "none" });
+        common_vendor.index.showToast({ title: e || "提交失败", icon: "none" });
       }
     }
   }

+ 6 - 3
unpackage/dist/dev/mp-weixin/pages/mine/index.js

@@ -44,6 +44,7 @@ const _sfc_main = {
         }
       } catch (e) {
         common_vendor.index.__f__("error", "at pages/mine/index.vue:134", "加载客服电话失败", e);
+        common_vendor.index.showToast({ title: e || "加载客服电话失败", icon: "none" });
       }
     },
     async loadCustomerInfo() {
@@ -51,7 +52,8 @@ const _sfc_main = {
         const res = await api_system_customer.getMyInfo();
         this.customerInfo = res.data;
       } catch (e) {
-        common_vendor.index.__f__("error", "at pages/mine/index.vue:142", "[mine] 加载客户信息失败", e);
+        common_vendor.index.__f__("error", "at pages/mine/index.vue:143", "[mine] 加载客户信息失败", e);
+        common_vendor.index.showToast({ title: e || "加载客户信息失败", icon: "none" });
       }
     },
     goToLogin() {
@@ -84,7 +86,8 @@ const _sfc_main = {
             try {
               await api_auth_index.logout();
             } catch (e) {
-              common_vendor.index.__f__("error", "at pages/mine/index.vue:175", "[mine] 退出登录接口失败", e);
+              common_vendor.index.__f__("error", "at pages/mine/index.vue:177", "[mine] 退出登录接口失败", e);
+              common_vendor.index.showToast({ title: e || "退出失败", icon: "none" });
             }
             common_vendor.index.removeStorageSync("token");
             common_vendor.index.removeStorageSync("isLogin");
@@ -170,7 +173,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     p: $data.assets.mineArrow,
     q: $data.isLogin
   }, $data.isLogin ? {
-    r: common_vendor.o((...args) => $options.handleLogout && $options.handleLogout(...args), "d1")
+    r: common_vendor.o((...args) => $options.handleLogout && $options.handleLogout(...args), "b3")
   } : {}, {
     s: common_vendor.p({
       active: "mine"

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/mine/privacy/index.js

@@ -24,6 +24,7 @@ const _sfc_main = {
       this.privacyNodes = res.data.content;
     } catch (e) {
       common_vendor.index.__f__("error", "at pages/mine/privacy/index.vue:37", "[隐私政策] 加载失败", e);
+      common_vendor.index.showToast({ title: e || "加载隐私政策失败", icon: "none" });
     }
   },
   methods: {

+ 3 - 3
unpackage/dist/dev/mp-weixin/pages/mine/settings/index.js

@@ -40,7 +40,7 @@ const _sfc_main = {
         this.pendingAvatarOssId = null;
       } catch (e) {
         common_vendor.index.hideLoading();
-        common_vendor.index.showToast({ title: "加载失败", icon: "none" });
+        common_vendor.index.showToast({ title: e || "加载失败", icon: "none" });
       }
     },
     doChooseImage() {
@@ -57,7 +57,7 @@ const _sfc_main = {
             this.pendingAvatarOssId = uploadRes.ossId;
             common_vendor.index.showToast({ title: "头像上传成功", icon: "success" });
           } catch (e) {
-            common_vendor.index.showToast({ title: "头像上传失败", icon: "none" });
+            common_vendor.index.showToast({ title: e || "头像上传失败", icon: "none" });
             this.myInfo.avatarUrl = "";
           } finally {
             this.uploading = false;
@@ -106,7 +106,7 @@ const _sfc_main = {
             }, 1200);
           } catch (e) {
             common_vendor.index.hideLoading();
-            common_vendor.index.showToast({ title: e.message || "保存失败", icon: "none" });
+            common_vendor.index.showToast({ title: e || "保存失败", icon: "none" });
           }
         }
       });

+ 4 - 3
unpackage/dist/dev/mp-weixin/pages/order/add-model/index.js

@@ -72,7 +72,7 @@ const _sfc_main = {
         }
         this.typeHasMore = this.typeList.length < total;
       } catch (e) {
-        common_vendor.index.showToast({ title: "加载型号失败", icon: "none" });
+        common_vendor.index.showToast({ title: e || "加载型号失败", icon: "none" });
       } finally {
         this.typeLoading = false;
       }
@@ -95,7 +95,7 @@ const _sfc_main = {
         }
         this.packageHasMore = this.packageList.length < total;
       } catch (e) {
-        common_vendor.index.showToast({ title: "加载包装方式失败", icon: "none" });
+        common_vendor.index.showToast({ title: e || "加载包装方式失败", icon: "none" });
       } finally {
         this.packageLoading = false;
       }
@@ -119,7 +119,7 @@ const _sfc_main = {
         }
         this.surfaceHasMore = this.surfaceList.length < total;
       } catch (e) {
-        common_vendor.index.showToast({ title: "加载表面处理失败", icon: "none" });
+        common_vendor.index.showToast({ title: e || "加载表面处理失败", icon: "none" });
       } finally {
         this.surfaceLoading = false;
       }
@@ -252,6 +252,7 @@ const _sfc_main = {
         }, 1e3);
       } catch (e) {
         common_vendor.index.hideLoading();
+        common_vendor.index.showToast({ title: e || "添加失败", icon: "none" });
       }
     }
   }

+ 18 - 6
unpackage/dist/dev/mp-weixin/pages/order/detail/index.js

@@ -1,6 +1,7 @@
 "use strict";
 const common_vendor = require("../../../common/vendor.js");
 const api_erp_order = require("../../../api/erp/order.js");
+const api_system_phone = require("../../../api/system/phone.js");
 const ErpNavBar = () => "../../../components/erp-nav-bar.js";
 const _sfc_main = {
   components: { ErpNavBar },
@@ -12,6 +13,7 @@ const _sfc_main = {
       // px
       rowId: "",
       loading: false,
+      salesPhone: "",
       order: {
         orderNo: "-",
         status: 1,
@@ -46,6 +48,7 @@ const _sfc_main = {
     if (options.rowId) {
       this.rowId = options.rowId;
       this.loadOrderDetail();
+      this.loadPhone();
     }
   },
   methods: {
@@ -90,8 +93,8 @@ const _sfc_main = {
           }))
         };
       } catch (e) {
-        common_vendor.index.__f__("error", "at pages/order/detail/index.vue:170", "加载订单详情失败", e);
-        common_vendor.index.showToast({ title: "加载失败", icon: "none" });
+        common_vendor.index.__f__("error", "at pages/order/detail/index.vue:173", "加载订单详情失败", e);
+        common_vendor.index.showToast({ title: e || "加载失败", icon: "none" });
       } finally {
         this.loading = false;
       }
@@ -115,10 +118,19 @@ const _sfc_main = {
       });
     },
     callSales() {
-      common_vendor.index.makePhoneCall({ phoneNumber: "13888888888" });
+      common_vendor.index.makePhoneCall({ phoneNumber: this.salesPhone });
     },
     goHome() {
       common_vendor.index.reLaunch({ url: "/pages/order/index" });
+    },
+    async loadPhone() {
+      try {
+        const res = await api_system_phone.getPhone();
+        this.salesPhone = res.data.salesPhone || "13888888888";
+      } catch (e) {
+        common_vendor.index.__f__("error", "at pages/order/detail/index.vue:202", "加载联系电话失败", e);
+        common_vendor.index.showToast({ title: e || "加载联系电话失败", icon: "none" });
+      }
     }
   }
 };
@@ -158,10 +170,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     j: $options.scrollHeight,
     k: $data.order.status === 0
   }, $data.order.status === 0 ? {
-    l: common_vendor.o((...args) => $options.doCancel && $options.doCancel(...args), "e7"),
-    m: common_vendor.o((...args) => $options.callSales && $options.callSales(...args), "17")
+    l: common_vendor.o((...args) => $options.doCancel && $options.doCancel(...args), "e4"),
+    m: common_vendor.o((...args) => $options.callSales && $options.callSales(...args), "f2")
   } : {
-    n: common_vendor.o((...args) => $options.goHome && $options.goHome(...args), "5f")
+    n: common_vendor.o((...args) => $options.goHome && $options.goHome(...args), "93")
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a8bbe39b"]]);

+ 3 - 0
unpackage/dist/dev/mp-weixin/pages/order/index.js

@@ -49,6 +49,7 @@ const _sfc_main = {
         this.selectedModels = res.data || [];
       } catch (e) {
         common_vendor.index.__f__("error", "at pages/order/index.vue:156", "加载型号列表失败", e);
+        common_vendor.index.showToast({ title: e || "加载型号列表失败", icon: "none" });
       } finally {
         this.isLoading = false;
       }
@@ -66,6 +67,7 @@ const _sfc_main = {
         this.myInfo = res.data || {};
         this.loadOrderItems();
       } catch (e) {
+        common_vendor.index.showToast({ title: e || "登录状态校验失败", icon: "none" });
         common_vendor.index.removeStorageSync("token");
         common_vendor.index.removeStorageSync("isLogin");
         this.isLoggedIn = false;
@@ -118,6 +120,7 @@ const _sfc_main = {
         }, 1500);
       } catch (e) {
         common_vendor.index.hideLoading();
+        common_vendor.index.showToast({ title: e || "下单失败", icon: "none" });
       }
     }
   }

+ 7 - 5
unpackage/dist/dev/mp-weixin/pages/order/list/index.js

@@ -96,7 +96,8 @@ const _sfc_main = {
         this.displayList = [...this.displayList, ...formattedRows];
         this.noMore = this.displayList.length >= (res.total || 0);
       } catch (e) {
-        common_vendor.index.__f__("error", "at pages/order/list/index.vue:201", "加载订单列表失败", e);
+        common_vendor.index.__f__("error", "at pages/order/list/index.vue:203", "加载订单列表失败", e);
+        common_vendor.index.showToast({ title: e || "加载订单列表失败", icon: "none" });
       } finally {
         this.loading = false;
       }
@@ -116,7 +117,7 @@ const _sfc_main = {
               this.refresh();
             } catch (e) {
               common_vendor.index.hideLoading();
-              common_vendor.index.showToast({ title: "撤销失败", icon: "none" });
+              common_vendor.index.showToast({ title: e || "撤销失败", icon: "none" });
             }
           }
         }
@@ -128,6 +129,7 @@ const _sfc_main = {
         const res = await api_erp_order.getAuditHistory(item.rowId);
         this.auditHistoryList = res.data || [];
       } catch (e) {
+        common_vendor.index.showToast({ title: e || "加载审核记录失败", icon: "none" });
         this.auditHistoryList = [];
       } finally {
         common_vendor.index.hideLoading();
@@ -209,7 +211,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     }),
     l: $data.auditHistoryVisible
   }, $data.auditHistoryVisible ? common_vendor.e({
-    m: common_vendor.o(($event) => $data.auditHistoryVisible = false, "fb"),
+    m: common_vendor.o(($event) => $data.auditHistoryVisible = false, "51"),
     n: common_vendor.f($data.auditHistoryList, (item, idx, i0) => {
       return common_vendor.e({
         a: common_vendor.n(item.auditResult === 1 ? "pass" : "reject"),
@@ -227,8 +229,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     o: $data.auditHistoryList.length === 0
   }, $data.auditHistoryList.length === 0 ? {} : {}, {
     p: common_vendor.o(() => {
-    }, "0f"),
-    q: common_vendor.o(($event) => $data.auditHistoryVisible = false, "52")
+    }, "db"),
+    q: common_vendor.o(($event) => $data.auditHistoryVisible = false, "0a")
   }) : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8504eca3"]]);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/order/list/index.wxml


+ 4 - 4
unpackage/dist/dev/mp-weixin/utils/request.js

@@ -54,17 +54,17 @@ function request(options = {}) {
           resolve(result);
         } else if (code === 401) {
           redirectToLogin();
-          reject(new Error("登录已失效"));
+          reject("登录已失效");
         } else if (code === 500) {
-          reject(new Error(msg));
+          reject(msg);
         } else {
-          reject(new Error(msg || "请求失败"));
+          reject(msg || "请求失败");
         }
       },
       fail(err) {
         const message = err.errMsg || "网络请求失败";
         common_vendor.index.showToast({ title: message, icon: "none" });
-        reject(new Error(message));
+        reject(message);
       }
     });
   });

+ 4 - 4
utils/request.js

@@ -61,17 +61,17 @@ function request(options = {}) {
 					resolve(result);
 				} else if (code === 401) {
 					redirectToLogin();
-					reject(new Error('登录已失效'));
+					reject('登录已失效');
 				} else if (code === 500) {
-					reject(new Error(msg));
+					reject(msg);
 				} else {
-					reject(new Error(msg || '请求失败'));
+					reject(msg || '请求失败');
 				}
 			},
 			fail(err) {
 				const message = err.errMsg || '网络请求失败';
 				uni.showToast({ title: message, icon: 'none' });
-				reject(new Error(message));
+				reject(message);
 			}
 		});
 	});

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio