ext.liuqiwen3 4 hours ago
parent
commit
12ee4d1702
100 changed files with 896 additions and 15649 deletions
  1. 0 48
      api/customerService.js
  2. 0 75
      api/functions.js
  3. 2 1
      components/emptyPage.vue
  4. 3 0
      config/app.js
  5. 27 200
      pages.json
  6. 20 14
      pages/find_funds/fundsOrder.vue
  7. 2 1
      pages/goods_search/index.vue
  8. 4 67
      pages/index/index.vue
  9. 0 1004
      pages/mall/index.vue
  10. 0 1702
      pages/mall/newIndex.vue
  11. 2 2
      pages/merchantCenter/postInformation.vue
  12. 1 1
      pages/merchantCenter/productCenter.vue
  13. 1 1
      pages/merchantCenter/productManagement.vue
  14. 1 1
      pages/merchantCenter/releaseProduct.vue
  15. 2 1
      pages/order_addcart/order_addcart.vue
  16. 2 1
      pages/user/index.vue
  17. 2 1
      pages/users/my_merchant/index.vue
  18. 2 1
      pages/users/user_address_list/index.vue
  19. 447 451
      pages/users/user_goods_collection/index.vue
  20. 0 103
      pages/users/vault/aggrement.vue
  21. 0 549
      pages/users/vault/buy.vue
  22. 0 1242
      pages/users/vault/index.vue
  23. 0 887
      pages/users/vault/recharge.vue
  24. 0 538
      pages/users/vault/rechargeGold.vue
  25. 0 862
      pages/users/vault/rechargeRmb.vue
  26. 0 603
      pages/users/vault/recycle/order_fill.vue
  27. 0 416
      pages/users/vault/recycle/recyle_order.vue
  28. 0 398
      pages/users/vault/recycle/report.vue
  29. 0 0
      pages/users/vault/saveGoldAgreement.vue
  30. 0 671
      pages/users/vault/save_gold.vue
  31. 0 706
      pages/users/vault/storeMetal/GoldMailForm.vue
  32. 0 365
      pages/users/vault/storeMetal/gmReport.vue
  33. 0 161
      pages/users/vault/storeMetal/goldBullionStock.vue
  34. 0 1136
      pages/users/vault/storeMetal/index.vue
  35. 0 693
      pages/users/vault/storeMetal/metalExchange.vue
  36. 0 503
      pages/users/vault/storeMetal/metalExchangeList.vue
  37. 0 614
      pages/users/vault/storeMetal/metalExchangeWithdraw.vue
  38. 0 500
      pages/users/vault/storeMetal/nonLogisticsGold.vue
  39. 0 359
      pages/users/vault/storeMetal/order.vue
  40. 0 291
      pages/users/vault/trade_list.vue
  41. 0 480
      pages/users/vault/withdraw.vue
  42. 378 0
      pages/users/wechat_login/index.vue
  43. BIN
      static/images/2-001.png
  44. BIN
      static/images/2-002.png
  45. BIN
      static/images/2-003.png
  46. BIN
      static/images/empty-box.png
  47. BIN
      static/images/hand.png
  48. BIN
      static/images/indexBG.png
  49. BIN
      static/images/line.jpg
  50. BIN
      static/images/lingyhj.png
  51. BIN
      static/images/noAddress.png
  52. BIN
      static/images/noCart.png
  53. BIN
      static/images/noCollection.png
  54. BIN
      static/images/noCoupon.png
  55. BIN
      static/images/noSearch.png
  56. BIN
      static/images/orderTime.png
  57. BIN
      static/images/phone.png
  58. BIN
      static/images/product.png
  59. BIN
      static/images/sb_btn.png
  60. BIN
      static/images/setting.png
  61. BIN
      static/images/setting/bofang.png
  62. BIN
      static/images/setting/cunliao.png
  63. BIN
      static/images/setting/daifahuo.png
  64. BIN
      static/images/setting/daifukuan.png
  65. BIN
      static/images/setting/daishouhuo.png
  66. BIN
      static/images/setting/dianpu.png
  67. BIN
      static/images/setting/dingwei.png
  68. BIN
      static/images/setting/fabu.png
  69. BIN
      static/images/setting/jinqian.png
  70. BIN
      static/images/setting/kabao.png
  71. BIN
      static/images/setting/kucun.png
  72. BIN
      static/images/setting/lianxikefu.png
  73. BIN
      static/images/setting/mailiao.png
  74. BIN
      static/images/setting/mailiao2.png
  75. BIN
      static/images/setting/mendian.png
  76. BIN
      static/images/setting/shangpin.png
  77. BIN
      static/images/setting/shoucang.png
  78. BIN
      static/images/setting/tiliao.png
  79. BIN
      static/images/setting/tuikuan.png
  80. BIN
      static/images/setting/vip.png
  81. BIN
      static/images/setting/vipBG.png
  82. BIN
      static/images/setting/vipIcon.png
  83. BIN
      static/images/setting/xiazaiapp.png
  84. BIN
      static/images/setting/yijianjianyi.png
  85. BIN
      static/images/setting/yiwancheng.png
  86. BIN
      static/images/setting/zuji.png
  87. BIN
      static/images/share.png
  88. BIN
      static/images/shishijinjia.png
  89. BIN
      static/images/tabbar/1-001.png
  90. BIN
      static/images/tabbar/1-002.png
  91. BIN
      static/images/tabbar/1-003.png
  92. BIN
      static/images/tabbar/2-001.png
  93. BIN
      static/images/tabbar/2-002.png
  94. BIN
      static/images/tabbar/3-001.png
  95. BIN
      static/images/tabbar/3-002.png
  96. BIN
      static/images/tabbar/3-003.png
  97. BIN
      static/images/tabbar/4-001.png
  98. BIN
      static/images/tabbar/4-002.png
  99. BIN
      static/images/tabbar/4-003.png
  100. 0 0
      static/images/weiling.png

+ 0 - 48
api/customerService.js

@@ -1,48 +0,0 @@
-import request from "@/utils/request.js";
-/**
- * armg-2025/8/15-获取团队客服列表
- * @param page 页码
- * @param limit 每页数量
- */
-export function getCustomerServiceList() {
-  return request.get('im/team/list');
-}
-
-/**
- * armg-2025/8/18-创建群聊
- * @param imGroupChat 
- * @param chatName 群聊名称
- * @param chatIntroduction 群聊简介
- */
-export function createGroupChat(imGroupChat) {
-  return request.post('im/groupchat/create',imGroupChat);
-}
-
-/**
- * armg-2025/8/19-群聊加人
- * @param imRelationship 
- * @param chatCode 群组id
- * @param type 类型(1团队、2群聊) 
- * @param userId 需要入群的人的id
- */
-export function createGroupAdd(imRelationship) {
-  return request.post('im/groupchat/add',imRelationship);
-}
-
-/**
- * armg-2025/8/20-根据用户id查询群聊id
- * @param userId 
- */
-export function getGroupchatList(data) {
-  return request.get('im/groupchat/selectlist',data);
-}
-
-/**
- * armg-2025/8/21-查询是否禁言
- * @param  userId
- * 0=不禁言
- * 1=禁言
- */
-export function interdictionChatApi(uid) {
-  return request.get(`interdiction/${uid}`);
-}

+ 0 - 75
api/functions.js

@@ -1,75 +0,0 @@
-import request from "@/utils/request.js";
-
-/**
- * 支付宝转账充值
- *
- */
-export function rechargeAlipayAPI(data) {
-  return request.post("user/recharge/alipay-transfer", data);
-}
-export function rechargeBankAPI(data) {
-  return request.post("user/recharge/bank-transfer", data);
-}
-
-// 充值金料
-export function rechargeGoldAPI(data) {
-  return request.post("metal/buy", data);
-}
-// 金料兑换余额
-export function exchangeGoldAPI(data) {
-  return request.post("metal/exchange", data);
-}
-// 卖料-约价回收
-export function recycleCreateAPI(data) {
-  return request.post("recycle/create", data);
-}
-// 卖料-约价回收订单列表
-export function recycleListAPI(params) {
-  return request.get("recycle/list", params);
-}
-// 取消订单
-export function recycleCancelAPI(params) {
-  return request.get("recycle/cancel", params);
-}
-// 更新快递单号和实物图片
-export function recyclUpdateAPI(data) {
-  return request.post("recycle/update-express", data);
-}
-// 用户确认报告
-export function recyclDetectionReportAPI(orderNo) {
-  return request.get(`recycle/detectionReport-notarize/${orderNo}`);
-}
-// 创建邮寄存金记录
-export function depositCreateAPI(data) {
-  return request.post(`postal-deposit/create`, data);
-}
-// 分页查询邮寄存金记录
-export function depositPageAPI(params) {
-  return request.get(`postal-deposit/page`, params);
-}
-// 用户确认报告
-export function postalDepositAPI(postalId) {
-  return request.get(`postal-deposit/user/notarize/${postalId}`);
-}
-// 创建无物流存金订单
-export function noLogisticsCreateAPI(data) {
-  return request.post("no-logistics-deposit/create", data);
-}
-// 创建好评返现订单
-export function goodReviewCreateAPI(data) {
-  return request.post("good-review/create", data);
-}
-// 查询用户好评返现订单
-export function goodReviewListAPI(params) {
-  return request.get(`good-review/list`, params);
-}
-// export function depositPageAPI(data) {
-//   return request.post(`postal-deposit/page`, data);
-// }
-/**
- * 购买svip
- *
- */
-export function svipBuy(data) {
-  return request.post("svip/buy", data);
-}

+ 2 - 1
components/emptyPage.vue

@@ -1,11 +1,12 @@
 <template>
   <view class="empty-box">
-    <image src="../static/images/empty-box.png"></image>
+    <image :src="HTTP_REQUEST_URL_IMG+'empty-box.png'"></image>
     <view class="txt">{{ title }}</view>
   </view>
 </template>
 
 <script setup>
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 defineProps({
   title: {
     type: String,

+ 3 - 0
config/app.js

@@ -4,6 +4,8 @@ let domain = 'http://192.168.100.199:8081' // 晋守桦IP
 // let domain = 'http://192.168.100.246:8081' // 韩朝龙IP
 let share = "https://www.shuibeibyg.com";
 
+let imgUrl = "https://sb-admin.oss-cn-shenzhen.aliyuncs.com/shuibei-mini/new-mini/" //服務器上图片地址
+
 // export const H5_BASE_URL = "http://192.168.3.10:5174"; // 本地测试
 export const H5_BASE_URL = "https://www.shuibeibyg.com/web-h5/"; // 正式环境H5地址
 
@@ -12,6 +14,7 @@ export const HTTP_ADMIN_URL = domain;
 
 export const HTTP_REQUEST_URL = domain;
 export const HTTP_REQUEST_URL_SHARE = share;
+export const HTTP_REQUEST_URL_IMG = imgUrl;
 
 // 请求头
 export const HEADER = {

+ 27 - 200
pages.json

@@ -67,21 +67,6 @@
 		    }
 		  }
 		},
-		{
-		  "path": "pages/mall/index",
-		  "style": {
-		    "navigationBarTitleText": "商城",
-		    "navigationStyle": "custom"
-		  }
-		},
-		{
-		  "path": "pages/mall/newIndex",
-		  "style": {
-		    "navigationBarTitleText": "商城",
-		    "navigationStyle": "custom",
-		    "onReachBottomDistance": 100
-		  }
-		},
 		{
 			"path": "pages/goods_search/index",
 			"style": {
@@ -159,38 +144,6 @@
 				"navigationBarBackgroundColor": "#ffe079",
 				"navigationStyle": "custom"
 			}
-		},
-		{
-			"path": "pages/merchantCenter/postInformation",
-			"style": {
-				"navigationBarTitleText": "发布商品",
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/merchantCenter/productManagement",
-			"style": {
-				"navigationBarTitleText": "商品管理",
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/merchantCenter/releaseProduct",
-			"style": {
-				"navigationBarTitleText": "发布商品",
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/merchantCenter/productCenter",
-			"style": {
-				"navigationBarTitleText": "产品中心",
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
 		}
 	],
 	"subPackages": [
@@ -221,6 +174,12 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "wechat_login/index",
+					"style": {
+						"navigationBarTitleText": "登录"
+					}
+				},
 				{
 					"path": "my_merchant/index",
 					"style": {
@@ -237,58 +196,6 @@
 						"navigationBarTextStyle": "black"
 					}
 				},
-				{
-					"path": "vault/index",
-					"style": {
-						"navigationBarTitleText": "钱包",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black"
-					}
-				},
-				{
-					"path": "vault/storeMetal/gmReport",
-					"style": {
-						"navigationBarTitleText": "邮寄存金检测报告",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black"
-					}
-				},
-				{
-					"path": "vault/recycle/recyle_order",
-					"style": {
-						"navigationBarTitleText": "约价回收订单",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black",
-						"enablePullDownRefresh": true,
-						"onReachBottomDistance": 100
-					}
-				},
-				{
-					"path": "vault/recycle/order_fill",
-					"style": {
-						"navigationBarTitleText": "订单填写",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "white",
-						"enablePullDownRefresh": true,
-						"onReachBottomDistance": 100
-					}
-				},
-				{
-					"path": "vault/save_gold",
-					"style": {
-						"navigationBarTitleText": "存金",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black"
-					}
-				},
-				{
-					"path": "vault/trade_list",
-					"style": {
-						"navigationBarTitleText": "明细",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black"
-					}
-				},
 				{
 					"path": "bank_card_manage/index",
 					"style": {
@@ -405,128 +312,48 @@
 					}
 				},
 				{
-					"path": "vault/recharge",
-					"style": {
-						"navigationBarTitleText": "充值",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black",
-						"app-plus": {
-							// #ifdef APP-PLUS
-							"titleNView": {
-								"type": "default"
-							}
-							// #endif
-						}
-					}
-				},
-				{
-					"path": "vault/withdraw",
-					"style": {
-						"navigationBarTitleText": "提现",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black",
-						"app-plus": {
-							// #ifdef APP-PLUS
-							"titleNView": {
-								"type": "default"
-							}
-							// #endif
-						}
-					}
-				},
-				{
-					"path": "vault/buy",
-					"style": {
-						"navigationBarTitleText": "买金",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black",
-						"app-plus": {
-							// #ifdef APP-PLUS
-							"titleNView": {
-								"type": "default"
-							}
-							// #endif
-						}
-					}
-				},
-				{
-					"path": "vault/storeMetal/goldBullionStock",
-					"style": {
-						"navigationBarTitleText": "存金",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black"
-					}
-				},
-				{
-					"path": "vault/storeMetal/index",
-					"style": {
-						"navigationBarTitleText": "卖料",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black"
-					}
-				},
-				{
-					"path": "vault/storeMetal/order",
-					"style": {
-						"navigationBarTitleText": "邮寄存金订单",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black",
-						"enablePullDownRefresh": true,
-						"onReachBottomDistance": 100
-					}
-				},
-				{
-					"path": "vault/recycle/report",
+					"path": "user_goods_collection/index",
 					"style": {
-						"navigationBarTitleText": "检测报告",
+						"navigationBarTitleText": "收藏商品",
 						"navigationBarBackgroundColor": "#ffe079",
 						"navigationBarTextStyle": "black"
 					}
-				},
+				}
+			]
+		},
+		{
+			"root": "pages/merchantCenters",
+			"name": "merchantCenters",
+			"pages": [
 				{
-					"path": "vault/storeMetal/metalExchange",
+					"path": "postInformation",
 					"style": {
-						"navigationBarTitleText": "提料兑换",
-						"navigationBarBackgroundColor": "#ffe079",
+						"navigationBarTitleText": "发布商品",
+						"navigationBarBackgroundColor": "#ffffff",
 						"navigationBarTextStyle": "black"
 					}
 				},
 				{
-					"path": "vault/storeMetal/metalExchangeList",
+					"path": "productManagement",
 					"style": {
-						"navigationBarTitleText": "提料兑换列表",
-						"navigationBarBackgroundColor": "#ffe079",
+						"navigationBarTitleText": "商品管理",
+						"navigationBarBackgroundColor": "#ffffff",
 						"navigationBarTextStyle": "black"
 					}
 				},
 				{
-					"path": "vault/storeMetal/metalExchangeWithdraw",
+					"path": "releaseProduct",
 					"style": {
-						"navigationBarTitleText": "提料确认下单",
-						"navigationBarBackgroundColor": "#ffe079",
+						"navigationBarTitleText": "发布商品",
+						"navigationBarBackgroundColor": "#ffffff",
 						"navigationBarTextStyle": "black"
 					}
 				},
 				{
-					"path": "customer_service_message/index",
+					"path": "productCenter",
 					"style": {
-						"navigationBarTitleText": "客服消息",
-						"navigationBarBackgroundColor": "#ffe079",
-						"navigationBarTextStyle": "black",
-						"app-plus": {
-							// #ifdef APP-PLUS
-							"titleNView": {
-								"type": "default"
-							}
-							// #endif
-						}
-					}
-				},
-				{
-					"path": "user_goods_collection/index",
-					"style": {
-						"navigationBarTitleText": "收藏商品",
-						"navigationBarBackgroundColor": "#ffe079",
+						"navigationBarTitleText": "产品中心",
+						"navigationBarBackgroundColor": "#ffffff",
 						"navigationBarTextStyle": "black"
 					}
 				}

+ 20 - 14
pages/find_funds/fundsOrder.vue

@@ -140,10 +140,10 @@
               v-if="role === '代购' && title === '待找款'"
             >
               <view class="Purchasing-btn" @click="takeOrderHandle(item)">
-                <image
-                  class="sb-btn-img"
-                  src="/static/images/sb_btn.png"
-                ></image>
+<!--                <image-->
+<!--                  class="sb-btn-img"-->
+<!--                  src="/static/images/sb_btn.png"-->
+<!--                ></image>-->
                 <text>点击接单</text>
               </view>
               <view class="Purchasing-tips"
@@ -189,11 +189,11 @@
                 @click="submitRateHandle(item)"
                 :class="{ disabled: item.isScore }"
               >
-                <image
-                  v-show="!item.isScore"
-                  class="sb-btn-img"
-                  src="/static/images/sb_btn.png"
-                ></image>
+<!--                <image-->
+<!--                  v-show="!item.isScore"-->
+<!--                  class="sb-btn-img"-->
+<!--                  src="/static/images/sb_btn.png"-->
+<!--                ></image>-->
                 <image
                   v-show="item.isScore"
                   class="sb-btn-img"
@@ -308,10 +308,10 @@
               v-if="role === '买家' && title === '确认单'"
             >
               <view class="confirm pay" @tap="opPopup(item)">
-                <image
-                  class="sb-btn-img"
-                  src="/static/images/sb_btn.png"
-                ></image>
+<!--                <image-->
+<!--                  class="sb-btn-img"-->
+<!--                  src="/static/images/sb_btn.png"-->
+<!--                ></image>-->
                 <text>确认支付</text>
               </view>
               <view class="refuse pay" @click="refuse(item.id)">
@@ -329,7 +329,7 @@
             v-if="title === '已接单' && role === '代购'"
             @click="submitFindFundsHandle(item)"
           >
-            <image class="sb-btn-img" src="/static/images/sb_btn.png"></image>
+<!--            <image class="sb-btn-img" src="/static/images/sb_btn.png"></image>-->
             <text>提交信息等待买家确认</text>
           </view>
         </view>
@@ -937,6 +937,9 @@ const previewImage = (item) => {
           width: 270rpx;
           height: 66rpx;
           position: relative;
+          background-color: #ffe079;
+          color: #333;
+          border-radius: 33rpx;
           .sb-btn-img {
             width: 100%;
             height: 100%;
@@ -981,6 +984,7 @@ const previewImage = (item) => {
           color: #000;
           margin: 30rpx 0 40rpx 0;
           position: relative;
+          background-color: #ffe079;
           .sb-btn-img {
             width: 100%;
             height: 100%;
@@ -1111,6 +1115,7 @@ const previewImage = (item) => {
             height: 66rpx;
             position: relative;
             color: #000;
+            background-color: #ffe079;
             .sb-btn-img {
               width: 100%;
               height: 100%;
@@ -1134,6 +1139,7 @@ const previewImage = (item) => {
         color: #000;
         margin-bottom: 100rpx;
         position: relative;
+        background: #ffe079;
         .sb-btn-img {
           width: 100%;
           height: 100%;

+ 2 - 1
pages/goods_search/index.vue

@@ -23,7 +23,7 @@
     </view>
     <view class='noCommodity'>
       <view class='pictrue' v-if="bastList.length == 0 && isbastList">
-        <image src='../../static/images/noSearch.png'></image>
+        <image :src="HTTP_REQUEST_URL_IMG+'noSearch.png'"></image>
       </view>
       <recommend :hostProduct='hostProduct' v-if="bastList.length == 0"></recommend>
     </view>
@@ -36,6 +36,7 @@ import { onShow, onReachBottom } from '@dcloudio/uni-app'
 import { getSearchKeyword, getProductslist, getProductHot } from '@/api/store.js'
 import goodList from '@/components/goodList'
 import recommend from '@/components/recommend'
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 
 // 响应式数据
 const hostProduct = ref([])

+ 4 - 67
pages/index/index.vue

@@ -537,72 +537,6 @@ page {
       }
     }
   }
-
-  .listBox {
-    padding: 14rpx 0;
-
-    .listActive {
-      background-image: url("~@/static/images/lingyhj.png");
-      background-size: 100% 100%;
-    }
-
-    .listHui {
-      background-image: url("~@/static/images/weiling.png");
-      background-size: 100% 100%;
-    }
-
-    .list {
-      width: 170rpx;
-      height: 210rpx;
-      padding: 16rpx 0;
-      text-align: center;
-      margin-left: 24rpx;
-
-      .tit {
-        font-size: 18rpx;
-        padding: 0 26rpx;
-      }
-
-      .titActive {
-        color: #c99959;
-      }
-
-      .price {
-        font-size: 46rpx;
-        font-weight: 900;
-        margin-top: 4rpx;
-      }
-
-      .pricehui {
-        color: #b2b2b2;
-      }
-
-      .fonthui {
-        background-color: #f5f5f5 !important;
-      }
-
-      .yuan {
-        font-size: 24rpx;
-      }
-
-      .ling {
-        font-size: 24rpx;
-        margin-top: 9.5rpx;
-        width: 102rpx;
-        height: 36rpx;
-        line-height: 36rpx;
-        background-color: #ffe5c7;
-        border-radius: 28rpx;
-        margin: auto;
-      }
-
-      .priceM {
-        color: #ffdaaf;
-        font-size: 22rpx;
-        margin-top: 14rpx;
-      }
-    }
-  }
 }
 
 .sticky-box {
@@ -1006,7 +940,7 @@ page {
 .page-index {
   position: relative;
   z-index: 1;
-  padding-top: 128rpx;
+  padding-top: 168rpx;
   height: 100%;
 
   .top-box {
@@ -1392,4 +1326,7 @@ page {
     font-size: 20rpx;
   }
 }
+:deep(.page-title){
+  font-size: 36rpx;
+}
 </style>

File diff suppressed because it is too large
+ 0 - 1004
pages/mall/index.vue


File diff suppressed because it is too large
+ 0 - 1702
pages/mall/newIndex.vue


+ 2 - 2
pages/merchantCenter/postInformation.vue

@@ -51,13 +51,13 @@ const setActiveOption = (option) => {
 
 const handleManualPublish = () => {
   uni.navigateTo({
-    url: '/pages/merchantCenter/releaseProduct'
+    url: '/pages/merchantCenters/releaseProduct'
   })
 }
 
 const handleTemplatePublish = () => {
   uni.navigateTo({
-    url: '/pages/merchantCenter/productCenter'
+    url: '/pages/merchantCenters/productCenter'
   })
 }
 </script>

+ 1 - 1
pages/merchantCenter/productCenter.vue

@@ -140,7 +140,7 @@ const getGroomList = async () => {
 };
 function addProduct (obj){
   uni.navigateTo({
-    url:`/pages/merchantCenter/releaseProduct?id=${obj.id}&isProductCenter=1`
+    url:`/pages/merchantCenters/releaseProduct?id=${obj.id}&isProductCenter=1`
   })
 }
 onReachBottom(() => {

+ 1 - 1
pages/merchantCenter/productManagement.vue

@@ -188,7 +188,7 @@ async function PutOnShellFn(obj,index) {
 }
 function toEditProduct (obj){
   uni.navigateTo({
-    url:`/pages/merchantCenter/releaseProduct?id=${obj.id}`
+    url:`/pages/merchantCenters/releaseProduct?id=${obj.id}`
   })
 }
 async function deleteFn(obj,index){

+ 1 - 1
pages/merchantCenter/releaseProduct.vue

@@ -959,7 +959,7 @@ const submitForm = async () => {
     }
 
     uni.navigateTo({
-      url: '/pages/merchantCenter/productManagement'
+      url: '/pages/merchantCenters/productManagement'
     })
   }
 }

+ 2 - 1
pages/order_addcart/order_addcart.vue

@@ -287,7 +287,7 @@
           "
         >
           <view class="pictrue">
-            <image src="../../static/images/noCart.png"></image>
+            <image :src="HTTP_REQUEST_URL_IMG+'noCart.png'"></image>
           </view>
           <recommend :hostProduct="hostProduct"></recommend>
         </view>
@@ -369,6 +369,7 @@ import productWindow from "@/components/productWindow";
 import util from "@/utils/util";
 import { getPreOrder } from "@/libs/order";
 import { useToast } from "@/hooks/useToast";
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 
 const appStore = useAppStore();
 const { Toast } = useToast();

+ 2 - 1
pages/user/index.vue

@@ -41,7 +41,7 @@
 
       <!-- 会员开通提示 v-if="!userInfo.isVip"-->
       <view class="vip-promote" >
-        <image class="vipBG" src="@/static/images/setting/vipBG.png" mode="scaleToFill"></image>
+        <image class="vipBG" :src="HTTP_REQUEST_URL_IMG+'vipBG.png'" mode="scaleToFill"></image>
         <view class="vip-text">
           <view class="title">
             <image class="vipIcon" src="@/static/images/setting/vipIcon.png" mode="widthFix"></image>
@@ -155,6 +155,7 @@
 import { ref, reactive } from 'vue'
 import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
 import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 import { isHttpsImage } from "@/utils/util";
 import { useAppStore } from "@/stores/app";
 import { useToast } from "@/hooks/useToast";

+ 2 - 1
pages/users/my_merchant/index.vue

@@ -9,7 +9,7 @@
 
         </view>
         <view class="share-btn" @click="to_share">
-          <image src="@/static/images/share.png" mode="aspectFit"></image>
+          <image :src="HTTP_REQUEST_URL_IMG+'share.png'" mode="aspectFit"></image>
           <text>分享店铺</text>
         </view>
       </view>
@@ -45,6 +45,7 @@ import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
 import { getSbmerchantInfo } from "@/api/merchant.js";
 import { toLogin } from "@/libs/login.js";
 import { useAppStore } from "@/stores/app.js";
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 const appStore = useAppStore();
 
 const merchantInfo = ref('')

+ 2 - 1
pages/users/user_address_list/index.vue

@@ -71,7 +71,7 @@
       </view>
       <view class="noCommodity" v-if="addressList.length < 1 && page > 1">
         <view class="pictrue">
-          <image src="../../../static/images/noAddress.png"></image>
+          <image :src="HTTP_REQUEST_URL_IMG+'noAddress.png'"></image>
         </view>
       </view>
       <view style="height: 120rpx"></view>
@@ -125,6 +125,7 @@ import { useToast } from "@/hooks/useToast.js";
 import wechat from "@/libs/wechat.js";
 const { Toast } = useToast();
 const appStore = useAppStore();
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
 
 const addressList = ref([]);
 const cartId = ref("");

+ 447 - 451
pages/users/user_goods_collection/index.vue

@@ -1,458 +1,454 @@
 <template>
-	<view>
-		<view class="hdbj"></view>
-		<view class='collectionGoods' v-if="collectProductList.length">
-			<!-- #ifdef  H5 || MP-->
-			<view class='nav acea-row row-between-wrapper'>
-				<view>当前共 <text class='num font-color'>{{ totals }}</text>件商品</view>
-				<view class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
-				</view>
-			</view>
-			<!-- #endif -->
-			<view class="list">
-				<checkbox-group @change="checkboxChange" class="centent">
-					<view v-for="(item,index) in collectProductList" :key="index" class='item acea-row row-middle'>
-						<checkbox :value="item.id.toString()" :checked="item.checked" v-if="!footerswitch"
-							style="margin-right: 10rpx;" />
-						<navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none'
-							class="acea-row">
-							<view class='pictrue'>
-								<image :src="item.image" mode="aspectFill"></image>
-							</view>
-							<view>
-								<view class='name line1'>{{item.storeName}}</view>
-								<view class='money font-color'>¥{{item.price}}</view>
-							</view>
-						</navigator>
-					</view>
-				</checkbox-group>
-			</view>
-			<view class='loadingicon acea-row row-center-wrapper'>
-				<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
-			</view>
-			<view v-if="!footerswitch" class='footer acea-row row-between-wrapper'>
-				<view>
-					<checkbox-group @change="checkboxAllChange">
-						<checkbox value="all" :checked="!!isAllSelect" />
-						<text class='checkAll'>全选</text>
-					</checkbox-group>
-				</view>
-				<view class='button acea-row row-middle'>
-					<form @submit="delCollectionAll" report-submit='true'>
-						<button class='bnt cart-color' formType="submit">取消收藏</button>
-					</form>
-				</view>
-			</view>
-		</view>
-		<view class='noCommodity' v-else-if="!collectProductList.length && page > 1">
-			<view class='pictrue'>
-				<image src='@/static/images/noCollection.png'></image>
-			</view>
-			<recommend :hostProduct="hostProduct"></recommend>
-		</view>
-		<!-- #ifdef MP -->
-		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
-		<!-- #endif -->
-		<home></home>
-	</view>
+  <view>
+    <view class="hdbj"></view>
+    <view class='collectionGoods' v-if="collectProductList.length">
+      <!-- #ifdef  H5 || MP-->
+      <view class='nav acea-row row-between-wrapper'>
+        <view>当前共 <text class='num font-color'>{{ totals }}</text>件商品</view>
+        <view class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
+        </view>
+      </view>
+      <!-- #endif -->
+      <view class="list">
+        <checkbox-group @change="checkboxChange" class="centent" activeColor="#ffe079">
+          <view v-for="(item,index) in collectProductList" :key="index" class='item acea-row row-middle'>
+            <checkbox :value="item.id.toString()" :checked="item.checked" v-if="!footerswitch"
+                      style="margin-right: 10rpx;" activeColor="#ffe079" />
+            <navigator :url='"/pages/goods_details/index?id="+item.productId' hover-class='none'
+                       class="acea-row">
+              <view class='pictrue'>
+                <image :src="item.image" mode="aspectFill"></image>
+              </view>
+              <view>
+                <view class='name line1'>{{item.storeName}}</view>
+                <view class='money font-color'>¥{{item.price}}</view>
+              </view>
+            </navigator>
+          </view>
+        </checkbox-group>
+      </view>
+      <view class='loadingicon acea-row row-center-wrapper'>
+        <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
+      </view>
+      <view v-if="!footerswitch" class='footer acea-row row-between-wrapper'>
+        <view>
+          <checkbox-group @change="checkboxAllChange">
+            <checkbox value="all" :checked="!!isAllSelect" />
+            <text class='checkAll'>全选</text>
+          </checkbox-group>
+        </view>
+        <view class='button acea-row row-middle'>
+          <form @submit="delCollectionAll" report-submit='true'>
+            <button class='bnt cart-color' formType="submit">取消收藏</button>
+          </form>
+        </view>
+      </view>
+    </view>
+    <view class='noCommodity' v-else-if="!collectProductList.length && page > 1">
+      <view class='pictrue'>
+        <image :src="HTTP_REQUEST_URL_IMG+'noCollection.png'"></image>
+      </view>
+      <recommend :hostProduct="hostProduct"></recommend>
+    </view>
+
+    <home></home>
+  </view>
 </template>
 
-<script>
-	import {
-		getCollectUserList,
-		getProductHot,
-		collectDelete
-	} from '@/api/store.js';
-	import {
-		mapGetters
-	} from "vuex";
-	import {
-		toLogin
-	} from '@/libs/login.js';
-	import recommend from '@/components/recommend';
-	// #ifdef MP
-	import authorize from '@/components/Authorize';
-	// #endif
-	import home from '@/components/home';
-	export default {
-		components: {
-			recommend,
-			// #ifdef MP
-			authorize,
-			// #endif
-			home
-		},
-		data() {
-			return {
-				footerswitch: true,
-				hostProduct: [],
-				loadTitle: '加载更多',
-				loading: false,
-				loadend: false,
-				collectProductList: [],
-				limit: 8,
-				page: 1,
-				isAuto: false, //没有授权的不会自动授权
-				isShowAuth: false, //是否隐藏授权
-				hotScroll: false,
-				hotPage: 1,
-				hotLimit: 10,
-				isAllSelect: false, //全选
-				selectValue: [], //选中的数据
-				delBtnWidth: 80, //左滑默认宽度
-				totals: 0
-			};
-		},
-		computed: mapGetters(['isLogin']),
-		onLoad() {
-			if (this.isLogin) {
-				this.loadend = false;
-				this.page = 1;
-				this.collectProductList = [];
-				this.get_user_collect_product();
-			} else {
-				toLogin();
-			}
-		},
-		onShow() {
-			this.loadend = false;
-			this.page = 1;
-			this.collectProductList = [];
-			this.get_user_collect_product();
-		},
-		methods: {
-			// #ifdef MP
-			drawStart(e) {
-				var touch = e.touches[0];
-				this.startX = touch.clientX;
-			},
-			//触摸滑动
-			drawMove(e) {
-				var touch = e.touches[0];
-				var item = this.collectProductList[e.currentTarget.dataset.index];
-				var disX = this.startX - touch.clientX;
-				if (disX >= 20) {
-					if (disX > this.delBtnWidth) {
-						disX = this.delBtnWidth;
-					}
-					this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', disX);
-				} else {
-					this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', 0);
-				}
-			},
-			//触摸滑动结束
-			drawEnd(e) {
-				var item = this.collectProductList[e.currentTarget.dataset.index];
-				if (item.right >= this.delBtnWidth / 2) {
-					this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', this.delBtnWidth);
-				} else {
-					this.$set(this.collectProductList[e.currentTarget.dataset.index], 'right', 0);
-				}
-			},
-			// #endif
-			manage: function() {
-				this.footerswitch = !this.footerswitch;
-			},
-
-			checkboxChange: function(event) {
-				var items = this.collectProductList,
-					values = event.detail.value;
-				for (var i = 0, lenI = items.length; i < lenI; ++i) {
-					const item = items[i]
-					if (values.includes(item.id.toString())) {
-						this.$set(item, 'checked', true)
-					} else {
-						this.$set(item, 'checked', false)
-					}
-				}
-				this.selectValue = values.toString();
-				this.isAllSelect = items.length === values.length;
-			},
-			checkboxAllChange: function(event) {
-				let value = event.detail.value;
-				if (value.length > 0) {
-					this.setAllSelectValue(1)
-				} else {
-					this.setAllSelectValue(0)
-				}
-			},
-			setAllSelectValue: function(status) {
-				let selectValue = [];
-				if (this.collectProductList.length > 0) {
-					this.collectProductList.map(item => {
-						if (status) {
-							this.$set(item, 'checked', true)
-							selectValue.push(item.id);
-							this.isAllSelect = true;
-						} else {
-							this.$set(item, 'checked', false)
-							this.isAllSelect = false;
-						}
-					});
-					this.selectValue = selectValue.toString();
-				}
-			},
-			/**
-			 * 授权回调
-			 */
-			onLoadFun: function() {
-				this.get_user_collect_product();
-				this.get_host_product();
-			},
-			// 授权关闭
-			authColse: function(e) {
-				this.isShowAuth = e
-			},
-			/**
-			 * 获取收藏产品
-			 */
-			get_user_collect_product: function() {
-				let that = this;
-				if (this.loading) return;
-				if (this.loadend) return;
-				that.loading = true;
-				that.loadTitle = "";
-				getCollectUserList({
-					page: that.page,
-					limit: that.limit
-				}).then(res => {
-					res.data.list.map(item => {
-						that.$set(item, 'right', 0);
-					});
-					that.totals = res.data.total;
-					let collectProductList = res.data.list;
-					let loadend = collectProductList.length < that.limit;
-					that.collectProductList = that.$util.SplitArray(collectProductList, that
-						.collectProductList);
-					that.$set(that, 'collectProductList', that.collectProductList);
-					if (that.collectProductList.length === 0) that.get_host_product();
-					that.loadend = loadend;
-					that.loadTitle = loadend ? '已全部加载' : '加载更多';
-					that.page = that.page + 1;
-					that.loading = false;
-				}).catch(err => {
-					that.loading = false;
-					that.loadTitle = "加载更多";
-				});
-			},
-			/**
-			 * 取消收藏
-			 */
-			delCollection: function(id, index) {
-				this.selectValue = id;
-				this.del({
-					ids: this.selectValue.toString()
-				});
-			},
-			delCollectionAll: function() {
-				if (!this.selectValue || this.selectValue.length == 0) return this.$util.Tips({
-					title: '请选择商品'
-				});
-				this.del({
-					ids: this.selectValue
-				});
-			},
-			del: function(data) {
-				collectDelete(data).then(res => {
-					this.$util.Tips({
-						title: '取消收藏成功',
-						icon: 'success'
-					});
-					// this.collectProductList = this.collectProductList.filter(item=>item!==this.selectValue)
-					this.collectProductList = [];
-					this.loadend = false;
-					this.page = 1;
-					this.get_user_collect_product();
-				}).catch(err => {
-					return this.$util.Tips({
-						title: err
-					})
-				});
-			},
-			/**
-			 * 获取我的推荐
-			 */
-			get_host_product: function() {
-				let that = this;
-				if (that.hotScroll) return
-				getProductHot(
-					that.hotPage,
-					that.hotLimit,
-				).then(res => {
-					that.hotPage++
-					that.hotScroll = res.data.list.length < that.hotLimit
-					that.hostProduct = that.hostProduct.concat(res.data.list)
-				});
-			}
-		},
-		/**
-		 * 页面上拉触底事件的处理函数
-		 */
-		onReachBottom() {
-			this.get_user_collect_product();
-			this.get_host_product();
-		}
-	}
+<script setup>
+import { ref, computed, onMounted, onActivated } from 'vue';
+import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
+import { storeToRefs } from 'pinia';
+import { useAppStore } from "@/stores/app.js";
+import { HTTP_REQUEST_URL_IMG } from "@/config/app";
+import { getCollectUserList, getProductHot, collectDelete } from '@/api/store.js';
+import { toLogin } from "@/libs/login.js";
+import recommend from '@/components/recommend';
+
+import home from '@/components/home';
+import Util from '@/utils/util';
+
+// Store
+const appStore = useAppStore();
+const isLogin = appStore.isLogin;
+
+// 响应式数据
+const footerswitch = ref(true);
+const hostProduct = ref([]);
+const loadTitle = ref('加载更多');
+const loading = ref(false);
+const loadend = ref(false);
+const collectProductList = ref([]);
+const limit = 8;
+const page = ref(1);
+const isAuto = ref(false);
+const isShowAuth = ref(false);
+const hotScroll = ref(false);
+const hotPage = ref(1);
+const hotLimit = 10;
+const isAllSelect = ref(false);
+const selectValue = ref([]);
+const delBtnWidth = 80;
+const totals = ref(0);
+const startX = ref(0);
+
+// #ifdef MP
+// 触摸开始
+const drawStart = (e) => {
+  const touch = e.touches[0];
+  startX.value = touch.clientX;
+};
+
+// 触摸滑动
+const drawMove = (e) => {
+  const touch = e.touches[0];
+  const index = e.currentTarget.dataset.index;
+  const disX = startX.value - touch.clientX;
+
+  if (disX >= 20) {
+    if (disX > delBtnWidth) {
+      collectProductList.value[index].right = delBtnWidth;
+    } else {
+      collectProductList.value[index].right = disX;
+    }
+  } else {
+    collectProductList.value[index].right = 0;
+  }
+};
+
+// 触摸滑动结束
+const drawEnd = (e) => {
+  const index = e.currentTarget.dataset.index;
+  const item = collectProductList.value[index];
+
+  if (item.right >= delBtnWidth / 2) {
+    item.right = delBtnWidth;
+  } else {
+    item.right = 0;
+  }
+};
+// #endif
+
+// 管理切换
+const manage = () => {
+  footerswitch.value = !footerswitch.value;
+};
+
+// 多选框变化
+const checkboxChange = (event) => {
+  const values = event.detail.value;
+
+  collectProductList.value.forEach(item => {
+    item.checked = values.includes(item.id.toString());
+  });
+
+  selectValue.value = values.toString();
+  isAllSelect.value = collectProductList.value.length === values.length;
+};
+
+// 全选变化
+const checkboxAllChange = (event) => {
+  if (event.detail.value.length > 0) {
+    setAllSelectValue(1);
+  } else {
+    setAllSelectValue(0);
+  }
+};
+
+// 设置全选状态
+const setAllSelectValue = (status) => {
+  const selectValues = [];
+
+  collectProductList.value.forEach(item => {
+    if (status) {
+      item.checked = true;
+      selectValues.push(item.id);
+      isAllSelect.value = true;
+    } else {
+      item.checked = false;
+      isAllSelect.value = false;
+    }
+  });
+
+  selectValue.value = selectValues.toString();
+};
+
+// 授权回调
+const onLoadFun = () => {
+  get_user_collect_product();
+  get_host_product();
+};
+
+// 授权关闭
+const authColse = (e) => {
+  isShowAuth.value = e;
+};
+
+// 获取收藏产品
+const get_user_collect_product = async () => {
+  if (loading.value || loadend.value) return;
+
+  loading.value = true;
+  loadTitle.value = '';
+
+  try {
+    const res = await getCollectUserList({
+      page: page.value,
+      limit: limit
+    });
+
+    res.data.list.forEach(item => {
+      item.right = 0;
+    });
+
+    totals.value = res.data.total;
+    const collectProductListData = res.data.list;
+    const isLoadend = collectProductListData.length < limit;
+
+    collectProductList.value = Util.SplitArray(collectProductListData, collectProductList.value);
+
+    if (collectProductList.value.length === 0) {
+      get_host_product();
+    }
+
+    loadend.value = isLoadend;
+    loadTitle.value = isLoadend ? '已全部加载' : '加载更多';
+    page.value++;
+  } catch (err) {
+    console.error(err);
+  } finally {
+    loading.value = false;
+    loadTitle.value = '加载更多';
+  }
+};
+
+// 取消收藏单个
+const delCollection = (id, index) => {
+  selectValue.value = id;
+  del({ ids: selectValue.value.toString() });
+};
+
+// 取消收藏多个
+const delCollectionAll = () => {
+  if (!selectValue.value || selectValue.value.length === 0) {
+    uni.showToast({ title: '请选择商品',icon:none });
+  }
+
+  del({ ids: selectValue.value });
+};
+
+// 删除操作
+const del = async (data) => {
+  try {
+    await collectDelete(data);
+    uni.showToast({ title: '取消收藏成功', icon: 'success' });
+
+    collectProductList.value = [];
+    loadend.value = false;
+    page.value = 1;
+    get_user_collect_product();
+  } catch (err) {
+    uni.showToast({ title: err.message || '操作失败' });
+  }
+};
+
+// 获取热门商品
+const get_host_product = async () => {
+  if (hotScroll.value) return;
+
+  try {
+    const res = await getProductHot(hotPage.value, hotLimit);
+    hotPage.value++;
+    hotScroll.value = res.data.list.length < hotLimit;
+    hostProduct.value = hostProduct.value.concat(res.data.list);
+  } catch (err) {
+    console.error(err);
+  }
+};
+
+// 页面加载
+onLoad(() => {
+  if (isLogin) {
+    loadend.value = false;
+    page.value = 1;
+    collectProductList.value = [];
+    get_user_collect_product();
+  } else {
+    toLogin();
+  }
+});
+
+// 页面显示
+onShow(() => {
+  loadend.value = false;
+  page.value = 1;
+  collectProductList.value = [];
+  get_user_collect_product();
+});
+
+// 页面上拉触底
+onReachBottom(() => {
+  get_user_collect_product();
+  get_host_product();
+});
 </script>
 
 <style scoped lang="scss">
+/* 样式部分保持不变 */
+.hdbj {
+  width: 100%;
+  height: 30rpx;
+  background-color: #f5f5f5;
+  z-index: 999999;
+  position: fixed;
+  top: 0;
+}
+
+.order-item {
+  width: 100%;
+  display: flex;
+  position: relative;
+  align-items: right;
+  flex-direction: row;
+}
+
+.remove {
+  width: 120rpx;
+  height: 100%;
+  background-color: $theme-color;
+  color: white;
+  position: absolute;
+  top: 0;
+  right: -160rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 24rpx;
+}
+
+.collectionGoods {
+  .nav {
+    width: 92%;
+    height: 90rpx;
+    background-color: #fff;
+    padding: 0 24rpx;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    font-size: 28rpx;
+    color: #282828;
+    position: fixed;
+    left: 30rpx;
+    z-index: 5;
+    top: 30rpx;
+    border-bottom: 1px solid #EEEEEE;
+    border-top-left-radius: 14rpx;
+    border-top-right-radius: 14rpx;
+  }
+
+  .list {
+    padding: 30rpx;
+    margin-top: 90rpx;
+
+    .name {
+      width: 434rpx;
+      margin-bottom: 56rpx;
+    }
+  }
+
+  .centent {
+    /* #ifdef H5 || MP */
+    background-color: #fff;
+    /* #endif */
+    border-bottom-left-radius: 14rpx;
+    border-bottom-right-radius: 14rpx;
+  }
+}
+
+.collectionGoods .item {
+  background-color: #fff;
+  padding-left: 24rpx;
+  height: 180rpx;
+  margin-bottom: 15rpx;
+  border-radius: 14rpx;
+}
+
+.collectionGoods .item .pictrue {
+  width: 130rpx;
+  height: 130rpx;
+  margin-right: 20rpx;
+}
+
+.collectionGoods .item .pictrue image {
+  width: 100%;
+  height: 100%;
+  border-radius: 14rpx;
+}
+
+.collectionGoods .item .text {
+  width: 535rpx;
+  height: 130rpx;
+  font-size: 28rpx;
+  color: #282828;
+}
+
+.collectionGoods .item .text .name {
+  width: 100%;
+}
+
+.collectionGoods .item .text .money {
+  font-size: 26rpx;
+}
+
+.collectionGoods .item .text .delete {
+  font-size: 26rpx;
+  color: #282828;
+  width: 144rpx;
+  height: 46rpx;
+  border: 1px solid #bbb;
+  border-radius: 4rpx;
+  text-align: center;
+  line-height: 46rpx;
+}
+
+.noCommodity {
+  background-color: #fff;
+  padding-top: 1rpx;
+  border-top: 0;
+}
+
+.footer {
+  z-index: 9;
+  width: 100%;
+  height: 96rpx;
+  background-color: #fff;
+  position: fixed;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  border-top: 1rpx solid #eee;
+  border-bottom: 1px solid #EEEEEE;
+  /* #ifdef H5 || MP */
+  bottom: 0rpx;
+  /* #endif */
+  /* #ifndef MP */
+  // bottom: 98rpx;
+  // bottom: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
+  // bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
+  /* #endif */
+  .checkAll {
+    font-size: 28rpx;
+    color: #282828;
+    margin-left: 16rpx;
+  }
 
-	.hdbj {
-		width: 100%;
-		height: 30rpx;
-		background-color: #f5f5f5;
-		z-index: 999999;
-		position: fixed;
-		top: 0;
-	}
-
-	.order-item {
-		width: 100%;
-		display: flex;
-		position: relative;
-		align-items: right;
-		flex-direction: row;
-	}
-
-	.remove {
-		width: 120rpx;
-		height: 100%;
-		background-color: $theme-color;
-		color: white;
-		position: absolute;
-		top: 0;
-		right: -160rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 24rpx;
-	}
-
-	.collectionGoods {
-
-		.nav {
-			width: 92%;
-			height: 90rpx;
-			background-color: #fff;
-			padding: 0 24rpx;
-			-webkit-box-sizing: border-box;
-			box-sizing: border-box;
-			font-size: 28rpx;
-			color: #282828;
-			position: fixed;
-			left: 30rpx;
-			z-index: 5;
-			top: 30rpx;
-			border-bottom: 1px solid #EEEEEE;
-			border-top-left-radius: 14rpx;
-			border-top-right-radius: 14rpx;
-		}
-
-		.list {
-			padding: 30rpx;
-			margin-top: 90rpx;
-
-			.name {
-				width: 434rpx;
-				margin-bottom: 56rpx;
-			}
-		}
-
-		.centent {
-			/* #ifdef H5 || MP */
-			background-color: #fff;
-			/* #endif */
-			border-bottom-left-radius: 14rpx;
-			border-bottom-right-radius: 14rpx;
-		}
-	}
-
-	.collectionGoods .item {
-		background-color: #fff;
-		padding-left: 24rpx;
-		height: 180rpx;
-		margin-bottom: 15rpx;
-		border-radius: 14rpx;
-
-	}
-
-	.collectionGoods .item .pictrue {
-		width: 130rpx;
-		height: 130rpx;
-		margin-right: 20rpx;
-	}
-
-	.collectionGoods .item .pictrue image {
-		width: 100%;
-		height: 100%;
-		border-radius: 14rpx;
-	}
-
-	.collectionGoods .item .text {
-		width: 535rpx;
-		height: 130rpx;
-		font-size: 28rpx;
-		color: #282828;
-	}
-
-	.collectionGoods .item .text .name {
-		width: 100%;
-	}
-
-	.collectionGoods .item .text .money {
-		font-size: 26rpx;
-	}
-
-	.collectionGoods .item .text .delete {
-		font-size: 26rpx;
-		color: #282828;
-		width: 144rpx;
-		height: 46rpx;
-		border: 1px solid #bbb;
-		border-radius: 4rpx;
-		text-align: center;
-		line-height: 46rpx;
-	}
-
-	.noCommodity {
-		background-color: #fff;
-		padding-top: 1rpx;
-		border-top: 0;
-	}
-
-	.footer {
-		z-index: 9;
-		width: 100%;
-		height: 96rpx;
-		background-color: #fff;
-		position: fixed;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		border-top: 1rpx solid #eee;
-		border-bottom: 1px solid #EEEEEE;
-		/* #ifdef H5 || MP */
-		bottom: 0rpx;
-		/* #endif */
-		/* #ifndef MP */
-		// bottom: 98rpx;
-		// bottom: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
-		// bottom: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
-		/* #endif */
-		.checkAll {
-			font-size: 28rpx;
-			color: #282828;
-			margin-left: 16rpx;
-		}
-
-		.button .bnt {
-			font-size: 28rpx;
-			color: #999;
-			border-radius: 30rpx;
-			border: 1px solid #999;
-			width: 160rpx;
-			height: 60rpx;
-			text-align: center;
-			line-height: 60rpx;
-		}
-	}
-</style>
+  .button .bnt {
+    font-size: 28rpx;
+    color: #999;
+    border-radius: 30rpx;
+    border: 1px solid #999;
+    width: 160rpx;
+    height: 60rpx;
+    text-align: center;
+    line-height: 60rpx;
+  }
+}
+</style>

File diff suppressed because it is too large
+ 0 - 103
pages/users/vault/aggrement.vue


+ 0 - 549
pages/users/vault/buy.vue

@@ -1,549 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="balance-box">
-      <view>
-        <view class="balance-title">可用余额</view>
-        <view class="balance-rmb">
-          <view style="display: flex; align-items: flex-end">¥</view>
-          <view class="rmb">{{ appStore.userInfo.nowMoney }}</view>
-        </view>
-      </view>
-    </view>
-    <view class="tabs">
-      <view
-        v-for="item in tabsList"
-        :key="item.key"
-        class="tabs-item"
-        :class="[tabsIndex === item.key ? 'active' : '']"
-        @click="tabsChange(item)"
-      >
-        {{ item.title }}
-      </view>
-    </view>
-    <view class="contanier">
-      <view class="contaniner-top">
-        <view class="box-title">克重</view>
-        <view class="price-box">
-          <view class="price">
-            实时金价
-            <span class="tit">{{ realprice.toFixed(2) }}</span>
-          </view>
-          <view class="equity"
-            >权益 -{{ rightsStore.userBenefits.buy || "0.00" }}</view
-          >
-        </view>
-      </view>
-      <view class="input-box">
-        <input
-          type="text"
-          placeholder="请输入克重"
-          v-model.number="weight"
-          @input="inputHandle"
-        />
-        <view class="g">g</view>
-      </view>
-      <view class="buy-price">
-        <view class="buy-txt">买料价格</view>
-        <view class="buy-num">{{ buyGoldPrice }}</view>
-        <view class="t">元</view>
-      </view>
-
-      <view class="btn-box" @click="submitHandle">
-        <image class="btn" src="/static/images/sb_btn.png"></image>
-        <text class="btn-text">确认</text>
-      </view>
-      <view class="aggregate" @click="aggregate = !aggregate">
-        <image
-          class="choose"
-          :src="
-            aggregate
-              ? '/static/recycle/choose.png'
-              : '/static/recycle/nochoose.png'
-          "
-          mode="scaleToFill"
-        ></image>
-        <view class="aggre">
-          阅读并同意
-          <span class="aggre-text" @click.stop="showAggre">《买金协议》</span>
-        </view>
-      </view>
-      <view class="white"></view>
-    </view>
-    <uni-popup
-      ref="singPopup"
-      type="bottom"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0,0,0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="content"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            aggregate = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-  </view>
-</template>
-
-<script setup>
-import { ref, computed, watch, onMounted } from "vue";
-import { useAppStore } from "@/stores/app";
-import useRealGoldPrice from "@/hooks/useRealGoldPrice";
-import { rechargeGoldAPI } from "@/api/functions";
-import { agreementGetoneApi } from "@/api/user";
-const appStore = useAppStore();
-
-// 响应式数据
-const type = ref("余额");
-const weight = ref("");
-const buyGoldPrice = ref(0);
-
-const aggregate = ref(false);
-const content = ref("");
-const tabsIndex = ref(1);
-
-const selectedGender = ref("gold");
-
-const tabsList = ref([
-  { key: 1, label: "gold", title: "黄金" },
-  { key: 2, label: "platinum", title: "铂金" },
-  { key: 3, label: "silver", title: "白银" },
-]);
-
-// 实时价格处理
-const {
-  realGoldprice, // 黄金实时销售价(基础)
-  realPtprice, // 铂金实时销售价(基础)
-  realAgprice, // 白银实时销售价(基础)
-} = useRealGoldPrice({});
-import { useStoreRights } from "@/stores/rights";
-const rightsStore = useStoreRights();
-// 黄金调整价
-const adjustGoldprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "黄金"
-  );
-  console.log(res);
-  return res;
-});
-
-// 铂金调整价
-const adjustPtprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "铂金"
-  );
-  return res;
-});
-// 白银调整价
-const adjustAgprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "白银"
-  );
-  return res;
-});
-const viprealGoldprice = computed(
-  () =>
-    Number(realGoldprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustGoldprice.value.sellPriceAdjust)
-);
-const viprealPtprice = computed(
-  () =>
-    Number(realPtprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustPtprice.value.sellPriceAdjust)
-);
-const viprealAgprice = computed(
-  () =>
-    Number(realAgprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustAgprice.value.sellPriceAdjust)
-);
-const realprice = computed(() => {
-  if (tabsIndex.value == 1) {
-    return viprealGoldprice.value;
-  }
-  if (tabsIndex.value == 2) {
-    return viprealPtprice.value;
-  }
-  if (tabsIndex.value == 3) {
-    return viprealAgprice.value;
-  }
-});
-
-// 监听器
-watch(realprice, (newData) => {
-  buyGoldPrice.value = (weight.value * realprice.value).toFixed(2);
-});
-// 获取协议
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "buyGold" }).then((res) => {
-    content.value = res.data?.content;
-  });
-}
-// 生命周期钩子 - 替代onLoad
-onMounted(() => {
-  // 页面加载时执行的逻辑]
-  agreementGetoneFn();
-});
-const inputHandle = () => {
-  //   buyGoldPrice.value = vk.myfn.accMulDecimal(this.weight, this.realprice, 2);
-  buyGoldPrice.value = (weight.value * realprice.value).toFixed(2);
-};
-
-// 提交
-const submitHandle = async () => {
-  if (checkInfo()) {
-    uni.showLoading({
-      title: "买料中",
-    });
-    const res = await rechargeGoldAPI({
-      metalType: tabsIndex.value,
-      weight: weight.value,
-    });
-    // console.log(res);
-    if (res.code == 200) {
-      uni.showToast({ title: "买料成功" });
-      setTimeout(() => {
-        uni.navigateTo({
-          url: "/pages/users/vault/index",
-        });
-      }, 1500);
-    }
-    uni.hideLoading();
-  }
-};
-const formatNumber = (num) => {
-  if (isNaN(num)) return "0.00";
-  const parts = num.toString().split(".");
-  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
-  if (parts.length > 1) {
-    return parts[0] + "." + parts[1].padEnd(2, "0").slice(0, 2);
-  }
-  return parts[0] + ".00";
-};
-
-const checkInfo = () => {
-  if (!weight.value) {
-    uni.showToast({
-      title: "请输入克重",
-      duration: 1000,
-      icon: "none",
-    });
-    return false;
-  }
-  if (!aggregate.value) {
-    uni.showToast({
-      title: "请阅读并同意协议",
-      duration: 1000,
-      icon: "none",
-    });
-    return false;
-  }
-  return true;
-};
-// 假设$refs.singPopup在模板中存在
-const singPopup = ref(null);
-const showAggre = () => {
-  singPopup.value.open();
-};
-
-const tabsChange = (item) => {
-  tabsIndex.value = item.key;
-  weight.value = "";
-  buyGoldPrice.value = 0;
-};
-
-const toDecimalP2 = (arg) => {};
-</script>
-
-<style lang="scss" scoped>
-.withdraw {
-  width: 750rpx;
-  height: 100%;
-  // background-image: linear-gradient(180deg, #b7ad94 0%, #fcfcfc 100%);
-  background: $uni-bg-primary !important;
-  display: flex;
-  flex-direction: column;
-  // align-items: center;
-  .balance-box {
-    height: 300rpx;
-    padding-left: 60rpx;
-    color: #000;
-    display: flex;
-    align-items: center;
-    flex-wrap: wrap;
-    width: 100%;
-    box-sizing: border-box;
-
-    .balance-title {
-      width: 100%;
-      font-size: 30rpx;
-      margin-bottom: 10rpx;
-    }
-
-    .balance-rmb {
-      width: 100%;
-      display: flex;
-      width: 100%;
-      font-size: 56rpx;
-
-      .rmb {
-        font-size: 56rpx;
-        margin-left: 10rpx;
-      }
-    }
-  }
-  .tabs {
-    display: flex;
-    height: 80rpx;
-    border-radius: 40rpx;
-    padding: 0 20rpx;
-    color: #000000;
-    font-size: 30rpx;
-
-    .tabs-item {
-      width: 50%;
-      height: 100%;
-      display: flex;
-      justify-content: center;
-      // align-items:;
-      position: relative;
-    }
-
-    .active::after {
-      position: absolute;
-      bottom: -10rpx;
-      left: 50%;
-      transform: translateX(-50%);
-      content: "";
-      z-index: 100;
-      border-style: solid;
-      border-width: 0 28rpx 28rpx 28rpx;
-      border-color: transparent transparent #ffffff transparent;
-      width: 0;
-      height: 0;
-      transform-origin: center top;
-      animation: showTriangle 0.3s ease-out forwards;
-    }
-  }
-
-  .contanier {
-    box-sizing: border-box;
-    padding: 70rpx 70rpx;
-    background-color: #ffffff;
-    border-radius: 40rpx;
-
-    .contaniner-top {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-
-      .price-box {
-        // flex: 3;
-        display: flex;
-        align-items: center;
-        position: relative;
-
-        .price {
-          font-size: 31rpx;
-          color: #000000;
-
-          .tit {
-            color: #d8a235;
-            font-size: 36rpx;
-            margin-left: 10rpx;
-          }
-        }
-
-        .equity {
-          position: absolute;
-          top: -35rpx;
-          right: 0;
-          padding: 2rpx 12rpx;
-          font-size: 16rpx;
-          color: #fff;
-          // background: #cd9933;
-          background: #ffd034;
-          // border-radius: 10rpx;
-          border-top-left-radius: 30rpx;
-          border-bottom-right-radius: 30rpx;
-
-          &::after {
-            position: absolute;
-            bottom: -15rpx;
-            left: 50%;
-            width: 0;
-            height: 0;
-            z-index: 0;
-            transform: translateX(-50%);
-            content: "";
-            // background: red;
-            border-style: solid;
-            border-width: 0 10px 10px 10px;
-            border-color: transparent transparent transparent #ffd034;
-          }
-        }
-      }
-    }
-    .input-box {
-      width: 610rpx;
-      height: 89rpx;
-      background-color: #ededed;
-      border-radius: 10rpx;
-      padding: 0 30rpx;
-      box-sizing: border-box;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      margin: 20rpx 0;
-      font-size: 25rpx;
-      color: #999999;
-
-      input {
-        color: #000000;
-        width: 99%;
-      }
-      .g {
-        font-size: 32rpx;
-        color: #cc9933;
-      }
-    }
-    .buy-price {
-      display: flex;
-      justify-content: center;
-      font-size: 25rpx;
-      color: #000000;
-      align-items: center;
-      .buy-num {
-        // color: #cc9933;
-        color: $txt-color;
-        font-size: 28rpx;
-        margin: 0 5rpx;
-      }
-    }
-    .payment-method {
-      margin-top: 120rpx;
-      .method-box {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        margin: 50rpx 0;
-        .box-left {
-          display: flex;
-          justify-content: center;
-          image {
-            height: 48rpx;
-          }
-          text {
-            margin-left: 15rpx;
-          }
-        }
-      }
-    }
-    .btn-box {
-      height: 100rpx;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      margin-top: 200rpx;
-      width: 100%;
-      box-sizing: border-box;
-      position: relative;
-
-      .btn {
-        height: 70rpx;
-        width: 260rpx;
-      }
-      .btn-text {
-        font-size: 30rpx;
-        color: #000;
-        position: absolute;
-        top: 50%;
-        left: 50%;
-        transform: translate(-50%, -50%);
-      }
-    }
-    .aggregate {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      padding: 10px;
-
-      .aggre {
-        font-size: 14px;
-        margin-left: 10px;
-
-        .aggre-text {
-          color: #cc9933;
-        }
-      }
-
-      .choose {
-        width: 16px;
-        height: 16px;
-      }
-    }
-    .white {
-      height: 100rpx;
-      background-color: #ffffff;
-    }
-    .box-title {
-      height: 50rpx;
-      padding-left: 19rpx;
-      font-size: 31rpx;
-      color: #000000;
-      position: relative;
-      display: flex;
-      align-items: center;
-
-      &::after {
-        position: absolute;
-        bottom: -10rpx;
-        left: 5rpx;
-        top: 23%;
-        transform: translateX(-50%);
-        content: "";
-        background-color: #f8c007;
-        width: 4rpx;
-        height: 28rpx;
-      }
-    }
-  }
-  .signContent {
-    background-color: #f8f8f8;
-    padding: 20px;
-    box-sizing: border-box;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    flex-direction: column;
-    border-radius: 20px 20px 0 0;
-
-    .scroll {
-      background-color: #fff;
-      padding: 4px;
-      height: 300px;
-      overflow-y: hidden;
-      border: 1px solid #dfdfdf;
-    }
-
-    .footer {
-      margin-top: 10px;
-      color: #fff;
-      padding: 4px 20px;
-      border-radius: 20px;
-      background: linear-gradient(to right, #8ed187, #5dd665);
-    }
-  }
-}
-</style>

File diff suppressed because it is too large
+ 0 - 1242
pages/users/vault/index.vue


+ 0 - 887
pages/users/vault/recharge.vue

@@ -1,887 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="content">
-      <!-- 充值相关内容 -->
-      <view style="height: auto">
-        <view class="balance-box">
-          <view>
-            <view class="balance-title">可用余额</view>
-            <view class="balance-rmb">
-              <view style="display: flex; align-items: flex-end">¥</view>
-              <view class="rmb">{{ userInfo.nowMoney }}</view>
-            </view>
-          </view>
-        </view>
-        <view class="tabs">
-          <view
-            class="tabs-item"
-            :class="[tabsIndex === item.key ? 'active' : '']"
-            v-for="item in tabsList"
-            :key="item.key"
-            @click="tabsChange(item)"
-          >
-            {{ item.title }}
-          </view>
-        </view>
-        <view class="box-list" v-if="tabsIndex === 0">
-          <view class="box">
-            <view class="title-tip">自主打款</view>
-            <view class="item">
-              <view class="targe">转</view>
-              <view class="address">
-                <view style="width: 100%">
-                  用户名:{{ rechargeInfo.alipayUsername }}
-                </view>
-                <view>
-                  账&nbsp;&nbsp;&nbsp;户:{{ rechargeInfo.alipayAccount }}
-                </view>
-              </view>
-              <view class="end">
-                <view
-                  class="copy"
-                  @click="copy(`账户:${rechargeInfo.alipayAccount}`)"
-                >
-                  复制
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-        <view class="box-list" v-else>
-          <view class="box">
-            <view class="title-tip">自主打款</view>
-            <view class="item">
-              <view class="targe">转</view>
-              <view
-                class="address"
-                style="display: flex; flex-wrap: wrap; height: 140rpx"
-              >
-                <view>用户名:{{ rechargeInfo.bankCardBank }}</view>
-                <view>卡号:{{ rechargeInfo.bankCardNumber }}</view>
-                <view>开户行:{{ rechargeInfo.bankCardUsername }}</view>
-              </view>
-              <view class="end">
-                <view
-                  class="copy"
-                  @click="
-                    copy(
-                      `用户名:${rechargeInfo.bankCardBank},开户行:${rechargeInfo.bankCardNumber},卡号:${rechargeInfo.bankCardUsername}`
-                    )
-                  "
-                >
-                  复制
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <view style="padding: 0 30px; background-color: #fff; padding-top: 30rpx">
-        <view class="withdraw-body">
-          <view class="title-tip">充值金额</view>
-          <view class="input-money">
-            <view class="rmb">
-              <view style="width: 20px">¥</view>
-            </view>
-            <view style="width: 100%">
-              <input
-                placeholder="请输入充值金额(最低100元起充)"
-                v-model.number="extract"
-                type="digit"
-                class="t-input"
-                @input="onKeyInput"
-              />
-            </view>
-          </view>
-          <view class="info-money">
-            <view v-if="is_lowest">
-              <text class="info-money-num" style="color: #ff1e0f"
-                >最低{{ lowest }}元起充,账户充值{{ extract }}元</text
-              >
-            </view>
-          </view>
-          <view v-if="tabsIndex === 0" style="margin-top: 50rpx">
-            <view class="title-tip">订单号</view>
-            <view class="input-order">
-              <view class="rmb">
-                <view style="width: 20px"></view>
-              </view>
-              <view style="width: 100%">
-                <input
-                  placeholder="请输入订单号"
-                  v-model="order_no"
-                  class="t-input"
-                />
-              </view>
-            </view>
-          </view>
-          <view style="margin-top: 50rpx">
-            <view class="title-tip">转账图片</view>
-            <view style="margin-top: 20px">
-              <view class="upload-box">
-                <up-upload
-                  :fileList="imageList"
-                  uploadIcon="plus"
-                  @afterRead="afterRead"
-                  @delete="deletePic"
-                  name="1"
-                  multiple
-                  :maxCount="1"
-                >
-                  <template #trigger>
-                    <view class="upload-block">
-                      <uni-icons
-                        size="38"
-                        color="#ccc"
-                        type="plusempty"
-                      ></uni-icons>
-                    </view>
-                  </template>
-                </up-upload>
-              </view>
-            </view>
-          </view>
-          <!-- <view :class="'btn-box tx' + (is_post ? '-active' : '')">
-            <view class="btn" @click="handleShowModel">提交申请</view>
-          </view> -->
-          <view class="btn-box" @click="handleShowModel">
-            <image class="btn" src="/static/images/sb_btn.png"></image>
-            <text class="btn-text">提交申请</text>
-          </view>
-          <view class="btn-tip" v-if="tabsIndex === 0">
-            充值提交后无需审核,0秒到账!
-            <span style="color: red">(推荐)</span>
-          </view>
-          <view class="aggregate" @click="aggregate = !aggregate">
-            <image
-              class="choose"
-              :src="
-                aggregate
-                  ? '/static/recycle/choose.png'
-                  : '/static/recycle/nochoose.png'
-              "
-              mode="scaleToFill"
-            ></image>
-            <view class="aggre">
-              阅读并同意
-              <span class="aggre-text" @click="showAggre">《充值协议》</span>
-            </view>
-          </view>
-        </view>
-        <view v-if="tabsIndex === 0" class="process-guidelines">
-          <view v-if="tabsIndex === 0" style="margin: 30rpx 0"
-            >支付宝充值流程指引</view
-          >
-          <image
-            @click="
-              showImage(
-                'https://mp-c7c90a6c-c53b-48dd-bd94-692abc111f89.cdn.bspapp.com/2025/08/07/65570280-62375873-0.png'
-              )
-            "
-            src="https://mp-c7c90a6c-c53b-48dd-bd94-692abc111f89.cdn.bspapp.com/2025/08/07/65570280-62375873-0.png"
-            width="100%"
-            height="100%"
-            mode="aspectFit"
-            class="preview-image"
-          ></image>
-        </view>
-      </view>
-    </view>
-    <uni-popup
-      ref="singPopup"
-      type="bottom"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0,0,0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="content"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            aggregate = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-
-    <!-- 图片预览 -->
-    <!-- <image
-      src="https://mp-c7c90a6c-c53b-48dd-bd94-692abc111f89.cdn.bspapp.com/2025/08/07/65570280-62375873-0.png"
-    ></image> -->
-
-    <!-- 底部占位 -->
-    <view style="width: 100%; height: 100rpx"></view>
-  </view>
-</template>
-
-<script setup>
-import { onLoad } from "@dcloudio/uni-app";
-import { ref, computed, watch } from "vue";
-import { useAppStore } from "@/stores/app";
-import { useImageUpload } from "@/hooks/useImageUpload";
-import { rechargeAlipayAPI, rechargeBankAPI } from "@/api/functions";
-import { agreementGetoneApi } from "@/api/user";
-import { getMiniProgramData } from "@/api/api";
-
-// 1. 初始化图片上传钩子(解构响应式数据和方法)
-const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
-  pid: 12,
-  model: "zfb",
-});
-
-// 2. 获取Pinia Store实例
-const appStore = useAppStore();
-
-// 3. 定义响应式数据(替代Vue2的data选项)
-// 基础类型用ref,复杂类型(对象/数组)也可用ref(Vue3推荐)
-const transferImg = ref([]); // 转账图片
-const agreement = ref("");
-const extract = ref(null); // 充值金额
-const is_lowest = ref(false); // 是否低于最低充值额
-const is_post = ref(false); // 提交按钮是否可用
-const lowest = ref(100); // 最低充值额
-const aggregate = ref(false); // 是否同意协议
-const tabsIndex = ref(0); // 当前选中的标签(支付宝/银行卡)
-const tabsList = ref([
-  { key: 0, title: "支付宝" },
-  { key: 1, title: "银行卡" },
-]); // 标签列表(固定数据,也可不用ref,直接const tabsList = [...])
-const order_no = ref(null); // 订单号
-const showPreview = ref(false); // 是否显示图片预览
-// const ImageUrl = ref([{ id: 1, src: "/static/logo.png" }]); // 预览图片列表
-const previewImageUrl = ref(""); // 预览图片地址
-const userInfo = ref({});
-// 充值账户
-const rechargeInfo = ref({
-  alipayAccount: "",
-  alipayUsername: "",
-  bankCardBank: "",
-  bankCardNumber: "",
-  bankCardUsername: "",
-});
-// tabs切换
-const tabsChange = (item) => {
-  tabsIndex.value = item.key;
-  extract.value = null;
-  order_no.value = null;
-  imageList.value = [];
-};
-// 4. 定义方法(替代Vue2的methods选项)
-// 复制文本方法
-const copy = (item) => {
-  uni.setClipboardData({
-    data: item,
-    success: () => {
-      uni.showToast({
-        title: "复制成功",
-        icon: "success",
-      });
-    },
-    fail: (err) => {
-      uni.showToast({
-        title: "复制失败",
-        icon: "none",
-      });
-      console.error("复制失败:", err);
-    },
-  });
-};
-
-// 输入框输入事件
-const onKeyInput = () => {
-  checkMoney();
-};
-
-// 检查充值金额是否符合要求
-const checkMoney = () => {
-  // 处理null/undefined情况
-  const currentAmount = Number(extract.value);
-
-  if (isNaN(currentAmount)) {
-    is_post.value = false;
-    is_lowest.value = true;
-    return;
-  }
-
-  if (currentAmount >= lowest.value) {
-    is_post.value = true;
-    is_lowest.value = false;
-  } else {
-    is_lowest.value = true;
-    is_post.value = false;
-  }
-};
-
-// 提交申请(模板调用但原代码未实现,补充空函数避免报错)
-const handleShowModel = async () => {
-  // 此处可添加提交前的校验(如是否同意协议、是否上传图片等)
-  // 示例:
-  if (!aggregate.value) {
-    uni.showToast({
-      title: "请先阅读并同意《充值协议》",
-      icon: "none",
-    });
-    return;
-  }
-  if (!extract.value || extract.value < lowest.value) {
-    uni.showToast({
-      title: `请输入不低于${lowest.value}元的充值金额`,
-      icon: "none",
-    });
-    return;
-  }
-  if (!imageList.value.length) {
-    uni.showToast({
-      title: "请上传转账图片",
-      icon: "none",
-    });
-    return;
-  }
-  // 支付宝
-  if (tabsIndex.value == 0) {
-    const res = await rechargeAlipayAPI({
-      orderNo: order_no.value,
-      price: extract.value,
-      rechargeImage: imageList.value.map((v) => v.info.url),
-    });
-    // console.log(res);
-    if (res.code == 200) {
-      uni.showToast({ title: "充值成功!" });
-    }
-  } else {
-    const res = await rechargeBankAPI({
-      price: extract.value,
-      rechargeImage: imageList.value.map((v) => v.info.url),
-    });
-    if (res.code == 200) {
-      uni.showToast({ title: "充值成功!" });
-      setTimeout(() => {
-        uni.navigateTo({
-          url: "/pages/users/vault/index",
-        });
-      });
-    }
-  }
-
-  // 银行卡
-};
-const singPopup = ref(null); // 需在模板中给uni-popup添加ref="singPopup"
-
-const showAggre = () => {
-  singPopup.value?.open();
-};
-
-async function updateWxSettingInfo() {
-  const { data } = await getMiniProgramData();
-  rechargeInfo.value = {
-    alipayAccount: data.alipayAccount || "",
-    alipayUsername: data.alipayUsername || "",
-    bankCardBank: data.bankCardBank || "",
-    bankCardNumber: data.bankCardNumber || "",
-    bankCardUsername: data.bankCardUsername || "",
-  };
-}
-
-// 显示图片预览(模板调用但原代码未实现,补充空函数避免报错)
-const showImage = (url) => {
-  uni.previewImage({
-    current: url, // 当前显示图片的URL
-    urls: [url], // 需要预览的图片URL列表
-    success: () => {},
-    fail: (err) => {
-      console.error("预览图片失败:", err);
-    },
-  });
-};
-// 获取协议
-const content = ref("");
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "recharge_rule" }).then((res) => {
-    content.value = res.data?.content;
-  });
-}
-// 5. 生命周期钩子(uni-app的onLoad,Vue3中直接使用)
-onLoad((options) => {
-  if (appStore?.$wxConfig?.auditModeEnabled) {
-    // uni.reLaunch({
-    //   url: `/pages/index/index`,
-    // });
-    // return;
-  }
-  agreementGetoneFn();
-  updateWxSettingInfo();
-  // 从Pinia Store获取用户信息(注意:Store中的userInfo若为响应式,需确保已加载)
-  userInfo.value = appStore.userInfo;
-
-  // 可选:监听Store中userInfo的变化,实时更新本地userInfo
-  watch(
-    () => appStore.userInfo,
-    (newUserInfo) => {
-      userInfo.value = newUserInfo;
-    },
-    { immediate: true } // 立即执行一次
-  );
-});
-
-// 6. 计算属性(替代Vue2的computed选项)
-// 原代码中computed为空,此处示例如何定义(按需添加)
-const computedExample = computed(() => {
-  // 示例:计算充值金额的格式化显示
-  return extract.value ? `¥${Number(extract.value).toFixed(2)}` : "¥0.00";
-});
-
-// 7. 监听器(替代Vue2的watch选项)
-// 示例:监听extract变化,自动检查金额(也可通过@input触发,二选一)
-watch(
-  extract,
-  (newVal) => {
-    checkMoney();
-  },
-  { immediate: true } // 初始值也触发检查
-);
-
-// 监听tabsIndex变化(按需添加)
-watch(tabsIndex, (newIndex) => {
-  if (newIndex !== 0) {
-    order_no.value = null;
-  }
-});
-</script>
-
-<style lang="scss" scoped>
-page {
-  height: 100%;
-  background-color: #f7f7f7;
-}
-::v-deep .file-list-row {
-  background: #ededed;
-  overflow: hidden;
-  border-radius: 20rpx;
-}
-
-.upload-box {
-  margin-top: 40rpx;
-  .upload-block {
-    width: 160rpx;
-    height: 160rpx;
-    border: 1px solid #ccc;
-    border-radius: 10rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #ccc;
-    font-weight: 700;
-    font-size: 26rpx;
-  }
-}
-.withdraw {
-  height: 100%;
-  // background-color: #f7f7f7;
-  background-image: $uni-bg-primary !important;
-  .content {
-    // background: url('https://mp-ad17e5cd-05c1-4df9-b060-556e25dac130.cdn.bspapp.com/mini/static/20250529221733.jpg');
-    background-size: 100% 500rpx;
-    background-position: top center;
-    background-repeat: no-repeat;
-    box-sizing: border-box;
-    // padding: 0 30rpx;
-  }
-  &-body {
-    background-color: #fff;
-    padding: 50rpx 0;
-    font-size: 14px;
-
-    .input-money,
-    .input-order {
-      box-sizing: border-box;
-    }
-
-    .input-money {
-      display: flex;
-      align-items: center;
-      border-bottom: 1px solid #eaeef1;
-      margin-top: 30rpx;
-      background-color: #ededed;
-      padding: 20rpx;
-      border-radius: 15rpx;
-      width: 100%;
-
-      .rmb {
-        font-size: 38rpx;
-        // text-wrap: nowrap;
-        font-weight: 300;
-        font-family: "Calibri";
-      }
-      .t-input {
-        height: 1.4em;
-        width: 100%;
-        font-size: 26rpx;
-        border: none;
-        position: relative;
-        left: 1%;
-        outline: none;
-      }
-    }
-    .input-order {
-      display: flex;
-      align-items: center;
-      border-bottom: 1px solid #eaeef1;
-      margin-top: 30rpx;
-      background-color: #ededed;
-      padding: 20rpx;
-      border-radius: 15rpx;
-      width: 100%;
-
-      .t-input {
-        height: 1.4em;
-        font-size: 30rpx;
-        border: none;
-        position: relative;
-        left: 0;
-        outline: none;
-      }
-    }
-    .info-money {
-      margin-top: 10px;
-      font-size: 12px;
-      margin-bottom: 20px;
-      &-num {
-        color: #b2b2b2;
-      }
-    }
-    .tx {
-      button {
-        color: #b2b2b2;
-      }
-    }
-    .tx-active {
-      button {
-        color: #fff;
-        background: #c4bba6;
-      }
-    }
-    .aggregate {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      padding: 10px;
-      .aggre {
-        font-size: 14px;
-        margin-left: 10px;
-        .aggre-text {
-          color: #3ab0ff;
-        }
-      }
-    }
-    .choose {
-      width: 16px;
-      height: 16px;
-    }
-  }
-
-  .box {
-    display: flex;
-    flex-direction: column;
-    background-color: #fff;
-    padding: 50rpx;
-    padding-top: 50rpx;
-    width: 100%;
-    padding-bottom: 0;
-    box-sizing: border-box;
-    &-title {
-      font-size: 14px;
-    }
-  }
-
-  .tabs {
-    display: flex;
-    height: 80rpx;
-    border-radius: 40rpx;
-    padding: 0 20rpx;
-    color: #000000;
-    font-size: 30rpx;
-
-    box-sizing: border-box;
-
-    .tabs-item {
-      width: 50%;
-      height: 100%;
-      display: flex;
-      justify-content: center;
-      position: relative;
-      box-sizing: border-box;
-      color: #484848;
-      font-size: 30rpx;
-    }
-    .active {
-      color: #000;
-      font-weight: 500;
-    }
-
-    .active::after {
-      position: absolute;
-      bottom: -10rpx;
-      left: 50%;
-      transform: translateX(-50%);
-      content: "";
-      border-style: solid;
-      border-width: 0 10px 10px 10px;
-      border-color: transparent transparent #ffffff transparent;
-      width: 0;
-      height: 0;
-      opacity: 0;
-      transform-origin: center top;
-      animation: showTriangle 0.3s ease-out forwards;
-    }
-  }
-
-  @keyframes showTriangle {
-    0% {
-      opacity: 0;
-      transform: translateY(-50%) scaleX(0);
-    }
-    100% {
-      opacity: 1;
-      transform: translateY(-50%) scaleX(1);
-    }
-  }
-
-  .box-list {
-    width: 100%;
-    box-sizing: border-box;
-    .title {
-      font-size: 14px;
-    }
-  }
-  .box {
-    display: flex;
-    flex-direction: column;
-    align-items: flex-start;
-    justify-content: center;
-    background-color: #f7f7f7;
-    border-top-left-radius: 40rpx;
-    border-top-right-radius: 40rpx;
-    width: 100%;
-    box-sizing: border-box;
-    padding: 14px;
-    padding-top: 60rpx;
-
-    .head {
-      font-size: 14px;
-    }
-    .item {
-      width: 100%;
-      display: flex;
-      align-items: center;
-      margin-top: 30px;
-      .source {
-        background-color: #f7af74;
-      }
-      .targe {
-        background-color: #cd9933;
-      }
-      .source,
-      .targe {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        color: #fff;
-        width: 35px;
-        height: 35px;
-        border-radius: 50%;
-        margin-right: 20rpx;
-      }
-      .address {
-        height: 100rpx;
-        display: flex;
-        flex-wrap: wrap;
-        align-items: center;
-        flex: 1;
-        font-size: 26rpx;
-        font-family: "微软雅黑";
-        color: #000000;
-      }
-      .write {
-        margin: 0 10px;
-        font-size: 14px;
-        color: #888888;
-      }
-      .end {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        .copy {
-          color: #888888;
-          border-radius: 3px;
-          border: 1px solid #888888;
-          font-size: 24rpx;
-          padding: 6rpx 20rpx;
-          margin-right: 10rpx;
-        }
-      }
-    }
-  }
-
-  /* 图片预览样式 */
-  .image-preview-mask {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background-color: rgba(0, 0, 0, 0.8);
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    z-index: 9999;
-
-    .imgBox {
-      width: 100%;
-      height: 100vh;
-
-      .preview-image {
-        width: 100%;
-        height: 100% !important;
-      }
-    }
-  }
-
-  .process-guidelines {
-    color: rgb(0, 0, 0);
-    font-size: 32rpx;
-    margin-top: 20rpx;
-    margin-bottom: 20rpx;
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: center;
-    border: 1rpx solid #f5f5f5;
-    border-radius: 20rpx;
-    box-shadow: 0 0px 10px 6px #efefef;
-    padding-bottom: 70rpx;
-    box-sizing: border-box;
-  }
-
-  .title-tip {
-    position: relative;
-    padding-left: 20rpx;
-    height: 50rpx;
-    display: flex;
-    align-items: center;
-    font-size: 32rpx;
-    font-family: "黑体";
-    width: 100%;
-    box-sizing: border-box;
-
-    &::before {
-      position: absolute;
-      top: 50%;
-      transform: translatey(-40%);
-      left: 0;
-      content: "";
-      width: 2px;
-      height: 18px;
-      background-color: #f8c007;
-    }
-  }
-
-  .balance-box {
-    height: 300rpx;
-    padding-left: 60rpx;
-    color: #000;
-    display: flex;
-    align-items: center;
-    flex-wrap: wrap;
-    width: 100%;
-    box-sizing: border-box;
-
-    .balance-title {
-      width: 100%;
-      font-size: 30rpx;
-      // font-weight: 500;
-      margin-bottom: 10rpx;
-      // font-family: "微软雅黑";
-    }
-
-    .balance-rmb {
-      width: 100%;
-      display: flex;
-      width: 100%;
-      font-size: 56rpx;
-
-      .rmb {
-        font-size: 56rpx;
-        // font-weight: 500;
-        margin-left: 10rpx;
-      }
-    }
-  }
-
-  .btn-box {
-    height: 100rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-bottom: 40rpx;
-    margin-top: 80rpx;
-    width: 100%;
-    box-sizing: border-box;
-    position: relative;
-
-    .btn {
-      height: 80rpx;
-      width: 380rpx;
-    }
-    .btn-text {
-      font-size: 30rpx;
-      color: #000;
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
-    }
-  }
-
-  .btn-tip {
-    height: 30rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-bottom: 30rpx;
-    color: #808080;
-    width: 100%;
-    box-sizing: border-box;
-  }
-}
-
-.signContent {
-  background-color: #f8f8f8;
-  padding: 20px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-radius: 20px 20px 0 0;
-  .scroll {
-    background-color: #fff;
-    padding: 4px;
-    height: 300px;
-    overflow-y: hidden;
-    border: 1px solid #dfdfdf;
-  }
-  .footer {
-    margin-top: 10px;
-    color: #fff;
-    padding: 4px 20px;
-    border-radius: 20px;
-    background: linear-gradient(to right, #8ed187, #5dd665);
-  }
-}
-</style>

+ 0 - 538
pages/users/vault/rechargeGold.vue

@@ -1,538 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="recharge-header">
-      <view class="title">账户余额</view>
-      <view class="price">
-        <view class="fh">¥</view>
-        <view class="price-fh">{{
-          formatNumber(appStore?.userInfo?.nowMoney) || 0
-        }}</view>
-      </view>
-    </view>
-    <view class="tabs">
-      <view
-        v-for="item in tabsList"
-        :key="item.key"
-        class="tabs-item"
-        :class="[tabsIndex === item.key ? 'active' : '']"
-        @click="tabsChange(item)"
-      >
-        {{ item.title }}
-      </view>
-    </view>
-    <view class="contanier">
-      <view class="contaniner-top">
-        <view class="box-title">克重</view>
-        <view class="price-box">
-          <view class="price">
-            实时金价
-            <span class="tit">{{ realprice.toFixed(2) }}</span>
-          </view>
-          <view class="equity">权益 -{{ rightsStore.userBenefits.buy || 0 }}</view>
-        </view>
-      </view>
-      <view class="input-box">
-        <input
-          type="text"
-          placeholder="请输入克重"
-          v-model.number="weight"
-          @input="inputHandle"
-        />
-        <view class="g">g</view>
-      </view>
-      <view class="buy-price">
-        <view class="buy-txt">买料价格</view>
-        <view class="buy-num">{{ buyGoldPrice }}</view>
-        <view class="t"> 元 </view>
-      </view>
-
-      <view class="btn-box" @click="submitHandle">
-        <view class="btn">确认</view>
-      </view>
-      <view class="aggregate" @click="aggregate = !aggregate">
-        <image
-          class="choose"
-          :src="
-            aggregate
-              ? '/static/recycle/choose.png'
-              : '/static/recycle/nochoose.png'
-          "
-          mode="scaleToFill"
-        ></image>
-        <view class="aggre">
-          阅读并同意
-          <span class="aggre-text" @click.stop="showAggre">《买金协议》</span>
-        </view>
-      </view>
-      <view class="white"></view>
-    </view>
-    <uni-popup
-      ref="singPopup"
-      type="bottom"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0,0,0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="content"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            aggregate = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-  </view>
-</template>
-
-<script setup>
-import { ref, computed, watch, onMounted } from "vue";
-import { useAppStore } from "@/stores/app";
-import useRealGoldPrice from "@/hooks/useRealGoldPrice";
-import { rechargeGoldAPI } from "@/api/functions";
-import { agreementGetoneApi } from "@/api/user";
-const appStore = useAppStore();
-
-// 响应式数据
-const type = ref("余额");
-const weight = ref("");
-const buyGoldPrice = ref(0);
-
-const aggregate = ref(false);
-const content = ref("");
-const tabsIndex = ref(1);
-
-const selectedGender = ref("gold");
-
-const tabsList = ref([
-  { key: 1, label: "gold", title: "黄金" },
-  { key: 2, label: "platinum", title: "铂金" },
-  { key: 3, label: "silver", title: "白银" },
-]);
-
-// 实时价格处理
-const {
-  realGoldprice, // 黄金实时销售价(基础)
-  realPtprice, // 铂金实时销售价(基础)
-  realAgprice, // 白银实时销售价(基础)
-} = useRealGoldPrice({});
-import { useStoreRights } from "@/stores/rights";
-const rightsStore = useStoreRights();
-// 黄金调整价
-const adjustGoldprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "黄金"
-  );
-  return res;
-});
-
-// 铂金调整价
-const adjustPtprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "铂金"
-  );
-  return res;
-});
-// 白银调整价
-const adjustAgprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "白银"
-  );
-  return res;
-});
-const viprealGoldprice = computed(
-  () =>
-    Number(realGoldprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustGoldprice.value.sellPriceAdjust)
-);
-const viprealPtprice = computed(
-  () =>
-    Number(realPtprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustPtprice.value.sellPriceAdjust)
-);
-const viprealAgprice = computed(
-  () =>
-    Number(realAgprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustAgprice.value.sellPriceAdjust)
-);
-const realprice = computed(() => {
-  if (tabsIndex.value == 1) {
-    return viprealGoldprice.value;
-  }
-  if (tabsIndex.value == 2) {
-    return viprealPtprice.value;
-  }
-  if (tabsIndex.value == 3) {
-    return viprealAgprice.value;
-  }
-});
-
-// 监听器
-watch(realprice, (newData) => {
-  buyGoldPrice.value = (weight.value * realprice.value).toFixed(2);
-});
-// 获取协议
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "buyGold" }).then((res) => {
-    content.value = res.data?.content;
-  });
-}
-// 生命周期钩子 - 替代onLoad
-onMounted(() => {
-  // 页面加载时执行的逻辑]
-  agreementGetoneFn();
-});
-const inputHandle = () => {
-  //   buyGoldPrice.value = vk.myfn.accMulDecimal(this.weight, this.realprice, 2);
-  buyGoldPrice.value = (weight.value * realprice.value).toFixed(2);
-};
-
-// 提交
-const submitHandle = async () => {
-  if (checkInfo()) {
-    uni.showLoading({
-      title: "买料中",
-    });
-    const res = await rechargeGoldAPI({
-      metalType: tabsIndex.value,
-      weight: weight.value,
-    });
-    // console.log(res);
-    if (res.code == 200) {
-      uni.showToast({ title: "买料成功" });
-      setTimeout(() => {
-        uni.navigateTo({
-          url: "/pages/users/vault/index",
-        });
-      }, 1500);
-    }
-    uni.hideLoading();
-  }
-};
-const formatNumber = (num) => {
-  if (isNaN(num)) return "0.00";
-  const parts = num.toString().split(".");
-  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
-  if (parts.length > 1) {
-    return parts[0] + "." + parts[1].padEnd(2, "0").slice(0, 2);
-  }
-  return parts[0] + ".00";
-};
-
-const checkInfo = () => {
-  if (!weight.value) {
-    uni.showToast({
-      title: "请输入克重",
-      duration: 1000,
-      icon: "none",
-    });
-    return false;
-  }
-  if (!aggregate.value) {
-    uni.showToast({
-      title: "请阅读并同意协议",
-      duration: 1000,
-      icon: "none",
-    });
-    return false;
-  }
-  return true;
-};
-// 假设$refs.singPopup在模板中存在
-const singPopup = ref(null);
-const showAggre = () => {
-  singPopup.value.open();
-};
-
-const tabsChange = (item) => {
-  tabsIndex.value = item.key;
-  weight.value = "";
-  buyGoldPrice.value = 0;
-};
-
-const toDecimalP2 = (arg) => {};
-</script>
-
-<style lang="scss" scoped>
-.withdraw {
-  width: 750rpx;
-  height: 100%;
-  // background-image: linear-gradient(180deg, #b7ad94 0%, #fcfcfc 100%);
-  background: $uni-bg-primary !important;
-  display: flex;
-  flex-direction: column;
-  // align-items: center;
-  .recharge-header {
-    margin-left: 103rpx;
-    margin-bottom: 50rpx;
-    padding-top: 80rpx;
-
-    .title {
-      font-size: 29rpx;
-      color: #ffffff;
-    }
-    .price {
-      font-size: 56rpx;
-      color: #ffffff;
-      margin-top: 15rpx;
-      display: flex;
-      // height: ;
-      align-items: flex-end;
-
-      .fh {
-        font-size: 36rpx;
-        // color: #cc9933;
-        margin-bottom: 8rpx;
-      }
-      .price-fh {
-        margin-left: 15rpx;
-      }
-    }
-  }
-  .tabs {
-    display: flex;
-    height: 80rpx;
-    border-radius: 40rpx;
-    padding: 0 20rpx;
-    color: #fff;
-    font-size: 32rpx;
-    font-weight: 300;
-    // margin-bottom: 10rpx;
-
-    .tabs-item {
-      width: 50%;
-      height: 100%;
-      display: flex;
-      justify-content: center;
-      // align-items:;
-      position: relative;
-    }
-
-    .active::after {
-      position: absolute;
-      bottom: -10rpx;
-      left: 50%;
-      transform: translateX(-50%);
-      content: "";
-      z-index: 100;
-      border-style: solid;
-      border-width: 0 25rpx 25rpx 25rpx;
-      border-color: transparent transparent #ffffff transparent;
-      width: 0;
-      height: 0;
-      transform-origin: center top;
-      animation: showTriangle 0.3s ease-out forwards;
-    }
-  }
-
-  .contanier {
-    box-sizing: border-box;
-    padding: 70rpx 70rpx;
-    background-color: #ffffff;
-    border-radius: 40rpx;
-
-    .contaniner-top {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-
-      .price-box {
-        // flex: 3;
-        display: flex;
-        align-items: center;
-        position: relative;
-
-        .price {
-          font-size: 31rpx;
-          color: #000000;
-
-          .tit {
-            color: #d8a235;
-            font-size: 36rpx;
-            margin-left: 10rpx;
-          }
-        }
-
-        .equity {
-          position: absolute;
-          top: -35rpx;
-          right: 0;
-          padding: 2rpx 12rpx;
-          font-size: 16rpx;
-          color: #fff;
-          background: #cd9933;
-          // border-radius: 10rpx;
-          border-top-left-radius: 30rpx;
-          border-bottom-right-radius: 30rpx;
-
-          &::after {
-            position: absolute;
-            bottom: -15rpx;
-            left: 50%;
-            width: 0;
-            height: 0;
-            z-index: 0;
-            transform: translateX(-50%);
-            content: "";
-            // background: red;
-            border-style: solid;
-            border-width: 0 10px 10px 10px;
-            border-color: transparent transparent transparent #cd9933;
-          }
-        }
-      }
-    }
-    .input-box {
-      width: 610rpx;
-      height: 89rpx;
-      background-color: #ededed;
-      border-radius: 10rpx;
-      padding: 0 30rpx;
-      box-sizing: border-box;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      margin: 20rpx 0;
-      font-size: 25rpx;
-      color: #999999;
-
-      input {
-        color: #000000;
-        width: 99%;
-      }
-      .g {
-        font-size: 32rpx;
-        color: #cc9933;
-      }
-    }
-    .buy-price {
-      display: flex;
-      justify-content: center;
-      font-size: 25rpx;
-      color: #000000;
-      align-items: center;
-      .buy-num {
-        color: #cc9933;
-        font-size: 28rpx;
-        margin: 0 5rpx;
-      }
-    }
-    .payment-method {
-      margin-top: 120rpx;
-      .method-box {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        margin: 50rpx 0;
-        .box-left {
-          display: flex;
-          justify-content: center;
-          image {
-            height: 48rpx;
-          }
-          text {
-            margin-left: 15rpx;
-          }
-        }
-      }
-    }
-    .btn-box {
-      display: flex;
-      justify-content: center;
-      width: 100%;
-      margin-top: 200rpx;
-      .btn {
-        width: 300rpx;
-        height: 71rpx;
-        background-color: #cc9933;
-        border-radius: 34rpx;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        font-size: 33rpx;
-        color: #ffffff;
-      }
-    }
-    .aggregate {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      padding: 10px;
-
-      .aggre {
-        font-size: 14px;
-        margin-left: 10px;
-
-        .aggre-text {
-          color: #cc9933;
-        }
-      }
-
-      .choose {
-        width: 16px;
-        height: 16px;
-      }
-    }
-    .white {
-      height: 100rpx;
-      background-color: #ffffff;
-    }
-    .box-title {
-      height: 50rpx;
-      padding-left: 19rpx;
-      font-size: 31rpx;
-      color: #000000;
-      position: relative;
-      display: flex;
-      align-items: center;
-
-      &::after {
-        position: absolute;
-        bottom: -10rpx;
-        left: 5rpx;
-        top: 23%;
-        transform: translateX(-50%);
-        content: "";
-        background-color: #cc9933;
-        width: 4rpx;
-        height: 28rpx;
-      }
-    }
-  }
-  .signContent {
-    background-color: #f8f8f8;
-    padding: 20px;
-    box-sizing: border-box;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    flex-direction: column;
-    border-radius: 20px 20px 0 0;
-
-    .scroll {
-      background-color: #fff;
-      padding: 4px;
-      height: 300px;
-      overflow-y: hidden;
-      border: 1px solid #dfdfdf;
-    }
-
-    .footer {
-      margin-top: 10px;
-      color: #fff;
-      padding: 4px 20px;
-      border-radius: 20px;
-      background: linear-gradient(to right, #8ed187, #5dd665);
-    }
-  }
-}
-</style>

+ 0 - 862
pages/users/vault/rechargeRmb.vue

@@ -1,862 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="content">
-      <!-- 充值相关内容 -->
-      <view style="height: auto">
-        <view class="balance-box">
-          <view>
-            <view class="balance-title">可用余额</view>
-            <view class="balance-rmb">
-              <view style="display: flex; align-items: flex-end">¥</view>
-              <view class="rmb">{{ userInfo?.nowMoney || 0 }}</view>
-            </view>
-          </view>
-        </view>
-        <view class="tabs">
-          <view
-            class="tabs-item"
-            :class="[tabsIndex === item.key ? 'active' : '']"
-            v-for="item in tabsList"
-            :key="item.key"
-            @click="tabsChange(item)"
-          >
-            {{ item.title }}
-          </view>
-        </view>
-        <view class="box-list" v-if="tabsIndex === 0">
-          <view class="box">
-            <view class="title-tip">自主打款</view>
-            <view class="item">
-              <view class="targe">转</view>
-              <view class="address">
-                <view>用户名:深圳市水贝珠宝贸易有限公司</view>
-                <view>账&nbsp;&nbsp;&nbsp;户:1223606060@qq.com</view>
-              </view>
-              <view class="end">
-                <view class="copy" @click="copy('账户:1223606060@qq.com')"
-                  >复制</view
-                >
-              </view>
-            </view>
-          </view>
-        </view>
-        <view class="box-list" v-else>
-          <view class="box">
-            <view class="title-tip">自主打款</view>
-            <view class="item">
-              <view class="targe">转</view>
-              <view
-                class="address"
-                style="display: flex; flex-wrap: wrap; height: 140rpx"
-              >
-                <view>用户名:深圳市水贝珠宝贸易有限公司</view>
-                <view>卡号:756279419662</view>
-                <view>开户行:中国银行深圳水贝支行</view>
-              </view>
-              <view class="end">
-                <view
-                  class="copy"
-                  @click="
-                    copy(
-                      '用户名:深圳市水贝珠宝贸易有限公司,开户行:中国银行深圳水贝支行,卡号:756279419662'
-                    )
-                  "
-                >
-                  复制
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <view style="padding: 0 30px; background-color: #fff; padding-top: 30rpx">
-        <view class="withdraw-body">
-          <view class="title-tip">金额</view>
-          <view class="input-money">
-            <view class="rmb">
-              <view style="width: 20px">¥</view>
-            </view>
-            <view style="width: 100%">
-              <input
-                placeholder="请输入充值金额(最低100元起充)"
-                v-model.number="extract"
-                type="digit"
-                class="t-input"
-                @input="onKeyInput"
-              />
-            </view>
-          </view>
-          <view class="info-money">
-            <view v-if="is_lowest">
-              <text class="info-money-num" style="color: #ff1e0f"
-                >最低{{ lowest }}元起充,账户充值{{ extract }}元</text
-              >
-            </view>
-          </view>
-          <view v-if="tabsIndex === 0" style="margin-top: 50rpx">
-            <view class="title-tip">订单号</view>
-            <view class="input-order">
-              <view class="rmb">
-                <view style="width: 20px"></view>
-              </view>
-              <view style="width: 100%">
-                <input
-                  placeholder="请输入订单号"
-                  v-model="order_no"
-                  class="t-input"
-                />
-              </view>
-            </view>
-          </view>
-          <view style="margin-top: 50rpx">
-            <view class="title-tip">转账图片</view>
-            <view style="margin-top: 20px">
-              <view class="upload-box">
-                <up-upload
-                  :fileList="imageList"
-                  uploadIcon="plus"
-                  @afterRead="afterRead"
-                  @delete="deletePic"
-                  name="1"
-                  multiple
-                  :maxCount="1"
-                >
-                  <template #trigger>
-                    <view class="upload-block">
-                      <uni-icons
-                        size="38"
-                        color="#ccc"
-                        type="plusempty"
-                      ></uni-icons>
-                    </view>
-                  </template>
-                </up-upload>
-              </view>
-            </view>
-          </view>
-          <view :class="'btn-box tx' + (is_post ? '-active' : '')">
-            <view class="btn" @click="handleShowModel">提交申请</view>
-          </view>
-          <view class="btn-tip" v-if="tabsIndex === 0">
-            提交后无需审核,0秒到账!
-            <span style="color: red">(推荐)</span>
-          </view>
-          <view class="aggregate" @click="aggregate = !aggregate">
-            <image
-              class="choose"
-              :src="
-                aggregate
-                  ? '/static/recycle/choose.png'
-                  : '/static/recycle/nochoose.png'
-              "
-              mode="scaleToFill"
-            ></image>
-            <view class="aggre">
-              阅读并同意
-              <span class="aggre-text" @click="showAggre">《充值协议》</span>
-            </view>
-          </view>
-        </view>
-        <view
-          v-if="tabsIndex === 0 && !appStore?.$wxConfig?.auditModeEnabled"
-          class="process-guidelines"
-        >
-          <view v-if="tabsIndex === 0" style="margin: 30rpx 0"
-            >支付宝充值流程指引</view
-          >
-          <up-parse
-            :content="process"
-            @imgtap="handlePreviewImage"
-          ></up-parse>
-        </view>
-      </view>
-    </view>
-    <uni-popup
-      ref="singPopup"
-      type="bottom"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0,0,0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="content"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            aggregate = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-
-    <!-- 图片预览 -->
-    <!-- <image
-      src="https://mp-c7c90a6c-c53b-48dd-bd94-692abc111f89.cdn.bspapp.com/2025/08/07/65570280-62375873-0.png"
-    ></image> -->
-
-    <!-- 底部占位 -->
-    <view style="width: 100%; height: 100rpx"></view>
-  </view>
-</template>
-
-<script setup>
-import { onLoad } from "@dcloudio/uni-app";
-import { ref, computed, watch } from "vue";
-import { useAppStore } from "@/stores/app";
-import { useImageUpload } from "@/hooks/useImageUpload";
-import { rechargeAlipayAPI, rechargeBankAPI } from "@/api/functions";
-import { agreementGetoneApi } from "@/api/user";
-// 引入uni-app API(无需额外import,直接使用uni.xxx即可)
-
-// 1. 初始化图片上传钩子(解构响应式数据和方法)
-const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
-  pid: 12,
-  model: "zfb",
-});
-
-// 2. 获取Pinia Store实例
-const appStore = useAppStore();
-
-// 3. 定义响应式数据(替代Vue2的data选项)
-// 基础类型用ref,复杂类型(对象/数组)也可用ref(Vue3推荐)
-const transferImg = ref([]); // 转账图片
-const agreement = ref("");
-const extract = ref(null); // 充值金额
-const is_lowest = ref(false); // 是否低于最低充值额
-const is_post = ref(false); // 提交按钮是否可用
-const lowest = ref(100); // 最低充值额
-const aggregate = ref(false); // 是否同意协议
-const tabsIndex = ref(0); // 当前选中的标签(支付宝/银行卡)
-const tabsList = ref([
-  { key: 0, title: "" },
-  { key: 1, title: "" },
-]); // 标签列表(固定数据,也可不用ref,直接const tabsList = [...])
-const order_no = ref(null); // 订单号
-const showPreview = ref(false); // 是否显示图片预览
-// const ImageUrl = ref([{ id: 1, src: "/static/logo.png" }]); // 预览图片列表
-const previewImageUrl = ref(""); // 预览图片地址
-const userInfo = ref({}); // 用户信息(从Store获取)
-// tabs切换
-const tabsChange = (item) => {
-  if(appStore?.$wxConfig?.auditModeEnabled) return
-  tabsIndex.value = item.key;
-  extract.value = null;
-  order_no.value = null;
-  imageList.value = [];
-};
-// 4. 定义方法(替代Vue2的methods选项)
-// 复制文本方法
-const copy = (item) => {
-  uni.setClipboardData({
-    data: item,
-    success: () => {
-      uni.showToast({
-        title: "复制成功",
-        icon: "success",
-      });
-    },
-    fail: (err) => {
-      uni.showToast({
-        title: "复制失败",
-        icon: "none",
-      });
-      console.error("复制失败:", err);
-    },
-  });
-};
-
-// 输入框输入事件
-const onKeyInput = () => {
-  checkMoney();
-};
-
-// 检查充值金额是否符合要求
-const checkMoney = () => {
-  // 处理null/undefined情况
-  const currentAmount = Number(extract.value);
-
-  if (isNaN(currentAmount)) {
-    is_post.value = false;
-    is_lowest.value = true;
-    return;
-  }
-
-  if (currentAmount >= lowest.value) {
-    is_post.value = true;
-    is_lowest.value = false;
-  } else {
-    is_lowest.value = true;
-    is_post.value = false;
-  }
-};
-
-// 提交申请(模板调用但原代码未实现,补充空函数避免报错)
-const handleShowModel = async () => {
-  // 此处可添加提交前的校验(如是否同意协议、是否上传图片等)
-  // 示例:
-  if (!aggregate.value) {
-    uni.showToast({
-      title: "请先阅读并同意《充值协议》",
-      icon: "none",
-    });
-    return;
-  }
-  if (!extract.value || extract.value < lowest.value) {
-    uni.showToast({
-      title: `请输入不低于${lowest.value}元的充值金额`,
-      icon: "none",
-    });
-    return;
-  }
-  // 支付宝
-  if (tabsIndex.value == 0) {
-    const res = await rechargeAlipayAPI({
-      orderNo: order_no.value,
-      price: extract.value,
-      rechargeImage: imageList.value.map((v) => v.info.url),
-    });
-    // console.log(res);
-    if (res.code == 200) {
-      uni.showToast({ title: "提交成功!" });
-    }
-  } else {
-    const res = await rechargeBankAPI({
-      price: extract.value,
-      rechargeImage: imageList.value.map((v) => v.info.url),
-    });
-    if (res.code == 200) {
-      uni.showToast({ title: "提交成功!" });
-      setTimeout(() => {
-        uni.navigateTo({
-          url: "/pages/users/vault/index",
-        });
-      });
-    }
-  }
-
-  // 银行卡
-};
-const singPopup = ref(null); // 需在模板中给uni-popup添加ref="singPopup"
-
-const showAggre = () => {
-  singPopup.value?.open();
-};
-
-// 显示图片预览(模板调用但原代码未实现,补充空函数避免报错)
-const showImage = (url) => {
-  uni.previewImage({
-    current: url, // 当前显示图片的URL
-    urls: [url], // 需要预览的图片URL列表
-    success: () => {},
-    fail: (err) => {
-      console.error("预览图片失败:", err);
-    },
-  });
-};
-
-// 处理图片预览
-const handlePreviewImage = (e) => {
-  console.log("e", e);
-
-  const { src, urls } = e.detail;
-  // 使用 uni-app 自带的图片预览 API
-  uni.previewImage({
-    current: src, // 当前点击的图片地址
-    urls: urls, // 所有图片的数组(用于左右滑动预览)
-  });
-};
-
-// 获取协议
-const process = ref("");
-const content = ref("123");
-const agreementGetoneFn = () => {
-  agreementGetoneApi({ name: "recharge_text" }).then((res) => {
-    process.value = res.data?.content;
-  });
-  agreementGetoneApi({ name: "recharge_rule" }).then((res) => {
-    content.value = res.data?.content;
-  });
-};
-
-// 5. 生命周期钩子(uni-app的onLoad,Vue3中直接使用)
-onLoad((options) => {
-  agreementGetoneFn();
-  if (appStore?.$wxConfig?.auditModeEnabled) {
-    console.log("执行");
-  } else {
-    console.log("执行", appStore?.$wxConfig?.auditModeEnabled);
-    tabsList.value = [
-      { key: 0, title: "支付宝" },
-      { key: 1, title: "银行卡" },
-    ];
-  }
-  console.log("页面加载参数:", options);
-  // 从Pinia Store获取用户信息(注意:Store中的userInfo若为响应式,需确保已加载)
-  userInfo.value = appStore.userInfo;
-  console.log("当前用户信息:", userInfo.value);
-
-  // 可选:监听Store中userInfo的变化,实时更新本地userInfo
-  watch(
-    () => appStore.userInfo,
-    (newUserInfo) => {
-      userInfo.value = newUserInfo;
-    },
-    { immediate: true } // 立即执行一次
-  );
-});
-
-// 6. 计算属性(替代Vue2的computed选项)
-// 原代码中computed为空,此处示例如何定义(按需添加)
-const computedExample = computed(() => {
-  // 示例:计算充值金额的格式化显示
-  return extract.value ? `¥${Number(extract.value).toFixed(2)}` : "¥0.00";
-});
-
-// 7. 监听器(替代Vue2的watch选项)
-// 示例:监听extract变化,自动检查金额(也可通过@input触发,二选一)
-watch(
-  extract,
-  (newVal) => {
-    checkMoney();
-  },
-  { immediate: true } // 初始值也触发检查
-);
-
-// 监听tabsIndex变化(按需添加)
-watch(tabsIndex, (newIndex) => {
-  console.log("切换到标签:", newIndex === 0 ? "支付宝" : "银行卡");
-  // 切换标签时的额外逻辑(如清空订单号等)
-  if (newIndex !== 0) {
-    order_no.value = null;
-  }
-});
-</script>
-
-<style lang="scss" scoped>
-page {
-  height: 100%;
-  background-color: #f7f7f7;
-}
-::v-deep .file-list-row {
-  background: #ededed;
-  overflow: hidden;
-  border-radius: 20rpx;
-}
-
-.upload-box {
-  margin-top: 40rpx;
-  .upload-block {
-    width: 160rpx;
-    height: 160rpx;
-    border: 1px solid #ccc;
-    border-radius: 10rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #ccc;
-    font-weight: 700;
-    font-size: 26rpx;
-  }
-}
-.withdraw {
-  height: 100%;
-  // background-color: #f7f7f7;
-  background-image: $uni-bg-primary !important;
-  .content {
-    // background: url('https://mp-ad17e5cd-05c1-4df9-b060-556e25dac130.cdn.bspapp.com/mini/static/20250529221733.jpg');
-    background-size: 100% 500rpx;
-    background-position: top center;
-    background-repeat: no-repeat;
-    box-sizing: border-box;
-    // padding: 0 30rpx;
-  }
-  &-body {
-    background-color: #fff;
-    padding: 50rpx 0;
-    font-size: 14px;
-
-    .input-money,
-    .input-order {
-      box-sizing: border-box;
-    }
-
-    .input-money {
-      display: flex;
-      align-items: center;
-      border-bottom: 1px solid #eaeef1;
-      margin-top: 30rpx;
-      background-color: #ededed;
-      padding: 20rpx;
-      border-radius: 15rpx;
-      width: 100%;
-
-      .rmb {
-        font-size: 38rpx;
-        // text-wrap: nowrap;
-        font-weight: 300;
-        font-family: "Calibri";
-      }
-      .t-input {
-        height: 1.4em;
-        width: 100%;
-        font-size: 26rpx;
-        border: none;
-        position: relative;
-        left: 1%;
-        outline: none;
-      }
-    }
-    .input-order {
-      display: flex;
-      align-items: center;
-      border-bottom: 1px solid #eaeef1;
-      margin-top: 30rpx;
-      background-color: #ededed;
-      padding: 20rpx;
-      border-radius: 15rpx;
-      width: 100%;
-
-      .t-input {
-        height: 1.4em;
-        font-size: 30rpx;
-        border: none;
-        position: relative;
-        left: 0;
-        outline: none;
-      }
-    }
-    .info-money {
-      margin-top: 10px;
-      font-size: 12px;
-      margin-bottom: 20px;
-      &-num {
-        color: #b2b2b2;
-      }
-    }
-    .tx {
-      button {
-        color: #b2b2b2;
-      }
-    }
-    .tx-active {
-      button {
-        color: #fff;
-        background: #c4bba6;
-      }
-    }
-    .aggregate {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      padding: 10px;
-      .aggre {
-        font-size: 14px;
-        margin-left: 10px;
-        .aggre-text {
-          color: #3ab0ff;
-        }
-      }
-    }
-    .choose {
-      width: 16px;
-      height: 16px;
-    }
-  }
-
-  .box {
-    display: flex;
-    flex-direction: column;
-    background-color: #fff;
-    padding: 50rpx;
-    padding-top: 50rpx;
-    width: 100%;
-    padding-bottom: 0;
-    box-sizing: border-box;
-    &-title {
-      font-size: 14px;
-    }
-  }
-
-  .tabs {
-    display: flex;
-    height: 80rpx;
-    border-radius: 40rpx;
-    padding: 0 20rpx;
-    color: #fff;
-    font-size: 38rpx;
-    font-weight: 300;
-    box-sizing: border-box;
-
-    .tabs-item {
-      width: 50%;
-      height: 100%;
-      display: flex;
-      justify-content: center;
-      position: relative;
-      box-sizing: border-box;
-    }
-
-    .active::after {
-      position: absolute;
-      bottom: -10rpx;
-      left: 50%;
-      transform: translateX(-50%);
-      content: "";
-      border-style: solid;
-      border-width: 0 10px 10px 10px;
-      border-color: transparent transparent #ffffff transparent;
-      width: 0;
-      height: 0;
-      opacity: 0;
-      transform-origin: center top;
-      animation: showTriangle 0.3s ease-out forwards;
-    }
-  }
-
-  @keyframes showTriangle {
-    0% {
-      opacity: 0;
-      transform: translateY(-50%) scaleX(0);
-    }
-    100% {
-      opacity: 1;
-      transform: translateY(-50%) scaleX(1);
-    }
-  }
-
-  .box-list {
-    width: 100%;
-    box-sizing: border-box;
-    .title {
-      font-size: 14px;
-    }
-  }
-  .box {
-    display: flex;
-    flex-direction: column;
-    align-items: flex-start;
-    justify-content: center;
-    background-color: #f7f7f7;
-    border-top-left-radius: 60rpx;
-    border-top-right-radius: 60rpx;
-    width: 100%;
-    box-sizing: border-box;
-    padding: 14px;
-    padding-top: 60rpx;
-
-    .head {
-      font-size: 14px;
-    }
-    .item {
-      width: 100%;
-      display: flex;
-      align-items: center;
-      margin-top: 30px;
-      .source {
-        background-color: #f7af74;
-      }
-      .targe {
-        background-color: #cd9933;
-      }
-      .source,
-      .targe {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        color: #fff;
-        width: 35px;
-        height: 35px;
-        border-radius: 50%;
-        margin-right: 20rpx;
-      }
-      .address {
-        height: 100rpx;
-        display: flex;
-        flex-wrap: wrap;
-        align-items: center;
-        flex: 1;
-        font-size: 26rpx;
-        font-family: "微软雅黑";
-        color: #000000;
-      }
-      .write {
-        margin: 0 10px;
-        font-size: 14px;
-        color: #888888;
-      }
-      .end {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        .copy {
-          color: #888888;
-          border-radius: 3px;
-          border: 1px solid #888888;
-          font-size: 24rpx;
-          padding: 6rpx 20rpx;
-          margin-right: 10rpx;
-        }
-      }
-    }
-  }
-
-  /* 图片预览样式 */
-  .image-preview-mask {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background-color: rgba(0, 0, 0, 0.8);
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    z-index: 9999;
-
-    .imgBox {
-      width: 100%;
-      height: 100vh;
-
-      .preview-image {
-        width: 100%;
-        height: 100% !important;
-      }
-    }
-  }
-
-  .process-guidelines {
-    color: rgb(0, 0, 0);
-    font-size: 32rpx;
-    margin-top: 20rpx;
-    margin-bottom: 20rpx;
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: center;
-    border: 1rpx solid #f5f5f5;
-    border-radius: 20rpx;
-    box-shadow: 0 0px 10px 6px #efefef;
-    padding-bottom: 70rpx;
-    box-sizing: border-box;
-  }
-
-  .title-tip {
-    position: relative;
-    padding-left: 20rpx;
-    height: 50rpx;
-    display: flex;
-    align-items: center;
-    font-size: 32rpx;
-    font-family: "黑体";
-    width: 100%;
-    box-sizing: border-box;
-
-    &::before {
-      position: absolute;
-      top: 50%;
-      transform: translatey(-40%);
-      left: 0;
-      content: "";
-      width: 2px;
-      height: 18px;
-      background-color: #daa520;
-    }
-  }
-
-  .balance-box {
-    height: 300rpx;
-    padding-left: 60rpx;
-    color: #fff;
-    display: flex;
-    align-items: center;
-    flex-wrap: wrap;
-    width: 100%;
-    box-sizing: border-box;
-
-    .balance-title {
-      width: 100%;
-      font-size: 36rpx;
-      font-weight: 300;
-      margin-bottom: 10rpx;
-      font-family: "微软雅黑";
-    }
-
-    .balance-rmb {
-      width: 100%;
-      display: flex;
-      width: 100%;
-      font-size: 38rpx;
-      font-weight: 300;
-
-      .rmb {
-        font-size: 60rpx;
-        font-weight: 500;
-        margin-left: 10rpx;
-      }
-    }
-  }
-
-  .btn-box {
-    height: 100rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-bottom: 40rpx;
-    margin-top: 80rpx;
-    width: 100%;
-    box-sizing: border-box;
-
-    .btn {
-      height: 75rpx;
-      width: 400rpx;
-      background-color: #cd9933;
-      color: #fff;
-      border-radius: 50rpx;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      font-size: 30rpx;
-    }
-  }
-
-  .btn-tip {
-    height: 30rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-bottom: 30rpx;
-    color: #808080;
-    width: 100%;
-    box-sizing: border-box;
-  }
-}
-
-.signContent {
-  background-color: #f8f8f8;
-  padding: 20px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-radius: 20px 20px 0 0;
-  .scroll {
-    background-color: #fff;
-    padding: 4px;
-    height: 300px;
-    overflow-y: hidden;
-    border: 1px solid #dfdfdf;
-  }
-  .footer {
-    margin-top: 10px;
-    color: #fff;
-    padding: 4px 20px;
-    border-radius: 20px;
-    background: linear-gradient(to right, #8ed187, #5dd665);
-  }
-}
-</style>

+ 0 - 603
pages/users/vault/recycle/order_fill.vue

@@ -1,603 +0,0 @@
-<template>
-  <view class="sell-postend">
-    <view class="sell-postend-banner"></view>
-    <view class="sell-postend-content">
-      <view class="withdraw-express">
-        <view class="header">
-          <view class="header-left">
-            <view class="line"></view>
-            <view class="title">自主邮寄</view>
-          </view>
-          <view class="header-right">
-            <uni-countdown
-              :minute="countdown"
-              color="#f8c007"
-              @timeup="timeupHandle"
-            ></uni-countdown>
-          </view>
-        </view>
-        <view class="item">
-          <view class="targe">收</view>
-          <view class="address">
-            <view
-              >{{ appStore.$wxConfig.mailerName }} :{{
-                appStore.$wxConfig.mailerPhone
-              }}</view
-            >
-            <view class="address-detail" style="margin-top: 4px">
-              <text class="receive-address">地址:</text>
-              {{ appStore.$wxConfig.mailingAddress }}
-            </view>
-          </view>
-          <view class="end">
-            <view class="copy" @click="copy">复制</view>
-          </view>
-        </view>
-      </view>
-      <view class="upload-box">
-        <view class="header">
-          <view class="header-left">
-            <view class="line"></view>
-            <view class="title">上传实物图</view>
-          </view>
-        </view>
-        <view class="upload-tips"
-          >上传实物图、包裹图,如有购买凭证(发票、单据) 可以一起上传</view
-        >
-        <view class="upload-img">
-          <view class="upload-box-contanier">
-            <up-upload
-              :fileList="imageList"
-              uploadIcon="plus"
-              @afterRead="afterRead"
-              @delete="deletePic"
-              name="1"
-              multiple
-              :maxCount="4"
-            >
-              <template #trigger>
-                <view class="upload-block">
-                  <uni-icons
-                    size="38"
-                    color="#ccc"
-                    type="plusempty"
-                  ></uni-icons>
-                </view>
-              </template>
-            </up-upload>
-          </view>
-        </view>
-        <view class="pz-tips">示例图(产品实物,凭证图片)</view>
-        <view class="pz-img">
-          <image
-            v-for="(item, index) in filelist"
-            :key="index"
-            :src="item"
-          ></image>
-        </view>
-      </view>
-      <view class="postend-info-box">
-        <view class="header">
-          <view class="header-left">
-            <view class="line"></view>
-            <view class="title">您的信息</view>
-          </view>
-        </view>
-        <view class="postend-info">
-          <view class="info-item">
-            <view class="info-item-left">快递单号</view>
-            <view class="info-item-right">
-              <input
-                type="text"
-                v-model="expressNum"
-                placeholder="请输入快递单号"
-              />
-              <text class="iconfont icon-iconfontscan" @click="scanCode"></text>
-            </view>
-          </view>
-          <view class="info-agree" @click="showAggre">
-            <up-checkbox-group @change="checkboxChange" v-model="isCheck">
-              <up-checkbox activeColor="#e9c279" label="确认协议"></up-checkbox>
-            </up-checkbox-group>
-
-            <span style="color: #b5aa90; font-size: 16px">《回收协议》</span>
-          </view>
-        </view>
-      </view>
-      <view class="recyle-price">
-        <view class="recyle-desc">预估回收价</view>
-        <view class="recyle-price-num">¥{{ orderInfo.totalMoney }}</view>
-      </view>
-      <view class="btn-box">
-        <!-- <view class="postend-cbtn" @click="cancelOrder">取消订单</view> -->
-        <view class="postend-btn" @click="submitOrder">
-          <image class="btn" src="/static/images/btn-button.png"></image>
-          <text class="btn-text">立即回收</text>
-        </view>
-      </view>
-      <view class="white"></view>
-    </view>
-    <uni-popup
-      ref="singPopup"
-      type="bottom"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0,0,0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="content"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            isCheck = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-  </view>
-</template>
-
-<script setup>
-import { ref, onMounted, computed, onUnmounted } from "vue";
-import { useImageUpload } from "@/hooks/useImageUpload";
-import { recycleCancelAPI, recyclUpdateAPI } from "@/api/functions";
-import { onLoad } from "@dcloudio/uni-app";
-import { agreementGetoneApi } from "@/api/user";
-import { useAppStore } from "@/stores/app";
-const appStore = useAppStore();
-
-// 1. 初始化图片上传钩子
-const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
-  pid: 14,
-  model: "recyle",
-});
-console.log(imageList.value);
-
-// 2. 响应式数据
-const pic = ref([]);
-const expressNum = ref("");
-const singPopup = ref(null);
-const isCheck = ref(false);
-const content = ref("");
-const filelist = ref([
-  "https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/example/example1.png",
-  "https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/example/example2.png",
-  "https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/example/example3.png",
-  "https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/example/example4.png",
-]);
-const reqData = ref({}); // 假设从路由参数或其他地方获取
-const orderInfo = ref({});
-const countdown = ref(999);
-// 3. 生命周期
-onLoad((options) => {
-  if (options.order) {
-    countdown.value = getTimeDiff(JSON.parse(options.order).expirationTime);
-    orderInfo.value = JSON.parse(options.order);
-  }
-});
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "recyle" }).then((res) => {
-    content.value = res.data?.content;
-  });
-}
-const checkboxChange = (n) => {
-  isCheck.value = true;
-};
-
-const showAggre = () => {
-  singPopup.value?.open();
-  agreementGetoneFn();
-};
-// 4. 方法
-// 扫描快递单号
-const scanCode = () => {
-  uni.scanCode({
-    success: (res) => {
-      console.log(res);
-      expressNum.value = res.result;
-    },
-    fail: (err) => {
-      uni.showToast({ title: "扫码失败,请重试", icon: "none" });
-    },
-  });
-};
-
-// 复制收件人信息
-const copy = () => {
-  uni.setClipboardData({
-    data: `${appStore.$wxConfig.mailerName}:${appStore.$wxConfig.mailerPhone} 地址: ${appStore.$wxConfig.mailingAddress}`,
-    success() {
-      uni.showToast({ title: "复制成功", icon: "success" });
-    },
-    fail: (err) => {
-      uni.showToast({
-        title: "复制失败",
-        icon: "none",
-      });
-      console.error("复制失败:", err);
-    },
-  });
-};
-
-// 处理图片上传成功
-const success = (result) => {
-  pic.value.push(result.url);
-};
-
-// 提交订单
-const submitOrder = async () => {
-  if (!isCheck.value) {
-    uni.showToast({ title: "请阅读并同意回收协议", icon: "none" });
-    return;
-  }
-
-  if (imageList.value.length === 0) {
-    uni.showToast({ title: "请上传实物图", icon: "none" });
-    return;
-  }
-
-  if (!expressNum.value.trim()) {
-    uni.showToast({ title: "请填写快递单号", icon: "none" });
-    return;
-  }
-  try {
-    uni.showLoading({
-      title: "下单中",
-    });
-    // `实际项目中调用接口`
-    const res = await recyclUpdateAPI({
-      expressNo: expressNum.value,
-      images: imageList.value.map((v) => v.info.url),
-      orderNo: orderInfo.value.orderNo,
-    });
-
-    setTimeout(() => {
-      uni.redirectTo({
-        url: "/pages/users/vault/recycle/recyle_order",
-      });
-    }, 0);
-    uni.hideLoading();
-  } catch (err) {
-    uni.showToast({
-      title: err?.msg || "下单失败,请稍后重试",
-      icon: "none",
-    });
-    setTimeout(() => {
-      uni.redirectTo({
-        url: "/pages/users/vault/recycle/recyle_order",
-      });
-    }, 1000);
-  }
-};
-
-// 取消订单
-const cancelOrder = async () => {
-  try {
-    const res = await recycleCancelAPI({ orderNo: orderInfo.value.orderNo });
-  } catch (err) {
-    console.error("取消订单失败:", err);
-  }
-};
-
-// 订单过期处理
-const timeupHandle = () => {
-  uni.showToast({
-    title: "订单已过期",
-    duration: 1000,
-    icon: "none",
-  });
-
-  // 取消订单
-  cancelOrder();
-
-  setTimeout(() => {
-    uni.reLaunch({
-      url: "/pages/users/vault/recycle/recyle_order",
-    });
-  }, 1000);
-};
-
-// 计算时间差(分钟)
-const getTimeDiff = (targetTimeStr) => {
-  if (!targetTimeStr) return 0;
-
-  const targetTime = new Date(targetTimeStr).getTime();
-  const currentTime = Date.now();
-  const diffMs = targetTime - currentTime;
-  const diffMinutes = diffMs / 60000;
-
-  return diffMinutes > 0 ? diffMinutes : 0;
-};
-</script>
-
-<style scoped lang="scss">
-.signContent {
-  background-color: #f8f8f8;
-  padding: 20px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-radius: 20px 20px 0 0;
-  .scroll {
-    background-color: #fff;
-    padding: 4px;
-    height: 300px;
-    overflow-y: hidden;
-    border: 1px solid #dfdfdf;
-  }
-  .footer {
-    margin-top: 10px;
-    color: #fff;
-    padding: 4px 20px;
-    border-radius: 20px;
-    background: linear-gradient(to right, #8ed187, #5dd665);
-  }
-}
-.icon-iconfontscan {
-  font-size: 20px;
-  color: #f8c007;
-}
-.upload-box-contanier {
-  margin-top: 40rpx;
-  .upload-block {
-    width: 160rpx;
-    height: 160rpx;
-    border: 1px solid #ccc;
-    border-radius: 10rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #ccc;
-    font-weight: 700;
-    font-size: 26rpx;
-  }
-}
-.sell-postend {
-  height: auto;
-  padding: 10rpx 30rpx;
-  position: relative;
-
-  .sell-postend-banner {
-    position: absolute;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 50vh;
-    z-index: -1;
-    // background-image: linear-gradient(360deg, #ffffff 0%, #e8c279 100%);
-    background: $uni-bg-primary;
-  }
-
-  .sell-postend-content {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-
-    .withdraw-express {
-      width: 682rpx;
-      height: 306rpx;
-      background-color: #ffffff;
-      box-shadow: 0rpx 3rpx 13rpx 0rpx rgba(0, 0, 0, 0.13);
-      border-radius: 20rpx;
-      display: flex;
-      flex-direction: column;
-      align-items: flex-start;
-      justify-content: center;
-      box-sizing: border-box;
-      padding: 28rpx;
-      margin-top: 30rpx;
-
-      .item {
-        display: flex;
-        align-items: center;
-        margin-top: 15px;
-
-        .targe {
-          display: flex;
-          justify-content: center;
-          align-items: center;
-          color: #fff;
-          width: 35px;
-          height: 35px;
-          border-radius: 50%;
-          background-color: #f8c007;
-        }
-
-        .address {
-          width: 425rpx;
-          margin: 0 10px;
-          font-size: 28rpx;
-
-          .receive-address {
-            letter-spacing: 9px;
-            line-height: 2;
-          }
-        }
-
-        .end {
-          display: flex;
-          justify-content: center;
-          align-items: center;
-
-          .copy {
-            color: #888888;
-            border-radius: 3px;
-            border: 1px solid #888888;
-            font-size: 24rpx;
-            padding: 0 23rpx;
-          }
-        }
-      }
-    }
-    .upload-box {
-      width: 682rpx;
-      height: auto;
-      background-color: #ffffff;
-      box-shadow: 0rpx 3rpx 13rpx 0rpx rgba(0, 0, 0, 0.13);
-      border-radius: 20rpx;
-      box-sizing: border-box;
-      margin-top: 25rpx;
-      padding: 40rpx 40rpx;
-      .upload-tips {
-        font-size: 26rpx;
-        color: #000000;
-        margin: 30rpx 0;
-      }
-      .upload-img {
-        margin: 30rpx 0;
-      }
-      .pz-tips {
-        text-align: center;
-        font-size: 24rpx;
-        color: #7c7c7c;
-        margin: 40rpx 0;
-      }
-      .pz-img {
-        display: flex;
-        justify-content: space-between;
-        flex-wrap: wrap;
-        margin: 30rpx 0;
-        image {
-          width: 138rpx;
-          height: 138rpx;
-          background-color: #f3f3f3;
-          border-radius: 10rpx;
-          margin: 15rpx 0;
-        }
-      }
-    }
-    .postend-info-box {
-      padding: 40rpx 40rpx;
-      margin-top: 25rpx;
-      width: 682rpx;
-      // height: 527rpx;
-      background-color: #ffffff;
-      box-shadow: 0rpx 3rpx 13rpx 0rpx rgba(0, 0, 0, 0.13);
-      border-radius: 20rpx;
-      box-sizing: border-box;
-      .postend-info {
-        margin-top: 30rpx;
-        .info-item {
-          display: flex;
-          align-items: center;
-          margin: 25rpx 0;
-          .info-item-left {
-            font-size: 26rpx;
-            color: #000000;
-          }
-
-          .info-item-right {
-            margin-left: 15rpx;
-            width: 470rpx;
-            height: 77rpx;
-            background-color: #f3f3f3;
-            border-radius: 10rpx;
-            display: flex;
-            // justify-content: space-around;
-            align-items: center;
-            input {
-              width: 86%;
-              font-size: 26rpx;
-              color: #000;
-              padding-left: 15rpx;
-            }
-          }
-        }
-        .info-agree {
-          display: flex;
-          justify-content: center;
-          margin-top: 25rpx;
-          align-items: center;
-        }
-      }
-    }
-    .recyle-price {
-      display: flex;
-      justify-content: center;
-      font-size: 26rpx;
-      color: #000000;
-      margin: 30rpx 0;
-      .recyle-price-num {
-        // color: #7c7c7c;
-        color: $txt-color;
-        margin-left: 15rpx;
-      }
-    }
-    .btn-box {
-      display: flex;
-      justify-content: center;
-      .postend-btn {
-        // width: 330rpx;
-        width: 267rpx;
-
-        height: 71rpx;
-        position: relative;
-        margin-top: 30rpx;
-        .btn {
-          width: 100%;
-          height: 100%;
-        }
-        .btn-text {
-          position: absolute;
-          top: 50%;
-          left: 50%;
-          transform: translate(-50%, -50%);
-          color: #000;
-          font-size: 26rpx;
-        }
-      }
-      .postend-cbtn {
-        margin-right: 30rpx;
-        // width: 330rpx;
-        padding: 0rpx 60rpx;
-        height: 71rpx;
-        background: #cecece;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        color: #636363;
-        border-radius: 30rpx;
-        margin-top: 30rpx;
-      }
-    }
-    .white {
-      height: 100rpx;
-    }
-    .header {
-      width: 100%;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      .header-left {
-        display: flex;
-        align-items: center;
-        .line {
-          width: 4rpx;
-          height: 28rpx;
-          background-color: #cc9933;
-        }
-        .title {
-          margin-left: 5rpx;
-          font-weight: bold;
-        }
-        .tips {
-          font-size: 26rpx;
-          color: #7c7c7c;
-        }
-      }
-      .header-right {
-        font-size: 26rpx;
-        color: #7c7c7c;
-      }
-    }
-  }
-}
-</style>

+ 0 - 416
pages/users/vault/recycle/recyle_order.vue

@@ -1,416 +0,0 @@
-<template>
-  <view class="list-page">
-    <view class="tabs-box">
-      <up-tabs :list="list" @click="tabsChange" lineColor="#f8c20f"></up-tabs>
-    </view>
-    <view v-if="orderList.length === 0" class="empty">
-      <image
-        style="width: 60%"
-        src="https://mp-ad17e5cd-05c1-4df9-b060-556e25dac130.cdn.bspapp.com/mini/common/empty.png"
-        mode="widthFix"
-      ></image>
-      <text>暂无订单~</text>
-    </view>
-    <view v-else class="inner">
-      <view
-        v-for="(item, index) in orderList"
-        :key="index"
-        class="block"
-        @click="nativeTo(item)"
-      >
-        <view class="header">
-          <view class="title">订单号:{{ item.orderNo }}</view>
-          <view class="tag" :class="['status' + item.status]">
-            {{ getOrderType(item.status) }}
-          </view>
-        </view>
-        <view class="detail">
-          <image
-            @click="previewImage(item.imageList)"
-            style="width: 50px; height: 50px; border-radius: 6px"
-            :src="item.imageList[0] || emptyImg"
-            mode="scaleToFill"
-          ></image>
-          <view class="info">
-            <view>{{ item.metalTypeDesc }}</view>
-            <view class="right">
-              <view>
-                金价:
-                <span class="weight">{{ item.goldPricePerGram }}/g</span>
-              </view>
-              <view>
-                自估重量:
-                <span class="weight">{{ item.estimatedWeight }}克</span>
-              </view>
-            </view>
-          </view>
-        </view>
-        <view class="end">
-          <view class="desc">
-            <view class="">下单时间:{{ item.createTime }}</view>
-            <uni-countdown
-              v-if="item.status == 1"
-              :minute="item.countdown || 0"
-              color="#ff0000"
-              @timeup="timeupHandle(item)"
-            ></uni-countdown>
-          </view>
-        </view>
-        <view v-if="item.status == 1" class="footer"
-          >*请尽快邮寄,倒计时结束后未寄出系统将自动取消订单。</view
-        >
-      </view>
-    </view>
-    <!-- 下拉加载必须代码块 -->
-    <!-- <tm-loadding v-if="loading" style="padding-bottom: 15px"></tm-loadding>
-    <tm-loadding
-      v-if="!loading && !hasMore"
-      success
-      icon="icon-times-circle-fill"
-      label="没有更多啦"
-      color="mymain"
-      style="padding-bottom: 15px"
-    ></tm-loadding> -->
-  </view>
-</template>
-
-<script setup>
-import { ref, computed, onMounted } from "vue";
-import { recycleListAPI } from "@/api/functions";
-import { useAppStore } from "@/stores/app";
-import {
-  onLoad,
-  onPullDownRefresh,
-  onShow,
-  onReachBottom,
-} from "@dcloudio/uni-app";
-const appStore = useAppStore();
-// 定义数据
-const list = ref([
-  { name: "全部", status: "" },
-  { name: "待寄出", status: 1 },
-  { name: "待检测", status: 3 },
-  { name: "待确认", status: 4 },
-  { name: "已完成", status: 7 },
-]);
-
-const orderList = ref([]);
-const orderAll = ref([]);
-const emptyImg = ref(
-  "https://mp-ad17e5cd-05c1-4df9-b060-556e25dac130.cdn.bspapp.com/mini/recycle/example/example1.png"
-);
-
-// 计算属性
-const pageTop = computed(() => {
-  // return vk.getVuex("$app.totalBarHeight");
-  return 0; // 占位,实际项目中替换为正确的顶部高度计算
-});
-const total = ref(0);
-const hasMore = ref(true);
-const loading = ref(false);
-const params = ref({
-  limit: 10,
-  page: 1,
-  status: "",
-  userId: appStore.userInfo.userId,
-});
-// 初始化
-const init = async (isRefresh = false) => {
-  if (loading.value) return;
-  loading.value = true;
-  uni.showLoading({
-    title: "加载中",
-  });
-  try {
-    // 模拟接口调用
-    const res = await recycleListAPI(params.value);
-    console.log(res);
-
-    const newList = res.data.list?.map((item) => {
-      return {
-        ...item,
-        countdown: getTimeDiff(item.expirationTime),
-        imageList: item.images ? JSON.parse(item.images) : [],
-      };
-    });
-    if (isRefresh) {
-      orderList.value = newList;
-    } else {
-      if (params.value.page === 1) {
-        orderList.value = newList;
-      } else {
-        orderList.value = [...orderList.value, ...newList];
-      }
-    }
-    total.value = res.data.total;
-    hasMore.value = orderList.value.length > total.value;
-    uni.hideLoading();
-  } catch (error) {
-    console.error("获取订单列表失败:", error);
-    uni.showToast({
-      title: "加载失败",
-      icon: "none",
-    });
-  } finally {
-    loading.value = false;
-    // 停止下拉刷新动画
-    if (isRefresh) {
-      uni.stopPullDownRefresh();
-    }
-  }
-};
-
-// 计算目标时间与当前时间的差值(返回分钟数)
-const getTimeDiff = (targetTimeStr) => {
-  const targetTime = new Date(targetTimeStr).getTime();
-  const currentTime = Date.now();
-  const diffMs = targetTime - currentTime;
-  const diffMinutes = diffMs / 60000;
-  return diffMinutes > 0 ? diffMinutes : 0;
-};
-// 时间到结束
-const timeupHandle = (item) => {
-  item.status = 0;
-};
-
-// 标签页切换
-const tabsChange = (item) => {
-  params.value.status = item.status;
-  params.value.page = 1;
-  init();
-};
-
-// 跳转到详情页
-const nativeTo = (item) => {
-  console.log(item);
-  if (item.status == 1) {
-    uni.navigateTo({
-      url: `/pages/users/vault/recycle/order_fill?order=${JSON.stringify(
-        item
-      )}`,
-      // url: "/pages/users/vault/recycle/report",
-    });
-  } else if (item.status == 4 || item.status == 7) {
-    uni.navigateTo({
-      url: `/pages/users/vault/recycle/report?orderInfo=${encodeURIComponent(
-        JSON.stringify(item)
-      )}`,
-    });
-  }
-};
-
-// 计算总重量
-const totalWeight = (order) => {
-  let totalWeight = 0;
-  for (const key in order.cart) {
-    if (Object.hasOwnProperty.call(order.cart, key)) {
-      const item = order.cart[key];
-      totalWeight += Number(item.weight) || 0;
-    }
-  }
-  return totalWeight.toFixed(2);
-};
-
-// 获取商品类别
-const getCate = (cate) => {
-  switch (cate) {
-    case "au":
-      return "黄金";
-    case "ag":
-      return "白银";
-    case "pt":
-      return "铂金";
-    case "kau":
-      return "K金";
-    default:
-      return "其他";
-  }
-};
-
-// 获取订单状态文本
-const getOrderType = (status) => {
-  switch (status) {
-    case 0:
-      return "已取消";
-    case 1:
-      return "待寄出";
-    case 2:
-      return "等待签收";
-    case 3:
-      return "等待检测";
-    case 4:
-      return "确认报告";
-    case 5:
-      return "确认总价";
-    case 6:
-      return "正在打款";
-    case 7:
-      return "交易完成";
-    default:
-      return "未知状态";
-  }
-};
-
-// 生命周期钩子
-onShow(() => {
-  params.value.page = 1;
-  init();
-});
-
-// 下拉刷新
-onPullDownRefresh(() => {});
-
-// 上拉加载更多
-onReachBottom(() => {
-  // 如果没有更多数据或正在加载中,则不执行
-  if (!hasMore.value || loading.value) return;
-
-  // 增加页码
-  params.value.page++;
-  // 加载下一页数据
-  init();
-});
-const previewImage = (urls) => {
-  console.log(urls[0]);
-
-  uni.previewImage({
-    current: urls[0], // 当前显示图片的URL
-    urls: urls, // 需要预览的图片URL列表
-    success: () => {},
-    fail: (err) => {
-      console.error("预览图片失败:", err);
-    },
-  });
-};
-</script>
-
-<style>
-.empty {
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  color: #ffffff;
-}
-page {
-  height: 100%;
-  background-color: #f8f8f8;
-}
-</style>
-
-<style scoped lang="scss">
-.list-page {
-  background: $uni-bg-primary !important;
-  min-height: 100vh;
-}
-
-.tabs-box {
-  width: 100%;
-  height: 75rpx;
-  // background: #ffffff;
-  box-sizing: border-box;
-  ::v-deep .u-tabs__wrapper__nav__item {
-    padding: 0 37rpx;
-  }
-}
-.tabs {
-  z-index: 100;
-  position: sticky;
-}
-.inner {
-  padding: 10px;
-  .footer {
-    border-radius: 5px;
-    border: 0 0 10px 20px;
-    color: #707070;
-    font-size: 12px;
-    padding: 10px;
-    background-color: rgb(252, 247, 230);
-  }
-}
-.block {
-  margin-bottom: 10px;
-  padding-top: 10px;
-  border-radius: 5px;
-  background-color: #fff;
-  border: 1px solid #cecece;
-  .header {
-    padding: 0 10px;
-    position: relative;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    padding-bottom: 10px;
-    border-bottom: 1px solid #eee;
-    .tag {
-      font-size: 12px;
-      padding: 2px 5px;
-      border-radius: 4px;
-      color: #ff0800;
-      background-color: #ffcece;
-      &.status-1 {
-        color: #555;
-        background-color: #eeeeee;
-      }
-      &.status1 {
-        color: #ff9900;
-        background-color: #ffeccf;
-      }
-      &.status2 {
-        color: #d6006b;
-        background-color: #fdd3e9;
-      }
-      &.status3 {
-        color: #9900ff;
-        background-color: #e2b7ff;
-      }
-      &.status4,
-      &.status5 {
-        color: rgb(48, 24, 136);
-        background-color: #bbb0fa;
-      }
-      &.status6 {
-        color: #3dac27;
-        background-color: #c8ffb7;
-      }
-    }
-    .title {
-      font-size: 14px;
-    }
-  }
-
-  .detail {
-    display: flex;
-    padding: 10px 13px;
-    .info {
-      flex: 1;
-      width: 100%;
-      font-size: 14px;
-      margin-left: 10px;
-      color: #999;
-
-      .right {
-        min-width: 120px;
-        // display: flex;
-        // justify-content: space-between;
-        .weight {
-          // width: 100%;
-          color: #daa520;
-        }
-      }
-    }
-  }
-  .end {
-    padding: 10px 10px;
-    color: #999;
-    font-size: 14px;
-
-    .desc {
-      margin-bottom: 6px;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-    }
-  }
-}
-</style>

+ 0 - 398
pages/users/vault/recycle/report.vue

@@ -1,398 +0,0 @@
-<template>
-  <view class="">
-    <view class="banner">
-      <view class="step-box">
-        <up-steps :current="orderStatus" activeColor="#b5aa90">
-          <up-steps-item
-            :title="item.name"
-            v-for="item in stepData"
-            :key="item.name"
-          >
-          </up-steps-item>
-        </up-steps>
-      </view>
-
-      <view class="block">
-        <view class="check">
-          <view class="header">
-            <span class="title">合后检测确认单</span>
-          </view>
-          <view class="desc"
-            >根据双方认可的检测内容及要求进行认定,为客户合后检测认定结果如下:</view
-          >
-          <view class="table">
-            <view class="title">客户寄送品</view>
-            <view class="tab_header">
-              <up-row>
-                <up-col :span="2">
-                  <view class="col">类型</view>
-                </up-col>
-                <up-col :span="2">
-                  <view class="col">来样重</view>
-                </up-col>
-                <up-col :span="2.5">
-                  <view class="col">实际重</view>
-                </up-col>
-
-                <up-col :span="2.5">
-                  <view class="col">成色</view>
-                </up-col>
-                <up-col :span="3">
-                  <view class="col">存入克重</view>
-                </up-col>
-              </up-row>
-            </view>
-            <view class="tab_content">
-              <view>
-                <up-row v-for="item in detectionDetails" :key="item.id">
-                  <up-col :span="2">
-                    <view class="col">{{ getCate(item.type) }}</view>
-                  </up-col>
-                  <up-col :span="2">
-                    <view class="col">{{ item.userEstimatedWeight }}g</view>
-                  </up-col>
-                  <up-col :span="2.5">
-                    <view class="col">{{ item.discountedWeight }}g</view>
-                  </up-col>
-                  <up-col :span="2.5">
-                    <view class="col">{{ item.purity }}%</view>
-                  </up-col>
-                  <up-col :span="3">
-                    <view class="col"
-                      >{{
-                        item.unloadingWeight > 0
-                          ? item.unloadingWeight
-                          : "0.00" || "0.00"
-                      }}g</view
-                    >
-                  </up-col>
-                </up-row>
-              </view>
-            </view>
-          </view>
-          <view class="end">
-            <view class="end-bttom">
-              <span class="total">
-                总计:
-                <span class="price"
-                  >{{ detectionReport.totalDiscountedWeight }}g</span
-                >
-                回收价:
-                <span class="price">¥{{ detectionReport.totalPrice }}</span>
-              </span>
-            </view>
-            <view
-              class="end-bttom"
-              style="margin-top: 10rpx"
-              v-if="detectionReport.totalDeductedDeposit"
-            >
-              <span class="total">
-                扣除保证金:
-                <span class="price"
-                  >¥{{ detectionReport.totalDeductedDeposit }}</span
-                >
-              </span>
-            </view>
-            <view class="end-bttom" style="margin-top: 10rpx">
-              <span class="total">
-                快递费用:
-                <span class="price">¥{{ deliveryCosts }}</span>
-              </span>
-            </view>
-            <view class="extra"
-              >即:客户对{{
-                detectionReport.inspectionTime
-              }}合后检测重量和回收价无异议</view
-            >
-            <view class="sign">
-              <span>检测人:{{ detectionReport.nikeName || "系统" }}</span>
-            </view>
-            <view class="time">
-              {{ detectionReport.inspectionTime }}
-            </view>
-          </view>
-          <view style="font-size: 14px; padding: 10px">
-            <span style="font-size: 16px; font-weight: 700">注:</span>
-            <span>折算公式:兑料重量 = 折足重量 = 来料熔后重量 * 折足成色</span>
-          </view>
-        </view>
-      </view>
-      <view class="block">
-        <view class="check">
-          <view class="header">
-            <span class="title">检测图片</span>
-          </view>
-          <view class="checlImage">
-            <cl-upload
-              v-model="detectionImages"
-              :add="false"
-              :remove="false"
-            ></cl-upload>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view style="height: 70px"></view>
-    <view class="footer" v-if="orderStatus == 4">
-      <view class="btn" @click="next()">确认报告</view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { onMounted, ref } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import { recyclDetectionReportAPI } from "@/api/functions";
-const stepData = ref([
-  {
-    name: "待填写",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待邮寄",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待签收",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待检测",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待确认",
-    isNow: 1,
-    type: 0,
-  },
-
-  {
-    name: "待打款",
-    isNow: 0,
-    type: 0,
-  },
-  {
-    name: "完成",
-    isNow: 0,
-    type: 0,
-  },
-]);
-// 注意:onLoad是uni-app的生命周期,如果是纯Vue3,应使用onMounted
-
-// 替代Vue2的methods中的方法
-const getCate = (cate) => {
-  console.log(cate);
-
-  switch (cate) {
-    case 1:
-      return "黄金";
-    case 3:
-      return "白银";
-    case 2:
-      return "铂金";
-    case 4:
-      return "K金";
-  }
-};
-// 检测信息-成色类型等
-const detectionDetails = ref([]);
-// 检测详情
-const detectionReport = ref({});
-// 检测图片
-const detectionImages = ref([]);
-// 订单号
-const orderNo = ref("");
-// 订单状态
-const orderStatus = ref(4);
-// 快递费用
-const deliveryCosts = ref(0);
-onLoad((options) => {
-  if (options.orderInfo) {
-    // 先解码再解析
-    const orderInfoStr = decodeURIComponent(options.orderInfo);
-    const res = JSON.parse(orderInfoStr);
-    detectionDetails.value = res.detectionDetails;
-
-    detectionReport.value = res.detectionReport;
-    detectionImages.value = JSON.parse(res.detectionReport.detectionImages);
-    orderNo.value = res.id;
-    orderStatus.value = res.status;
-    deliveryCosts.value = res.deliveryCosts;
-  }
-});
-// 确认报告
-const next = async () => {
-  uni.showLoading({
-    title: "确认中",
-  });
-  const res = await recyclDetectionReportAPI(orderNo.value);
-  uni.hideLoading();
-  setTimeout(() => {
-    uni.redirectTo({
-      url: "/pages/users/vault/recycle/recyle_order",
-    });
-  }, 1000);
-};
-</script>
-
-<style scoped lang="scss">
-.banner {
-  padding: 10px 15px;
-  background: $uni-bg-primary; /* fallback for old browsers */
-
-  .step-box {
-    margin: 30rpx 0;
-    width: 100%;
-    background: #fff;
-    height: 150rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    border-radius: 4px;
-
-    &::v-deep .u-text__value {
-      font-size: 24rpx !important;
-    }
-  }
-}
-
-.block {
-  margin-bottom: 10px;
-
-  .check {
-    background-color: #fff;
-    border-radius: 4px;
-    padding-top: 10px;
-    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-  }
-  .header {
-    font-size: 14px;
-    font-weight: 700;
-    padding-left: 10px;
-    margin-left: 10px;
-    position: relative;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    &::before {
-      position: absolute; /*绝对定位*/
-      top: 50%; /*Y轴方向偏移自身高度的50%*/
-      transform: translatey(-40%); /*Y轴方向偏移微调*/
-      left: 0px; /*紧靠容器左边缘*/
-      content: ""; /*伪元素需要有内容才能显示*/
-      width: 2px; /*伪元素宽度*/
-      height: 18px; /*伪元素高度*/
-      background-color: #daa520; /*伪元素颜色*/
-    }
-    .title {
-      font-size: 18px;
-    }
-  }
-  .desc {
-    padding: 8px 10px;
-    color: #888;
-    font-size: 14px;
-  }
-}
-.table {
-  padding: 14px 10px;
-  .title {
-    text-align: center;
-    padding: 4px 0;
-    color: #fff;
-    font-weight: 700;
-    font-size: 20rpx;
-    width: 100%;
-    background-color: #b5aa90;
-  }
-  .tab_header {
-    border-left: 1px solid #b5aa90;
-    font-size: 18px;
-    background-color: #fff;
-    .col {
-      padding: 12px 0;
-      line-height: 19px;
-      font-size: 22rpx;
-    }
-  }
-  .tab_content {
-    border-left: 1px solid #b5aa90;
-    font-size: 16px;
-    background-color: #fff;
-    .col {
-      padding: 12px 0;
-      line-height: 19px;
-      font-size: 22rpx;
-    }
-  }
-  .tab_header .col,
-  .tab_content .col {
-    border-bottom: 1px solid #b5aa90;
-    border-right: 1px solid #b5aa90;
-    text-align: center;
-    font-size: 22rpx;
-  }
-  .symbol-name {
-    font-family: Microsoft YaHei, Arial, Helvetica, sans-serif;
-    font-size: 20px;
-    color: #ffbf24;
-  }
-}
-.end {
-  width: 100%;
-  display: inline-block;
-  text-align: right;
-  .end-bttom {
-    color: #888;
-    .total {
-      font-size: 16px;
-    }
-    .price {
-      margin-right: 10px;
-      color: #ffa034;
-    }
-  }
-  .extra {
-    font-size: 14px;
-    margin-top: 15px;
-    color: #888;
-    margin-right: 10px;
-  }
-  .sign {
-    margin: 10px;
-  }
-  .time {
-    padding: 10px;
-  }
-}
-
-.checlImage {
-  padding: 10px;
-}
-.footer {
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  position: fixed;
-  width: 100%;
-  border-radius: 8px 8px 0 0;
-  background-color: #fff;
-  bottom: 0;
-  height: 60px;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  .btn {
-    color: #fff;
-    font-weight: 700;
-    margin: 0 15px;
-    border-radius: 10px;
-    width: 100px;
-    padding: 10px;
-    text-align: center;
-    background-color: #cc9933;
-  }
-}
-</style>

+ 0 - 0
pages/users/vault/saveGoldAgreement.vue


+ 0 - 671
pages/users/vault/save_gold.vue

@@ -1,671 +0,0 @@
-<template>
-  <view class="deposit-page">
-    <view class="top-tabs-container">
-      <view
-        class="tab-item"
-        :class="{ active: activeTab === 'mail' }"
-        @click="activeTab = 'mail'"
-      >
-        邮寄存金
-      </view>
-      <!-- <view
-        class="tab-item"
-        :class="{ active: activeTab === 'warehouse' }"
-        @click="activeTab = 'warehouse'"
-      >
-        无物流存金
-      </view> -->
-    </view>
-
-    <view class="content-body" v-if="activeTab === 'mail'">
-      <view class="card-section">
-        <view class="section-title">自主邮寄</view>
-        <view class="address-box">
-          <view class="icon-location">收</view>
-          <view class="address-info">
-            <view class="info-line"
-              >{{ appStore.$wxConfig.mailerName || "回收部" }} |
-              {{ contact.phone }}</view
-            >
-            <view class="info-line">地址 | {{ contact.address }}</view>
-          </view>
-          <view class="copy-btn" @click="copyAddress">复制</view>
-        </view>
-      </view>
-
-      <view class="card-section">
-        <view class="section-title">快递单号</view>
-        <view class="input-row">
-          <up-input
-            type="text"
-            v-model="formData.trackingNumber"
-            placeholder="请输入正确的快递单号"
-            placeholder-class="placeholder"
-            border="none"
-          />
-          <image class="icon-scan" src="/static/images/scan-icon.png" />
-        </view>
-      </view>
-
-      <view class="card-section">
-        <view class="section-title">快递图片</view>
-        <view class="upload-box">
-          <up-upload
-            :fileList="imageList"
-            @afterRead="afterRead"
-            @delete="deletePic"
-            name="1"
-            multiple
-            :maxCount="1"
-          >
-            <template #trigger>
-              <view class="upload-block">
-                <uni-icons size="38" color="#ccc" type="plusempty"></uni-icons>
-              </view>
-            </template>
-          </up-upload>
-        </view>
-      </view>
-
-      <view class="card-section">
-        <!-- <template  v-for="metal in metalInputs" > -->
-        <view class="input-row with-arrow">
-          <text class="input-label">{{ metalTypeText }}克重</text>
-          <up-input
-            type="digit"
-            v-model="formData.weight"
-            placeholder="请输入"
-            placeholder-class="placeholder"
-            class="text-right"
-            border="none"
-          />
-          <text class="arrow">g</text>
-        </view>
-        <!-- </template> -->
-      </view>
-
-      <view class="submit-section">
-        <button class="submit-btn" @click="handleSubmit">立即提交</button>
-        <!-- 协议选择 -->
-        <view
-          class="agreement-section"
-          style="display: flex; align-items: center"
-        >
-          <up-checkbox
-            v-model:checked="agreedToTerms"
-            shape="square"
-            activeColor="#e9c279"
-            usedAlone
-            :customStyle="{ marginRight: '12rpx' }"
-          >
-            <template #label>
-              <text class="agreement-text"> 阅读并同意 </text>
-            </template>
-          </up-checkbox>
-          <view class="agreement-link" @click="showAgreement"
-            >《存金协议》</view
-          >
-        </view>
-      </view>
-      <!-- 协议弹窗 -->
-      <up-popup
-        :show="showAgreementPopup"
-        mode="center"
-        border-radius="20"
-        width="80%"
-        height="60%"
-      >
-        <view class="popup-content">
-          <view class="popup-header"></view>
-          <scroll-view scroll-y scroll-left="50" class="popup-body">
-            <view class="agreement-content">
-              <Aggrement />
-            </view>
-          </scroll-view>
-          <view class="popup-footer">
-            <!-- <button class="popup-btn" @click="closeAgreement">
-              我已详细知悉
-            </button> -->
-            <up-button
-              class="popup-btn"
-              text="我已详细知悉"
-              @click="closeAgreement"
-            ></up-button>
-          </view>
-        </view>
-      </up-popup>
-
-      <view class="info-image-section">
-        <view class="item-image">
-          <!-- <image
-            style="width: 100%"
-            mode="widthFix"
-            src="/static//images/formula.png"
-          /> -->
-        </view>
-        <view class="tip-box">
-          <view class="title">温馨提示</view>
-          <view class="tip-content"
-            >※寄出快递前,客户留底打包视频及快递单号,以便工作人员签收快递核验※</view
-          >
-        </view>
-        <view class="item-image">
-          <!-- <image
-            style="width: 100%"
-            mode="widthFix"
-            src="/static/images/gold_table.png"
-          /> -->
-        </view>
-        <view class="text-section">
-          <view class="paragraph"
-            >1、下午三点前收到寄回包裹当天处理,三点之后统一隔天处理(48小时内打款)</view
-          >
-          <view class="paragraph"
-            >2、如有塑料膜,珐琅、烤漆,镶嵌等辅料,熔烧会产生损耗,按实际熔烧后成色、克重回收;</view
-          >
-          <view class="paragraph"
-            >3、任意时间可提交订单,客服在线时间为早10点~晚8点;</view
-          >
-          <view class="paragraph"
-            >4、如用户担心货品运输风险,建议您保价邮寄。(更多咨询请联系在线客服);</view
-          >
-        </view>
-        <view class="item-image qr_code">
-          <!-- <image
-            style="width: 100%"
-            mode="widthFix"
-            src="/static/images/tpy_qr_code.jpg"
-          /> -->
-        </view>
-        <view class="text-section">
-          <view class="paragraph"
-            >5、黄金到账时间:通常情况下,在线上平台确认金重后,黄金会实时存入用户贵金属账户中;</view
-          >
-          <view class="paragraph">6、线上存金,需选择自主邮寄;</view>
-          <view class="paragraph"
-            >7、足金,K金一定要分开装袋,如熔完后出现因足金K金未分开而造成的成色不足,则需客户自己承担。</view
-          >
-        </view>
-        <view class="alert-text">
-          <view class="paragraph">注:周日休息,请错开时间!</view>
-          <view class="paragraph"
-            >客服热线:19925434991 客服微信:19925434991</view
-          >
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { ref, reactive, computed } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import { useAppStore } from "@/stores/app";
-import { useImageUpload } from "@/hooks/useImageUpload";
-import Aggrement from "./aggrement.vue";
-import { liveExchange } from "@/api/vault";
-import { useToast } from "@/hooks/useToast";
-
-// 当前激活的Tab
-const activeTab = ref("mail");
-const { Toast } = useToast();
-
-const appStore = useAppStore();
-
-const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
-  pid: 9,
-  model: "gold",
-});
-
-// 联系人信息 - 从 appStore 获取
-const contact = computed(() => ({
-  phone: appStore.$wxConfig.mailerPhone,
-  address: appStore.$wxConfig.mailingAddress,
-}));
-
-// 表单数据
-const formData = reactive({
-  trackingNumber: "", // 订单号
-  imageUrl: "", // 上传的图片URL
-  weight: "",
-  weights: {
-    gold: "",
-    kGold: "",
-    platinum: "",
-    silver: "",
-  },
-  agreeToTerms: false,
-});
-
-// 金属输入项配置
-const metalInputs = ref([
-  { label: "黄金金重", key: "gold", metalType: 1 },
-  { label: "铂金金重", key: "kGold", metalType: 2 },
-  { label: "白银金重", key: "platinum", metalType: 3 },
-  // { label: "白银金重", key: "silver", metalType: 4 },
-]);
-
-//metalType  金属类型(1黄金、2铂金、3白银···)
-const metalType = ref(1);
-const metalTypeText = computed(() => {
-  return metalType.value == 1
-    ? "黄金"
-    : metalType.value == 2
-    ? "铂金"
-    : metalType.value == 3
-    ? "白银"
-    : "";
-});
-
-// 复制地址方法
-const copyAddress = () => {
-  const fullText = `${appStore.$wxConfig.mailerName || "回收部"}:${
-    contact.phone
-  } 地址: ${contact.address}`;
-  uni.setClipboardData({
-    data: fullText,
-    success: () => {
-      Toast({
-        title: "地址已复制",
-        icon: "none",
-      });
-    },
-  });
-};
-
-// 协议弹窗相关逻辑
-const showAgreementPopup = ref(false);
-const showAgreement = () => {
-  showAgreementPopup.value = true;
-};
-const closeAgreement = () => {
-  showAgreementPopup.value = false;
-};
-
-// 协议勾选状态
-const agreedToTerms = ref(false);
-
-onLoad((p) => {
-  metalType.value = p.type;
-});
-// 提交表单方法
-const handleSubmit = async () => {
-  if (!agreedToTerms.value) {
-    Toast({
-      title: "请先阅读并同意存金协议",
-      icon: "none",
-    });
-    return;
-  }
-  if (!formData.trackingNumber) {
-    Toast({
-      title: "请填写快递单号",
-      icon: "none",
-    });
-    return;
-  }
-  if (!formData.weight || Number(formData.weight) <= 0) {
-    Toast({
-      title: `请填写${metalTypeText.value}金重`,
-      icon: "none",
-    });
-    return;
-  }
-  if (!imageList.value || imageList.value.length === 0) {
-    Toast({
-      title: "请上传快递图片",
-      icon: "none",
-    });
-    return;
-  }
-  if (uploadLoading.value) {
-    Toast({
-      title: "正在上传图片",
-      icon: "none",
-    });
-    return;
-  }
-  try {
-    uni.showLoading({
-      title: "提交中...",
-    });
-    const params = {
-      userId: appStore.uid,
-      operationType: 1, // 1 - 存金
-      orderNo: formData.trackingNumber,
-      weight: formData.weight,
-      metalType: metalType.value,
-      price: 0,
-      type: 1,
-      imageUrl: imageList.value[0].info.url,
-    };
-    await liveExchange(params);
-    setTimeout(() => {
-      uni.navigateBack();
-    }, 500);
-    Toast({ title: "提交成功" });
-  } catch (error) {
-    console.error("liveExchange", error);
-    const title = typeof error === "string" ? error : "提交失败";
-    Toast({ title });
-  } finally {
-    uni.hideLoading();
-  }
-};
-</script>
-
-<style lang="scss">
-// 页面和主题变量
-$page-bg-color: #f7f7f7;
-$theme-color: #e9c279;
-$text-primary: #333;
-$text-secondary: #999;
-$white: #ffffff;
-$border-color: #f0f0f0;
-
-page {
-  background-color: $page-bg-color;
-  color: $text-primary;
-}
-
-.deposit-page {
-  padding-bottom: 40rpx;
-}
-
-// 顶部 Tabs
-.top-tabs-container {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  padding: 30rpx 0;
-  background-color: $white;
-  gap: 80rpx;
-  border-bottom: 1px solid $border-color;
-
-  .tab-item {
-    font-size: 30rpx;
-    color: $text-secondary;
-    padding-bottom: 10rpx;
-    border-bottom: 2px solid transparent;
-    transition: all 0.3s ease;
-
-    &.active {
-      font-weight: bold;
-      color: $theme-color;
-      border-bottom-color: $theme-color;
-    }
-  }
-}
-
-.content-body {
-  padding: 30rpx;
-}
-
-// 卡片样式
-.card-section {
-  background-color: $white;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 24rpx;
-
-  .section-title {
-    font-size: 30rpx;
-    line-height: 30rpx;
-    font-weight: bold;
-    margin-bottom: 20rpx;
-    position: relative;
-    padding-left: 20rpx;
-    &::before {
-      content: "";
-      width: 4rpx;
-      height: 100%;
-      background: #daa520;
-      position: absolute;
-      left: 0;
-      top: 0;
-    }
-  }
-}
-
-.upload-box {
-  border-top: 1rpx solid #ccc;
-  padding: 50rpx 0 0;
-  ::v-deep .u-upload__wrap__preview__image {
-    width: 143rpx !important;
-    height: 143rpx !important;
-  }
-  .upload-block {
-    width: 150rpx;
-    height: 150rpx;
-    border: 1px solid #ccc;
-    border-radius: 10rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #ccc;
-    font-weight: 700;
-    font-size: 26rpx;
-  }
-}
-
-// 地址框
-.address-box {
-  display: flex;
-  align-items: center;
-  background-color: #fcf9f3;
-  padding: 20rpx;
-  border-radius: 12rpx;
-
-  .icon-location {
-    width: 70rpx;
-    height: 70rpx;
-    line-height: 70rpx;
-    color: #fff;
-    text-align: center;
-    background-color: #cc9933;
-    border-radius: 50rpx;
-    margin-right: 20rpx;
-    flex-shrink: 0;
-  }
-
-  .address-info {
-    flex-grow: 1;
-    font-size: 26rpx;
-    line-height: 1.6;
-  }
-
-  .copy-btn {
-    flex-shrink: 0;
-    margin-left: 20rpx;
-    padding: 10rpx 24rpx;
-    border: 1px solid $theme-color;
-    color: $theme-color;
-    border-radius: 30rpx;
-    font-size: 24rpx;
-  }
-}
-
-// 输入行
-.input-row {
-  display: flex;
-  align-items: center;
-  border-bottom: 1px solid $border-color;
-  padding: 20rpx 0;
-
-  .placeholder {
-    color: #cccccc;
-  }
-
-  input {
-    flex-grow: 1;
-    font-size: 28rpx;
-  }
-
-  .icon-scan {
-    width: 40rpx;
-    height: 40rpx;
-    margin-left: 20rpx;
-  }
-
-  .input-label {
-    font-size: 28rpx;
-    color: $text-primary;
-    margin-right: 15rpx;
-  }
-
-  .text-right {
-    text-align: right;
-  }
-
-  &.with-arrow {
-    .arrow {
-      font-size: 28rpx;
-      color: $header-color;
-      margin-left: 10rpx;
-    }
-  }
-
-  // &:last-child {
-  //   border-bottom: none;
-  // }
-}
-
-// 图片上传
-.image-uploader {
-  width: 160rpx;
-  height: 160rpx;
-  border: 2rpx dashed $text-secondary;
-  border-radius: 12rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  color: $text-secondary;
-  font-size: 60rpx;
-  overflow: hidden;
-
-  .preview-image {
-    width: 100%;
-    height: 100%;
-  }
-}
-
-// 提交区域
-.submit-section {
-  margin-top: 40rpx;
-
-  .submit-btn {
-    background-color: $theme-color;
-    color: $white;
-    border-radius: 50rpx;
-    font-size: 32rpx;
-    height: 90rpx;
-    line-height: 90rpx;
-    &:after {
-      border: none;
-    }
-  }
-
-  .agreement-box {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-top: 30rpx;
-    font-size: 24rpx;
-    color: $text-secondary;
-  }
-}
-
-.agreement-section {
-  margin: 30rpx 0 40rpx;
-  display: flex;
-  align-items: center;
-}
-
-.agreement-text {
-  font-size: 28rpx;
-  color: #666;
-}
-
-.agreement-link {
-  color: #e9c279;
-  text-decoration: underline;
-  margin-left: 4rpx;
-}
-
-// 弹窗样式
-.popup-content {
-  width: 80vw;
-  padding: 40rpx 40rpx 0;
-  height: 80vh;
-  // display: flex;
-  // flex-direction: column;
-}
-
-.popup-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 30rpx;
-
-  .popup-title {
-    font-size: 36rpx;
-    font-weight: bold;
-    color: #333;
-  }
-
-  .popup-close {
-    font-size: 48rpx;
-    color: #666;
-    cursor: pointer;
-  }
-}
-
-.popup-footer {
-  margin-top: 30rpx;
-
-  .popup-btn {
-    width: 100%;
-    background: #e9c279;
-    color: white;
-    border: none;
-    border-radius: 12rpx;
-    padding: 30rpx 30rpx;
-    font-size: 32rpx;
-  }
-}
-
-.popup-body {
-  height: 85%;
-  // flex: 1;
-  // min-height: 0; // 关键,防止flex塌陷
-
-  .agreement-content {
-    font-size: 28rpx;
-    line-height: 1.6;
-    color: #666;
-  }
-}
-
-// 说明图片区域
-.info-image-section {
-  margin-top: 40rpx;
-  .tip-box {
-    .title {
-      color: #cc9933;
-    }
-  }
-  .paragraph {
-    color: #cc9933;
-  }
-  .qr_code {
-    width: 200rpx;
-  }
-  .alert-text {
-    margin: 20rpx 0 0;
-    .paragraph {
-      color: red;
-    }
-  }
-}
-</style>

+ 0 - 706
pages/users/vault/storeMetal/GoldMailForm.vue

@@ -1,706 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="content">
-      <view class="withdraw-express">
-        <view class="header">
-          <span class="title">自主邮寄</span>
-        </view>
-        <view class="item">
-          <view class="targe">收</view>
-          <view class="address">
-            <view
-              >{{ appStore.$wxConfig.mailerName }} :{{
-                appStore.$wxConfig.mailerPhone
-              }}</view
-            >
-            <view class="address-detail" style="margin-top: 4px">
-              <text class="receive-address">地址:</text>
-              {{ appStore.$wxConfig.mailingAddress }}
-            </view>
-          </view>
-          <view class="end">
-            <view
-              class="copy"
-              @click="
-                copy(
-                  `${appStore.$wxConfig.mailerName}:${appStore.$wxConfig.mailerPhone} 地址: ${appStore.$wxConfig.mailingAddress}`
-                )
-              "
-              >复制</view
-            >
-          </view>
-        </view>
-      </view>
-      <view>
-        <view style="padding: 0rpx 10px">
-          <view class="gold-item">
-            <view class="header">
-              <span class="title">快递单号</span>
-            </view>
-            <view class="input-box">
-              <input
-                type="text"
-                class="inpu-box-ds"
-                placeholder="请输入快递单号"
-                v-model="expressNum"
-                placeholder-style="color: #999999; font-size: 28rpx;"
-              />
-              <text class="iconfont icon-iconfontscan" @click="scanCode"></text>
-            </view>
-          </view>
-
-          <view class="gold-item">
-            <view class="header">
-              <span class="title">快递图片</span>
-            </view>
-            <view style="margin-top: 10px">
-              <view class="upload-box">
-                <up-upload
-                  :fileList="imageList"
-                  uploadIcon="plus"
-                  @afterRead="afterRead"
-                  @delete="deletePic"
-                  name="1"
-                  multiple
-                  :maxCount="3"
-                >
-                  <template #trigger>
-                    <view class="upload-block">
-                      <uni-icons
-                        size="38"
-                        color="#ccc"
-                        type="plusempty"
-                      ></uni-icons>
-                    </view>
-                  </template>
-                </up-upload>
-              </view>
-            </view>
-          </view>
-
-          <view class="gold-item">
-            <view class="form-body">
-              <view class="weight-input">
-                <view class="input-label">黄金金重</view>
-                <view class="form-body-box">
-                  <input
-                    v-model="auExtract"
-                    type="digit"
-                    class="weight-value"
-                  />
-                  <text>g</text>
-                </view>
-              </view>
-              <view class="weight-input">
-                <view class="input-label">K金金重</view>
-                <view class="form-body-box">
-                  <input
-                    v-model="kauExtract"
-                    type="digit"
-                    class="weight-value"
-                  />
-                  <text>g</text>
-                </view>
-              </view>
-              <view class="weight-input">
-                <view class="input-label">铂金金重</view>
-                <view class="form-body-box">
-                  <input
-                    v-model="ptExtract"
-                    type="digit"
-                    class="weight-value"
-                  />
-                  <text>g</text>
-                </view>
-              </view>
-              <view class="weight-input">
-                <view class="input-label">白银金重</view>
-                <view class="form-body-box">
-                  <input
-                    v-model="agExtract"
-                    type="digit"
-                    class="weight-value"
-                  />
-                  <text>g</text>
-                </view>
-              </view>
-
-              <view class="tips">* 若无相关产品,可不用填写</view>
-            </view>
-          </view>
-        </view>
-        <view class="withdraw-body">
-          <view
-            class="tx-active"
-            style="margin-top: 10px"
-            @click="submitGoldOrder"
-          >
-            <!-- <button @click="submitGoldOrder">点击提交</button> -->
-            <image class="btn" src="/static/images/sb_btn.png"></image>
-            <text class="btn-text">点击提交</text>
-          </view>
-          <view class="aggregate" @click="aggregate = !aggregate">
-            <image
-              class="choose"
-              :src="
-                aggregate
-                  ? '/static/recycle/choose.png'
-                  : '/static/recycle/nochoose.png'
-              "
-              mode="scaleToFill"
-            ></image>
-            <view class="aggre">
-              阅读并同意
-              <span class="aggre-text" @click="showAggre">《存金协议》</span>
-            </view>
-          </view>
-          <view style="margin-top: 20px">
-            <up-parse :content="content"></up-parse>
-          </view>
-        </view>
-      </view>
-    </view>
-    <uni-popup
-      background-color="#fff"
-      ref="singPopup"
-      type="bottom"
-      :safeArea="false"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0, 0, 0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="agreement"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            aggregate = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-  </view>
-</template>
-
-<script setup>
-// 1. 导入依赖(保持不变)
-import { ref } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import { depositCreateAPI } from "@/api/functions";
-import { useImageUpload } from "@/hooks/useImageUpload";
-import { useAppStore } from "@/stores/app";
-const appStore = useAppStore();
-console.log("appStore.$wxConfig", appStore.$wxConfig);
-// 2. 响应式变量(保持不变,明确金属类型对应关系)
-const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
-  pid: 9,
-  model: "gold",
-});
-const extract = ref([]);
-const auExtract = ref(null); // 黄金重量 → type:1
-const ptExtract = ref(null); // 铂金重量 → type:2
-const agExtract = ref(null); // 白银重量 → type:3
-const kauExtract = ref(null); // K金重量 → type:4
-const aggregate = ref(false);
-const expressNum = ref("");
-const cust_img = ref([]);
-const singPopup = ref(null);
-const props = defineProps(["agreement", "content"]);
-
-onLoad(() => {});
-const showAggre = () => {
-  singPopup.value?.open();
-};
-// 3. 扫码方法(保持不变)
-const scanCode = () => {
-  uni.scanCode({
-    success: (res) => {
-      expressNum.value = res.result;
-      console.log("赋值后:", expressNum.value);
-    },
-    fail: (err) => {
-      console.error("扫码失败:", err);
-      uni.showToast({ title: "扫码失败,请重试", icon: "none" });
-    },
-  });
-};
-const copy = (item) => {
-  uni.setClipboardData({
-    data: item,
-    success: () => {
-      uni.showToast({
-        title: "复制成功",
-        icon: "success",
-      });
-    },
-    fail: (err) => {
-      uni.showToast({
-        title: "复制失败",
-        icon: "none",
-      });
-      console.error("复制失败:", err);
-    },
-  });
-};
-
-/**
- * 转换金属重量为目标格式:[{type:1,weight:1}, ...]
- * 改用直接引用ref变量的映射表,避免eval
- */
-const buildMetalWeightList = () => {
-  // 优化:金属映射表直接包含ref变量,无需通过字符串动态获取
-  const metalConfigList = [
-    { metalVar: auExtract, type: 1, label: "黄金" }, // 直接传auExtract(ref变量)
-    { metalVar: ptExtract, type: 2, label: "铂金" },
-    { metalVar: agExtract, type: 3, label: "白银" },
-    { metalVar: kauExtract, type: 4, label: "K金" },
-  ];
-
-  // 循环收集有效重量(逻辑与之前一致,仅获取重量的方式变化)
-  const metalList = [];
-  metalConfigList.forEach(({ metalVar, type }) => {
-    // 直接访问ref变量的.value获取重量值
-    const weightValue = metalVar.value;
-    // 处理重量:去空格、排除空值、转为数字
-    const trimmedWeight = weightValue ? String(weightValue).trim() : "";
-    const validWeight = Number(trimmedWeight);
-
-    // 仅保留「非空、非NaN、正数」的重量
-    if (trimmedWeight !== "" && !isNaN(validWeight) && validWeight > 0) {
-      metalList.push({
-        type: type,
-        weight: validWeight, // 转为数字格式,符合接口要求
-      });
-    }
-  });
-
-  return metalList;
-};
-
-// 5. 提交方法(逻辑不变,依赖优化后的buildMetalWeightList)
-const submitGoldOrder = async () => {
-  // 步骤1:基础校验(图片+重量+快递单号)
-  const isCheckPass = checkHandle();
-  if (!isCheckPass) return;
-
-  // 步骤2:构建目标格式的金属重量数组
-  const metalWeightList = buildMetalWeightList();
-  if (metalWeightList.length === 0) {
-    uni.showToast({ title: "请至少填写一个有效金属重量!", icon: "none" });
-    return;
-  }
-  if (!aggregate.value) {
-    uni.showToast({ title: "请阅读并同意《存金协议》!", icon: "none" });
-    return;
-  }
-
-  // 步骤3:整合提交数据
-  const submitData = {
-    metalInfos: metalWeightList, // 核心目标数组
-    expressNo: expressNum.value.trim(),
-    expressImages: imageList.value.map((v) => v.info.url),
-  };
-
-  // 步骤4:执行提交(示例接口调用)
-  try {
-    const res = await depositCreateAPI(submitData);
-
-    uni.showToast({ title: "提交成功!" });
-    setTimeout(() => {
-      uni.navigateTo({
-        url: "/pages/users/vault/storeMetal/order",
-      });
-    }, 1000);
-  } catch (error) {
-    console.error("提交失败:", error);
-    uni.showToast({ title: "提交失败,请重试", icon: "none" });
-  }
-};
-
-// 6. 校验方法(逻辑不变,依赖优化后的buildMetalWeightList)
-const checkHandle = () => {
-  // 校验1:快递图片
-  if (imageList.value.length === 0) {
-    uni.showToast({ title: "请上传快递图片!", icon: "none" });
-    return false;
-  }
-
-  // 校验2:至少一个有效金属重量
-  const metalWeightList = buildMetalWeightList();
-  if (metalWeightList.length === 0) {
-    uni.showToast({
-      title: "请至少填写一个金属重量(黄金/铂金/白银/K金)!",
-      icon: "none",
-    });
-    return false;
-  }
-
-  // 校验3:快递单号(可选,根据需求保留)
-  if (!expressNum.value.trim()) {
-    uni.showToast({ title: "请填写或扫码获取快递单号!", icon: "none" });
-    return false;
-  }
-
-  return true;
-};
-</script>
-
-<style lang="scss" scoped>
-page {
-  height: 100%;
-}
-.icon-iconfontscan {
-  font-size: 24px;
-  color: #f8c007;
-}
-.upload-box {
-  .upload-block {
-    width: 160rpx;
-    height: 160rpx;
-    border: 1px solid #ccc;
-    border-radius: 10rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #ccc;
-    font-weight: 700;
-    font-size: 26rpx;
-  }
-}
-.tips {
-  text-align: center;
-  color: #bdbdbd;
-  font-size: 24rpx;
-  margin: 20rpx auto;
-}
-
-.form-body {
-  // background-color: #fff;
-  // padding: 20px 30px;
-  font-size: 14px;
-  margin-top: 90rpx;
-
-  .weight-input {
-    display: flex;
-    align-items: center;
-    // justify-content: space-around;
-    margin: 30rpx 0;
-
-    .form-body-box {
-      display: flex;
-      align-items: center;
-      background-color: #ededed;
-      margin-left: 30rpx;
-      height: 72rpx;
-      border-radius: 10rpx;
-      font-size: 30rpx;
-
-      text {
-        color: #000;
-        padding-right: 20rpx;
-        font-size: 25rpx;
-      }
-
-      input {
-        // font-size: 18rpx;
-        padding-left: 10rpx;
-      }
-    }
-
-    .input-label {
-      font-size: 32rpx;
-      font-weight: 500;
-      width: 170rpx;
-    }
-
-    .weight-value {
-      height: 1.9em;
-      font-size: 1.5em;
-      border: none;
-      outline: none;
-    }
-  }
-
-  .submit-btn-area {
-    button {
-      color: #fff;
-      background: #c4bba6;
-    }
-  }
-
-  .agreement-section {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    padding: 20rpx;
-    margin-top: 30rpx;
-
-    .agreement-checkbox {
-      width: 32rpx;
-      height: 16px;
-    }
-
-    .agreement-text {
-      font-size: 14px;
-      margin-left: 10px;
-
-      .agreement-link {
-        color: #3ab0ff;
-      }
-    }
-  }
-}
-
-.input-box {
-  display: flex;
-  background-color: #ededed;
-  border-radius: 5px;
-  height: 90rpx;
-  align-items: center;
-  justify-content: space-around;
-  font-size: 28rpx;
-  // paddingft: ;
-  padding-left: 20rpx;
-
-  // color:#c7c7c7 ;
-  input {
-    // background-color: ;
-    width: 80%;
-    // color: #c7c7c7;
-  }
-}
-
-.inpu-box-zl {
-  justify-content: space-between;
-  padding-left: 47rpx;
-}
-
-.gold-item {
-  margin: 50rpx 0;
-}
-
-// .gold-input{
-//    background-color: red !important;
-// }
-.address-detail {
-  line-height: 2.2;
-}
-
-.header {
-  padding-left: 5px;
-  position: relative;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 10px 10px;
-  border-radius: 5px;
-  // background-color: #fff;
-  font-weight: bold;
-  font-size: 18px;
-
-  &::before {
-    position: absolute;
-    /*绝对定位*/
-    top: 50%;
-    /*Y轴方向偏移自身高度的50%*/
-    transform: translatey(-50%);
-    /*Y轴方向偏移微调*/
-    left: 0;
-    /*紧靠容器左边缘*/
-    content: "";
-    /*伪元素需要有内容才能显示*/
-    width: 2px;
-    /*伪元素宽度*/
-    height: 15px;
-    /*伪元素高度*/
-    background-color: #f8c007;
-    /*伪元素颜色*/
-  }
-
-  .title {
-    font-weight: 500;
-    font-size: 32rpx;
-    font-family: "黑体";
-  }
-}
-
-.withdraw {
-  height: 100%;
-  background-color: #f7f7f7;
-  border-radius: 40rpx 40rpx 0 0;
-  position: relative;
-  // top: -20rpx;
-  padding: 0 25rpx;
-  top: -67rpx;
-
-  .withdraw-express {
-    display: flex;
-    flex-direction: column;
-    align-items: flex-start;
-    justify-content: center;
-
-    padding: 28rpx;
-    margin-bottom: 30rpx;
-    border-radius: 30rpx;
-    padding-right: 0;
-
-    .head {
-      font-size: 14px;
-    }
-
-    .item {
-      display: flex;
-      align-items: center;
-      margin-top: 15px;
-
-      .targe {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        color: #fff;
-        width: 35px;
-        height: 35px;
-        border-radius: 50%;
-        // background-color: #cc9933;
-        background-color: #ffd034;
-      }
-
-      .address {
-        width: 430rpx;
-        margin: 0 10px;
-        font-size: 28rpx;
-
-        .receive-address {
-          letter-spacing: 9px;
-        }
-      }
-
-      .end {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-
-        .copy {
-          color: #888888;
-          border-radius: 3px;
-          border: 1px solid #888888;
-          font-size: 24rpx;
-          padding: 6rpx 23rpx;
-        }
-      }
-    }
-  }
-
-  .withdraw-body {
-    // background-color: #fff;
-    padding: 20px 30px;
-    font-size: 14px;
-
-    .input-money {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      font-weight: 600;
-      border-bottom: 1px solid #eaeef1;
-
-      .rmb {
-        font-size: 16px;
-      }
-
-      .t-input {
-        height: 1.9em;
-        font-size: 1.5em;
-        border: none;
-        outline: none;
-      }
-    }
-
-    .aggregate {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      padding: 10px;
-      color: #ababab;
-      font-size: 12px;
-
-      .aggre {
-        font-size: 30rpx;
-        margin-left: 10px;
-
-        .aggre-text {
-          color: #cc9933;
-        }
-      }
-    }
-
-    .choose {
-      width: 28rpx;
-      height: 28rpx;
-    }
-  }
-}
-
-.tx {
-  button {
-    color: #b2b2b2;
-  }
-}
-
-.tx-active {
-  margin: 0 auto;
-  position: relative;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  .btn {
-    width: 267rpx;
-    height: 71rpx;
-  }
-  .btn-text {
-    font-size: 30rpx;
-    color: #000;
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-  }
-}
-
-.signContent {
-  // background-color: #f8f8f8;
-  padding: 20px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-radius: 20px 20px 0 0;
-
-  .scroll {
-    // background-color: #fff;
-    padding: 4px;
-    height: 300px;
-    overflow-y: hidden;
-    border: 1px solid #dfdfdf;
-  }
-
-  .footer {
-    margin-top: 10px;
-    color: #fff;
-    padding: 4px 20px;
-    border-radius: 20px;
-    background: linear-gradient(to right, #8ed187, #5dd665);
-  }
-}
-
-.express-input {
-  &:nth-child(1) {
-    padding: 0;
-  }
-}
-</style>

+ 0 - 365
pages/users/vault/storeMetal/gmReport.vue

@@ -1,365 +0,0 @@
-<template>
-  <view class="">
-    <view class="banner">
-      <view class="step-box">
-        <up-steps :current="orderStatus" activeColor="#b5aa90">
-          <up-steps-item
-            :title="item.name"
-            v-for="item in stepData"
-            :key="item.name"
-          >
-          </up-steps-item>
-        </up-steps>
-      </view>
-
-      <view class="block">
-        <view class="check">
-          <view class="header">
-            <span class="title">合后检测确认单</span>
-          </view>
-          <view class="desc"
-            >根据双方认可的检测内容及要求进行认定,为客户合后检测认定结果如下:</view
-          >
-          <view class="table">
-            <view class="title">客户寄送品</view>
-            <view class="tab_header">
-              <up-row>
-                <up-col :span="3">
-                  <view class="col">类型</view>
-                </up-col>
-                <up-col :span="3">
-                  <view class="col">来样重</view>
-                </up-col>
-                <up-col :span="3">
-                  <view class="col">实际重</view>
-                </up-col>
-                <up-col :span="3">
-                  <view class="col">成色</view>
-                </up-col>
-              </up-row>
-            </view>
-            <view class="tab_content">
-              <view>
-                <up-row v-for="item in detectionDetails" :key="item.id">
-                  <up-col :span="3">
-                    <view class="col">{{ getCate(item.type) }}</view>
-                  </up-col>
-                  <up-col :span="3">
-                    <view class="col"
-                      >{{ Number(item.userEstimatedWeight).toFixed(2) }}g</view
-                    >
-                  </up-col>
-                  <up-col :span="3">
-                    <view class="col"
-                      >{{ Number(item.discountedWeight).toFixed(2) }}g</view
-                    >
-                  </up-col>
-                  <up-col :span="3">
-                    <view class="col">{{ item.purity }}%</view>
-                  </up-col>
-                </up-row>
-              </view>
-            </view>
-          </view>
-          <view class="end">
-            <view class="end-bttom">
-              <span class="total">
-                总计:
-                <span class="price">{{ deTotalWeight.toFixed(2) }}g</span>
-              </span>
-            </view>
-            <view class="extra"
-              >即:客户对{{
-                detectionReport.inspectionTime
-              }}合后检测重量和回收价无异议</view
-            >
-            <view class="sign">
-              <span
-                >检测人:{{ detectionReport.inspectorNickname || "系统" }}</span
-              >
-            </view>
-            <view class="time">
-              {{ detectionReport.inspectionTime }}
-            </view>
-          </view>
-          <view style="font-size: 14px; padding: 10px">
-            <span style="font-size: 16px; font-weight: 700">注:</span>
-            <span>折算公式:兑料重量 = 折足重量 = 来料熔后重量 * 折足成色</span>
-          </view>
-        </view>
-      </view>
-      <view class="block">
-        <view class="check">
-          <view class="header">
-            <span class="title">检测图片</span>
-          </view>
-          <view class="checlImage">
-            <cl-upload
-              v-model="detectionImages"
-              :add="false"
-              :remove="false"
-            ></cl-upload>
-          </view>
-        </view>
-      </view>
-    </view>
-    <view style="height: 70px"></view>
-    <view class="footer" v-if="orderStatus == 2">
-      <view class="btn" @click="next()">确认报告</view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { onMounted, computed, ref } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import { postalDepositAPI } from "@/api/functions";
-const stepData = ref([
-  {
-    name: "待收货",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待检测",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待确认",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "待充值",
-    isNow: 0,
-    type: 1,
-  },
-  {
-    name: "已完成",
-    isNow: 1,
-    type: 0,
-  },
-]);
-// 注意:onLoad是uni-app的生命周期,如果是纯Vue3,应使用onMounted
-
-// 替代Vue2的methods中的方法
-const getCate = (cate) => {
-  // console.log(cate);
-
-  switch (cate) {
-    case 1:
-      return "黄金";
-    case 3:
-      return "白银";
-    case 2:
-      return "铂金";
-    case 4:
-      return "K金";
-  }
-};
-// 检测信息-成色类型等
-const detectionDetails = ref([]);
-// 检测详情
-const detectionReport = ref({});
-// 检测图片
-const detectionImages = ref([]);
-// 订单号
-const orderNo = ref("");
-// 订单状态
-const orderStatus = ref(4);
-onLoad((options) => {
-  if (options.orderInfo) {
-    // 先解码再解析
-    const orderInfoStr = decodeURIComponent(options.orderInfo);
-    const res = JSON.parse(orderInfoStr);
-    detectionDetails.value = res.goldBalances;
-
-    detectionReport.value = res;
-    detectionImages.value = JSON.parse(res.inspectionImage);
-    orderNo.value = res.id;
-    orderStatus.value = res.status;
-  }
-});
-// 确认报告
-const next = async () => {
-  const res = await postalDepositAPI(orderNo.value);
-  uni.showToast({
-    title: "确认成功",
-    duration: 1000,
-  });
-  setTimeout(() => {
-    uni.redirectTo({
-      url: "/pages/users/vault/storeMetal/order",
-    });
-  }, 1000);
-};
-const deTotalWeight = computed(() => {
-  if (detectionReport.value.goldBalances) {
-    const totalWeight = detectionReport.value.goldBalances.reduce(
-      (sum, material) => {
-        return sum + (Number(material.discountedWeight) || 0);
-      },
-      0
-    );
-    return totalWeight;
-  }
-});
-</script>
-
-<style scoped lang="scss">
-.banner {
-  padding: 10px 15px;
-  background: $uni-bg-primary; /* fallback for old browsers */
-
-  .step-box {
-    margin: 30rpx 0;
-    width: 100%;
-    background: #fff;
-    height: 150rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    border-radius: 4px;
-    &::v-deep .u-steps--row {
-      flex: none !important;
-    }
-    &::v-deep .u-text__value {
-      font-size: 24rpx !important;
-    }
-  }
-}
-
-.block {
-  margin-bottom: 10px;
-
-  .check {
-    background-color: #fff;
-    border-radius: 4px;
-    padding-top: 10px;
-    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-  }
-  .header {
-    font-size: 14px;
-    font-weight: 700;
-    padding-left: 10px;
-    margin-left: 10px;
-    position: relative;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    &::before {
-      position: absolute; /*绝对定位*/
-      top: 50%; /*Y轴方向偏移自身高度的50%*/
-      transform: translatey(-40%); /*Y轴方向偏移微调*/
-      left: 0px; /*紧靠容器左边缘*/
-      content: ""; /*伪元素需要有内容才能显示*/
-      width: 2px; /*伪元素宽度*/
-      height: 18px; /*伪元素高度*/
-      background-color: #daa520; /*伪元素颜色*/
-    }
-    .title {
-      font-size: 18px;
-    }
-  }
-  .desc {
-    padding: 8px 10px;
-    color: #888;
-    font-size: 14px;
-  }
-}
-.table {
-  padding: 14px 10px;
-  .title {
-    text-align: center;
-    padding: 4px 0;
-    color: #fff;
-    font-weight: 700;
-    font-size: 16px;
-    width: 100%;
-    background-color: #b5aa90;
-  }
-  .tab_header {
-    border-left: 1px solid #b5aa90;
-    font-size: 18px;
-    background-color: #fff;
-    .col {
-      padding: 12px 0;
-      line-height: 19px;
-    }
-  }
-  .tab_content {
-    border-left: 1px solid #b5aa90;
-    font-size: 16px;
-    background-color: #fff;
-    .col {
-      padding: 12px 0;
-      line-height: 19px;
-    }
-  }
-  .tab_header .col,
-  .tab_content .col {
-    border-bottom: 1px solid #b5aa90;
-    border-right: 1px solid #b5aa90;
-    text-align: center;
-  }
-  .symbol-name {
-    font-family: Microsoft YaHei, Arial, Helvetica, sans-serif;
-    font-size: 20px;
-    color: #ffbf24;
-  }
-}
-.end {
-  width: 100%;
-  display: inline-block;
-  text-align: right;
-  .end-bttom {
-    color: #888;
-    .total {
-      font-size: 16px;
-    }
-    .price {
-      margin-right: 10px;
-      color: #ffa034;
-    }
-  }
-  .extra {
-    font-size: 14px;
-    margin-top: 15px;
-    color: #888;
-    margin-right: 10px;
-  }
-  .sign {
-    margin: 10px;
-  }
-  .time {
-    padding: 10px;
-  }
-}
-
-.checlImage {
-  padding: 10px;
-}
-.footer {
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
-  position: fixed;
-  width: 100%;
-  border-radius: 8px 8px 0 0;
-  background-color: #fff;
-  bottom: 0;
-  height: 60px;
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  .btn {
-    color: #fff;
-    font-weight: 700;
-    margin: 0 15px;
-    border-radius: 10px;
-    width: 100px;
-    padding: 10px;
-    text-align: center;
-    background-color: #cc9933;
-  }
-}
-</style>

+ 0 - 161
pages/users/vault/storeMetal/goldBullionStock.vue

@@ -1,161 +0,0 @@
-<template>
-  <view class="content">
-    <view class="tabs-wrap">
-      <!-- 新增tabs导航 -->
-      <view class="takeout-tabs">
-        <view
-          class="tab-item"
-          :class="['tab-active', currentTab === 0 ? 'active' : '']"
-          @click="currentTab = 0"
-          >邮寄存金</view
-        >
-        <view
-          class="tab-item"
-          :key="currentTab"
-          :class="['tab-active', currentTab === 1 ? 'active' : '']"
-          @click="currentTab = 1"
-          >无物流存金</view
-        >
-      </view>
-    </view>
-    <view v-if="!currentTab">
-      <gold-mail-form :content="content" :agreement="agreement">
-      </gold-mail-form>
-    </view>
-    <view v-else>
-      <non-logistics-gold :viprealGoldprice="viprealGoldprice">
-      </non-logistics-gold>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { ref, onMounted, computed } from "vue";
-import GoldMailForm from "./GoldMailForm.vue";
-import nonLogisticsGold from "./nonLogisticsGold.vue";
-import { agreementGetoneApi } from "@/api/user";
-import { useStoreRights } from "@/stores/rights";
-import useRealGoldPrice from "@/hooks/useRealGoldPrice";
-import { number } from "../../../../uni_modules/uview-plus/libs/function/test";
-const {
-  realGoldprice, // 黄金实时销售价(基础)
-} = useRealGoldPrice({});
-const rightsStore = useStoreRights();
-// 响应式数据
-const currentTab = ref(0);
-const content = ref("");
-const agreement = ref("");
-// Vue 3 中使用 onMounted 替代 onLoad
-// 获取协议
-function agreementGetoneFn() {
-  agreementGetoneApi({ name: "saveGoldRules" }).then((res) => {
-    content.value = res.data?.content;
-  });
-  // 资产说明
-  agreementGetoneApi({ name: "saveGold" }).then((res) => {
-    agreement.value = res.data?.content;
-  });
-}
-
-// 黄金调整价
-const adjustGoldprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta.find(
-    (gold) => gold.name == "黄金"
-  );
-  return res;
-});
-// 获取实时金价
-const viprealGoldprice = computed(
-  () =>
-    Number(realGoldprice.value) -
-    Number(rightsStore.userBenefits.buy) +
-    Number(adjustGoldprice.value.sellPriceAdjust)
-);
-onMounted((options) => {
-  agreementGetoneFn();
-});
-
-// const someComputed = computed(() => { ... })
-
-// function someMethod() { ... }
-</script>
-
-<style scoped lang="scss">
-/* 新增tabs样式 */
-.takeout-tabs {
-  display: flex;
-  height: 120rpx;
-  overflow: hidden;
-  position: relative;
-  top: 85rpx;
-}
-
-.tabs-wrap {
-  height: 270rpx;
-}
-
-.tab-item {
-  width: 50%;
-  height: 100%;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  position: relative;
-  box-sizing: border-box;
-  color: #484848;
-  font-size: 30rpx;
-  &.active {
-    color: #000;
-    font-weight: 500;
-    color: #000000;
-  }
-}
-
-.tab-item.active::after {
-  content: "";
-  position: absolute;
-  bottom: 0;
-  /* 修改为0,使三角形显示在底部 */
-  left: 50%;
-  transform: translateX(-50%);
-  z-index: 100;
-  border-style: solid;
-  border-width: 0 20rpx 20rpx 20rpx;
-  /* 使用rpx单位 */
-  border-color: transparent transparent #f7f7f7 transparent;
-  width: 0;
-  height: 0;
-  opacity: 1;
-  /* 设置为可见 */
-  transform-origin: center top;
-  animation: showTriangle 0.3s ease-out forwards;
-}
-
-/* 添加动画定义 */
-@keyframes showTriangle {
-  from {
-    opacity: 0;
-    transform: translate(-50%, 10rpx);
-  }
-
-  to {
-    opacity: 1;
-    transform: translate(-50%, 0);
-  }
-}
-
-.content {
-  position: relative;
-  height: 100%;
-  // background-color: #ededed;
-  // background: url('https://mp-ad17e5cd-05c1-4df9-b060-556e25dac130.cdn.bspapp.com/mini/static/20250529221733.jpg') top center no-repeat;
-  // background-size: 100% 40%;
-  // background-color: #f7f7f7;
-  background: $uni-bg-primary !important;
-}
-
-::v-deep .uni-input-placeholder {
-  font-size: 14px;
-  color: #bdbdbd;
-}
-</style>

File diff suppressed because it is too large
+ 0 - 1136
pages/users/vault/storeMetal/index.vue


+ 0 - 693
pages/users/vault/storeMetal/metalExchange.vue

@@ -1,693 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="withdrawContent">
-      <view class="tabs">
-        <view
-          v-for="item in tabsList"
-          :key="item.key"
-          class="tabs-item"
-          :class="[tabsIndex === item.key ? 'active' : '']"
-          @click="tabsChange(item)"
-        >
-          {{ item.title }}
-        </view>
-      </view>
-
-      <!-- 提料克重输入模块 -->
-      <view class="gold-box">
-        <view class="gold-item">
-          <view class="header">
-            <h3 class="title">提料克重</h3>
-          </view>
-          <view class="input-box">
-            <input
-              v-model.number="extract"
-              placeholder="请输入克数"
-              type="digit"
-              class="t-input"
-              @input="onKeyInput"
-            />
-          </view>
-          <view class="infoMoney" style="font-size: 16px">
-            <view v-if="is_out">
-              <text class="info-money-num" style="color: #ff1e0f">
-                输入克重超过可提现克重,账户克重{{ accountWeight }}克
-              </text>
-            </view>
-            <view v-else-if="is_lowest">
-              <text class="info-money-num" style="color: #ff1e0f">
-                最低{{ lowest }}克起兑换,账户克重{{
-                  accountWeight
-                }}克,且最多两位小数
-              </text>
-            </view>
-            <view v-else class="infoMoneyNum">
-              <view> 手续费:{{ totalFee }}元,{{ feePerGram }}元/g </view>
-              <view>账户克重:{{ accountWeight }}克</view>
-            </view>
-            <!-- <view class="infoTip">*默认融成小圆饼寄出</view> -->
-          </view>
-
-          <view class="remark-box">
-            <view class="header">
-              <h3 class="title">备注</h3>
-            </view>
-            <view class="input-box" style="margin-top: 20rpx">
-              <input
-                v-model="remark"
-                placeholder="请输入备注(如特殊需求、收货说明等)"
-                type="text"
-                class="t-input"
-                maxlength="50"
-              />
-            </view>
-          </view>
-        </view>
-      </view>
-
-      <view class="order-list" @click="gotoOrderList">
-        订单/预约列表 {{ ">" }}
-      </view>
-
-      <!-- 提交按钮 -->
-      <view class="withdraw-bottom">
-        <view
-          :class="['submitBtn', is_post ? '' : 'submitBtnActive']"
-          style="margin-top: 10px"
-          :style="{
-            opacity: isSubmitting ? 0.7 : 1,
-            pointerEvents: isSubmitting ? 'none' : 'auto',
-          }"
-        >
-          <button @click="handleShowModel">
-            <text v-if="!isSubmitting">前往预约</text>
-            <text v-if="isSubmitting">提交中...</text>
-          </button>
-        </view>
-      </view>
-
-      <view>
-        <up-parse :content="content"></up-parse>
-      </view>
-    </view>
-
-    <!-- 预约日期选择弹窗 -->
-    <appointmentCalendar
-      ref="calendarRef"
-      :metalType="tabsIndex"
-      :reservedWeight="extract"
-      @confirm="onDateConfirm"
-    />
-  </view>
-</template>
-
-<script setup>
-import { ref, computed, nextTick, watch } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import { storeToRefs } from 'pinia';
-
-// 导入API/组件/Store
-import { quotaByWeight, createReservation } from "@/api/vault";
-import appointmentCalendar from "@/components/appointmentCalendar";
-import { useAppStore } from "@/stores/app";
-import { agreementGetoneApi } from "@/api/user";
-import { toLogin } from "@/libs/login.js";
-
-// 初始化Store
-const appStore = useAppStore();
-const { wxConfig, isWxConfigReady } = storeToRefs(appStore);
-
-// 核心响应式数据
-const tabsList = ref([
-  { key: 1, label: "gold", title: "黄金" },
-  { key: 2, label: "platinum", title: "铂金" },
-  { key: 3, label: "silver", title: "白银" },
-]);
-const tabsIndex = ref(1);
-const extract = ref(0);
-const is_out = ref(false);
-const is_lowest = ref(false);
-const isSubmitting = ref(false);
-const metalConfigs = ref([]);
-const remark = ref("");
-
-// 日历预约数据
-const calendarRef = ref(null);
-const selectedAppointmentDate = ref(null);
-
-// 金属类型映射
-const typeMap = { 1: "au", 2: "pt", 3: "ag" };
-
-// 获取协议
-const content = ref("");
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "metal_exchange_content" }).then((res) => {
-    content.value = res.data?.content;
-  });
-}
-
-// 动态计算参数
-const feePerGram = computed(() => {
-  if (!metalConfigs.value.length) return "0.00";
-  const currentType = typeMap[tabsIndex.value];
-  const currentConfig = metalConfigs.value.find(
-    (item) => item.metalType === currentType
-  );
-  return currentConfig?.feePerGram
-    ? Number(currentConfig.feePerGram).toFixed(2)
-    : "0.00";
-});
-
-const lowest = computed(() => {
-  if (!metalConfigs.value.length) return 0;
-  const currentType = typeMap[tabsIndex.value];
-  const currentConfig = metalConfigs.value.find(
-    (item) => item.metalType === currentType
-  );
-  return currentConfig?.minimumWithdrawalWeight
-    ? Number(currentConfig.minimumWithdrawalWeight)
-    : 0;
-});
-
-const totalFee = computed(() => {
-  const fee = Number(feePerGram.value);
-  const weight = Number(extract.value);
-  return (fee * weight).toFixed(2);
-});
-
-const accountWeight = computed(() => {
-  const weightMap = {
-    1: appStore.userInfo.goldBalance || 0,
-    2: appStore.userInfo.ptBalance || 0,
-    3: appStore.userInfo.agBalance || 0,
-  };
-  return Number(weightMap[tabsIndex.value]).toFixed(2);
-});
-
-// 页面加载
-onLoad(() => {
-  if (appStore.isLogin) {
-    agreementGetoneFn();
-    metalConfigs.value = appStore.wxConfig?.metalConfigs || [];
-  } else {
-    toLogin();
-  }
-});
-
-// 监听wxConfig就绪
-watch(
-  isWxConfigReady,
-  (isReady) => {
-    if (isReady) {
-      metalConfigs.value = appStore.wxConfig?.metalConfigs || [];
-    }
-  },
-  { immediate: true }
-);
-
-// 切换金属类型
-const tabsChange = (item) => {
-  tabsIndex.value = item.key;
-  onKeyInput();
-};
-
-// 输入克重验证
-const onKeyInput = () => {
-  is_lowest.value = false;
-  is_out.value = false;
-
-  if (extract.value === null || extract.value === "" || isNaN(extract.value)) {
-    extract.value = 0;
-    is_lowest.value = true;
-    return;
-  }
-  const inputWeight = Number(extract.value);
-  const minWeight = lowest.value;
-  const accountWeightNum = Number(accountWeight.value);
-
-  const isBelowMin = inputWeight < minWeight;
-  const hasMoreDecimals = /\.\d{3,}$/.test(extract.value.toString());
-  if (isBelowMin || hasMoreDecimals) is_lowest.value = true;
-
-  if (inputWeight > accountWeightNum) is_out.value = true;
-};
-
-// 订单列表跳转
-const gotoOrderList = () => {
-  uni.navigateTo({
-    url: "/pages/users/vault/storeMetal/metalExchangeList",
-  });
-};
-
-// 参数校验
-const validateSubmitParams = () => {
-  if (!appStore.isLogin) return { valid: false, msg: "请先登录" };
-  if (is_out.value || is_lowest.value || extract.value <= 0)
-    return { valid: false, msg: "请输入有效克重" };
-  return { valid: true };
-};
-
-// 点击提交按钮
-const handleShowModel = async () => {
-  if (!appStore.userInfo.realNameVerified) {
-    uni.showToast({ title: "请先进行实名认证", icon: "none", duration: 2000 });
-    uni.navigateTo({ url: "/pages/users/face_detect/index" });
-    return;
-  }
-
-  const check = validateSubmitParams();
-  if (!check.valid) {
-    uni.showToast({ title: check.msg, icon: "none", duration: 2000 });
-    return;
-  }
-
-  calendarRef.value?.open();
-};
-
-// 日期确认回调
-const onDateConfirm = async (date) => {
-  const params = {
-    metalType: tabsIndex.value,
-    reservationDate: date,
-    reservedWeight: extract.value,
-    remark: remark.value,
-  };
-
-  try {
-    isSubmitting.value = true;
-    uni.showLoading({ title: "提交预约...", mask: true });
-    await createReservation(params);
-    uni.hideLoading();
-
-    uni.showToast({ title: "预约成功", icon: "success" });
-    setTimeout(() => {
-      gotoOrderList();
-    }, 1000);
-    extract.value = 0;
-  } catch (err) {
-    isSubmitting.value = false;
-    uni.hideLoading();
-    uni.showToast({ title: err || "提交失败,请重试", icon: "none" });
-  } finally {
-    isSubmitting.value = false;
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-$item-value-color: #dca537;
-$card-bcolor: #f8f8f8;
-
-page {
-  min-height: 95vh;
-  background-color: #f7f7f7;
-}
-.tabs {
-  display: flex;
-  height: 80rpx;
-  border-radius: 40rpx;
-  padding: 0 20rpx;
-  color: #fff;
-  font-size: 38rpx;
-  font-weight: 300;
-
-  .tabs-item {
-    width: 50%;
-    height: 100%;
-    display: flex;
-    justify-content: center;
-    position: relative;
-    color: #000000;
-  }
-
-  .active::after {
-    position: absolute;
-    bottom: 18rpx;
-    left: 50%;
-    transform: translateX(-50%);
-    content: "";
-    z-index: 20;
-    display: block;
-    width: 65rpx;
-    height: 6rpx;
-    background-color: #f8c007;
-  }
-}
-
-.order-list {
-  margin-top: 50rpx;
-  text-align: center;
-  color: #767676;
-  font-size: 30rpx;
-}
-
-.withdraw-bottom {
-  width: 100%;
-  margin-top: 10rpx;
-  margin-bottom: 100rpx;
-  display: flex;
-  justify-content: center;
-}
-
-.header {
-  padding-left: 5px;
-  position: relative;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 10px 10px;
-  border-radius: 5px;
-  font-size: 18px;
-
-  .live-gold {
-    font-weight: 0;
-    font-size: 30rpx;
-
-    .price {
-      color: #dcbe81;
-      margin-left: 10rpx;
-    }
-  }
-
-  .item {
-    display: flex;
-    align-items: center;
-    margin-top: 15px;
-
-    .targe {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      color: #fff;
-      width: 35px;
-      height: 35px;
-      border-radius: 50%;
-      background-color: #cc9933;
-    }
-
-    .address {
-      width: 440rpx;
-      margin: 0 10px;
-      font-size: 28rpx;
-
-      .receive-address {
-        letter-spacing: 9px;
-      }
-    }
-
-    .end {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-
-      .copy {
-        color: #888888;
-        border-radius: 3px;
-        border: 1px solid #888888;
-        font-size: 24rpx;
-        padding: 6rpx 23rpx;
-      }
-    }
-  }
-
-  &::before {
-    position: absolute;
-    top: 50%;
-    transform: translatey(-50%);
-    left: 0;
-    content: "";
-    width: 2px;
-    height: 15px;
-    background-color: #daa520;
-  }
-
-  .title {
-    font-weight: 500;
-    font-size: 32rpx;
-    font-family: "黑体";
-  }
-}
-
-.gold-box {
-  padding: 30rpx 20rpx;
-}
-
-.gold-item {
-  margin: 0 0 25rpx 0;
-}
-
-.input-box {
-  display: flex;
-  background-color: #ededed;
-  border-radius: 5px;
-  height: 90rpx;
-  align-items: center;
-  justify-content: space-around;
-  font-size: 28rpx;
-  padding-left: 20rpx;
-  margin-top: 50rpx;
-
-  input {
-    width: 90%;
-  }
-}
-
-.address {
-  width: 690rpx;
-  max-height: 180rpx;
-  margin: 40rpx 0;
-  padding: 28rpx;
-  box-sizing: border-box;
-  border-radius: 30rpx;
-
-  .addressCon {
-    width: 596rpx;
-    font-size: 26rpx;
-    color: #666;
-
-    .name {
-      font-size: 30rpx;
-      color: #282828;
-      font-weight: bold;
-      margin-bottom: 10rpx;
-
-      .phone {
-        margin-left: 50rpx;
-      }
-    }
-
-    .default {
-      margin-right: 12rpx;
-    }
-
-    .setaddress {
-      color: #333;
-      font-size: 28rpx;
-    }
-  }
-
-  .iconfont {
-    font-size: 35rpx;
-    color: #707070;
-  }
-}
-.content-top {
-  border-radius: 30rpx;
-  background: $card-bcolor;
-  margin-bottom: 20rpx;
-
-  .section {
-    .section-title {
-      font-size: 32rpx;
-      font-weight: bold;
-      margin-bottom: 24rpx;
-      position: relative;
-      padding-left: 20rpx;
-
-      &::after {
-        position: absolute;
-        top: 0;
-        left: 0;
-        height: 100%;
-        width: 3px;
-        background: $item-value-color;
-        content: "";
-      }
-    }
-
-    .courier-list {
-      display: flex;
-      justify-content: space-between;
-      padding-bottom: 16rpx;
-
-      .courier-item {
-        display: flex;
-        flex-direction: column;
-        align-items: center;
-        min-width: 160rpx;
-        margin-right: 24rpx;
-        padding: 24rpx 20rpx;
-        border: 2rpx solid #eee;
-        border-radius: 12rpx;
-        cursor: pointer;
-        position: relative;
-
-        .gou {
-          position: absolute;
-          width: 40rpx;
-          height: 40rpx;
-          right: -7rpx;
-          bottom: -7rpx;
-          border-radius: 50%;
-          right: -6rpx;
-          bottom: -6rpx;
-        }
-
-        &.active {
-          border-color: #dbb870;
-        }
-
-        .courier-logo {
-          width: 120rpx;
-          height: 120rpx;
-          margin-bottom: 8rpx;
-        }
-
-        .courier-name {
-          font-size: 26rpx;
-        }
-      }
-    }
-  }
-}
-
-.withdraw {
-  height: 100%;
-  background-size: 100% 40%;
-  background: $uni-bg-primary !important;
-  .withdrawContent {
-    height: 90%;
-    padding: 45rpx 40rpx;
-    background-color: #f7f7f7;
-    top: 150rpx;
-    position: relative;
-    border-radius: 50rpx 50rpx 0 0;
-  }
-
-  .withdrawBody {
-    background-color: #fff;
-    padding: 20px 30px;
-    font-size: 14px;
-
-    .inputMoney {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      font-weight: 600;
-      border-bottom: 1px solid #eaeef1;
-
-      .rmb {
-        font-size: 16px;
-      }
-
-      .tInput {
-        height: 1.9em;
-        font-size: 2.5em;
-        border: none;
-        position: relative;
-        left: 3.5%;
-        outline: none;
-      }
-    }
-  }
-}
-
-.infoMoney {
-  margin-top: 10px;
-  font-size: 12px;
-  margin-bottom: 20px;
-
-  .infoMoneyNum {
-    color: #b2b2b2;
-    font-size: 26rpx;
-  }
-
-  .infoTip {
-    color: red;
-    font-size: 23rpx;
-    margin-top: 10rpx;
-  }
-}
-
-.agreement {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding: 10px;
-
-  .chooseIcon {
-    width: 16px;
-    height: 16px;
-  }
-
-  .agreementText {
-    font-size: 14px;
-    margin-left: 10px;
-    color: #999999;
-
-    .agreementLink {
-      color: #dca12b;
-    }
-  }
-}
-
-.submitBtn {
-  button {
-    background-color: #dca12b;
-    color: #fff;
-    width: 380rpx;
-    height: 72rpx;
-    display: flex;
-    font-size: 30rpx;
-    justify-content: center;
-    align-items: center;
-    border-radius: 30rpx;
-  }
-}
-
-.submitBtnActive {
-  button {
-    color: #fff;
-    background: #ffe079;
-    box-shadow: 0 10rpx 8rpx rgba(207, 6, 6, 0.05);
-  }
-}
-
-.signContent {
-  background-color: #f8f8f8;
-  padding: 20px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-radius: 20px 20px 0 0;
-
-  .scrollView {
-    background-color: #fff;
-    padding: 4px;
-    height: 300px;
-    overflow-y: hidden;
-    border: 1px solid #dfdfdf;
-  }
-
-  .confirmBtn {
-    margin-top: 10px;
-    color: #fff;
-    padding: 4px 20px;
-    border-radius: 20px;
-    background: linear-gradient(to right, #8ed187, #5dd665);
-  }
-}
-</style>

+ 0 - 503
pages/users/vault/storeMetal/metalExchangeList.vue

@@ -1,503 +0,0 @@
-<template>
-  <view class="container">
-    <view class="tabs-container">
-      <view
-        class="tab-item"
-        :class="{ active: currentTab === 0 }"
-        @click="switchTab(0)"
-      >
-        预约订单
-      </view>
-      <view
-        class="tab-item"
-        :class="{ active: currentTab === 1 }"
-        @click="switchTab(1)"
-      >
-        提料订单
-      </view>
-    </view>
-
-    <z-paging
-      class="paging-box"
-      ref="pagingRef"
-      use-page-scroll
-      v-model="currentList"
-      @query="handleQuery"
-      @refresherTouchend="refresherTouchend"
-      :fixed="false"
-      :empty-view-text="getEmptyText()"
-    >
-      <view
-        class="list-item"
-        v-for="(item, index) in combineList"
-        :key="index"
-        :class="{ 'reservation-item': currentTab === 0 }"
-      >
-        <view class="item-top">
-          <view class="item-left">
-            <view class="item-detail">
-              <text class="detail-label">
-                金属类型:<span class="detail-value">{{
-                  item.metalTypeMsg
-                }}</span>
-              </text>
-              <text class="detail-label" style="margin-left: 20rpx">
-                克重:{{ item.weight }}g
-              </text>
-            </view>
-            <view v-if="currentTab === 0" class="item-time">
-              预约日期:{{ item.reservationDate }}
-            </view>
-            <view
-              v-if="currentTab === 1"
-              class="item-time"
-              @click="copy(item.expressNo)"
-            >
-              快递单号:{{ item.expressNo || "发货后将在此处显示快递单号" }}
-            </view>
-            <view class="item-time">创建时间:{{ item.createTime }}</view>
-          </view>
-          <view v-if="currentTab === 0" class="item-status-tag">
-            <view class="status-tag" :class="getStatusClass(item.status)">
-              {{ getStatusText(item.status) }}
-            </view>
-          </view>
-          <view v-if="currentTab === 1" class="item-amount">
-            金价¥{{ item.realTimePrice }}/g
-          </view>
-        </view>
-
-        <!-- 预约订单底部操作栏:取消订单(始终显示)+ 前往提料 -->
-        <view v-if="currentTab === 0" class="item-operation">
-          <!-- 取消订单:根据status控制可点击和颜色 -->
-          <button
-            class="cancel-btn"
-            :class="{ 'cancel-btn--disabled': item.status !== 1 }"
-            :disabled="item.status !== 1"
-            @click="handleCancelReservation(item.reservationId)"
-          >
-            取消订单
-          </button>
-          <!-- 前往提料:根据status + 时间控制可点击和颜色 -->
-          <button
-            class="withdraw-btn"
-            :class="{
-              'withdraw-btn--disabled':
-                item.status !== 1 || !canGoToWithdraw(item.reservationDate),
-            }"
-            :disabled="
-              item.status !== 1 || !canGoToWithdraw(item.reservationDate)
-            "
-            @click="gotoWithdraw(item)"
-          >
-            前往提料
-          </button>
-        </view>
-      </view>
-    </z-paging>
-  </view>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import useZPaging from "@/uni_modules/z-paging/components/z-paging/js/hooks/useZPaging.js";
-import { useAppStore } from "@/stores/app";
-import { useToast } from "@/hooks/useToast";
-import { getUserInfo } from "@/api/user";
-import {
-  getMetalOrderList,
-  getMyReservations,
-  cancelReservation,
-} from "@/api/vault";
-
-const appStore = useAppStore();
-const { Toast } = useToast();
-const pagingRef = ref(null);
-useZPaging(pagingRef);
-
-// tabs状态
-const currentTab = ref(0); // 0-预约订单 1-提料订单
-const reservationList = ref([]); // 预约订单数据
-const recordList = ref([]); // 提料订单原始数据
-
-// 金属类型映射
-const metalTypeMap = {
-  1: "黄金",
-  2: "铂金",
-  3: "白银",
-};
-
-// 根据当前tab返回对应的数据列表
-const currentList = computed(() => {
-  return currentTab.value === 0 ? reservationList.value : recordList.value;
-});
-
-// 处理列表数据格式化
-const combineList = computed(() => {
-  if (currentTab.value === 0) {
-    return reservationList.value.map((item) => ({
-      ...item,
-      orderNo: item.reservationNo || item.id,
-      weight: item.reservedWeight,
-      metalTypeMsg: metalTypeMap[item.metalType] || "未知金属",
-      reservationDate: item.reservationDate,
-      createTime: item.createTime,
-      status: item.status,
-      reservationId: item.id || item.reservationId,
-      metalType: item.metalType,
-    }));
-  } else {
-    return recordList.value.map((item) => ({
-      ...item,
-      orderNo: item.orderNo,
-      amount: item.totalAmount,
-      weight: item.plateWeight,
-      metalTypeMsg:
-        item.metalTypeName || metalTypeMap[item.metalType] || "未知金属",
-      expressName: item.expressCompanyName || "未选择",
-      createTime: item.createTime,
-      realTimePrice: item.realTimePrice,
-      expressNo: item.expressNo,
-    }));
-  }
-});
-
-// 切换tabs
-const switchTab = (tabIndex) => {
-  currentTab.value = tabIndex;
-  pagingRef.value?.reload();
-};
-
-// 空状态文本
-const getEmptyText = () => {
-  return currentTab.value === 0 ? "暂无预约订单" : "暂无提料兑换订单";
-};
-
-// 预约状态文本映射
-const getStatusText = (status) => {
-  const statusMap = {
-    1: "已预约",
-    2: "已完成",
-    3: "已取消",
-  };
-  return statusMap[status] || "未知状态";
-};
-
-// 预约状态标签样式
-const getStatusClass = (status) => {
-  const classMap = {
-    1: "status-reserved", // 已预约-绿色
-    2: "status-completed", // 已完成-蓝色
-    3: "status-canceled", // 已取消-灰色
-  };
-  return classMap[status] || "";
-};
-
-// 判断是否可点击「前往提料」(仅status=1时判断时间)
-const canGoToWithdraw = (reservationDate) => {
-  if (!reservationDate) return false;
-  const reserveDate = new Date(reservationDate).getTime();
-  const endTime = reserveDate + 24 * 60 * 60 * 1000;
-  const now = new Date().getTime();
-  return now > reserveDate && now < endTime;
-};
-
-// 前往提料页面
-const gotoWithdraw = (item) => {
-  uni.redirectTo({
-    url: `/pages/users/vault/storeMetal/metalExchangeWithdraw?metalType=${item.metalType}&weight=${item.weight}&reservationId=${item.reservationId}`,
-  });
-};
-
-// 统一查询入口
-const handleQuery = async (page, pageSize) => {
-  if (currentTab.value === 0) {
-    await queryReservationList(page, pageSize);
-  } else {
-    await queryMaterialOrderList(page, pageSize);
-  }
-};
-
-// 查询预约订单列表
-const queryReservationList = async (page, pageSize) => {
-  try {
-    const params = { page, pageSize, uid: appStore.uid };
-    const res = await getMyReservations(params);
-    const newList = res?.data?.list || [];
-    reservationList.value =
-      page === 1 ? newList : [...reservationList.value, ...newList];
-    const total = res?.data?.total || 0;
-    pagingRef.value?.complete(reservationList.value, total);
-  } catch (error) {
-    console.error("预约订单查询失败:", error);
-    pagingRef.value?.complete(false);
-    Toast({ title: "查询失败,请稍后重试" });
-  }
-};
-
-// 查询提料订单列表
-const queryMaterialOrderList = async (page, pageSize) => {
-  try {
-    const params = { page, pageSize, uid: appStore.uid, userId: appStore.uid };
-    const res = await getMetalOrderList(params);
-    const newList = res?.data?.list || [];
-    recordList.value = page === 1 ? newList : [...recordList.value, ...newList];
-    const total = res?.data?.total || 0;
-    pagingRef.value?.complete(recordList.value, total);
-  } catch (error) {
-    console.error("提料兑换订单查询失败:", error);
-    pagingRef.value?.complete(false);
-    Toast({ title: "查询失败,请稍后重试" });
-  }
-};
-
-// 取消预约操作(仅status=1时触发,已通过按钮disabled控制)
-const handleCancelReservation = async (reservationId) => {
-  uni.showModal({
-    title: "提示",
-    content: "确定要取消该预约吗?取消后将无法恢复",
-    confirmText: "确认取消",
-    cancelText: "取消",
-    success: async (res) => {
-      if (res.confirm) {
-        try {
-          uni.showLoading({ title: "处理中...", mask: true });
-          await cancelReservation(reservationId);
-          uni.showToast({ title: "取消成功", icon: "success" });
-          pagingRef.value?.reload();
-        } catch (error) {
-          console.error("取消预约失败:", error);
-          uni.showToast({ title: "取消失败,请稍后重试", icon: "none" });
-        } finally {
-          uni.hideLoading();
-        }
-      }
-    },
-  });
-};
-
-onLoad(() => {
-  pagingRef.value?.reload();
-});
-
-// 复制快递单号
-const copy = (expressNo) => {
-  if (!expressNo) return;
-  uni.setClipboardData({
-    data: expressNo,
-    success: () => uni.showToast({ title: "复制成功", icon: "success" }),
-    fail: (err) => {
-      uni.showToast({ title: "复制失败", icon: "none" });
-      console.error("复制失败:", err);
-    },
-  });
-};
-</script>
-
-<style lang="scss" scoped>
-$primary-color: #e9c279;
-$text-color: #333;
-$text-secondary: #666;
-$text-light: #999;
-$bg-color: #f5f5f5;
-$white: #fff;
-$cancel-color: #ff1e0f; // 取消按钮-启用色
-$cancel-disabled-color: #ccc; // 取消按钮-禁用色
-$withdraw-color: #007aff; // 提料按钮-启用色
-$withdraw-disabled-color: #ccc; // 提料按钮-禁用色
-
-// tabs样式
-.tabs-container {
-  display: flex;
-  height: 80rpx;
-  background-color: $white;
-  border-radius: 10rpx;
-  margin-bottom: 20rpx;
-  overflow: hidden;
-
-  .tab-item {
-    flex: 1;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    font-size: 30rpx;
-    color: $text-secondary;
-    position: relative;
-
-    &.active {
-      color: $primary-color;
-      font-weight: 500;
-
-      &::after {
-        content: "";
-        position: absolute;
-        bottom: 0;
-        left: 0;
-        width: 100%;
-        height: 4rpx;
-        background-color: $primary-color;
-      }
-    }
-  }
-}
-
-// 页面容器
-.container {
-  min-height: 100vh;
-  overflow: hidden;
-  background: $bg-color;
-  padding: 20rpx;
-}
-
-// 分页列表容器
-.paging-box {
-  min-height: 60vh;
-}
-
-// 通用列表项样式
-.list-item {
-  background: $white;
-  margin-bottom: 20rpx;
-  border-radius: 16rpx;
-  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
-}
-
-// 预约订单卡片专用样式
-.reservation-item {
-  display: flex;
-  flex-direction: column;
-  gap: 20rpx;
-}
-
-// 卡片顶部区域
-.item-top {
-  display: flex;
-  padding: 30rpx 25rpx;
-  padding-bottom: 0;
-  justify-content: space-between;
-  align-items: flex-start;
-}
-
-// 左侧信息区域
-.item-left {
-  flex: 1;
-
-  .item-detail {
-    margin-bottom: 15rpx;
-    font-size: 26rpx;
-
-    .detail-label {
-      color: $text-secondary;
-    }
-
-    .detail-value {
-      color: $primary-color !important;
-    }
-  }
-
-  .item-time {
-    font-size: 22rpx;
-    color: $text-light;
-    margin-bottom: 8rpx;
-  }
-}
-
-// 预约订单右上角状态标签
-.item-status-tag {
-  display: flex;
-  align-items: flex-start;
-}
-
-// 提料订单右上角金价
-.item-amount {
-  font-size: 26rpx;
-  font-weight: 500;
-  color: $primary-color;
-}
-
-// 预约状态标签样式
-.status-tag {
-  width: 120rpx;
-  text-align: center;
-  padding: 4rpx 0;
-  border-radius: 20rpx;
-  font-size: 22rpx;
-  color: $white;
-
-  &.status-reserved {
-    background-color: #4cd964;
-  }
-
-  &.status-completed {
-    background-color: #007aff;
-  }
-
-  &.status-canceled {
-    background-color: $text-light;
-  }
-}
-
-// 预约订单底部操作栏
-.item-operation {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  height: 50rpx;
-  border-top: 1px solid #f5f5f5;
-}
-
-// 取消订单按钮-基础样式
-.cancel-btn {
-  flex: 1;
-  height: 100%;
-  background-color: $cancel-color;
-  color: $white;
-  font-size: 24rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border: none;
-  padding: 0;
-  cursor: pointer;
-
-  &::after {
-    border: none;
-  }
-}
-
-// 取消订单按钮-禁用样式
-.cancel-btn--disabled {
-  background-color: $cancel-disabled-color;
-  color: #fff;
-  cursor: not-allowed; // 鼠标禁用样式
-  opacity: 0.8;
-}
-
-// 前往提料按钮-基础样式
-.withdraw-btn {
-  flex: 1;
-  height: 100%;
-  background-color: $withdraw-color;
-  color: $white;
-  font-size: 24rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border: none;
-  padding: 0;
-  cursor: pointer;
-
-  &::after {
-    border: none;
-  }
-}
-
-// 前往提料按钮-禁用样式
-.withdraw-btn--disabled {
-  background-color: $withdraw-disabled-color;
-  color: #fff;
-  cursor: not-allowed;
-  opacity: 0.8;
-}
-</style>

File diff suppressed because it is too large
+ 0 - 614
pages/users/vault/storeMetal/metalExchangeWithdraw.vue


+ 0 - 500
pages/users/vault/storeMetal/nonLogisticsGold.vue

@@ -1,500 +0,0 @@
-<template>
-  <view class="withdraw">
-    <view class="content">
-      <view class="withdraw-body">
-        <view class="gold-box">
-          <view class="gold-item">
-            <view class="header">
-              <h3 class="title">存金克重</h3>
-              <view class="live-gold">
-                实时金价
-                <text class="price">{{ viprealGoldprice.toFixed(2) }}</text>
-              </view>
-            </view>
-
-            <view class="input-box">
-              <input
-                type="text"
-                class="inpu-box-ds"
-                placeholder="请输入克重"
-                v-model="extract"
-                @input="onKeyInput"
-                placeholder-style="color: #999999; font-size: 28rpx;"
-              />
-            </view>
-            <view class="header">
-              <span class="title">淘宝订单号</span>
-            </view>
-            <view class="input-box">
-              <input
-                type="text"
-                class="inpu-box-ds"
-                placeholder="请输入淘宝定单号"
-                v-model="expressNo"
-                @input="onKeyInput"
-                placeholder-style="color: #999999; font-size: 28rpx;"
-              />
-            </view>
-          </view>
-        </view>
-        <view class="info-money" style="font-size: 16px">
-          <text class="info-money-num" v-if="extract"
-            >预存金额= {{ extract }} * {{ viprealGoldprice.toFixed(2) }} =
-            {{ totalPrice }}元</text
-          >
-          <text class="info-money-num" v-else>预存金额0元</text>
-        </view>
-        <view class="img-container">
-          <view class="img-title">
-            <span class="title">实物图片</span>
-          </view>
-          <view class="img-box" style="margin-top: 10px">
-            <view class="upload-box">
-              <up-upload
-                :fileList="imageList"
-                uploadIcon="plus"
-                @afterRead="afterRead"
-                @delete="deletePic"
-                name="1"
-                multiple
-                :maxCount="3"
-              >
-                <template #trigger>
-                  <view class="upload-block">
-                    <uni-icons
-                      size="38"
-                      color="#ccc"
-                      type="plusempty"
-                    ></uni-icons>
-                  </view>
-                </template>
-              </up-upload>
-            </view>
-          </view>
-        </view>
-        <view class="submit-box">
-          <view
-            style="margin-top: 10px"
-            class="submit"
-            @click="handleShowModel"
-          >
-            <image class="btn" src="/static/images/sb_btn.png"></image>
-            <text class="btn-text">点击提交</text>
-          </view>
-          <view class="aggregate" @click="aggregate = !aggregate">
-            <image
-              class="choose"
-              :src="
-                aggregate
-                  ? '/static/recycle/choose.png'
-                  : '/static/recycle/nochoose.png'
-              "
-              mode="scaleToFill"
-            ></image>
-            <view class="aggre">
-              阅读并同意
-              <span class="aggre-text" @click="showAggre">《存金协议》</span>
-            </view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <uni-popup
-      ref="singPopup"
-      type="bottom"
-      borderRadius="10px 10px 0 0"
-      maskBackgroundColor="rgba(0,0,0,0)"
-    >
-      <view class="signContent">
-        <scroll-view scrollY class="scroll">
-          <up-parse :content="agreement"></up-parse>
-        </scroll-view>
-        <view
-          class="comfireBtn footer"
-          @click="
-            aggregate = true;
-            $refs.singPopup.close();
-          "
-        >
-          我已详细知悉
-        </view>
-      </view>
-    </uni-popup>
-  </view>
-</template>
-
-<script setup>
-import { ref, computed, watch } from "vue";
-import { onLoad, onShow } from "@dcloudio/uni-app";
-
-import { noLogisticsCreateAPI } from "@/api/functions";
-import { useImageUpload } from "@/hooks/useImageUpload";
-import { agreementGetoneApi } from "@/api/user";
-const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
-  pid: 9,
-  model: "gold",
-});
-const maoding = ref(0);
-const props = defineProps(["viprealGoldprice"]);
-const singPopup = ref(null);
-const agreement = ref("");
-const type = ref("store"); // 初始值与原data一致
-const is_lock = ref(false);
-const needPrice = ref(0);
-const extract = ref(null);
-const is_post = ref(false);
-const totalPrice = ref(0);
-const aggregate = ref(false);
-const expressNo = ref("");
-
-// 获取协议
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "saveGold" }).then((res) => {
-    agreement.value = res.data?.content;
-  });
-}
-// 页面生命周期(对应原onLoad)
-onShow(() => {});
-const showAggre = () => {
-  agreementGetoneFn();
-  singPopup.value?.open();
-};
-
-// 提交存金
-const handleShowModel = async () => {
-  if (!extract.value) {
-    return uni.showToast({
-      title: "请输入克重",
-      duration: 2000,
-      icon: "none",
-    });
-  }
-  if (!expressNo.value) {
-    return uni.showToast({
-      title: "请输入快递单号",
-      duration: 2000,
-      icon: "none",
-    });
-  }
-  const res = await noLogisticsCreateAPI({
-    depositWeight: extract.value,
-    image: imageList.value.map((v) => v.info.url),
-    taobaoOrderNo: expressNo.value,
-  });
-  uni.showToast({ title: "下单成功!" });
-
-  setTimeout(() => {
-    uni.navigateTo({
-      url: "/pages/users/vault/index",
-    });
-  }, 1000);
-};
-watch(
-  () => extract.value,
-  (val) => {
-    if (val) {
-      totalPrice.value = (
-        Number(extract.value) * Number(props.viprealGoldprice)
-      ).toFixed(2);
-      is_post.value = true;
-    } else {
-      is_post.value = false;
-    }
-  },
-  { immediate: true }
-);
-</script>
-
-<style lang="scss" scoped>
-.upload-box {
-  .upload-block {
-    width: 160rpx;
-    height: 160rpx;
-    border: 1px solid #ccc;
-    border-radius: 10rpx;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #ccc;
-    font-weight: 700;
-    font-size: 26rpx;
-  }
-}
-.info-money-num {
-  color: #999999;
-  font-size: 26rpx;
-}
-
-.submit-box {
-  margin-top: 300rpx;
-}
-
-.submit {
-  width: 100%;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  position: relative;
-  .btn {
-    width: 267rpx;
-    height: 71rpx;
-  }
-  .btn-text {
-    font-size: 30rpx;
-    color: #000;
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-  }
-}
-
-.header {
-  padding-left: 5px;
-  position: relative;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 10px 10px;
-  border-radius: 5px;
-  // background-color: #fff;
-  // font-weight: bold;
-  font-size: 18px;
-
-  .live-gold {
-    font-weight: 500;
-    font-size: 32rpx;
-    font-family: "黑体";
-
-    .price {
-      // color: #d0a34a;
-      color: $txt-color;
-      margin-left: 10rpx;
-      font-weight: bold;
-      font-size: 38rpx;
-    }
-  }
-
-  .item {
-    display: flex;
-    align-items: center;
-    margin-top: 15px;
-
-    .targe {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      color: #fff;
-      width: 35px;
-      height: 35px;
-      border-radius: 50%;
-      background-color: #cc9933;
-    }
-
-    .address {
-      width: 440rpx;
-      margin: 0 10px;
-      font-size: 28rpx;
-
-      .receive-address {
-        letter-spacing: 9px;
-      }
-    }
-
-    .end {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-
-      .copy {
-        color: #888888;
-        border-radius: 3px;
-        border: 1px solid #888888;
-        font-size: 24rpx;
-        padding: 6rpx 23rpx;
-      }
-    }
-  }
-
-  &::before {
-    position: absolute;
-    /*绝对定位*/
-    top: 50%;
-    /*Y轴方向偏移自身高度的50%*/
-    transform: translatey(-50%);
-    /*Y轴方向偏移微调*/
-    left: 0;
-    /*紧靠容器左边缘*/
-    content: "";
-    /*伪元素需要有内容才能显示*/
-    width: 2px;
-    /*伪元素宽度*/
-    height: 15px;
-    /*伪元素高度*/
-    background-color: #f8c007;
-    /*伪元素颜色*/
-  }
-
-  .title {
-    font-weight: 500;
-    font-size: 32rpx;
-    font-family: "黑体";
-  }
-}
-
-.gold-box {
-  padding-top: 30rpx;
-  .gold-item {
-    .input-box {
-      display: flex;
-      background-color: #ededed;
-      border-radius: 5px;
-      height: 90rpx;
-      align-items: center;
-      justify-content: space-around;
-      font-size: 28rpx;
-
-      margin: 20rpx 0;
-
-      // color:#c7c7c7 ;
-      input {
-        padding-left: 12rpx;
-        width: 92%;
-      }
-    }
-  }
-}
-
-.img-container {
-  padding: 30rpx 0;
-
-  .img-title {
-    padding-left: 5px;
-    position: relative;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    padding: 10px 10px;
-    border-radius: 5px;
-    font-weight: 500;
-    font-size: 32rpx;
-    font-family: "黑体";
-
-    &::before {
-      position: absolute;
-      top: 50%;
-      transform: translatey(-50%);
-      left: 0;
-      content: "";
-      width: 2px;
-      height: 15px;
-      background-color: #daa520;
-    }
-  }
-}
-
-.withdraw {
-  height: 100%;
-  background-color: #f7f7f7;
-  min-height: 100%;
-
-  border-radius: 10px 10px 0 0;
-  position: relative;
-  // top: -20rpx;
-  padding: 0 25rpx;
-  top: -67rpx;
-
-  &-body {
-    // background-color: #fff;
-    padding: 0 28rpx;
-    font-size: 14px;
-
-    .input-money {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      font-weight: 600;
-      border-bottom: 1px solid #eaeef1;
-
-      .rmb {
-        font-size: 16px;
-      }
-
-      .t-input {
-        height: 1.9em;
-        font-size: 2.5em;
-        border: none;
-        position: relative;
-        left: 3.5%;
-        outline: none;
-      }
-    }
-
-    .info-money {
-      font-size: 26rpx;
-      margin-left: 34rpx;
-      &-num {
-        color: #c9c9c9;
-      }
-    }
-
-    .aggregate {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      padding: 10px;
-
-      .aggre {
-        font-size: 28rpx;
-        margin-left: 10px;
-        color: #929292;
-
-        .aggre-text {
-          color: #cc9933;
-        }
-      }
-    }
-
-    .choose {
-      width: 16px;
-      height: 16px;
-    }
-  }
-}
-
-.tx-active {
-  button {
-    color: #fff;
-    background: #c4bba6;
-  }
-}
-
-.signContent {
-  background-color: #f8f8f8;
-  padding: 20px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-radius: 20px 20px 0 0;
-
-  .scroll {
-    // background-color: #fff;
-    padding: 4px;
-    height: 300px;
-    overflow-y: hidden;
-    border: 1px solid #dfdfdf;
-  }
-
-  .footer {
-    margin-top: 10px;
-    color: #fff;
-    padding: 4px 20px;
-    border-radius: 20px;
-    background: linear-gradient(to right, #8ed187, #5dd665);
-  }
-}
-</style>

+ 0 - 359
pages/users/vault/storeMetal/order.vue

@@ -1,359 +0,0 @@
-<template>
-  <view class="list-page">
-    <view class="tabs-box">
-      <up-tabs :list="list" @click="tabsChange" lineColor="#f8c20f"></up-tabs>
-    </view>
-    <view v-if="orderList.length === 0" class="empty">
-      <image
-        style="width: 60%"
-        src="https://mp-ad17e5cd-05c1-4df9-b060-556e25dac130.cdn.bspapp.com/mini/common/empty.png"
-        mode="widthFix"
-      ></image>
-      <text>暂无订单~</text>
-    </view>
-    <view v-else class="inner">
-      <view
-        v-for="(item, index) in orderList"
-        :key="index"
-        class="block"
-        @click="nativeTo(item)"
-      >
-        <view class="header">
-          <view class="title">订单号:{{ item.orderNo }}</view>
-          <view class="tag" :class="['status' + item.status]">
-            {{ getOrderType(item.status) }}
-          </view>
-        </view>
-        <view class="detail">
-          <image
-            style="width: 50px; height: 50px; border-radius: 6px"
-            :src="item.images[0] || emptyImg"
-            mode="scaleToFill"
-            v-if="item.images"
-            @click="previewImage(item.images)"
-          ></image>
-        </view>
-
-        <view class="end">
-          <view>
-            <view class="desc">
-              订单自估重量:
-              <span
-                class="price"
-                v-for="(i, index) in item.goldMaterials"
-                :key="index"
-                >{{ `${getCate(i.type)}${i.weight}g` }}</span
-              >
-            </view>
-          </view>
-          <view class="desc">
-            <view class="">下单时间:{{ item.createTime }}</view>
-          </view>
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { ref } from "vue";
-import {
-  onLoad,
-  onShow,
-  onPullDownRefresh,
-  onReachBottom,
-} from "@dcloudio/uni-app";
-import { depositPageAPI } from "@/api/functions";
-import { useAppStore } from "@/stores/app";
-const appStore = useAppStore();
-// 响应式变量(替代 Vue2 的 data)
-const list = ref([
-  { name: "全部", status: "" },
-  { name: "待签收", status: 0 },
-  { name: "待检测", status: 1 },
-  { name: "待确认", status: 2 },
-  { name: "已完成", status: 4 },
-]);
-const options = ref({ status: 0 });
-const orderList = ref([]);
-const emptyImg = ref(
-  "https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/example1.png"
-);
-
-const params = ref({
-  page: 1,
-  limit: 20,
-  status: "",
-  // userId: appStorze.userInfo.userId,
-});
-const total = ref(0);
-const loading = ref(false); // 加载状态
-const hasMore = ref(true); // 是否还有更多数据
-
-onShow((options) => {
-  console.log(1111);
-  params.value.page = 1;
-  getOrderList();
-});
-const getOrderList = async (isRefresh = false) => {
-  if (loading.value) return;
-  loading.value = true;
-  uni.showLoading({
-    title: "加载中",
-  });
-  try {
-    const res = await depositPageAPI(params.value);
-    console.log(res);
-
-    const newList = res.data.list.map((v) => {
-      return {
-        ...v,
-        images: JSON.parse(v.expressImage),
-      };
-    });
-
-    if (isRefresh) {
-      orderList.value = newList;
-    } else {
-      // 避免重复添加
-      if (params.value.page === 1) {
-        orderList.value = newList;
-      } else {
-        orderList.value = [...orderList.value, ...newList];
-      }
-    }
-    total.value = res.data.total;
-    // 判断是否还有更多数据
-    hasMore.value = orderList.value.length < total.value;
-    uni.hideLoading();
-  } catch (error) {
-    console.error("获取订单列表失败:", error);
-    uni.showToast({
-      title: "加载失败",
-      icon: "none",
-    });
-  } finally {
-    loading.value = false;
-    // 停止下拉刷新动画
-    if (isRefresh) {
-      uni.stopPullDownRefresh();
-    }
-  }
-};
-// 其他生命周期
-onPullDownRefresh(() => {
-  // 下拉刷新逻辑(保持原有空实现,可根据需求补充)
-  params.value.page = 1;
-  getOrderList();
-  uni.stopPullDownRefresh();
-});
-
-onReachBottom(() => {
-  // 如果没有更多数据或正在加载中,则不执行
-  if (!hasMore.value || loading.value) return;
-
-  // 增加页码
-  params.value.page++;
-  // 加载下一页数据
-  getOrderList();
-});
-
-onShow(() => {
-  // 页面显示时逻辑(保持原有空实现,可根据需求补充)
-});
-
-// 标签页切换
-const tabsChange = (item) => {
-  params.value.status = item.status;
-  params.value.page = 1;
-  getOrderList();
-};
-// 跳转详情页(原 methods 中的 nativeTo)
-const nativeTo = (item) => {
-  if (item.status === 2 || item.status == 3 || item.status == 4) {
-    uni.navigateTo({
-      url: `/pages/users/vault/storeMetal/gmReport?orderInfo=${encodeURIComponent(
-        JSON.stringify(item)
-      )}`,
-    });
-  }
-};
-
-// 获取商品类别(原 methods 中的 getCate)
-const getCate = (cate) => {
-  switch (cate) {
-    case 1:
-      return "黄金";
-    case 3:
-      return "白银";
-    case 2:
-      return "铂金";
-    case 4:
-      return "K金";
-    default:
-      return ""; // 增加默认值,避免 undefined
-  }
-};
-
-// 获取订单状态文本(原 methods 中的 getOrderType)
-const getOrderType = (status) => {
-  switch (status) {
-    case 0:
-      return "待签收";
-    case 1:
-      return "待检测";
-    case 2:
-      return "待确认";
-    case 3:
-      return "待充值";
-    case 4:
-      return "已完成";
-    default:
-      return "-"; // 增加默认值,避免 undefined
-  }
-};
-const previewImage = (urls) => {
-  uni.previewImage({
-    current: urls[0],
-    urls: urls, // 需要预览的图片URL列表
-    success: () => {},
-    fail: (err) => {
-      console.error("预览图片失败:", err);
-    },
-  });
-};
-</script>
-
-<style scoped lang="scss">
-.list-page {
-  // min-height: 100vh;
-  background: $uni-bg-primary !important;
-}
-
-.tabs-box {
-  width: 100%;
-  height: 75rpx;
-  // background: #ffffff;
-  box-sizing: border-box;
-  ::v-deep .u-tabs__wrapper__nav__item {
-    padding: 0 37rpx;
-  }
-}
-
-.empty {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  color: #fff;
-}
-.tabs {
-  z-index: 100;
-  position: sticky;
-}
-.inner {
-  padding: 10px;
-  .footer {
-    border-radius: 5px;
-    border: 0 0 10px 20px;
-    color: #707070;
-    font-size: 12px;
-    padding: 10px;
-    background-color: rgb(252, 247, 230);
-  }
-}
-.block {
-  margin-bottom: 10px;
-  padding-top: 10px;
-  border-radius: 5px;
-  background-color: #fff;
-  border: 2px solid #eee;
-  box-shadow: 0 10rpx 8rpx rgba(100, 88, 88, 0.05);
-  .header {
-    padding: 0 10px;
-    position: relative;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    padding-bottom: 10px;
-    border-bottom: 1px solid #eee;
-    .tag {
-      font-size: 12px;
-      padding: 2px 5px;
-      border-radius: 4px;
-      color: #ff0800;
-      background-color: #ffcece;
-      &.status-1 {
-        color: #555;
-        background-color: #eeeeee;
-      }
-      &.status1 {
-        color: #ff9900;
-        background-color: #ffeccf;
-      }
-      &.status2 {
-        color: #d6006b;
-        background-color: #fdd3e9;
-      }
-      &.status3 {
-        color: #9900ff;
-        background-color: #e2b7ff;
-      }
-      &.status4 {
-        color: rgb(48, 24, 136);
-        background-color: #bbb0fa;
-      }
-      &.status5 {
-        color: #0051ff;
-        background-color: #b7d6ff;
-      }
-      &.status6 {
-        color: #3dac27;
-        background-color: #c8ffb7;
-      }
-    }
-    .title {
-      font-size: 14px;
-    }
-  }
-  .info {
-    flex: 1;
-    width: 100%;
-    font-size: 14px;
-    margin-left: 10px;
-    color: #999;
-    .cartList {
-      margin-bottom: 3px;
-      display: flex;
-      justify-content: space-between;
-      .right {
-        min-width: 120px;
-        display: flex;
-        justify-content: space-between;
-        .weight {
-          color: #daa520;
-        }
-      }
-    }
-  }
-  .detail {
-    display: flex;
-    padding: 10px 13px;
-  }
-  .end {
-    padding: 10px 10px;
-    color: #999;
-    font-size: 14px;
-
-    .desc {
-      margin-bottom: 6px;
-      display: flex;
-      align-items: center;
-      // justify-content: space-between;
-
-      .price {
-        margin-right: 10rpx;
-      }
-    }
-  }
-}
-</style>

+ 0 - 291
pages/users/vault/trade_list.vue

@@ -1,291 +0,0 @@
-<template>
-  <view class="records-page">
-    <view class="tab-header">
-      <view
-        v-for="(tab, index) in tabs"
-        :key="index"
-        :class="['tab-item', { 'is-active': activeTab === tab.id }]"
-        @click="changeTab(tab.id)"
-      >
-        {{ tab.name }}
-      </view>
-    </view>
-
-    <z-paging
-      ref="paging"
-      v-model="dataList"
-      @query="queryList"
-      :use-page-scroll="true"
-      :show-refresher-update-time="true"
-      :empty-view-text="emptyText"
-      :refresher-enabled="true"
-      :loading-text-no-more="loadingNoMoreText"
-      :hide-loading-more-when-no-more-by-default="true"
-    >
-      <view
-        v-for="(item, index) in dataList"
-        :key="index"
-        class="record-item-wrapper"
-      >
-        <view class="record-item">
-          <view class="item-left">
-            <view class="top">
-              <text class="item-title">{{ metalTypeMap[metalType] || '黄金' }}</text>
-              <view
-                :class="[
-                  'status-tag',
-                  item.status === '待审核' ? 'status-pending' : 'status-live',
-                ]"
-              >
-                {{ statusMap[item.status] }}
-              </view>
-            </view>
-            <view class="time">
-              <text class="item-time">{{ item.createTime }}</text>
-            </view>
-          </view>
-          <view class="item-right">
-            <text class="item-weight">{{ item.weight }}</text>
-          </view>
-        </view>
-      </view>
-    </z-paging>
-  </view>
-</template>
-
-<script setup>
-import { ref, onMounted, nextTick, watch } from "vue";
-import { onLoad } from "@dcloudio/uni-app";
-import useZPaging from "@/uni_modules/z-paging/components/z-paging/js/hooks/useZPaging.js";
-import { useAppStore } from "@/stores/app";
-import { goldTradelist } from "@/api/vault";
-
-
-
-const paging = ref(null);
-useZPaging(paging)
-
-const appStore = useAppStore();
-
-const dataList = ref([]);
-
-const activeTab = ref(0);
-const emptyText = ref("");
-const loadingNoMoreText = ref("我也是有底线的");
-const statusMap = {
-  1: '已完成',
-  2: '待签收',
-  3: '待检测',
-  4: '待确认',
-  5: '待打款'
-}
-
-const tabs = [
-  {
-    id: 0,
-    name: "存入记录",
-    empty: "暂无存入记录",
-  },
-  {
-    id: 1,
-    name: "换款记录",
-    empty: "暂无换款记录",
-  },
-  {
-    id: 2,
-    name: "出售记录",
-    empty: "暂无出售记录",
-  },
-];
-
-const metalTypeMap = {
-  1: '黄金',
-  2: '铂金',
-  3: '白银'
-}
-const metalType = ref(1)
-
-onLoad((options) => {
-  if (options?.metalType) {
-    metalType.value = Number(options.metalType) 
-    uni.setNavigationBarTitle({
-      title: metalTypeMap[options.metalType]+"明细"
-    })
-  }
- 
-})
-
-const queryList = async (pageNo, pageSize) => {
-  emptyText.value = tabs.find((tab) => tab.id === activeTab.value).empty;
-
-  try {
-    const tempParams = {
-      page: pageNo,
-      limit: pageSize,
-      metalType: metalType.value,
-      isDel: 0,
-      userId: appStore.uid,
-    }
-    const params = Object.assign({}, tempParams, tabParams.value)
-    console.log('params', params)
-    const { data } = await goldTradelist(params);
-
-    if (paging.value) {
-      paging.value.complete(data.list);
-    }
-  } catch (error) {
-    console.error("goldTradelist", error);
-    paging.value.complete(false);
-  }
-
-};
-
-const tabParams = ref({
-  type: 1
-})
-const changeTab = (tabId) => {
-  if (activeTab.value === tabId) return; 
-  activeTab.value = tabId;
-  if (tabId === 0) {
-    tabParams.value = { type: 1 }
-  } else if (tabId === 1) {
-    tabParams.value = { operationType: 2 }
-  } else if (tabId === 2) {
-    tabParams.value = { type: 0 }
-  }
-  
-  nextTick(() => {
-    if (paging.value) {
-      paging.value.reload();
-    }
-  });
-};
-</script>
-
-<style lang="scss">
-$theme-color: #e9c279;
-$border-color: #f0f0f0;
-$text-color-light: #999;
-$text-color-dark: #333;
-$button-text-color: #fff;
-$gold-tag-bg: #ffeac7; // Light yellow for "直播间换金" tag
-$gold-tag-text: #e9c279; // Darker yellow for text
-$pending-tag-bg: #f0f0f0; // Light gray for "待审核" tag
-$pending-tag-text: #666; // Darker gray for text
-
-.records-page {
-  display: flex;
-  flex-direction: column;
-  min-height: 100vh;
-}
-
-.tab-header {
-  display: flex;
-  justify-content: space-around;
-  align-items: center;
-  background-color: #fff;
-  padding: 20rpx 0;
-  position: sticky;
-  top: 0;
-  z-index: 10;
-  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
-
-  .tab-item {
-    flex: 1;
-    text-align: center;
-    font-size: 32rpx;
-    color: $text-color-dark;
-    padding: 15rpx 0;
-    position: relative;
-    cursor: pointer; // Indicate clickable
-
-    &.is-active {
-      color: $theme-color;
-      font-weight: bold;
-
-      &::after {
-        content: "";
-        position: absolute;
-        bottom: -10rpx;
-        left: 50%;
-        transform: translateX(-50%);
-        width: 60rpx;
-        height: 6rpx;
-        background-color: $theme-color;
-        border-radius: 3rpx;
-      }
-    }
-  }
-}
-
-/* z-paging specific styles (optional, but good to have some defaults) */
-:deep(.z-paging-content) {
-  padding-top: 20rpx; // Space below the tabs
-}
-
-.record-item-wrapper {
-  padding: 0 30rpx;
-  margin-bottom: 20rpx; // Spacing between cards
-
-  &:first-child {
-    // No extra margin-top for the first item if needed
-  }
-}
-
-.record-item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
-
-  .item-left {
-
-    .item-title {
-      font-size: 32rpx;
-      color: $text-color-dark;
-      font-weight: bold;
-      margin-right: 15rpx;
-    }
-
-    .status-tag {
-      font-size: 24rpx;
-      padding: 8rpx 16rpx;
-      border-radius: 8rpx;
-      display: inline-flex;
-      align-items: center;
-      justify-content: center;
-    }
-
-    .status-live {
-      background-color: $header-color;
-      color: #fff;
-    }
-
-    .status-pending {
-      background-color: $pending-tag-bg;
-      color: $pending-tag-text;
-    }
-  }
-
-
-  .item-time {
-    font-size: 26rpx;
-    color: $text-color-light;
-  }
-
-  .item-right {
-    flex-shrink: 0;
-    margin-left: 20rpx;
-    text-align: right;
-  }
-
-  .item-weight {
-    font-size: 36rpx;
-    font-weight: bold;
-    color: $header-color;
-  }
-}
-</style>

+ 0 - 480
pages/users/vault/withdraw.vue

@@ -1,480 +0,0 @@
-<template>
-  <view class="withdraw-container">
-    <!-- 顶部余额展示 -->
-    <view class="balance-box">
-      <view>
-        <view class="balance-title">可提现余额</view>
-        <view class="balance-rmb">
-          <view style="display: flex; align-items: flex-end">¥</view>
-          <view class="rmb">{{ appStore.$userInfo.nowMoney }}</view>
-        </view>
-      </view>
-    </view>
-
-    <!-- 主要内容区域 -->
-    <view class="main-content">
-      <!-- 到账账户 -->
-      <view class="section">
-        <view class="section-title">到账账户</view>
-        <view class="account-item" @click="goToBankManage">
-          <view class="account-info">
-            <view class="bank-icon">
-              <!-- <text class="iconfont icon-qianbao">🏦</text> -->
-              <text
-                :style="{
-                  color:
-                    defaultAccount?.accountType === 1 ? '#f2cb51' : '#019FE8',
-                }"
-                class="iconfont"
-                :class="[
-                  defaultAccount?.accountType === 1
-                    ? 'icon-qianbao'
-                    : 'icon-zhifubao',
-                ]"
-              ></text>
-            </view>
-            <view class="account-details" v-if="defaultAccount">
-              <text
-                class="account-number"
-                v-if="defaultAccount.accountType === 1"
-                >{{ defaultAccount.bankName }}({{
-                  formatCardNumber(defaultAccount.accountNumber)
-                }})</text
-              >
-              <text class="account-number" v-else
-                >{{ defaultAccount.accountName }}({{
-                  formatCardNumber(defaultAccount.accountNumber)
-                }})</text
-              >
-            </view>
-          </view>
-          <view class="arrow">{{ ">" }}</view>
-        </view>
-      </view>
-
-      <!-- 提现金额 -->
-      <view class="section">
-        <view class="section-title">提现金额</view>
-        <view class="amount-input-container">
-          <view class="currency-symbol">¥</view>
-          <input
-            class="amount-input"
-            type="digit"
-            v-model="withdrawAmount"
-            placeholder="请输入提现金额"
-            @input="onAmountInput"
-          />
-          <view class="withdraw-all" @click="withdrawAll">全部提现</view>
-        </view>
-        <view class="balance-info"
-          >账户余额{{ appStore.$userInfo.nowMoney }}元</view
-        >
-      </view>
-
-      <!-- 提交按钮 -->
-      <view class="submit-section">
-        <view class="btn-box" @click="submitWithdraw">
-          <image class="btn" src="/static/images/sb_btn.png"></image>
-          <text class="btn-text">提交申请</text>
-        </view>
-      </view>
-    </view>
-    <!-- 协议窗口 -->
-    <up-parse :content="content"></up-parse>
-  </view>
-</template>
-
-<script setup>
-import { ref, computed } from "vue";
-import { withdrawToCard } from "@/api/user";
-import { onShow } from "@dcloudio/uni-app";
-import { useAppStore } from "@/stores/app";
-import { getDefaultAccount, getUserInfo, agreementGetoneApi } from "@/api/user";
-
-// 响应式数据
-const availableBalance = ref("5733.67");
-const withdrawAmount = ref("");
-const defaultAccount = ref(null);
-const appStore = useAppStore();
-const content = ref("");
-// 计算属性
-const canSubmit = computed(() => {
-  return withdrawAmount.value && parseFloat(withdrawAmount.value) > 0;
-});
-// 获取协议
-function agreementGetoneFn() {
-  // 资产说明
-  agreementGetoneApi({ name: "withraw" }).then((res) => {
-    content.value = res.data?.content;
-  });
-}
-onShow(() => {
-  agreementGetoneFn();
-  fetchDefaultAccount();
-  fetchUserInfo();
-});
-
-async function fetchUserInfo() {
-  try {
-    const { data } = await getUserInfo();
-    appStore.UPDATE_USERINFO(data);
-  } catch (error) {
-    console.error("getUserInfo", error);
-  }
-}
-
-// 获取默认账户详情
-async function fetchDefaultAccount() {
-  try {
-    const { data } = await getDefaultAccount();
-    defaultAccount.value = data;
-  } catch (error) {
-    console.error("getDefaultAccount", error);
-  }
-}
-
-const formatCardNumber = (cardNumber) => {
-  // 显示卡号,只显示后4位,其他用*代替
-  if (cardNumber.length <= 4) return cardNumber;
-  const lastFour = cardNumber.slice(-4);
-  return `****${lastFour}`;
-};
-
-// 方法
-const onAmountInput = (e) => {
-  let value = e.detail.value;
-  // 限制输入格式,只允许数字和小数点
-  value = value.replace(/[^0-9.]/g, "");
-  // 限制小数点后两位
-  if (value.includes(".")) {
-    const parts = value.split(".");
-    if (parts[1] && parts[1].length > 2) {
-      value = parts[0] + "." + parts[1].substring(0, 2);
-    }
-  }
-  withdrawAmount.value = value;
-};
-
-const withdrawAll = () => {
-  withdrawAmount.value = appStore.$userInfo.nowMoney;
-};
-
-const goToBankManage = () => {
-  // 跳转到银行卡管理页面
-  uni.navigateTo({
-    url: "/pages/users/bank_card_manage/index",
-  });
-};
-
-const submitWithdraw = () => {
-  if (!appStore.userInfo.realNameVerified) {
-    uni.showToast({ title: "请先进行实名认证", icon: "none", duration: 2000 });
-    uni.navigateTo({ url: "/pages/users/face_detect/index" });
-    return;
-  }
-
-  if (!canSubmit.value) return;
-  if (!defaultAccount.value || !defaultAccount.value.id) {
-    uni.showToast({
-      title: "请选择提现账户",
-      icon: "none",
-    });
-    return;
-  }
-
-  // 提交提现申请
-  uni.showModal({
-    title: "提示",
-    content: `确认提现 ¥${withdrawAmount.value} 吗?`,
-    success: async (res) => {
-      if (res.confirm) {
-        try {
-          if (
-            Number(withdrawAmount.value) > Number(appStore.$userInfo.nowMoney)
-          ) {
-            return uni.showToast({
-              title: "余额不足",
-            });
-          }
-          // 提现方式| alipay=支付宝,bank=银行卡,weixin=微信
-          const extractType =
-            defaultAccount.value.accountType === 1 ? "bank" : "alipay";
-          // 提现金额
-          const money = withdrawAmount.value;
-          // // 姓名
-          const name = defaultAccount.value.accountName;
-          const alipayParams = {
-            alipayCode: defaultAccount.value.accountNumber, // 支付宝账号
-            extractType,
-            name,
-            money,
-          };
-          const bankParams = {
-            extractType,
-            bankName: defaultAccount.value.bankName, // 提现银行名称
-            cardum: defaultAccount.value.accountNumber, // 银行卡
-            money,
-            name,
-          };
-          const params =
-            defaultAccount.value.accountType === 1 ? bankParams : alipayParams;
-
-          await withdrawToCard(params);
-          // fetchUserInfo()
-          const { data } = await getUserInfo();
-          appStore.UPDATE_USERINFO(data);
-          uni.showToast({
-            title: "提现申请已提交",
-            icon: "success",
-          });
-          setTimeout(() => {
-            uni.navigateTo({
-              url: "/pages/users/vault/index",
-            });
-          }, 1000);
-        } catch (error) {
-          console.error("withdrawToCard", error);
-          const title = typeof error === "string" ? error : "提现失败";
-          uni.showToast({
-            title,
-            duration: 2000,
-          });
-        } finally {
-          withdrawAmount.value = "";
-        }
-      }
-    },
-  });
-};
-</script>
-
-<style lang="scss" scoped>
-.withdraw-container {
-  min-height: 100%;
-  width: 100%;
-  background: $uni-bg-primary;
-
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  .balance-box {
-    height: 300rpx;
-    padding-left: 60rpx;
-    color: #000;
-    display: flex;
-    align-items: center;
-    flex-wrap: wrap;
-    width: 100%;
-    box-sizing: border-box;
-
-    .balance-title {
-      width: 100%;
-      font-size: 30rpx;
-      margin-bottom: 10rpx;
-    }
-
-    .balance-rmb {
-      width: 100%;
-      display: flex;
-      width: 100%;
-      font-size: 56rpx;
-
-      .rmb {
-        font-size: 56rpx;
-        margin-left: 10rpx;
-      }
-    }
-  }
-
-  .main-content {
-    width: 100%;
-    padding: 40rpx 40rpx;
-    box-sizing: border-box;
-    background: #fff;
-    border-radius: 40rpx 40rpx 0 0;
-    margin-top: -20rpx;
-    // box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
-
-    .section {
-      margin-bottom: 50rpx;
-
-      .section-title {
-        color: #000;
-        font-size: 32rpx;
-        // font-weight: 600;
-        margin-bottom: 20rpx;
-        position: relative;
-
-        &::before {
-          content: "";
-          position: absolute;
-          left: -16rpx;
-          top: 50%;
-          transform: translateY(-50%);
-          width: 4rpx;
-          height: 32rpx;
-          background-color: #f8c007;
-          border-radius: 3rpx;
-        }
-      }
-
-      .account-item {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        padding: 20rpx 24rpx;
-        background: #f8f9fa;
-        border-radius: 16rpx;
-        border: 2rpx solid #e9ecef;
-        transition: all 0.3s ease;
-
-        &:active {
-          background: #f0f0f0;
-          transform: scale(0.98);
-        }
-
-        .account-info {
-          display: flex;
-          align-items: center;
-
-          .bank-icon {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            margin-right: 24rpx;
-
-            .icon {
-              font-size: 28rpx;
-            }
-          }
-
-          .account-details {
-            .account-number {
-              color: #333;
-              font-size: 30rpx;
-              font-weight: 500;
-            }
-          }
-        }
-
-        .arrow {
-          color: #999;
-          font-size: 32rpx;
-          font-weight: 300;
-        }
-      }
-
-      .amount-input-container {
-        display: flex;
-        align-items: center;
-        background-color: #ededed;
-        border-radius: 15rpx;
-        padding: 20rpx 24rpx;
-
-        transition: border-color 0.3s ease;
-
-        &:focus-within {
-          border-color: #e9c279;
-        }
-
-        .currency-symbol {
-          color: #333;
-          font-size: 32rpx;
-          // font-weight: 600;
-          margin-right: 16rpx;
-        }
-
-        .amount-input {
-          height: 100%;
-          flex: 1;
-          display: flex;
-          align-items: center;
-          color: #000;
-
-          font-size: 28rpx;
-
-          &::placeholder {
-            color: #999;
-            font-weight: 400;
-          }
-        }
-
-        .withdraw-all {
-          color: #e9c279;
-          font-size: 28rpx;
-          font-weight: 500;
-          transition: all 0.3s ease;
-
-          &:active {
-            background: #e9c279;
-            color: #fff;
-          }
-        }
-      }
-
-      .balance-info {
-        color: #666;
-        font-size: 24rpx;
-        margin-top: 16rpx;
-        padding-left: 8rpx;
-      }
-    }
-
-    .submit-section {
-      width: 100%;
-      display: flex;
-      justify-content: center;
-
-      .btn-box {
-        height: 100rpx;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        margin-bottom: 40rpx;
-        margin-top: 80rpx;
-        width: 100%;
-        box-sizing: border-box;
-        position: relative;
-
-        .btn {
-          height: 80rpx;
-          width: 380rpx;
-        }
-        .btn-text {
-          font-size: 30rpx;
-          color: #000;
-          position: absolute;
-          top: 50%;
-          left: 50%;
-          transform: translate(-50%, -50%);
-        }
-      }
-    }
-
-    .tips-section {
-      padding: 30rpx 0;
-
-      .tips-title {
-        color: #333;
-        font-size: 28rpx;
-        font-weight: 600;
-        margin-bottom: 16rpx;
-      }
-
-      .tips-item {
-        color: #666;
-        font-size: 26rpx;
-        line-height: 40rpx;
-        margin-bottom: 8rpx;
-      }
-
-      .tips-note {
-        color: #999;
-        font-size: 24rpx;
-        line-height: 36rpx;
-        margin-top: 8rpx;
-      }
-    }
-  }
-}
-</style>

+ 378 - 0
pages/users/wechat_login/index.vue

@@ -0,0 +1,378 @@
+<template>
+  <view class="page">
+    <view class="system-height" :style="{ height: statusBarHeight }"></view>
+    <!-- #ifdef MP -->
+    <view class="title-bar" style="height: 43px">
+      <view class="icon" @click="back" v-if="!isHome">
+        <image src="/static/left.png"></image>
+      </view>
+      <view class="icon" @click="home" v-else>
+        <image src="/static/home.png"></image>
+      </view>
+      账户登录
+    </view>
+    <!-- #endif -->
+    <view class="wechat_login">
+      <view class="img">
+        <image src="/static/wechat_login.png" mode="widthFix"></image>
+      </view>
+      <view class="btn-wrapper">
+        <!-- #ifdef H5 -->
+        <button hover-class="none" @click="wechatLogin" class="bg-green btn1">
+          微信登录
+        </button>
+        <!-- #endif -->
+        <!-- #ifdef MP -->
+        <button hover-class="none" @tap="getUserProfile" class="bg-green btn1">
+          微信登录
+        </button>
+        <!-- #endif -->
+        <!-- <button hover-class="none" @click="isUp = true" class="btn2">手机号登录</button> -->
+      </view>
+    </view>
+    <block v-if="isUp">
+      <mobileLogin
+        :isUp="isUp"
+        @close="maskClose"
+        :authKey="authKey"
+        @wechatPhone="wechatPhone"
+      ></mobileLogin>
+    </block>
+    <block v-if="isPhoneBox">
+      <routinePhone
+        :logoUrl="logoUrl"
+        :isPhoneBox="isPhoneBox"
+        @close="bindPhoneClose"
+        :authKey="authKey"
+      >
+      </routinePhone>
+    </block>
+  </view>
+</template>
+
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import { onLoad } from "@dcloudio/uni-app";
+import { useAppStore } from "@/stores/app";
+import mobileLogin from "@/components/login_mobile/index.vue";
+import routinePhone from "@/components/login_mobile/routine_phone.vue";
+import { getLogo, getUserPhone } from "@/api/public";
+import { getUserInfo } from "@/api/user.js";
+import Routine from "@/libs/routine";
+import wechat from "@/libs/wechat";
+import Cache from "@/utils/cache";
+import { EXPIRES_TIME } from "@/config/cache";
+
+const appStore = useAppStore();
+const { proxy } = getCurrentInstance();
+
+const isUp = ref(false);
+const phone = ref("");
+const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight + "px");
+const isHome = ref(false);
+const isPhoneBox = ref(false);
+const logoUrl = ref("");
+const code = ref("");
+const authKey = ref("");
+const options = ref({});
+const userInfo = ref({});
+const codeNum = ref(0);
+
+function back() {
+  uni.navigateBack();
+}
+function home() {
+  uni.switchTab({ url: "/pages/index/index" });
+}
+function maskClose() {
+  isUp.value = false;
+}
+function bindPhoneClose(data) {
+  if (data.isStatus) {
+    isPhoneBox.value = false;
+    proxy.$util.Tips(
+      {
+        title: "登录成功",
+        icon: "success",
+      },
+      { tab: 3 }
+    );
+  } else {
+    isPhoneBox.value = false;
+  }
+}
+
+// #ifdef MP
+function getphonenumber(e) {
+  uni.showLoading({ title: "正在登录中" });
+  Routine.getCode()
+    .then((code) => {
+      getUserPhoneNumber(e.detail.encryptedData, e.detail.iv, code);
+    })
+    .catch(() => {
+      uni.$emit("closePage", false);
+      uni.hideLoading();
+    });
+}
+function getUserPhoneNumber(encryptedData, iv, codeVal) {
+  getUserPhone({
+    encryptedData,
+    iv,
+    code: codeVal,
+    type: "routine",
+    key: authKey.value,
+  })
+    .then((res) => {
+      appStore.LOGIN({ token: res.data.token });
+      appStore.SETUID(res.data.uid);
+      // 保存过期时间(7天后过期)
+      const expiresTime = Math.round(new Date() / 1000) + 7 * 24 * 60 * 60;
+      Cache.set(EXPIRES_TIME, expiresTime, 0);
+      getUserInfoFn();
+      proxy.$util.Tips(
+        {
+          title: "登录成功",
+          icon: "success",
+        },
+        { tab: 3 }
+      );
+    })
+    .catch((res) => {
+      uni.hideLoading();
+      proxy.$util.Tips({ title: res });
+    });
+}
+function getUserInfoFn() {
+  getUserInfo().then((res) => {
+    uni.hideLoading();
+    userInfo.value = res.data;
+    appStore.UPDATE_USERINFO(res.data);
+    proxy.$util.Tips(
+      {
+        title: "登录成功",
+        icon: "success",
+      },
+      { tab: 3 }
+    );
+  });
+}
+function getUserProfile() {
+  uni.showLoading({ title: "正在登录中" });
+  Routine.getUserProfile()
+    .then((res) => {
+      Routine.getCode()
+        .then((codeVal) => {
+          getWxUser(codeVal, res);
+        })
+        .catch(() => {
+          uni.hideLoading();
+        });
+    })
+    .catch(() => {
+      uni.hideLoading();
+    });
+}
+function getWxUser(codeVal, res) {
+  let user = res.userInfo;
+  user.code = codeVal;
+  user.spread_spid = getApp().globalData.spid;
+  user.spread_code = getApp().globalData.code;
+  user.avatar = user.avatarUrl;
+  user.city = user.city;
+  user.country = user.country;
+  user.nickName = user.nickName;
+  user.province = user.province;
+  user.sex = user.gender;
+  user.type = "routine";
+  Routine.authUserInfo(user.code, user)
+    .then((res2) => {
+      authKey.value = res2.data.key;
+      if (res2.data.type === "register") {
+        uni.hideLoading();
+        isPhoneBox.value = true;
+      }
+      if (res2.data.type === "login") {
+        uni.hideLoading();
+        appStore.LOGIN({ token: res2.data.token });
+        appStore.SETUID(res2.data.uid);
+        getUserInfoFn();
+        proxy.$util.Tips(
+          {
+            title: res2,
+            icon: "success",
+          },
+          { tab: 3 }
+        );
+      }
+    })
+    .catch((res2) => {
+      uni.hideLoading();
+      uni.showToast({
+        title: res2,
+        icon: "none",
+        duration: 2000,
+      });
+    });
+}
+// #endif
+
+// #ifdef H5
+function getQueryString(name) {
+  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+  var reg_rewrite = new RegExp("(^|/)" + name + "/([^/]*)(/|$)", "i");
+  var r = window.location.search.substr(1).match(reg);
+  var q = window.location.pathname.substr(1).match(reg_rewrite);
+  if (r != null) {
+    return unescape(r[2]);
+  } else if (q != null) {
+    return unescape(q[2]);
+  } else {
+    return null;
+  }
+}
+function wechatLogin() {
+  if (!code.value && options.value.scope !== "snsapi_base") {
+    proxy.$wechat.oAuth("snsapi_userinfo", "/pages/users/wechat_login/index");
+  } else {
+    isUp.value = true;
+  }
+}
+function wechatPhone() {
+  proxy.$Cache.clear("snsapiKey");
+  if (options.value.back_url) {
+    let url = uni.getStorageSync("snRouter");
+    url = url.indexOf("/pages/index/index") != -1 ? "/" : url;
+    if (url.indexOf("/pages/users/wechat_login/index") !== -1) {
+      url = "/";
+    }
+    if (!url) {
+      url = "/pages/index/index";
+    }
+    isUp.value = false;
+    uni.showToast({
+      title: "登录成功",
+      icon: "none",
+    });
+    setTimeout(() => {
+      location.href = url;
+    }, 800);
+  } else {
+    uni.navigateBack();
+  }
+}
+// #endif
+
+onLoad((opts) => {
+  getLogo().then((res) => {
+    logoUrl.value = res.data.logoUrl;
+  });
+  // #ifdef H5
+  document.body.addEventListener("focusout", () => {
+    setTimeout(() => {
+      const scrollHeight =
+        document.documentElement.scrollTop || document.body.scrollTop || 0;
+      window.scrollTo(0, Math.max(scrollHeight - 1, 0));
+    }, 100);
+  });
+  const { code: c, state, scope } = opts;
+  options.value = opts;
+  code.value = c || "";
+  if (c && options.value.scope !== "snsapi_base") {
+    let spread = getApp().globalData.spid ? getApp().globalData.spid : 0;
+    wechat
+      .auth(c, spread)
+      .then((res) => {
+        if (res.type === "register") {
+          authKey.value = res.key;
+          isUp.value = true;
+        }
+        if (res.type === "login") {
+          appStore.LOGIN({ token: res.data.token });
+          appStore.SETUID(res.data.uid);
+          // 保存过期时间(7天后过期)
+          const expiresTime = Math.round(new Date() / 1000) + 7 * 24 * 60 * 60;
+          Cache.set(EXPIRES_TIME, expiresTime, 0);
+          getUserInfoFn();
+          wechatPhone();
+        }
+      })
+      .catch(() => {});
+  }
+  // #endif
+
+  let pages = getCurrentPages();
+  // let prePage = pages[pages.length - 2]
+  // if (prePage.route == 'pages/order_addcart/order_addcart') {
+  //   isHome.value = true
+  // } else {
+  //   isHome.value = false
+  // }
+});
+</script>
+
+<style lang="scss">
+page {
+  background: #fff;
+  height: 100%;
+}
+
+.page {
+  background: #fff;
+  height: 100%;
+}
+
+.wechat_login {
+  padding: 72rpx 34rpx;
+
+  .img image {
+    width: 100%;
+  }
+
+  .btn-wrapper {
+    margin-top: 86rpx;
+    padding: 0 66rpx;
+
+    button {
+      width: 100%;
+      height: 86rpx;
+      line-height: 86rpx;
+      margin-bottom: 40rpx;
+      border-radius: 120rpx;
+      font-size: 30rpx;
+
+      &.btn1 {
+        color: #fff;
+      }
+
+      &.btn2 {
+        color: #666666;
+        border: 1px solid #666666;
+      }
+    }
+  }
+}
+
+.title-bar {
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 36rpx;
+}
+
+.icon {
+  position: absolute;
+  left: 30rpx;
+  top: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 86rpx;
+  height: 86rpx;
+
+  image {
+    width: 50rpx;
+    height: 50rpx;
+  }
+}
+</style>

BIN
static/images/2-001.png


BIN
static/images/2-002.png


BIN
static/images/2-003.png


BIN
static/images/empty-box.png


BIN
static/images/hand.png


BIN
static/images/indexBG.png


BIN
static/images/line.jpg


BIN
static/images/lingyhj.png


BIN
static/images/noAddress.png


BIN
static/images/noCart.png


BIN
static/images/noCollection.png


BIN
static/images/noCoupon.png


BIN
static/images/noSearch.png


BIN
static/images/orderTime.png


BIN
static/images/phone.png


BIN
static/images/product.png


BIN
static/images/sb_btn.png


BIN
static/images/setting.png


BIN
static/images/setting/bofang.png


BIN
static/images/setting/cunliao.png


BIN
static/images/setting/daifahuo.png


BIN
static/images/setting/daifukuan.png


BIN
static/images/setting/daishouhuo.png


BIN
static/images/setting/dianpu.png


BIN
static/images/setting/dingwei.png


BIN
static/images/setting/fabu.png


BIN
static/images/setting/jinqian.png


BIN
static/images/setting/kabao.png


BIN
static/images/setting/kucun.png


BIN
static/images/setting/lianxikefu.png


BIN
static/images/setting/mailiao.png


BIN
static/images/setting/mailiao2.png


BIN
static/images/setting/mendian.png


BIN
static/images/setting/shangpin.png


BIN
static/images/setting/shoucang.png


BIN
static/images/setting/tiliao.png


BIN
static/images/setting/tuikuan.png


BIN
static/images/setting/vip.png


BIN
static/images/setting/vipBG.png


BIN
static/images/setting/vipIcon.png


BIN
static/images/setting/xiazaiapp.png


BIN
static/images/setting/yijianjianyi.png


BIN
static/images/setting/yiwancheng.png


BIN
static/images/setting/zuji.png


BIN
static/images/share.png


BIN
static/images/shishijinjia.png


BIN
static/images/tabbar/1-001.png


BIN
static/images/tabbar/1-002.png


BIN
static/images/tabbar/1-003.png


BIN
static/images/tabbar/2-001.png


BIN
static/images/tabbar/2-002.png


BIN
static/images/tabbar/3-001.png


BIN
static/images/tabbar/3-002.png


BIN
static/images/tabbar/3-003.png


BIN
static/images/tabbar/4-001.png


BIN
static/images/tabbar/4-002.png


BIN
static/images/tabbar/4-003.png


+ 0 - 0
static/images/weiling.png


Some files were not shown because too many files changed in this diff