Преглед на файлове

客服修改详情页面嵌入

zhangyaowen преди 4 месеца
родител
ревизия
393af1e314

+ 10 - 11
pages/customerService/index.vue

@@ -6,22 +6,13 @@
       <view class="qrcode-container">
         <view class="qrcode-item">
           <view class="qrcode-wrapper">
-            <image class="qrcode" src="/static/images/qrcode1.jpg" mode="aspectFit"></image>
+            <image class="qrcode" :src="query.url" mode="aspectFit"></image>
           </view>
           <view class="desc">
-            <text class="name">客服小美</text>
+            <!-- <text class="name">客服小美</text> -->
             <text class="tag">主营业务咨询</text>
           </view>
         </view>
-        <view class="qrcode-item">
-          <view class="qrcode-wrapper">
-            <image class="qrcode" src="/static/images/qrcode2.jpg" mode="aspectFit"></image>
-          </view>
-          <view class="desc">
-            <text class="name">客服小丽</text>
-            <text class="tag">售后服务专员</text>
-          </view>
-        </view>
       </view>
       <view class="tips">
         <text class="tips-icon">💡</text>
@@ -33,6 +24,14 @@
 </template>
 
 <script setup>
+import { onLoad, onPageScroll } from '@dcloudio/uni-app';
+import { ref } from "vue"
+const query = ref(null)
+onLoad((options) => {
+  // 页面加载时执行的操作
+  console.log('Page loaded:', JSON.parse(options.data));
+  query.value = JSON.parse(options.data)
+})
 </script>
 
 <style lang="scss" scoped>

+ 44 - 29
pages/goods/components/detail/detail-content-card.vue

@@ -6,47 +6,62 @@
       <view class="title ss-m-l-20 ss-m-r-20">详情</view>
     </view>
     <view class="card-content">
-      <mp-html :content="content" />
+      <template v-if="goodsInfo.userHtml">
+        <!-- #ifdef H5 -->
+        <iframe :src="goodsInfo.userHtml" style="width: 100%; height: calc(100vh - 94px); border: none;"></iframe>
+        <!-- #endif -->
+
+        <!-- #ifdef MP-WEIXIN -->
+        <web-view :src="goodsInfo.userHtml" style="width: 100%; height: 100%;"></web-view>
+        <!-- #endif -->
+      </template>
+      <template v-else>
+        <mp-html :cotent="content" />
+      </template>
     </view>
   </view>
 </template>
 
 <script setup>
-  import sheep from '@/sheep';
-  const { safeAreaInsets } = sheep.$platform.device;
+import sheep from '@/sheep';
+const { safeAreaInsets } = sheep.$platform.device;
 
-  const props = defineProps({
-    content: {
-      type: String,
-      default: '',
-    },
-  });
+const props = defineProps({
+  content: {
+    type: String,
+    default: '',
+  },
+  goodsInfo: {
+    type: Object,
+    default: {},
+  },
+});
 </script>
 
 <style lang="scss" scoped>
-  .detail-content-card {
-    .card-header {
-      .line {
-        width: 6rpx;
-        height: 30rpx;
-        background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%);
-        border-radius: 3rpx;
-      }
+.detail-content-card {
+  .card-header {
+    .line {
+      width: 6rpx;
+      height: 30rpx;
+      background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%);
+      border-radius: 3rpx;
+    }
 
-      .title {
-        font-size: 30rpx;
-        font-weight: bold;
-      }
+    .title {
+      font-size: 30rpx;
+      font-weight: bold;
+    }
 
-      .des {
-        font-size: 24rpx;
-        color: $dark-9;
-      }
+    .des {
+      font-size: 24rpx;
+      color: $dark-9;
+    }
 
-      .more-btn {
-        font-size: 24rpx;
-        color: var(--ui-BG-Main);
-      }
+    .more-btn {
+      font-size: 24rpx;
+      color: var(--ui-BG-Main);
     }
   }
+}
 </style>

+ 199 - 192
pages/goods/components/detail/detail-navbar.vue

@@ -2,10 +2,8 @@
 <template>
   <su-fixed alway :bgStyles="{ background: '#fff' }" :val="0" noNav opacity :placeholder="false">
     <su-status-bar />
-    <view
-      class="ui-bar ss-flex ss-col-center ss-row-between ss-p-x-20"
-      :style="[{ height: sys_navBar - sys_statusBar + 'px' }]"
-    >
+    <view class="ui-bar ss-flex ss-col-center ss-row-between ss-p-x-20"
+      :style="[{ height: sys_navBar - sys_statusBar + 'px' }]">
       <!-- 左 -->
       <view class="icon-box ss-flex">
         <view class="icon-button icon-button-left ss-flex ss-row-center" @tap="onClickLeft">
@@ -20,12 +18,8 @@
       <!-- 中 -->
       <view class="detail-tab-card ss-flex-1" :style="[{ opacity: state.tabOpacityVal }]">
         <view class="tab-box ss-flex ss-col-center ss-row-around">
-          <view
-            class="tab-item ss-flex-1 ss-flex ss-row-center ss-col-center"
-            v-for="item in state.tabList"
-            :key="item.value"
-            @tap="onTab(item)"
-          >
+          <view class="tab-item ss-flex-1 ss-flex ss-row-center ss-col-center" v-for="item in state.tabList"
+            :key="item.value" @tap="onTab(item)">
             <view class="tab-title" :class="state.curTab === item.value ? 'cur-tab-title' : ''">
               {{ item.label }}
             </view>
@@ -41,216 +35,229 @@
 </template>
 
 <script setup>
-  import { reactive } from 'vue';
-  import { onPageScroll } from '@dcloudio/uni-app';
-  import sheep from '@/sheep';
-  import throttle from '@/sheep/helper/throttle.js';
-  import { showMenuTools, closeMenuTools } from '@/sheep/hooks/useModal';
+import { reactive } from 'vue';
+import { onPageScroll } from '@dcloudio/uni-app';
+import sheep from '@/sheep';
+import throttle from '@/sheep/helper/throttle.js';
+import { showMenuTools, closeMenuTools } from '@/sheep/hooks/useModal';
 
-  const sys_statusBar = sheep.$platform.device.statusBarHeight;
-  const sys_navBar = sheep.$platform.navbar;
-  const capsuleStyle = {
-    width: sheep.$platform.capsule.width + 'px',
-    height: sheep.$platform.capsule.height + 'px',
-  };
+const sys_statusBar = sheep.$platform.device.statusBarHeight;
+const sys_navBar = sheep.$platform.navbar;
+const capsuleStyle = {
+  width: sheep.$platform.capsule.width + 'px',
+  height: sheep.$platform.capsule.height + 'px',
+};
 
-  const state = reactive({
-    tabOpacityVal: 0,
-    curTab: 'goods',
-    tabList: [
-      {
-        label: '产品',
-        value: 'goods',
-        to: 'detail-swiper-selector',
-      },
-      {
-        label: '评价',
-        value: 'comment',
-        to: 'detail-comment-selector',
-      },
-      {
-        label: '详情',
-        value: 'detail',
-        to: 'detail-content-selector',
-      },
-    ],
+const state = reactive({
+  tabOpacityVal: 0,
+  curTab: 'goods',
+  tabList: [
+    {
+      label: '产品',
+      value: 'goods',
+      to: 'detail-swiper-selector',
+    },
+    // {
+    //   label: '评价',
+    //   value: 'comment',
+    //   to: 'detail-comment-selector',
+    // },
+    {
+      label: '详情',
+      value: 'detail',
+      to: 'detail-content-selector',
+    },
+  ],
+});
+const emits = defineEmits(['clickLeft']);
+const hasHistory = sheep.$router.hasHistory();
+
+function onClickLeft() {
+  if (hasHistory) {
+    sheep.$router.back();
+  } else {
+    sheep.$router.go('/pages/index/index');
+  }
+  emits('clickLeft');
+}
+
+function onClickRight() {
+  showMenuTools();
+}
+
+let commentCard = {
+  top: 0,
+  bottom: 0,
+};
+
+function getCommentCardNode() {
+  return new Promise((res, rej) => {
+    uni.createSelectorQuery()
+      .select('.detail-comment-selector')
+      .boundingClientRect((data) => {
+        if (data) {
+          commentCard.top = data.top;
+          commentCard.bottom = data.top + data.height;
+          res(data);
+        } else {
+          res(null);
+        }
+      })
+      .exec();
   });
-  const emits = defineEmits(['clickLeft']);
-  const hasHistory = sheep.$router.hasHistory();
+}
 
-  function onClickLeft() {
-    if (hasHistory) {
-      sheep.$router.back();
-    } else {
-      sheep.$router.go('/pages/index/index');
-    }
-    emits('clickLeft');
+function onTab(tab) {
+  let scrollTop = 0;
+  if (tab.value === 'comment') {
+    scrollTop = commentCard.top - sys_navBar + 1;
+  } else if (tab.value === 'detail') {
+    scrollTop = commentCard.bottom - sys_navBar + 1;
   }
+  uni.pageScrollTo({
+    scrollTop,
+    duration: 200,
+  });
+}
 
-  function onClickRight() {
-    showMenuTools();
+onPageScroll((e) => {
+  state.tabOpacityVal = e.scrollTop > sheep.$platform.navbar ? 1 : e.scrollTop * 0.01;
+  if (commentCard.top === 0) {
+    throttle(() => {
+      getCommentCardNode();
+    }, 50);
   }
 
-  let commentCard = {
-    top: 0,
-    bottom: 0,
-  };
+  if (e.scrollTop < commentCard.top - sys_navBar) {
+    state.curTab = 'goods';
+  } else if (
+    e.scrollTop >= commentCard.top - sys_navBar &&
+    e.scrollTop <= commentCard.bottom - sys_navBar
+  ) {
+    state.curTab = 'comment';
+  } else {
+    state.curTab = 'detail';
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+.icon-box {
+  box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
+  border-radius: 30rpx;
+  width: 134rpx;
+  height: 56rpx;
+  margin-left: 8rpx;
+  border: 1px solid rgba(#fff, 0.4);
 
-  function getCommentCardNode() {
-    return new Promise((res, rej) => {
-      uni.createSelectorQuery()
-        .select('.detail-comment-selector')
-        .boundingClientRect((data) => {
-          if (data) {
-            commentCard.top = data.top;
-            commentCard.bottom = data.top + data.height;
-            res(data);
-          } else {
-            res(null);
-          }
-        })
-        .exec();
-    });
+  .line {
+    width: 2rpx;
+    height: 24rpx;
+    background: #e5e5e7;
   }
 
-  function onTab(tab) {
-    let scrollTop = 0;
-    if (tab.value === 'comment') {
-      scrollTop = commentCard.top - sys_navBar + 1;
-    } else if (tab.value === 'detail') {
-      scrollTop = commentCard.bottom - sys_navBar + 1;
-    }
-    uni.pageScrollTo({
-      scrollTop,
-      duration: 200,
-    });
+  .sicon-back {
+    font-size: 32rpx;
+    color: #000;
   }
 
-  onPageScroll((e) => {
-    state.tabOpacityVal = e.scrollTop > sheep.$platform.navbar ? 1 : e.scrollTop * 0.01;
-    if (commentCard.top === 0) {
-      throttle(() => {
-        getCommentCardNode();
-      }, 50);
-    }
+  .sicon-home {
+    font-size: 32rpx;
+    color: #000;
+  }
 
-    if (e.scrollTop < commentCard.top - sys_navBar) {
-      state.curTab = 'goods';
-    } else if (
-      e.scrollTop >= commentCard.top - sys_navBar &&
-      e.scrollTop <= commentCard.bottom - sys_navBar
-    ) {
-      state.curTab = 'comment';
-    } else {
-      state.curTab = 'detail';
-    }
-  });
-</script>
+  .sicon-more {
+    font-size: 32rpx;
+    color: #000;
+  }
 
-<style lang="scss" scoped>
-  .icon-box {
-    box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
-    border-radius: 30rpx;
-    width: 134rpx;
+  .icon-button {
+    width: 67rpx;
     height: 56rpx;
-    margin-left: 8rpx;
-    border: 1px solid rgba(#fff, 0.4);
-    .line {
-      width: 2rpx;
-      height: 24rpx;
-      background: #e5e5e7;
-    }
-    .sicon-back {
-      font-size: 32rpx;
-      color: #000;
-    }
-    .sicon-home {
-      font-size: 32rpx;
-      color: #000;
-    }
-    .sicon-more {
-      font-size: 32rpx;
-      color: #000;
+
+    &-left:hover {
+      background: rgba(0, 0, 0, 0.16);
+      border-radius: 30rpx 0px 0px 30rpx;
     }
-    .icon-button {
-      width: 67rpx;
-      height: 56rpx;
-      &-left:hover {
-        background: rgba(0, 0, 0, 0.16);
-        border-radius: 30rpx 0px 0px 30rpx;
-      }
-      &-right:hover {
-        background: rgba(0, 0, 0, 0.16);
-        border-radius: 0px 30rpx 30rpx 0px;
-      }
+
+    &-right:hover {
+      background: rgba(0, 0, 0, 0.16);
+      border-radius: 0px 30rpx 30rpx 0px;
     }
   }
-  .left-box {
-    position: relative;
+}
+
+.left-box {
+  position: relative;
+  width: 60rpx;
+  height: 60rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .circle {
+    position: absolute;
+    left: 0;
+    top: 0;
     width: 60rpx;
     height: 60rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .circle {
-      position: absolute;
-      left: 0;
-      top: 0;
-      width: 60rpx;
-      height: 60rpx;
-      background: rgba(#fff, 0.6);
-      border: 1rpx solid #ebebeb;
-      border-radius: 50%;
-      box-sizing: border-box;
-      z-index: -1;
-    }
+    background: rgba(#fff, 0.6);
+    border: 1rpx solid #ebebeb;
+    border-radius: 50%;
+    box-sizing: border-box;
+    z-index: -1;
   }
-  .right {
-    position: relative;
+}
+
+.right {
+  position: relative;
+  width: 60rpx;
+  height: 60rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+
+  .circle {
+    position: absolute;
+    left: 0;
+    top: 0;
     width: 60rpx;
     height: 60rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .circle {
-      position: absolute;
-      left: 0;
-      top: 0;
-      width: 60rpx;
-      height: 60rpx;
-      background: rgba(#ffffff, 0.6);
-      border: 1rpx solid #ebebeb;
-      box-sizing: border-box;
-      border-radius: 50%;
-      z-index: -1;
-    }
+    background: rgba(#ffffff, 0.6);
+    border: 1rpx solid #ebebeb;
+    box-sizing: border-box;
+    border-radius: 50%;
+    z-index: -1;
   }
-  .detail-tab-card {
-    width: 50%;
-    .tab-item {
-      height: 80rpx;
-      position: relative;
-      z-index: 11;
+}
+
+.detail-tab-card {
+  width: 50%;
+
+  .tab-item {
+    height: 80rpx;
+    position: relative;
+    z-index: 11;
 
-      .tab-title {
-        font-size: 30rpx;
-      }
+    .tab-title {
+      font-size: 30rpx;
+    }
 
-      .cur-tab-title {
-        font-weight: $font-weight-bold;
-      }
+    .cur-tab-title {
+      font-weight: $font-weight-bold;
+    }
 
-      .tab-line {
-        width: 60rpx;
-        height: 6rpx;
-        border-radius: 6rpx;
-        position: absolute;
-        left: 50%;
-        transform: translateX(-50%);
-        bottom: 10rpx;
-        background-color: var(--ui-BG-Main);
-        z-index: 12;
-      }
+    .tab-line {
+      width: 60rpx;
+      height: 6rpx;
+      border-radius: 6rpx;
+      position: absolute;
+      left: 50%;
+      transform: translateX(-50%);
+      bottom: 10rpx;
+      background-color: var(--ui-BG-Main);
+      z-index: 12;
     }
   }
+}
 </style>

+ 106 - 121
pages/goods/components/detail/detail-tabbar.vue

@@ -3,29 +3,20 @@
   <su-fixed bottom placeholder bg="bg-white">
     <view class="ui-tabbar-box">
       <view class="ui-tabbar ss-flex ss-col-center ss-row-between">
-        <view
-          v-if="collectIcon"
-          class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
-          @tap="onFavorite"
-        >
+        <view v-if="collectIcon" class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
+          @tap="onFavorite">
           <block v-if="modelValue.favorite">
-            <image
-              class="item-icon"
-              :src="sheep.$url.static('/static/img/shop/goods/collect_1.gif')"
-              mode="aspectFit"
-            />
+            <image class="item-icon" :src="sheep.$url.static('/static/img/shop/goods/collect_1.gif')"
+              mode="aspectFit" />
             <view class="item-title">已收藏</view>
           </block>
           <block v-else>
-            <image
-              class="item-icon"
-              :src="sheep.$url.static('/static/img/shop/goods/collect_0.png')"
-              mode="aspectFit"
-            />
+            <image class="item-icon" :src="sheep.$url.static('/static/img/shop/goods/collect_0.png')"
+              mode="aspectFit" />
             <view class="item-title">收藏</view>
           </block>
         </view>
-        <view
+        <!-- <view
           v-if="serviceIcon"
           class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
           @tap="onChat"
@@ -36,17 +27,10 @@
             mode="aspectFit"
           />
           <view class="item-title">客服</view>
-        </view>
-        <view
-          v-if="shareIcon"
-          class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
-          @tap="showShareModal"
-        >
-          <image
-            class="item-icon"
-            :src="sheep.$url.static('/static/img/shop/goods/share.png')"
-            mode="aspectFit"
-          />
+        </view> -->
+        <view v-if="shareIcon" class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
+          @tap="showShareModal">
+          <image class="item-icon" :src="sheep.$url.static('/static/img/shop/goods/share.png')" mode="aspectFit" />
           <view class="item-title">分享</view>
         </view>
         <slot></slot>
@@ -56,114 +40,115 @@
 </template>
 
 <script setup>
-  /**
-   *
-   * 底部导航
-   *
-   * @property {String} bg 			 			- 背景颜色Class
-   * @property {String} ui 			 			- 自定义样式Class
-   * @property {Boolean} noFixed 		 			- 是否定位
-   * @property {Boolean} topRadius 		 		- 上圆角
-   */
-  import { reactive } from 'vue';
-  import sheep from '@/sheep';
-  import { showShareModal } from '@/sheep/hooks/useModal';
-  import FavoriteApi from '@/sheep/api/product/favorite';
+/**
+ *
+ * 底部导航
+ *
+ * @property {String} bg 			 			- 背景颜色Class
+ * @property {String} ui 			 			- 自定义样式Class
+ * @property {Boolean} noFixed 		 			- 是否定位
+ * @property {Boolean} topRadius 		 		- 上圆角
+ */
+import { reactive } from 'vue';
+import sheep from '@/sheep';
+import { showShareModal } from '@/sheep/hooks/useModal';
+import FavoriteApi from '@/sheep/api/product/favorite';
 
-  // 数据
-  const state = reactive({});
+// 数据
+const state = reactive({});
 
-  // 接收参数
-  const props = defineProps({
-    modelValue: {
-      type: Object,
-      default() {},
-    },
-    bg: {
-      type: String,
-      default: 'bg-white',
-    },
-    bgStyles: {
-      type: Object,
-      default() {},
-    },
-    ui: {
-      type: String,
-      default: '',
-    },
+// 接收参数
+const props = defineProps({
+  modelValue: {
+    type: Object,
+    default() { },
+  },
+  bg: {
+    type: String,
+    default: 'bg-white',
+  },
+  bgStyles: {
+    type: Object,
+    default() { },
+  },
+  ui: {
+    type: String,
+    default: '',
+  },
 
-    noFixed: {
-      type: Boolean,
-      default: false,
-    },
-    topRadius: {
-      type: Number,
-      default: 0,
-    },
-    collectIcon: {
-      type: Boolean,
-      default: true,
-    },
-    serviceIcon: {
-      type: Boolean,
-      default: true,
-    },
-    shareIcon: {
-      type: Boolean,
-      default: true,
-    },
-  });
+  noFixed: {
+    type: Boolean,
+    default: false,
+  },
+  topRadius: {
+    type: Number,
+    default: 0,
+  },
+  collectIcon: {
+    type: Boolean,
+    default: true,
+  },
+  serviceIcon: {
+    type: Boolean,
+    default: true,
+  },
+  shareIcon: {
+    type: Boolean,
+    default: true,
+  },
+});
 
-  async function onFavorite() {
-    // 情况一:取消收藏
-    if (props.modelValue.favorite) {
-      const { code } = await FavoriteApi.deleteFavorite(props.modelValue.id);
-      if (code !== 0) {
-        return
-      }
-      sheep.$helper.toast('取消收藏');
-      props.modelValue.favorite = false;
+async function onFavorite() {
+  // 情况一:取消收藏
+  if (props.modelValue.favorite) {
+    const { code } = await FavoriteApi.deleteFavorite(props.modelValue.id);
+    if (code !== 0) {
+      return
+    }
+    sheep.$helper.toast('取消收藏');
+    props.modelValue.favorite = false;
     // 情况二:添加收藏
-    } else {
-      const { code } = await FavoriteApi.createFavorite(props.modelValue.id);
-      if (code !== 0) {
-        return
-      }
-      sheep.$helper.toast('收藏成功');
-      props.modelValue.favorite = true;
+  } else {
+    const { code } = await FavoriteApi.createFavorite(props.modelValue.id);
+    if (code !== 0) {
+      return
     }
+    sheep.$helper.toast('收藏成功');
+    props.modelValue.favorite = true;
   }
+}
 
-  const onChat = () => {
-    sheep.$router.go('/pages/chat/index', {
-      id: props.modelValue.id,
-    });
-  };
+const onChat = () => {
+  sheep.$router.go('/pages/chat/index', {
+    id: props.modelValue.id,
+  });
+};
 </script>
 
 <style lang="scss" scoped>
-  .ui-tabbar-box {
-    box-shadow: 0px -6px 10px 0px rgba(51, 51, 51, 0.2);
-  }
-  .ui-tabbar {
-    display: flex;
-    height: 50px;
-    background: #fff;
+.ui-tabbar-box {
+  box-shadow: 0px -6px 10px 0px rgba(51, 51, 51, 0.2);
+}
+
+.ui-tabbar {
+  display: flex;
+  height: 50px;
+  background: #fff;
 
-    .detail-tabbar-item {
-      width: 100rpx;
+  .detail-tabbar-item {
+    width: 100rpx;
 
-      .item-icon {
-        width: 40rpx;
-        height: 40rpx;
-      }
+    .item-icon {
+      width: 40rpx;
+      height: 40rpx;
+    }
 
-      .item-title {
-        font-size: 20rpx;
-        font-weight: 500;
-        line-height: 20rpx;
-        margin-top: 12rpx;
-      }
+    .item-title {
+      font-size: 20rpx;
+      font-weight: 500;
+      line-height: 20rpx;
+      margin-top: 12rpx;
     }
   }
+}
 </style>

+ 44 - 21
pages/goods/index.vue

@@ -53,7 +53,7 @@
           <!-- 价格+标题 -->
           <view class="title-card detail-card ss-p-y-30 ss-p-x-20">
             <!-- 没有限时折扣/会员价的优惠信息时,展示的价格信息 -->
-            <view class="ss-flex ss-row-between ss-col-center ss-m-b-26" v-if="!state.settlementSku.promotionPrice">
+            <!-- <view class="ss-flex ss-row-between ss-col-center ss-m-b-26" v-if="!state.settlementSku.promotionPrice">
               <view class="price-box ss-flex ss-col-bottom">
                 <view class="price-text ss-m-r-16">
                   {{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }}
@@ -65,21 +65,20 @@
               <view class="sales-text">
                 {{ formatSales('exact', state.goodsInfo.salesCount) }}
               </view>
-            </view>
+            </view> -->
             <view class="discounts-box ss-flex ss-row-between ss-m-b-28">
               <!-- 查看优惠劵的描述 -->
-              <view class="tag ss-m-r-10" v-for="coupon in state.couponInfo.slice(0, 1)" :key="coupon.id"
+              <!-- <view class="tag ss-m-r-10" v-for="coupon in state.couponInfo.slice(0, 1)" :key="coupon.id"
                 @tap="onOpenActivity">
                 [劵]满{{ fen2yuanSimple(coupon.usePrice) }}元{{
                   coupon.discountType === 1
                     ? '减' + fen2yuanSimple(coupon.discountPrice) + '元'
                     : '打' + formatDiscountPercent(coupon.discountPercent) + '折'
                 }}
-              </view>
+              </view> -->
               <!-- 查看满减送的描述 -->
-              <div class="tag-content">
+              <!--<div class="tag-content">
                 <view class="tag-box ss-flex">
-                  <!-- 最多打印 3 条,所以需要扣除优惠劵已打印的 -->
                   <view v-for="item in getRewardActivityRuleItemDescriptions(
                     state.rewardActivity,
                   ).slice(0, 3 - state.couponInfo.slice(0, 1).length)" :key="item" class="tag ss-m-r-10"
@@ -87,23 +86,23 @@
                     <text>{{ item }}</text>
                   </view>
                 </view>
-              </div>
+              </div>-->
               <!-- 领取优惠劵的按钮 -->
-              <view class="get-coupon-box ss-flex ss-col-center ss-m-l-20" @tap="onOpenActivity"
+              <!-- <view class="get-coupon-box ss-flex ss-col-center ss-m-l-20" @tap="onOpenActivity"
                 v-if="state.couponInfo.length">
                 <view class="discounts-title ss-m-r-8">领券</view>
                 <text class="cicon-forward"></text>
-              </view>
+              </view> -->
             </view>
             <view class="title-text ss-line-2 ss-m-b-6">{{ state.goodsInfo.name }}</view>
             <view class="subtitle-text ss-line-1">{{ state.goodsInfo.introduction }}</view>
           </view>
 
           <!-- 功能卡片 -->
-          <view class="detail-cell-card detail-card ss-flex-col">
+          <!--<view class="detail-cell-card detail-card ss-flex-col">
             <detail-cell-sku v-model="state.selectedSku.goods_sku_text" :sku="state.selectedSku"
               @tap="state.showSelectSku = true" />
-          </view>
+          </view>-->
 
           <!-- 规格与数量弹框 -->
           <s-select-sku :goodsInfo="state.goodsInfo" :show="state.showSelectSku" @addCart="onAddCart" @buy="onBuy"
@@ -111,21 +110,23 @@
         </view>
 
         <!-- 评价 -->
-        <detail-comment-card class="detail-comment-selector" :goodsId="state.goodsId" />
+        <!--<detail-comment-card class="detail-comment-selector" :goodsId="state.goodsId" />-->
         <!-- 详情 -->
-        <detail-content-card class="detail-content-selector" :content="state.goodsInfo.description" />
+        <detail-content-card class="detail-content-selector" :goodsInfo="state.goodsInfo"
+          :content="state.goodsInfo.description" />
 
         <!-- 活动跳转:拼团/秒杀/砍价活动 -->
-        <detail-activity-tip v-if="state.activityList.length > 0" :activity-list="state.activityList" />
+        <!--<detail-activity-tip v-if="state.activityList.length > 0" :activity-list="state.activityList" />-->
 
         <!-- 详情 tabbar -->
         <detail-tabbar v-model="state.goodsInfo">
           <view class="buy-box ss-flex ss-col-center ss-p-r-20" v-if="state.goodsInfo.stock > 0">
-            <button class="ss-reset-button add-btn ui-Shadow-Main" @tap="state.showSelectSku = true">
-              加入购物车
+            <button class="ss-reset-button add-btn ui-Shadow-Main" @tap="phoneClick">
+              打电话
             </button>
-            <button class="ss-reset-button buy-btn ui-Shadow-Main" @tap="state.showSelectSku = true">
-              立即购买
+            <!-- state.showSelectSku = true -->
+            <button class="ss-reset-button buy-btn ui-Shadow-Main" @tap="customerService">
+              联系客服
             </button>
           </view>
           <view class="buy-box ss-flex ss-col-center ss-p-r-20" v-else>
@@ -173,6 +174,7 @@ import OrderApi from '@/sheep/api/trade/order';
 import activity from '@/sheep/api/promotion/activity';
 import { SharePageEnum } from '@/sheep/util/const';
 
+
 const bgColor = {
   bgColor: '#E93323',
   Color: '#fff',
@@ -194,7 +196,28 @@ const state = reactive({
   rewardActivity: {}, // 【满减送】活动
   activityList: [], // 【秒杀/拼团/砍价】可参与的 Activity 营销活动的列表
 });
-
+// 打电话
+const phoneClick = () => {
+  if (uni.getSystemInfoSync().platform === 'h5') {
+    window.location.href = `tel:${state.goodsInfo.phoneNumber}`; // 替换为实际电话号码
+  } else {
+    uni.makePhoneCall({
+      phoneNumber: state.goodsInfo.phoneNumber // 替换为实际电话号码
+    });
+  }
+}
+// 客服
+const customerService = () => {
+  if (state.goodsInfo.proType == 0) {
+    sheep.$router.go('/pages/chat/index')
+  } else {
+    sheep.$router.go('/pages/customerService/index', {
+      data: JSON.stringify({
+        url: state.goodsInfo.qrCodePath,
+      })
+    })
+  }
+}
 // 规格变更
 function onSkuChange(e) {
   state.selectedSku = e;
@@ -459,7 +482,7 @@ onLoad((options) => {
 // 购买
 .buy-box {
   .add-btn {
-    width: 214rpx;
+    width: 254rpx;
     height: 72rpx;
     font-weight: 500;
     font-size: 28rpx;
@@ -469,7 +492,7 @@ onLoad((options) => {
   }
 
   .buy-btn {
-    width: 214rpx;
+    width: 254rpx;
     height: 72rpx;
     font-weight: 500;
     font-size: 28rpx;

+ 0 - 1
pages/index/user.vue

@@ -17,7 +17,6 @@ import sheep from '@/sheep';
 uni.hideTabBar();
 
 const template = computed(() => sheep.$store('app').template.user);
-console.log(template, 555222333)
 const isLogin = computed(() => sheep.$store('user').isLogin);
 
 onShow(() => {

+ 205 - 234
pages/order/aftersale/apply.vue

@@ -3,13 +3,8 @@
   <s-layout title="申请售后">
     <!-- 售后产品 -->
     <view class="goods-box">
-      <s-goods-item
-        :img="state.item.picUrl"
-        :num="state.item.count"
-        :price="state.item.price"
-        :skuText="state.item.properties?.map((property) => property.valueName).join(' ')"
-        :title="state.item.spuName"
-      />
+      <s-goods-item :img="state.item.picUrl" :num="state.item.count" :price="state.item.price"
+        :skuText="state.item.properties?.map((property) => property.valueName).join(' ')" :title="state.item.spuName" />
     </view>
 
     <uni-forms ref="form" v-model="formData" :rules="rules" label-position="top">
@@ -18,17 +13,9 @@
         <view class="item-title ss-m-b-20">售后类型</view>
         <view class="ss-flex-col">
           <radio-group @change="onRefundChange">
-            <label
-              v-for="(item, index) in state.wayList"
-              :key="index"
-              class="ss-flex ss-col-center ss-p-y-10"
-            >
-              <radio
-                :checked="formData.type === item.value"
-                :value="item.value"
-                color="var(--ui-BG-Main)"
-                style="transform: scale(0.8)"
-              />
+            <label v-for="(item, index) in state.wayList" :key="index" class="ss-flex ss-col-center ss-p-y-10">
+              <radio :checked="formData.type === item.value" :value="item.value" color="var(--ui-BG-Main)"
+                style="transform: scale(0.8)" />
               <view class="item-value ss-m-l-8">{{ item.text }}</view>
             </label>
           </radio-group>
@@ -55,24 +42,12 @@
       <view class="refund-item">
         <view class="item-title ss-m-b-20">相关描述</view>
         <view class="describe-box">
-          <uni-easyinput
-            v-model="formData.applyDescription"
-            :inputBorder="false"
-            autoHeight
-            class="describe-content"
-            maxlength="120"
-            placeholder="客官~请描述您遇到的问题,建议上传照片"
-            type="textarea"
-          />
+          <uni-easyinput v-model="formData.applyDescription" :inputBorder="false" autoHeight class="describe-content"
+            maxlength="120" placeholder="客官~请描述您遇到的问题,建议上传照片" type="textarea" />
           <!-- TODO 芋艿:上传的测试 -->
           <view class="upload-img">
-            <s-uploader
-              v-model:url="formData.applyPicUrls"
-              :imageStyles="{ width: '168rpx', height: '168rpx' }"
-              fileMediatype="image"
-              limit="9"
-              mode="grid"
-            />
+            <s-uploader v-model:url="formData.applyPicUrls" :imageStyles="{ width: '168rpx', height: '168rpx' }"
+              fileMediatype="image" limit="9" mode="grid" />
           </view>
         </view>
       </view>
@@ -100,11 +75,7 @@
           <radio-group @change="onChange">
             <label v-for="item in state.reasonList" :key="item" class="radio ss-flex ss-col-center">
               <view class="ss-flex-1 ss-p-20">{{ item }}</view>
-              <radio
-                :checked="item === state.currentValue"
-                :value="item"
-                color="var(--ui-BG-Main)"
-              />
+              <radio :checked="item === state.currentValue" :value="item" color="var(--ui-BG-Main)" />
             </label>
           </radio-group>
         </view>
@@ -119,232 +90,232 @@
 </template>
 
 <script setup>
-  import sheep from '@/sheep';
-  import { onLoad } from '@dcloudio/uni-app';
-  import { reactive, ref } from 'vue';
-  import OrderApi from '@/sheep/api/trade/order';
-  import TradeConfigApi from '@/sheep/api/trade/config';
-  import { fen2yuan } from '@/sheep/hooks/useGoods';
-  import AfterSaleApi from '@/sheep/api/trade/afterSale';
-
-  const form = ref(null);
-  const state = reactive({
-    orderId: 0, // 订单编号
-    itemId: 0, // 订单项编号
-    order: {}, // 订单
-    item: {}, // 订单项
-    config: {}, // 交易配置
-
-    // 售后类型
-    wayList: [
-      {
-        text: '仅退款',
-        value: '10',
-      },
-      {
-        text: '退款退货',
-        value: '20',
-      },
-    ],
-    reasonList: [], // 可选的申请原因数组
-    showModal: false, // 是否显示申请原因弹窗
-    currentValue: '', // 当前选择的售后原因
-  });
-  let formData = reactive({
-    way: '',
-    applyReason: '',
-    applyDescription: '',
-    applyPicUrls: [],
-  });
-  const rules = reactive({});
-
-  // 提交表单
-  async function submit() {
-    let data = {
-      orderItemId: state.itemId,
-      refundPrice: state.item.payPrice,
-      ...formData,
-    };
-    const { code } = await AfterSaleApi.createAfterSale(data);
-    if (code === 0) {
-      uni.showToast({
-        title: '申请成功',
-      });
-      sheep.$router.redirect('/pages/order/aftersale/list');
-    }
+import sheep from '@/sheep';
+import { onLoad } from '@dcloudio/uni-app';
+import { reactive, ref } from 'vue';
+import OrderApi from '@/sheep/api/trade/order';
+import TradeConfigApi from '@/sheep/api/trade/config';
+import { fen2yuan } from '@/sheep/hooks/useGoods';
+import AfterSaleApi from '@/sheep/api/trade/afterSale';
+
+const form = ref(null);
+const state = reactive({
+  orderId: 0, // 订单编号
+  itemId: 0, // 订单项编号
+  order: {}, // 订单
+  item: {}, // 订单项
+  config: {}, // 交易配置
+
+  // 售后类型
+  wayList: [
+    {
+      text: '仅退款',
+      value: '10',
+    },
+    {
+      text: '退款退货',
+      value: '20',
+    },
+  ],
+  reasonList: [], // 可选的申请原因数组
+  showModal: false, // 是否显示申请原因弹窗
+  currentValue: '', // 当前选择的售后原因
+});
+let formData = reactive({
+  way: '',
+  applyReason: '',
+  applyDescription: '',
+  applyPicUrls: [],
+});
+const rules = reactive({});
+
+// 提交表单
+async function submit() {
+  let data = {
+    orderItemId: state.itemId,
+    refundPrice: state.item.payPrice,
+    ...formData,
+  };
+  const { code } = await AfterSaleApi.createAfterSale(data);
+  if (code === 0) {
+    uni.showToast({
+      title: '申请成功',
+    });
+    sheep.$router.redirect('/pages/order/aftersale/list');
   }
-
-  // 选择售后类型
-  function onRefundChange(e) {
-    formData.way = e.detail.value;
-    // 清理理由
-    state.reasonList =
-      formData.way === '10'
-        ? state.config.afterSaleRefundReasons || []
-        : state.config.afterSaleReturnReasons || [];
-    formData.applyReason = '';
-    state.currentValue = '';
+}
+
+// 选择售后类型
+function onRefundChange(e) {
+  formData.way = e.detail.value;
+  // 清理理由
+  state.reasonList =
+    formData.way === '10'
+      ? state.config.afterSaleRefundReasons || []
+      : state.config.afterSaleReturnReasons || [];
+  formData.applyReason = '';
+  state.currentValue = '';
+}
+
+// 选择申请原因
+function onChange(e) {
+  state.currentValue = e.detail.value;
+}
+
+// 确定
+function onReason() {
+  formData.applyReason = state.currentValue;
+  state.showModal = false;
+}
+
+onLoad(async (options) => {
+  // 解析参数
+  if (!options.orderId || !options.itemId) {
+    sheep.$helper.toast(`缺少订单信息,请检查`);
+    return;
   }
+  state.orderId = options.orderId;
+  state.itemId = parseInt(options.itemId);
 
-  // 选择申请原因
-  function onChange(e) {
-    state.currentValue = e.detail.value;
+  // 读取订单信息
+  const { code, data } = await OrderApi.getOrderDetail(state.orderId);
+  if (code !== 0) {
+    return;
   }
+  state.order = data;
+  state.item = data.items.find((item) => item.id === state.itemId) || {};
 
-  // 确定
-  function onReason() {
-    formData.applyReason = state.currentValue;
-    state.showModal = false;
+  // 设置选项
+  if (state.order.status === 10) {
+    state.wayList.splice(1, 1);
   }
 
-  onLoad(async (options) => {
-    // 解析参数
-    if (!options.orderId || !options.itemId) {
-      sheep.$helper.toast(`缺少订单信息,请检查`);
-      return;
-    }
-    state.orderId = options.orderId;
-    state.itemId = parseInt(options.itemId);
-
-    // 读取订单信息
-    const { code, data } = await OrderApi.getOrderDetail(state.orderId);
-    if (code !== 0) {
-      return;
-    }
-    state.order = data;
-    state.item = data.items.find((item) => item.id === state.itemId) || {};
-
-    // 设置选项
-    if (state.order.status === 10) {
-      state.wayList.splice(1, 1);
-    }
-
-    // 读取配置
-    state.config = (await TradeConfigApi.getTradeConfig()).data;
-  });
+  // 读取配置
+  state.config = (await TradeConfigApi.getTradeConfig()).data;
+});
 </script>
 
 <style lang="scss" scoped>
-  .item-title {
-    font-size: 30rpx;
-    font-weight: bold;
-    color: rgba(51, 51, 51, 1);
-    // margin-bottom: 20rpx;
+.item-title {
+  font-size: 30rpx;
+  font-weight: bold;
+  color: rgba(51, 51, 51, 1);
+  // margin-bottom: 20rpx;
+}
+
+// 售后项目
+.refund-item {
+  background-color: #fff;
+  border-bottom: 1rpx solid #f5f5f5;
+  padding: 30rpx;
+
+  &:last-child {
+    border: none;
   }
 
-  // 售后项目
-  .refund-item {
-    background-color: #fff;
-    border-bottom: 1rpx solid #f5f5f5;
+  // 留言
+  .describe-box {
+    width: 690rpx;
+    background: rgba(249, 250, 251, 1);
     padding: 30rpx;
+    box-sizing: border-box;
+    border-radius: 20rpx;
 
-    &:last-child {
-      border: none;
-    }
-
-    // 留言
-    .describe-box {
-      width: 690rpx;
-      background: rgba(249, 250, 251, 1);
-      padding: 30rpx;
-      box-sizing: border-box;
-      border-radius: 20rpx;
-
-      .describe-content {
-        height: 200rpx;
-        font-size: 24rpx;
-        font-weight: 400;
-        color: #333;
-      }
+    .describe-content {
+      height: 200rpx;
+      font-size: 24rpx;
+      font-weight: 400;
+      color: #333;
     }
+  }
 
-    // 联系方式
-    .input-box {
-      height: 84rpx;
-      background: rgba(249, 250, 251, 1);
-      border-radius: 20rpx;
-    }
+  // 联系方式
+  .input-box {
+    height: 84rpx;
+    background: rgba(249, 250, 251, 1);
+    border-radius: 20rpx;
+  }
+}
+
+.goods-box {
+  background: #fff;
+  padding: 20rpx;
+  margin-bottom: 20rpx;
+}
+
+.foot-wrap {
+  height: 100rpx;
+  width: 100%;
+}
+
+.foot_box {
+  height: 100rpx;
+  background-color: #fff;
+
+  .sub-btn {
+    width: 336rpx;
+    line-height: 74rpx;
+    border-radius: 38rpx;
+    color: rgba(#fff, 0.9);
+    font-size: 28rpx;
   }
 
-  .goods-box {
-    background: #fff;
-    padding: 20rpx;
-    margin-bottom: 20rpx;
+  .contcat-btn {
+    width: 336rpx;
+    line-height: 74rpx;
+    background: rgba(238, 238, 238, 1);
+    border-radius: 38rpx;
+    font-size: 28rpx;
+    font-weight: 400;
+    color: rgba(51, 51, 51, 1);
   }
+}
+
+.modal-box {
+  width: 750rpx;
+  // height: 680rpx;
+  border-radius: 30rpx 30rpx 0 0;
+  background: #fff;
 
-  .foot-wrap {
+  .modal-head {
     height: 100rpx;
-    width: 100%;
+    font-size: 30rpx;
   }
 
-  .foot_box {
-    height: 100rpx;
-    background-color: #fff;
+  .modal-content {
+    font-size: 28rpx;
+  }
 
-    .sub-btn {
-      width: 336rpx;
-      line-height: 74rpx;
-      border-radius: 38rpx;
+  .modal-foot {
+    .close-btn {
+      width: 710rpx;
+      line-height: 80rpx;
+      border-radius: 40rpx;
       color: rgba(#fff, 0.9);
-      font-size: 28rpx;
-    }
-
-    .contcat-btn {
-      width: 336rpx;
-      line-height: 74rpx;
-      background: rgba(238, 238, 238, 1);
-      border-radius: 38rpx;
-      font-size: 28rpx;
-      font-weight: 400;
-      color: rgba(51, 51, 51, 1);
     }
   }
+}
 
-  .modal-box {
-    width: 750rpx;
-    // height: 680rpx;
-    border-radius: 30rpx 30rpx 0 0;
-    background: #fff;
-
-    .modal-head {
-      height: 100rpx;
-      font-size: 30rpx;
-    }
+.success-box {
+  width: 600rpx;
+  padding: 90rpx 0 64rpx 0;
 
-    .modal-content {
-      font-size: 28rpx;
-    }
-
-    .modal-foot {
-      .close-btn {
-        width: 710rpx;
-        line-height: 80rpx;
-        border-radius: 40rpx;
-        color: rgba(#fff, 0.9);
-      }
-    }
+  .cicon-check-round {
+    font-size: 96rpx;
+    color: #04b750;
   }
 
-  .success-box {
-    width: 600rpx;
-    padding: 90rpx 0 64rpx 0;
-
-    .cicon-check-round {
-      font-size: 96rpx;
-      color: #04b750;
-    }
-
-    .success-title {
-      font-weight: 500;
-      color: #333333;
-      font-size: 32rpx;
-    }
+  .success-title {
+    font-weight: 500;
+    color: #333333;
+    font-size: 32rpx;
+  }
 
-    .success-btn {
-      width: 492rpx;
-      height: 70rpx;
-      background: linear-gradient(90deg, var(--ui-BG-Main-gradient), var(--ui-BG-Main));
-      border-radius: 35rpx;
-    }
+  .success-btn {
+    width: 492rpx;
+    height: 70rpx;
+    background: linear-gradient(90deg, var(--ui-BG-Main-gradient), var(--ui-BG-Main));
+    border-radius: 35rpx;
   }
+}
 </style>

+ 235 - 271
pages/order/aftersale/detail.vue

@@ -3,38 +3,23 @@
   <s-layout title="售后详情" :navbar="!isEmpty(state.info) && state.loading ? 'inner' : 'normal'">
     <view class="content_box" v-if="!isEmpty(state.info) && state.loading">
       <!-- 步骤条 -->
-      <view
-        class="steps-box ss-flex"
-        :style="[
-          {
-            marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
-            paddingTop: Number(statusBarHeight + 88) + 'rpx',
-          },
-        ]"
-      >
+      <view class="steps-box ss-flex" :style="[
+        {
+          marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
+          paddingTop: Number(statusBarHeight + 88) + 'rpx',
+        },
+      ]">
         <view class="ss-flex">
           <view class="steps-item" v-for="(item, index) in state.list" :key="index">
             <view class="ss-flex">
-              <text
-                class="sicon-circleclose"
-                v-if="state.list.length - 1 === index && [61, 62, 63].includes(state.info.status)"
-              />
-              <text
-                class="sicon-circlecheck"
-                v-else
-                :class="state.active >= index ? 'activity-color' : 'info-color'"
-              />
-
-              <view
-                v-if="state.list.length - 1 !== index"
-                class="line"
-                :class="state.active >= index ? 'activity-bg' : 'info-bg'"
-              />
+              <text class="sicon-circleclose"
+                v-if="state.list.length - 1 === index && [61, 62, 63].includes(state.info.status)" />
+              <text class="sicon-circlecheck" v-else :class="state.active >= index ? 'activity-color' : 'info-color'" />
+
+              <view v-if="state.list.length - 1 !== index" class="line"
+                :class="state.active >= index ? 'activity-bg' : 'info-bg'" />
             </view>
-            <view
-              class="steps-item-title"
-              :class="state.active >= index ? 'activity-color' : 'info-color'"
-            >
+            <view class="steps-item-title" :class="state.active >= index ? 'activity-color' : 'info-color'">
               {{ item.title }}
             </view>
           </view>
@@ -42,10 +27,8 @@
       </view>
 
       <!-- 服务状态 -->
-      <view
-        class="status-box ss-flex ss-col-center ss-row-between ss-m-x-20"
-        @tap="sheep.$router.go('/pages/order/aftersale/log', { id: state.id })"
-      >
+      <view class="status-box ss-flex ss-col-center ss-row-between ss-m-x-20"
+        @tap="sheep.$router.go('/pages/order/aftersale/log', { id: state.id })">
         <view class="">
           <view class="status-text">
             {{ formatAfterSaleStatusDescription(state.info) }}
@@ -64,13 +47,8 @@
       </view>
       <!-- 服务产品 -->
       <view class="order-shop">
-        <s-goods-item
-          :img="state.info.picUrl"
-          :title="state.info.spuName"
-          :titleWidth="480"
-          :skuText="state.info.properties.map((property) => property.valueName).join(' ')"
-          :num="state.info.count"
-        />
+        <s-goods-item :img="state.info.picUrl" :title="state.info.spuName" :titleWidth="480"
+          :skuText="state.info.properties.map((property) => property.valueName).join(' ')" :num="state.info.count" />
       </view>
 
       <!-- 服务内容 -->
@@ -102,31 +80,17 @@
     </view>
 
     <!-- 操作区 -->
-    <s-empty
-      v-if="isEmpty(state.info) && state.loading"
-      icon="/static/order-empty.png"
-      text="暂无该订单售后详情"
-    />
+    <s-empty v-if="isEmpty(state.info) && state.loading" icon="/static/order-empty.png" text="暂无该订单售后详情" />
     <su-fixed bottom placeholder bg="bg-white" v-if="!isEmpty(state.info)">
       <view class="foot_box">
-        <button
-          class="ss-reset-button btn"
-          v-if="state.info.buttons?.includes('cancel')"
-          @tap="onApply(state.info.id)"
-        >
+        <button class="ss-reset-button btn" v-if="state.info.buttons?.includes('cancel')" @tap="onApply(state.info.id)">
           取消申请
         </button>
-        <button
-          class="ss-reset-button btn"
-          v-if="state.info.buttons?.includes('delivery')"
-          @tap="sheep.$router.go('/pages/order/aftersale/return-delivery', { id: state.info.id })"
-        >
+        <button class="ss-reset-button btn" v-if="state.info.buttons?.includes('delivery')"
+          @tap="sheep.$router.go('/pages/order/aftersale/return-delivery', { id: state.info.id })">
           填写退货
         </button>
-        <button
-          class="ss-reset-button contcat-btn btn"
-          @tap="sheep.$router.go('/pages/chat/index')"
-        >
+        <button class="ss-reset-button contcat-btn btn" @tap="sheep.$router.go('/pages/chat/index')">
           联系客服
         </button>
       </view>
@@ -135,245 +99,245 @@
 </template>
 
 <script setup>
-  import sheep from '@/sheep';
-  import { onLoad } from '@dcloudio/uni-app';
-  import { reactive } from 'vue';
-  import { isEmpty } from 'lodash-es';
-  import {
-    fen2yuan,
-    formatAfterSaleStatusDescription,
-    handleAfterSaleButtons,
-  } from '@/sheep/hooks/useGoods';
-  import AfterSaleApi from '@/sheep/api/trade/afterSale';
-
-  const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
-  const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png');
-  const state = reactive({
-    id: 0, // 售后编号
-    info: {}, // 收货信息
-    loading: false,
-    active: 0, // 在 list 的激活位置
-    list: [
-      {
-        title: '提交申请',
-      },
-      {
-        title: '处理中',
-      },
-      {
-        title: '完成',
-      },
-    ], // 时间轴
+import sheep from '@/sheep';
+import { onLoad } from '@dcloudio/uni-app';
+import { reactive } from 'vue';
+import { isEmpty } from 'lodash-es';
+import {
+  fen2yuan,
+  formatAfterSaleStatusDescription,
+  handleAfterSaleButtons,
+} from '@/sheep/hooks/useGoods';
+import AfterSaleApi from '@/sheep/api/trade/afterSale';
+
+const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
+const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png');
+const state = reactive({
+  id: 0, // 售后编号
+  info: {}, // 收货信息
+  loading: false,
+  active: 0, // 在 list 的激活位置
+  list: [
+    {
+      title: '提交申请',
+    },
+    {
+      title: '处理中',
+    },
+    {
+      title: '完成',
+    },
+  ], // 时间轴
+});
+
+function onApply(id) {
+  uni.showModal({
+    title: '提示',
+    content: '确定要取消此申请吗?',
+    success: async function (res) {
+      if (!res.confirm) {
+        return;
+      }
+      const { code } = await AfterSaleApi.cancelAfterSale(id);
+      if (code === 0) {
+        await getDetail(id);
+      }
+    },
   });
-
-  function onApply(id) {
-    uni.showModal({
-      title: '提示',
-      content: '确定要取消此申请吗?',
-      success: async function (res) {
-        if (!res.confirm) {
-          return;
-        }
-        const { code } = await AfterSaleApi.cancelAfterSale(id);
-        if (code === 0) {
-          await getDetail(id);
-        }
-      },
-    });
+}
+
+// 复制
+const onCopy = () => {
+  sheep.$helper.copyText(state.info.no);
+};
+
+async function getDetail(id) {
+  state.loading = true;
+  const { code, data } = await AfterSaleApi.getAfterSale(id);
+  if (code !== 0) {
+    state.info = null;
+    return;
   }
-
-  // 复制
-  const onCopy = () => {
-    sheep.$helper.copyText(state.info.no);
-  };
-
-  async function getDetail(id) {
-    state.loading = true;
-    const { code, data } = await AfterSaleApi.getAfterSale(id);
-    if (code !== 0) {
-      state.info = null;
-      return;
-    }
-    state.info = data;
-    handleAfterSaleButtons(state.info);
-
-    // 处理时间轴
-    if ([10].includes(state.info.status)) {
-      state.active = 0;
-    } else if ([20, 30].includes(state.info.status)) {
-      state.active = 1;
-    } else if ([40, 50].includes(state.info.status)) {
-      state.active = 2;
-    } else if ([61, 62, 63].includes(state.info.status)) {
-      state.active = 2;
-    }
+  state.info = data;
+  handleAfterSaleButtons(state.info);
+
+  // 处理时间轴
+  if ([10].includes(state.info.status)) {
+    state.active = 0;
+  } else if ([20, 30].includes(state.info.status)) {
+    state.active = 1;
+  } else if ([40, 50].includes(state.info.status)) {
+    state.active = 2;
+  } else if ([61, 62, 63].includes(state.info.status)) {
+    state.active = 2;
   }
+}
 
-  onLoad((options) => {
-    if (!options.id) {
-      sheep.$helper.toast(`缺少订单信息,请检查`);
-      return;
-    }
-    state.id = options.id;
-    getDetail(options.id);
-  });
+onLoad((options) => {
+  if (!options.id) {
+    sheep.$helper.toast(`缺少订单信息,请检查`);
+    return;
+  }
+  state.id = options.id;
+  getDetail(options.id);
+});
 </script>
 
 <style lang="scss" scoped>
-  // 步骤条
-  .steps-box {
-    width: 100%;
-    height: 190rpx;
-    background: v-bind(headerBg) no-repeat,
-      linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
-    background-size: 750rpx 100%;
-    padding-left: 72rpx;
-
-    .steps-item {
-      .sicon-circleclose {
-        font-size: 24rpx;
-        color: #fff;
-      }
-
-      .sicon-circlecheck {
-        font-size: 24rpx;
-      }
+// 步骤条
+.steps-box {
+  width: 100%;
+  height: 190rpx;
+  background: v-bind(headerBg) no-repeat,
+    linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
+  background-size: 750rpx 100%;
+  padding-left: 72rpx;
+
+  .steps-item {
+    .sicon-circleclose {
+      font-size: 24rpx;
+      color: #fff;
+    }
 
-      .steps-item-title {
-        font-size: 24rpx;
-        font-weight: 400;
-        margin-top: 16rpx;
-        margin-left: -36rpx;
-        width: 100rpx;
-        text-align: center;
-      }
+    .sicon-circlecheck {
+      font-size: 24rpx;
     }
-  }
 
-  .activity-color {
-    color: #fff;
+    .steps-item-title {
+      font-size: 24rpx;
+      font-weight: 400;
+      margin-top: 16rpx;
+      margin-left: -36rpx;
+      width: 100rpx;
+      text-align: center;
+    }
   }
-
-  .info-color {
-    color: rgba(#fff, 0.4);
+}
+
+.activity-color {
+  color: #fff;
+}
+
+.info-color {
+  color: rgba(#fff, 0.4);
+}
+
+.activity-bg {
+  background: #fff;
+}
+
+.info-bg {
+  background: rgba(#fff, 0.4);
+}
+
+.line {
+  width: 270rpx;
+  height: 4rpx;
+}
+
+// 服务状态
+.status-box {
+  position: relative;
+  z-index: 3;
+  background-color: #fff;
+  border-radius: 20rpx 20rpx 0px 0px;
+  padding: 20rpx;
+  margin-top: -20rpx;
+
+  .status-text {
+    font-size: 28rpx;
+
+    font-weight: 500;
+    color: rgba(51, 51, 51, 1);
+    margin-bottom: 20rpx;
   }
 
-  .activity-bg {
-    background: #fff;
-  }
+  .status-time {
+    font-size: 24rpx;
 
-  .info-bg {
-    background: rgba(#fff, 0.4);
+    font-weight: 400;
+    color: rgba(153, 153, 153, 1);
   }
+}
 
-  .line {
-    width: 270rpx;
-    height: 4rpx;
-  }
+// 退款金额
+.aftersale-money {
+  background-color: #fff;
+  height: 98rpx;
+  padding: 0 20rpx;
+  margin: 20rpx;
 
-  // 服务状态
-  .status-box {
-    position: relative;
-    z-index: 3;
-    background-color: #fff;
-    border-radius: 20rpx 20rpx 0px 0px;
-    padding: 20rpx;
-    margin-top: -20rpx;
+  .aftersale-money--title {
+    font-size: 28rpx;
 
-    .status-text {
-      font-size: 28rpx;
-
-      font-weight: 500;
-      color: rgba(51, 51, 51, 1);
-      margin-bottom: 20rpx;
-    }
-
-    .status-time {
-      font-size: 24rpx;
-
-      font-weight: 400;
-      color: rgba(153, 153, 153, 1);
-    }
+    font-weight: 500;
+    color: rgba(51, 51, 51, 1);
   }
 
-  // 退款金额
-  .aftersale-money {
-    background-color: #fff;
-    height: 98rpx;
-    padding: 0 20rpx;
-    margin: 20rpx;
-
-    .aftersale-money--title {
-      font-size: 28rpx;
-
-      font-weight: 500;
-      color: rgba(51, 51, 51, 1);
+  .aftersale-money--num {
+    font-size: 28rpx;
+    font-family: OPPOSANS;
+    font-weight: 500;
+    color: #ff3000;
+  }
+}
+
+// order-shop
+.order-shop {
+  padding: 20rpx;
+  background-color: #fff;
+  margin: 0 20rpx 20rpx 20rpx;
+}
+
+// 服务内容
+.aftersale-content {
+  background-color: #fff;
+  padding: 20rpx;
+  margin: 0 20rpx;
+
+  .aftersale-item {
+    height: 60rpx;
+
+    .copy-btn {
+      background: #eeeeee;
+      color: #333;
+      border-radius: 20rpx;
+      width: 75rpx;
+      height: 40rpx;
+      font-size: 22rpx;
     }
 
-    .aftersale-money--num {
+    .item-title {
+      color: #999;
       font-size: 28rpx;
-      font-family: OPPOSANS;
-      font-weight: 500;
-      color: #ff3000;
     }
-  }
 
-  // order-shop
-  .order-shop {
-    padding: 20rpx;
-    background-color: #fff;
-    margin: 0 20rpx 20rpx 20rpx;
-  }
-
-  // 服务内容
-  .aftersale-content {
-    background-color: #fff;
-    padding: 20rpx;
-    margin: 0 20rpx;
-
-    .aftersale-item {
-      height: 60rpx;
-
-      .copy-btn {
-        background: #eeeeee;
-        color: #333;
-        border-radius: 20rpx;
-        width: 75rpx;
-        height: 40rpx;
-        font-size: 22rpx;
-      }
-
-      .item-title {
-        color: #999;
-        font-size: 28rpx;
-      }
-
-      .item-content {
-        color: #333;
-        font-size: 28rpx;
-      }
+    .item-content {
+      color: #333;
+      font-size: 28rpx;
     }
   }
-
-  // 底部功能
-  .foot_box {
-    height: 100rpx;
-    background-color: #fff;
-    display: flex;
-    align-items: center;
-    justify-content: flex-end;
-
-    .btn {
-      width: 160rpx;
-      line-height: 60rpx;
-      background: rgba(238, 238, 238, 1);
-      border-radius: 30rpx;
-      padding: 0;
-      margin-right: 20rpx;
-      font-size: 26rpx;
-
-      font-weight: 400;
-      color: rgba(51, 51, 51, 1);
-    }
+}
+
+// 底部功能
+.foot_box {
+  height: 100rpx;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+
+  .btn {
+    width: 160rpx;
+    line-height: 60rpx;
+    background: rgba(238, 238, 238, 1);
+    border-radius: 30rpx;
+    padding: 0;
+    margin-right: 20rpx;
+    font-size: 26rpx;
+
+    font-weight: 400;
+    color: rgba(51, 51, 51, 1);
   }
+}
 </style>

+ 175 - 218
pages/user/goods-log.vue

@@ -12,55 +12,29 @@
           件产品
         </view>
         <view class="header-right">
-          <button
-            v-if="state.editMode && state.pagination.total"
-            class="ss-reset-button"
-            @tap="state.editMode = false"
-          >
+          <button v-if="state.editMode && state.pagination.total" class="ss-reset-button" @tap="state.editMode = false">
             取消
           </button>
-          <button
-            v-if="!state.editMode && state.pagination.total"
-            class="ss-reset-button ui-TC-Main"
-            @tap="state.editMode = true"
-          >
+          <button v-if="!state.editMode && state.pagination.total" class="ss-reset-button ui-TC-Main"
+            @tap="state.editMode = true">
             编辑
           </button>
         </view>
       </view>
       <!-- 内容 -->
       <view class="cart-content">
-        <view
-          class="goods-box ss-r-10 ss-m-b-14"
-          v-for="item in state.pagination.list"
-          :key="item.id"
-        >
+        <view class="goods-box ss-r-10 ss-m-b-14" v-for="item in state.pagination.list" :key="item.id">
           <view class="ss-flex ss-col-center">
-            <label
-              class="check-box ss-flex ss-col-center ss-p-l-10"
-              v-if="state.editMode"
-              @tap="onSelect(item.spuId)"
-            >
-              <radio
-                :checked="state.selectedSpuIdList.includes(item.spuId)"
-                color="var(--ui-BG-Main)"
-                style="transform: scale(0.8)"
-                @tap.stop="onSelect(item.spuId)"
-              />
+            <label class="check-box ss-flex ss-col-center ss-p-l-10" v-if="state.editMode" @tap="onSelect(item.spuId)">
+              <radio :checked="state.selectedSpuIdList.includes(item.spuId)" color="var(--ui-BG-Main)"
+                style="transform: scale(0.8)" @tap.stop="onSelect(item.spuId)" />
             </label>
-            <s-goods-item
-              :title="item.spuName"
-              :img="item.picUrl"
-              :price="item.price"
-              :skuText="item.introduction"
-              priceColor="#FF3000"
-              :titleWidth="400"
-              @tap="
+            <s-goods-item :title="item.spuName" :img="item.picUrl" :price="item.price" :skuText="item.introduction"
+              priceColor="#FF3000" :titleWidth="400" @tap="
                 sheep.$router.go('/pages/goods/index', {
                   id: item.spuId,
                 })
-              "
-            >
+                ">
             </s-goods-item>
           </view>
         </view>
@@ -70,239 +44,222 @@
         <view class="cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom">
           <view class="footer-left ss-flex ss-col-center">
             <label class="check-box ss-flex ss-col-center ss-p-r-30" @tap="onSelectAll">
-              <radio
-                :checked="state.selectAll"
-                color="var(--ui-BG-Main)"
-                style="transform: scale(0.7)"
-                @tap.stop="onSelectAll"
-              />
+              <radio :checked="state.selectAll" color="var(--ui-BG-Main)" style="transform: scale(0.7)"
+                @tap.stop="onSelectAll" />
               <view>全选</view>
             </label>
           </view>
           <view class="footer-right ss-flex">
-            <button
-              :class="[
-                'ss-reset-button  pay-btn ss-font-28 ',
-                {
-                  'ui-BG-Main-Gradient': state.selectedSpuIdList.length > 0,
-                  'ui-Shadow-Main': state.selectedSpuIdList.length > 0,
-                },
-              ]"
-              @tap="onDelete"
-            >
+            <button :class="[
+              'ss-reset-button  pay-btn ss-font-28 ',
+              {
+                'ui-BG-Main-Gradient': state.selectedSpuIdList.length > 0,
+                'ui-Shadow-Main': state.selectedSpuIdList.length > 0,
+              },
+            ]" @tap="onDelete">
               删除足迹
             </button>
-            <button
-              class="ss-reset-button ui-BG-Main-Gradient pay-btn ss-font-28 ui-Shadow-Main ml-2"
-              @tap="onClean"
-            >
+            <button class="ss-reset-button ui-BG-Main-Gradient pay-btn ss-font-28 ui-Shadow-Main ml-2" @tap="onClean">
               清空
             </button>
           </view>
         </view>
       </su-fixed>
     </view>
-    <uni-load-more
-      v-if="state.pagination.total > 0"
-      :status="state.loadStatus"
-      :content-text="{
-        contentdown: '上拉加载更多',
-      }"
-      @tap="loadMore"
-    />
-    <s-empty
-      v-if="state.pagination.total === 0"
-      text="暂无浏览记录"
-      icon="/static/collect-empty.png"
-    />
+    <uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
+      contentdown: '上拉加载更多',
+    }" @tap="loadMore" />
+    <s-empty v-if="state.pagination.total === 0" text="暂无浏览记录" icon="/static/collect-empty.png" />
   </s-layout>
 </template>
 
 <script setup>
-  import sheep from '@/sheep';
-  import { reactive } from 'vue';
-  import { onLoad, onReachBottom } from '@dcloudio/uni-app';
-  import _ from 'lodash-es';
-  import SpuHistoryApi from '@/sheep/api/product/history';
-  import { cloneDeep } from '@/sheep/helper/utils';
+import sheep from '@/sheep';
+import { reactive } from 'vue';
+import { onLoad, onReachBottom } from '@dcloudio/uni-app';
+import _ from 'lodash-es';
+import SpuHistoryApi from '@/sheep/api/product/history';
+import { cloneDeep } from '@/sheep/helper/utils';
 
-  const sys_navBar = sheep.$platform.navbar;
-  const pagination = {
-    list: [],
-    pageNo: 1,
-    total: 1,
-    pageSize: 10,
-  };
-  const state = reactive({
-    pagination: cloneDeep(pagination),
-    loadStatus: '',
-    editMode: false,
-    selectedSpuIdList: [],
-    selectAll: false,
-  });
-
-  async function getList() {
-    state.loadStatus = 'loading';
-    const { code, data } = await SpuHistoryApi.getBrowseHistoryPage({
-      pageNo: state.pagination.pageNo,
-      pageSize: state.pagination.pageSize,
-    });
-    if (code !== 0) {
-      return;
-    }
+const sys_navBar = sheep.$platform.navbar;
+const pagination = {
+  list: [],
+  pageNo: 1,
+  total: 1,
+  pageSize: 10,
+};
+const state = reactive({
+  pagination: cloneDeep(pagination),
+  loadStatus: '',
+  editMode: false,
+  selectedSpuIdList: [],
+  selectAll: false,
+});
 
-    state.pagination.list = _.concat(state.pagination.list, data.list);
-    state.pagination.total = data.total;
-    state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
+async function getList() {
+  state.loadStatus = 'loading';
+  const { code, data } = await SpuHistoryApi.getBrowseHistoryPage({
+    pageNo: state.pagination.pageNo,
+    pageSize: state.pagination.pageSize,
+  });
+  if (code !== 0) {
+    return;
   }
 
-  // 单选选中
-  const onSelect = (id) => {
-    if (!state.selectedSpuIdList.includes(id)) {
-      state.selectedSpuIdList.push(id);
-    } else {
-      state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(id), 1);
-    }
-    state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length;
-  };
+  state.pagination.list = _.concat(state.pagination.list, data.list);
+  state.pagination.total = data.total;
+  state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
+}
 
-  // 全选
-  const onSelectAll = () => {
-    state.selectAll = !state.selectAll;
-    if (!state.selectAll) {
-      state.selectedSpuIdList = [];
-    } else {
-      state.pagination.list.forEach((item) => {
-        if (state.selectedSpuIdList.includes(item.spuId)) {
-          state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(item.spuId), 1);
-        }
-        state.selectedSpuIdList.push(item.spuId);
-      });
-    }
-  };
-
-  // 删除足迹
-  async function onDelete() {
-    if (state.selectedSpuIdList.length <= 0) {
-      return;
-    }
+// 单选选中
+const onSelect = (id) => {
+  if (!state.selectedSpuIdList.includes(id)) {
+    state.selectedSpuIdList.push(id);
+  } else {
+    state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(id), 1);
+  }
+  state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length;
+};
 
-    const { code } = await SpuHistoryApi.deleteBrowseHistory(state.selectedSpuIdList);
-    if (code === 0) {
-      reload();
-    }
+// 全选
+const onSelectAll = () => {
+  state.selectAll = !state.selectAll;
+  if (!state.selectAll) {
+    state.selectedSpuIdList = [];
+  } else {
+    state.pagination.list.forEach((item) => {
+      if (state.selectedSpuIdList.includes(item.spuId)) {
+        state.selectedSpuIdList.splice(state.selectedSpuIdList.indexOf(item.spuId), 1);
+      }
+      state.selectedSpuIdList.push(item.spuId);
+    });
   }
+};
 
-  // 清空
-  async function onClean() {
-    const { code } = await SpuHistoryApi.cleanBrowseHistory();
-    if (code === 0) {
-      reload();
-    }
+// 删除足迹
+async function onDelete() {
+  if (state.selectedSpuIdList.length <= 0) {
+    return;
   }
 
-  function reload() {
-    state.editMode = false;
-    state.selectedSpuIdList = [];
-    state.selectAll = false;
-    state.pagination = pagination;
-    getList();
+  const { code } = await SpuHistoryApi.deleteBrowseHistory(state.selectedSpuIdList);
+  if (code === 0) {
+    reload();
   }
+}
 
-  // 加载更多
-  function loadMore() {
-    if (state.loadStatus !== 'noMore') {
-      state.pagination.pageNo += 1;
-      getList();
-    }
+// 清空
+async function onClean() {
+  const { code } = await SpuHistoryApi.cleanBrowseHistory();
+  if (code === 0) {
+    reload();
   }
+}
 
-  onReachBottom(() => {
-    loadMore();
-  });
+function reload() {
+  state.editMode = false;
+  state.selectedSpuIdList = [];
+  state.selectAll = false;
+  state.pagination = pagination;
+  getList();
+}
 
-  onLoad(() => {
+// 加载更多
+function loadMore() {
+  if (state.loadStatus !== 'noMore') {
+    state.pagination.pageNo += 1;
     getList();
-  });
+  }
+}
+
+onReachBottom(() => {
+  loadMore();
+});
+
+onLoad(() => {
+  getList();
+});
 </script>
 
 <style lang="scss" scoped>
-  .cart-box {
-    .cart-header {
-      height: 70rpx;
-      background-color: #f6f6f6;
-      width: 100%;
-      position: fixed;
-      left: 0;
-      top: v-bind('sys_navBar') rpx;
-      z-index: 1000;
-      box-sizing: border-box;
-    }
+.cart-box {
+  .cart-header {
+    height: 70rpx;
+    background-color: #f6f6f6;
+    width: 100%;
+    position: fixed;
+    left: 0;
+    top: v-bind('sys_navBar') rpx;
+    z-index: 1000;
+    box-sizing: border-box;
+  }
 
-    .cart-footer {
-      height: 100rpx;
-      background-color: #fff;
+  .cart-footer {
+    height: 100rpx;
+    background-color: #fff;
 
-      .pay-btn {
-        height: 80rpx;
-        line-height: 80rpx;
-        border-radius: 40rpx;
-        padding: 0 40rpx;
-        min-width: 200rpx;
-      }
+    .pay-btn {
+      height: 80rpx;
+      line-height: 80rpx;
+      border-radius: 40rpx;
+      padding: 0 40rpx;
+      min-width: 200rpx;
     }
+  }
+
+  .cart-content {
+    width: 100%;
+    padding: 0 20rpx;
+    box-sizing: border-box;
+    margin-top: 70rpx;
 
-    .cart-content {
-      width: 100%;
-      padding: 0 20rpx;
-      box-sizing: border-box;
-      margin-top: 70rpx;
-      .goods-box {
-        background-color: #fff;
-        &:last-child {
-          margin-bottom: 40rpx;
-        }
+    .goods-box {
+      background-color: #fff;
+
+      &:last-child {
+        margin-bottom: 40rpx;
       }
     }
   }
+}
+
+.title-card {
+  padding: 36rpx 0 46rpx 20rpx;
 
-  .title-card {
-    padding: 36rpx 0 46rpx 20rpx;
+  .img-box {
+    width: 164rpx;
+    height: 164rpx;
 
-    .img-box {
+    .order-img {
       width: 164rpx;
       height: 164rpx;
-
-      .order-img {
-        width: 164rpx;
-        height: 164rpx;
-      }
     }
+  }
 
-    .check-box {
-      height: 100%;
-    }
+  .check-box {
+    height: 100%;
+  }
 
-    .title-text {
-      font-size: 28rpx;
-      font-weight: 500;
-      color: #333333;
-    }
+  .title-text {
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #333333;
+  }
 
-    .params-box {
-      .params-title {
-        height: 38rpx;
-        background: #f4f4f4;
-        border-radius: 2rpx;
-        font-size: 24rpx;
-        font-weight: 400;
-        color: #666666;
-      }
+  .params-box {
+    .params-title {
+      height: 38rpx;
+      background: #f4f4f4;
+      border-radius: 2rpx;
+      font-size: 24rpx;
+      font-weight: 400;
+      color: #666666;
     }
+  }
 
-    .price-text {
-      color: $red;
-      font-family: OPPOSANS;
-    }
+  .price-text {
+    color: $red;
+    font-family: OPPOSANS;
   }
+}
 </style>

+ 18 - 18
sheep/components/s-block-item/s-block-item.vue

@@ -60,24 +60,24 @@
 </template>
 
 <script setup>
-  /**
-   * 装修组件 - 组件集
-   */
-  const props = defineProps({
-    type: {
-      type: String,
-      default: '',
-    },
-    data: {
-      type: Object,
-      default() {},
-    },
-    styles: {
-      type: Object,
-      default() {},
-    },
-  });
-  function onSearch() {}
+/**
+ * 装修组件 - 组件集
+ */
+const props = defineProps({
+  type: {
+    type: String,
+    default: '',
+  },
+  data: {
+    type: Object,
+    default() { },
+  },
+  styles: {
+    type: Object,
+    default() { },
+  },
+});
+function onSearch() { }
 </script>
 
 <style></style>

+ 13 - 3
sheep/components/s-goods-card/s-goods-card.vue

@@ -71,7 +71,7 @@
           @tap="sheep.$router.go('/pages/goods/index', { id: item.id })">
           <!-- 购买按钮 -->
           <template v-slot:cart>
-            <button @click="lxkfClick()" class="ss-reset-button cart-btn" :style="[buyStyle]">
+            <button @click="lxkfClick(item)" class="ss-reset-button cart-btn" :style="[buyStyle]">
               {{ btnBuy.type === 'text' ? btnBuy.text : '' }}
             </button>
           </template>
@@ -119,8 +119,18 @@ const props = defineProps({
 
 const { layoutType, btnBuy, spuIds } = props.data || {};
 const { marginLeft, marginRight } = props.styles || {};
-const lxkfClick = () => {
-  sheep.$router.go('/pages/customerService/index')
+const lxkfClick = (item) => {
+  if (item.proType == 0) {
+    sheep.$router.go('/pages/chat/index')
+  } else {
+    sheep.$router.go('/pages/customerService/index', {
+      data: JSON.stringify({
+        url: item.qrCodePath,
+      })
+    })
+  }
+  console.log(item)
+  // sheep.$router.go('/pages/customerService/index')
 }
 
 // 购买按钮样式

+ 5 - 6
sheep/components/s-goods-column/s-goods-column.vue

@@ -172,7 +172,7 @@
             {{ data.title || data.name }}
           </view>
           <view v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
-            class="lg-goods-subtitle ss-m-t-10 ss-line-1"
+            class="lg-goods-subtitle ss-m-t-10 ss-line-3"
             :style="[{ color: subTitleColor, background: subTitleBackground }]">
             {{ data.subtitle || data.introduction }}
           </view>
@@ -193,9 +193,8 @@
               {{ item }}
             </view>
           </view>
-          <view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS">
+          <!-- <view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS">
             <view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]">
-              <!-- 活动价格 -->
               <view class="ss-flex"
                 v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
                 <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="point-img"></image>
@@ -219,10 +218,10 @@
               <text class="price-unit ss-font-20">{{ priceUnit }}</text>
               <view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view>
             </view>
-          </view>
-          <view class="ss-m-t-8 ss-flex ss-col-center ss-flex-wrap">
+          </view> -->
+          <!-- <view class="ss-m-t-8 ss-flex ss-col-center ss-flex-wrap">
             <view class="sales-text">{{ salesAndStock }}</view>
-          </view>
+          </view> -->
         </view>
       </view>
 

+ 127 - 137
sheep/components/s-goods-item/s-goods-item.vue

@@ -3,17 +3,12 @@
     <view>
       <slot name="top"></slot>
     </view>
-    <view
-      class="ss-order-card-warp ss-flex ss-col-stretch ss-row-between bg-white"
-      :style="[{ borderRadius: radius + 'rpx', marginBottom: marginBottom + 'rpx' }]"
-    >
+    <view class="ss-order-card-warp ss-flex ss-col-stretch ss-row-between bg-white"
+      :style="[{ borderRadius: radius + 'rpx', marginBottom: marginBottom + 'rpx' }]">
       <view class="img-box ss-m-r-24">
         <image class="order-img" :src="sheep.$url.cdn(img)" mode="aspectFill"></image>
       </view>
-      <view
-        class="box-right ss-flex-col ss-row-between"
-        :style="[{ width: titleWidth ? titleWidth + 'rpx' : '' }]"
-      >
+      <view class="box-right ss-flex-col ss-row-between" :style="[{ width: titleWidth ? titleWidth + 'rpx' : '' }]">
         <view class="title-text ss-line-2" v-if="title">{{ title }}</view>
         <view v-if="skuString" class="spec-text ss-m-t-8 ss-m-b-12">{{ skuString }}</view>
         <view class="groupon-box">
@@ -21,19 +16,13 @@
         </view>
         <view class="ss-flex">
           <view class="ss-flex ss-col-center">
-            <view
-              class="price-text ss-flex ss-col-center"
-              :style="[{ color: priceColor }]"
-              v-if="price && Number(price) > 0"
-            >
+            <!-- <view class="price-text ss-flex ss-col-center" :style="[{ color: priceColor }]"
+              v-if="price && Number(price) > 0">
               ¥{{ fen2yuan(price) }}
-            </view>
+            </view> -->
             <view v-if="point && Number(price) > 0">+</view>
             <view class="price-text ss-flex ss-col-center" v-if="point">
-              <image
-                :src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
-                class="point-img"
-              ></image>
+              <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="point-img"></image>
               <view>{{ point }}</view>
             </view>
             <view v-if="num" class="total-text ss-flex ss-col-center">x {{ num }}</view>
@@ -52,138 +41,139 @@
 </template>
 
 <script setup>
-  import sheep from '@/sheep';
-  import { computed } from 'vue';
-  import { fen2yuan } from '@/sheep/hooks/useGoods';
-  /**
-   * 订单卡片
-   *
-   * @property {String} img 											- 图片
-   * @property {String} title 										- 标题
-   * @property {Number} titleWidth = 0								- 标题宽度,默认0,单位rpx
-   * @property {String} skuText 										- 规格
-   * @property {String | Number} price 								- 价格
-   * @property {String} priceColor 									- 价格颜色
-   * @property {Number | String} num									- 数量
-   *
-   */
-  const props = defineProps({
-    img: {
-      type: String,
-      default: 'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto',
-    },
-    title: {
-      type: String,
-      default: '',
-    },
-    titleWidth: {
-      type: Number,
-      default: 0,
-    },
-    skuText: {
-      type: [String, Array],
-      default: '',
-    },
-    price: {
-      type: [String, Number],
-      default: '',
-    },
-    priceColor: {
-      type: [String],
-      default: '',
-    },
-    num: {
-      type: [String, Number],
-      default: 0,
-    },
-    point: {
-      type: [String, Number],
-      default: '',
-    },
-    radius: {
-      type: [String],
-      default: '',
-    },
-    marginBottom: {
-      type: [String],
-      default: '',
-    },
-  });
-  const skuString = computed(() => {
-    if (!props.skuText) {
-      return '';
-    }
-    if (typeof props.skuText === 'object') {
-      return props.skuText.join(',');
-    }
-    return props.skuText;
-  });
+import sheep from '@/sheep';
+import { computed } from 'vue';
+import { fen2yuan } from '@/sheep/hooks/useGoods';
+/**
+ * 订单卡片
+ *
+ * @property {String} img 											- 图片
+ * @property {String} title 										- 标题
+ * @property {Number} titleWidth = 0								- 标题宽度,默认0,单位rpx
+ * @property {String} skuText 										- 规格
+ * @property {String | Number} price 								- 价格
+ * @property {String} priceColor 									- 价格颜色
+ * @property {Number | String} num									- 数量
+ *
+ */
+const props = defineProps({
+  img: {
+    type: String,
+    default: 'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto',
+  },
+  title: {
+    type: String,
+    default: '',
+  },
+  titleWidth: {
+    type: Number,
+    default: 0,
+  },
+  skuText: {
+    type: [String, Array],
+    default: '',
+  },
+  price: {
+    type: [String, Number],
+    default: '',
+  },
+  priceColor: {
+    type: [String],
+    default: '',
+  },
+  num: {
+    type: [String, Number],
+    default: 0,
+  },
+  point: {
+    type: [String, Number],
+    default: '',
+  },
+  radius: {
+    type: [String],
+    default: '',
+  },
+  marginBottom: {
+    type: [String],
+    default: '',
+  },
+});
+const skuString = computed(() => {
+  if (!props.skuText) {
+    return '';
+  }
+  if (typeof props.skuText === 'object') {
+    return props.skuText.join(',');
+  }
+  return props.skuText;
+});
 </script>
 
 <style lang="scss" scoped>
-  .point-img {
-    width: 36rpx;
-    height: 36rpx;
-    margin: 0 4rpx;
-  }
-  .ss-order-card-warp {
-    padding: 20rpx;
+.point-img {
+  width: 36rpx;
+  height: 36rpx;
+  margin: 0 4rpx;
+}
+
+.ss-order-card-warp {
+  padding: 20rpx;
 
-    .img-box {
+  .img-box {
+    width: 164rpx;
+    height: 164rpx;
+    border-radius: 10rpx;
+    overflow: hidden;
+
+    .order-img {
       width: 164rpx;
       height: 164rpx;
-      border-radius: 10rpx;
-      overflow: hidden;
-
-      .order-img {
-        width: 164rpx;
-        height: 164rpx;
-      }
     }
+  }
 
-    .box-right {
-      flex: 1;
-      // width: 500rpx;
-      // height: 164rpx;
-      position: relative;
+  .box-right {
+    flex: 1;
+    // width: 500rpx;
+    // height: 164rpx;
+    position: relative;
 
-      .tool-box {
-        position: absolute;
-        right: 0rpx;
-        bottom: -10rpx;
-      }
+    .tool-box {
+      position: absolute;
+      right: 0rpx;
+      bottom: -10rpx;
     }
+  }
 
-    .title-text {
-      font-size: 28rpx;
-      font-weight: 500;
-      line-height: 40rpx;
-    }
+  .title-text {
+    font-size: 28rpx;
+    font-weight: 500;
+    line-height: 40rpx;
+  }
 
-    .spec-text {
-      font-size: 24rpx;
-      font-weight: 400;
-      color: $dark-9;
-      min-width: 0;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      display: -webkit-box;
-      -webkit-line-clamp: 1;
-      -webkit-box-orient: vertical;
-    }
+  .spec-text {
+    font-size: 24rpx;
+    font-weight: 400;
+    color: $dark-9;
+    min-width: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 1;
+    -webkit-box-orient: vertical;
+  }
 
-    .price-text {
-      font-size: 24rpx;
-      font-weight: 500;
-      font-family: OPPOSANS;
-    }
+  .price-text {
+    font-size: 24rpx;
+    font-weight: 500;
+    font-family: OPPOSANS;
+  }
 
-    .total-text {
-      font-size: 24rpx;
-      font-weight: 400;
-      line-height: 24rpx;
-      color: $dark-9;
-      margin-left: 8rpx;
-    }
+  .total-text {
+    font-size: 24rpx;
+    font-weight: 400;
+    line-height: 24rpx;
+    color: $dark-9;
+    margin-left: 8rpx;
   }
+}
 </style>

+ 27 - 41
sheep/components/s-menu-list/s-menu-list.vue

@@ -2,34 +2,19 @@
 <template>
   <view class="menu-list-wrap">
     <uni-list :border="true">
-      <uni-list-item
-        v-for="(item, index) in data.list"
-        :key="index"
-        showArrow
-        clickable
-        @tap="sheep.$router.go(item.url)"
-      >
+      <uni-list-item v-for="(item, index) in data.list" :key="index" showArrow clickable
+        @tap="sheep.$router.go(item.url)">
         <template v-slot:header>
           <view class="ss-flex ss-col-center">
-            <image
-              v-if="item.iconUrl"
-              class="list-icon"
-              :src="sheep.$url.cdn(item.iconUrl)"
-              mode="aspectFit"
-            ></image>
-            <view
-              class="title-text ss-flex ss-row-center ss-col-center ss-m-l-20"
-              :style="[{ color: item.titleColor }]"
-            >
+            <image v-if="item.iconUrl" class="list-icon" :src="sheep.$url.cdn(item.iconUrl)" mode="aspectFit"></image>
+            <view class="title-text ss-flex ss-row-center ss-col-center ss-m-l-20"
+              :style="[{ color: item.titleColor }]">
               {{ item.title }}
             </view>
           </view>
         </template>
         <template v-slot:footer>
-          <view
-            class="notice-text ss-flex ss-row-center ss-col-center"
-            :style="[{ color: item.subtitleColor }]"
-          >
+          <view class="notice-text ss-flex ss-row-center ss-col-center" :style="[{ color: item.subtitleColor }]">
             {{ item.subtitle }}
           </view>
         </template>
@@ -39,28 +24,29 @@
 </template>
 
 <script setup>
-  /**
-   * cell
-   */
-  import sheep from '@/sheep';
-  const props = defineProps({
-    data: {
-      type: Object,
-      default: () => ({}),
-    },
-  });
+/**
+ * cell
+ */
+import sheep from '@/sheep';
+const props = defineProps({
+  data: {
+    type: Object,
+    default: () => ({}),
+  },
+});
 </script>
 
 <style lang="scss">
-  .list-icon {
-    width: 20px;
-    height: 20px;
-  }
-  .notice-text {
-  }
-  .menu-list-wrap {
-    ::v-deep .uni-list {
-      background-color: transparent;
-    }
+.list-icon {
+  width: 20px;
+  height: 20px;
+}
+
+.notice-text {}
+
+.menu-list-wrap {
+  ::v-deep .uni-list {
+    background-color: transparent;
   }
+}
 </style>