liude 1 سال پیش
والد
کامیت
9992c2763a

+ 2 - 1
src/api/client/business.js

@@ -31,10 +31,11 @@ export function getSellsDetail(id, data) {
  * 商品详情
  * @returns
  */
-export function getGoodsDetailApi(id) {
+export function getGoodsDetailApi(id,param) {
   return request({
     url: `/maintain/goods/${id}`,
     method: 'GET',
+    param,
     headers: {
       'Content-Type': 'application/x-www-form-urlencoded',
     },

+ 1 - 1
src/api/client/home.js

@@ -74,7 +74,7 @@ export function likeMerchant(data) {
   return request({
     url: `/maintain/likeMerchant/`,
     method: 'post',
-    data: data,
+    data,
     headers: {
       'Content-Type': 'application/json',
     },

+ 180 - 164
src/pages/client/clientPackage/search.vue

@@ -15,8 +15,16 @@
         </view>
       </view>
       <view class="label">
-        <u-tag v-for="(item, index) of search_list" :key="index" :text="item.name" plain closable :show="close2"
-          @close="handlerCloseSearchItem(item, index)" @click="handlerSelctHistItem(item)" />
+        <u-tag
+          v-for="(item, index) of search_list"
+          :key="index"
+          :text="item.name"
+          plain
+          closable
+          :show="close2"
+          @close="handlerCloseSearchItem(item, index)"
+          @click="handlerSelctHistItem(item)"
+        />
       </view>
     </view>
     <!-- 热门搜索 -->
@@ -25,18 +33,26 @@
         <text class="hotCom">热门搜索</text>
       </view>
       <view class="label">
-        <u-tag v-for="(item, index) in favourite_list" :text="item.name" :key="index" class="label-item"
-          @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)" />
+        <u-tag
+          v-for="(item, index) in popular_search_list"
+          :text="item.name"
+          :key="index"
+          class="label-item"
+          @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"
+        />
       </view>
     </view>
     <u-divider text="猜你喜欢"></u-divider>
     <!-- 列表 -->
     <view class="popular-box">
       <view class="popular-item">
-        <view class="item-box layered" v-for="(item,index) of popular_search_list"
-          @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)">
+        <view
+          class="item-box layered"
+          v-for="(item, index) of favourite_list"
+          @click="$Router.push(`/pages/client/clientPackage/storeDetail?id=${item.id}`)"
+        >
           <view class="item-left">
-            <image class="img" :src='item.logo'></image>
+            <image class="img" :src="item.logo"></image>
           </view>
           <view class="item-right">
             <view class="item-title">{{ item.name }}</view>
@@ -48,200 +64,200 @@
         </view>
       </view>
     </view>
-
-
   </view>
 </template>
 
 <script>
-  import {
-    listHotMerchant,
-    likeMerchant
-  } from '@/api/client/home.js';
-  export default {
-    data() {
-      return {
-        count: 5,
-        value: 4,
-        close2: true,
-        radios: [{
+import { listHotMerchant, likeMerchant } from '@/api/client/home.js';
+import { mapGetters } from 'vuex';
+export default {
+  data() {
+    return {
+      count: 5,
+      value: 4,
+      close2: true,
+      radios: [
+        {
           checked: true,
-        }, ],
-        checkboxs: [{
+        },
+      ],
+      checkboxs: [
+        {
           checked: true,
-        }, ],
-        search_text: '', // 搜索text
-        search_list: [], // 搜索列表
+        },
+      ],
+      search_text: '', // 搜索text
+      search_list: [], // 搜索列表
 
-        popular_search_list: [], //热门搜索列表
-        favourite_list: [], // 猜你喜欢列表
+      popular_search_list: [], //热门搜索列表
+      favourite_list: [], // 猜你喜欢列表
+    };
+  },
+  computed: {
+    ...mapGetters(['location']),
+  },
+  onShow() {
+    if (uni.getStorageSync('searchItem')) {
+      this.search_list = uni.getStorageSync('searchItem');
+    }
+  },
+  mounted() {
+    this.handlerInitList();
+  },
+  methods: {
+    // 初始化热门搜索 猜你喜欢列表
+    handlerInitList() {
+      listHotMerchant({...this.location}).then(res => {
+        this.popular_search_list = res.data;
+      });
+
+      // 猜你喜欢列表
+      likeMerchant({ ...this.location }).then(res => {
+        this.favourite_list = res.data;
+      });
+    },
+    // 点击搜索按钮
+    handlerSearchBtn() {
+      let params = {
+        name: this.search_text,
       };
+      this.search_list.push(params);
+      uni.setStorageSync('searchItem', this.search_list);
+      uni.navigateTo({
+        url: `/pages/client/clientPackage/storeList?keyword=${this.search_text}`,
+      });
     },
-    onShow() {
-      if (uni.getStorageSync('searchItem')) {
-        this.search_list = uni.getStorageSync('searchItem');
-      }
+    // 删除搜索记录按钮
+    handlerCloseSearchItem(item, index) {
+      this.search_list.splice(index, 1);
+      uni.setStorageSync('searchItem', this.search_list);
     },
-    mounted() {
-      this.handlerInitList();
+    // 点击搜索历史按钮
+    handlerSelctHistItem(item) {
+      this.search_text = item.name;
+      uni.navigateTo({
+        url: `/pages/client/clientPackage/storeList?keyword=${this.search_text}`,
+      });
     },
-    methods: {
-      // 初始化热门搜索 猜你喜欢列表
-      handlerInitList() {
-        listHotMerchant().then(res => {
-          this.popular_search_list = res.data;
-        });
-
-        // 猜你喜欢列表
-        likeMerchant().then(res => {
-          this.favourite_list = res.data;
-        });
-      },
-      // 点击搜索按钮
-      handlerSearchBtn() {
-          let params = {
-            name: this.search_text,
-          };
-          this.search_list.push(params);
-          uni.setStorageSync('searchItem', this.search_list);
-		  uni.navigateTo({
-		  	url:`/pages/client/clientPackage/storeList?keyword=${this.search_text}`
-		  })
-      },
-      // 删除搜索记录按钮
-      handlerCloseSearchItem(item, index) {
-        this.search_list.splice(index, 1);
-        uni.setStorageSync('searchItem', this.search_list);
-      },
-      // 点击搜索历史按钮
-      handlerSelctHistItem(item) {
-        this.search_text = item.name
-		uni.navigateTo({
-			url:`/pages/client/clientPackage/storeList?keyword=${this.search_text}`
-		})
-      },
-      // 删除所有搜索记录按钮
-      handlerAllSearchRecord() {
-        uni.removeStorageSync('searchItem');
-        this.search_list = [];
-      },
+    // 删除所有搜索记录按钮
+    handlerAllSearchRecord() {
+      uni.removeStorageSync('searchItem');
+      this.search_list = [];
     },
-  };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  .search {
-    min-height: 100vh;
-    background-color: #fff;
+.search {
+  min-height: 100vh;
+  background-color: #fff;
+}
+
+/* 搜索样式 */
+.search-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 0 20rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  background-color: #fff;
+  margin-bottom: 10rpx;
+
+  .search-btn {
+    width: 160rpx;
+    height: 70rpx;
+    font-size: 28rpx;
+    line-height: 70rpx;
   }
+}
 
-  /* 搜索样式 */
-  .search-item {
+/* 搜索历史样式 */
+.history {
+  padding: 30rpx;
+  margin-bottom: 10rpx;
+
+  .history-top {
     display: flex;
     justify-content: space-between;
-    align-items: center;
-    padding: 0 20rpx;
-    height: 80rpx;
-    line-height: 80rpx;
-    background-color: #fff;
-    margin-bottom: 10rpx;
-
-    .search-btn {
-      width: 160rpx;
-      height: 70rpx;
-      font-size: 28rpx;
-      line-height: 70rpx;
-    }
-  }
-
-  /* 搜索历史样式 */
-  .history {
-    padding: 30rpx;
-    margin-bottom: 10rpx;
+    margin-bottom: 20rpx;
 
-    .history-top {
+    .history-right {
+      margin-top: 15rpx;
       display: flex;
-      justify-content: space-between;
-      margin-bottom: 20rpx;
-
-      .history-right {
-        margin-top: 15rpx;
-        display: flex;
-        font-size: 12px;
-      }
+      font-size: 12px;
+    }
 
-      hotCom {
-        font-size: 15px;
-        font-weight: bold;
-        color: #404045;
-      }
+    hotCom {
+      font-size: 15px;
+      font-weight: bold;
+      color: #404045;
     }
   }
+}
 
-  .label {
-    display: flex;
-    flex-wrap: wrap;
-  }
+.label {
+  display: flex;
+  flex-wrap: wrap;
+}
 
-  .label-item {
-    margin-bottom: 20rpx;
-  }
+.label-item {
+  margin-bottom: 20rpx;
+}
+
+.popular-box {
+  padding: 20rpx;
 
-  .popular-box {
+  .item-box {
+    display: flex;
+    margin-bottom: 20rpx;
+    border-radius: 20rpx;
     padding: 20rpx;
 
-    .item-box {
-      display: flex;
-      margin-bottom: 20rpx;
-      border-radius: 20rpx;
-      padding: 20rpx;
-
-      .item-left {
-        margin-right: 20rpx;
-
-        .img {
-          width: 160rpx;
-          height: 160rpx;
-          border-radius: 20rpx;
-        }
-      }
+    .item-left {
+      margin-right: 20rpx;
 
-      .item-right {
-        display: flex;
-        flex-direction: column;
-        justify-content: space-between;
+      .img {
+        width: 160rpx;
+        height: 160rpx;
+        border-radius: 20rpx;
+      }
+    }
 
-        .item-title {
-          color: #000;
-          font-weight: bold;
-          font-size: 32rpx;
-        }
+    .item-right {
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
 
-        .item-address {
-          color: #a1a1a1;
-        }
+      .item-title {
+        color: #000;
+        font-weight: bold;
+        font-size: 32rpx;
       }
-    }
 
-    .layered {
-      box-shadow:
-        0 1px 1px hsla(0deg, 0%, 0%, 0.075),
-        0 5px 10px hsla(0deg, 0%, 0%, 0.075),
-        0 4px 4px hsla(0deg, 0%, 0%, 0.075),
-        0 -1px 0px hsla(0deg, 0%, 0%, 0.075),
-        0 6px 8px hsla(0deg, 0%, 0%, 0.025)
+      .item-address {
+        color: #a1a1a1;
+      }
     }
   }
 
-  ::v-deep view.data-v-1481d46d,
-  scroll-view.data-v-1481d46d,
-  swiper-item.data-v-1481d46d {
-    margin: 0 4rpx;
+  .layered {
+    box-shadow: 0 1px 1px hsla(0deg, 0%, 0%, 0.075), 0 5px 10px hsla(0deg, 0%, 0%, 0.075),
+      0 4px 4px hsla(0deg, 0%, 0%, 0.075), 0 -1px 0px hsla(0deg, 0%, 0%, 0.075),
+      0 6px 8px hsla(0deg, 0%, 0%, 0.025);
   }
+}
 
-  ::v-deep view.data-v-39e33bf2,
-  scroll-view.data-v-39e33bf2,
-  swiper-item.data-v-39e33bf2 {
-    margin-bottom: 10rpx !important;
-  }
+::v-deep view.data-v-1481d46d,
+scroll-view.data-v-1481d46d,
+swiper-item.data-v-1481d46d {
+  margin: 0 4rpx;
+}
+
+::v-deep view.data-v-39e33bf2,
+scroll-view.data-v-39e33bf2,
+swiper-item.data-v-39e33bf2 {
+  margin-bottom: 10rpx !important;
+}
 </style>

+ 212 - 191
src/pages/client/clientPackage/serviceDetail/index.vue

@@ -13,7 +13,14 @@
       <!-- 标题和轮播图 -->
       <view>
         <view class="service-title">{{ goods.name }}</view>
-        <u-swiper :list="banners" previousMargin="30" nextMargin="30" circular bgColor="#ffffff" height="190" />
+        <u-swiper
+          :list="banners"
+          previousMargin="30"
+          nextMargin="30"
+          circular
+          bgColor="#ffffff"
+          height="190"
+        />
       </view>
 
       <!-- 价格 -->
@@ -69,14 +76,21 @@
     <!-- 服务详情 -->
     <view class="detail">
       <view>
-        <u-tabs :list="detailList" lineWidth="50" lineColor="#fdbf05" :activeStyle="{
+        <u-tabs
+          :list="detailList"
+          lineWidth="50"
+          lineColor="#fdbf05"
+          :activeStyle="{
             color: '#303133',
             fontWeight: 'bold',
             transform: 'scale(1.05)',
-          }" :inactiveStyle="{
+          }"
+          :inactiveStyle="{
             color: '#606266',
             transform: 'scale(1)',
-          }" itemStyle="padding-left: 15px; padding-right: 15px; height: 40px;" />
+          }"
+          itemStyle="padding-left: 15px; padding-right: 15px; height: 40px;"
+        />
       </view>
 
       <view>
@@ -91,12 +105,21 @@
 
     <!-- 底部 -->
     <view class="service-footer">
-      <view class="user-operate" v-for="(item, index) in userOperate" :key="index" @tap="collect(item, index)">
+      <view
+        class="user-operate"
+        v-for="(item, index) in userOperate"
+        :key="index"
+        @tap="collect(item, index)"
+      >
         <u-icon class="user-operate-icon" :name="item.icon" size="24" />
         <text class="user-operate-text">{{ item.name }}</text>
       </view>
       <view class="user-operate" @tap="handlerFavorite">
-        <u-icon class="user-operate-icon" :name="goods.favorites ? favorite_list.fill : favorite_list.icon" size="24" />
+        <u-icon
+          class="user-operate-icon"
+          :name="goods.favorites ? favorite_list.fill : favorite_list.icon"
+          size="24"
+        />
         <text class="user-operate-text">{{ favorite_list.name }}</text>
       </view>
       <view class="buyNow">
@@ -108,208 +131,206 @@
 </template>
 
 <script>
-  import {
-    getGoodsDetailApi,
-    addFavorite,
-    addShoppingCart,
-    addGoodsFavorite,
-    cancelFavorite,
-    // getGoodsConcentList,
-    accountToOrderGetComment
-  } from '@/api/client/business.js';
-  import {
-    accountTotIdGetConponList
-  } from "@/api/client/mine.js"
-  import GainCoupon from './GainCoupon.vue';
-  import EvaluateContent from './EvaluateContent.vue';
-  export default {
-    components: {
-      GainCoupon,
-      EvaluateContent
-    },
-    data() {
-      return {
-        userOperate: [{
-            name: '店铺',
-            icon: 'file-text',
-          }
-		  // ,
-    //       {
-    //         name: '立即咨询',
-    //         icon: 'chat',
-    //       },
-        ],
-        favorite_list: {
-          name: '收藏',
-          icon: 'heart',
-          fill: 'heart-fill',
+import {
+  getGoodsDetailApi,
+  addFavorite,
+  addShoppingCart,
+  addGoodsFavorite,
+  cancelFavorite,
+  // getGoodsConcentList,
+  accountToOrderGetComment,
+} from '@/api/client/business.js';
+import { accountTotIdGetConponList } from '@/api/client/mine.js';
+import GainCoupon from './GainCoupon.vue';
+import EvaluateContent from './EvaluateContent.vue';
+export default {
+  components: {
+    GainCoupon,
+    EvaluateContent,
+  },
+  data() {
+    return {
+      userOperate: [
+        {
+          name: '店铺',
+          icon: 'file-text',
         },
-        goods: [], //商品详情
-        banners: [],
-        coupons: [], //优惠券
-        comments: [], // 评论
-        id: '', //商品id
-        shoopId: null, //店铺id
-        show: false,
-        detailList: [{
-            id: '1',
-            name: '服务详情',
-          },
-          {
-            id: '2',
-            name: '购买须知',
-          },
-          {
-            id: '3',
-            name: '网友评价',
-          },
-        ],
-      };
-    },
-    onLoad(option) {
-      // 获取商品详情接口
-      this.shoopId = option.shopId
-      this.id = option.id;
-      this.handlerInitList(option.id);
-    },
-    methods: {
-      openPopup() {
-        this.show = true;
+        // ,
+        //       {
+        //         name: '立即咨询',
+        //         icon: 'chat',
+        //       },
+      ],
+      favorite_list: {
+        name: '收藏',
+        icon: 'heart',
+        fill: 'heart-fill',
       },
-      // closeCoupon(data) {
-      //   this.show = data;
-      //   this.handlerGetGoodsConcentList()
-      // },
-      handlerInitList(id) {
-        getGoodsDetailApi(id).then(res => {
-          this.goods = res.data.goods;
-          this.comments = res.data.comments;
-		  res.data.goods.banners.map(rs=>{
-			  this.banners.push(rs.url)
-		  })
-          this.handlerGetGoodsConcentList()
+      goods: [], //商品详情
+      banners: [],
+      coupons: [], //优惠券
+      comments: [], // 评论
+      id: '', //商品id
+      shoopId: null, //店铺id
+      show: false,
+      detailList: [
+        {
+          id: '1',
+          name: '服务详情',
+        },
+        {
+          id: '2',
+          name: '购买须知',
+        },
+        {
+          id: '3',
+          name: '网友评价',
+        },
+      ],
+    };
+  },
+  onLoad(option) {
+    // 获取商品详情接口
+    this.shoopId = option.shopId;
+    this.id = option.id;
+  },
+  methods: {
+    openPopup() {
+      this.show = true;
+    },
+    // closeCoupon(data) {
+    //   this.show = data;
+    //   this.handlerGetGoodsConcentList()
+    // },
+    handlerInitList(id) {
+      getGoodsDetailApi(id).then(res => {
+        this.goods = res.data.goods;
+        this.comments = res.data.comments;
+        res.data.goods.banners.map(rs => {
+          this.banners.push(rs.url);
         });
-      },
-      handlerGetGoodsConcentList() {
-        // 获取商品评价列表
-        let params = {
-          // merchantId:this.shoopId,
-          goodsId: this.goods.id
-        }
-        accountToOrderGetComment(params).then(res => {
-          console.log("@@@@res", res)
-        })
+        this.handlerGetGoodsConcentList();
+      });
+    },
+    handlerGetGoodsConcentList() {
+      // 获取商品评价列表
+      let params = {
+        // merchantId:this.shoopId,
+        goodsId: this.goods.id,
+      };
+      accountToOrderGetComment(params).then(res => {
+        console.log('@@@@res', res);
+      });
 
-        // 根据id获取优惠券列表
-        // accountTotIdGetConponList(this.shoopId,{ paging:'1,10' }).then(res=>{
-        //   this.coupons = res.data.records
-        // })
-      },
+      // 根据id获取优惠券列表
+      // accountTotIdGetConponList(this.shoopId,{ paging:'1,10' }).then(res=>{
+      //   this.coupons = res.data.records
+      // })
+    },
 
-      // 点击分享
-      handlerShare() {
-        uni.share({
-          provider: 'weixin',
-          scene: 'WXSceneSession',
-          type: 1,
-          summary: '我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!',
-          success: function(res) {},
-          fail: function(err) {},
-        });
-      },
+    // 点击分享
+    handlerShare() {
+      uni.share({
+        provider: 'weixin',
+        scene: 'WXSceneSession',
+        type: 1,
+        summary: '我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!',
+        success: function (res) {},
+        fail: function (err) {},
+      });
+    },
 
-      // 选择底部tab店铺收藏咨询
-      collect(item, index) {
-        switch (index) {
-          case 0:
-            uni.redirectTo({
-              url: `/pages/client/clientPackage/storeDetail?id=${this.shoopId}`,
+    // 选择底部tab店铺收藏咨询
+    collect(item, index) {
+      switch (index) {
+        case 0:
+          uni.redirectTo({
+            url: `/pages/client/clientPackage/storeDetail?id=${this.shoopId}`,
+          });
+          break;
+        case 1:
+          uni.showToast({
+            title: '暂无',
+            icon: 'none',
+          });
+          break;
+      }
+    },
+    // 点击收藏1
+    handlerFavorite() {
+      if (this.goods.favorites) {
+        cancelFavorite(this.id).then(res => {
+          if (res.code === 'OK') {
+            this.handlerInitList(this.id);
+            uni.showToast({
+              title: '取消收藏',
+              icon: 'none',
             });
-            break;
-          case 1:
+          } else {
             uni.showToast({
-              title: '暂无',
+              title: res.msg,
               icon: 'none',
             });
-            break;
-        }
-      },
-      // 点击收藏1
-      handlerFavorite() {
-        if (this.goods.favorites) {
-          cancelFavorite(this.id).then(res => {
-            if (res.code === 'OK') {
-              this.handlerInitList(this.id);
-              uni.showToast({
-                title: '取消收藏',
-                icon: 'none',
-              });
-            } else {
-              uni.showToast({
-                title: res.msg,
-                icon: 'none',
-              });
-              return;
-            }
-          });
-        } else {
-          addGoodsFavorite(this.id).then(res => {
-            if (res.code === 'OK') {
-              this.handlerInitList(this.id);
-              uni.showToast({
-                title: '收藏成功',
-                icon: 'none',
-              });
-            } else {
-              uni.showToast({
-                title: res.msg,
-                icon: 'none',
-              });
-              return;
-            }
-          });
-        }
-      },
-
-      // 点击购买按钮
-      // handlerImmediateBy() {
-      //   this.$store.commit('order/GET_ORDER_LIST', this.goods);
-      //   uni.navigateTo({
-      //     url: `/pages/client/clientPackage/uptickOrder?id=${this.id}`,
-      //   });
-      // },
-
-      // 加入购物车
-      handlerAddCart() {
-
-        let params = {
-          merchantId:this.shoopId,
-          goodsId: this.goods.id,
-          quantity: 1,
-          price: this.goods.specialPrice,
-          goodsName: this.goods.name,
-          goodsPic: this.goods.logo,
-		  originalPrice: this.goods.originalPrice,
-        }
-        addShoppingCart(params).then(res => {
+            return;
+          }
+        });
+      } else {
+        addGoodsFavorite(this.id).then(res => {
           if (res.code === 'OK') {
+            this.handlerInitList(this.id);
             uni.showToast({
-              title: '购物车添加成功',
-              icon: 'none'
-            })
+              title: '收藏成功',
+              icon: 'none',
+            });
           } else {
             uni.showToast({
-              title: res.message,
-              icon: 'none'
-            })
-            return
+              title: res.msg,
+              icon: 'none',
+            });
+            return;
           }
-        })
-      },
+        });
+      }
+    },
+
+    // 点击购买按钮
+    // handlerImmediateBy() {
+    //   this.$store.commit('order/GET_ORDER_LIST', this.goods);
+    //   uni.navigateTo({
+    //     url: `/pages/client/clientPackage/uptickOrder?id=${this.id}`,
+    //   });
+    // },
+
+    // 加入购物车
+    handlerAddCart() {
+      let params = {
+        merchantId: this.shoopId,
+        goodsId: this.goods.id,
+        quantity: 1,
+        price: this.goods.specialPrice,
+        goodsName: this.goods.name,
+        goodsPic: this.goods.logo,
+        originalPrice: this.goods.originalPrice,
+      };
+      addShoppingCart(params).then(res => {
+        if (res.code === 'OK') {
+          uni.showToast({
+            title: '购物车添加成功',
+            icon: 'none',
+          });
+        } else {
+          uni.showToast({
+            title: res.message,
+            icon: 'none',
+          });
+          return;
+        }
+      });
     },
-  };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  @import './index.scss';
+@import './index.scss';
 </style>

+ 2 - 2
src/pages/client/clientPackage/storeDetail.vue

@@ -24,6 +24,7 @@
         <view class="info-text">
           <view>营业时间:{{ merchant.opening }}</view>
           <view>电话号码:{{ merchant.mobile }}</view>
+          <view>营业状态:{{ merchant.businessStatus == "1" ? "休息中" : "营业中"  }}</view>
           <view>{{ merchant.address }}</view>
           <view class="distance">{{ (merchant.distance / 1000).toFixed(2) }}km</view>
         </view>
@@ -121,8 +122,7 @@
         <view class="draw-item">
           <view class="item-text">联系方式</view>
           <u--input placeholder="请输入联系方式" border="surround" type="number" v-model="addParams.mobile"></u--input>
-        </view>
-
+        </view>      
         <button class="draw-btn" @click="handlerDrawConfirmBtn">确定</button>
       </view>
     </u-popup>

+ 26 - 17
src/pages/client/clientUser/mine/appoint/appoint.vue

@@ -15,8 +15,8 @@
             mode="scaleToFill"
           ></image>
           <view class="appoint-text">
-            <view>业务:洗车……</view>
-            <view>时间:2023年06月18日</view>
+            <view>{{ item.goodsName }}</view>
+            <view>时间:{{ $u.timeFormat(item.appointTime) }}</view>
             <view>联系方式:{{ item.mobile }}</view>
           </view>
         </view>
@@ -40,7 +40,8 @@
 </template>
 
 <script>
-import { maintainReservations , cancelReservation } from '@/api/client/mine.js';
+import { maintainReservations } from '@/api/client/mine.js';
+import { cancelReservation } from '@/api/client/business.js';
 export default {
   data() {
     return {
@@ -62,27 +63,26 @@ export default {
     },
     // 点击取消商品
     handlerClearItem(item) {
-      cancelReservation(item.id).then(res=>{
-        if(res.code === 'OK'){
+      cancelReservation(item.id).then(res => {
+        if (res.code === 'OK') {
           uni.showToast({
-            title:'取消成功',
-            icon:'none'
-          })
-          this.handlerInitList()
-        }else{
+            title: '取消成功',
+            icon: 'none',
+          });
+          this.handlerInitList();
+        } else {
           uni.showToast({
-            title:res.msg,
-            icon:'none'
-          })
-          return
+            title: res.msg,
+            icon: 'none',
+          });
+          return;
         }
-      })
-
+      });
     },
     // 点击跳转到商品详情
     handlerSkipGoodsDetail(item, index) {
       uni.navigateTo({
-        url: `/pages/client/clientPackage/serviceDetail/index?id=${item.merchantId}`,
+        url: `/pages/client/clientPackage/serviceDetail/index?id=${item.simpleMerchantVO.id}`,
       });
     },
   },
@@ -93,9 +93,11 @@ export default {
 page {
   background-color: #efefef;
 }
+
 .container {
   padding: 20rpx;
 }
+
 .appoint {
   .history {
     font-size: 38rpx;
@@ -110,6 +112,7 @@ page {
   margin-bottom: 20rpx;
   box-sizing: border-box;
   border-radius: 20rpx;
+
   .appoint-title {
     font-size: 38rpx;
     font-weight: bold;
@@ -127,26 +130,32 @@ page {
 
   .appoint-flex {
     display: flex;
+
     .img {
       width: 210rpx;
       height: 160rpx;
       display: block;
       margin-right: 15rpx;
     }
+
     .appoint-text {
       font-size: 28rpx;
+
       > view {
         margin-bottom: 26rpx;
       }
     }
   }
+
   .appoint-goto {
     display: flex;
+
     .detail,
     .cancel {
       width: 45%;
       border-radius: 20rpx;
     }
+
     .detail {
       background-color: #6c9fc3;
       color: #fff;

+ 11 - 9
src/pages/client/clientUser/serviceCenterDetail.vue

@@ -4,33 +4,35 @@
       {{ init_list.title }}
     </view>
     <view class="content">
-      {{ init_list.content }}
+      <u-parse :content="init_list.content "></u-parse>
     </view>
   </view>
 </template>
 
 <script>
-  export default{
-    data(){
-      return{
-        init_list:[]
+  export default {
+    data() {
+      return {
+        init_list: []
       }
     },
-    onLoad(e){
+    onLoad(e) {
       this.init_list = e.itm
     }
   }
 </script>
 
 <style lang="scss" scoped>
-  .container{
+  .container {
     padding: 20rpx;
-    .title{
+
+    .title {
       font-size: 32rpx;
       font-weight: bold;
       text-align: center;
     }
-    .content{
+
+    .content {
       margin-top: 20rpx;
     }
   }