瀏覽代碼

将实时金价改成实物金价

calm 7 小時之前
父節點
當前提交
8a88922753

+ 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 {
-      }
     }
   }
 }

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

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

+ 3 - 3
config/app.js

@@ -1,16 +1,16 @@
 // let domain = "https://www.shuibeibyg.com/front-api"; // 正式环境IP
-// let domain = "https://test.shuibeibyg.com/front-api"; // 测试环境IP
+let domain = "https://test.shuibeibyg.com/front-api"; // 测试环境IP
 // let domain = 'http://192.168.100.199:8081' // 晋守桦IP
 // let domain = 'http://192.168.100.246:8081' // 韩朝龙IP
 // let domain = "http://192.168.8.29:8081"; // 宏广IP
-let domain = "http://192.168.8.57:8081"; // 张艺IP
+// let domain = "http://192.168.8.57: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 = "http://192.168.3.16:5173"; // 本地测试
+export const H5_BASE_URL = "http://192.168.8.16:5173"; // 本地测试
 // export const H5_BASE_URL = "http://192.168.100.35:5175"; // 本地测试
 // export const H5_BASE_URL = "https://test.shuibeibyg.com/web-h5/"; // 测试环境H5地址
 // export const H5_BASE_URL = "https://www.shuibeibyg.com/web-h5/"; // 正式环境H5地址

+ 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;
         }

+ 3 - 3
pages/index/index.vue

@@ -70,7 +70,7 @@
           </up-swiper>
         </view>
       </view>
-      <!-- 实金价 -->
+      <!-- 实金价 -->
       <view class="top-bg-box">
         <view class="card">
           <view class="cardbgLinear">
@@ -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;

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

@@ -225,7 +225,7 @@
                 <view class="name acea-row row-center-wrapper">
                   <image
                     class="pay-icon"
-                    v-if="item.payType == 'weixin'"
+                    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_20260302114032_816_219.png"
                   ></image>
                   <image
                     class="pay-icon"

File diff suppressed because it is too large
+ 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));