Parcourir la source

Merge branch 'dev_v3' of http://git.dgtis.com/armg/wxapp_shuibei into dev_v3

HHE-5476 il y a 1 jour
Parent
commit
39d99e3e55

+ 5 - 1
api/order.js

@@ -226,6 +226,10 @@ export function orderConfirm(
 export function getCouponsOrderPrice(preOrderNo) {
   return request.get(`coupons/order/${preOrderNo}`);
 }
+// 根据用户和使用位置查询可用优惠券
+export function getUserAvailableCoupons(data) {
+  return request.get("coupons/usable/byScene", data);
+}
 
 /**
  * 订单创建
@@ -277,7 +281,7 @@ export function wechatOrderPay(data) {
  * @param object data
  */
 export function wechatQueryPayResult(data) {
-  return request.get("pay/queryPayResult?orderNo=" + data);
+  return request.get("pay/queryPayResult", data);
 }
 
 /**

+ 46 - 18
components/OrderListCard/index.vue

@@ -2,22 +2,37 @@
   <view class="item">
     <view @click="goOrderDetails(order.orderId)">
       <view class="title acea-row row-between-wrapper">
-        <view class="acea-row row-middle" @click.stop="toMerchant(order.sbMerchant?.id)">
-          <image class="merchantImg" v-if="order.sbMerchant?.merchantLogo" :src="order.sbMerchant.merchantLogo" ></image>
-          <image class="merchantImg" v-else src="@/static/avator.png" ></image>
-          <view style="margin-left: 10rpx;">{{order.sbMerchant?.merchantName||'自营'}}</view>
-          <uni-icons v-if="order.sbMerchant?.id" style="margin-left: 10rpx;" type="right" size="16" color="#999999"></uni-icons>
-<!--          <view>{{ order.createTime }}</view>-->
+        <view
+          class="acea-row row-middle"
+          @click.stop="toMerchant(order.sbMerchant?.id)"
+        >
+          <image
+            class="merchantImg"
+            v-if="order.sbMerchant?.merchantLogo"
+            :src="order.sbMerchant.merchantLogo"
+          ></image>
+          <image class="merchantImg" v-else src="@/static/avator.png"></image>
+          <view style="margin-left: 10rpx">{{
+            order.sbMerchant?.merchantName || "自营"
+          }}</view>
+          <uni-icons
+            v-if="order.sbMerchant?.id"
+            style="margin-left: 10rpx"
+            type="right"
+            size="16"
+            color="#999999"
+          ></uni-icons>
+          <!--          <view>{{ order.createTime }}</view>-->
         </view>
         <view class="font-color">
           <text
-              class="sign cart-color acea-row row-center-wrapper"
-              v-if="
+            class="sign cart-color acea-row row-center-wrapper"
+            v-if="
               order.activityType !== '普通' && order.activityType !== '核销'
             "
-          >{{ order.activityType }}</text
+            >{{ order.activityType }}</text
           >
-          {{ order.status == 6 ? '已取消':order.orderStatus }}
+          {{ order.status == 6 ? "已取消" : order.orderStatus }}
         </view>
       </view>
       <view
@@ -38,7 +53,9 @@
       </view>
       <view class="totalPrice"
         >共{{ order.totalNum }}件商品,总金额
-        <text class="money font-color" v-if="mallType === 0">¥{{ order.payPrice }}</text>
+        <text class="money font-color" v-if="mallType === 0"
+          >¥{{ order.payPrice }}</text
+        >
         <text class="money font-color" v-else>{{ order.useIntegral }}贝币</text>
       </view>
     </view>
@@ -46,6 +63,12 @@
       <view class="bnt cancelBnt" v-if="!order.paid" @click.stop="cancelOrder"
         >取消订单</view
       >
+      <view
+        class="bnt cancelBnt refresh-bnt"
+        v-if="!order.paid"
+        @click.stop="refreshStatus"
+        >更新状态</view
+      >
       <view class="bnt bg-color" v-if="!order.paid" @click.stop="goPay"
         >立即付款</view
       >
@@ -87,6 +110,7 @@ const emit = defineEmits([
   "goPay",
   "goOrderDetails",
   "delOrder",
+  "refreshStatus",
 ]);
 
 function cancelOrder() {
@@ -101,14 +125,18 @@ function goOrderDetails(orderId) {
 function delOrder() {
   emit("delOrder", props.order.id, props.index);
 }
+function refreshStatus() {
+  emit("refreshStatus", props.order.orderId, props.index);
+}
 const toMerchant = (merchantId) => {
-  if(merchantId){
-    uni.navigateTo({ url:"/pages/merchantCenters/merchant?merchantId="+merchantId });
-  }else{
-    return
+  if (merchantId) {
+    uni.navigateTo({
+      url: "/pages/merchantCenters/merchant?merchantId=" + merchantId,
+    });
+  } else {
+    return;
   }
-
-}
+};
 </script>
 
 <style scoped lang="scss">
@@ -211,7 +239,7 @@ const toMerchant = (merchantId) => {
     }
   }
 }
-.merchantImg{
+.merchantImg {
   width: 60rpx;
   height: 60rpx;
   border-radius: 50%;

+ 3 - 9
components/UserGrowthPanel/index.vue

@@ -6,7 +6,7 @@
       </view>
       <view v-else @click="toLogin">未登录</view>
       <view class="gold-price">
-        <text class="text">实金价&nbsp;</text>
+        <text class="text">实金价&nbsp;</text>
         <up-loading-icon v-if="realGoldprice === 0"></up-loading-icon>
         <text class="real-price" v-else>{{ realGoldprice }}</text>
       </view>
@@ -81,7 +81,7 @@ onShow(() => {
 });
 
 function toVaultPage(type) {
-  uni.navigateTo({ url: `/pages/users/vault/index?type=${type}` })
+  uni.navigateTo({ url: `/pages/users/vault/index?type=${type}` });
 }
 
 // 获取用户信息
@@ -116,14 +116,10 @@ const percentExperience = computed(() => {
     justify-content: space-between;
     align-items: center;
 
-    .vip {
-    }
-
     .gold-price {
       display: flex;
       align-items: center;
-      .text {
-      }
+
       .real-price {
         font-size: 35rpx;
         color: $header-color;
@@ -154,8 +150,6 @@ const percentExperience = computed(() => {
       .item-icon {
         margin-right: 10rpx;
       }
-      .text {
-      }
     }
   }
 }

+ 153 - 133
components/addressWindow/index.vue

@@ -1,45 +1,58 @@
 <template>
-	<view>
-		<view class="address-window" :class="address.address == true ? 'on' : ''">
-			<view class='title'>
-				<view class=""></view>
-				<view class="">选择地址</view>
-				<image @tap='close' src="/static/images/shop/close@2x.png" mode=""></image>
-			</view>
-			
-			<view class='list'>
-				<view class='item' :class='active == index ? "active" : ""'
-					v-for="(item, index) in addressList" @tap='tapAddress(index, item.id)' :key='index'>
-					<view class='address'>
-						<view class='address-t'><text>{{ item.province }}{{ item.city }}{{ item.district }}{{ item.detail }}</text><view v-if="item.isDefault" class="default">默认</view></view>
-						<view class='name'>{{ item.realName }}<text class='phone'>{{
-							item.phone }}</text></view>
-						
-					</view>
-					
-				</view>
-			</view>
-			<!-- 无地址 -->
-			<view class='pictrue' v-if="!is_loading && !addressList.length">
-				<image src='/static/images/noAddress.png'></image>
-			</view>
-			<view class="addressBnt-btn">
-				<view class='addressBnt' @tap='goAddressPages'>添加地址</view>
-			</view>
-			
-		</view>
-		<view class='mask' catchtouchmove="true" :hidden='address.address == false' @tap='close'></view>
-	</view>
+  <view>
+    <view class="address-window" :class="address.address == true ? 'on' : ''">
+      <view class="title">
+        <view class=""></view>
+        <view class="">选择地址</view>
+        <image
+          @tap="close"
+          src="/static/images/shop/close@2x.png"
+          mode=""
+        ></image>
+      </view>
+
+      <view class="list">
+        <view
+          class="item"
+          :class="active == index ? 'active' : ''"
+          v-for="(item, index) in addressList"
+          @tap="tapAddress(index, item.id)"
+          :key="index"
+        >
+          <view class="address">
+            <view class="address-t"
+              ><text
+                >{{ item.province }}{{ item.city }}{{ item.district
+                }}{{ item.detail }}</text
+              ><view v-if="item.isDefault" class="default">默认</view></view
+            >
+            <view class="name"
+              >{{ item.realName
+              }}<text class="phone">{{ item.phone }}</text></view
+            >
+          </view>
+        </view>
+      </view>
+      <!-- 无地址 -->
+      <view class="pictrue" v-if="!is_loading && !addressList.length">
+        <image src="/static/images/noAddress.png"></image>
+      </view>
+      <view class="addressBnt-btn">
+        <view class="addressBnt" @tap="goAddressPages">添加地址</view>
+      </view>
+    </view>
+    <!-- <view class='mask' catchtouchmove="true" :hidden='address.address == false' @tap='close'></view> -->
+  </view>
 </template>
 
 <script setup>
-import { ref } from 'vue';
-import { getAddressList } from '@/api/user.js';
+import { ref } from "vue";
+import { getAddressList } from "@/api/user.js";
 
 const props = defineProps({
   pagesUrl: {
     type: String,
-    default: '',
+    default: "",
   },
   address: {
     type: Object,
@@ -51,10 +64,15 @@ const props = defineProps({
   isLog: {
     type: Boolean,
     default: false,
-  }
+  },
 });
 
-const emit = defineEmits(['OnChangeAddress', 'changeClose', 'changeTextareaStatus', 'OnDefaultAddress']);
+const emit = defineEmits([
+  "OnChangeAddress",
+  "changeClose",
+  "changeTextareaStatus",
+  "OnDefaultAddress",
+]);
 
 const active = ref(0);
 const is_loading = ref(true);
@@ -62,7 +80,7 @@ const addressList = ref([]);
 
 // 对外暴露获取地址的方法
 defineExpose({
-	fetchAddressList
+  fetchAddressList,
 });
 
 function tapAddress(e, addressid) {
@@ -73,43 +91,45 @@ function tapAddress(e, addressid) {
       a = addressList.value[i];
     }
   }
-  emit('OnChangeAddress', a);
+  emit("OnChangeAddress", a);
 }
 
 function close() {
-  emit('changeClose');
-  emit('changeTextareaStatus');
+  emit("changeClose");
+  emit("changeTextareaStatus");
 }
 
 function goAddressPages() {
-  emit('changeClose');
-  emit('changeTextareaStatus');
+  emit("changeClose");
+  emit("changeTextareaStatus");
   uni.navigateTo({
-    url: props.pagesUrl
+    url: props.pagesUrl,
   });
 }
 
 function fetchAddressList() {
   getAddressList({
     page: 1,
-    limit: 5
-  }).then(res => {
-    let list = res.data.list;
-    addressList.value = list;
-    is_loading.value = false;
-    let defaultAddress = {};
-    // 处理默认选中项
-    if (!props.address.addressId) return;
-    for (let i = 0, leng = list.length; i < leng; i++) {
-      if (list[i].id == props.address.addressId) {
-        active.value = i;
-        defaultAddress = list[i];
+    limit: 5,
+  })
+    .then((res) => {
+      let list = res.data.list;
+      addressList.value = list;
+      is_loading.value = false;
+      let defaultAddress = {};
+      // 处理默认选中项
+      if (!props.address.addressId) return;
+      for (let i = 0, leng = list.length; i < leng; i++) {
+        if (list[i].id == props.address.addressId) {
+          active.value = i;
+          defaultAddress = list[i];
+        }
       }
-    }
-    emit('OnDefaultAddress', defaultAddress);
-  }).catch((error) => {
-		console.error('fetchAddressList', error)
-	})
+      emit("OnDefaultAddress", defaultAddress);
+    })
+    .catch((error) => {
+      console.error("fetchAddressList", error);
+    });
 }
 
 // 监听 address.address 打开时刷新列表
@@ -118,118 +138,118 @@ function fetchAddressList() {
 //     fetchAddressListFn();
 //   }
 // }, { immediate: true });
-
 </script>
 
 <style scoped lang="scss">
 .address-window {
-	background: #FFFFFF;
-	border-radius: 40rpx 40rpx 0 0;
-	position: fixed;
-	bottom: 0;
-	left: 0;
-	width: 100%;
-	z-index: 101;
-	transform: translate3d(0, 100%, 0);
-	transition: all .3s cubic-bezier(.25, .5, .5, .9);
+  background: #ffffff;
+  border-radius: 40rpx 40rpx 0 0;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  z-index: 101;
+  transform: translate3d(0, 100%, 0);
+  transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
 }
 
 .address-window.on {
-	transform: translate3d(0, 0, 0);
+  transform: translate3d(0, 0, 0);
 }
 
 .address-window .title {
-	color: #333333;
-	font-size: 36rpx;
-	font-weight: bold;
-	height: 100rpx;
-	padding: 0 20rpx;
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	image,view:first-child{
-		width: 32rpx;
-		height: 32rpx;
-	}
+  color: #333333;
+  font-size: 36rpx;
+  font-weight: bold;
+  height: 100rpx;
+  padding: 0 20rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  image,
+  view:first-child {
+    width: 32rpx;
+    height: 32rpx;
+  }
 }
 
 .address-window .list {
-	padding: 0 32rpx;
+  padding: 0 32rpx;
 }
 .address-window .list .item {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	background: #F9F7F0;
-	border-radius: 16rpx;
-	border-bottom: 2px solid transparent;
-	padding: 16rpx;
-	margin-bottom: 24rpx;
-	&:last-child {
-		margin-bottom: 0;
-	}
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  background: #f9f7f0;
+  border-radius: 16rpx;
+  border-bottom: 2px solid transparent;
+  padding: 16rpx;
+  margin-bottom: 24rpx;
+  &:last-child {
+    margin-bottom: 0;
+  }
 }
 .address-window .list .active {
-	background: rgba(248,192,8,0.1);
-	border: 2rpx solid #F8C008;
+  background: rgba(248, 192, 8, 0.1);
+  border: 2rpx solid #f8c008;
 }
 .address-window .list .item .address {
-	flex: 1;
-	margin-right: 16rpx;
+  flex: 1;
+  margin-right: 16rpx;
 }
 .default {
-	width: 64rpx;
-	height: 40rpx;
-	color: #333333;
-	font-size: 24rpx;
-	background: #F8C008;
-	border-radius: 8rpx;
-	text-align: center;
-	line-height: 40rpx;
-	flex-shrink: 0;
+  width: 64rpx;
+  height: 40rpx;
+  color: #333333;
+  font-size: 24rpx;
+  background: #f8c008;
+  border-radius: 8rpx;
+  text-align: center;
+  line-height: 40rpx;
+  flex-shrink: 0;
 }
 
 .address-window .list .item .address .name {
-	font-size: 28rpx;
-	
-	color: #666666;
-	margin-top: 16rpx;
+  font-size: 28rpx;
+
+  color: #666666;
+  margin-top: 16rpx;
 }
 
 .address-window .list .item .address .name .phone {
-	margin-left: 18rpx;
+  margin-left: 18rpx;
 }
 .address-t {
-	font-weight: bold;
-	display: flex;
-	justify-content: space-between;
-	align-items: start;
-	flex-wrap: nowrap;
+  font-weight: bold;
+  display: flex;
+  justify-content: space-between;
+  align-items: start;
+  flex-wrap: nowrap;
 }
 .addressBnt-btn {
-	padding: 22rpx 32rpx;
+  padding: 22rpx 32rpx;
 }
 
 .address-window .addressBnt {
-	font-size: 32rpx;
-	font-weight: bold;
-	color: #333333;
-	text-align: center;
-	
-	line-height: 88rpx;
-	
-	background: #F8C008;
-	border-radius: 16rpx;
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333333;
+  text-align: center;
+
+  line-height: 88rpx;
+
+  background: #f8c008;
+  border-radius: 16rpx;
 }
 
 .address-window .pictrue {
-	width: 414rpx;
-	height: 336rpx;
-	margin: 0 auto;
+  width: 414rpx;
+  height: 336rpx;
+  margin: 0 auto;
 }
 
 .address-window .pictrue image {
-	width: 100%;
-	height: 100%;
+  width: 100%;
+  height: 100%;
 }
 </style>

+ 1 - 1
components/drag-button/drag-button.vue

@@ -48,7 +48,7 @@ export default {
       windowHeight: 0, // 屏幕可用高度
       isMove: true, // 是否处于拖拽中(控制过渡动画)
       edge: 15, // 按钮与屏幕边缘的间距(左右/上下通用)
-      text: "实金价", // 按钮顶部文本
+      text: "实金价", // 按钮顶部文本
     };
   },
   mounted() {

+ 2 - 2
components/payment/WechatPayment.vue

@@ -74,7 +74,7 @@ const createUniPay = async (options) => {
       openId: options.openId,
       orderNo: options.orderNo,
     });
-
+    // return console.log("payRes", payRes);
     // 订单创建成功,触发回调
     callbacks.value.onUniPayCreate({
       out_trade_no: options.orderNo,
@@ -125,7 +125,7 @@ const confirmPaymentStatus = async () => {
         showPayLoading.value = false;
         paymentInProgress.value = false;
         callbacks.value.onUniPayFail(
-          new Error("支付结果查询超时,请稍后查看订单状态"),
+          new Error("支付结果查询超时,请稍后查看订单状态")
         );
         return;
       }

+ 2 - 2
hooks/useRealGoldPrice.js

@@ -1,6 +1,6 @@
 /**
- * 实金价 hooks(UniApp 单例模式实现)
- * @description 封装实金价、黄金9999、铂金、白银、K金的价格获取与实时更新逻辑,通过单例WebSocket避免多页面连接超限,结合缓存减少接口请求
+ * 实金价 hooks(UniApp 单例模式实现)
+ * @description 封装实金价、黄金9999、铂金、白银、K金的价格获取与实时更新逻辑,通过单例WebSocket避免多页面连接超限,结合缓存减少接口请求
  *
  * 核心特性:
  * 1. 单例WebSocket:全局唯一连接,通过引用计数管理生命周期(页面全部隐藏时断开,任一页面显示时重连)

+ 1 - 1
pages.json

@@ -23,7 +23,7 @@
       "style": {
         "navigationBarBackgroundColor": "#ffe079",
         "navigationBarTextStyle": "white",
-        "navigationBarTitleText": "实金价"
+        "navigationBarTitleText": "实金价"
       }
     },
     {

+ 206 - 165
pages/goods/goods_search/index.vue

@@ -1,110 +1,145 @@
 <template>
-  <view style="padding-bottom: 32rpx;">
-    <view class='searchGood'>
-      <view class='search acea-row row-between-wrapper'>
-        <view class='input acea-row row-between-wrapper'>
-          <text class='iconfont icon-sousuo' style="color:#999;"></text>
-          <input type='text' confirm-type="search" :value='searchValue' :focus="focus" placeholder='点击搜索商品' placeholder-class='placeholder'
-            @input="setValue" @confirm="searchBut" />
+  <view style="padding-bottom: 32rpx">
+    <view class="searchGood">
+      <view class="search acea-row row-between-wrapper">
+        <view class="input acea-row row-between-wrapper">
+          <text class="iconfont icon-sousuo" style="color: #999"></text>
+          <input
+            type="text"
+            confirm-type="search"
+            :value="searchValue"
+            :focus="focus"
+            placeholder="点击搜索商品"
+            placeholder-class="placeholder"
+            @input="setValue"
+            @confirm="searchBut"
+          />
         </view>
-        <view class='bnt' @tap='searchBut'>搜索</view>
+        <view class="bnt" @tap="searchBut">搜索</view>
       </view>
-<!--      <view class='title'>热门搜索</view>-->
-<!--      <view class='list acea-row'>-->
-<!--        <block v-for="(item, index) in hotSearchList" :key="index">-->
-<!--          <view class='item' @tap='setHotSearchValue(item.title)'>{{ item.title }}</view>-->
-<!--        </block>-->
-<!--      </view>-->
-      <view class='line'></view>
+      <!--      <view class='title'>热门搜索</view>-->
+      <!--      <view class='list acea-row'>-->
+      <!--        <block v-for="(item, index) in hotSearchList" :key="index">-->
+      <!--          <view class='item' @tap='setHotSearchValue(item.title)'>{{ item.title }}</view>-->
+      <!--        </block>-->
+      <!--      </view>-->
+      <view class="line"></view>
       <!-- <goodList :bastList="calculatedProducts" v-if="bastList.length > 0"></goodList> -->
-	  <view class="index-product-wrapper">
-	    <view
-	        class="list-box animated"
-	        :class="bastList.length > 0 ? 'fadeIn on' : ''"
-	    >
-	      <view
-	          class="item"
-	          v-for="(item, index) in calculatedProducts"
-	          :key="index"
-	          @click="goDetail(item)"
-	      >
-	        <view class="pictrue">
-	          <image :src="item.image" mode=""></image>
-	        </view>
-	        <view class="text-info">
-	          <view class="title" >
-	            <view class="text line1">{{ item.storeName }}</view>
-	            <view class="weight">{{ item.weight }}g</view>
-	          </view>
-	          <view class="bottom-row">
-	            <!-- <text class="price">工费: {{ item.price }}/克</text> -->
-	            <text class="price">¥ {{ item.totalPrice }}</text>
-	            <text class="sales" style="color:#666;">
-	              销量:{{ Number(item.sales || 0) + Number(item.ficti || 0) }}件
-	            </text>
-	            <!-- <view class="txt">券</view> -->
-	          </view>
-	          <view class="bottom-row">
-	            <!-- <text class="price">工费: {{ item.price }}/克</text> -->
-	            <text class="sales">工费:¥{{ item.totalLaborCost }}</text>
-	            <text class="sales">
-	              附加费:¥{{ item.additionalAmount }}
-	            </text>
-	            <!-- <view class="txt">券</view> -->
-	          </view>
-	          <template v-if="item?.merchant?.id && merchantNameShow()">
-	            <view class="merchantInfo" @click.stop="toMerchant(item.merchant.id)">
-	              <image class="merchantLogo" :src="item.merchant.merchantLogo" mode="scaleToFill"></image>
-	              <text class="merchantName">{{item.merchant.merchantName}}</text>
-	              <uni-icons style="margin-left: 10rpx;" type="right" size="16" color="#999999"></uni-icons>
-	            </view>
-	          </template>
-	        </view>
-	      </view>
-	    </view>
-	  </view>
-      <view class='loadingicon acea-row row-center-wrapper' v-if="bastList.length > 0">
-        <text class='loading iconfont icon-jiazai' :hidden='loading == false'></text>{{ loadTitle }}
+      <view class="index-product-wrapper">
+        <view
+          class="list-box animated"
+          :class="bastList.length > 0 ? 'fadeIn on' : ''"
+        >
+          <view
+            class="item"
+            v-for="(item, index) in calculatedProducts"
+            :key="index"
+            @click="goDetail(item)"
+          >
+            <view class="pictrue">
+              <image :src="item.image" mode=""></image>
+            </view>
+            <view class="text-info">
+              <view class="title">
+                <view class="text line1">{{ item.storeName }}</view>
+                <view class="weight">{{ item.weight }}g</view>
+              </view>
+              <view class="bottom-row">
+                <!-- <text class="price">工费: {{ item.price }}/克</text> -->
+                <text class="price">¥ {{ item.totalPrice }}</text>
+                <text class="sales" style="color: #666">
+                  销量:{{
+                    Number(item.sales || 0) + Number(item.ficti || 0)
+                  }}件
+                </text>
+                <!-- <view class="txt">券</view> -->
+              </view>
+              <view class="bottom-row">
+                <!-- <text class="price">工费: {{ item.price }}/克</text> -->
+                <text class="sales">工费:¥{{ item.totalLaborCost }}</text>
+                <text class="sales">
+                  附加费:¥{{ item.additionalAmount }}
+                </text>
+                <!-- <view class="txt">券</view> -->
+              </view>
+              <template v-if="item?.merchant?.id && merchantNameShow()">
+                <view
+                  class="merchantInfo"
+                  @click.stop="toMerchant(item.merchant.id)"
+                >
+                  <image
+                    class="merchantLogo"
+                    :src="item.merchant.merchantLogo"
+                    mode="scaleToFill"
+                  ></image>
+                  <text class="merchantName">{{
+                    item.merchant.merchantName
+                  }}</text>
+                  <uni-icons
+                    style="margin-left: 10rpx"
+                    type="right"
+                    size="16"
+                    color="#999999"
+                  ></uni-icons>
+                </view>
+              </template>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view
+        class="loadingicon acea-row row-center-wrapper"
+        v-if="bastList.length > 0"
+      >
+        <text
+          class="loading iconfont icon-jiazai"
+          :hidden="loading == false"
+        ></text
+        >{{ loadTitle }}
       </view>
     </view>
-    <view class='noCommodity'>
-      <view class='pictrue' v-if="bastList.length == 0 && isbastList">
-        <image :src="HTTP_REQUEST_URL_IMG+'noSearch.png'"></image>
+    <view class="noCommodity">
+      <view class="pictrue" v-if="bastList.length == 0 && isbastList">
+        <image :src="HTTP_REQUEST_URL_IMG + 'noSearch.png'"></image>
       </view>
-<!--      <recommend :hostProduct='hostProduct' v-if="bastList.length == 0"></recommend>-->
+      <!--      <recommend :hostProduct='hostProduct' v-if="bastList.length == 0"></recommend>-->
     </view>
   </view>
 </template>
 
 <script setup>
-import {computed, ref} from 'vue'
-import { onShow, onReachBottom,onLoad } from '@dcloudio/uni-app'
-import { getSearchKeyword, getProductslist, getProductHot } from '@/api/store.js'
-import goodList from '@/components/goodList'
-import recommend from '@/components/recommend'
+import { computed, ref } from "vue";
+import { onShow, onReachBottom, onLoad } 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";
-// 获取实时金价
+// 获取实金价
 import useRealGoldPrice from "@/hooks/useRealGoldPrice";
 import { useAppStore } from "@/stores/app";
 
 const appStore = useAppStore();
 
 // 响应式数据
-const hostProduct = ref([])
-const searchValue = ref('')
-const focus = ref(true)
-const bastList = ref([])
-const hotSearchList = ref([])
-const limit = ref(8)
-const page = ref(1)
-const loading = ref(false)
-const loadend = ref(false)
-const loadTitle = ref('加载更多')
-const hotPage = ref(1)
-const isScroll = ref(true)
-const isbastList = ref(false)
-const query = ref({})
-const merchantId =  ref('')
+const hostProduct = ref([]);
+const searchValue = ref("");
+const focus = ref(true);
+const bastList = ref([]);
+const hotSearchList = ref([]);
+const limit = ref(8);
+const page = ref(1);
+const loading = ref(false);
+const loadend = ref(false);
+const loadTitle = ref("加载更多");
+const hotPage = ref(1);
+const isScroll = ref(true);
+const isbastList = ref(false);
+const query = ref({});
+const merchantId = ref("");
 // 实时价格处理
 const {
   realGoldprice, // 黄金实时销售价(基础)
@@ -119,20 +154,28 @@ const goDetail = async (item) => {
       url: `/pages/goods/goods_details/index?id=${item.id}`,
     });
   } catch (err) {
-    console.error('Navigation error:', err);
+    console.error("Navigation error:", err);
   }
 };
 
 const merchantNameShow = () => {
-  if(!appStore.userInfo ||(appStore.userInfo && !appStore.userInfo.merchant && !appStore.merchantId && !appStore.userInfo.lastVisitedMerchantId)){
+  if (
+    !appStore.userInfo ||
+    (appStore.userInfo &&
+      !appStore.userInfo.merchant &&
+      !appStore.merchantId &&
+      !appStore.userInfo.lastVisitedMerchantId)
+  ) {
     return true;
-  }else{
+  } else {
     return false;
   }
-}
+};
 const toMerchant = (merchantId) => {
-  uni.navigateTo({ url:"/pages/merchantCenters/merchant?merchantId="+merchantId });
-}
+  uni.navigateTo({
+    url: "/pages/merchantCenters/merchant?merchantId=" + merchantId,
+  });
+};
 
 const calculatedProducts = computed(() => {
   // 计算逻辑与原代码一致,但基于响应式数据 products
@@ -148,67 +191,69 @@ const calculatedProducts = computed(() => {
 
     const totalLaborCost = Number(product.totalLaborCost);
     const additionalAmount = Number(product.additionalAmount);
-    const totalPrice = (totalLaborCost+additionalAmount).toFixed(2);
+    const totalPrice = (totalLaborCost + additionalAmount).toFixed(2);
 
     return {
       ...product,
       calculatedTotal: formattedTotal, // 新增计算结果字段
-      totalPrice
+      totalPrice,
     };
   });
 });
 
 // 获取热搜
 function getRoutineHotSearch() {
-  getSearchKeyword().then(res => {
-    hotSearchList.value = res.data
-  })
+  getSearchKeyword().then((res) => {
+    hotSearchList.value = res.data;
+  });
 }
 
 // 获取商品列表
 function getProductList() {
-  if (loadend.value || loading.value) return
-  loading.value = true
-  loadTitle.value = ''
+  if (loadend.value || loading.value) return;
+  loading.value = true;
+  loadTitle.value = "";
   getProductslist({
     ...query.value,
     keyword: searchValue.value,
     page: page.value,
     limit: limit.value,
-    merchantId:merchantId.value,
-  }).then(res => {
-    const list = res.data.list
-    const isLoadend = list.length < limit.value
-    // 合并数组
-    bastList.value = (bastList.value || []).concat(list)
-    loading.value = false
-    loadend.value = isLoadend
-    loadTitle.value = isLoadend ? "我是有底线的" : "加载更多"
-    page.value += 1
-    isbastList.value = true
-  }).catch(() => {
-    loading.value = false
-    loadTitle.value = '加载更多'
+    merchantId: merchantId.value,
   })
+    .then((res) => {
+      const list = res.data.list;
+      const isLoadend = list.length < limit.value;
+      // 合并数组
+      bastList.value = (bastList.value || []).concat(list);
+      loading.value = false;
+      loadend.value = isLoadend;
+      loadTitle.value = isLoadend ? "我是有底线的" : "加载更多";
+      page.value += 1;
+      isbastList.value = true;
+    })
+    .catch(() => {
+      loading.value = false;
+      loadTitle.value = "加载更多";
+    });
 }
 
 // 获取热门商品
 function getHostProduct() {
-  if (!isScroll.value) return
-  getProductHot(hotPage.value, limit.value).then(res => {
-    isScroll.value = res.data.list.length >= limit.value
-    hostProduct.value = hostProduct.value.concat(res.data.list)
-    hotPage.value += 1
-  })
+  if (!isScroll.value) return;
+  getProductHot(hotPage.value, limit.value).then((res) => {
+    isScroll.value = res.data.list.length >= limit.value;
+    hostProduct.value = hostProduct.value.concat(res.data.list);
+    hotPage.value += 1;
+  });
 }
 
 // 设置热搜值
 function setHotSearchValue(val) {
-  searchValue.value = val
-  page.value = 1
-  loadend.value = false
-  bastList.value = []
-  getProductList()
+  searchValue.value = val;
+  page.value = 1;
+  loadend.value = false;
+  bastList.value = [];
+  getProductList();
 }
 
 // 输入框赋值
@@ -218,47 +263,50 @@ function setValue(event) {
 
 // 搜索按钮
 function searchBut() {
-  focus.value = false
+  focus.value = false;
   if (searchValue.value.length > 0) {
-    page.value = 1
-    loadend.value = false
-    bastList.value = []
-    uni.showLoading({ title: '正在搜索中' })
-    getProductList()
-    uni.hideLoading()
+    page.value = 1;
+    loadend.value = false;
+    bastList.value = [];
+    uni.showLoading({ title: "正在搜索中" });
+    getProductList();
+    uni.hideLoading();
   } else {
     // 这里假设 $util.Tips 已全局挂载
-    uni.$u.toast('请输入要搜索的商品')
+    uni.$u.toast("请输入要搜索的商品");
   }
 }
 
 // 生命周期
 onShow(() => {
-  getRoutineHotSearch()
+  getRoutineHotSearch();
   getHostProduct();
-
-})
-onLoad((options)=>{
+});
+onLoad((options) => {
   query.value = options || {};
-  merchantId.value =query.value.merchantId || appStore.merchantId||appStore.userInfo?.merchant?.id||'';
-  if(options && options.cid){
-    getProductList()
+  merchantId.value =
+    query.value.merchantId ||
+    appStore.merchantId ||
+    appStore.userInfo?.merchant?.id ||
+    "";
+  if (options && options.cid) {
+    getProductList();
   }
-})
+});
 
 onReachBottom(() => {
   if (bastList.value.length > 0) {
-    getProductList()
+    getProductList();
   } else {
-    getHostProduct()
+    getHostProduct();
   }
-})
+});
 </script>
 
 <style lang="scss">
 page {
   // margin-top: var(--status-bar-height);
-  background-color: #F9F7F0;
+  background-color: #f9f7f0;
   height: 100%;
 }
 
@@ -273,7 +321,7 @@ page {
 
 .searchGood .search .input {
   width: 598rpx;
-  background-color: #F9F7F0;
+  background-color: #f9f7f0;
   border-radius: 16rpx;
   padding: 0 35rpx;
   box-sizing: border-box;
@@ -303,12 +351,6 @@ page {
   color: #282828;
 }
 
-.searchGood .title {
-  // font-size: 28rpx;
-  // color: #999;
-  // margin: 50rpx 30rpx 25rpx 30rpx;
-}
-
 .searchGood .list {
   padding-left: 10rpx;
 }
@@ -387,13 +429,13 @@ page {
             background-color: #ef4800;
             border-radius: 5rpx;
           }
-          .text{
+          .text {
             width: 80%;
-			font-weight: bold;
+            font-weight: bold;
           }
-          .weight{
-            background-color: rgba(197, 128, 3, 0.10);
-            color: #C58003;
+          .weight {
+            background-color: rgba(197, 128, 3, 0.1);
+            color: #c58003;
             font-size: 24rpx;
             padding: 8rpx 16rpx;
             border-radius: 8rpx;
@@ -420,24 +462,23 @@ page {
           .sales {
             font-size: 22rpx;
             white-space: nowrap;
-			flex-shrink: 0;
+            flex-shrink: 0;
             color: #999999;
           }
-
         }
-        .merchantInfo{
+        .merchantInfo {
           display: flex;
           align-items: center;
           height: 40rpx;
-		  margin-top: 16rpx;
+          margin-top: 16rpx;
         }
-        .merchantLogo{
+        .merchantLogo {
           width: 40rpx;
           height: 40rpx;
           border-radius: 50%;
           margin-right: 8rpx;
         }
-        .merchantName{
+        .merchantName {
           font-size: 24rpx;
           color: #333;
         }

+ 4 - 4
pages/index/index.vue

@@ -70,7 +70,7 @@
           </up-swiper>
         </view>
       </view>
-      <!-- 实金价 -->
+      <!-- 实金价 -->
       <view class="top-bg-box">
         <view class="card">
           <view class="cardbgLinear">
@@ -78,7 +78,7 @@
               <view class="title-left">
                 <image
                   class="ssjj"
-                  :src="HTTP_REQUEST_URL_IMG + 'shishijinjia.png'"
+                  src="https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20260225134946_785_219.png"
                   mode="widthFix"
                 >
                 </image>
@@ -227,7 +227,7 @@
 </template>
 
 <script setup>
-// 获取实金价
+// 获取实金价
 import useRealGoldPrice from "@/hooks/useRealGoldPrice";
 import {
   onLoad,
@@ -275,7 +275,7 @@ import { timeFormat } from "@/uni_modules/uview-plus";
 import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
 import { getSceneInfo } from "@/utils/util.js";
 import { toLogin } from "@/libs/login.js";
-// 获取实金价
+// 获取实金价
 // 实时价格处理
 const {
   realGoldprice, // 黄金实时销售价(基础)

+ 111 - 108
pages/merchantCenters/merchant.vue

@@ -2,67 +2,73 @@
 
 <template>
   <view class="container">
-<!--    商家信息-->
+    <!--    商家信息-->
     <view class="merchant-info">
       <view class="store-card">
         <view class="info-top">
           <view class="left">
-            <image class="storeImg" :src="merchantInfo.merchantLogo" mode="aspectFill"></image>
+            <image
+              class="storeImg"
+              :src="merchantInfo.merchantLogo"
+              mode="aspectFill"
+            ></image>
           </view>
           <view class="center">
-            <view class="name">{{merchantInfo.merchantName}}</view>
+            <view class="name">{{ merchantInfo.merchantName }}</view>
           </view>
         </view>
-        <view class="desc">{{merchantInfo.merchantDescribe}}</view>
+        <view class="desc">{{ merchantInfo.merchantDescribe }}</view>
         <view class="tel" @click="makePhoneCall">
           <image class="phone2 mr20" src="@/static/images/phone2.png"></image>
-          <text>联系电话:{{merchantInfo.merchantPhone}}</text>
+          <text>联系电话:{{ merchantInfo.merchantPhone }}</text>
           <image class="phone fr" src="@/static/images/phone.png"></image>
         </view>
       </view>
     </view>
 
-<!--    商品-->
-    <up-tabs :list="tabList"
-             @click="tabChange"
-             lineColor="#333333"
-             :itemStyle="{
-               flex:1,
-               height:'44px',
-             }"
-             :activeStyle="{
-                color: '#333333',
-                fontWeight: 'bold',
-                transform: 'scale(1.05)'
-            }"
-             :inactiveStyle="{
-              color: '#666666',
-              transform: 'scale(1)'
-        }"></up-tabs>
-      <!--    商品列表-->
+    <!--    商品-->
+    <up-tabs
+      :list="tabList"
+      @click="tabChange"
+      lineColor="#333333"
+      :itemStyle="{
+        flex: 1,
+        height: '44px',
+      }"
+      :activeStyle="{
+        color: '#333333',
+        fontWeight: 'bold',
+        transform: 'scale(1.05)',
+      }"
+      :inactiveStyle="{
+        color: '#666666',
+        transform: 'scale(1)',
+      }"
+    ></up-tabs>
+    <!--    商品列表-->
     <view class="index-product-wrapper" v-if="tabActive == '0'">
       <view
-          class="list-box animated"
-          :class="goodsList.length > 0 ? 'fadeIn on' : ''"
+        class="list-box animated"
+        :class="goodsList.length > 0 ? 'fadeIn on' : ''"
       >
         <view
-            class="item"
-            v-for="(item, index) in calculatedProducts"
-            :key="index"
-            @click="goDetail(item)"
+          class="item"
+          v-for="(item, index) in calculatedProducts"
+          :key="index"
+          @click="goDetail(item)"
         >
           <view class="pictrue">
             <image :src="item.image" mode=""></image>
           </view>
           <view class="text-info">
-            <view class="title" >
+            <view class="title">
               <view class="text line1">{{ item.storeName }}</view>
               <view class="weight">{{ item.weight }}g</view>
             </view>
             <view class="bottom-row">
               <!-- <text class="price">工费: {{ item.price }}/克</text> -->
               <text class="price">¥ {{ item.totalPrice }}</text>
-              <text class="sales" style="color:#666;">
+              <text class="sales" style="color: #666">
                 销量:{{ Number(item.sales || 0) + Number(item.ficti || 0) }}件
               </text>
               <!-- <view class="txt">券</view> -->
@@ -70,9 +76,7 @@
             <view class="bottom-row">
               <!-- <text class="price">工费: {{ item.price }}/克</text> -->
               <text class="sales">工费:¥{{ item.totalLaborCost }}</text>
-              <text class="sales">
-                附加费:¥{{ item.additionalAmount }}
-              </text>
+              <text class="sales"> 附加费:¥{{ item.additionalAmount }} </text>
               <!-- <view class="txt">券</view> -->
             </view>
           </view>
@@ -80,13 +84,13 @@
       </view>
       <view class="loadingicon acea-row row-center-wrapper" v-if="goodScroll">
         <text
-            class="loading iconfont icon-jiazai"
-            :hidden="loading == false"
+          class="loading iconfont icon-jiazai"
+          :hidden="loading == false"
         ></text>
       </view>
       <view class="no-data" v-if="isNoDataState">
         <image
-            src="https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/zhanwu_20250827104005_1720_6.png"
+          src="https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/zhanwu_20250827104005_1720_6.png"
         />
       </view>
       <view class="mores-txt flex" v-if="!goodScroll && !isNoDataState">
@@ -94,21 +98,24 @@
       </view>
     </view>
     <view class="index-product-wrapper" v-show="tabActive == '1'">
-      <merchantCate ref="merchantCateRef" :merchant-id="query.merchantId || merchantInfo.id" />
+      <merchantCate
+        ref="merchantCateRef"
+        :merchant-id="query.merchantId || merchantInfo.id"
+      />
     </view>
   </view>
 </template>
 <script setup>
-import {computed, nextTick, ref} from 'vue';
+import { computed, nextTick, ref } from "vue";
 import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
 import { getSbmerchantInfo } from "@/api/merchant.js";
-import merchantCate from "./components/merchant_cate.vue"
-import { getGroomList as getGroomListApi, } from "@/api/store.js";
+import merchantCate from "./components/merchant_cate.vue";
+import { getGroomList as getGroomListApi } from "@/api/store.js";
 import { footprintScan } from "@/api/merchant.js";
 import { useAppStore } from "@/stores/app";
 const appStore = useAppStore();
 
-// 获取实金价
+// 获取实金价
 import useRealGoldPrice from "@/hooks/useRealGoldPrice";
 // 实时价格处理
 const {
@@ -120,10 +127,10 @@ const {
 const query = ref({});
 const merchantInfo = ref({});
 const tabList = ref([
-  {name:'推荐商品',code:'0'},
-  {name:'商品分类',code:'1'}
-])
-const tabActive = ref('0');
+  { name: "推荐商品", code: "0" },
+  { name: "商品分类", code: "1" },
+]);
+const tabActive = ref("0");
 const goodsList = ref([]);
 const goodType = ref(1);
 // Pagination
@@ -133,7 +140,7 @@ const params = ref({
 });
 const loading = ref(false);
 const goodScroll = ref(true);
-const merchantCateRef = ref()
+const merchantCateRef = ref();
 
 const calculatedProducts = computed(() => {
   // 计算逻辑与原代码一致,但基于响应式数据 products
@@ -149,12 +156,12 @@ const calculatedProducts = computed(() => {
 
     const totalLaborCost = Number(product.totalLaborCost);
     const additionalAmount = Number(product.additionalAmount);
-    const totalPrice = (totalLaborCost+additionalAmount).toFixed(2);
+    const totalPrice = (totalLaborCost + additionalAmount).toFixed(2);
 
     return {
       ...product,
       calculatedTotal: formattedTotal, // 新增计算结果字段
-      totalPrice
+      totalPrice,
     };
   });
 });
@@ -162,7 +169,6 @@ const isNoDataState = computed(() => {
   return goodsList.value.length === 0 && !loading.value;
 });
 
-
 onLoad((options) => {
   query.value = options;
   getSbmerchantInfoFn();
@@ -173,48 +179,49 @@ onReachBottom(() => {
 });
 const getSbmerchantInfoFn = async () => {
   let data = {
-    merchantId:query.value.merchantId
-  }
-  let obj ={
-    merchantId:query.value.merchantId,
-    userId:appStore?.userInfo?.userId
-  }
-  if(appStore?.userInfo?.userId){
-	  await footprintScan(obj)
-	  appStore.USERINFO();
+    merchantId: query.value.merchantId,
+  };
+  let obj = {
+    merchantId: query.value.merchantId,
+    userId: appStore?.userInfo?.userId,
+  };
+  if (appStore?.userInfo?.userId) {
+    await footprintScan(obj);
+    appStore.USERINFO();
   }
   // 当浏览的店铺主页不是上次浏览店铺时,才改变状态
-  if(query.value.merchantId != appStore?.userInfo?.lastVisitedMerchantId){
-	  appStore.setIndexRefersh(true)
+  if (query.value.merchantId != appStore?.userInfo?.lastVisitedMerchantId) {
+    appStore.setIndexRefersh(true);
   }
   getSbmerchantInfo(data).then((res) => {
     console.log(res);
     merchantInfo.value = res.data;
-  })
-}
+  });
+};
 const tabChange = (item) => {
-  console.log('item',item)
+  console.log("item", item);
   tabActive.value = item.code;
-  if(item.code==1){
+  if (item.code == 1) {
     try {
-      setTimeout(()=>{
-        nextTick(()=>{
+      setTimeout(() => {
+        nextTick(() => {
           merchantCateRef.value.infoScroll();
-        })
-      },500)
+        });
+      }, 500);
     } catch (error) {
-      console.log(error)
+      console.log(error);
       //TODO handle the exception
     }
-
   }
-}
+};
 // Product Lists
 const getGroomList = async () => {
   if (!goodScroll.value) return;
   try {
     loading.value = true;
-    query.value.merchantId!='' ?  params.value.merchantId = query.value.merchantId:'';
+    query.value.merchantId != ""
+      ? (params.value.merchantId = query.value.merchantId)
+      : "";
     const { data } = await getGroomListApi(goodType.value, params.value);
 
     goodsList.value = [...goodsList.value, ...data.productList.list] || [];
@@ -230,15 +237,15 @@ const getGroomList = async () => {
 const makePhoneCall = () => {
   if (!merchantInfo.value.merchantPhone) {
     uni.showToast({
-      title: '暂无联系电话',
-      icon: 'none'
+      title: "暂无联系电话",
+      icon: "none",
     });
     return;
   }
 
   // 显示确认弹窗
   uni.showModal({
-    title: '拨打电话',
+    title: "拨打电话",
     content: `是否拨打 ${merchantInfo.value.merchantPhone}?`,
     success: (res) => {
       if (res.confirm) {
@@ -246,18 +253,18 @@ const makePhoneCall = () => {
         uni.makePhoneCall({
           phoneNumber: merchantInfo.value.merchantPhone,
           success: () => {
-            console.log('拨打电话成功');
+            console.log("拨打电话成功");
           },
           fail: (err) => {
-            console.log('拨打电话失败:', err);
+            console.log("拨打电话失败:", err);
             uni.showToast({
-              title: '拨打电话失败',
-              icon: 'none'
+              title: "拨打电话失败",
+              icon: "none",
             });
-          }
+          },
         });
       }
-    }
+    },
   });
 };
 const goDetail = async (item) => {
@@ -265,67 +272,63 @@ const goDetail = async (item) => {
 };
 </script>
 <style scoped lang="scss">
-.container{
-  //padding: 30rpx;
-  //box-sizing: border-box;
+.merchant-info {
+  padding: 16rpx 16rpx 0;
 }
-.merchant-info{
-	padding: 16rpx 16rpx 0;
-}
-.store-card{
+.store-card {
   background: #ffffff;
   border-radius: 16rpx;
   padding: 20rpx;
 
-  .info-top{
+  .info-top {
     display: flex;
     justify-content: center;
     align-items: center;
-    background-color: #F9F7F0;
+    background-color: #f9f7f0;
     border-radius: 16rpx;
     padding: 20rpx 0;
-    .left{
+    .left {
       width: 140rpx;
-      .storeImg{
+      .storeImg {
         width: 100rpx;
         height: 100rpx;
         border-radius: 50%;
       }
     }
-    .center{
+    .center {
       width: 70%;
-      .name{
+      .name {
         font-size: 32rpx;
-        color: #333;line-height: 60rpx;
+        color: #333;
+        line-height: 60rpx;
       }
-
     }
   }
-  .desc{
+  .desc {
     font-size: 24rpx;
     color: #666;
     line-height: 40rpx;
     padding: 20rpx 0;
   }
-  .tel{
+  .tel {
     font-size: 28rpx;
-    color:#333;
+    color: #333;
     line-height: 40rpx;
-    .phone2{
+    .phone2 {
       width: 32rpx;
       height: 32rpx;
     }
-    .phone{
+    .phone {
       width: 40rpx;
       height: 40rpx;
       vertical-align: middle;
     }
   }
 }
-.mr20{
+.mr20 {
   margin-right: 20rpx;
 }
-.fr{
+.fr {
   float: right;
 }
 .index-product-wrapper {
@@ -388,12 +391,12 @@ const goDetail = async (item) => {
             background-color: #ef4800;
             border-radius: 5rpx;
           }
-          .text{
+          .text {
             width: 80%;
           }
-          .weight{
-            background-color: rgba(197, 128, 3, 0.10);
-            color: #C58003;
+          .weight {
+            background-color: rgba(197, 128, 3, 0.1);
+            color: #c58003;
             font-size: 24rpx;
             padding: 8rpx 16rpx;
             border-radius: 8rpx;

Fichier diff supprimé car celui-ci est trop grand
+ 1372 - 1172
pages/order_details/index.vue


+ 381 - 337
pages/order_list/index.vue

@@ -1,375 +1,419 @@
 <template>
-	<view>
-		<view class="my-order">
-			<view class="nav">
-				<up-tabs :scrollable="false" lineColor="#F8C008" :activeStyle="{color:'#F8C008',fontSize:'28rpx'}"
-					:inactiveStyle="{color:'#333333',fontSize:'28rpx'}" :list="list" @click="statusClick"
-					:current="oldOrderStatus"></up-tabs>
-			</view>
-			<view class="list" v-if="orderList.length">
-				<OrderListCard v-for="(item, index) in orderList" :key="index" :order="item" :index="index"
-					@cancelOrder="cancelOrder" @goPay="goPay" @goOrderDetails="goOrderDetails" :mallType="0"
-					@delOrder="delOrder" />
-			</view>
-			<view class="loadingicon acea-row row-center-wrapper" v-if="orderList.length > 0">
-				<text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>{{ loadTitle }}
-			</view>
-			<view class="empty" v-if="orderList.length == 0">
-				<uni-empty-view />
-			</view>
-		</view>
-		<payment @closePopup="closePayPopup" :payMode="payMode" :showPopup="showPopup" @payComplete="payComplete"
-			@payFail="payFail" @onChangeFun="onChangeFun" :order_id="pay_order_id" :totalPrice="totalPrice"></payment>
-	</view>
+  <view>
+    <view class="my-order">
+      <view class="nav">
+        <up-tabs
+          :scrollable="false"
+          lineColor="#F8C008"
+          :activeStyle="{ color: '#F8C008', fontSize: '28rpx' }"
+          :inactiveStyle="{ color: '#333333', fontSize: '28rpx' }"
+          :list="list"
+          @click="statusClick"
+          :current="oldOrderStatus"
+        ></up-tabs>
+      </view>
+      <view class="list" v-if="orderList.length">
+        <OrderListCard
+          v-for="(item, index) in orderList"
+          :key="index"
+          :order="item"
+          :index="index"
+          @cancelOrder="cancelOrder"
+          @goPay="goPay"
+          @goOrderDetails="goOrderDetails"
+          :mallType="0"
+          @delOrder="delOrder"
+          @refreshStatus="refreshOrderStatus"
+        />
+      </view>
+      <view
+        class="loadingicon acea-row row-center-wrapper"
+        v-if="orderList.length > 0"
+      >
+        <text
+          class="loading iconfont icon-jiazai"
+          :hidden="loading == false"
+        ></text
+        >{{ loadTitle }}
+      </view>
+      <view class="empty" v-if="orderList.length == 0">
+        <uni-empty-view />
+      </view>
+    </view>
+    <payment
+      @closePopup="closePayPopup"
+      :payMode="payMode"
+      :showPopup="showPopup"
+      @payComplete="payComplete"
+      @payFail="payFail"
+      @onChangeFun="onChangeFun"
+      :order_id="pay_order_id"
+      :totalPrice="totalPrice"
+    ></payment>
+  </view>
 </template>
 
 <script setup>
-	import {
-		ref,
-		onMounted
-	} from "vue";
-	import {
-    onLoad,
-		onShow,
-		onReachBottom
-	} from "@dcloudio/uni-app";
-	import OrderListCard from "@/components/OrderListCard";
-	import {
-		useAppStore
-	} from "@/stores/app";
-	import {
-		getOrderList,
-		orderData,
-		orderCancel,
-		orderDel
-	} from "@/api/order.js";
-	import payment from "@/components/payment";
-	import {
-		toLogin
-	} from "@/libs/login.js";
-	import emptyPage from "@/components/emptyPage.vue";
-	import {
-		useToast
-	} from "@/hooks/useToast";
+import { ref, onMounted } from "vue";
+import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
+import OrderListCard from "@/components/OrderListCard";
+import { useAppStore } from "@/stores/app";
+import { getOrderList, orderData, orderCancel, orderDel } from "@/api/order.js";
+import payment from "@/components/payment";
+import { queryPaymentStatus } from "@/api/payment.js";
+import { toLogin } from "@/libs/login.js";
+import emptyPage from "@/components/emptyPage.vue";
+import { useToast } from "@/hooks/useToast";
 
-	const appStore = useAppStore();
-	const {
-		Toast
-	} = useToast();
+const appStore = useAppStore();
+const { Toast } = useToast();
 
-	// 状态
-	const loading = ref(false);
-	const loadend = ref(false);
-	const loadTitle = ref("加载更多");
-	const orderList = ref([]);
-	const orderDataState = ref({});
-	const orderStatus = ref(0);
-	const oldOrderStatus = ref(0); //老数据
-	const page = ref(1);
-	const limit = ref(10);
-	const payMode = ref([{
-			name: "微信支付",
-			icon: "icon-weixinzhifu",
-			value: "weixin",
-			title: "微信快捷支付",
-		},
-		{
-			name: "余额支付",
-			icon: "icon-yuezhifu",
-			value: "yue",
-			title: "可用余额:",
-			number: 0,
-		},
-	]);
-	const showPopup = ref(false);
-	const pay_order_id = ref("");
-	const totalPrice = ref("0");
+// 状态
+const loading = ref(false);
+const loadend = ref(false);
+const loadTitle = ref("加载更多");
+const orderList = ref([]);
+const orderDataState = ref({});
+const orderStatus = ref(0);
+const oldOrderStatus = ref(0); //老数据
+const page = ref(1);
+const limit = ref(10);
+const payMode = ref([
+  {
+    name: "微信支付",
+    icon: "icon-weixinzhifu",
+    value: "weixin",
+    title: "微信快捷支付",
+  },
+  {
+    name: "余额支付",
+    icon: "icon-yuezhifu",
+    value: "yue",
+    title: "可用余额:",
+    number: 0,
+  },
+]);
+const showPopup = ref(false);
+const pay_order_id = ref("");
+const totalPrice = ref("0");
 
-	const list = ref([{
-			name: '待付款',
-			orderStatus: 0,
-      value: 0
-		},
-		{
-			name: '待发货',
-			orderStatus: 1,
-      value: 1
-		},
-		{
-			name: '待收货',
-			orderStatus: 2,
-      value: 2
-		},
-    {
-      name: '退款/换货',
-      orderStatus: -3,
-      value: 3
-    },
-		{
-			name: '已完成',
-			orderStatus: 4,
-      value: 4
-		},
-    {
-      name: '已取消',
-      orderStatus: 6,
-      value: 6
-    },
-	]) //头部导航
+const list = ref([
+  {
+    name: "待付款",
+    orderStatus: 0,
+    value: 0,
+  },
+  {
+    name: "待发货",
+    orderStatus: 1,
+    value: 1,
+  },
+  {
+    name: "待收货",
+    orderStatus: 2,
+    value: 2,
+  },
+  {
+    name: "退款/换货",
+    orderStatus: -3,
+    value: 3,
+  },
+  {
+    name: "已完成",
+    orderStatus: 4,
+    value: 4,
+  },
+  {
+    name: "已取消",
+    orderStatus: 6,
+    value: 6,
+  },
+]); //头部导航
 
-	// 生命周期
-	onMounted(() => {
-		if (appStore.isLogin) {
-			loadend.value = false;
-			page.value = 1;
-			orderList.value = [];
-			getOrderData();
-			getOrderListFn();
-		} else {
-			toLogin();
-		}
-	});
+// 生命周期
+onMounted(() => {
+  if (appStore.isLogin) {
+    loadend.value = false;
+    page.value = 1;
+    orderList.value = [];
+    getOrderData();
+    getOrderListFn();
+  } else {
+    toLogin();
+  }
+});
 
-	// 页面显示时
-	onShow(() => {
-		if (appStore.isLogin) {
-			loadend.value = false;
-			page.value = 1;
-			orderList.value = [];
-			getOrderData();
-			getOrderListFn();
-		} else {
-			toLogin();
-		}
-	});
-  onLoad((options) => {
-    if (options.status) {
-      const statusValue = parseInt(options.status);
+// 页面显示时
+onShow(() => {
+  if (appStore.isLogin) {
+    loadend.value = false;
+    page.value = 1;
+    orderList.value = [];
+    getOrderData();
+    getOrderListFn();
+  } else {
+    toLogin();
+  }
+});
+onLoad((options) => {
+  if (options.status) {
+    const statusValue = parseInt(options.status);
 
-      // 验证状态是否有效
-      const validStatuses = [0, 1, 2, 4, -3];
-      if (validStatuses.includes(statusValue)) {
-        // 设置状态
-        orderStatus.value = statusValue;
-        // 找到对应的索引
-        const index = list.value.findIndex(item => item.orderStatus === statusValue);
-        if (index !== -1) {
-          oldOrderStatus.value = index;  // 设置索引值
-        }
-
-        console.log("设置订单状态为:", statusValue, "索引为:", index);
-      } else {
-        console.warn("无效的状态参数:", statusValue);
+    // 验证状态是否有效
+    const validStatuses = [0, 1, 2, 4, -3];
+    if (validStatuses.includes(statusValue)) {
+      // 设置状态
+      orderStatus.value = statusValue;
+      // 找到对应的索引
+      const index = list.value.findIndex(
+        (item) => item.orderStatus === statusValue
+      );
+      if (index !== -1) {
+        oldOrderStatus.value = index; // 设置索引值
       }
+
+      console.log("设置订单状态为:", statusValue, "索引为:", index);
+    } else {
+      console.warn("无效的状态参数:", statusValue);
     }
-  })
-	// 下拉加载
-	onReachBottom(() => {
-		getOrderListFn();
-	});
+  }
+});
+// 下拉加载
+onReachBottom(() => {
+  getOrderListFn();
+});
 
-	function onChangeFun(state) {
-		let action = state.action || null;
-		let value = state.value !== undefined ? state.value : null;
-		if (action && typeof [action] === "function") {
-			[action](value);
-		}
-	}
+function onChangeFun(state) {
+  let action = state.action || null;
+  let value = state.value !== undefined ? state.value : null;
+  if (action && typeof [action] === "function") {
+    [action](value);
+  }
+}
 
-	function getOrderData() {
-		orderData().then((res) => {
-			orderDataState.value = res.data;
-		});
-	}
+function getOrderData() {
+  orderData().then((res) => {
+    orderDataState.value = res.data;
+  });
+}
 
-	function cancelOrder(index, order_id) {
-		if (!order_id) return Toast({
-			title: "缺少订单号无法取消订单"
-		});
-		uni.showLoading({
-			title: "正在删除中"
-		});
-		orderCancel(order_id)
-			.then((res) => {
-				uni.hideLoading();
-				Toast({
-					title: "删除成功",
-					icon: "success"
-				}, () => {
-					orderList.value.splice(index, 1);
-					orderDataState.value.unpaid_count--;
-					getOrderData();
-				});
-			})
-			.catch((err) => {
-				Toast({
-					title: err
-				});
-			});
-	}
+function cancelOrder(index, order_id) {
+  if (!order_id)
+    return Toast({
+      title: "缺少订单号无法取消订单",
+    });
+  uni.showLoading({
+    title: "正在删除中",
+  });
+  orderCancel(order_id)
+    .then((res) => {
+      uni.hideLoading();
+      Toast(
+        {
+          title: "删除成功",
+          icon: "success",
+        },
+        () => {
+          orderList.value.splice(index, 1);
+          orderDataState.value.unpaid_count--;
+          getOrderData();
+        }
+      );
+    })
+    .catch((err) => {
+      Toast({
+        title: err,
+      });
+    });
+}
+
+function goPay(pay_price, order_id) {
+  appStore.USERINFO().then((res) => {
+    if (res.nowMoney) {
+      showPopup.value = true;
+      pay_order_id.value = order_id;
+      totalPrice.value = pay_price;
+    }
+  });
+}
+const closePayPopup = () => {
+  console.log("payClose");
+  showPopup.value = false;
+};
 
-	function goPay(pay_price, order_id) {
-		appStore.USERINFO().then((res) => {
-			if (res.nowMoney) {
-				showPopup.value = true;
-				pay_order_id.value = order_id;
-				totalPrice.value = pay_price;
-			}
-		});
-	}
-	const closePayPopup = () => {
-		console.log("payClose");
-		showPopup.value = false;
-	};
+function payComplete() {
+  console.log("payComplete");
+  loadend.value = false;
+  page.value = 1;
+  orderList.value = [];
+  showPopup.value = false;
+  getOrderData();
+  getOrderListFn();
+}
 
-	function payComplete() {
-		console.log("payComplete");
-		loadend.value = false;
-		page.value = 1;
-		orderList.value = [];
-		showPopup.value = false;
-		getOrderData();
-		getOrderListFn();
-	}
+function payFail() {
+  showPopup.value = false;
+}
 
-	function payFail() {
-		showPopup.value = false;
-	}
+function goOrderDetails(order_id) {
+  if (!order_id)
+    return Toast({
+      title: "缺少订单号无法查看订单详情",
+    });
+  uni.navigateTo({
+    url: "/pages/order_details/index?order_id=" + order_id,
+  });
+}
 
-	function goOrderDetails(order_id) {
-		if (!order_id) return Toast({
-			title: "缺少订单号无法查看订单详情"
-		});
-		uni.navigateTo({
-			url: "/pages/order_details/index?order_id=" + order_id
-		});
-	}
+function toReturnList() {
+  uni.navigateTo({
+    url: "/pages/users/user_return_list/index",
+  });
+}
 
-	function toReturnList() {
-		uni.navigateTo({
-			url: "/pages/users/user_return_list/index"
-		});
-	}
+const changeStatus = (item) => {
+  // oldOrderStatus.value = item.index;
+};
 
-	const changeStatus = (item) => {
-		// oldOrderStatus.value = item.index;
-	}
+function statusClick(item) {
+  console.log(item);
+  if (item.orderStatus === orderStatus.value) return;
 
-	function statusClick(item) {
-    console.log(item)
-		if (item.orderStatus === orderStatus.value) return;
-		
-		orderStatus.value = item.orderStatus;
-		loadend.value = false;
-		page.value = 1;
-		orderList.value = [];
-		getOrderListFn();
-	}
+  orderStatus.value = item.orderStatus;
+  loadend.value = false;
+  page.value = 1;
+  orderList.value = [];
+  getOrderListFn();
+}
 
-	function getOrderListFn() {
-		if (loadend.value || loading.value) return;
-		loading.value = true;
-		loadTitle.value = "加载更多";
-		getOrderList({
-				type: orderStatus.value,
-				page: page.value,
-				limit: limit.value,
-				mallType: 0,
-			})
-			.then((res) => {
-				let list = res.data.list || [];
-				let isLoadend = list.length < limit.value;
-				// orderList.value = uni.$util.SplitArray(list, orderList.value)
-				orderList.value = [...list, ...orderList.value];
-				loadend.value = isLoadend;
-				loading.value = false;
-				loadTitle.value = isLoadend ? "我也是有底线的" : "加载更多";
-				page.value += 1;
-			})
-			.catch(() => {
-				loading.value = false;
-				loadTitle.value = "加载更多";
-			});
-	}
+function getOrderListFn() {
+  if (loadend.value || loading.value) return;
+  loading.value = true;
+  loadTitle.value = "加载更多";
+  getOrderList({
+    type: orderStatus.value,
+    page: page.value,
+    limit: limit.value,
+    mallType: 0,
+  })
+    .then((res) => {
+      let list = res.data.list || [];
+      let isLoadend = list.length < limit.value;
+      // orderList.value = uni.$util.SplitArray(list, orderList.value)
+      orderList.value = [...list, ...orderList.value];
+      loadend.value = isLoadend;
+      loading.value = false;
+      loadTitle.value = isLoadend ? "我也是有底线的" : "加载更多";
+      page.value += 1;
+    })
+    .catch(() => {
+      loading.value = false;
+      loadTitle.value = "加载更多";
+    });
+}
 
-	function delOrder(order_id, index) {
-		orderDel(order_id)
-			.then((res) => {
-				orderList.value.splice(index, 1);
-				orderDataState.value.unpaid_count--;
-				getOrderData();
-				Toast({
-					title: "删除成功",
-					icon: "success"
-				});
-			})
-			.catch((err) => {
-				Toast({
-					title: err
-				});
-			});
-	}
+function refreshOrderStatus(orderId, index) {
+  if (!orderId) return Toast({ title: "缺少订单号" });
+  uni.showLoading({ title: "查询中..." });
+  queryPaymentStatus(orderId)
+    .then((res) => {
+      uni.hideLoading();
+      const isPaid = res.data?.tradeState === "SUCCESS";
+      if (isPaid) {
+        Toast({ title: "支付成功,订单已更新", icon: "success" }, () => {
+          loadend.value = false;
+          page.value = 1;
+          orderList.value = [];
+          getOrderData();
+          getOrderListFn();
+        });
+      } else {
+        Toast({ title: "订单未支付,状态未变更" });
+      }
+    })
+    .catch((err) => {
+      uni.hideLoading();
+      Toast({ title: err || "查询失败,请稍后重试" });
+    });
+}
+
+function delOrder(order_id, index) {
+  orderDel(order_id)
+    .then((res) => {
+      orderList.value.splice(index, 1);
+      orderDataState.value.unpaid_count--;
+      getOrderData();
+      Toast({
+        title: "删除成功",
+        icon: "success",
+      });
+    })
+    .catch((err) => {
+      Toast({
+        title: err,
+      });
+    });
+}
 </script>
 <style>
-	page {
-		background: #F9F7F0;
-	}
+page {
+  background: #f9f7f0;
+}
 </style>
 <style scoped lang="scss">
-	.empty {
-		height: calc(100vh - 44px);
-		/* #ifdef H5 */
-		height: calc(100vh - 88px);
-		/* #endif */
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.my-order {
+.empty {
+  height: calc(100vh - 44px);
+  /* #ifdef H5 */
+  height: calc(100vh - 88px);
+  /* #endif */
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
-		.nav {
-			background: #FFFFFF;
+.my-order {
+  .nav {
+    background: #ffffff;
 
-			// height: 140rpx;
-			background-color: #fff;
+    // height: 140rpx;
+    background-color: #fff;
 
-			.item {
-				text-align: center;
-				font-size: 26rpx;
-				color: #282828;
-				padding: 26rpx 0;
+    .item {
+      text-align: center;
+      font-size: 26rpx;
+      color: #282828;
+      padding: 26rpx 0;
 
-				&.on {
-					font-weight: bold;
-					border-bottom: 5rpx solid $border-color;
-				}
+      &.on {
+        font-weight: bold;
+        border-bottom: 5rpx solid $border-color;
+      }
 
-				.num {
-					margin-top: 18rpx;
-				}
-			}
-		}
+      .num {
+        margin-top: 18rpx;
+      }
+    }
+  }
 
-		.list {
-			width: 690rpx;
-			margin: 16rpx auto 0 auto;
-		}
-	}
+  .list {
+    width: 690rpx;
+    margin: 16rpx auto 0 auto;
+  }
+}
 
-	.noCart {
-		margin-top: 171rpx;
-		padding-top: 0.1rpx;
+.noCart {
+  margin-top: 171rpx;
+  padding-top: 0.1rpx;
 
-		.pictrue {
-			width: 414rpx;
-			height: 336rpx;
-			margin: 78rpx auto 56rpx auto;
+  .pictrue {
+    width: 414rpx;
+    height: 336rpx;
+    margin: 78rpx auto 56rpx auto;
 
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
+    image {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
 </style>

+ 4 - 2
pages/user/index.vue

@@ -169,7 +169,9 @@
         class="functions-useList"
         v-if="useList && useList.length > 0"
         :style="{
-          gridTemplateColumns: `repeat(${useList.length <= 4 ? useList.length : 4},1fr`,
+          gridTemplateColumns: `repeat(${
+            useList.length <= 4 ? useList.length : 4
+          },1fr`,
         }"
       >
         <view
@@ -553,7 +555,7 @@ watch(
     // ];
     console.log(tradeList.value);
   },
-  { deep: true, immediate: true },
+  { deep: true, immediate: true }
 );
 
 // 编辑资料

Fichier diff supprimé car celui-ci est trop grand
+ 1651 - 1537
pages/users/order_confirm/index.vue


+ 238 - 233
pages/users/order_confirm/index_bf.vue

@@ -2,24 +2,24 @@
   <view>
     <view class="order-submission">
       <view
-          class="allAddress"
-          :style="store_self_mention ? '' : 'padding-top:10rpx;'"
+        class="allAddress"
+        :style="store_self_mention ? '' : 'padding-top:10rpx;'"
       >
         <view class="nav acea-row">
           <view
-              class="item font-color"
-              :class="shippingType == 0 ? 'on' : 'on2'"
-              @tap="addressType(0)"
-              v-if="store_self_mention"
+            class="item font-color"
+            :class="shippingType == 0 ? 'on' : 'on2'"
+            @tap="addressType(0)"
+            v-if="store_self_mention"
           ></view>
           <!-- <view class="item font-color" :class="shippingType == 1 ? 'on' : 'on2'" @tap="addressType(1)"
 						v-if="store_self_mention"></view> -->
         </view>
         <view
-            class="address acea-row row-between-wrapper"
-            @tap="onAddress"
-            v-if="shippingType == 0"
-            :style="
+          class="address acea-row row-between-wrapper"
+          @tap="onAddress"
+          v-if="shippingType == 0"
+          :style="
             store_self_mention
               ? ''
               : 'border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;'
@@ -27,15 +27,15 @@
         >
           <view class="addressCon" v-if="addressInfo.realName">
             <view class="name"
-            >{{ addressInfo.realName }}
+              >{{ addressInfo.realName }}
               <text class="phone">{{ addressInfo.phone }}</text>
             </view>
             <view class="acea-row">
               <text class="default font-color" v-if="addressInfo.isDefault"
-              >[默认]</text
+                >[默认]</text
               >
               <text class="line2"
-              >{{ addressInfo.province }}{{ addressInfo.city
+                >{{ addressInfo.province }}{{ addressInfo.city
                 }}{{ addressInfo.district }}{{ addressInfo.detail }}</text
               >
             </view>
@@ -46,14 +46,14 @@
           <uni-icons type="right" size="14" color="#333333"></uni-icons>
         </view>
         <view
-            class="address acea-row row-between-wrapper"
-            v-else
-            @tap="showStoreList"
+          class="address acea-row row-between-wrapper"
+          v-else
+          @tap="showStoreList"
         >
           <block v-if="storeList.length > 0">
             <view class="addressCon">
               <view class="name"
-              >{{ system_store.name }}
+                >{{ system_store.name }}
                 <text class="phone">{{ system_store.phone }}</text>
               </view>
               <view class="line1">
@@ -73,19 +73,19 @@
       </view>
       <view class="pad30">
         <orderGoods
-            :mallType="orderInfoVo.mallType"
-            :cartInfo="cartInfo"
-            :orderProNum="orderProNum"
+          :mallType="orderInfoVo.mallType"
+          :cartInfo="cartInfo"
+          :orderProNum="orderProNum"
         ></orderGoods>
         <view class="wrapper borRadius14">
           <view
-              class="item acea-row row-between-wrapper"
-              @tap="couponTap"
-              v-if="orderInfoVo.mallType === 0"
+            class="item acea-row row-between-wrapper"
+            @tap="couponTap"
+            v-if="orderInfoVo.mallType === 0"
           >
             <view>优惠券</view>
             <view class="discount"
-            >{{ couponTitle }}
+              >{{ couponTitle }}
               <uni-icons type="right" size="14" color="#333333"></uni-icons>
             </view>
           </view>
@@ -93,8 +93,8 @@
             <view>快递费用</view>
             <block v-if="orderInfoVo.mallType === 0">
               <view
-                  class="discount"
-                  v-if="
+                class="discount"
+                v-if="
                   parseFloat(orderInfoVo.freightFee) > 0 &&
                   orderInfoVo.mallType === 0
                 "
@@ -108,12 +108,12 @@
           <view class="item" v-if="textareaStatus">
             <view>备注信息</view>
             <textarea
-                v-if="coupon.coupon === false"
-                placeholder-class="placeholder"
-                @input="bindHideKeyboard"
-                value=""
-                name="mark"
-                placeholder="请添加备注(150字以内)"
+              v-if="coupon.coupon === false"
+              placeholder-class="placeholder"
+              @input="bindHideKeyboard"
+              value=""
+              name="mark"
+              placeholder="请添加备注(150字以内)"
             ></textarea>
           </view>
         </view>
@@ -148,16 +148,16 @@
             </view>
             <view class="list">
               <view
-                  v-for="(item, index) in avaliablePayments"
-                  class="payItem acea-row row-middle"
-                  :class="active == index ? 'on' : ''"
-                  @tap="payItem(index)"
-                  :key="index"
+                v-for="(item, index) in avaliablePayments"
+                class="payItem acea-row row-middle"
+                :class="active == index ? 'on' : ''"
+                @tap="payItem(index)"
+                :key="index"
               >
                 <view class="name acea-row row-center-wrapper">
                   <view
-                      class="iconfont animated"
-                      :class="
+                    class="iconfont animated"
+                    :class="
                       item.icon +
                       ' ' +
                       (animated == true && active == index ? 'bounceIn' : '')
@@ -181,16 +181,18 @@
               贝币: {{ Number(orderInfoVo.proTotalFee) || 0 }}
             </view>
           </view>
-		  <view
-		      class="item acea-row row-between-wrapper"
-		      v-if="orderInfoVo?.proTotalWeight && orderInfoVo?.proTotalWeight>0"
-		  >
-		    <view>总克重:</view>
-		    <view class="money">{{orderInfoVo.proTotalWeight}} g</view>
-		  </view>
           <view
-              class="item acea-row row-between-wrapper"
-              v-if="orderInfoVo.couponFee > 0"
+            class="item acea-row row-between-wrapper"
+            v-if="
+              orderInfoVo?.proTotalWeight && orderInfoVo?.proTotalWeight > 0
+            "
+          >
+            <view>总克重:</view>
+            <view class="money">{{ orderInfoVo.proTotalWeight }} g</view>
+          </view>
+          <view
+            class="item acea-row row-between-wrapper"
+            v-if="orderInfoVo.couponFee > 0"
           >
             <view>优惠券抵扣:</view>
             <view class="money">-¥{{ orderInfoVo.couponFee }}</view>
@@ -204,39 +206,39 @@
           </view> -->
 
           <view
-              class="item acea-row row-between-wrapper"
-              v-if="orderInfoVo.mallType === 0"
+            class="item acea-row row-between-wrapper"
+            v-if="orderInfoVo.mallType === 0"
           >
             <view>工费:</view>
             <view class="money">+¥{{ orderInfoVo.totalLaborCost }}</view>
           </view>
 
           <view
-              class="item acea-row row-between-wrapper"
-              v-if="
+            class="item acea-row row-between-wrapper"
+            v-if="
               orderInfoVo.mallType === 0 && orderInfoVo?.totalAdditionalAmount
             "
           >
             <view>附加费:</view>
             <view class="money"
-            >+¥{{ orderInfoVo.totalAdditionalAmount }}</view
+              >+¥{{ orderInfoVo.totalAdditionalAmount }}</view
             >
           </view>
 
           <view
-              class="item acea-row row-between-wrapper"
-              v-if="orderInfoVo.freightFee > 0"
+            class="item acea-row row-between-wrapper"
+            v-if="orderInfoVo.freightFee > 0"
           >
             <view>运费:</view>
             <view class="money">+¥{{ orderInfoVo.freightFee }}</view>
           </view>
 
           <view
-              v-if="
+            v-if="
               orderInfoVo.mallType === 0 &&
               Number(orderInfoVo.vipLevelDis) !== 0
             "
-              class="item acea-row row-between-wrapper"
+            class="item acea-row row-between-wrapper"
           >
             <view>会员折扣:</view>
             <view class="money">-¥{{ orderInfoVo.vipLevelDis }}</view>
@@ -260,25 +262,31 @@
       </view>
     </view>
     <couponListWindow
-        :coupon="coupon"
-        @close="closeCouponPopup"
-        :showPopup="showCouponPopup"
-        :openType="openType"
-        @ChangCoupons="ChangCoupons"
-        :orderShow="orderShow"
+      :coupon="coupon"
+      @close="closeCouponPopup"
+      :showPopup="showCouponPopup"
+      :openType="openType"
+      @ChangCoupons="ChangCoupons"
+      :orderShow="orderShow"
     ></couponListWindow>
-	<addressWindow ref="addressWindowRef" @changeTextareaStatus="changeTextareaStatus" :address="address"
-		:pagesUrl="pagesUrl" @OnDefaultAddress="OnDefaultAddress" @OnChangeAddress="OnChangeAddress"
-		@changeClose="changeClose" />
+    <addressWindow
+      ref="addressWindowRef"
+      @changeTextareaStatus="changeTextareaStatus"
+      :address="address"
+      :pagesUrl="pagesUrl"
+      @OnDefaultAddress="OnDefaultAddress"
+      @OnChangeAddress="OnChangeAddress"
+      @changeClose="changeClose"
+    />
 
     <!-- 余额不足modal -->
     <up-modal
-        :showCancelButton="true"
-        :show="showModal"
-        title="余额不足"
-        confirmText="去充值"
-        @cancel="showModal = false"
-        @confirm="modalConfirm"
+      :showCancelButton="true"
+      :show="showModal"
+      title="余额不足"
+      confirmText="去充值"
+      @cancel="showModal = false"
+      @confirm="modalConfirm"
     ></up-modal>
   </view>
 </template>
@@ -376,10 +384,10 @@ const payments = ref([
 
 // 计算属性:过滤出可用的支付方式(只保留payStatus为1的项)
 const avaliablePayments = computed(() => {
-  console.log(payments.value)
+  console.log(payments.value);
   return payments.value.filter((item) => item.payStatus === 1);
 });
-console.log(avaliablePayments)
+console.log(avaliablePayments);
 
 // 响应式变量:当前选中的支付方式(默认余额支付)
 const payType = ref("yue");
@@ -442,16 +450,16 @@ const userSelectPayTypeItem = ref(payments.value[0]);
 
 // 监听 isLogin
 watch(
-    () => appStore.isLogin, // 监听的数据源:全局登录状态
-    (newV) => {
-      // newV是登录状态的新值(true/false)
-      if (newV) {
-        // 若已登录
-        getloadPreOrder(); // 加载预订单信息
-        this.getaddressInfo(); // 获取地址信息(this指向当前组件实例)
-      }
-    },
-    { deep: true } // 深度监听(确保复杂数据类型变化也能触发)
+  () => appStore.isLogin, // 监听的数据源:全局登录状态
+  (newV) => {
+    // newV是登录状态的新值(true/false)
+    if (newV) {
+      // 若已登录
+      getloadPreOrder(); // 加载预订单信息
+      this.getaddressInfo(); // 获取地址信息(this指向当前组件实例)
+    }
+  },
+  { deep: true } // 深度监听(确保复杂数据类型变化也能触发)
 );
 // 商品总价
 
@@ -524,70 +532,70 @@ const getloadPreOrder = () => {
 
   // 调用加载预订单API,传入预订单号
   loadPreOrderApi(preOrderNo.value)
-      .then((res) => {
-        metalTypeMap[1].balance = res.data.auBalance || 0;
-        metalTypeMap[2].balance = res.data.ptBalance || 0;
-        metalTypeMap[3].balance = res.data.agBalance || 0;
-        metalType.value = res.data.metalType;
-        // 接口成功回调
-        let orderInfoVoData = res.data.orderInfoVo; // 订单基本信息
-        orderInfoVo.value = orderInfoVoData; // 保存订单信息
-        cartInfo.value = orderInfoVoData.orderDetailList; // 保存商品列表
-
-        orderProNum.value = orderInfoVoData.orderProNum; // 保存商品总数
-
-        // 设置地址ID(优先用参数传入的,没有则用订单默认的)
-        address.value.addressId = addressId.value
-            ? addressId.value
-            : orderInfoVoData.addressId;
-
-        // 判断是否支持门店自提(根据接口返回和全局状态)
-        store_self_mention.value =
-            res.data.storeSelfMention == "true" && // 接口返回支持自提
-            appStore.productTypeComputed === "normal" // 全局状态为普通商品
-                ? true
-                : false;
-
-        // 根据商城类型设置是否使用积分(mallType=1时默认使用)
-        useIntegral.value = orderInfoVo.value.mallType === 1;
-        // 根据商城类型设置默认支付方式(mallType=1时用贝币支付)
-        // payType.value = orderInfoVo.value.mallType === 1 ? "yue" : "alipay";
-        payType.value = "yue";
-
-        // 动态更新支付方式状态(根据接口返回的配置)
-        payments.value.forEach((item) => {
-          if (item.name === "余额支付") {
-            // 余额支付:显示可用余额,状态由接口返回的yuePayStatus决定
-            item.title = "可用余额: " + orderInfoVoData.userBalance;
-            item.payStatus = parseInt(res.data.yuePayStatus) === 1 ? 1 : 2;
-          } else if (item.payType === "weixin") {
-            // 微信支付:状态由接口返回的payWeixinOpen决定
-            item.payStatus = parseInt(res.data.payWeixinOpen) === 1 ? 1 : 0;
-          }
-
-          // 贝币支付:仅在mallType=1时可用
-          if (orderInfoVo.value.mallType === 1) {
-            item.title = "可用贝币: " + orderInfoVoData.userIntegral;
-            item.payStatus = item.name === "贝币支付" ? 1 : 0;
-          } else {
-            item.payStatus = item.name === "贝币支付" ? 0 : 1;
-          }
-        });
+    .then((res) => {
+      metalTypeMap[1].balance = res.data.auBalance || 0;
+      metalTypeMap[2].balance = res.data.ptBalance || 0;
+      metalTypeMap[3].balance = res.data.agBalance || 0;
+      metalType.value = res.data.metalType;
+      // 接口成功回调
+      let orderInfoVoData = res.data.orderInfoVo; // 订单基本信息
+      orderInfoVo.value = orderInfoVoData; // 保存订单信息
+      cartInfo.value = orderInfoVoData.orderDetailList; // 保存商品列表
+
+      orderProNum.value = orderInfoVoData.orderProNum; // 保存商品总数
+
+      // 设置地址ID(优先用参数传入的,没有则用订单默认的)
+      address.value.addressId = addressId.value
+        ? addressId.value
+        : orderInfoVoData.addressId;
+
+      // 判断是否支持门店自提(根据接口返回和全局状态)
+      store_self_mention.value =
+        res.data.storeSelfMention == "true" && // 接口返回支持自提
+        appStore.productTypeComputed === "normal" // 全局状态为普通商品
+          ? true
+          : false;
+
+      // 根据商城类型设置是否使用积分(mallType=1时默认使用)
+      useIntegral.value = orderInfoVo.value.mallType === 1;
+      // 根据商城类型设置默认支付方式(mallType=1时用贝币支付)
+      // payType.value = orderInfoVo.value.mallType === 1 ? "yue" : "alipay";
+      payType.value = "yue";
+
+      // 动态更新支付方式状态(根据接口返回的配置)
+      payments.value.forEach((item) => {
+        if (item.name === "余额支付") {
+          // 余额支付:显示可用余额,状态由接口返回的yuePayStatus决定
+          item.title = "可用余额: " + orderInfoVoData.userBalance;
+          item.payStatus = parseInt(res.data.yuePayStatus) === 1 ? 1 : 2;
+        } else if (item.payType === "weixin") {
+          // 微信支付:状态由接口返回的payWeixinOpen决定
+          item.payStatus = parseInt(res.data.payWeixinOpen) === 1 ? 1 : 0;
+        }
 
-        if (addressId.value) {
-          computedPrice();
+        // 贝币支付:仅在mallType=1时可用
+        if (orderInfoVo.value.mallType === 1) {
+          item.title = "可用贝币: " + orderInfoVoData.userIntegral;
+          item.payStatus = item.name === "贝币支付" ? 1 : 0;
+        } else {
+          item.payStatus = item.name === "贝币支付" ? 0 : 1;
         }
-        // 调用子页面方法授权后执行获取地址列表
-        nextTick(() => {
-          addressWindowRef.value.fetchAddressList();
-        });
-      })
-      .catch((err) => {
-        // 接口失败回调
-        console.error(err); // 打印错误
-        uni.navigateTo({ url: "/pages/order_list/index" }); // 跳转到订单列表
-        Toast({ title: err }); // 提示错误信息
       });
+
+      if (addressId.value) {
+        computedPrice();
+      }
+      // 调用子页面方法授权后执行获取地址列表
+      nextTick(() => {
+        addressWindowRef.value.fetchAddressList();
+      });
+    })
+    .catch((err) => {
+      // 接口失败回调
+      console.error(err); // 打印错误
+      uni.navigateTo({ url: "/pages/order_list/index" }); // 跳转到订单列表
+      Toast({ title: err }); // 提示错误信息
+    });
 };
 // 授权回调事件(用户授权后触发,预留)
 const onLoadFun = () => {
@@ -610,16 +618,16 @@ const getList = () => {
   };
   // 调用门店列表API
   storeListApi(data)
-      .then((res) => {
-        // 成功回调
-        let list = res.data.list || []; // 门店列表
-        storeList.value = list; // 保存门店列表
-        system_store.value = list[0]; // 默认选中第一个门店
-      })
-      .catch((err) => {
-        // 失败回调
-        Toast({ title: err }); // 提示错误
-      });
+    .then((res) => {
+      // 成功回调
+      let list = res.data.list || []; // 门店列表
+      storeList.value = list; // 保存门店列表
+      system_store.value = list[0]; // 默认选中第一个门店
+    })
+    .catch((err) => {
+      // 失败回调
+      Toast({ title: err }); // 提示错误
+    });
 };
 
 // 关闭地址弹窗
@@ -649,24 +657,24 @@ function computedPrice() {
     preOrderNo: preOrderNo.value, // 预订单号
     goldNum: appStore.userInfo.goldBalance, // 余料数量
   })
-      .then((res) => {
-        // 成功回调
-        let data = res.data; // 计算后的价格数据
-        // 更新订单费用信息
-        orderInfoVo.value.couponFee = data.couponFee; // 优惠券抵扣
-        orderInfoVo.value.userIntegral = data.surplusIntegral; // 剩余积分
-        orderInfoVo.value.deductionPrice = data.deductionPrice; // 积分抵扣金额
-        orderInfoVo.value.freightFee = data.freightFee; // 运费
-        orderInfoVo.value.payFee = data.payFee; // 实付金额
-        orderInfoVo.value.proTotalFee = data.proTotalFee; // 商品总价
-        orderInfoVo.value.useIntegral = data.useIntegral; // 是否使用积分
-        orderInfoVo.value.usedIntegral = data.usedIntegral; // 已用积分
-        orderInfoVo.value.surplusIntegral = data.surplusIntegral; // 剩余积分
-      })
-      .catch((err) => {
-        // 失败回调
-        Toast({ title: err }); // 提示错误
-      });
+    .then((res) => {
+      // 成功回调
+      let data = res.data; // 计算后的价格数据
+      // 更新订单费用信息
+      orderInfoVo.value.couponFee = data.couponFee; // 优惠券抵扣
+      orderInfoVo.value.userIntegral = data.surplusIntegral; // 剩余积分
+      orderInfoVo.value.deductionPrice = data.deductionPrice; // 积分抵扣金额
+      orderInfoVo.value.freightFee = data.freightFee; // 运费
+      orderInfoVo.value.payFee = data.payFee; // 实付金额
+      orderInfoVo.value.proTotalFee = data.proTotalFee; // 商品总价
+      orderInfoVo.value.useIntegral = data.useIntegral; // 是否使用积分
+      orderInfoVo.value.usedIntegral = data.usedIntegral; // 已用积分
+      orderInfoVo.value.surplusIntegral = data.surplusIntegral; // 剩余积分
+    })
+    .catch((err) => {
+      // 失败回调
+      Toast({ title: err }); // 提示错误
+    });
 }
 
 // 切换配送方式(快递/自提)
@@ -710,9 +718,9 @@ const ChangCoupons = (e) => {
   // this.usableCoupon = e
   // this.coupon.coupon = false
   let index = e,
-      list = coupon.value.list,
-      couponTitleValue = "请选择",
-      couponIdValue = 0;
+    list = coupon.value.list,
+    couponTitleValue = "请选择",
+    couponIdValue = 0;
   console.log("list", list);
   for (let i = 0, len = list.length; i < len; i++) {
     if (i != index) {
@@ -836,7 +844,7 @@ const onAddress = () => {
   address.value.address = true; // 显示地址弹窗
   // 设置地址页面跳转链接(携带预订单号)
   pagesUrl.value =
-      "/pages/users/user_address_list/index?preOrderNo=" + preOrderNo.value;
+    "/pages/users/user_address_list/index?preOrderNo=" + preOrderNo.value;
 };
 
 // 联系人输入事件(保存联系人)
@@ -853,17 +861,17 @@ const phone = (e) => {
 const payment = (data) => {
   // 调用创建订单API
   orderCreate(data)
-      .then((res) => {
-        // 订单创建成功
-        // 调用支付流程,传入订单号和成功提示
-        getOrderPay(res.data.orderNo, "支付成功");
-      })
-      .catch((err) => {
-        // 订单创建失败
-        console.error("payment error", err); // 打印错误
-        uni.hideLoading(); // 隐藏加载中
-        Toast({ title: err }); // 提示错误
-      });
+    .then((res) => {
+      // 订单创建成功
+      // 调用支付流程,传入订单号和成功提示
+      getOrderPay(res.data.orderNo, "支付成功");
+    })
+    .catch((err) => {
+      // 订单创建失败
+      console.error("payment error", err); // 打印错误
+      uni.hideLoading(); // 隐藏加载中
+      Toast({ title: err }); // 提示错误
+    });
 };
 
 // 处理支付流程(根据支付类型发起支付并处理结果)
@@ -905,23 +913,23 @@ const getOrderPay = async (orderNo, message) => {
           console.log("alipayPaymentResult", res);
           // 提示成功并跳转到结果页
           return Toast(
-              { title: paymentConfig.PAYMENT_STATUS.SUCCESS, icon: "success" },
-              { tab: 4, url: goPages }
+            { title: paymentConfig.PAYMENT_STATUS.SUCCESS, icon: "success" },
+            { tab: 4, url: goPages }
           );
         } else if (result.status === paymentConfig.PAYMENT_STATUS.FAIL) {
           // 支付失败:提示并跳转
           return Toast(
-              { title: paymentConfig.PAYMENT_STATUS.FAIL },
-              { tab: 5, url: `${goPages}&msg=${failMsg}` }
+            { title: paymentConfig.PAYMENT_STATUS.FAIL },
+            { tab: 5, url: `${goPages}&msg=${failMsg}` }
           );
         } else if (result.status === paymentConfig.PAYMENT_STATUS.CANCEL) {
           // 支付取消:提示并跳转
           return Toast(
-              { title: paymentConfig.PAYMENT_STATUS.CANCEL },
-              {
-                tab: 5,
-                url: `${goPages}&msg=${paymentConfig.PAYMENT_STATUS.CANCEL}`,
-              }
+            { title: paymentConfig.PAYMENT_STATUS.CANCEL },
+            {
+              tab: 5,
+              url: `${goPages}&msg=${paymentConfig.PAYMENT_STATUS.CANCEL}`,
+            }
           );
         }
         break;
@@ -929,8 +937,8 @@ const getOrderPay = async (orderNo, message) => {
         // 余额支付:直接提示成功并跳转
         console.log("余额支付");
         return Toast(
-            { title: message },
-            { tab: 5, url: goPages + "&status=1" }
+          { title: message },
+          { tab: 5, url: goPages + "&status=1" }
         );
         break;
       case "weixinApp":
@@ -939,7 +947,7 @@ const getOrderPay = async (orderNo, message) => {
           orderInfo: res.data.prepayWithRequestPaymentResponse,
         });
         let wxPayFailMsg =
-            wxPayResult?.message || paymentConfig.PAYMENT_STATUS.FAIL;
+          wxPayResult?.message || paymentConfig.PAYMENT_STATUS.FAIL;
         if (wxPayResult.status === paymentConfig.PAYMENT_STATUS.SUCCESS) {
           // 查询后端支付状态接口
           let params = {
@@ -948,21 +956,21 @@ const getOrderPay = async (orderNo, message) => {
           };
           let res = await alipayPaymentResult(params);
           return Toast(
-              { title: paymentConfig.PAYMENT_STATUS.SUCCESS, icon: "success" },
-              { tab: 4, url: goPages }
+            { title: paymentConfig.PAYMENT_STATUS.SUCCESS, icon: "success" },
+            { tab: 4, url: goPages }
           );
         } else if (wxPayResult.status === paymentConfig.PAYMENT_STATUS.FAIL) {
           return Toast(
-              { title: paymentConfig.PAYMENT_STATUS.FAIL },
-              { tab: 5, url: `${goPages}&msg=${wxPayFailMsg}` }
+            { title: paymentConfig.PAYMENT_STATUS.FAIL },
+            { tab: 5, url: `${goPages}&msg=${wxPayFailMsg}` }
           );
         } else if (wxPayResult.status === paymentConfig.PAYMENT_STATUS.CANCEL) {
           return Toast(
-              { title: paymentConfig.PAYMENT_STATUS.CANCEL },
-              {
-                tab: 5,
-                url: `${goPages}&msg=${paymentConfig.PAYMENT_STATUS.CANCEL}`,
-              }
+            { title: paymentConfig.PAYMENT_STATUS.CANCEL },
+            {
+              tab: 5,
+              url: `${goPages}&msg=${paymentConfig.PAYMENT_STATUS.CANCEL}`,
+            }
           );
         }
         break;
@@ -992,7 +1000,7 @@ const getOrderPay = async (orderNo, message) => {
 function modalConfirm() {
   showModal.value = false;
   const webviewPageUrl = `/pages/webview/index?path=/pages/users/vault/rechargeRmb`;
-  
+
   uni.navigateTo({
     url: webviewPageUrl,
     fail: (err) => {
@@ -1027,8 +1035,6 @@ const SubOrder = async (e) => {
     const channels = await getAvailableChannels();
     if (payType.value === "alipay" && !channels.includes("alipay")) {
       return Toast({ title: "设备不支持支付宝支付" });
-    } else if (payType.value === "weixin" && !channels.includes("wxpay")) {
-      return Toast({ title: "设备不支持微信支付" });
     }
   } catch (error) {
     console.error("获取支付渠道失败", error);
@@ -1056,15 +1062,15 @@ const SubOrder = async (e) => {
 
   // 验证:贝币支付时余额是否充足
   if (
-      orderInfoVo.value.mallType === 1 &&
-      Number(orderInfoVo.value.proTotalFee) > orderInfoVo.value.userIntegral
+    orderInfoVo.value.mallType === 1 &&
+    Number(orderInfoVo.value.proTotalFee) > orderInfoVo.value.userIntegral
   ) {
     return Toast({ title: "贝币余额不足!" });
   }
   // 验证:余额支付时余额是否充足
   else if (
-      data.payType == "yue" &&
-      parseFloat(appStore.$userInfo.nowMoney) <
+    data.payType == "yue" &&
+    parseFloat(appStore.$userInfo.nowMoney) <
       parseFloat(orderInfoVo.value.payFee)
   ) {
     // 余额不足
@@ -1072,22 +1078,21 @@ const SubOrder = async (e) => {
     return;
   }
   uni.showModal({
-  	title: "提示",
-	content: "确认支付吗",
-	success: res=>{
-		console.log(res);
-		if(res.confirm){
-			uni.showLoading({
-			  title: "订单支付中",
-			});
-			// 发起支付
-			payment(data);
-		}else{
-			return
-		}
-	},
-  })
-  
+    title: "提示",
+    content: "确认支付吗",
+    success: (res) => {
+      console.log(res);
+      if (res.confirm) {
+        uni.showLoading({
+          title: "订单支付中",
+        });
+        // 发起支付
+        payment(data);
+      } else {
+        return;
+      }
+    },
+  });
 };
 </script>
 
@@ -1416,7 +1421,7 @@ const SubOrder = async (e) => {
     left: 0;
 
     .settlement {
-		font-weight: bold;
+      font-weight: bold;
       font-size: 30rpx;
       color: #fff;
       width: 240rpx;

Fichier diff supprimé car celui-ci est trop grand
+ 565 - 547
pages/users/user_goods_collection/index.vue


+ 1 - 1
pages/users/vault/index.vue

@@ -26,7 +26,7 @@
       <view class="asset-tips">
         <view class="zc">资产说明:</view>
         <view
-          >贵金属账户里的金料随时可以在本平台内选购商品并抵扣金重,或以实金价出售给本平台转换成现金</view
+          >贵金属账户里的金料随时可以在本平台内选购商品并抵扣金重,或以实金价出售给本平台转换成现金</view
         >
       </view>
 

+ 4 - 4
pages/users/vault/storeMetal/goldBullionStock.vue

@@ -59,12 +59,12 @@ function agreementGetoneFn() {
 
 // 黄金调整价
 const adjustGoldprice = computed(() => {
-  const res = rightsStore.userBenefits.nobleMeta?.find(
-    (gold) => gold.name == "黄金"
-  ) || 0;
+  const res =
+    rightsStore.userBenefits.nobleMeta?.find((gold) => gold.name == "黄金") ||
+    0;
   return res;
 });
-// 获取实金价
+// 获取实金价
 const viprealGoldprice = computed(
   () =>
     Number(realGoldprice.value) -

+ 2 - 2
pages/users/vault/storeMetal/metalExchange.vue

@@ -62,7 +62,7 @@
           <view class="header">
             <h3 class="title">板料克重</h3>
             <view class="live-gold">
-              实金价
+              实金价
               <text class="price">{{ realprice.toFixed(2) }}</text>
             </view>
           </view>
@@ -322,7 +322,7 @@ const viprealAgRecyclePrice = computed(() => {
 
   return res;
 });
-// 实金价
+// 实金价
 const realprice = computed(() => {
   if (tabsIndex.value == 1) {
     return vipRealGoldRecyclePrice.value;

+ 2 - 2
pages/users/vault/storeMetal/nonLogisticsGold.vue

@@ -7,7 +7,7 @@
             <view class="header">
               <h3 class="title">存金克重</h3>
               <view class="live-gold">
-                实金价
+                实金价
                 <text class="price">{{ viprealGoldprice.toFixed(2) }}</text>
               </view>
             </view>
@@ -146,7 +146,7 @@ const is_post = ref(false);
 const totalPrice = ref(0);
 const aggregate = ref(false);
 // const expressNo = ref("");
-// 获取实金价
+// 获取实金价
 const { realGoldprice } = useRealGoldPrice("RTJ_Au");
 
 const viprealGoldprice = computed(() => Number(realGoldprice.value));