Переглянути джерело

修改店铺页面格式化
修改店铺页面数据请求
修复h5支付后跳转问题
修复购物车空状态
优化商品骨架屏

yongzonghuang 3 роки тому
батько
коміт
f826e8ff63
57 змінених файлів з 9109 додано та 5717 видалено
  1. 18 1
      App.vue
  2. 258 197
      component/share.vue
  3. 388 0
      components/AliHbPay/index.vue
  4. 320 0
      components/CashierList/index.vue
  5. 72 0
      components/Empty/index.vue
  6. 54 0
      components/NoMore/index.vue
  7. 200 0
      components/Skeleton/index.vue
  8. 2 2
      components/adWindow.vue
  9. 25 6
      components/basics/categoryShow.vue
  10. 376 140
      components/canvasShow/basics/product/app/index.vue
  11. 3 0
      components/canvasShow/basics/product/mixin.js
  12. 2 2
      components/canvasShow/config/api.js
  13. 2 1
      config/api.js
  14. 8 0
      main.js
  15. 3 2
      manifest.json
  16. 1 0
      package.json
  17. 131 0
      pages/tabbar/cart/cartUtils.js
  18. 93 0
      pages/tabbar/cart/components/DeleteModal.vue
  19. 613 1064
      pages/tabbar/cart/index.vue
  20. 3 3
      pages/tabbar/category/index.vue
  21. 92 67
      pages/tabbar/index/index.vue
  22. 137 0
      pages/tabbar/user/index.data.js
  23. 177 449
      pages/tabbar/user/index.vue
  24. 118 55
      pages_category_page1/coupon/list.vue
  25. 2 2
      pages_category_page1/discount/spikeList.vue
  26. 22 15
      pages_category_page1/goodsModule/addEvaluate.vue
  27. 108 126
      pages_category_page1/goodsModule/answerList.vue
  28. 548 0
      pages_category_page1/goodsModule/components/GoodActivityDetail.vue
  29. 587 0
      pages_category_page1/goodsModule/components/GoodEvaluateAndQuestion.vue
  30. 767 0
      pages_category_page1/goodsModule/components/GoodSkuSelect.vue
  31. 203 0
      pages_category_page1/goodsModule/components/QuestionsAndAnswersList.vue
  32. 13 7
      pages_category_page1/goodsModule/evaluate.vue
  33. 270 798
      pages_category_page1/goodsModule/goodsDetails.vue
  34. 445 278
      pages_category_page1/goodsModule/goodsList.vue
  35. 20 8
      pages_category_page1/goodsModule/inviteSpell.vue
  36. 3 2
      pages_category_page1/goodsModule/putQuestions.vue
  37. 269 207
      pages_category_page1/goodsModule/qADetail.vue
  38. 4 4
      pages_category_page1/goodsModule/userEvaluate.vue
  39. 128 79
      pages_category_page1/memberCenter/index.vue
  40. 258 85
      pages_category_page1/orderModule/afterSaleApplyRefund.vue
  41. 35 0
      pages_category_page1/orderModule/config/orderConfig.js
  42. 608 856
      pages_category_page1/orderModule/index.vue
  43. 453 272
      pages_category_page1/orderModule/orderConfirm.vue
  44. 103 445
      pages_category_page1/orderModule/orderDetails.vue
  45. 2 0
      pages_category_page1/search/index/index.vue
  46. 615 522
      pages_category_page1/store/index.vue
  47. 4 1
      pages_category_page2/userModule/address.vue
  48. 6 5
      pages_category_page2/userModule/bindPhone.vue
  49. 20 6
      pages_category_page2/userModule/footprintList.vue
  50. 5 4
      pages_category_page2/userModule/login.vue
  51. 5 4
      pages_category_page2/userModule/questionList.vue
  52. BIN
      static/images/share/pyq.png
  53. 59 0
      utils/jumpUtil.js
  54. 325 0
      utils/payUtil.js
  55. 2 2
      utils/secret.js
  56. 92 0
      utils/services.js
  57. 32 0
      utils/timeUtil.js

+ 18 - 1
App.vue

@@ -70,6 +70,23 @@ export default {
 </script>
 
 <style lang="scss">
+@keyframes loading {
+  0%{
+    background: #e7e7e7;
+  }
+  50%{
+    background: #f8f8f8;
+  }
+  100%{
+    background: #e7e7e7;
+  }
+}
+// 自定义骨架屏
+.ske-loading{
+  .child-loading{
+    animation: loading 2s linear 0s infinite alternate;
+  }
+}
 /*每个页面公共css */
 @import "uview-ui/index.scss";
 
@@ -740,7 +757,7 @@ uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
 }
 
 .u-drawer-content {
-  border-radius: 0 !important;
+  //border-radius: 0 !important;
 }
 </style>
 <style>

+ 258 - 197
component/share.vue

@@ -1,208 +1,269 @@
 <template>
-	<div>
-		<u-popup v-model="shareShow" :round="10" mode="bottom" @close="cancel(1)">
-			<view class="share">
-				<!-- <u-mask :show="true" class="flex-items-plus flex-row"> -->
-				<text class="h3">邀请好友</text>
-				<view class="share-list">
-					<view class="ul">
-						<!-- #ifndef MP -->
-						<!-- #ifndef APP -->
-						<view class="li" @click="share('weixin')">
-							<image class="icon" src="../static/images/share/weixin2x.png"></image>
-							<label class="label">微信</label>
-						</view>
-						<view class="li" @click="share('qq')">
-							<image class="icon" src="../static/images/share/qq2x.png"></image>
-							<label class="label">QQ</label>
-						</view>
-						<view class="li" @click="share('weibo')">
-							<image class="icon" src="../static/images/share/weibo2x.png"></image>
-							<label class="label">微博</label>
-						</view>
-						<!-- #endif -->
-						<view class="li" @click="share('lianjie')">
-							<image class="icon" src="../static/images/share/lianjie.png"></image>
-							<label class="label">链接</label>
-						</view>
-						<!-- #endif -->
-						<!-- #ifdef MP-WEIXIN -->
-						<button class="li" open-type="share">
-							<image class="icon" src="../static/images/forward.png"></image>
-							<label class="label">转发</label>
-						</button>
-						<!-- #endif -->
-					</view>
-				</view>
-				<view class="btn-close" @click="cancel(1)">取消</view>
-
-			</view>
-		</u-popup>
-		<u-popup v-model="wapShow" :round="10" mode="bottom" :border-radius="10" @close="cancel(2)">
-			<view class="share-h5">
-				<view class="text">
-					点击浏览器下方<view class="icon"><u-icon name="list" color="#fff" size="28"></u-icon></view>即可进行分享
-				</view>
-			</view>
-		</u-popup>
-	</div>
+  <div>
+    <u-popup v-model="shareShow" :round="10" mode="bottom" @close="cancel(1)">
+      <view class="share">
+        <!-- <u-mask :show="true" class="flex-items-plus flex-row"> -->
+        <text class="h3">邀请好友</text>
+        <view class="share-list">
+          <view class="ul">
+            <!-- #ifdef APP-PLUS -->
+            <view class="li" @click="share('weixin')">
+              <image class="icon" src="../static/images/share/weixin2x.png"></image>
+              <label class="label">微信</label>
+            </view>
+            <view class="li" @click="share('weixinpyq')">
+              <image class="icon" src="../static/images/share/pyq.png"></image>
+              <label class="label">朋友圈</label>
+            </view>
+            <!-- #endif -->
+            <!-- #ifdef MP-WEIXIN -->
+            <view class="li">
+              <button open-type="share" @share='onShareAppMessage' :data-obj="wxShareData" class="share-button">
+                <image class="icon" src="../static/images/share/forward.png"></image>
+                <label class="label">好友</label>
+              </button>
+            </view>
+            <view class="li" @click="share('weixinpyq')">
+              <image class="icon" src="../static/images/share/pyq.png"></image>
+              <label class="label">朋友圈</label>
+            </view>
+            <!-- #endif -->
+            <view class="li" @click="share('lianjie')">
+              <image class="icon" src="../static/images/share/lianjie.png"></image>
+              <label class="label">链接</label>
+            </view>
+          </view>
+        </view>
+        <view class="btn-close" @click="cancel(1)">取消</view>
+      </view>
+    </u-popup>
+    <u-popup v-model="wapShow" :round="10" mode="bottom" :border-radius="10" @close="cancel(2)">
+      <view class="share-h5">
+        <view class="text">
+          点击浏览器下方
+          <view class="icon">
+            <u-icon name="list" color="#fff" size="28"></u-icon>
+          </view>
+          即可进行分享
+        </view>
+      </view>
+    </u-popup>
+  </div>
 </template>
 
 <script>
-	import ClipboardJS from "clipboard"
-  import UImage from "../uview-ui/components/u-image/u-image";
-	const API = require('../config/api')
-	export default {
-    components: {UImage},
-    props:{
-			url:{
-				type:String,
-				dafault:''
-			}
-		},
-		name:"share",
-		data() {
-			return {
-				shareShow: false,
-				wapShow: false,
-				longUrl: ''
-			};
-		},
-		mounted () {
-    	this.longUrl = API.shareLink + '/#' + this.url
-			console.log(this.longUrl,this.url)
-		},
-		methods:{
-			cancel(key){
-				if(key === 1){
-					this.shareShow = false
-					this.$emit('shareCancel')
-				} else if(key === 2) {
-					this.wapShow = false
-				}
+import ClipboardJS from "clipboard"
+import UImage from "../uview-ui/components/u-image/u-image";
 
-			},
-			share(key){
-				var desc = `推荐好文:看到一篇不错的文章,值得一看,推荐给大家。`
-				console.log(this.url)
-				// #ifdef H5
-				this.shareShow = false
-				this.wapShow = true
-				// #endif
-				// #ifdef APP
-				switch (key) {
-					case 'weixin':
-						break
-					case 'qq':
+const API = require('../config/api')
+export default {
+  components: {UImage},
+  props: {
+    img: {
+      type: String,
+      default: ""
+    },
+    url: {
+      type: String,
+      dafault: ''
+    },
+    title: {
+      type: String,
+      dafault: ''
+    },
+    urlParms: {
+      type: String,
+      default: ''
+    },
+  },
+  onShareAppMessage(e) {
+    if(e.from=='button'){
+      // 点击button
+    }
+    if(e.from=='menu'){
+      // 点击右上角按钮
+    }
+    // 获取按钮传进来的参数 data 中的item值
+    let params = e.target.dataset.obj// 获取的为 data 中定义的item值
+    return {
+      path: `/pages_category_page1/goodsModule/inviteSpell?${params.url}`
+    }
+  },
+  name: "share",
+  data() {
+    return {
+      shareShow: false,
+      wapShow: false,
+      wxShareData: {
+        url: ''
+      }
+      // longUrl: ''
+    };
+  },
+  mounted() {
+    // this.longUrl = API.shareLink + '/#' + this.url
+    // console.log(this.longUrl, this.url
+    this.wxShareData = this.url
+  },
+  computed:{
+    longUrl(){
+      return API.shareLink + '/#' + this.url
+    }
+  },
+  methods: {
+    cancel(key) {
+      if (key === 1) {
+        this.shareShow = false
+        this.$emit('shareCancel')
+      } else if (key === 2) {
+        this.wapShow = false
+      }
 
-						break
-					case 'weibo':
+    },
+    wxShare(type) {
+      // #ifdef APP-PLUS
+      uni.share({
+        provider: "weixin",
+        type: 0,
+        title: this.title,
+        scene: type,//WXSceneSession会话 WXSceneTimeline朋友圈
+        imageUrl: this.img,
+        href: this.longUrl,
+        success: () => {
+        },
+        fail: (err) => {
+          console.log("err",err)
+        }
+      })
+      // #endif
+      // #ifdef MP-WEIXIN
+      uni.showToast({
+        title:"请点击右上角打开菜单进行朋友圈分享",
+        icon:"none"
+      })
+      // #endif
+    },
+    share(key) {
+      switch (key) {
+        case 'weixin':
+          this.wxShare("WXSceneSession")
+          break
+        case 'weixinpyq':
 
-						break
-					case 'lianjie':
-						uni.setClipboardData({
-							data: this.longUrl,
-							success: () => {
-								uni.showToast({
-									title: '复制成功'
-								})
-							}
-						})
-						break
-				}
-				// #endif
-			},
-			//重写分享方法
-			overShare: function () {
-				//监听路由切换
-				//间接实现全局设置分享内容
-				wx.onAppRoute(function (res) {
-					//获取加载的页面
-					let pages = getCurrentPages(),
-							//获取当前页面的对象
-							view = pages[pages.length - 1],
-							data;
-					if (view) {
-						data = view.data;
-						console.log('是否重写分享方法', data.isOverShare);
-						if (!data.isOverShare) {
-							data.isOverShare = true;
-							view.onShareAppMessage = function () {
-								//你的分享配置
-								return {
-									title: '标题',
-									path: '/pages/nearby/index'
-								};
-							}
-						}
-					}
-				})
-			}
-		}
-	}
-</script>
+          this.wxShare("WXSceneTimeline")
+          break
+        case 'qq':
+
+          break
+        case 'weibo':
 
+          break
+        case 'lianjie':
+          uni.setClipboardData({
+            data: this.title + this.longUrl,
+            success: () => {
+              uni.showToast({
+                title: '复制成功'
+              })
+            }
+          })
+          break
+      }
+
+    },
+    //重写分享方法
+    overShare: function () {
+      //监听路由切换
+      //间接实现全局设置分享内容
+      wx.onAppRoute(function (res) {
+        //获取加载的页面
+        let pages = getCurrentPages(),
+            //获取当前页面的对象
+            view = pages[pages.length - 1],
+            data;
+        if (view) {
+          data = view.data;
+          console.log('是否重写分享方法', data.isOverShare);
+          if (!data.isOverShare) {
+            data.isOverShare = true;
+            view.onShareAppMessage = function () {
+              //你的分享配置
+              return {
+                title: '标题',
+                path: '/pages/nearby/index'
+              };
+            }
+          }
+        }
+      })
+    }
+  }
+}
+</script>
 <style lang="scss">
-	.share{
-		background-color: #F8F8F8;
-		text-align: center;
-		.h3{
-			font-size: 30rpx;
-			color: #333333;
-			line-height: 42rpx;
-			padding: 30rpx 0;
-			border-bottom: 2px solid #F0F0F0;
-			display: block;
-		}
-		.share-list{
-			padding: 40rpx 0 54rpx;
-			.ul{
-				display: flex;
-				justify-content: space-around;
-				.li{
-					&::after {
-						border: none;
-					}
-					.icon{
-						display: block;
-						width: 92rpx;
-						height: 92rpx;
-					}
-					.label{
-						padding-top: 22rpx;
-						font-size: 24rpx;
-						line-height: 34rpx;
-						color: #333333;
-						display: block;
-					}
-				}
-			}
-		}
-		.btn-close{
-			background-color: #fff;
-			padding: 30rpx 0;
-			font-size: 26rpx;
-			color: #333;
-		}
-	}
+.share{
+  background-color: #F8F8F8;
+  text-align: center;
+  .h3{
+    font-size: 30rpx;
+    color: #333333;
+    line-height: 42rpx;
+    padding: 30rpx 0;
+    border-bottom: 2px solid #F0F0F0;
+    display: block;
+  }
+  .share-list{
+    padding: 40rpx 0 54rpx;
+    .ul{
+      display: flex;
+      justify-content: space-around;
+      .li{
+        &::after {
+          border: none;
+        }
+        .icon{
+          display: block;
+          width: 92rpx;
+          height: 92rpx;
+        }
+        .label{
+          padding-top: 22rpx;
+          font-size: 24rpx;
+          line-height: 34rpx;
+          color: #333333;
+          display: block;
+        }
+      }
+    }
+  }
+  .btn-close{
+    background-color: #fff;
+    padding: 30rpx 0;
+    font-size: 26rpx;
+    color: #333;
+  }
+}
 
-	.share-h5{
-		padding:0 20rpx;
-		display: flex;
-		justify-content: center;
-		.text{
-			line-height: 100rpx;
-			font-size: 30px;
-			.icon{
-				background-color: #333;
-				border-radius: 50%;
-				display: inline-block;
-				width: 40rpx;
-				height: 40rpx;
-				text-align: center;
-				line-height: 40rpx;
-				margin: 0 10rpx;
-			}
-		}
-	}
+.share-h5{
+  padding:0 20rpx;
+  display: flex;
+  justify-content: center;
+  .text{
+    line-height: 100rpx;
+    font-size: 30px;
+    .icon{
+      background-color: #333;
+      border-radius: 50%;
+      display: inline-block;
+      width: 40rpx;
+      height: 40rpx;
+      text-align: center;
+      line-height: 40rpx;
+      margin: 0 10rpx;
+    }
+  }
+}
+.share-button::after {
+  border: none;
+}
 </style>

+ 388 - 0
components/AliHbPay/index.vue

@@ -0,0 +1,388 @@
+<!--
+    * @FileDescription: 阿里花呗分期支付
+    * @Author: kahu
+    * @Date: 2022/11/21
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/21
+-->
+<template>
+  <view class="ali-hb-pay-content">
+    <u-popup
+        class="pay-type-popup"
+        v-model="showPopup"
+        mode="bottom"
+        border-radius="14"
+        close-icon-pos="top-right"
+        close-icon-size="20"
+    >
+      <view class="pay-type-item">
+        <radio-group
+            @change="payTypeChange"
+            v-model="flowerObj.paymentMode"
+        >
+          <view class="pay-type-radio">
+            <view class="pay-type-img">
+              <img
+                  class="pay-type-img-inner"
+                  src="https://ceres.zkthink.com/static/images/alipay.png"
+              />
+            </view>
+            <label class="pay-type-label">支付宝支付</label>
+            <radio
+                class="pay-type-radio-item"
+                style="transform:scale(0.7)"
+                :checked="flowerObj.paymentMode === '2'"
+                value="2"
+            />
+          </view>
+          <view class="pay-type-radio">
+            <view class="pay-type-img">
+              <img
+                  class="pay-type-img-inner"
+                  src="https://ceres.zkthink.com/static/images/huabei.png"
+              />
+            </view>
+            <label class="pay-type-label">花呗分期</label>
+            <radio
+                class="pay-type-radio-item"
+                style="transform:scale(0.7)"
+                :disabled="totalPrice < 0.03"
+                :checked="flowerObj.paymentMode === '3'"
+                value="3"
+            />
+          </view>
+        </radio-group>
+        <view class="huabei-detail" v-if="flowerObj.paymentMode==='3'">
+          <radio-group
+              @change="handleChangePeriods"
+              v-model="flowerObj.hbByStagesPeriods"
+          >
+            <view class="period-radio" v-for="stages in flowerObj.hbByStagesList">
+              <view class="period-amount">
+                <label class="period-each">¥ {{ stages.price }}x{{ stages.numberOfStages }}期</label>
+                <label class="period-each-charge">手续费¥{{ stages.serviceCharge}}/期</label>
+              </view>
+              <radio
+                  class="period-type-radio-item"
+                  style="transform:scale(0.7)"
+                  :disabled="stages.disabled"
+                  :checked="Number(flowerObj.hbByStagesPeriods) === stages.numberOfStages"
+                  :value="stages.numberOfStages+''"
+              />
+            </view>
+          </radio-group>
+        </view>
+      </view>
+      <view class="paytype-confirm">
+        <view
+            class="fenqi-total-amount"
+            v-if="totalPrice >= 0.03 && flowerObj.paymentMode === '3'"
+        >
+          <label class="fenqi-all">分期总额 ¥{{ totalPrice }}</label>
+          <label class="charge-fee-all">手续费 ¥{{ flowerObj.hbServiceChargeTotal }}</label>
+        </view>
+        <view
+            class="fenqi-total-amount"
+            v-if="flowerObj.paymentMode === '2'"
+        >
+          <label class="order-amount">订单总额 ¥{{ totalPrice }}</label>
+        </view>
+        <view class="fenqi-confirm">
+          <text
+              class="btn active"
+              @click="handleAliPayConfirm"
+          >确认
+          </text>
+        </view>
+      </view>
+    </u-popup>
+  </view>
+</template>
+
+<script>
+import NET from "../../utils/request";
+import API from "../../config/api";
+import { handleDoPay } from "../../utils/payUtil";
+
+export default {
+  name: "AliHbPay",
+  data() {
+    return {
+      // 花呗相关
+      flowerObj: {
+        paymentMode: '2',// 支付方式 1-微信支付 2-支付宝支付 3-花呗分期
+        hbChargeType: 1,// 花呗手续费支付方式 1-商户支付 2-用户支付 后端接口返回
+        hbByStagesPeriods: '-1', // 花呗分期期数 3 6 12
+        hbByStagesList: [
+          {
+            rate: 0,
+            price: 0,
+            numberOfStages: 3,
+            serviceCharge: 0,
+            disabled: false
+          },
+          {
+            rate: 0,
+            price: 0,
+            numberOfStages: 6,
+            serviceCharge: 0,
+            disabled: false
+          },
+          {
+            rate: 0,
+            price: 0,
+            numberOfStages: 12,
+            serviceCharge: 0,
+            disabled: false
+          }
+        ], // 花呗手续费比例列表 【{3期},{6期},{12期}】
+        hbServiceChargeTotal: 0, // 花呗支付总手续费
+      },
+    }
+  },
+  props:{
+    totalPrice:{
+      type:Number | String,
+      default:()=>0
+    },
+    show:{
+      type:Boolean,
+      default:false
+    },
+    alipayInfo:{
+      type:Object,
+      default:()=>({})
+    }
+  },
+  computed:{
+    showPopup:{
+      get(){
+        return this.show
+      },
+      set(value){
+        this.$emit('change',value)
+      }
+    }
+  },
+  model:{
+    prop:'show',
+    event:'change'
+  },
+  mounted(){
+    this.getTheFlowerConfig()
+  },
+  methods: {
+    /**
+     * 获取花呗分期配置
+     */
+    async getTheFlowerConfig() {
+      const {data} = await NET.request(API.GetHuabeiConfig, {}, 'GET')
+      const {flowerObj} = this
+      flowerObj.hbChargeType = data.huabeiChargeType
+      // 如果后端返回的是用户支付手续费,设置费率信息
+      if (data.huabeiChargeType === 2) {
+        data.huabeiFeeRateList.forEach((rate, index) => {
+          flowerObj.hbByStagesList[index].rate = rate
+        })
+      }
+    },
+
+    /**
+     * 处理花呗期数选择
+     * @param event
+     */
+    handleChangePeriods(event) {
+      this.flowerObj.hbByStagesPeriods = event
+      console.log(event)
+      this.handleHbStagesAndPrice()
+    },
+
+    /**
+     * 处理支付宝支付方式选择逻辑
+     * @param event
+     */
+    payTypeChange(event) {
+      const flowerObj = this.flowerObj
+      const paymentMode = flowerObj.paymentMode = event.target.value;
+      if (paymentMode === '2') {
+        // 支付宝支付,取消分期选择
+        flowerObj.hbByStagesPeriods = '-1'
+        // 3 6 12 全部禁止
+        flowerObj.hbByStagesList.map(item => {
+          item.disabled = true
+        })
+      } else {
+        // 分期支付,默认选三期
+        flowerObj.hbByStagesPeriods = '3'
+      }
+      this.handleHbStagesAndPrice()
+    },
+
+    /**
+     * 处理花呗价格和手续费显示
+     */
+    handleHbStagesAndPrice() {
+      const {flowerObj, totalPrice} = this
+      if (flowerObj.paymentMode !== '3') return
+      flowerObj.hbByStagesList.forEach(stages => {
+        // 根据价格填充每一期价格和手续费信息
+        stages.price = ((totalPrice * (1 + stages.rate / 100)) / stages.numberOfStages).toFixed(2) // 每一期价格
+        stages.serviceCharge = ((totalPrice * (stages.rate / 100)) / stages.numberOfStages).toFixed(2) // 每一期手续费
+        // 计算总手续费
+        if (stages.numberOfStages === Number(flowerObj.hbByStagesPeriods)) {
+          flowerObj.hbServiceChargeTotal = (totalPrice * (stages.rate / 100)).toFixed(2)
+        }
+        // 处理允许分期的区间,公式为总价格要大于分期数/100
+        if (this.totalPrice < stages.numberOfStages / 100) {
+          stages.disabled = true
+        }
+      })
+    },
+
+    /**
+     * 确认支付宝支付
+     * @return {Promise<void>}
+     */
+    async handleAliPayConfirm() {
+      const payInfo = Object.assign({}, this.alipayInfo, {
+        'paymentMode': this.flowerObj.paymentMode,
+        'huabeiPeriod': this.flowerObj.hbByStagesPeriods
+      });
+      await handleDoPay.call(this, payInfo)
+      this.$emit('confirm',{
+        'paymentMode': this.flowerObj.paymentMode,
+        'huabeiPeriod': this.flowerObj.hbByStagesPeriods
+      })
+    }
+  }
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.pay-type-item {
+  .pay-type-radio {
+    background-color: white;
+    border-bottom: 1upx solid #EDEDED;
+    margin-bottom: 20upx;
+    padding: 24upx 20upx 24upx 20upx;
+
+    .pay-type-img {
+      display: inline-block;
+
+      .pay-type-img-inner {
+        width: 50upx;
+        height: 50upx;
+        vertical-align: middle;
+      }
+    }
+
+    .pay-type-label {
+      vertical-align: middle;
+      margin-left: 30upx;
+    }
+
+    .pay-type-radio-item {
+      float: right;
+      margin-right: 20upx;
+      width: 50upx;
+      height: 50upx;
+    }
+  }
+
+  .huabei-detail {
+    margin-top: 20upx;
+
+    .fenqi-wenzi {
+      display: inline-block;
+      margin-left: 64upx;
+    }
+
+    .fenqi-amount {
+      display: block;
+      margin-left: 64upx;
+      margin-top: 14upx;
+      color: #BABBBC;
+    }
+
+    .fenqi-charge-fee {
+      float: right;
+      margin-right: 68upx;
+      color: #BABBBC;
+    }
+
+    .fenqi-modal {
+      width: 40upx;
+      height: 40upx;
+      margin-left: 20upx;
+      float: right;
+      position: relative;
+      top: -80upx;
+    }
+  }
+}
+
+.paytype-confirm {
+  height: 120upx;
+  padding: 0upx 108upx 0upx 32upx;
+
+  .fenqi-all {
+    display: inline-block;
+    width: 100%;
+  }
+
+  .fenqi-total-amount {
+    width: 65%;
+    float: left;
+  }
+
+  .fenqi-confirm {
+    float: right;
+    width: 160upx;
+    padding: 0upx 20upx;
+
+    .btn {
+      width: 216upx;
+      height: 80upx;
+      line-height: 80upx;
+      border-radius: 40upx;
+      font-size: 28upx;
+      text-align: center;
+      background: linear-gradient(90deg, rgba(255, 162, 0, 1), rgba(255, 121, 17, 1));
+      color: #fff;
+      display: inline-block;
+      margin-right: 66upx;
+    }
+  }
+}
+
+.period-radio {
+  margin: 30upx;
+  padding-right: 100upx;
+  width: 95%;
+  border-bottom: 1px solid #EFEFEF;
+
+  .period-amount {
+    display: inline-block;
+
+    .period-each-charge {
+      display: inline-block;
+      margin-top: 12upx;
+      margin-left: 6upx;
+      font-size: 26upx;
+      color: #b7b7b7;
+      margin-bottom: 13upx;
+    }
+  }
+
+  .period-each {
+    display: block;
+  }
+
+  .period-type-radio-item {
+    float: right;
+  }
+}
+</style>

+ 320 - 0
components/CashierList/index.vue

@@ -0,0 +1,320 @@
+<!--
+    * @FileDescription: 收银台
+    * @Author: kahu
+    * @Date: 2022/11/21
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/21
+-->
+<template>
+  <view class="cashier-list-content">
+    <u-radio-group
+        v-model="paymentMode"
+        placement="row"
+        iconPlacement="right"
+        @change="handleChangePaymentMode"
+    >
+      <view
+          class="cashier"
+          v-for="payment in paymentList"
+          :key="payment.id"
+      >
+        <view class="cashier-item" @click="handleChangePaymentMode(payment.paymentMode,payment.disabled)"
+        >
+          <view class="icon-text">
+            <image
+                class="pay-type-img-inner"
+                :src="payment.icon"
+                mode="widthFix"
+            />
+            {{ payment.label }}
+            <span v-if="paymentMode===3 && paymentMode === payment.paymentMode">(手续费:¥{{ flowerObj.hbServiceChargeTotal }})</span>
+          </view>
+          <view class="radio">
+            <u-radio
+                :disabled="payment.disabled"
+                activeColor="#c5aa7b"
+                :name="payment.paymentMode"
+            />
+          </view>
+        </view>
+        <!-- 花呗分期 -->
+        <view
+            class="ali-hb-content"
+            v-if="paymentMode===3 && paymentMode === payment.paymentMode"
+        >
+          <u-radio-group
+              v-model="flowerObj.hbByStagesPeriods"
+              placement="row"
+              iconPlacement="right"
+              @change="handleChangePeriods"
+          >
+            <view
+                class="cashier"
+                v-for="(flowerItem,index) in flowerObj.hbByStagesList"
+                :key="index"
+            >
+              <view class="cashier-item" @click="handleChangePeriods(flowerItem.numberOfStages,flowerItem.disabled)">
+                <view class="icon-text">
+                  {{ flowerItem.numberOfStages }}期(¥{{ flowerItem.price }}/期)
+                </view>
+                <view class="radio-context">
+                  手续费:¥{{ flowerItem.serviceCharge }}/期
+                  <u-radio
+                      class="radio"
+                      activeColor="#c5aa7b"
+                      :disabled="flowerItem.disabled"
+                      :name="flowerItem.numberOfStages"
+                  />
+                </view>
+              </view>
+            </view>
+          </u-radio-group>
+        </view>
+      </view>
+    </u-radio-group>
+  </view>
+</template>
+
+<script>
+import NET from "../../utils/request";
+import API from "../../config/api";
+
+export default {
+  name: "CashierList",
+  props: {
+    totalPrice: {
+      type: Number,
+      default: () => 200
+    }
+  },
+  data() {
+    return {
+      paymentMode: 1, // 支付方式 1微信 2支付宝 3花呗分期
+      paymentList: [
+        {
+          id: 1,
+          label: '微信支付',
+          paymentMode: 1,
+          icon: 'https://ceres.zkthink.com/static/images/wechat_pay.png',
+          disabled:false
+        },
+        {
+          id: 2,
+          label: '支付宝支付',
+          paymentMode: 2,
+          icon: 'https://ceres.zkthink.com/static/images/alipay.png',
+          disabled:false
+        },
+        {
+          id: 3,
+          label: '花呗分期',
+          paymentMode: 3,
+          icon: 'https://ceres.zkthink.com/static/images/huabei.png',
+          disabled:false
+        }
+      ],
+      // 花呗相关
+      flowerObj: {
+        hbChargeType: 1,// 花呗手续费支付方式 1-商户支付 2-用户支付 后端接口返回
+        hbByStagesPeriods: -1, // 花呗分期期数 3 6 12
+        hbByStagesList: [
+          {
+            rate: 0,
+            price: 0,
+            numberOfStages: 3,
+            serviceCharge: 0,
+            disabled: false
+          },
+          {
+            rate: 0,
+            price: 0,
+            numberOfStages: 6,
+            serviceCharge: 0,
+            disabled: false
+          },
+          {
+            rate: 0,
+            price: 0,
+            numberOfStages: 12,
+            serviceCharge: 0,
+            disabled: false
+          }
+        ], // 花呗手续费比例列表 【{3期},{6期},{12期}】
+        hbServiceChargeTotal: 0, // 花呗支付总手续费
+      },
+    }
+  },
+  mounted(){
+    this.getTheFlowerConfig()
+    this.handleSetDisable()
+    this.handleNoticeFather()
+  },
+  methods: {
+    /**
+     * 根据环境更改可选支付项
+     */
+    handleSetDisable(){
+      // #ifdef MP-WEIXIN
+      this.paymentList[0].disabled = false
+      this.paymentList[1].disabled = true
+      this.paymentList[2].disabled = true
+      this.paymentMode = 1
+      // #endif
+      // #ifdef MP-ALIPAY
+      this.paymentList[0].disabled = true
+      this.paymentList[1].disabled = false
+      this.paymentList[2].disabled = false
+      this.paymentMode = 2
+      // #endif
+      // #ifdef APP-PLUS || H5
+      this.paymentList[0].disabled = false
+      this.paymentList[1].disabled = true
+      this.paymentList[2].disabled = true
+      this.paymentMode = 1
+      // #endif
+    },
+    /**
+     * 支付方式改变事件
+     * @param paymentMode
+     * @param disabled
+     */
+    handleChangePaymentMode(paymentMode,disabled=false) {
+      if(disabled) return
+      this.paymentMode = paymentMode
+      const { flowerObj } = this
+      if ([1, 2].includes(paymentMode)) {
+        // 支付宝支付,取消分期选择
+        flowerObj.hbByStagesPeriods = -1
+        // 3 6 12 全部禁止
+        flowerObj.hbByStagesList.map(item => {
+          item.disabled = true
+        })
+      } else {
+        // 分期支付,默认选三期
+        flowerObj.hbByStagesPeriods = 3
+      }
+      this.handleHbStagesAndPrice()
+      this.handleNoticeFather()
+    },
+
+    /**
+     * 获取花呗分期配置
+     */
+    async getTheFlowerConfig() {
+      const {data} = await NET.request(API.GetHuabeiConfig, {}, 'GET')
+      const {flowerObj} = this
+      flowerObj.hbChargeType = data.huabeiChargeType
+      // 如果后端返回的是用户支付手续费,设置费率信息
+      if (data.huabeiChargeType === 1) {
+        data.huabeiFeeRateList.forEach((rate, index) => {
+          flowerObj.hbByStagesList[index].rate = rate
+        })
+      }
+      console.log(flowerObj)
+    },
+
+    /**
+     * 处理花呗期数选择
+     * @param periods 期数
+     * @param disabled
+     */
+    handleChangePeriods(periods,disable=false) {
+      if(disable)return
+      const { flowerObj } = this
+      flowerObj.hbByStagesPeriods = periods
+      this.handleHbStagesAndPrice()
+      this.handleNoticeFather()
+    },
+
+    /**
+     * 处理花呗价格和手续费显示
+     */
+    handleHbStagesAndPrice() {
+      const {flowerObj, totalPrice} = this
+      if (this.paymentMode !== 3) return
+      flowerObj.hbByStagesList.forEach(stages => {
+        // 根据价格填充每一期价格和手续费信息
+        stages.price = ((totalPrice * (1 + stages.rate / 100)) / stages.numberOfStages).toFixed(2) // 每一期价格
+        stages.serviceCharge = ((totalPrice * (stages.rate / 100)) / stages.numberOfStages).toFixed(2) // 每一期手续费
+        // 计算总手续费
+        if (stages.numberOfStages === Number(flowerObj.hbByStagesPeriods)) {
+          flowerObj.hbServiceChargeTotal = (totalPrice * (stages.rate / 100)).toFixed(2)
+        }
+        // 处理允许分期的区间,公式为总价格要大于分期数/100
+        this.totalPrice < stages.numberOfStages / 100?stages.disabled = true:stages.disabled = false
+      })
+    },
+
+    /**
+     * 通知父组件
+     */
+    handleNoticeFather(){
+      const { paymentMode,flowerObj } = this
+      const params = {
+        paymentMode,
+        huabeiPeriod:flowerObj.hbByStagesPeriods
+      }
+      this.$emit('change',params)
+    }
+  }
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.cashier-list-content {
+  width: 100%;
+  padding: 0rpx 15rpx;
+  box-sizing: border-box;
+  background: #fff;
+
+  .u-radio-group {
+    display: block !important;
+  }
+
+  .cashier {
+    border-bottom: 2rpx solid #d0d0d0;
+
+    &:last-child {
+      border-bottom: none
+    }
+
+    .cashier-item {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 20rpx 0;
+      box-sizing: border-box;
+      position: relative;
+
+      .icon-text {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+
+        image {
+          width: 50rpx;
+          height: 50rpx;
+          margin-right: 15rpx;
+        }
+      }
+      .radio-context{
+        display: flex;
+        align-items: center;
+        font-size: 14rpx;
+        .radio{
+          margin-left: 15rpx;
+        }
+      }
+    }
+
+    .ali-hb-content {
+      padding: 10rpx 20px;
+      box-sizing: border-box;
+      border-top: 2rpx solid #d0d0d0;
+    }
+  }
+}
+</style>

+ 72 - 0
components/Empty/index.vue

@@ -0,0 +1,72 @@
+<!--
+    * @FileDescription: index
+    * @Author: kahu
+    * @Date: 2022/11/11
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/11
+-->
+<template>
+  <view v-if="show" class="empty-content" :style="{
+        paddingTop: this.paddingTop+'rpx',
+        background: this.background
+      }">
+    <image :src="iconUrl" />
+    <p class="tips">
+      <slot>
+        暂无数据~
+      </slot>
+    </p>
+  </view>
+</template>
+
+<script>
+export default {
+  name: "empty",
+  data() {
+    return {}
+  },
+  props:{
+    show:{
+      type:Boolean,
+      default:false
+    },
+    paddingTop:{
+        type:Number,
+        default:()=>500
+    },
+    background:{
+      type:String,
+      default:()=>'#f8f8f8'
+    },
+    iconUrl:{
+      type:String,
+      default:()=>'https://ceres.zkthink.com/static/images/searchEmpty.png'
+    }
+  },
+  computed:{
+
+  },
+  methods: {}
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.empty-content{
+  display: flex;
+  justify-content: center;
+  flex-direction: column;
+  align-items: center;
+  image{
+    width:150rpx;
+    height: 150rpx;
+  }
+  .tips{
+    margin-top: 25rpx;
+    font-weight: bolder;
+  }
+}
+
+</style>

+ 54 - 0
components/NoMore/index.vue

@@ -0,0 +1,54 @@
+<!--
+    * @FileDescription: index.vue
+    * @Author: kahu
+    * @Date: 2022/11/21
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/21
+-->
+<template>
+  <view class="no-more-content" v-if="show">
+    <view class="line" />
+    <view class="text">
+      <slot>没有更多了</slot>
+    </view>
+    <view class="line" />
+  </view>
+</template>
+
+<script>
+export default {
+  name: "NoMore",
+  data() {
+    return {}
+  },
+  props:{
+    show:{
+      type:Boolean,
+      default:false
+    }
+  },
+  methods: {}
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.no-more-content{
+  margin-top: 35rpx;
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  .line{
+    width: 20vw;
+    height: 2rpx;
+    background-color: #808080;
+  }
+  .text{
+    color: #808080;
+    margin: 0 50rpx;
+  }
+}
+</style>

+ 200 - 0
components/Skeleton/index.vue

@@ -0,0 +1,200 @@
+<template>
+  <view v-if="loading" :style="{
+		width: windowWinth + 'px',
+		height: windowHeight + 'px',
+		backgroundColor: bgColor,
+		position: 'absolute',
+		left: left + 'px',
+		top: top + 'px',
+		zIndex: 100,
+		overflow: 'hidden'
+	}"
+        @touchmove.stop.prevent>
+    <view v-for="(item, index) in RectNodes" :key="$u.guid()" :class="[animation ? 'skeleton-fade' : '']" :style="{
+			width: item.width + 'px',
+			height: item.height + 'px',
+			backgroundColor: elColor,
+			position: 'absolute',
+			left: (item.left - left) + 'px',
+			top:(item.top - top)<0?(item.top - top +windowHeight-80)+ 'px':(item.top - top) + 'px'
+		}"></view>
+    <view v-for="(item, index) in circleNodes" :key="$u.guid()" :class="animation ? 'skeleton-fade' : ''" :style="{
+			width: item.width + 'px',
+			height: item.height + 'px',
+			backgroundColor: elColor,
+			borderRadius: item.width/2 + 'px',
+			position: 'absolute',
+			left: (item.left - left) + 'px',
+			top:(item.top - top)<0?(item.top - top +windowHeight-80)+ 'px':(item.top - top) + 'px'
+		}"></view>
+    <view v-for="(item, index) in filletNodes" :key="$u.guid()" :class="animation ? 'skeleton-fade' : ''" :style="{
+			width: item.width + 'px',
+			height: item.height + 'px',
+			backgroundColor: elColor,
+			borderRadius: borderRadius + 'rpx',
+			position: 'absolute',
+			left: (item.left - left) + 'px',
+			top:(item.top - top)<0?(item.top - top +windowHeight-80)+ 'px':(item.top - top) + 'px'
+		}">
+    </view>
+  </view>
+</template>
+
+<script>
+/**
+ * skeleton 骨架屏
+ * @description 骨架屏一般用于页面在请求远程数据尚未完成时,页面用灰色块预显示本来的页面结构,给用户更好的体验。
+ * @tutorial https://www.uviewui.com/components/skeleton.html
+ * @property {String} el-color 骨架块状元素的背景颜色(默认#e5e5e5)
+ * @property {String} bg-color 骨架组件背景颜色(默认#ffffff)
+ * @property {Boolean} animation 骨架块是否显示动画效果(默认false)
+ * @property {String Number} border-radius u-skeleton-fillet类名元素,对应的骨架块的圆角大小,单位rpx(默认10)
+ * @property {Boolean} loading 是否显示骨架组件,请求完成后,将此值设置为false(默认true)
+ * @example <u-skeleton :loading="true" :animation="true"></u-skeleton>
+ */
+export default {
+  name: "u-skeleton",
+  props: {
+    // 需要渲染的元素背景颜色,十六进制或者rgb等都可以
+    elColor: {
+      type: String,
+      default: '#e5e5e5'
+    },
+    // 整个骨架屏页面的背景颜色
+    bgColor: {
+      type: String,
+      default: '#ffffff'
+    },
+    // 是否显示加载动画
+    animation: {
+      type: Boolean,
+      default: false
+    },
+    // 圆角值,只对类名为u-skeleton-fillet的元素生效,为数值,不带单位
+    borderRadius: {
+      type: [String, Number],
+      default: "10"
+    },
+    // 是否显示骨架,true-显示,false-隐藏
+    loading: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      windowWinth: 750, // 骨架屏宽度
+      windowHeight: 1500, // 骨架屏高度
+      filletNodes: [], // 圆角元素
+      circleNodes: [], // 圆形元素
+      RectNodes: [], // 矩形元素
+      top: 0,
+      left: 0,
+    }
+  },
+  methods: {
+    // 查询各节点的信息
+    selecterQueryInfo() {
+      // 获取整个父组件容器的高度,当做骨架屏的高度
+      // 在微信小程序中,如果把骨架屏放入组件中使用的话,需要调in(this)上下文为父组件才有效
+      let query = '';
+      // #ifdef MP-WEIXIN
+      query = uni.createSelectorQuery().in(this.$parent);
+      // #endif
+      // #ifndef MP-WEIXIN
+      query = uni.createSelectorQuery()
+      // #endif
+      query.selectAll('.u-skeleton').boundingClientRect().exec((res) => {
+        this.windowHeight = res[0][0].height;
+        this.windowWinth = res[0][0].width;
+        res[0][0].bottom = res[0][0].height
+        this.top = res[0][0].bottom - res[0][0].height;
+        this.left = res[0][0].left;
+      });
+      // 矩形骨架元素
+      this.getRectEls();
+      // 圆形骨架元素
+      this.getCircleEls();
+      // 圆角骨架元素
+      this.getFilletEls();
+    },
+    // 矩形元素列表
+    getRectEls() {
+      let query = '';
+      // 在微信小程序中,如果把骨架屏放入组件中使用的话,需要调in(this)上下文为父组件才有效
+      // #ifdef MP-WEIXIN
+      query = uni.createSelectorQuery().in(this.$parent);
+      // #endif
+      // #ifndef MP-WEIXIN
+      query = uni.createSelectorQuery()
+      // #endif
+      query.selectAll('.u-skeleton-rect').boundingClientRect().exec((res) => {
+        this.RectNodes = res[0];
+      });
+    },
+    // 圆角元素列表
+    getFilletEls() {
+      let query = '';
+      // 在微信小程序中,如果把骨架屏放入组件中使用的话,需要调in(this)上下文为父组件才有效
+      // #ifdef MP-WEIXIN
+      query = uni.createSelectorQuery().in(this.$parent);
+      // #endif
+      // #ifndef MP-WEIXIN
+      query = uni.createSelectorQuery()
+      // #endif
+      query.selectAll('.u-skeleton-fillet').boundingClientRect().exec((res) => {
+        this.filletNodes = res[0];
+      });
+    },
+    // 圆形元素列表
+    getCircleEls() {
+      let query = '';
+      // 在微信小程序中,如果把骨架屏放入组件中使用的话,需要调in(this)上下文为父组件才有效
+      // #ifdef MP-WEIXIN
+      query = uni.createSelectorQuery().in(this.$parent);
+      // #endif
+      // #ifndef MP-WEIXIN
+      query = uni.createSelectorQuery()
+      // #endif
+      query.selectAll('.u-skeleton-circle').boundingClientRect().exec((res) => {
+        this.circleNodes = res[0];
+      });
+    }
+  },
+  // 组件被挂载
+  mounted() {
+    // 获取系统信息
+    let systemInfo = uni.getSystemInfoSync();
+    this.windowHeight = systemInfo.windowHeight;
+    this.windowWinth = systemInfo.windowWidth;
+    this.selecterQueryInfo();
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+.skeleton-fade {
+  width: 100%;
+  height: 100%;
+  background: rgb(194, 207, 214);
+  animation-duration: 1.5s;
+  animation-name: blink;
+  animation-timing-function: ease-in-out;
+  animation-iteration-count: infinite;
+}
+
+@keyframes blink {
+  0% {
+    opacity: 1;
+  }
+
+  50% {
+    opacity: 0.4;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+</style>

+ 2 - 2
components/adWindow.vue

@@ -303,10 +303,10 @@ export default {
 
   .coupon-list {
     width: 446rpx;
-    height: 450rpx;
+    height: 40%;
     overflow: auto;
     position: absolute;
-    top: 20rpx;
+    top: 40%;
     left: 50%;
     margin-left: -223rpx;
 

+ 25 - 6
components/basics/categoryShow.vue

@@ -1,13 +1,14 @@
 <template>
   <view class="goodRecommend">
+    <!-- 骨架屏 -->
     <view class="product-list">
       <view class="product-list-box" >
         <view class="product-list-item-warp" v-for="(item,index) in productList" :key="index">
-          <view class="product-list-item">
+          <view class="product-list-item" v-if="JSON.stringify(item)!=='{}'">
             <view class="product-list-img" @click="jumpProductDetail(item)">
               <img v-show="item.image" class="img" :src="item.image">
             </view>
-            <view class="product-list-info">
+            <view class="product-list-info u-skeleton-fillet">
               <view class="product-name">{{item.productName}}</view>
               <view class="flex">
                 <view class="shop-box" @click.stop="jumpStore(item)">
@@ -44,6 +45,16 @@
               </div>
             </view>
           </view>
+          <view class="product-list-item ske-loading" v-else>
+            <view class="product-list-img child-loading">
+              <img v-show="item.image" class="img" :src="item.image">
+            </view>
+            <view class="product-list-info">
+              <view class="product-name child-loading" style="border-radius: 5rpx; margin-top: 10rpx;width: 100%;padding: 20rpx 0"></view>
+              <view class="product-name child-loading" style="border-radius: 5rpx; margin-top: 10rpx;width: 100%;padding: 20rpx 0"></view>
+            </view>
+          </view>
+
         </view>
       </view>
     </view>
@@ -76,14 +87,16 @@ name: "categoryShow",
     }
   },
   mounted () {
+    this.productList = [{},{},{},{},{},{},{},{}]
     this.getData();
   },
   methods:{
     getData(){
-      uni.showLoading({
-        mask: true,
-        title:'加载中...'
-      })
+      console.log('加载了getData')
+      // uni.showLoading({
+      //   mask: true,
+      //   title:'加载中...'
+      // })
       if (this.total!=0&&this.productList.length>=this.total){
         console.log("加载完了")
         return
@@ -94,6 +107,7 @@ name: "categoryShow",
         pageSize:this.pageSize
       }, 'GET').then(res => {
         this.productList = [...this.productList,...res.data.list]
+        this.productList = this.productList.filter(item=>JSON.stringify(item)!=='{}')
         this.total = res.data.total
         uni.hideLoading()
         if (this.productList.length ===0) {
@@ -136,6 +150,8 @@ name: "categoryShow",
   .product-list {
     position: relative;
     padding: 0 13upx;
+    width: 100%;
+    //min-height: 60vh;
     &-box {
       display: flex;
       flex-wrap: wrap;
@@ -155,6 +171,8 @@ name: "categoryShow",
       padding: 0 7upx;
       box-sizing: content-box;
     }
+
+
     &-img {
       width: 348upx;
       height: 348upx;
@@ -254,4 +272,5 @@ name: "categoryShow",
     }
   }
 }
+
 </style>

+ 376 - 140
components/canvasShow/basics/product/app/index.vue

@@ -2,128 +2,334 @@
   <div class="hom-pro-list">
     <div class="title">
       <!-- #ifdef MP-WEIXIN -->
-      <img class="title-img" src="../../../static/images/product/img-title.png" alt="商品推荐" mode="widthFix"/>
+      <img
+          class="title-img"
+          src="../../../static/images/product/img-title.png"
+          alt="商品推荐"
+          mode="widthFix"
+      />
       <!-- #endif -->
       <!-- #ifdef H5 || APP-PLUS -->
-      <image class="title-img" src="../../../static/images/product/img-title.png" alt="商品推荐" mode="widthFix"/>
+      <image
+          class="title-img"
+          src="../../../static/images/product/img-title.png"
+          alt="商品推荐"
+          mode="widthFix"
+      />
       <!-- #endif -->
     </div>
-    <div v-if="componentContent.arrangeType == '横向滑动' && productData.length > 2" class="product-list">
-      <swiper ref="mySwiper" class="swiper product-list-box" :circular="true" :indicator-dots="false" :autoplay="true" :display-multiple-items="2" @change="swiperChange">
-        <swiper-item class="product-list-item-warp" v-for="(item,index) in productData" :key="index" @click="jumpProductDetail(item)">
-          <div class="product-list-item">
+    <div
+        v-if="componentContent.arrangeType == '横向滑动' && productData.length > 2"
+        class="product-list"
+    >
+      <swiper
+          ref="mySwiper"
+          class="swiper product-list-box"
+          :circular="true"
+          :indicator-dots="false"
+          :autoplay="true"
+          :display-multiple-items="2"
+          @change="swiperChange"
+      >
+        <swiper-item
+            class="product-list-item-warp"
+            v-for="(item,index) in productData"
+            :key="index"
+        >
+          <div class="product-list-item" v-if="JSON.stringify(item)!=='{}'" @click="jumpProductDetail(item)">
             <div class="product-list-img">
-              <img class="img pic-img default-img" :src="item.image">
+              <img
+                  class="img pic-img default-img"
+                  :src="item.image"
+              >
             </div>
             <div class="product-list-info">
-              <label class="product-name">{{item.productName}}</label>
+              <label class="product-name">{{ item.productName }}</label>
               <div class="flex">
-                <div class="shop-box" v-if="typeId == 1" @click.stop="jumpStore(item)">
-                  <label class="shop-name">{{item.shopName}}</label>
+                <div
+                    class="shop-box"
+                    v-if="typeId == 1"
+                    @click.stop="jumpStore(item)"
+                >
+                  <label class="shop-name">{{ item.shopName }}</label>
                   <div class="shop-logo">
                     <img :src="item.shopLogo">
                   </div>
                 </div>
-                <label class="buy-count">已售{{item.number?item.number: 0}}件</label>
+                <label class="buy-count">已售{{ item.number ? item.number : 0 }}件</label>
               </div>
               <div class="price-warp">
                 <!-- #ifdef MP-WEIXIN -->
-                <img class="iconImg" v-if="item.activityType == 1" src="../../../static/images/groupBuyIcon.png">
-                <img class="iconImg" v-if="item.activityType == 2" src="../../../static/images/spikeIcon.png">
-                <img class="iconImg" v-if="item.activityType == 4" src="../../../static/images/spikeIcon.png">
-                <img class="iconImg" v-if="item.activityType == 3" src="../../../static/images/discountListIcon.png">
-                <img class="iconImg" v-if="item.activityType == 5" src="../../../static/images/discountListIcon.png">
-                <img class="iconImg" v-if="item.activityType == 9" src="../../../static/images/memberCenterIcon.png">
-				<img class="iconImg" v-if="item.activityType == 8" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png">
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 1"
+                    src="../../../static/images/groupBuyIcon.png"
+                >
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 2"
+                    src="../../../static/images/spikeIcon.png"
+                >
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 4"
+                    src="../../../static/images/spikeIcon.png"
+                >
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 3"
+                    src="../../../static/images/discountListIcon.png"
+                >
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 5"
+                    src="../../../static/images/discountListIcon.png"
+                >
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 9"
+                    src="../../../static/images/memberCenterIcon.png"
+                >
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 8"
+                    src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"
+                >
                 <!-- #endif -->
                 <!-- #ifdef H5 || APP-PLUS -->
-                <image class="iconImg" v-if="item.activityType == 1" src="../../../static/images/groupBuyIcon.png">
-                <image class="iconImg" v-if="item.activityType == 2" src="../../../static/images/spikeIcon.png">
-                <image class="iconImg" v-if="item.activityType == 4" src="../../../static/images/spikeIcon.png">
-                <image class="iconImg" v-if="item.activityType == 3" src="../../../static/images/discountListIcon.png">
-                <image class="iconImg" v-if="item.activityType == 5" src="../../../static/images/discountListIcon.png">
-                <image class="iconImg" v-if="item.activityType == 9" src="../../../static/images/memberCenterIcon.png">
-				<image class="iconImg" v-if="item.activityType == 8" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png">
-                <!-- #endif -->
-                <div class="price">
-                  ¥ {{item.price}}
-                </div>
-                <div class="original-price">
-                  ¥ {{item.originalPrice}}
-                </div>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 1"
+                    src="../../../static/images/groupBuyIcon.png"
+                >
+                  <image
+                      class="iconImg"
+                      v-if="item.activityType == 2"
+                      src="../../../static/images/spikeIcon.png"
+                  >
+                    <image
+                        class="iconImg"
+                        v-if="item.activityType == 4"
+                        src="../../../static/images/spikeIcon.png"
+                    >
+                      <image
+                          class="iconImg"
+                          v-if="item.activityType == 3"
+                          src="../../../static/images/discountListIcon.png"
+                      >
+                        <image
+                            class="iconImg"
+                            v-if="item.activityType == 5"
+                            src="../../../static/images/discountListIcon.png"
+                        >
+                          <image
+                              class="iconImg"
+                              v-if="item.activityType == 9"
+                              src="../../../static/images/memberCenterIcon.png"
+                          >
+                            <image
+                                class="iconImg"
+                                v-if="item.activityType == 8"
+                                src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"
+                            >
+                              <!-- #endif -->
+                              <div class="price">
+                                ¥ {{ item.price }}
+                              </div>
+                              <div class="original-price">
+                                ¥ {{ item.originalPrice }}
+                              </div>
+              </div>
+            </div>
+          </div>
+          <!-- 自定义骨架屏 -->
+          <div
+              class="product-list-item ske-loading"
+              v-else
+          >
+            <div class="product-list-img child-loading">
+
+            </div>
+            <div class="product-list-info">
+              <label class="product-name child-loading"></label>
+              <div class="price-warp child-loading" style="padding: 5px 0">
+              </div>
+              <div class="price-warp child-loading" style="padding: 5px 0">
               </div>
             </div>
           </div>
         </swiper-item>
       </swiper>
-      <view class="swiper-dots" v-if="productData && productData.length > 2">
-        <text class="dot" :class="index - swiperCurrent <= 1 && index - swiperCurrent >=0  && 'dot-active'" v-for="(dot, index) in productData.length"
-              :key="index"></text>
+      <view
+          class="swiper-dots"
+          v-if="productData && productData.length > 2"
+      >
+        <text
+            class="dot"
+            :class="index - swiperCurrent <= 1 && index - swiperCurrent >=0  && 'dot-active'"
+            v-for="(dot, index) in productData.length"
+            :key="index"
+        ></text>
       </view>
     </div>
-    <div v-else class="product-list">
-      <div class="product-list-box" >
-        <div class="product-list-item-warp" v-for="(item,index) in productData" :key="index" @click="jumpProductDetail(item)">
-          <div class="product-list-item">
+    <div
+        v-else
+        class="product-list"
+    >
+      <div class="product-list-box">
+        <div
+            class="product-list-item-warp"
+            v-for="(item,index) in productData"
+            :key="index"
+        >
+          <div
+              @click="jumpProductDetail(item)"
+              class="product-list-item"
+              v-if="JSON.stringify(item)!=='{}'"
+          >
             <div class="product-list-img">
-              <img class="img pic-img default-img" :src="item.image">
+              <img
+                  class="img pic-img default-img"
+                  :src="item.image"
+              >
             </div>
             <div class="product-list-info">
-              <label class="product-name">{{item.productName}}</label>
+              <label class="product-name">{{ item.productName }}</label>
               <div class="flex">
-                <div class="shop-box" v-if="typeId == 1" @click.stop="jumpStore(item)">
-                  <label class="shop-name">{{item.shopName}}</label>
+                <div
+                    class="shop-box"
+                    v-if="typeId == 1"
+                    @click.stop="jumpStore(item)"
+                >
+                  <label class="shop-name">{{ item.shopName }}</label>
                   <div class="shop-logo">
                     <img :src="item.shopLogo">
                   </div>
                 </div>
-                <label class="buy-count">已售{{item.number?item.number: 0}}件</label>
+                <label class="buy-count">已售{{ item.number ? item.number : 0 }}件</label>
               </div>
               <div class="price-warp">
                 <!-- #ifdef MP-WEIXIN -->
-                <img class="iconImg" v-if="item.activityType == 1" src="../../../static/images/groupBuyIcon.png">
-                <img class="iconImg" v-if="item.activityType == 2" src="../../../static/images/spikeIcon.png">
-                <img class="iconImg" v-if="item.activityType == 4" src="../../../static/images/spikeIcon.png">
-                <img class="iconImg" v-if="item.activityType == 3" src="../../../static/images/discountListIcon.png">
-                <img class="iconImg" v-if="item.activityType == 5" src="../../../static/images/discountListIcon.png">
-                <img class="iconImg" v-if="item.activityType == 9" src="../../../static/images/memberCenterIcon.png">
-				<img class="iconImg" v-if="item.activityType == 8" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png">
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 1"
+                    src="../../../static/images/groupBuyIcon.png"
+                />
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 2"
+                    src="../../../static/images/spikeIcon.png"
+                />
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 4"
+                    src="../../../static/images/spikeIcon.png"
+                />
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 3"
+                    src="../../../static/images/discountListIcon.png"
+                />
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 5"
+                    src="../../../static/images/discountListIcon.png"
+                />
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 9"
+                    src="../../../static/images/memberCenterIcon.png"
+                />
+                <img
+                    class="iconImg"
+                    v-if="item.activityType == 8"
+                    src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"
+                />
                 <!-- #endif -->
                 <!-- #ifdef H5 || APP-PLUS -->
-                <image class="iconImg" v-if="item.activityType == 1" src="../../../static/images/groupBuyIcon.png">
-                <image class="iconImg" v-if="item.activityType == 2" src="../../../static/images/spikeIcon.png">
-                <image class="iconImg" v-if="item.activityType == 4" src="../../../static/images/spikeIcon.png">
-                <image class="iconImg" v-if="item.activityType == 3" src="../../../static/images/discountListIcon.png">
-                <image class="iconImg" v-if="item.activityType == 5" src="../../../static/images/discountListIcon.png">
-                <image class="iconImg" v-if="item.activityType == 9" src="../../../static/images/memberCenterIcon.png">
-				<image class="iconImg" v-if="item.activityType == 8" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png">
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 1"
+                    src="../../../static/images/groupBuyIcon.png"
+                />
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 2"
+                    src="../../../static/images/spikeIcon.png"
+                />
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 4"
+                    src="../../../static/images/spikeIcon.png"
+                />
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 3"
+                    src="../../../static/images/discountListIcon.png"
+                />
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 5"
+                    src="../../../static/images/discountListIcon.png"
+                />
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 9"
+                    src="../../../static/images/memberCenterIcon.png"
+                />
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 8"
+                    src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"
+                />
                 <!-- #endif -->
                 <div class="price">
-                  ¥ {{item.price}}
+                  ¥ {{ item.price }}
                 </div>
                 <div class="original-price">
-                  ¥ {{item.originalPrice}}
+                  ¥ {{ item.originalPrice }}
                 </div>
               </div>
             </div>
           </div>
+          <!-- 自定义骨架屏 -->
+          <div
+              class="product-list-item ske-loading"
+              v-else
+          >
+            <div class="product-list-img child-loading">
+
+            </div>
+            <div class="product-list-info">
+              <label class="product-name child-loading"></label>
+              <div class="price-warp child-loading" style="padding: 5px 0">
+              </div>
+              <div class="price-warp child-loading" style="padding: 5px 0">
+              </div>
+            </div>
+          </div>
         </div>
       </div>
     </div>
-    <button v-show="componentContent.showMore" class="btn-more" @click="jumpProList(componentContent.productData)">查看全部 <span class="icon iconfont icon-arrow-right"></span></button>
+    <button
+        v-show="componentContent.showMore"
+        class="btn-more"
+        @click="jumpProList(componentContent.productData)"
+    >查看全部 <span class="icon iconfont icon-arrow-right"></span></button>
   </div>
 </template>
 
 <script>
-import {commonMixin} from '../mixin'
+import { commonMixin } from '../mixin'
+
 export default {
   mixins: [commonMixin],
-  data () {
+  data() {
     return {
       swiperCurrent: 0,
     }
   },
-  methods:{
+  methods: {
     swiperChange(e) {
       this.swiperCurrent = e.detail.current;
     }
@@ -131,143 +337,171 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
-.hom-pro-list{
-  padding: 20upx 13upx;
-  .title{
+<style
+    lang="scss"
+    scoped
+>
+.hom-pro-list {
+  padding: 20rpx 13rpx;
+
+  .title {
     text-align: center;
-    margin-bottom: 20upx;
-    .title-img{
-      width: 211upx;
+    margin-bottom: 20rpx;
+
+    .title-img {
+      width: 211rpx;
     }
   }
+
   /**多行多列**/
   .product-list {
     position: relative;
+
     &-box {
       display: flex;
       flex-wrap: wrap;
       flex-direction: row;
-      &.swiper{
-        height: 620upx;
+
+      &.swiper {
+        height: 620rpx;
       }
     }
-    &.product-swiper .product-list-box{
+
+    &.product-swiper .product-list-box {
       padding-left: 0;
     }
-    &-item-warp{
-      margin: 0 0 20upx 0;
+
+    &-item-warp {
+      margin: 0 0 20rpx 0;
     }
+
     &-item {
-      width: 348upx;
-      padding: 0 7upx;
+      width: 348rpx;
+      padding: 0 7rpx;
       box-sizing: content-box;
     }
+
     &-img {
-      width: 348upx;
-      height: 348upx;
+      width: 348rpx;
+      height: 348rpx;
       background-color: #f5f5f5;
-      border-radius: 10upx 10upx 0 0;
+      border-radius: 10rpx 10rpx 0 0;
+
       .img {
         width: 100%;
         height: 100%;
         object-fit: contain;
       }
     }
+
     &-info {
       background-color: #FFFFFF;
       //box-shadow: 0px 0px 15px 0px rgba(52, 52, 52, 0.15);
-      border-radius: 0 0 10upx 10upx;
-      padding: 20upx;
-      label{
+      border-radius: 0 0 10rpx 10rpx;
+      padding: 20rpx;
+
+      label {
         font-weight: normal;
       }
-      .product-name{
-        font-size: 28upx;
+
+      .product-name {
+        font-size: 28rpx;
         color: #333;
         display: block;
         overflow: hidden;
-        text-overflow:ellipsis;
+        text-overflow: ellipsis;
         white-space: nowrap;
-        margin-bottom: 18upx;
-        line-height: 40upx;
+        margin-bottom: 18rpx;
+        line-height: 40rpx;
       }
-      .flex{
+
+      .flex {
         display: flex;
         align-items: center;
       }
-      .shop-box{
+
+      .shop-box {
         background-color: #333333;
-        border-radius: 0upx 20upx 20upx 0upx;
-        line-height: 40upx;
+        border-radius: 0rpx 20rpx 20rpx 0rpx;
+        line-height: 40rpx;
         display: flex;
         align-items: center;
-        height: 40upx;
-        margin-right: 10upx;
-        .shop-name{
-          font-size: 20upx;
+        height: 40rpx;
+        margin-right: 10rpx;
+
+        .shop-name {
+          font-size: 20rpx;
           color: #FFEBC4;
-          padding: 0 8upx 0 12upx;
+          padding: 0 8rpx 0 12rpx;
         }
-        .shop-logo{
-          border: 2upx solid #707070;
+
+        .shop-logo {
+          border: 2rpx solid #707070;
           border-radius: 50%;
           overflow: hidden;
           float: right;
-          img{
-            width: 34upx;
-            height: 34upx;
+
+          img {
+            width: 34rpx;
+            height: 34rpx;
             display: block;
           }
         }
       }
-      .buy-count{
+
+      .buy-count {
         color: #C5AA7B;
-        font-size: 20upx;
-        border: 2upx solid #E4E5E6;
-        line-height: 40upx;
-        padding: 0 5upx;
+        font-size: 20rpx;
+        border: 2rpx solid #E4E5E6;
+        line-height: 40rpx;
+        padding: 0 5rpx;
       }
-      .price-warp{
+
+      .price-warp {
         display: flex;
         align-items: baseline;
-        line-height: 56upx;
+        line-height: 56rpx;
+
         .iconImg {
           width: 58rpx;
           height: 36rpx;
           margin-right: 10rpx;
         }
-        .price{
+
+        .price {
           color: #C83732;
-          font-size: 40upx;
-          margin-right: 20upx;
+          font-size: 40rpx;
+          margin-right: 20rpx;
         }
-        .original-price{
-          font-size: 24upx;
+
+        .original-price {
+          font-size: 24rpx;
           color: #ccc;
           text-decoration: line-through;
         }
       }
     }
+
     //::v-deep .swiper-pagination-bullet{
     //  display: none;
     //}
   }
 }
+
 //::v-deep .uni-swiper-dots{
 //  display: flex;
 //  justify-content: center;
-//  padding: 10upx 0;
+//  padding: 10rpx 0;
 //  .uni-swiper-dot{
-//    width: 10upx;
-//    height: 10upx;
+//    width: 10rpx;
+//    height: 10rpx;
 //    background: #333333;
 //    opacity: 0.3;
-//    border-radius: 5upx;
-//    margin: 0 5upx;
+//    border-radius: 5rpx;
+//    margin: 0 5rpx;
 //    &-active{
-//      width: 20upx;
-//      height: 10upx;
+//      width: 20rpx;
+//      height: 10rpx;
 //      opacity: 1;
 //    }
 //  }
@@ -279,48 +513,50 @@ export default {
   transform: translateX(-50%);
   bottom: 15rpx;
   z-index: 66;
+
   .dot {
-    width: 10upx;
-    height: 10upx;
+    width: 10rpx;
+    height: 10rpx;
     background: #333333;
     opacity: 0.3;
-    border-radius: 5upx;
-    margin: 0 10upx;
+    border-radius: 5rpx;
+    margin: 0 10rpx;
   }
 
   .dot-active {
-    width: 20upx;
+    width: 20rpx;
     opacity: 1;
   }
 }
+
 //.pagination{
 //  display: flex;
 //  justify-content: center;
-//  padding: 20upx 0;
+//  padding: 20rpx 0;
 //  ::v-deep .swiper-pagination-bullet{
-//    width: 10upx;
-//    height: 10upx;
+//    width: 10rpx;
+//    height: 10rpx;
 //    background: #333333;
 //    opacity: 0.3;
-//    border-radius: 5upx;
-//    margin: 0 5upx;
+//    border-radius: 5rpx;
+//    margin: 0 5rpx;
 //  }
 //  ::v-deep .swiper-pagination-bullet-active{
-//    width: 20upx;
-//    height: 10upx;
+//    width: 20rpx;
+//    height: 10rpx;
 //    opacity: 1;
 //  }
 //}
 
 .btn-more {
-  width: 170upx;
-  height: 54upx;
-  line-height: 54upx;
-  border: 2upx solid #C5AA7B;
+  width: 170rpx;
+  height: 54rpx;
+  line-height: 54rpx;
+  border: 2rpx solid #C5AA7B;
   color: #C5AA7B;
-  font-size: 24upx;
+  font-size: 24rpx;
   background-color: transparent;
-  margin: 20upx auto 0;
+  margin: 20rpx auto 0;
   display: flex;
   align-items: center;
 }

+ 3 - 0
components/canvasShow/basics/product/mixin.js

@@ -56,6 +56,7 @@ export const commonMixin = {
   methods: {
     getData(isFirst) {
       const _ = this
+      this.productData = [{},{},{},{},{},{},{},{}]
       if (_.componentContent.productData.sourceType === '1') {
         if(_.componentContent.productData.productIdList && _.componentContent.productData.productIdList.length>0){
           _.sendReq({
@@ -63,6 +64,7 @@ export const commonMixin = {
             method: 'GET'
           }, (proRes) => {
             _.productData = proRes.data.list
+            _.productData = _.productData.filter(item=>JSON.stringify(item) !== '{}')
             if(isFirst){
               _.componentContent.productData.imgTextData = _.productData
             }
@@ -77,6 +79,7 @@ export const commonMixin = {
             method: 'GET'
           }, (proRes) => {
             _.productData = proRes.data.list
+            _.productData = _.productData.filter(item=>JSON.stringify(item) !== '{}')
             if(isFirst){
               _.componentContent.productData.imgTextData = _.productData
             }

+ 2 - 2
components/canvasShow/config/api.js

@@ -2,8 +2,8 @@
 
 // 获取当前环境变量 true => 生产环境 false => 开发环境
 // const BASEURL = process.env.VUE_APP_DOMAIN_PREFIX
-// const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://ceres.zkthink.com/api' : 'https://ceresdev.zkthink.com/api'
-const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://ceresdev.zkthink.com/api' : 'https://ceresdev.zkthink.com/api'
+const BASEURL = (process.env.NODE_ENV === 'production') ? 'https://ceres.zkthink.com/api' : 'https://ceres.zkthink.com/api'
+// const BASEURL = (process.env.NODE_ENV === 'production') ? 'http://127.0.0.1:9007' : 'http://127.0.0.1:9007'
 
 
 export const api = {

+ 2 - 1
config/api.js

@@ -1,5 +1,5 @@
 // const DOMAIN_PREFIX = 'http://127.0.0.1:9007'
-const DOMAIN_PREFIX = 'https://ceresdev.zkthink.com/api'
+const DOMAIN_PREFIX = 'https://ceres.zkthink.com/api'
 
 // https://ceresdev.zkthink.com
 // #ifndef H5
@@ -152,6 +152,7 @@ module.exports = {
 	HasApply: WX_API_BASE + '/distributor/check', //  验证当前客户是否为分销员
 	BindSalesCustomer: WX_API_BASE + '/distributor/bind', //  绑定关系
 	getSharePic: WX_API_BASE + '/product/getSharePic', //  分享
+	getShareProductParam: WX_API_BASE + '/product/getShareProductParam', //  查询分享所需的参数
 	shopGetSharePic: WX_API_BASE + '/shop/getSharePic', //  推广店铺
 
 	//售后

+ 8 - 0
main.js

@@ -6,8 +6,16 @@ Vue.use(uView);
 Vue.config.productionTip = false
 
 import store from './store'
+import _ from 'lodash'
+
+import {jump,jumpToTabbar,goBack,getJumpParam} from './utils/jumpUtil'
 
 Vue.prototype.$store = store
+Vue.prototype.$lodash = _
+Vue.prototype.$jump = jump
+Vue.prototype.$jumpToTabbar = jumpToTabbar
+Vue.prototype.$goBack = goBack
+Vue.prototype.$getJumpParam = getJumpParam
 App.mpType = 'app'
 
 const app = new Vue({

+ 3 - 2
manifest.json

@@ -23,7 +23,7 @@
             "Share" : {}
         },
         "compatible" : {
-            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持  
+            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
         },
         /* 模块配置 */
         "distribute" : {
@@ -119,11 +119,12 @@
     /* 快应用特有相关 */
     "mp-weixin" : {
         "appid" : "wxf0713a10bbae8732",
+        "requiredPrivateInfos" : [ "chooseLocation", "getLocation", "chooseAddress" ],
         "setting" : {
             "urlCheck" : false,
             "es6" : false,
             "postcss" : true,
-            "minified" : false
+            "minified" : true
         },
         // "usingComponents" : true,
         "component" : true,

+ 1 - 0
package.json

@@ -5,6 +5,7 @@
     "crypto-js": "^4.1.1",
     "image-tools": "^1.4.0",
     "jweixin-module": "^1.6.0",
+    "lodash": "^4.17.21",
     "mini-html-parser2": "^0.3.0",
     "swiper": "^5.4.5",
     "vue-awesome-swiper": "^4.1.1"

+ 131 - 0
pages/tabbar/cart/cartUtils.js

@@ -0,0 +1,131 @@
+const NET = require('../../../utils/request')
+const API = require('../../../config/api')
+import {showLoading,hideLoading} from "@/components/GlobalLoading";
+
+/**
+ * 根据选中的购物车数据获取价格和过滤后的用于结算购物车的post数据
+ * @param dataList
+ * @return {Promise<{shopList: *[], money: number}>}
+ */
+export async function getPriceBySelect(dataList) {
+    showLoading()
+    let addCart = []
+    // 遍历店铺,获取选中的sku组装数据
+    for (let i = 0; i < dataList.length; i++) {
+        let shopObj = {}
+        const theCurrentShop = dataList[i]
+        shopObj["shopId"] = theCurrentShop.shopId
+        shopObj["skus"] = []
+        for (let j = 0; j < theCurrentShop.skus.length; j++) {
+            const theCurrentSku = dataList[i].skus[j]
+            // 如果是选中的才往当前店铺塞
+            if (theCurrentSku.selected) {
+                let skusObj = {}
+                skusObj["ifLogistics"] = theCurrentSku.ifLogistics
+                skusObj["number"] = theCurrentSku.number
+                skusObj["selected"] = theCurrentSku.selected
+                skusObj["skuId"] = theCurrentSku.skuId
+                shopObj.skus.push(skusObj)
+            }
+        }
+        // 过滤掉sku为空的店铺
+        if (shopObj.skus.length > 0) {
+            addCart.push(shopObj)
+        }
+    }
+    try {
+        const postData = {
+            type: 2,
+            shops: addCart
+        }
+        const res = await NET.request(API.Settlement, postData, 'POST')
+        const money = res.data.shops.reduce((previousValue, currentValue) => (previousValue + currentValue.total), 0)
+        return {
+            money: money.toFixed(2),
+            shopList: addCart
+        }
+    } finally {
+        hideLoading()
+    }
+}
+
+/**
+ * 根据选中的购物车数据获取购物车数量
+ * @param dataList
+ * @return {Promise<{allNumber: number, isAllCheck: boolean}>}
+ */
+export async function getCartNumberBySelect(dataList) {
+    let allNumber = 0, checkNumber = 0, isAllCheck = true
+    // 遍历店铺
+    for (let i = 0; i < dataList.length; i++) {
+        // 当前店铺
+        let shopObj = dataList[i]
+        // 遍历店铺内部的商品
+        for (let j = 0; j < shopObj.skus.length; j++) {
+            let good = dataList[i].skus[j]
+            allNumber += good.number
+            if (good.selected === 1) {
+                checkNumber += +good.number
+            } else {
+                // 如果商品没有选中,但是又勾选了全选
+                if (isAllCheck) {
+                    isAllCheck = false
+                }
+            }
+        }
+    }
+    // 更新缓存
+    uni.setStorageSync('allCartNum', allNumber)
+    // 设置导航条
+    if (allNumber > 0) {
+        uni.setTabBarBadge({
+            index: 2,
+            text: (allNumber).toString()
+        })
+    } else {
+        uni.removeTabBarBadge({
+            index: 2
+        })
+    }
+    return {
+        allNumber, checkNumber, isAllCheck
+    }
+}
+
+/**
+ * 默认购物车,供骨架屏使用
+ * @type {[{skus: [{image: string, number: number, productId: number, price: number, productName: string, selected: number},{image: string, number: number, productId: number, price: number, productName: string, selected: number},{image: string, number: number, productId: number, price: number, productName: string, selected: number}], shopName: string, shopId: number, selected: number}]}
+ */
+export const defaultCartList = [
+    {
+        shopId: 1,
+        shopName: '12312312321312312',
+        selected: 0,
+        skus: [
+            {
+                productId: 1,
+                productName: '',
+                image: '',
+                price: 0,
+                number: 0,
+                selected: 0,
+            },
+            {
+                productId: 2,
+                productName: '',
+                image: '',
+                price: 0,
+                number: 0,
+                selected: 0,
+            },
+            {
+                productId: 3,
+                productName: '',
+                image: '',
+                price: 0,
+                number: 0,
+                selected: 0,
+            }
+        ]
+    }
+]

+ 93 - 0
pages/tabbar/cart/components/DeleteModal.vue

@@ -0,0 +1,93 @@
+<!--
+    * @FileDescription: DeleteModal
+    * @Author: kahu
+    * @Date: 2022/11/3
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/3
+-->
+<template>
+  <div class="content">
+    <TuiModal
+        :show="show"
+        :custom="true"
+        :fadein="true"
+    >
+      <view class="Put-box1">
+        <view class="text-align fs34 fs-bold">
+          温馨提示
+        </view>
+        <view class="mar-top-40 text-align">
+          您确定删除选中的商品吗?
+        </view>
+        <view class="flex-display flex-sp-between">
+          <view
+              class="btn"
+              @click="show = false"
+          >
+            点错了
+          </view>
+          <view
+              class="btn submit"
+              @click="$emit('confirm')"
+          >
+            确认删除
+          </view>
+        </view>
+      </view>
+    </TuiModal>
+  </div>
+</template>
+
+<script>
+import TuiModal from "../../../../components/modal/modal";
+export default {
+  name: "DeleteModal",
+  components:{TuiModal},
+  data() {
+    return {}
+  },
+  model:{
+    prop: 'showDeleteModal',
+    event: 'change'
+  },
+  props:{
+    showDeleteModal:{
+      type:Boolean,
+      default:()=>false
+    }
+  },
+  computed:{
+    show:{
+      get(){
+        return this.showDeleteModal
+      },
+      set(val){
+        this.$emit('change',val)
+      }
+    }
+  },
+  methods: {}
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.Put-box1 {
+  .btn {
+    text-align: center;
+    margin-top: 40rpx;
+    border: 1px solid #333333;
+    height: 80upx;
+    line-height: 80upx;
+    width: 240upx;
+    color: #333333;
+  }
+
+  .submit {
+    background-color: #333333;
+    color: #FFEBC4;
+  }
+}
+</style>

Різницю між файлами не показано, бо вона завелика
+ 613 - 1064
pages/tabbar/cart/index.vue


+ 3 - 3
pages/tabbar/category/index.vue

@@ -7,15 +7,15 @@
 		<view class="content">
 			<!-- 分类中心 -->
 			<scroll-view scroll-y class="left-aside">
-				<view v-for="(item,index) in flist" :key="item.classifyId" class="f-item b-b" :class="{active: index === currentIndex}" @click="tabtap(item,index)">
+				<view v-for="(item,index) in flist" :key="item.classifyId"  class="f-item b-b" :class="{active: index === currentIndex}" @click="tabtap(item,index)">
 					{{item.classifyName}}
 				</view>
 			</scroll-view>
 			<scroll-view scroll-with-animation scroll-y class="right-aside">
 				<view v-for="item in slist" :key="item.classifyId" class="s-list">
-			<view class="classBox flex-items-plus">
+			<view class="classBox flex-items-plus" v-if="item.childs.length>0">
 			  <image class="emptyOrder-img" src="https://ceres.zkthink.com/static/images/classRight.png"></image>
-			  <text class="s-item">{{item.classifyName}}</text>
+			  <text class="s-item" >{{item.classifyName}}</text>
 			  <image class="emptyOrder-img" src="https://ceres.zkthink.com/static/images/classLeft.png"></image>
 			</view>
 					<view class="t-list">

+ 92 - 67
pages/tabbar/index/index.vue

@@ -1,50 +1,67 @@
 <template>
   <div class="hom-page" :style="{'padding-top': height + 'px'}">
     <global-loading />
-    <!--&lt;!&ndash;  #ifdef MP-WEIXIN &ndash;&gt;-->
-    <!--<view class="header weiXinBox"-->
-          <!--:style="{'padding-top': topHeight + 'px'}">-->
-      <!--<view class="topBox"-->
-            <!--:style="{'height': height + 'px'}">-->
-        <!--<image class="logo"-->
-               <!--src="https://ceres.zkthink.com/static/assets/img/logo.png"-->
-               <!--mode="widthFix"></image>-->
-      <!--</view>-->
-    <!--</view>-->
-    <!--<view class="wxBtnBg"-->
-          <!--:style="{'padding-top': (topHeight + height + 10) + 'px'}">-->
-      <!--<view class="weiXinBoxBtn"-->
-            <!--@click="searchPro">-->
-        <!--<image class="search-icon"-->
-               <!--src="https://ceres.zkthink.com/static/images/searchImg.png"-->
-               <!--mode="widthFix">-->
-        <!--</image>-->
-        <!--<text>请输入您想要的宝贝</text>-->
-      <!--</view>-->
-    <!--</view>-->
-    <!--&lt;!&ndash; #endif &ndash;&gt;-->
-    <!--&lt;!&ndash; #ifdef H5 || APP-PLUS &ndash;&gt;-->
-    <!--<view class="header">-->
-      <!--<view class="topBox topWap">-->
-        <!--<image class="logo"-->
-               <!--src="https://ceres.zkthink.com/static/assets/img/logo.png"-->
-               <!--mode="widthFix"></image>-->
-        <!--<view class="search-btn"-->
-              <!--@click="searchPro">-->
-          <!--<image class="search-icon"-->
-                 <!--src="https://ceres.zkthink.com/static/img/search.png"-->
-                 <!--mode="widthFix">-->
-          <!--</image>-->
-        <!--</view>-->
-      <!--</view>-->
-    <!--</view>-->
-    <!--&lt;!&ndash; #endif &ndash;&gt;-->
-    <!--<category-list @tabChange='tabChange'></category-list>-->
-    <com-header  v-if="componentsData.length > 1 && componentsData[0].type==='header'"
-                :componentContent="componentsData[0].componentContent"
-                :terminal="terminal"
-                :typeId="1"
-                @tabChange="tabChange"></com-header>
+    <u-sticky offset-top="0" h5-nav-height="0" bg-color="#fff">
+      <view class="head">
+        <!-- #ifdef MP-WEIXIN -->
+        <view
+            class="header weiXinBox"
+            :style="{'padding-top': topHeight + 'px'}"
+        >
+          <view
+              class="topBox"
+              :style="{'height': height + 'px'}"
+          >
+            <image
+                class="logo"
+                src="https://ceres.zkthink.com/static/assets/img/logo.png"
+                mode="widthFix"
+            ></image>
+          </view>
+        </view>
+        <view
+            class="wxBtnBg"
+            :style="{'padding-top': (topHeight + height + 10) + 'px'}"
+        >
+          <view
+              class="weiXinBoxBtn"
+              @click="searchPro"
+          >
+            <image
+                class="search-icon"
+                src="https://ceres.zkthink.com/static/images/searchImg.png"
+                mode="widthFix"
+            >
+            </image>
+            <text>请输入您想要的宝贝</text>
+          </view>
+        </view>
+        <!-- #endif -->
+        <!-- #ifdef H5 || APP-PLUS -->
+        <view class="header">
+          <view class="topBox topWap">
+            <image
+                class="logo"
+                src="https://ceres.zkthink.com/static/assets/img/logo.png"
+                mode="widthFix"
+            ></image>
+            <view
+                class="search-btn"
+                @click="searchPro"
+            >
+              <image
+                  class="search-icon"
+                  src="https://ceres.zkthink.com/static/img/search.png"
+                  mode="widthFix"
+              >
+              </image>
+            </view>
+          </view>
+        </view>
+        <!-- #endif -->
+        <category-list @tabChange="tabChange"></category-list>
+      </view>
+    </u-sticky>
     <canvas-page ref="canvasPage"
                  :componentsData="componentsData"
                  v-if="activeTab==0"
@@ -93,12 +110,9 @@ import CategoryList from "@/components/basics/categoryList.vue"
 import CategoryShow from "@/components/basics/categoryShow.vue"
 import comHeader from '@/components/canvasShow/basics/header/app'
 import canvasPage from '@/components/canvasShow/canvasShowPage.vue'
-import GlobalLoading from "../../../components/GlobalLoading";
 
 export default {
   components: {
-    GlobalLoading,
-    comHeader,
     AdWindow,
     CategoryList,
     CategoryShow,
@@ -169,22 +183,22 @@ export default {
         uni.hideLoading()
       })
     },
-		// 分享到朋友圈
-		onShareTimeline: function() {
-		  return {
-		    title: this.miniHomeRemark,
-		    imageUrl: this.miniHomeImg,
-		    path: 'pages/tabbar/index/index',
-		  }
-		},
-		// 分享好友
-		onShareAppMessage: function() {
-			return {
-				title: this.miniHomeRemark,
-				imageUrl: this.miniHomeImg,
-				path: 'pages/tabbar/index/index',
-			}
-		},
+    // 分享到朋友圈
+    onShareTimeline: function() {
+      return {
+        title: this.miniHomeRemark,
+        imageUrl: this.miniHomeImg,
+        path: 'pages/tabbar/index/index',
+      }
+    },
+    // 分享好友
+    onShareAppMessage: function() {
+      return {
+        title: this.miniHomeRemark,
+        imageUrl: this.miniHomeImg,
+        path: 'pages/tabbar/index/index',
+      }
+    },
     /**
      * 请求非首页的子组件的下一页
      * */
@@ -206,7 +220,7 @@ export default {
         let pitchOnPage = this.$refs.categoryShow
         pitchOnPage.total = 0
         pitchOnPage.page=1
-        pitchOnPage.productList=[]
+        pitchOnPage.productList=[{},{},{},{},{},{},{},{}]
       }
     },
     tabChange(index, id) {
@@ -214,15 +228,26 @@ export default {
       this.activeTab = index
       this.categoryid = id
     },
+    // 查询产品
+    searchPro(key, type) {
+      uni.navigateTo({
+        url: `/pages_category_page1/search/index/index`
+      })
+    }
   }
 };
 </script>
 
 <style lang="scss" scoped>
-  .hom-page{
-    margin-top: calc(20rpx + var(--status-bar-height));
-  }
+.hom-page{
+  margin-top: calc(20rpx + var(--status-bar-height));
+}
+.head{
+  background: #fff;
+
+}
 .header {
+  background: #fff;
   .toLive {
     height: 40px;
     color: #FFF;

+ 137 - 0
pages/tabbar/user/index.data.js

@@ -0,0 +1,137 @@
+/**
+ * @FileDescription:我的页面相关对象
+ * @Author: kahu
+ * @Date: 2022/11/4
+ * @LastEditors: kahu
+ * @LastEditTime: 2022/11/4
+ */
+export const orderCardList = [
+    {
+        id:1,
+        label:'待付款',
+        key:'waitPayOrderCount',
+        icon:'https://ceres.zkthink.com/static/img/user/daifukuan1.png',
+        jumpUrl:'../../../pages_category_page1/orderModule/index?type=1'
+    },
+    {
+        id:2,
+        label:'待发货',
+        key:'waitSendOrderCount',
+        icon:'https://ceres.zkthink.com/static/img/user/daifahuo1.png',
+        jumpUrl:'../../../pages_category_page1/orderModule/index?type=2'
+    },
+    {
+        id:3,
+        label:'待收货',
+        key:'waitReceiveOrderCount',
+        icon:'https://ceres.zkthink.com/static/img/user/daishouhuo.png',
+        jumpUrl:'../../../pages_category_page1/orderModule/index?type=3'
+    },
+    {
+        id:4,
+        label:'全部订单',
+        key:'',
+        icon:'https://ceres.zkthink.com/static/img/user/daifukuan1.png',
+        jumpUrl:'../../../pages_category_page1/orderModule/index'
+    }
+]
+
+export const fastCardOneList = [
+    {
+        id:1,
+        label:'我的收藏',
+        icon:'https://ceres.zkthink.com/static/img/user/mycollectionIcon.png',
+        jumpUrl:'../../../pages_category_page2/userModule/collection'
+    },
+    {
+        id:2,
+        label:'我的问答',
+        icon:'https://ceres.zkthink.com/static/img/user/myQuestionIcon.png',
+        jumpUrl:'../../../pages_category_page2/userModule/questionList'
+    },
+    {
+        id:3,
+        label:'浏览足迹',
+        icon:'https://ceres.zkthink.com/static/img/user/myfootprintIcon.png',
+        jumpUrl:'../../../pages_category_page2/userModule/footprintList'
+    },
+    {
+        id:4,
+        label:'我的评价',
+        icon:'https://ceres.zkthink.com/static/img/user/pingjia.png',
+        jumpUrl:'../../../pages_category_page1/goodsModule/userEvaluate'
+    },
+    {
+        id:5,
+        label:'我的账户',
+        icon:'https://ceres.zkthink.com/static/img/user/account.png',
+        jumpUrl:'../../../pages_category_page2/userModule/memberAccount'
+    },
+    {
+        id:6,
+        label:'我的卡券',
+        icon:'https://ceres.zkthink.com/static/img/user/kaquan.png',
+        jumpUrl:'../../../pages_category_page2/userModule/coupon'
+    }, {
+        id:7,
+        label:'分销中心',
+        icon:'https://ceres.zkthink.com/static/img/user/fenxiao.png',
+        jumpUrl:'../../../pages_category_page1/distributionModule/index'
+    },
+    {
+        id:8,
+        label:'商家入驻',
+        icon:'https://ceres.zkthink.com/static/img/user/Settled.png',
+        jumpUrl:'function:handleApplySettle'
+    }
+]
+
+export const fastCardTwoList = [
+    {
+        id:1,
+        label:'地址管理',
+        icon:'https://ceres.zkthink.com/static/img/user/dizhi1.png',
+        jumpUrl:'../../../pages_category_page2/userModule/address'
+    },
+    {
+        id:2,
+        label:'我的售后',
+        icon:'https://ceres.zkthink.com/static/img/user/shouhou.png',
+        jumpUrl:'../../../pages_category_page2/orderModule/afterSale'
+    },
+    {
+        id:3,
+        label:'会员中心',
+        icon:'https://ceres.zkthink.com/static/img/user/VIP.png',
+        jumpUrl:'../../../pages_category_page2/userModule/memberAccount'
+    },
+    {
+        id:4,
+        label:'银行卡',
+        icon:'https://ceres.zkthink.com/static/img/user/kaquan.png',
+        jumpUrl:'../../../pages_category_page2/userModule/bankcard'
+    },
+    {
+        id:5,
+        label:'我的积分',
+        icon:'https://ceres.zkthink.com/static/img/user/myIntegral.png',
+        jumpUrl:'../../../pages_category_page1/integral/index'
+    },
+    {
+        id:6,
+        label:'签到',
+        icon:'https://ceres.zkthink.com/static/img/user/signIcon.png',
+        jumpUrl:'../../../pages_category_page1/integral/sign'
+    }, {
+        id:7,
+        label:'优惠券',
+        icon:'https://ceres.zkthink.com/static/img/user/userCouponIcon.png',
+        jumpUrl:'../../../pages_category_page1/coupon/list'
+    },
+    {
+        id:8,
+        label:'平台客服',
+        icon:'https://ceres.zkthink.com/static/img/user/service.png',
+        jumpUrl:'function:flyToService'
+    }
+]

+ 177 - 449
pages/tabbar/user/index.vue

@@ -1,541 +1,269 @@
 <template>
-  <view class="content">
+  <view class="content u-skeleton">
+    <!-- 骨架屏 -->
+    <Skeleton
+        el-color="#efefef"
+        bg-color="#fff"
+        :loading="loading && isFirstComeIn"
+        :animation="true"
+    ></Skeleton>
     <!-- 我的 -->
-    <image class="top-bg"
-           src="https://ceres.zkthink.com/static/img/user/topBg.png"></image>
-    <view class="page-content">
-      <view class="user-info-box"
-            @click="gologin"
-            v-if="JSON.stringify(item) =='{}' ">
-        <image class="user-image"
-               src="https://ceres.zkthink.com/static/img/user/morentouxiang.png"
-               mode="widthFix"></image>
+    <image
+        class="top-bg"
+        src="https://ceres.zkthink.com/static/img/user/topBg.png"
+    ></image>
+    <view class="page-content" >
+      <!-- 用户未登录 -->
+      <view
+          class="user-info-box"
+          @click="$jump('../../../pages_category_page2/userModule/login')"
+          v-if="userItem.name===undefined "
+      >
+        <image
+            class="user-image u-skeleton-circle"
+            src="https://ceres.zkthink.com/static/img/user/morentouxiang.png"
+            mode="widthFix"
+        ></image>
         <view class="user-info">
-          <view class="user-logoin-title">点击登录</view>
-          <view class="user-logoin-lable">登录后享受更多权益~</view>
+          <view class="user-logoin-title u-skeleton-fillet">点击登录</view>
+          <view class="user-logoin-lable u-skeleton-fillet">登录后享受更多权益~</view>
         </view>
-        <image class="user-info-right"
-               src="https://ceres.zkthink.com/static/img/user/back.png"></image>
+        <image
+            class="user-info-right"
+            src="https://ceres.zkthink.com/static/img/user/back.png"
+        ></image>
         <view class="notice">
-          <view class="messNum"
-                v-if="useritem.notRead>0">{{ useritem.notRead }}
+          <view
+              class="messNum"
+              v-if="userItem.notRead>0"
+          >{{ userItem.notRead }}
           </view>
         </view>
       </view>
-      <view class="user-info-box"
-            v-else>
-        <image class="user-image"
-               @click="goinfo"
-               v-if="useritem.headImage"
-               :src="useritem.headImage"
-               mode="widthFix"
-               style="border-radius: 50%;"></image>
-        <image class="user-image"
-               v-else
-               src="https://ceres.zkthink.com/static/img/user/morentouxiang.png"
-               mode="widthFix">
+      <!-- 用户已登陆 -->
+      <view
+          class="user-info-box "
+          v-else
+      >
+        <image
+            class="user-image u-skeleton-fillet"
+            @click="handleJump('../../../pages_category_page2/userModule/personalDetails')"
+            v-if="userItem.headImage"
+            :src="userItem.headImage"
+            mode="widthFix"
+            style="border-radius: 50%;"
+        ></image>
+        <image
+            class="user-image"
+            v-else
+            src="https://ceres.zkthink.com/static/img/user/morentouxiang.png"
+            mode="widthFix"
+        >
         </image>
         <view class="user-info">
-          <view class="user-logoin-title"
-                v-if="useritem.name">{{ useritem.name }}
+          <view
+              class="user-logoin-title"
+              v-if="userItem.name"
+          >{{ userItem.name }}
           </view>
-          <view class="experience flex-items"
-                @click="goToMemberCenter">
+          <view
+              class="experience flex-items"
+              @click="handleJump('../../../pages_category_page1/memberCenter/index')"
+          >
             <label>成长值</label>
-            <view class="experienceValue">{{ useritem.growth || 0 }} / {{ useritem.nextLevelGrowth || 0 }}</view>
+            <view class="experienceValue">{{ userItem.growth || 0 }} / {{ userItem.nextLevelGrowth || 0 }}</view>
           </view>
         </view>
-        <view class="notice"
-              @click="toMessage">
-          <view class="messNum"
-                v-if="useritem.notRead>0">{{ useritem.notRead > 99 ? '99+' : useritem.notRead }}
+        <view
+            class="notice"
+            @click="handleJump('../../../pages_category_page2/userModule/messageCenter')"
+        >
+          <view
+              class="messNum"
+              v-if="userItem.notRead>0"
+          >{{ userItem.notRead > 99 ? '99+' : userItem.notRead }}
           </view>
         </view>
       </view>
+      <!-- 订单卡片 -->
       <view class="order-box">
-        <view class="order-item"
-              @click="orderTap(1)">
-          <image class="order-item-image"
-                 src="https://ceres.zkthink.com/static/img/user/daifukuan1.png"
-                 mode="widthFix">
+        <view
+            class="order-item"
+            v-for="orderCardItem in orderCardList"
+            :key="orderCardItem.id"
+            @click="handleJump(orderCardItem.jumpUrl)"
+        >
+          <image
+              class="order-item-image  u-skeleton-circle"
+              :src="orderCardItem.icon"
+              mode="widthFix"
+          >
           </image>
-          <view class="order-item-text">待付款</view>
-          <view class="quan"
-                v-if="useritem.waitPayOrderCount>0">
-            {{ useritem.waitPayOrderCount }}
+          <view class="order-item-text u-skeleton-fillet">{{ orderCardItem.label }}</view>
+          <view
+              class="quan"
+              v-if="userItem[orderCardItem.key]>0"
+          >
+            {{ userItem[orderCardItem.key] }}
           </view>
         </view>
-        <view class="order-item"
-              @click="orderTap(2)">
-          <image class="order-item-image"
-                 src="https://ceres.zkthink.com/static/img/user/daifahuo1.png"
-                 mode="widthFix">
-          </image>
-          <view class="order-item-text">待发货</view>
-          <view class="quan"
-                v-if="useritem.waitSendOrderCount>0">
-            {{ useritem.waitSendOrderCount }}
-          </view>
-
-        </view>
-        <view class="order-item"
-              @click="orderTap(3)">
-          <image class="order-item-image"
-                 src="https://ceres.zkthink.com/static/img/user/daishouhuo.png"
-                 mode="widthFix">
-          </image>
-          <view class="order-item-text">待收货</view>
-          <view class="quan"
-                v-if="useritem.waitReceiveOrderCount>0">
-            {{ useritem.waitReceiveOrderCount }}
-          </view>
-
-        </view>
-        <view class="order-item"
-              @click="orderTap(0)">
-          <image class="order-item-image"
-                 src="https://ceres.zkthink.com/static/img/user/dingdan.png"
-                 mode="widthFix"></image>
-          <view class="order-item-text">全部订单</view>
-        </view>
       </view>
-      <!--			<view class="item-btn mt20" @click="toMessage">-->
-      <!--				<image class="item-btn-icon" src="https://ceres.zkthink.com/static/images/mymessageIcon.png" mode="widthFix"></image>-->
-      <!--				<view class="item-btn-text flex-row-plus flex-items">-->
-      <!--					<label>消息中心</label>-->
-      <!--					<view class="messNum" v-if="useritem.notRead>0">{{useritem.notRead}}</view>-->
-      <!--				</view>-->
-      <!--				<image class="item-btn-right" src="https://ceres.zkthink.com/static/img/user/arrow.png" mode="widthFix"></image>-->
-      <!--			</view>-->
+      <!-- 第一个卡片 -->
       <view class="itemBox">
-        <view class="item-btn"
-              @click="toCollection">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/mycollectionIcon.png"
-                 mode="widthFix">
-          </image>
-          <view class="item-btn-text">我的收藏</view>
-        </view>
-        <view class="item-btn"
-              @click="toQuestion">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/myQuestionIcon.png"
-                 mode="widthFix">
+        <view
+            class="item-btn"
+            v-for="item in fastCardOneList"
+            :key="item.id"
+            @click="handleJump(item.jumpUrl)"
+        >
+          <image
+              class="item-btn-icon u-skeleton-circle"
+              :src="item.icon"
+              mode="widthFix"
+          >
           </image>
-          <view class="item-btn-text">我的问答</view>
-        </view>
-        <view class="item-btn"
-              @click="toFootprint">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/myfootprintIcon.png"
-                 mode="widthFix">
-          </image>
-          <view class="item-btn-text">浏览足迹</view>
-        </view>
-        <view class="item-btn"
-              @click="gouserEvaluate">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/pingjia.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">我的评价</view>
-        </view>
-        <view class="item-btn"
-              @click="memberAccountClick">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/account.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">我的账户</view>
-        </view>
-        <view class="item-btn"
-              @click="couponClick">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/kaquan.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">我的卡券</view>
-        </view>
-        <view class="item-btn"
-              @click="godistribution">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/fenxiao.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">分销中心</view>
-        </view>
-        <view class="item-btn"
-              @click="applySettle">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/Settled.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">商家入驻</view>
+          <view class="item-btn-text u-skeleton-fillet">{{ item.label }}</view>
         </view>
       </view>
+      <!-- 第二个卡片 -->
       <view class="itemBox">
-        <view class="item-btn"
-              @click="addressClick">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/dizhi1.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">地址管理</view>
+        <view
+            class="item-btn"
+            v-for="item in fastCardTwoList"
+            :key="item.id"
+            @click="handleJump(item.jumpUrl)"
+        >
+          <image
+              class="item-btn-icon u-skeleton-circle"
+              :src="item.icon"
+              mode="widthFix"
+          ></image>
+          <view class="item-btn-text u-skeleton-fillet">{{ item.label }}</view>
         </view>
-        <view class="item-btn"
-              @click="goafterSale">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/shouhou.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">我的售后</view>
-        </view>
-        <view class="item-btn"
-              @click="goToMemberCenter">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/VIP.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">会员中心</view>
-        </view>
-        <view class="item-btn"
-              @click="goBankcard">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/kaquan.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">银行卡</view>
-        </view>
-        <view class="item-btn"
-              @click="goIntegral">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/myIntegral.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">我的积分</view>
-        </view>
-        <view class="item-btn"
-              @click="goSign">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/signIcon.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">签到</view>
-        </view>
-        <view class="item-btn"
-              @click="goCouponList">
-          <image class="item-btn-icon"
-                 src="https://ceres.zkthink.com/static/img/user/userCouponIcon.png"
-                 mode="widthFix"></image>
-          <view class="item-btn-text">优惠券</view>
-        </view>
-        <!-- <view class="item-btn">
-            <image class="item-btn-icon" src="https://ceres.zkthink.com/static/img/user/service.png" mode="widthFix"></image>
-            <view class="item-btn-text">平台客服</view>
-          </view> -->
-        <button open-type="contact"
+<!--        <button open-type="contact"
                 class="item-btn btnNone">
           <image class="item-btn-icon"
                  src="https://ceres.zkthink.com/static/img/user/service.png"
                  mode="widthFix"></image>
           <view class="item-btn-text">平台客服</view>
-        </button>
-
-        <!-- <view class="item-btn" @click="toSuccess">
-          <image class="item-btn-icon" src="https://ceres.zkthink.com/static/img/user/userCouponIcon.png" mode="widthFix"></image>
-          <view class="item-btn-text">成功测试</view>
-        </view> -->
-        <!--        <view class="item-btn" @click="goWxShop">-->
-        <!--          <image class="item-btn-icon" src="https://ceres.zkthink.com/static/img/user/kaquan.png" mode="widthFix"></image>-->
-        <!--          <view class="item-btn-text">测试</view>-->
-        <!--        </view>-->
+        </button>-->
       </view>
     </view>
     <view class="copyright">
-      <text>中科鑫智 版权所有</text>
-      <text>粤ICP备19086489号-3</text>
+      <text >中科鑫智 版权所有</text>
+      <text >粤ICP备19086489号-3</text>
     </view>
-
-    <Loading v-if="false"></Loading>
   </view>
 </template>
 
 <script>
-import Loading from "@/components/Loading"
+import Skeleton from "../../../components/Skeleton";
+import { fastCardOneList, fastCardTwoList, orderCardList } from "./index.data";
+import { Services } from '../../../utils/services'
+import { Encrypt } from '../../../utils/secret'
 
 const NET = require('../../../utils/request')
 const API = require('../../../config/api')
-const SECRET = require('../../../utils/secret')
 export default {
-  components:{Loading},
   data() {
     return {
-      item: {},
-      useritem: {},
-      isLoading: false,
-      corpId: null,
-      serviceURL: null,
+      isFirstComeIn: true,
+      loading: true,
+      orderCardList: orderCardList,
+      fastCardOneList: fastCardOneList,
+      fastCardTwoList: fastCardTwoList,
+      cacheUserItem: {},
+      userItem: {
+        headImage:'',
+        name:undefined
+      },
     }
   },
-  onLoad() {
-  },
+  components:{Skeleton},
   onShow() {
+    this.isFirstComeIn=true
     if (uni.getStorageSync('storage_key')) {
-      this.item = uni.getStorageSync('storage_key');
+      this.cacheUserItem = uni.getStorageSync('storage_key');
     }
-    this.GetUser()
+    this.handleGetUser()
   },
   methods: {
-    // goWxShop() {
-    //   uni.navigateTo({
-    //     url: `plugin-private://wxf0713a10bbae8732/pages/productDetail/productDetail?productId=59656518`,
-    //   })
-    // },
-    // 测试
-    // toSuccess() {
-    // 	uni.navigateTo({
-    // 		url: '../../../pages_category_page1/goodsModule/evaSuccessful'
-    // 		// url: '../../../pages_category_page1/orderModule/paySuccessful'
-    // 	})
-    // },
-    toMessage() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/messageCenter'
-        })
-      }
-    },
-    toCollection() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/collection'
-        })
-      }
-    },
-    toQuestion() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/questionList'
-        })
+    /**
+     * 处理跳转
+     * @param url
+     */
+    handleJump(url) {
+      if (JSON.stringify(this.cacheUserItem) === '{}') {
+        return this.$jump('../../../pages_category_page2/userModule/login')
       }
-    },
-    toFootprint() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
+        console.log(url)
+      if (url.startsWith('function')) {
+        const [key, funcName] = url.split(':')
+        this[funcName]()
       } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/footprintList'
-        })
+        this.$jump(url)
       }
     },
-    GetUser() {
+    /**
+     * 获取用户信息
+     */
+    handleGetUser() {
+      this.loading = true
       NET.request(API.GetUser, {}, 'GET').then(res => {
-        this.useritem = res.data
-        uni.setStorageSync('storage_userInfo', this.useritem);
-      }).catch(res => {
-
+        this.userItem = res.data
+        uni.setStorageSync('storage_userInfo', this.userItem);
+        this.isFirstComeIn=false
+        this.loading = true
       })
     },
-    // 个人信息  登录页面
-    gologin() {
-      uni.navigateTo({
-        url: '../../../pages_category_page2/userModule/login'
-      })
-    },
-    goinfo() {
-      uni.navigateTo({
-        url: '../../../pages_category_page2/userModule/personalDetails'
-      })
+    /**
+     * 客服
+     * @return {Promise<void>}
+     */
+    async flyToService() {
+      (await Services()).flyToService();
     },
-    // 我的评论
-    gouserEvaluate() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page1/goodsModule/userEvaluate'
-        })
-      }
-
-    },
-    // 分销中心
-    godistribution() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page1/distributionModule/index'
-        })
-      }
-    },
-    goToMemberCenter() {
-      uni.navigateTo({
-        url: '../../../pages_category_page1/memberCenter/index'
-      })
-    },
-    applySettle() {
+    /**
+     * 商家入驻
+     */
+    handleApplySettle() {
       const res = uni.getStorageSync('storage_key');
-      let token = SECRET.Encrypt(res.token)
-      let username = this.useritem.name
-      let test = SECRET.Decrypt(token)
+      let token = Encrypt(res.token)
+      let username = this.userItem.name
+      let url = null
       // #ifdef H5
       console.log('h5 test')
-      window.open(API.SettledMerchantPrefix + `/#/?username=${username}&user=${token}`)
+      window.open(API.SettledMerchantPrefix + `/#/?username=${ username }&user=${ token }`)
       // #endif
       // #ifdef APP-PLUS
-      plus.runtime.openURL(API.SettledMerchantPrefix + `/#/?username=${username}&user=${token}`, function (e) {
+      plus.runtime.openURL(API.SettledMerchantPrefix + `/#/?username=${ username }&user=${ token }`, function (e) {
         console.log(e);
       })
       // #endif
       // #ifdef MP-WEIXIN
-      var url = API.SettledMerchantPrefix
+      url = API.SettledMerchantPrefix
       uni.navigateTo({
-        url: `../../../pages_category_page1/linkOthers/index?url=${url}&username=${username}&user=${token}`
+        url: `../../../pages_category_page1/linkOthers/index?url=${ url }&username=${ username }&user=${ token }`
         // 此处的链接为小程序上面新建的webview页面路径,参数url为要跳转外链的地址
         // url: '../../../pages_category_page1/linkOthers/index?url=' + encodeURIComponent(url)
         // url:'../../../pages_category_page2/userModule/coupon'
       })
       // #endif
       // #ifdef MP-ALIPAY
-      var url = API.SettledMerchantPrefix
+      url = API.SettledMerchantPrefix
       uni.navigateTo({
-        url: `../../../pages_category_page1/linkOthers/index?url=${url}&username=${username}&user=${token}`
+        url: `../../../pages_category_page1/linkOthers/index?url=${ url }&username=${ username }&user=${ token }`
         // 此处的链接为小程序上面新建的webview页面路径,参数url为要跳转外链的地址
         // url: '../../../pages_category_page1/linkOthers/index?url=' + encodeURIComponent(url)
         // url:'../../../pages_category_page2/userModule/coupon'
       })
       // #endif
     },
-    //我的账户
-    memberAccountClick() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/memberAccount'
-        })
-      }
-    },
-    //我的优惠券
-    couponClick() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/coupon'
-        })
-      }
-    },
-    // 地址管理
-    addressClick() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/address'
-        })
-      }
-
-    },
-    // 我的售后
-    goafterSale() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/orderModule/afterSale'
-        })
-      }
-    },
-    // 我的银行卡
-    goBankcard() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/bankcard'
-        })
-      }
-    },
-    // 我的积分
-    goIntegral() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page1/integral/index'
-        })
-      }
-    },
-    // 签到
-    goSign() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page1/integral/sign'
-        })
-      }
-    },
-    goCouponList() {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page1/coupon/list'
-        })````
-      }
-    },
-    //判断是否是分销员
-    getApplyState() {
-      NET.request(API.HasApply, {
-        tenantCode: this.currentId
-      }, 'POST').then(res => {
-        uni.hideLoading()
-        this.slist = res.data
-      }).catch(res => {
-        uni.hideLoading()
-      })
-    },
-    orderTap(type) {
-      if (JSON.stringify(this.item) == '{}') {
-        uni.navigateTo({
-          url: '../../../pages_category_page2/userModule/login'
-        })
-      } else {
-        uni.navigateTo({
-          url: '../../../pages_category_page1/orderModule/index?type=' + type
-        })
-      }
-    },
   }
 }
 </script>
 
-<style lang='scss'>
+<style lang="scss">
 page {
   background: #f8f8f8;
 }

+ 118 - 55
pages_category_page1/coupon/list.vue

@@ -1,69 +1,107 @@
 <template>
-  <view class="couponList">
-    <view
-      class="couponItem flex-items"
-      v-for="item of couponList"
-      :key="item.couponId"
-    >
-      <view class="itemLeft" @click="goProductList(item)">
-        <view class="topIcon"></view>
-        <view class="bottomIcon"></view>
-        <view class="price flex-items">
-          <view class="flex-column flex-end unitBox" v-if="item.discountMode === 1">
-            <view class="unit">¥</view>
+  <view class="couponList u-skeleton">
+    <Skeleton
+        el-color="#efefef"
+        bg-color="#fff"
+        :loading="loading && isFirstComeIn"
+        :animation="true"
+    />
+    <template v-if="couponList.length>0">
+      <view
+          class="couponItem u-skeleton-fillet flex-items"
+          v-for="item of couponList"
+          :key="item.couponId"
+      >
+        <view
+            class="itemLeft u-skeleton-fillet"
+            @click="goProductList(item)"
+        >
+          <view class="topIcon"></view>
+          <view class="bottomIcon"></view>
+          <view class="price flex-items">
+            <view
+                class="flex-column flex-end unitBox"
+                v-if="item.discountMode === 1"
+            >
+              <view class="unit">¥</view>
+            </view>
+            <view class="priceValue">{{ item.reduceMoney }}{{ item.discountMode === 1 ? '' : '折' }}</view>
           </view>
-          <view class="priceValue">{{item.reduceMoney}}{{item.discountMode === 1 ? '' : '折'}}</view>
+          <text class="fs24 font-color-999">满{{ item.fullMoney }}元可用</text>
         </view>
-        <text class="fs24 font-color-999">满{{item.fullMoney}}元可用</text>
-      </view>
-      <view class="itemRight">
-        <view class="topInfo flex-items flex-sp-between">
-          <view @click="goProductList(item)">
-            <view class="couponTit fs32 font-color-FFF">{{item.activityName}}</view>
-            <view class="couponDate fs24 font-color-999">{{item.endTime}}到期</view>
+        <view class="itemRight u-skeleton-fillet">
+          <view class="topInfo flex-items flex-sp-between">
+            <view @click="goProductList(item)">
+              <view class="couponTit fs32 font-color-FFF">{{ item.activityName }}</view>
+              <view class="couponDate fs24 font-color-999">{{ item.endTime }}到期</view>
+            </view>
+            <view class="exchangeBtnBox flex-column flex-end">
+              <view
+                  class="exchangeBtn fs24 font-color-FFF"
+                  v-if="item.state === 0"
+              >已领取
+              </view>
+              <wx-send-coupon
+                  v-else
+                  @success="success"
+                  :couponList="[item]"
+              >
+                <view class="exchangeBtn fs24 font-color-FFF">{{ item.ifCredit ? '立即兑换' : '立即领取' }}</view>
+              </wx-send-coupon>
+            </view>
           </view>
-          <view class="exchangeBtnBox flex-column flex-end">
-            <view class="exchangeBtn fs24 font-color-FFF" v-if="item.state === 0">已领取</view>
-            <wx-send-coupon v-else @success="success" :couponList="[item]">
-              <view class="exchangeBtn fs24 font-color-FFF">{{item.ifCredit?'立即兑换':'立即领取'}}</view>
-            </wx-send-coupon>
+          <view
+              @click="goProductList(item)"
+              class="couponType fs28 font-color-FFF"
+          >{{ item.discountMode === 1 ? '满减券' : '折扣券' }}
           </view>
         </view>
-        <view @click="goProductList(item)" class="couponType fs28 font-color-FFF">{{item.discountMode === 1 ? '满减券' : '折扣券'}}</view>
       </view>
-    </view>
-    <!-- 触底 -->
-    <view class="reachBottom" v-if="topLeft > 400 && couponList.length>0">
-      <image class="reach-icon" src="https://ceres.zkthink.com/static/img/reachBottom.png" mode="widthFix"></image>
-      <text class="reach-text">这里到底了哦~~</text>
-    </view>
+      <!-- 触底 -->
+      <view
+          class="reachBottom"
+          v-if="topLeft > 400 && couponList.length>0"
+      >
+        <image
+            class="reach-icon"
+            src="https://ceres.zkthink.com/static/img/reachBottom.png"
+            mode="widthFix"
+        ></image>
+        <text class="reach-text">这里到底了哦~~</text>
+      </view>
+    </template>
+    <Empty :show="couponList.length<=0" />
   </view>
 </template>
 
 <script>
-
+import Skeleton from "../../components/Skeleton";
+import Empty from "../../components/Empty";
 import WxSendCoupon from "../../components/wx/wxSendCoupon";
+
 const NET = require('../../utils/request')
 const API = require('../../config/api')
 export default {
   name: "list",
-  components: {WxSendCoupon},
+  components: {WxSendCoupon, Empty, Skeleton},
   data() {
     return {
-      couponList: [], // 优惠券列表getCoupons
+      loading: false,
+      isFirstComeIn: true,
+      couponList: [{}, {}, {}, {}, {}, {}], // 优惠券列表getCoupons
       page: 1,
       pageSize: 10,
       loadingType: 0,
       topLeft: 0
     }
   },
-  onLoad () {
+  onLoad() {
     this.getCouponList()
   },
-  onReachBottom (){
+  onReachBottom() {
     if (this.loadingType == 1) {
       uni.stopPullDownRefresh()
-    }else{
+    } else {
       this.page = this.page + 1
       this.getCouponList()
     }
@@ -77,6 +115,7 @@ export default {
       //   mask: true,
       //   title: '加载中...'
       // })
+      this.loading = true
       NET.request(API.getCoupons, {
         page: this.page,
         pageSize: this.pageSize
@@ -88,18 +127,21 @@ export default {
           this.couponList = this.couponList.concat(res.data.list)
           this.$forceUpdate()
         }
+        this.couponList = this.couponList.filter(item => JSON.stringify(item) !== '{}')
+        this.loading = false
+        this.isFirstComeIn = false
       }).catch(res => {
         uni.hideLoading()
       })
     },
     // 跳转到可用商品列表
-    goProductList (item) {
+    goProductList(item) {
       console.log(item, 'test')
       uni.navigateTo({
-        url: `../coupon/product?id=${item.couponId}`
+        url: `../coupon/product?id=${ item.couponId }`
       })
     },
-    success(){
+    success() {
       this.page = 1
       this.couponList = []
       this.getCouponList()
@@ -108,12 +150,17 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
+<style
+    lang="scss"
+    scoped
+>
 page {
   background: #F8F8F8;
+
   .couponList {
     padding: 0 20rpx 40upx;
     margin-top: 30rpx;
+
     .couponItem {
       background: #333333;
       margin-top: 40rpx;
@@ -123,11 +170,13 @@ page {
       background-repeat: no-repeat;
       background-size: contain;
       background-position: right top;
+
       .itemLeft {
         padding-right: 10rpx;
         position: relative;
         border-right: 2rpx dashed #666666;
         width: 170rpx;
+
         .topIcon {
           position: absolute;
           right: -16rpx;
@@ -137,6 +186,7 @@ page {
           background: #FFFFFF;
           border-radius: 50%;
         }
+
         .bottomIcon {
           position: absolute;
           right: -16rpx;
@@ -146,35 +196,43 @@ page {
           background: #FFFFFF;
           border-radius: 50%;
         }
+
         //.price {
         //  width: 100rpx;
         //}
         .unitBox {
           height: 70rpx;
         }
+
         .unit {
           color: #FFEBC4;
           font-size: 36rpx;
         }
+
         .priceValue {
           font-size: 52rpx;
           color: #FFEBC4;
         }
       }
+
       .itemRight {
         padding-left: 45rpx;
         flex: 1;
+
         .topInfo {
           padding-bottom: 10rpx;
           border-bottom: 2rpx solid #444444;
           margin-bottom: 10rpx;
+
           .couponDate {
             width: 300rpx;
           }
+
           .exchangeBtnBox {
             width: 110rpx;
             height: 70rpx;
             text-align: center;
+
             .exchangeBtn {
               padding: 5rpx;
               border: 2rpx solid #999999;
@@ -184,6 +242,7 @@ page {
       }
     }
   }
+
   .Put-box1 {
     .btn {
       text-align: center;
@@ -194,6 +253,7 @@ page {
       width: 100%;
       color: #333333;
     }
+
     .submit {
       background-color: #333333;
       color: #FFEBC4;
@@ -201,19 +261,22 @@ page {
     }
   }
 }
+
 // 触底样式
-.reachBottom{
-	margin-top: 30rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	.reach-icon{
-		width: 150rpx;
-		height: 150rpx;
-	}
-	.reach-text{
-		margin: 20rpx 0;
-		color: #CCCCCC;
-	}
+.reachBottom {
+  margin-top: 30rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+
+  .reach-icon {
+    width: 150rpx;
+    height: 150rpx;
+  }
+
+  .reach-text {
+    margin: 20rpx 0;
+    color: #CCCCCC;
+  }
 }
 </style>

+ 2 - 2
pages_category_page1/discount/spikeList.vue

@@ -55,8 +55,8 @@
 				</view>
 				<view class="itemInfo">
 					<p>{{item.productName}}</p>
-					<view v-if="shopId" class="number">限量件 {{item.limitStockNumber}} / 剩余{{item.stockNumber}}件</view>
-					<view v-else class="number">限量件 {{item.limitNumber}} / 剩余{{item.stockNumber}}件</view>
+					<view v-if="shopId" class="number">限量件 {{item.discount}} / 剩余{{item.stockNumber}}件</view>
+					<view v-else class="number">限量件 {{item.discount}} / 剩余{{item.stockNumber}}件</view>
 					<view class="originalPrice">原价: ¥{{item.originalPrice}}</view>
 					<view class="price">
 						<view class="currentPrice flex-items font-color-FF7800">

+ 22 - 15
pages_category_page1/goodsModule/addEvaluate.vue

@@ -53,21 +53,28 @@
 		},
 		onLoad(options) {
 			this.type = options.type;
-			if(options.type == 1){
-				this.addCommentVOList = uni.getStorageSync('addCommentVOList');
-				this.orderProductVO = this.addCommentVOList.skus[0]
-				this.productImage = this.orderProductVO.image
-			}else{
-				this.addCommentVOList = uni.getStorageSync('addCommentVOList');
-				this.orderProductVO = this.addCommentVOList
-				this.productImage = this.orderProductVO.productImage
-			}
-			if(options.commentId){
-				this.commentId = options.commentId
-			}
-			uni.removeStorageSync('addCommentVOList')
-			const res = uni.getStorageSync('storage_key');
-			this.headerToken.Authorization = res.token
+      if(options.detail){
+        const params = this.$getJumpParam(options)
+        this.addCommentVOList = params.addCommentVOList
+        this.orderProductVO = options.type===1?this.addCommentVOList.skus[0]:this.addCommentVOList
+        this.productImage = this.orderProductVO.image
+      }else{
+        if(options.type == 1){
+          this.addCommentVOList = uni.getStorageSync('addCommentVOList');
+          this.orderProductVO = this.addCommentVOList.skus[0]
+          this.productImage = this.orderProductVO.image
+        }else{
+          this.addCommentVOList = uni.getStorageSync('addCommentVOList');
+          this.orderProductVO = this.addCommentVOList
+          this.productImage = this.orderProductVO.productImage
+        }
+        uni.removeStorageSync('addCommentVOList')
+      }
+      if(options.commentId){
+        this.commentId = options.commentId
+      }
+      const res = uni.getStorageSync('storage_key');
+      this.headerToken.Authorization = res.token
 		},
 		onReady() {
 			this.fileList = this.$refs.uUpload.lists

+ 108 - 126
pages_category_page1/goodsModule/answerList.vue

@@ -1,139 +1,95 @@
 <template>
-	<view class="wid bor-line-F7F7F7">
-		<view class="qaBox">
-		  <view class="qaTopInfo">
-		    <view class="qaTopInfoBox">
-		      <image :src="images"></image>
-		      <view class="qaInfoText">
-		        <h3>{{productName}}</h3>
-		        <span>共{{getProblemsList.length}}个问题</span>
-		      </view>
-		    </view>
-		  </view>
-		  <view class="qaListBox">
-		    <view class="listBox" v-for="(pitem,index) in getProblemsList" :key="index">
-		      <view class="itemBox">
-		        <view class="itemAsk">
-		          <i>问</i><span>{{pitem.problem}}</span>
-		        </view>
-				<view v-if="pitem.answers.length>0">
-					<view class="answer" v-for="(witem,index) in twonumansers(pitem.answers)" :key="index">
-					  <view class="answerBox">
-					    <i>答</i><span>{{witem.answer}}</span>
-					  </view>
-					  <view v-if="pitem.ifAnswer==1" class="answerBtn" @click="seeAllFn(pitem.problemId)">立即回答</view>
-					</view>
-				</view>
-		        <view v-else>
-					<view class="answer">
-					  <view class="answerBox flex-row-plus">
-					      <i class="ianswer">答</i><span>暂无答复</span>
-					  </view>
-					  <view v-if="pitem.ifAnswer==1" class="answerBtn" @click="seeAllFn(pitem.problemId)">立即回答</view>
-					</view>
-				</view>
-				<view v-if="pitem.answers.length>1" class="seeAll" @click="seeAllFn(pitem.problemId)">查看全部答复</view>
-		      </view>
-		    </view>
-		  </view>
-		  <view class="putQuestionsBox">
-		    <view class="putQuestionsBtn" @click="goToQuestions">去提问</view>
-		  </view>
-		</view>
-	</view>
+  <view class="wid bor-line-F7F7F7">
+    <view class="qaBox">
+      <view class="qaTopInfo">
+        <view class="qaTopInfoBox">
+          <image :src="productInfo.images"></image>
+          <view class="qaInfoText">
+            <h3>{{ productInfo.productName }}</h3>
+            <span>共{{ getProblemsList.length }}个问题</span>
+          </view>
+        </view>
+      </view>
+      <QuestionsAndAnswersList :problems-list="getProblemsList" :product-info="productInfo" />
+      <view class="putQuestionsBox">
+        <view
+            class="putQuestionsBtn"
+            @click="goToQuestions"
+        >去提问
+        </view>
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
 const NET = require('../../utils/request')
 const API = require('../../config/api')
+import QuestionsAndAnswersList from "./components/QuestionsAndAnswersList";
 export default {
-	name: "qADetail",
-	data(){
-	  return{
-		  getProblemsList:[],//商品问答数据
-		  productId:'',
-		  images:'',
-		  productName:'',
-		  problemsPage:1,
-		  problemsPageSize:10,
-		  loadingType:0
-	  }
-	},
-	onReachBottom(){
-		if(this.loadingType == 1){
-			uni.stopPullDownRefresh()
-		}else{
-			this.problemsPage = this.problemsPage+1
-			this.getProblems()
-		}
-	},
-	onShow() {
-		this.getProblems()
-	},
-	onLoad(options) {
-		this.productId = options.productId
-		this.images = options.img
-		this.productName = options.productName
-		this.getProblems()
-	},
-	methods: {
-		twonumansers(answers){
-			let data = answers.slice(0,1)
-			return data
-		},
-		//商品问答数据
-		getProblems(){
-			NET.request(API.getProblems, {
-				productId:this.productId,
-				page:this.problemsPage,
-				pageSize:this.problemsPageSize
-			},'GET').then(res => {
-				if(res.data.length == 0){
-					this.loadingType = 1
-					this.problemsPage = this.problemsPage
-				}else{
-					this.getProblemsList = this.getProblemsList.concat(res.data.list)
-				}
-			}).catch(res => {
-				uni.showToast({
-					title:'失败',
-					icon:"none"
-				})
-			})
-		},
-		seeAllFn (problemId) {
-		  let data = {
-		  	  productId:this.productId,
-		  	  img:this.images,
-		  	  productName:this.productName,
-		  	  questionlength:this.getProblemsList.length,
-		  	  problemId:problemId
-		  }
-		  uni.setStorageSync("seeAllFnData",data)
-		  uni.navigateTo({
-		    url: 'qADetail'
-		  })
-		},
-		// 提问
-		// 提问
-		goToQuestions () {
-			let data={
-				productId:this.productId,
-				images:this.images,
-				productName:this.productName,
-				questionNumber:this.getProblemsList.length
-			}
-			uni.navigateTo({
-				url: 'putQuestions?data='+JSON.stringify(data)
-			})
-		}
-	}
+  name: "qADetail",
+  components:{QuestionsAndAnswersList},
+  data() {
+    return {
+      productInfo: {},
+      getProblemsList: [],//商品问答数据
+      problemsPage: 1,
+      problemsPageSize: 10,
+      loadingType: 0
+    }
+  },
+  onReachBottom() {
+    if (this.loadingType == 1) {
+      uni.stopPullDownRefresh()
+    } else {
+      this.problemsPage = this.problemsPage + 1
+      this.getProblems()
+    }
+  },
+  onLoad(options) {
+    this.productInfo = this.$getJumpParam(options)
+    this.getProblems()
+  },
+  methods: {
+    //商品问答数据
+    getProblems() {
+      NET.request(API.getProblems, {
+        productId: this.productInfo.productId,
+        page: this.problemsPage,
+        pageSize: this.problemsPageSize
+      }, 'GET').then(res => {
+        if (res.data.length == 0) {
+          this.loadingType = 1
+          this.problemsPage = this.problemsPage
+        } else {
+          this.getProblemsList = this.getProblemsList.concat(res.data.list)
+        }
+      }).catch(res => {
+        uni.showToast({
+          title: '失败',
+          icon: "none"
+        })
+      })
+    },
+    // 提问
+    goToQuestions() {
+      const paramObj = Object.assign({}, this.productInfo, {
+        questionNumber: this.getProblemsList.length,
+        images: this.productInfo.images,
+      })
+      this.$jump('/pages_category_page1/goodsModule/putQuestions', paramObj)
+    }
+  }
 }
 </script>
 
-<style lang="scss" scoped>
+<style
+    lang="scss"
+    scoped
+>
 .qaBox {
   padding-bottom: 140upx;
+
   .ianswer {
     font-style: normal;
     width: 38upx;
@@ -146,10 +102,12 @@ export default {
     margin-right: 30upx;
     color: #FFFFFF;
   }
+
   .qaTopInfo {
     margin-top: 20upx;
     margin-bottom: 30upx;
-	padding: 0 40upx;
+    padding: 0 40upx;
+
     .qaTopInfoBox {
       border-radius: 10upx;
       display: flex;
@@ -157,31 +115,37 @@ export default {
       padding: 15upx 20upx;
       margin-bottom: 55upx;
       background: #F6F6F6;
+
       image {
         width: 60upx;
         height: 60upx;
         border-radius: 5upx;
         margin-right: 20upx;
       }
+
       .qaInfoText {
         h3 {
           font-size: 30upx;
           font-weight: 500;
           color: #333333;
         }
+
         span {
           font-size: 24upx;
           color: #999999;
         }
       }
     }
+
     .qaTitBox {
       padding-bottom: 30upx;
       border-bottom: 1upx solid #EEEEEE;
+
       .qaTit {
         display: flex;
         align-items: center;
         margin-bottom: 35upx;
+
         i {
           width: 38upx;
           height: 38upx;
@@ -193,6 +157,7 @@ export default {
           font-size: 28upx;
           margin-right: 30upx;
         }
+
         h3 {
           font-size: 28upx;
           font-family: PingFang SC;
@@ -200,19 +165,23 @@ export default {
           color: #333333;
         }
       }
+
       .qaTitTime {
         display: flex;
         align-items: center;
+
         img {
           width: 44upx;
           height: 44upx;
           margin-right: 20upx;
         }
+
         .qaName {
           font-size: 28upx;
           color: #666666;
           margin-right: 35upx;
         }
+
         .qaTimeInfo {
           color: #999999;
           font-size: 22upx;
@@ -220,21 +189,26 @@ export default {
       }
     }
   }
+
   .qaListBox {
     .listBox {
       padding: 20upx 60upx 20upx 60upx;
-	  border-bottom: 1upx solid #EEEEEE;
+      border-bottom: 1upx solid #EEEEEE;
+
       .itemBox {
         padding-bottom: 30upx;
         border-bottom: 1upx solid #EEEEEE;
         margin-top: 10rpx;
+
         &:last-child {
           border-bottom: none;
         }
+
         .itemAsk {
           display: flex;
           align-items: center;
           margin-bottom: 42upx;
+
           i {
             font-style: normal;
             width: 38upx;
@@ -247,11 +221,13 @@ export default {
             color: #EEEEEE;
             text-align: center;
           }
+
           span {
             font-size: 28upx;
             color: #333333;
           }
         }
+
         .answer {
           display: flex;
           justify-content: space-between;
@@ -260,6 +236,7 @@ export default {
           .answerBox {
             display: flex;
             align-items: center;
+
             i {
               font-style: normal;
               width: 38upx;
@@ -272,11 +249,13 @@ export default {
               font-size: 24rpx;
               color: #EEEEEE;
             }
+
             span {
               font-size: 26upx;
               color: #666666;
             }
           }
+
           .answerBtn {
             width: 130upx;
             height: 50upx;
@@ -287,6 +266,7 @@ export default {
             font-size: 24upx;
           }
         }
+
         .seeAll {
           margin-left: 68upx;
           font-size: 28upx;
@@ -295,6 +275,7 @@ export default {
       }
     }
   }
+
   .putQuestionsBox {
     position: fixed;
     bottom: 0;
@@ -302,6 +283,7 @@ export default {
     width: 100%;
     background: #FFFFFF;
   }
+
   .putQuestionsBtn {
     width: 421upx;
     height: 67upx;

+ 548 - 0
pages_category_page1/goodsModule/components/GoodActivityDetail.vue

@@ -0,0 +1,548 @@
+<!--
+    * @FileDescription: 商品信息(包括活动信息、优惠券)
+    * @Author: kahu
+    * @Date: 2022/11/7
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/7
+-->
+<template>
+  <view>
+    <!-- 商品详情 -->
+    <swiper
+        class="goodsImgswiper-box "
+        :indicator-dots="true"
+        :autoplay="true"
+    >
+      <swiper-item
+          v-for="(imgItem, index) in productInfo.images"
+          :key="index"
+      >
+        <image
+            class="goodsImg default-img u-skeleton-fillet"
+            :src="imgItem"
+        ></image>
+      </swiper-item>
+    </swiper>
+    <!-- 分享 -->
+    <view
+        class="share-box flex-items-plus"
+        @click="shareMenuShow"
+    >
+      <image
+          class="share-img"
+          src="https://ceres.zkthink.com/static/images/shareBut.png"
+      ></image>
+      <label class="fs24 mar-left-5">分享</label>
+    </view>
+    <view class="goodgDes-box flex-start flex-column">
+      <view
+          v-if="skuSelect.activityType === 0"
+          class="priceBuyNum-box flex-display u-skeleton-fillet flex-sp-between mar-left-30"
+      >
+        <view>
+          <label class="fs36 font-color-C83732">¥</label>
+          <label class="fs36 fs-bold font-color-C83732 mar-left-10">{{ skuSelect.price || 0 }}</label>
+          <label class="fs24 font-color-999 discountsPriceLine mar-left-20">¥
+            {{ skuSelect.originalPrice || 0 }}</label>
+        </view>
+        <label class="fs24 font-color-999">{{ productInfo.users || 0 }}人付款</label>
+      </view>
+      <view
+          v-else-if="skuSelect.activityType === 8"
+          class="sceneMarketingBox"
+      >
+        <view class="flex-row-plus flex-items-plus mar-left-30 mar-top-10">
+          <label class="fs30 font-color-FFF">¥</label>
+          <label class="fs42 mar-left-5 font-color-FFF">{{ skuSelect.price || 0 }}</label>
+          <label class="fs28 mar-left-10 discountsPriceLine font-color-CCC">¥
+            {{ skuSelect.originalPrice || 0 }}</label>
+        </view>
+        <view class="sceneNameBox">{{ productInfo.sceneName }}</view>
+      </view>
+      <view
+          v-else
+          class="seckill-box"
+      >
+        <view
+            class="flex-items flex-sp-between"
+            v-if="skuSelect.activityType === 9 "
+        >
+          <view class="vipImg flex-items">
+            <image
+                class="vip-icon"
+                src="https://ceres.zkthink.com/static/images/vipDetail.png"
+                mode=""
+            >
+            </image>
+          </view>
+          <view class="flex-row-plus flex-items-plus mar-left-30 mar-top-10">
+            <label class="fs30 font-color-FFF">¥</label>
+            <label class="fs42 mar-left-5 font-color-FFF">{{ skuSelect.price || 0 }}</label>
+            <label class="fs28 mar-left-10 discountsPriceLine font-color-999">¥
+              {{ skuSelect.originalPrice || 0 }}
+            </label>
+          </view>
+        </view>
+        <view
+            v-else
+            class="flex-items flex-row flex-sp-between"
+        >
+          <view class="flex-column-plus">
+            <image
+                v-if="[2,4].includes(skuSelect.activityType)"
+                class="seckill-icon"
+                src="https://ceres.zkthink.com/static/images/seckillicon.png"
+                mode=""
+            ></image>
+            <image
+                v-if="[3,5].includes(skuSelect.activityType)"
+                class="discount-icon"
+                src="https://ceres.zkthink.com/static/images/discounticon.png"
+                mode=""
+            ></image>
+            <image
+                v-if="skuSelect.activityType === 1"
+                class="spell-icon"
+                src="https://ceres.zkthink.com/static/images/spellicon.png"
+                mode=""
+            ></image>
+            <view class="flex-row-plus flex-items mar-top-10">
+              <label class="fs30 font-color-FFF">¥</label>
+              <label class="fs42 mar-left-5 font-color-FFF">{{ skuSelect.price || 0 }}</label>
+              <label class="fs28 mar-left-10 discountsPriceLine font-color-999">¥
+                {{ skuSelect.originalPrice || 0 }}
+              </label>
+            </view>
+          </view>
+          <view
+              v-if="[1,2,3,4,5].includes(skuSelect.activityType)"
+              class="countdown flex-column-plus"
+          >
+            <view v-if="timeActiveType">
+              <label class="fs28">距离结束剩余</label>
+              <view class="flex-row-plus fs34 flex-items-plus mar-top-10">
+                <view class="countdown-box flex-items-plus">{{ activeTimeObj.day }}</view>
+                <view class="font-color-999">天</view>
+                <view class="countdown-box flex-items-plus">{{ activeTimeObj.hour }}</view>
+                <view class="font-color-999">:</view>
+                <view class="countdown-box flex-items-plus">{{ activeTimeObj.min }}</view>
+                <view class="font-color-999">:</view>
+                <view class="countdown-box flex-items-plus">{{ activeTimeObj.sec }}</view>
+              </view>
+            </view>
+            <view v-else>
+              <label class="fs28 mar-right-20">即将开始:{{ skuSelect.startTime }}</label>
+              <!--              <view class="fs28 mar-right-20 mar-top-20">{{productInfo.startTime}}</view>-->
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="nameContainer">
+        <view class="goodsName-box overflowNoDot mar-top-30 mar-left-30 u-skeleton-fillet">
+          <label class="goodsName fs32 mar-left-20 ">{{ productInfo.productName }}</label>
+        </view>
+        <view
+            class="collectBox "
+            @click="handleCollect"
+        >
+          <image
+              v-if="productInfo.ifCollect === 1"
+              class="store-icon  "
+              src="https://ceres.zkthink.com/static/images/shoucangActive1.png"
+          ></image>
+          <image
+              v-else
+              class="store-icon"
+              src="https://ceres.zkthink.com/static/images/shoucang2x.png"
+          >
+          </image>
+          <label class="fs22">收藏</label>
+        </view>
+      </view>
+      <view
+          v-if="markTools.length>0 || shopMarkTools.length>0"
+          class="activity-box mar-top-10"
+          @click="couponShowClick"
+      >
+        <label class="fs24 font-color-999">优惠</label>
+        <view class="activity-content mar-left-30 flex-items flex-sp-between flex-row">
+          <view
+              class="fs20 overflow"
+              style="width: 500rpx;"
+          >
+            {{ productInfo.couponSplicing }}
+          </view>
+          <view class="flex-items">
+            <label class="fs24 font-color-C5AA7B">领券</label>
+            <image
+                class="coupon-arrow"
+                src="https://ceres.zkthink.com/static/img/user/arrow.png"
+            ></image>
+          </view>
+        </view>
+      </view>
+    </view>
+
+    <!--  分享弹出  -->
+    <u-action-sheet
+        :list="shareObj.actionList"
+        v-model="shareObj.actionShow"
+        @click="handleShareSelect"
+    ></u-action-sheet>
+
+    <shareSpell
+        ref="shareSpell"
+        @shareCancel="shareCancel"
+        :url="shareObj.url"
+        :img="shareObj.image"
+        :title="shareObj.title"
+    >
+    </shareSpell>
+  </view>
+</template>
+
+
+<script>
+import { TimeFormatting } from "../../../utils/timeUtil";
+import NET from "../../../utils/request";
+import API from "../../../config/api";
+import shareSpell from '../../../component/share.vue'
+
+export default {
+  name: "GoodActivityDetail",
+  components: {shareSpell},
+  data() {
+    return {
+      // 活动倒计时
+      timeDifference: 0,
+      activeTimeObj: {
+        day: '00',
+        hour: '00',
+        min: '00',
+        sec: '00'
+      },
+      countdownInterval: null,
+      // 分享
+      shareObj: {
+        url: '',
+        image: '',
+        title: '好友分享了一个很棒的商品',
+        actionList: [
+          {text: '生成分享海报'},
+          {text: '邀请好友'}
+        ],
+        actionShow: false
+      },
+    }
+  },
+  props: {
+    // 商品信息
+    productInfo: {
+      type: Object,
+      default: () => ({})
+    },
+    // 当前选中的sku
+    skuSelect: {
+      type: Object,
+      default: () => ({})
+    },
+    timeActiveType: {
+      type: Boolean,
+      default: () => false
+    },
+    markTools: {
+      type: Array,
+      default: () => ([])
+    },
+    shopMarkTools: {
+      type: Array,
+      default: () => ([])
+    }
+  },
+  methods: {
+    /**
+     * 初始化活动倒计时
+     * @param endTimestamp
+     */
+    handleGetCountDownNumber(endTimestamp) {
+      endTimestamp = endTimestamp.substring(0, 19).replace(/-/g, '/');
+      // 与当前时间的时间差(秒)
+      const timeDifference = (new Date(endTimestamp).getTime() - new Date().getTime()) / 1000;
+      this.timeDifference = timeDifference
+      this.activeTimeObj = TimeFormatting(timeDifference)
+      this.handleCountDown()
+    },
+
+    /**
+     * 开始倒计时
+     */
+    handleCountDown() {
+      if (this.countdownInterval) {
+        return
+      }
+      this.countdownInterval = setInterval(() => {
+        if (this.timeDifference <= 0) {
+          clearInterval(this.countdownInterval)
+          uni.showToast({
+            title: "活动结束",
+            duration: 2000,
+            icon: 'none'
+          })
+          this.$emit('activityEnd', 0)
+        } else {
+          this.timeDifference--
+          this.activeTimeObj = TimeFormatting(this.timeDifference)
+        }
+      }, 1000)
+    },
+
+    /**
+     * 拉起父组件优惠券
+     */
+    couponShowClick() {
+      this.$emit('couponClick')
+    },
+
+
+    /**
+     * 收藏
+     */
+    handleCollect() {
+      if (this.productInfo.ifCollect === 0) {
+        NET.request(API.collect, {
+          productId: parseInt(this.productInfo.productId)
+        }, 'POST').then(res => {
+          this.productInfo.ifCollect = 1
+          uni.showToast({
+            title: '收藏成功',
+            icon: "success"
+          })
+        })
+      } else {
+        NET.request(API.cancelCollect, {
+          ids: [this.productInfo.productId]
+        }, 'PUT').then(res => {
+          this.productInfo.ifCollect = 0
+          uni.showToast({
+            title: '取消收藏成功',
+            icon: "success"
+          })
+        })
+      }
+    },
+
+    /**
+     * 海报分享
+     */
+    sharePoster() {
+      let system = undefined
+      // #ifdef APP-PLUS
+      system = 1
+      // #endif
+
+      // #ifdef H5
+      system = 3
+      // #endif
+
+      // #ifdef MP-WEIXIN
+      system = 2
+      // #endif
+
+      // #ifdef MP-ALIPAY
+      system = 4
+      // #endif
+      uni.showLoading({
+        mask: true,
+        title: '请稍候...'
+      })
+      NET.request(API.getSharePic, {
+        productId: this.productInfo.productId,
+        shopId: this.productInfo.shopId,
+        skuId: this.skuSelect.skuId,
+        terminal: system
+      }, 'GET').then(res => {
+        uni.hideLoading()
+        // 推广商品
+        uni.navigateTo({
+          url: `/pages_category_page1/distributionModule/shareProduct?shareType=2&productImage=${ this.productInfo.images[0] }&shopId=${ this.productInfo.shopId }&productId=${ this.productInfo.productId }&skuId=${ this.skuSelect.skuId }&productName=${ this.productInfo.productName }&price=${ this.productInfo.price }&headImage=${ res.data.headImage }&shareName=${ res.data.name }&shareImg=${ res.data }`
+        });
+      }).catch(res => {
+        uni.hideLoading()
+      })
+    },
+    shareMenuShow() {
+      this.shareObj.actionShow = true
+    },
+    shareCancel() {
+      this.$refs.shareSpell.shareShow = false
+    },
+    handleShareSelect(index) {
+      if (index === 0) {
+        this.sharePoster()
+      } else {
+        this.shareObj.url = '/pages_category_page1/goodsModule/goodsDetails?shopId=' + this.productInfo.shopId + '&productId=' + this.productInfo.productId + '&skuId=' + this.skuSelect.skuId
+        this.shareObj.image = this.productInfo.images[0]
+        this.shareObj.title = `【cereshop】好友分享了一个好物给您!${ this.productInfo.productName } ¥${ this.productInfo.price } `
+        this.$refs.shareSpell.shareShow = true
+      }
+    },
+  }
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+
+.goodsImgswiper-box {
+  width: 750upx;
+  height: 750upx;
+
+  .goodsImg {
+    width: 750upx;
+    height: 750upx;
+  }
+}
+
+.share-box {
+  width: 200upx;
+  height: 60upx;
+  background-color: #FFFFFF;
+  border-radius: 30upx 0 0 30upx;
+  position: absolute;
+  top: 30upx;
+  right: 0;
+  z-index: 99;
+
+  .share-img {
+    width: 36upx;
+    height: 36upx;
+  }
+}
+
+.goodgDes-box {
+  background-color: #FFFFFF;
+  width: 100%;
+  padding-bottom: 25upx;
+
+  .priceBuyNum-box {
+    width: 677upx;
+    margin-top: 30upx;
+  }
+
+  .nameContainer {
+    display: flex;
+
+    .goodsName-box {
+      width: 677upx;
+      height: 85upx;
+
+      .img618-cion {
+        width: 70upx;
+        height: 36upx;
+      }
+    }
+
+    .collectBox {
+      width: 80rpx;
+      margin: 0 30rpx 0 15rpx;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+    }
+
+    .store-icon {
+      width: 48upx;
+      height: 48upx;
+    }
+  }
+
+  .discounts-box {
+    margin-top: 20upx;
+
+    .discounts-text {
+      margin-left: 10upx;
+      color: #FF7800;
+      background-color: #FFE4CC;
+      padding: 6upx 12upx;
+      border-radius: 4upx;
+    }
+  }
+
+  .activity-box {
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: flex-end;
+    border-top: 1upx solid #EDEDED;
+
+    .activity-content {
+      width: 614upx;
+      padding-top: 20upx;
+
+      .activity-text {
+        color: #FF7700;
+        border: 1upx solid #FF7700;
+        padding: 6upx 23upx;
+      }
+
+      .coupon-arrow {
+        width: 16upx;
+        height: 24upx;
+        margin-left: 15upx;
+      }
+    }
+  }
+}
+
+.seckill-box {
+  width: 100%;
+  background: url("https://ceres.zkthink.com/static/images/storeTop_Img.png") no-repeat left top;
+  padding: 35rpx 30rpx;
+
+  .seckill-icon {
+    width: 187rpx;
+    height: 41rpx;
+    background-size: contain;
+  }
+
+  .vip-icon {
+    width: 187rpx;
+    height: 41rpx;
+    background-size: contain;
+  }
+
+  .discount-icon {
+    width: 187rpx;
+    height: 41rpx;
+    background-size: contain;
+  }
+
+  .spell-icon {
+    width: 182rpx;
+    height: 37rpx;
+    background-size: contain;
+    margin-bottom: 20rpx;
+  }
+
+  .countdown {
+    text-align: center;
+
+    label {
+      text-align: center;
+      color: #CCCCCC;
+    }
+  }
+
+  .countdown-box {
+    padding: 0 8rpx;
+    height: 48rpx;
+    color: #FFEBC4;
+    background-color: #525252;
+    margin: 10rpx;
+  }
+}
+
+</style>

+ 587 - 0
pages_category_page1/goodsModule/components/GoodEvaluateAndQuestion.vue

@@ -0,0 +1,587 @@
+<!--
+    * @FileDescription:商品评价和问答
+    * @Author: kahu
+    * @Date: 2022/11/7
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/7
+-->
+<template>
+  <div class="content">
+    <view class="evaQaTab flex-items flex-sp-around">
+      <view
+          :class="{active: activeTab === 1}"
+          class="evaBtn"
+          @click="activeTab = 1"
+      >
+        <view class="tabTit">宝贝评价({{ commentList.length }})</view>
+      </view>
+      <view
+          :class="{active: activeTab === 2}"
+          class="qaBtn"
+          @click="activeTab = 2"
+      >
+        <view class="tabTit">商品问答({{ problemsTotal }})</view>
+      </view>
+    </view>
+    <!-- 评价 -->
+    <view class="borRig-line-20"></view>
+    <view
+        class="evaluate-box flex-start flex-column"
+        v-show="activeTab === 1"
+    >
+      <view
+          class="evaluateTag-box"
+          v-if="commentList.length>0"
+      >
+        <view class="evaluateTag-text">
+          全部({{ commentList.length }})
+        </view>
+      </view>
+      <view
+          class="evaluate-contentbox mar-top-30"
+          v-for="(commentItem, commentIndex) in commentList.slice(0,2)"
+          :key="commentIndex"
+      >
+        <view class="evaluate-content flex-items flex-row flex-sp-between">
+          <view class="flex-items">
+            <image
+                class="user-headSmallImg"
+                :src="commentItem.headImage"
+            ></image>
+            <label class="fs28 mar-left-20">{{ commentItem.name }}</label>
+          </view>
+          <label class="font-color-999 fs22">{{ commentItem.createTime }}</label>
+        </view>
+        <view class="evaluateDes-box">
+          <label class="evaluateDes">{{ commentItem.comment }}</label>
+        </view>
+        <view
+            class="item-image-box"
+            v-if="commentItem.image"
+        >
+          <view
+              v-for="(imgItem, imgIndex) in (commentItem.image.split(',')||[])"
+              :key="imgIndex"
+          >
+            <image
+                @click="handlePreviewImage(commentList[commentIndex].images,imgIndex)"
+                class="img-item"
+                :src="imgItem"
+            ></image>
+          </view>
+        </view>
+        <view class="item-line"></view>
+        <view
+            class="item-like-box"
+            v-if="commentItem.addComment !== ''"
+        >
+          <view class="addEvaluate">
+            <view>追加评价:{{ commentItem.addComment }}</view>
+            <view
+                class="item-image-box"
+                v-if="commentItem.addImages"
+            >
+              <view
+                  v-for="(itemAddImg, imgIndex) in commentItem.addImages"
+                  :key="imgIndex"
+              >
+                <image
+                    @click="handlePreviewImage(commentList[commentIndex].addImages,imgIndex)"
+                    class="img-item"
+                    :src="itemAddImg"
+                >
+                </image>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="like-box">
+          <image
+              class="like-img"
+              @click="handlePraise(commentItem,0)"
+              src="https://ceres.zkthink.com/static/images/praiseActiveIcon.png"
+              v-if="commentItem.ifLike === 1"
+          ></image>
+          <image
+              class="like-img"
+              @click="handlePraise(commentItem,1)"
+              src="https://ceres.zkthink.com/static/images/praiseIcon.png"
+              v-else
+          ></image>
+          <view class="like-num">{{ commentItem.likes }}</view>
+        </view>
+      </view>
+      <view
+          class="moreBox"
+          v-if="commentList.length>0"
+          @click="handleJumpToComments"
+      >
+        <label class="fs24">查看全部</label>
+        <image
+            class="evaluateAllArrow-icon mar-left-10"
+            src="https://ceres.zkthink.com/static/img/user/arrow.png"
+        ></image>
+      </view>
+    </view>
+    <!-- 问答 -->
+    <view class="borRig-line-20"></view>
+    <view
+        class="questions"
+        v-show="activeTab === 2"
+    >
+      <view class="questionInfo flex-items flex-row flex-sp-between">
+        <view class="infoTit">宝贝好不好,问问已买过的人</view>
+        <view
+            class="putQuestion"
+            @click="handleJumpToQuestion"
+        >去提问
+        </view>
+      </view>
+      <view class="listBox">
+        <QuestionsAndAnswersList
+            :product-info="productInfo"
+            :problems-list="problemsList"
+        />
+        <view
+            class="moreBox"
+            v-if="problemsList.length>0"
+            @click="handleJumpAllAnswer"
+        >
+          <label class="fs24">查看全部</label>
+          <image
+              class="evaluateAllArrow-icon mar-left-10"
+              src="https://ceres.zkthink.com/static/img/user/arrow.png"
+          ></image>
+        </view>
+      </view>
+    </view>
+  </div>
+</template>
+
+<script>
+const NET = require('../../../utils/request')
+const API = require('../../../config/api')
+import lodash from 'lodash'
+import QuestionsAndAnswersList from "./QuestionsAndAnswersList";
+
+export default {
+  name: "GoodEvaluateAndQuestion",
+  components: {QuestionsAndAnswersList},
+  data() {
+    return {
+      // 当前选中的tab
+      activeTab: 1, // 1评价 2问答
+      problemsList: [], // 问题列表
+      problemsTotal:0 //问题总数
+    }
+  },
+  props: {
+    commentList: {
+      type: Array,
+      default: () => []
+    },
+    productInfo: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  mounted() {
+    this.handleGetProblemList()
+  },
+  methods: {
+    /**
+     * 获取问答数据
+     * @return {Promise<void>}
+     */
+    async handleGetProblemList() {
+      if(!this.productInfo.productId){
+        return
+      }
+      const res = await NET.request(API.getProblems, {
+        productId: this.productInfo.productId,
+        page: 1,
+        pageSize: 2
+      }, 'GET')
+      this.problemsList = res.data.list
+      this.problemsTotal = res.data.total
+    },
+
+    /**
+     * 放大查看照片
+     * @param dataList 所有照片
+     * @param currentIndex 选中索引
+     */
+    handlePreviewImage(dataList, currentIndex) {
+      uni.previewImage({
+        current: dataList[currentIndex],
+        urls: dataList
+      })
+    },
+
+    /**
+     * 点赞
+     * @param commentItem 当前评论项
+     * @param action 0取消1点赞
+     */
+    handlePraise: lodash.debounce(async function (commentItem, actionType) {
+      uni.showLoading({
+        mask: true,
+        title: '提交中...',
+      })
+      try {
+        await NET.request(API.LikeOrUnLikeComment, {
+          commentId: commentItem.commentId,
+          ifLike: actionType
+        }, 'POST')
+        if (commentItem.ifLike === 1) {
+          commentItem.ifLike = 0
+          commentItem.likes--
+        } else {
+          commentItem.ifLike = 1
+          commentItem.likes++
+        }
+      } finally {
+        uni.hideLoading()
+      }
+    }, 500),
+
+    /**
+     * 跳转到全部评论
+     */
+    handleJumpToComments() {
+      this.$jump('/pages_category_page1/goodsModule/evaluateList?commentList=' + JSON.stringify(this.commentList))
+    },
+
+    /**
+     * 跳转到提问
+     */
+    handleJumpToQuestion() {
+      const paramObj = Object.assign({}, this.productInfo, {
+        questionNumber: this.problemsList.length,
+        images: this.productInfo.images[0],
+      })
+      this.$jump('/pages_category_page1/goodsModule/putQuestions', paramObj)
+    },
+
+    /**
+     * 跳转到该商品下所有问答
+     */
+    handleJumpAllAnswer() {
+      const paramObj = Object.assign({}, this.productInfo, {
+        images: this.productInfo.images[0]
+      })
+      this.$jump('/pages_category_page1/goodsModule/answerList', paramObj)
+    }
+  }
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.evaQaTab {
+  height: 82rpx;
+  line-height: 82rpx;
+  border-bottom: #F3F4F5 solid 2rpx;
+  font-size: 30rpx;
+  color: #CCCCCC;
+
+  .evaBtn {
+    width: 50%;
+    position: relative;
+    text-align: center;
+
+    &:before {
+      content: '';
+      width: 2rpx;
+      height: 30rpx;
+      background: #CCCCCC;
+      display: block;
+      position: absolute;
+      right: 0;
+      top: 20rpx;
+    }
+  }
+
+  .qaBtn {
+    width: 50%;
+    text-align: center;
+  }
+
+  .tabTit {
+    display: inline-block;
+    height: 82rpx;
+    line-height: 82rpx;
+  }
+
+  .active {
+    color: #333333;
+
+    .tabTit {
+      border-bottom: 4rpx solid #444444;
+    }
+  }
+}
+
+.questions {
+  .questionInfo {
+    padding: 0 30upx;
+    min-height: 150upx;
+
+    .infoTit {
+      font-size: 28upx;
+    }
+
+    .putQuestion {
+      width: 140upx;
+      height: 60upx;
+      background: #333333;
+      line-height: 60upx;
+      font-size: 24upx;
+      color: #FFEBC4;
+      padding-left: 20rpx;
+      position: relative;
+
+      &:before {
+        content: '';
+        width: 60rpx;
+        height: 60rpx;
+        background: url("https://ceres.zkthink.com/static/images/arrow.png") no-repeat center center;
+        background-size: contain;
+        display: block;
+        position: absolute;
+        right: 0;
+      }
+    }
+  }
+
+  .listBox {
+    padding: 0 30upx;
+    border-bottom: 20upx solid #EEEEEE;
+
+    .itemBox {
+      padding-bottom: 30upx;
+      border-bottom: 1upx solid #EEEEEE;
+      margin-bottom: 30upx;
+
+      &:last-child {
+        border-bottom: none;
+      }
+
+      .itemAsk {
+        display: flex;
+        align-items: center;
+        margin-bottom: 42upx;
+
+        i {
+          font-style: normal;
+          width: 38upx;
+          height: 38upx;
+          line-height: 38upx;
+          background: #C5AA7B;
+          display: block;
+          margin-right: 30upx;
+          font-size: 24upx;
+          color: #FFFFFF;
+          text-align: center;
+        }
+
+        span {
+          font-size: 28upx;
+          color: #333333;
+        }
+      }
+
+      .answer {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-bottom: 30upx;
+
+        .answerBox {
+          display: flex;
+          align-items: center;
+
+          i {
+            font-style: normal;
+            width: 38upx;
+            height: 38upx;
+            line-height: 38upx;
+            background: #C5AA7B;
+            display: block;
+            text-align: center;
+            margin-right: 30upx;
+            font-size: 24rpx;
+            color: #FFFFFF;
+          }
+
+          span {
+            font-size: 26upx;
+            color: #666666;
+          }
+        }
+
+        .answerBtn {
+          width: 130upx;
+          height: 50upx;
+          line-height: 50upx;
+          border: #333333 2rpx solid;
+          text-align: center;
+          color: #333;
+          font-size: 24upx;
+        }
+      }
+
+      .seeAll {
+        margin-left: 68upx;
+        font-size: 28upx;
+        color: #C5AA7B;
+      }
+    }
+  }
+}
+
+.evaluate-box {
+  background-color: #FFFFFF;
+  margin-top: 20upx;
+
+  .evaluate {
+    width: 690upx;
+    padding: 20upx 0;
+    border-bottom: 1upx solid #EDEDED;
+  }
+
+  .evaluateTitle-box {
+    width: 690upx;
+    border-bottom: 1upx solid #EDEDED;
+    padding-bottom: 20upx;
+  }
+
+  .evaluateAllArrow-icon {
+    width: 18upx;
+    height: 24upx;
+  }
+
+  .evaluateTag-box {
+    margin-top: 10upx;
+    margin-left: 10upx;
+    padding-bottom: 10upx;
+    display: flex;
+    flex-wrap: wrap;
+
+    .evaluateTag-text {
+      background-color: #F4F4F4;
+      border-radius: 6upx;
+      padding: 16upx 14upx;
+      color: #656565;
+      margin-left: 20upx;
+      margin-top: 20upx;
+    }
+  }
+
+  .evaluate-contentbox {
+    display: flex;
+    justify-content: center;
+    flex-direction: column;
+    margin-left: 30upx;
+    // border-bottom: 1upx solid #EDEDED;
+    padding-bottom: 50upx;
+
+    .evaluate-content {
+      width: 670upx;
+      display: flex;
+      justify-content: space-between;
+
+      .user-headSmallImg {
+        width: 46upx;
+        height: 46upx;
+        border-radius: 50%;
+      }
+    }
+
+    .evaluateDes-box {
+      width: 670upx;
+      margin-top: 30upx;
+
+      .evaluateDes {
+        width: 670upx;
+      }
+    }
+
+    .addEvaluate {
+      padding-top: 30upx;
+    }
+  }
+}
+
+
+.item-image-box {
+  width: 700upx;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+
+  .img-item {
+    width: 223upx;
+    height: 223upx;
+    border-radius: 10upx;
+    margin-right: 10upx;
+    margin-top: 10upx;
+  }
+}
+
+
+.item-line {
+  width: 690upx;
+  height: 1px;
+  background: rgba(238, 238, 238, 1);
+  margin-top: 20upx;
+}
+
+.item-like-box {
+  display: flex;
+  flex-direction: row;
+  width: 690upx;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.like-box {
+  display: flex;
+  flex-direction: row;
+  padding-top: 30upx;
+  align-items: center;
+  justify-content: flex-end;
+  margin-right: 50upx;
+
+  .like-img {
+    width: 48upx;
+    height: 48upx;
+  }
+
+  .like-num {
+    font-size: 28upx;
+    font-weight: 500;
+    color: rgba(51, 51, 51, 1);
+    margin-left: 30upx;
+  }
+}
+
+.moreBox {
+  width: 170rpx;
+  height: 54rpx;
+  line-height: 54rpx;
+  margin: 0 auto 50rpx auto;
+  border: 2rpx solid #C5AA7B;
+  color: #C5AA7B;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+
+  image {
+    width: 10rpx;
+    height: 20rpx;
+  }
+}
+</style>

+ 767 - 0
pages_category_page1/goodsModule/components/GoodSkuSelect.vue

@@ -0,0 +1,767 @@
+<!--
+    * @FileDescription: sku选择器(花呗、拼团下单)
+    * @Author: kahu
+    * @Date: 2022/11/7
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/7
+-->
+<template>
+  <div class="content">
+    <u-popup
+        v-model="goodsDetailShowFlag"
+        mode="bottom"
+        border-radius="14"
+    >
+      <view class="goosDetailshow-box">
+        <view class="detailImg-box flex-row-plus">
+          <image
+              class="detailImg"
+              :src="selectedSku.image"
+          ></image>
+          <view class="flex-column-plus mar-left-40">
+            <view class="font-color-C5AA7B">
+              <label class="fs24">¥</label>
+              <label
+                  class="fs36 mar-left-10"
+                  v-text="selectedSku.activityType === 1 && btnType === 4 ? selectedSku['salePrice'] : selectedSku.price"
+              ></label>
+            </view>
+            <label class="fs24 font-color-999 mar-top-20">库存 {{ selectedSku.stockNumber }} 件</label>
+            <label class="fs24 mar-top-20">已选</label>
+          </view>
+        </view>
+        <view class="color-box flex-column-plus">
+          <view
+              v-for="(skuRowItem,skuRowIndex) in productData['names']"
+              :key="skuRowIndex"
+          >
+            <label
+                class="fs26 font-color-333"
+                v-if="skuRowItem['nameCode']"
+            >{{ skuRowItem.skuName }}</label>
+            <view class="colorName-box">
+              <view
+                  class="pad-bot-30"
+                  v-for="(skuColItem, skuColIndex) in skuRowItem.values"
+                  :key="skuColIndex"
+              >
+                <view
+                    class="colorName"
+                    :class="{'colorName-on' : selectedAttr[skuRowItem['nameCode']] === skuColItem.valueCode}"
+                    @click="handleClickSkuItem(skuRowItem['nameCode'], skuColItem.valueCode)"
+                >
+                  {{ skuColItem.skuValue }}
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="goodsNumCent">
+          <view
+              class="goodsNum-box flex-row-plus flex-sp-between"
+              :class="{'bottom-line' :aliAgingObj.supportHanaUta}"
+          >
+            <label class="font-color-333 fs26">数量</label>
+            <view class="goodsNum">
+              <view
+                  class="item subtract"
+                  @click="handleNumSub"
+              >-
+              </view>
+              <view
+                  class="item goodsNumber"
+                  v-model="buyNum"
+              >{{ buyNum }}
+              </view>
+              <view
+                  class="item add"
+                  @click="handleNumAdd"
+              >+
+              </view>
+            </view>
+          </view>
+        </view>
+        <!-- 花呗分期 -->
+        <view
+            class="huabei-box flex-column-plus"
+            v-if="aliAgingObj.supportHanaUta"
+        >
+          <label class="font-color-999 fs24">花呗分期</label>
+          <scroll-view
+              class="fenqi-box"
+              scroll-x="true"
+          >
+            <view
+                class="huabei-item"
+                :class="[{'fenqi-on' :aliAgingObj.selectIndex === 0},{'disabled' :aliAgingObj.disableSelectList[0]}]"
+                @click="handleSelectAliAging(0)"
+            >
+              <label class="huabei-period">分3期(含手续费)</label>
+              <label class="huabei-money">¥{{ aliAgingObj.agingMoneyList[0] }}/期</label>
+            </view>
+            <view
+                class="huabei-item"
+                :class="[{'fenqi-on' :aliAgingObj.selectIndex  === 1},{'disabled' :aliAgingObj.disableSelectList[1]}]"
+                @click="handleSelectAliAging(1)"
+            >
+              <label class="huabei-period">分6期(含手续费)</label>
+              <label class="huabei-money">¥{{ aliAgingObj.agingMoneyList[1] }}/期</label>
+            </view>
+            <view
+                class="huabei-item"
+                :class="[{'fenqi-on' :aliAgingObj.selectIndex  === 2},{'disabled' :aliAgingObj.disableSelectList[2]}]"
+                @click="handleSelectAliAging(2)"
+            >
+              <label class="huabei-period">分12期(含手续费)</label>
+              <label class="huabei-money">¥{{ aliAgingObj.agingMoneyList[2] }}/期</label>
+            </view>
+          </scroll-view>
+        </view>
+
+        <view
+            v-if="btnType===6"
+            class="skuSelectBtn"
+        >
+          <view
+              class="flex-row-plus offShelf"
+              v-if="productData.shelveState === 0"
+          >
+            商品已下架
+          </view>
+          <view
+              class="flex-row-plus flex-items flex-sp-around"
+              v-else-if="selectedSku.activityType === 1"
+          >
+            <view
+                class="selectJoinShop selectBtn font-color-333"
+                @click="handleBuyNow"
+            >单独购买
+            </view>
+            <view
+                class="selectBuyNow selectBtn font-color-FFEBC4"
+                @click="handleBuyWithGroup(1)"
+            >我要开团
+            </view>
+          </view>
+          <view
+              class="flex-row-plus flex-items flex-sp-around"
+              v-else
+          >
+            <view
+                class="selectJoinShop selectBtn font-color-333"
+                @click="handleAddCart"
+            >加入购物车
+            </view>
+            <view
+                class="selectBuyNow selectBtn font-color-FFEBC4"
+                @click="handleBuyNow"
+            >立即购买
+            </view>
+          </view>
+        </view>
+        <view v-else>
+          <view
+              v-if="selectedSku.activityType === 1 && collageId !== 0"
+              class="goosDetailbut-box flex-items-plus"
+              :style="{'padding-bottom':(isIphone === true? 60:20)+'rpx'}"
+          >
+            <view
+                class="joinbuyBut"
+                @click="handleBuyWithGroup(2)"
+            >确定
+            </view>
+          </view>
+          <view
+              v-else-if="selectedSku.activityType === 1 && btnType === 3"
+              class="goosDetailbut-box flex-row-plus"
+              :style="{'padding-bottom':(isIphone === true? 60:20)+'rpx'}"
+          >
+            <view
+                class="buyNowBut"
+                @click="handleBuyWithGroup(1)"
+            >去拼团
+            </view>
+          </view>
+          <view
+              v-else
+              class="goosDetailbut-box flex-row-plus"
+              :style="{'padding-bottom':(isIphone === true? 60:20)+'rpx'}"
+          >
+            <view
+                v-if="btnType === 1"
+                class="buyNowBut"
+                @click="handleAddCart"
+            >确认
+            </view>
+            <view
+                v-else
+                class="buyNowBut"
+                @click="handleBuyNow(2)"
+            >确认
+            </view>
+          </view>
+        </view>
+      </view>
+    </u-popup>
+  </div>
+</template>
+
+<script>
+import NET from "../../../utils/request";
+import API from "../../../config/api";
+
+export default {
+  name: "GoodSkuSelect",
+  data() {
+    return {
+      // 是否展示SKU弹窗
+      goodsDetailShowFlag: false,
+      // 已经选中的valueCode key => value  names.nameCode=>values.valueCode 处理选中渲染
+      selectedAttr: {},
+      // 当前选中的skuMap对象(服务端数据)
+      selectedSku: {},
+      // 1加入购物车 2立即购买 3开团 4单独购买 6SKU选择
+      btnType: 0,
+      buyNum: 1,
+      // 花呗对象
+      aliAgingObj: {
+        supportHanaUta: false,
+        selectIndex: -1,
+        disableSelectList: [true, true, true],
+        agingMoneyList: ["0.00", "0.00", "0.00"]
+      }
+    }
+  },
+  props: {
+    productData: {
+      type: Object,
+      default: () => ({})
+    },
+    isIphone: {
+      type: Boolean,
+      default: () => false
+    },
+    collageId: {
+      type: Number,
+      default: () => 0
+    }
+  },
+  methods: {
+    /**
+     * 当前SKU数量减少
+     */
+    handleNumSub() {
+      if (this.buyNum > 1) {
+        this.buyNum = this.buyNum - 1
+      } else {
+        uni.showToast({
+          title: '亲!至少一件哦!',
+          icon: "none"
+        })
+      }
+    },
+
+    /**
+     * 当前SKU数量加
+     */
+    handleNumAdd() {
+      if (this.buyNum < this.selectedSku.stockNumber) {
+        this.buyNum = this.buyNum + 1
+      } else {
+        uni.showToast({
+          title: '库存不足!',
+          icon: "none"
+        })
+      }
+    },
+
+    /**
+     * 根据skuId选择SKU
+     * @param skuId SkuId
+     */
+    handleSelectBySkuId(skuId) {
+      if (!skuId) return
+      // 当前商品后端返回的所有sku的排列组合
+      const allSkuValueGroupMap = this.productData.map
+      for (const allSkuValueGroupMapKey in allSkuValueGroupMap) {
+        if (parseInt(allSkuValueGroupMap[allSkuValueGroupMapKey].skuId) !== parseInt(skuId)) continue;
+        this.selectedSku = allSkuValueGroupMap[allSkuValueGroupMapKey]
+        this.echoFatherRowText(this.productData, this.selectedSku, this.buyNum)
+        // 控制组件选中渲染
+        const selectValueCodes = this.selectedSku['valueCodes'].split(',')
+        for (const skuRow of this.productData.names) {
+          for (const skuCol of skuRow.values) {
+            if (!selectValueCodes.includes(skuCol['valueCode'])) continue;
+            this.$set(this.selectedAttr, skuRow['nameCode'], skuCol['valueCode'])
+            break; // 一行的sku只会有一个value
+          }
+        }
+      }
+    },
+
+    /**
+     * 点击sku的一项
+     * @param nameCode SKU行的nameCode
+     * @param valueCode SKU列的valueCode
+     * nameCodeValueCodeClick
+     */
+    handleClickSkuItem(nameCode, valueCode) {
+      // 当前选中
+      this.$set(this.selectedAttr, nameCode, valueCode)
+      // 获取到所有的sku的values.valueCode
+      let values = []
+      for (const key in this.selectedAttr) {
+        values.push(this.selectedAttr[key])
+      }
+      // 当前选中的sku的key组合
+      // 后端返回的productData.map中,排列组合了所有values[].valueCode的情况,使用逗号分隔
+      const nowSelectSkuValueGroupKey = values.join(',') // 相较于allSkuValueGroupMap的key
+      // 后端返回的所有sku组合(values.valueCode)
+      const allSkuValueGroupMap = this.productData.map
+      // 遍历后端数据
+      for (const allSkuValueGroupMapKey in allSkuValueGroupMap) {
+        // 当和当前选中的sku一致
+        if (nowSelectSkuValueGroupKey === allSkuValueGroupMapKey) {
+          this.selectedSku = allSkuValueGroupMap[allSkuValueGroupMapKey]
+          this.echoFatherRowText(this.productData, this.selectedSku, this.buyNum)
+        }
+      }
+
+    },
+
+    /**
+     * 回显父组件(通讯)
+     * @param productData 当前商品对象
+     * @param skuItem 当前选中的sku的后端数据
+     * @param buyNum 当前sku购买数量
+     */
+    echoFatherRowText(productData, skuItem, buyNum) {
+      // 获取到当前选中的sku的valueCode
+      const currentSku = []
+      // 取出所有的valueCode
+      const nowSelectValueCodeList = skuItem['valueCodes'].split(',')
+      const skuRows = productData.names
+      for (const skuRow of skuRows) {
+        const skuValues = skuRow.values
+        for (const skuValue of skuValues) {
+          if (!nowSelectValueCodeList.includes(skuValue.valueCode)) continue;
+          const currentSkuItem = {skuText: ''}
+          if (skuValue.valueCode === '单款项') {
+            currentSkuItem['skuText'] = skuValue['skuValue']
+          } else {
+            currentSkuItem['skuText'] = `${ skuValue.skuName }:${ skuValue.skuValue }`
+          }
+          currentSku.push(currentSkuItem)
+          break; // 只会对应一个value数据,找到就break减少循环
+        }
+      }
+      this.$emit('getCurrentSku', {
+        skuItem,
+        currentSku,
+        buyNum
+      })
+      // 选中sku之后,做一些相应的操作
+      // postSelectSku依赖于getCurrentSku的数据
+      this.$emit('postSelectSku')
+    },
+
+    //加入购物车
+    async handleAddCart() {
+      this.handleCheckIsLogin()
+      if (this.selectedSku.stockNumber < 1) {
+        return uni.showToast({
+          title: '库存不足',
+          icon: "none"
+        })
+      }
+      // uni.showLoading({
+      //   mask: true,
+      //   title: '添加中...',
+      // })
+      try {
+        const postData = {
+          skuId: this.selectedSku.skuId,
+          number: this.buyNum,
+        }
+        await NET.request(API.ShoppingaddCart, postData, 'POST')
+        // 埋点
+        this.$store.dispatch('doPointer', {
+          eventType: 2,
+          productIds: this.productId
+        })
+        // 给购物车小图标赋值数量
+        let newAllCartNum = uni.getStorageSync('allCartNum') + this.buyNum
+        uni.setStorageSync('allCartNum', newAllCartNum)
+        this.$emit('changeCartNum',newAllCartNum)
+        uni.showToast({
+          title: '添加成功',
+          icon: 'none'
+        })
+        setTimeout(()=>{
+          this.buyNum = 1
+          this.goodsDetailShowFlag = false
+        },2000)
+      }finally {
+        uni.hideLoading()
+      }
+    },
+
+    /**
+     * 立即购买(下单)
+     */
+    handleBuyNow() {
+      this.handleCheckIsLogin()
+      if (this.selectedSku.stockNumber < 1) {
+        return uni.showToast({
+          title: '库存不足',
+          icon: "none"
+        })
+      }
+      if (this.buyNum > this.selectedSku.stockNumber && this.selectedSku.stockNumber !== 0) {
+        return uni.showToast({
+          title: '已超出最大数量限制',
+          icon: "none"
+        })
+      }
+
+      //组装后端数据
+      let list = [{
+        ifWork: 0,
+        shopId: this.productData.shopId,
+        shopName: this.productData.shopName,
+        shopDiscountId: this.shopDiscountId > 0 ? this.shopDiscountId : null,
+        shopSeckillId: this.shopSeckillId > 0 ? this.shopSeckillId : null,
+        skus: [{
+          productId: this.productData.productId,
+          skuId: this.selectedSku.skuId,
+          productName: this.productData.productName,
+          image: this.selectedSku.image,
+          price: this.selectedSku.price,
+          weight: 0,
+          number: this.buyNum,
+          SKU: "",
+          total: this.selectedSku.price * this.buyNum,
+          ifLogistics: 1
+        }]
+      }]
+      uni.setStorageSync('skuItemDTOList', list)
+      this.buyNum = 1
+      this.goodsDetailShowFlag = false
+      uni.navigateTo({
+        url: '../orderModule/orderConfirm?type=1',
+      })
+    },
+
+    /**
+     * 拼团下单
+     * @param type 1单独开团2拼团
+     */
+    handleBuyWithGroup(type) {
+      this.handleCheckIsLogin()
+      if (this.selectedSku.stockNumber < 1) {
+        return uni.showToast({
+          title: '库存不足',
+          icon: "none"
+        })
+      }
+      const data = {
+        number: this.buyNum,
+        productId: this.productId,
+        shopId: this.shopId,
+        skuId: this.selectedSku.skuId,
+        shopGroupWorkId: this.selectedSku.shopGroupWorkId,
+        type: type
+      }
+      if (type !== 1) {
+        data.collageId = this.collageId
+      }
+      uni.removeStorageSync("skuItemDTOList")
+      uni.setStorageSync('skuItemList', data)
+      this.goodsDetailShowFlag = false
+      this.buyNum = 1
+      uni.navigateTo({
+        url: '../orderModule/orderConfirm?type=1',
+      })
+    },
+
+    /**
+     * 是否登录
+     * @return {boolean|void}
+     */
+    handleCheckIsLogin() {
+      const userInfo = uni.getStorageSync('storage_key')
+      if (!userInfo || (userInfo && JSON.stringify(userInfo) === '{}')) {
+        return uni.navigateTo({
+          url: '../../pages_category_page2/userModule/login'
+        })
+      }
+      return true
+    },
+
+    /**
+     * 选择分期
+     * @param index 0:3期 1:6期 2:12期
+     */
+    handleSelectAliAging(index) {
+      const aliAgingObj = this.aliAgingObj
+      if (aliAgingObj.selectIndex !== index && !aliAgingObj.disableSelectList[index]) {
+        aliAgingObj.selectIndex = index;
+      } else {
+        aliAgingObj.selectIndex = -1;
+      }
+    },
+
+    /**
+     * 渲染是否支持花呗
+     * @param productData 当前商品
+     * @param skuPrice:number 选中SKU的价格
+     */
+    handleRenderAliAging(productData, skuPrice) {
+      if (productData.ifHuabei !== 1) return
+      const aliAgingObj = this.aliAgingObj
+      if (skuPrice && skuPrice >= 0.03) {
+        aliAgingObj.supportHanaUta = true
+        aliAgingObj.disableSelectList[0] = false;
+        aliAgingObj.agingMoneyList[0] = (parseInt((skuPrice / 3 * 100) / 100 + '')).toFixed(2) + ""
+      }
+      if (skuPrice && skuPrice >= 0.06) {
+        aliAgingObj.supportHanaUta = false;
+        aliAgingObj.disableSelectList[1] = false;
+        aliAgingObj.agingMoneyList[1] = (parseInt((skuPrice / 6 * 100) / 100 + '')).toFixed(2) + ""
+      }
+      if (skuPrice && skuPrice >= 0.12) {
+        aliAgingObj.supportHanaUta = true;
+        aliAgingObj.disableSelectList[2] = false;
+        aliAgingObj.agingMoneyList[2] = (parseInt((skuPrice / 12 * 100) / 100 + '')).toFixed(2) + ""
+      }
+    },
+  }
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+.goosDetailshow-box {
+  margin-bottom: -5upx;
+
+  .detailImg-box {
+    margin-top: 30upx;
+    margin-left: 30upx;
+    border-bottom: 1upx solid #EDEDED;
+    padding-bottom: 20upx;
+    width: 690upx;
+
+    .detailImg {
+      width: 180upx;
+      height: 180upx;
+    }
+  }
+
+  .color-box {
+    padding: 30upx 30upx;
+    width: 690upx;
+
+    .colorName-box {
+      display: flex;
+      flex-wrap: wrap;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+      margin-top: 30upx;
+      margin-left: -30upx;
+
+      .colorName {
+        background-color: #FFFFFF;
+        margin-left: 30upx;
+        padding: 10upx 32upx;
+        font-size: 26upx;
+        border: 2rpx solid #E4E5E6;
+        z-index: 2;
+        color: #333333;
+      }
+
+      .colorName-on {
+        box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
+        color: #C5AA7B;
+        margin-left: 30upx;
+        padding: 10upx 32upx;
+        font-size: 26upx;
+        text-align: center;
+        z-index: 1;
+        border: none;
+      }
+    }
+
+  }
+
+  .modelNum-box {
+    padding: 30upx 30upx;
+    border-bottom: 1upx solid #EDEDED;
+    width: 690upx;
+
+    .modelNumName-box {
+      display: flex;
+      flex-wrap: wrap;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+      margin-top: 30upx;
+      margin-left: -30upx;
+
+      .modelNumName-on {
+        background-color: #FFE4D0;
+        color: #FF7800;
+        margin-left: 30upx;
+        padding: 10upx 32upx;
+        border-radius: 28upx;
+        border: 1upx solid #FF7800;
+        font-size: 26upx;
+        text-align: center;
+      }
+
+      .modelNumName {
+        background-color: #F5F5F5;
+        margin-left: 30upx;
+        padding: 10upx 32upx;
+        border-radius: 28upx;
+        font-size: 26upx;
+      }
+    }
+  }
+
+  .goodsNumCent {
+    padding: 0 30upx;
+
+    .goodsNum-box {
+      width: 100%;
+      padding: 30rpx 0 180rpx 0;
+      border-top: 2rpx solid #EDEDED;
+
+      .goodsNum {
+        height: 50upx;
+        display: flex;
+        align-items: center;
+
+        .item {
+          width: 50upx;
+          height: 50upx;
+          line-height: 48rpx;
+          border: 1upx solid #999999;
+          text-align: center;
+        }
+
+        .subtract {
+          border-right: 0upx;
+        }
+
+        .goodsNumber {
+          line-height: 50rpx;
+        }
+
+        .add {
+          border-left: 0upx;
+        }
+      }
+    }
+  }
+
+  .bottom-line {
+    border-bottom: 1upx solid #EDEDED;
+  }
+
+  .huabei-box {
+    padding: 30upx 30upx;
+    width: 690upx;
+
+    .fenqi-box {
+      margin-top: 15upx;
+      width: 120%;
+
+      .huabei-item {
+        display: inline-block;
+        background: #f3f3f3;
+        padding: 16upx 24upx;
+        margin: 5upx 10upx;
+        border-radius: 15upx;
+        text-align: center;
+        font-size: 7upx;
+
+        .huabei-period {
+          display: block;
+        }
+      }
+
+      .fenqi-on {
+        border: 1px solid #EF7F93;
+        color: #EF7F93;
+      }
+
+      .disabled {
+        color: #cacaca;
+      }
+    }
+  }
+
+  .goosDetailbut-box {
+    justify-content: center;
+
+    .joinShopCartBut {
+      width: 343upx;
+      height: 80upx;
+      border-radius: 40upx 0 0 40upx;
+      background-color: #FFC300;
+      color: #FFFEFE;
+      font-size: 28upx;
+      line-height: 80upx;
+      text-align: center;
+      margin-left: 30upx;
+    }
+
+    .buyNowBut {
+      width: 90%;
+      height: 90upx;
+      background-color: #333333;
+      font-size: 28upx;
+      line-height: 90upx;
+      text-align: center;
+      color: #FFEBC4;
+    }
+  }
+}
+
+.skuSelectBtn {
+  padding-bottom: 30rpx;
+
+  .selectBtn {
+    width: 342rpx;
+    height: 100rpx;
+    line-height: 100rpx;
+    text-align: center;
+    border: 2rpx solid #333333;
+    font-size: 28rpx;
+    border-radius: 8rpx;
+  }
+
+  .selectBuyNow {
+    background: #333333;
+  }
+}
+
+.couponItemimg {
+  width: 150upx;
+  height: 60upx;
+}
+
+.joinbuyBut {
+  width: 190upx;
+  height: 80upx;
+  background: #333333;
+  color: #FFEBC4;
+  font-size: 28upx;
+  line-height: 80upx;
+  text-align: center;
+  margin-left: 30upx;
+}
+</style>

+ 203 - 0
pages_category_page1/goodsModule/components/QuestionsAndAnswersList.vue

@@ -0,0 +1,203 @@
+<!--
+    * @FileDescription: QuestionsAndAnswersList
+    * @Author: kahu
+    * @Date: 2022/11/7
+    * @LastEditors: kahu
+    * @LastEditTime: 2022/11/7
+-->
+<template>
+  <div class="content">
+    <view class="listBox">
+      <view
+          class="itemBox"
+          v-for="(problemItem,problemIndex) in problemsList"
+          :key="problemIndex"
+      >
+        <view class="itemAsk">
+          <i>问</i><span>{{ problemItem.problem }}</span>
+        </view>
+        <view v-if="problemItem.answers.length>0">
+          <view
+              class="answer"
+              v-for="(answerItem,answerIndex) in (problemItem.answers.slice(0,1))"
+              :key="answerIndex"
+          >
+            <view class="answerBox">
+              <i>答</i><span>{{ answerItem.answer }}</span>
+            </view>
+            <view
+                class="answerBtn"
+                v-if="problemItem.ifAnswer === 1"
+                @click="handleJumpAnswerByProblemId(problemItem.problemId)"
+            >立即回答
+            </view>
+          </view>
+        </view>
+        <view v-else>
+          <view class="answer">
+            <view class="answerBox">
+              <i>答</i><span>暂无答复</span>
+            </view>
+            <view
+                class="answerBtn"
+                v-if="problemItem.ifAnswer === 1"
+                @click="handleJumpAnswerByProblemId(problemItem.problemId)"
+            >立即回答
+            </view>
+          </view>
+        </view>
+        <view
+            v-if="problemItem.answers.length>1"
+            class="seeAll"
+            @click="handleJumpAnswerByProblemId(problemItem.problemId)"
+        >查看全部答复
+        </view>
+      </view>
+      <!--      <view
+                class="moreBox"
+                v-if="problemsList.length>0"
+                @click="handleJumpAllAnswer"
+            >
+              <label class="fs24">查看全部</label>
+              <image
+                  class="evaluateAllArrow-icon mar-left-10"
+                  src="https://ceres.zkthink.com/static/img/user/arrow.png"
+              ></image>
+            </view>-->
+    </view>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "QuestionsAndAnswersList",
+  data() {
+    return {}
+  },
+  props:{
+    problemsList:{
+      type:Array,
+      default:()=>[]
+    },
+    productInfo:{
+      type:Object,
+      default:()=>({})
+    }
+  },
+  methods: {
+    /**
+     * 跳转到该商品下所有问答
+     */
+    handleJumpAllAnswer() {
+      const paramObj = Object.assign({},this.productInfo,{
+        images: this.productInfo.images[0]
+      })
+      this.$jump('/pages_category_page1/goodsModule/answerList',paramObj)
+    },
+
+    /**
+     * 跳转到问题的所有回答
+     * @param problemId 问答ID
+     */
+    handleJumpAnswerByProblemId(problemId) {
+      const paramObj = Object.assign({}, this.productInfo,{
+        questionlength: this.problemsList.length,
+        problemId: problemId,
+        img: this.productInfo.images[0]
+      })
+      this.$jump('/pages_category_page1/goodsModule/qADetail',paramObj)
+    },
+  }
+}
+</script>
+
+<style
+    lang="scss"
+    scoped
+>
+
+.listBox {
+  padding: 0 30upx;
+  //border-bottom: 20upx solid #EEEEEE;
+
+  .itemBox {
+    padding-bottom: 30upx;
+    border-bottom: 1upx solid #EEEEEE;
+    margin-bottom: 30upx;
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    .itemAsk {
+      display: flex;
+      align-items: center;
+      margin-bottom: 42upx;
+
+      i {
+        font-style: normal;
+        width: 38upx;
+        height: 38upx;
+        line-height: 38upx;
+        background: #C5AA7B;
+        display: block;
+        margin-right: 30upx;
+        font-size: 24upx;
+        color: #FFFFFF;
+        text-align: center;
+      }
+
+      span {
+        font-size: 28upx;
+        color: #333333;
+      }
+    }
+
+    .answer {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-bottom: 30upx;
+
+      .answerBox {
+        display: flex;
+        align-items: center;
+
+        i {
+          font-style: normal;
+          width: 38upx;
+          height: 38upx;
+          line-height: 38upx;
+          background: #C5AA7B;
+          display: block;
+          text-align: center;
+          margin-right: 30upx;
+          font-size: 24rpx;
+          color: #FFFFFF;
+        }
+
+        span {
+          font-size: 26upx;
+          color: #666666;
+        }
+      }
+
+      .answerBtn {
+        width: 130upx;
+        height: 50upx;
+        line-height: 50upx;
+        border: #333333 2rpx solid;
+        text-align: center;
+        color: #333;
+        font-size: 24upx;
+      }
+    }
+
+    .seeAll {
+      margin-left: 68upx;
+      font-size: 28upx;
+      color: #C5AA7B;
+    }
+  }
+}
+</style>

+ 13 - 7
pages_category_page1/goodsModule/evaluate.vue

@@ -86,13 +86,19 @@
 
 			}
 		},
-		onLoad() {
-			this.commentData = uni.getStorageSync('evaluateItem'),
-			this.orderId = uni.getStorageSync('orderId')
-			uni.removeStorageSync('evaluateItem')
-			uni.removeStorageSync('orderId')
-			const res = uni.getStorageSync('storage_key');
-			this.headerToken.Authorization = res.token
+		onLoad(options) {
+      if(options.detail){
+        const params = this.$getJumpParam(options)
+        this.commentData = params.commentData
+        this.orderId = params.orderId
+      }else{
+        this.commentData = uni.getStorageSync('evaluateItem')
+        this.orderId = uni.getStorageSync('orderId')
+        uni.removeStorageSync('evaluateItem')
+        uni.removeStorageSync('orderId')
+      }
+      const res = uni.getStorageSync('storage_key');
+      this.headerToken.Authorization = res.token
 		},
 		onReady() {
 			this.fileList = this.$refs.uUpload.lists

Різницю між файлами не показано, бо вона завелика
+ 270 - 798
pages_category_page1/goodsModule/goodsDetails.vue


+ 445 - 278
pages_category_page1/goodsModule/goodsList.vue

@@ -1,280 +1,414 @@
 <template>
-	<view class="container">
+  <view class="container">
     <global-loading />
-
+    <!-- 骨架屏 -->
+    <u-skeleton
+        el-color="#efefef"
+        bg-color="#fff"
+        :loading="loading && isFirstComeIn"
+        :animation="true"
+    ></u-skeleton>
     <!-- 商品列表 -->
-		<view class="flex-items-plus flex-row search">
-      <view class="searchBg">
+    <view class="flex-items-plus flex-row search">
+      <view class="searchBg u-skeleton-fillet">
         <view class="searchImg-box flex-items-plus">
-          <image class="searchImg" src="https://ceres.zkthink.com/static/img/searchImg.png"></image>
-          <input class="search-box" v-model="keyWord" placeholder-class="searchboxPlace" placeholder="请输入您想要的宝贝" />
+          <image
+              class="searchImg"
+              src="https://ceres.zkthink.com/static/img/searchImg.png"
+          ></image>
+          <input
+              class="search-box"
+              v-model="keyWord"
+              placeholder-class="searchboxPlace"
+              placeholder="请输入您想要的宝贝"
+          />
         </view>
-        <label class="mar-left-40 fs28" @click="searchList(1)">搜索</label>
+        <label
+            class="mar-left-40 fs28"
+            @click="searchList(1)"
+        >搜索</label>
       </view>
-		</view>
+    </view>
     <view class="shop-list-nav">
-      <view class="nav-item-sort" @click="sortTap(1)">
-        <text class="nav-title" :class="{'active' : sortIndex == 1}">默认</text>
-      </view>
-      <view class="nav-item-sort" @click="sortTap(2)">
-        <text class="nav-title" :class="{'active' : sortIndex == 2}">价格</text>
-        <view class="r">
-          <view class="arrowUp" :class="{activeUp: type == 1}"></view>
-          <view class="arrowDown" :class="{activeDown: type == 2}"></view>
+      <view class="mlr-20  u-skeleton-fillet">
+        <view
+            class="nav-item-sort"
+            @click="sortTap(1)"
+        >
+          <text
+              class="nav-title"
+              :class="{'active' : sortIndex == 1}"
+          >默认
+          </text>
         </view>
-      </view>
-      <view class="nav-item-sort" @click="sortTap(3)">
-        <text class="nav-title" :class="{'active' : sortIndex == 3}">销量</text>
-        <view class="r">
-          <view class="arrowUp" :class="{activeUp: volume == 1}"></view>
-          <view class="arrowDown" :class="{activeDown: volume == 2}"></view>
+        <view
+            class="nav-item-sort"
+            @click="sortTap(2)"
+        >
+          <text
+              class="nav-title"
+              :class="{'active' : sortIndex == 2}"
+          >价格
+          </text>
+          <view class="r">
+            <view
+                class="arrowUp"
+                :class="{activeUp: type == 1}"
+            ></view>
+            <view
+                class="arrowDown"
+                :class="{activeDown: type == 2}"
+            ></view>
+          </view>
+        </view>
+        <view
+            class="nav-item-sort"
+            @click="sortTap(3)"
+        >
+          <text
+              class="nav-title"
+              :class="{'active' : sortIndex == 3}"
+          >销量
+          </text>
+          <view class="r">
+            <view
+                class="arrowUp"
+                :class="{activeUp: volume == 1}"
+            ></view>
+            <view
+                class="arrowDown"
+                :class="{activeDown: volume == 2}"
+            ></view>
+          </view>
         </view>
       </view>
+
     </view>
-		<view class="listBox">
-			<view v-for="(item, index) in list" :key="index" class="goodsDetails-box flex-display flex-column" @click="goodsDateils(item.shopId,item.productId,item.skuId)">
-				<view class="spikeList goodsDetails">
-				  <view class="listItem">
-				    <view class="itemBox">
-				      <img :src="item.image" class="pic-img default-img">
-				    </view>
-				    <view class="itemInfo">
-				      <p>{{item.productName}}</p>
-				      <view class="number" v-if="item.number != null">
-                <view class="numText">已售{{item.number}}件</view>
-                <view class="numText" v-if="item.total !=0 && item.activityType !== 0">限量{{item.total}}件</view>
+    <view class="listBox u-skeleton">
+      <view
+          v-for="(item, index) in list"
+          :key="index"
+          class="goodsDetails-box flex-display flex-column"
+          @click="goodsDateils(item.shopId,item.productId,item.skuId)"
+      >
+        <view class="spikeList goodsDetails ">
+          <view class="listItem">
+            <view class="itemBox">
+              <img
+                  :src="item.image"
+                  class="pic-img u-skeleton-fillet default-img"
+              >
+            </view>
+            <view class="itemInfo u-skeleton-fillet">
+              <p>{{ item.productName }}</p>
+              <view
+                  class="number"
+                  v-if="item.number != null"
+              >
+                <view class="numText">已售{{ item.number }}件</view>
+                <view
+                    class="numText"
+                    v-if="item.total !=0 && item.activityType !== 0"
+                >限量{{ item.total }}件
+                </view>
               </view>
-					  <view class="flex-row-plus flex-item mar-top-30">
-              <image class="iconImg" v-if="item.activityType == 1" src="https://ceres.zkthink.com/static/images/groupBuyIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 2" src="https://ceres.zkthink.com/static/images/spikeIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 4" src="https://ceres.zkthink.com/static/images/spikeIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 3" src="https://ceres.zkthink.com/static/images/discountListIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 5" src="https://ceres.zkthink.com/static/images/discountListIcon.png"></image>
-			  <image class="iconImg" v-if="item.activityType == 8" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"></image>
-              <image class="iconImg" v-if="item.activityType == 9" src="https://ceres.zkthink.com/static/images/memberCenterIcon.png"></image>
-							<view class="font-color-C83732 flex-row-plus">
-								<b>¥</b>
-								<label class="fs28">{{item.price}}</label>
-							</view>
-              <view class="mar-left-30 discountsPriceLine font-color-999">¥{{item.originalPrice}}</view>
-					  </view>
-					  <view class="flex-display flex-sp-between flex-row mar-top-20 flex-items shopName">
-					  	<label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
-					  </view>
-				    </view>
-				  </view>
-				</view>
-			</view>
-		</view>
-
-		<!-- 搜索为空 -->
-		<view v-if="ifEmpty" class="emptyCart-box flex-items-plus flex-column">
-			<image class="emptyCart-img" src="https://ceres.zkthink.com/static/images/searchEmpty.png"></image>
-			<label class="font-color-999 fs26 mar-top-30">搜索不到你要找的宝贝呢</label>
-			<label class="font-color-999 fs26 mar-top-10">换个词试试吧~</label>
-		</view>
-
-		<view class="reachBottom" v-if="noMoreData && !ifEmpty">
-			<image class="reach-icon" src="https://ceres.zkthink.com/static/img/reachBottom.png" mode="widthFix"></image>
-			<text class="reach-text">这里到底了哦~~</text>
-		</view>
-	</view>
+              <view class="flex-row-plus flex-item mar-top-30">
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 1"
+                    src="https://ceres.zkthink.com/static/images/groupBuyIcon.png"
+                ></image>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 2"
+                    src="https://ceres.zkthink.com/static/images/spikeIcon.png"
+                ></image>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 4"
+                    src="https://ceres.zkthink.com/static/images/spikeIcon.png"
+                ></image>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 3"
+                    src="https://ceres.zkthink.com/static/images/discountListIcon.png"
+                ></image>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 5"
+                    src="https://ceres.zkthink.com/static/images/discountListIcon.png"
+                ></image>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 8"
+                    src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"
+                ></image>
+                <image
+                    class="iconImg"
+                    v-if="item.activityType == 9"
+                    src="https://ceres.zkthink.com/static/images/memberCenterIcon.png"
+                ></image>
+                <view class="font-color-C83732 flex-row-plus">
+                  <b>¥</b>
+                  <label class="fs28">{{ item.price }}</label>
+                </view>
+                <view class="mar-left-30 discountsPriceLine font-color-999">¥{{ item.originalPrice }}</view>
+              </view>
+              <view class="flex-display flex-sp-between flex-row mar-top-20 flex-items shopName">
+                <label class="fs22 font-color-FFEBC4">{{ item.shopName }}</label>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+
+    <!-- 搜索为空 -->
+    <view
+        v-if="ifEmpty"
+        class="emptyCart-box flex-items-plus flex-column"
+    >
+      <image
+          class="emptyCart-img"
+          src="https://ceres.zkthink.com/static/images/searchEmpty.png"
+      ></image>
+      <label class="font-color-999 fs26 mar-top-30">搜索不到你要找的宝贝呢</label>
+      <label class="font-color-999 fs26 mar-top-10">换个词试试吧~</label>
+    </view>
+
+    <view
+        class="reachBottom"
+        v-if="noMoreData && !ifEmpty"
+    >
+      <image
+          class="reach-icon"
+          src="https://ceres.zkthink.com/static/img/reachBottom.png"
+          mode="widthFix"
+      ></image>
+      <text class="reach-text">这里到底了哦~~</text>
+    </view>
+  </view>
 </template>
 
 <script>
-	const NET = require('../../utils/request')
-	const API = require('../../config/api')
-	export default {
-		data() {
-			return {
-				keyWord:'',
-				category3Id:'',
-				page: 1,
-				pageSize: 20,
-				source:2,
-				list:[],
-				loadingType:0,
-				sortIndex: 1,
-				ifNew:0,//是否新品
-				type:0,//价格排序条件
-				volume:0,//销量排序条件
-				topLeft: 0,
-				ifEmpty: false,
-				noMoreData: false,
-				total: 0
-			}
-		},
-		onLoad(option) {
-			if(option.keyWord){
-				this.keyWord = option.keyWord
-			}
-			if(option.category3Id){
-				this.category3Id = option.category3Id
-			}
-			this.searchList(1)
-		},
-		onReachBottom(){
-			if(this.loadingType == 1){
-				uni.stopPullDownRefresh()
-			}else{
-				this.page = this.page+1
-				this.searchList(0)
-			}
-		},
-		// onPageScroll(e) {
-		// 	this.topLeft = e.scrollTop
-		// },
-		methods: {
-      sortTap(index){
-        this.loadingType = 0
-        this.noMoreData = false
-        this.total = 0
+const NET = require('../../utils/request')
+const API = require('../../config/api')
+export default {
+  data() {
+    return {
+      loading: false,
+      isFirstComeIn: true,
+      keyWord: '',
+      category3Id: '',
+      page: 1,
+      pageSize: 20,
+      source: 2,
+      list: [{}, {}, {}, {}, {}, {}, {}, {}, {}],
+      loadingType: 0,
+      sortIndex: 1,
+      ifNew: 0,//是否新品
+      type: 0,//价格排序条件
+      volume: 0,//销量排序条件
+      topLeft: 0,
+      ifEmpty: false,
+      noMoreData: false,
+      total: 0
+    }
+  },
+  onLoad(option) {
+    if (option.keyWord) {
+      this.keyWord = option.keyWord
+    }
+    if (option.category3Id) {
+      this.category3Id = option.category3Id
+    }
+    this.searchList(1)
+  },
+  onReachBottom() {
+    if (this.loadingType == 1) {
+      uni.stopPullDownRefresh()
+    } else {
+      this.page = this.page + 1
+      this.searchList(0)
+    }
+  },
+  // onPageScroll(e) {
+  // 	this.topLeft = e.scrollTop
+  // },
+  methods: {
+    sortTap(index) {
+      this.loadingType = 0
+      this.noMoreData = false
+      this.total = 0
+      this.page = 1
+      this.list = [{}, {}, {}, {}, {}, {}, {}, {}, {}]
+      this.isFirstComeIn = true
+      // if(index == 1){
+      //   this.type = 1
+      //   this.volume = 1
+      //   this.sortIndex = index
+      // }else if(index == 2){
+      //   this.type = this.type != 1 ? 1:2
+      //   this.sortIndex = index
+      // }else if(index == 3){
+      //   this.volume = this.volume != 1 ? 1:2
+      //   this.sortIndex = index
+      // }
+      console.log(index, 'index')
+      if (index === 1) {
+        this.type = 0
+        this.volume = 0
+      } else if (index === 2) {
+        this.volume = 0
+        if (this.type === 0) {
+          this.type = 1
+        } else {
+          console.log(this.type, 'this.type1')
+          this.type = this.type != 1 ? 1 : 2
+        }
+        console.log(this.type, 'this.type2')
+      } else if (index === 3) {
+        this.type = 0
+        if (this.volume === 0) {
+          this.volume = 1
+        } else {
+          this.volume = this.volume != 1 ? 1 : 2
+        }
+      }
+      this.sortIndex = index
+      this.searchList()
+    },
+    searchTextDel() {
+      this.keyWord = ''
+    },
+    searchList(type) {
+      // uni.showLoading({
+      //   mask: true,
+      //   title: '加载中...',
+      // })
+      this.loading = true
+      if (type == 1) {
+        this.list = [{}, {}, {}, {}, {}, {}, {}, {}, {}]
+        this.isFirstComeIn = true
         this.page = 1
-        this.list = []
-        // if(index == 1){
-        //   this.type = 1
-        //   this.volume = 1
-        //   this.sortIndex = index
-        // }else if(index == 2){
-        //   this.type = this.type != 1 ? 1:2
-        //   this.sortIndex = index
-        // }else if(index == 3){
-        //   this.volume = this.volume != 1 ? 1:2
-        //   this.sortIndex = index
-        // }
-				console.log(index,'index')
-			if(index === 1){
-				this.type = 0
-				this.volume = 0
-			}else if(index === 2){
-				this.volume = 0
-				if(this.type === 0){
-					this.type = 1
-				}else{
-					console.log(this.type,'this.type1')
-					this.type = this.type != 1 ? 1 : 2
-				}
-				console.log(this.type,'this.type2')
-			}else if (index === 3){
-				this.type = 0
-				if(this.volume === 0){
-					this.volume = 1
-				}else{
-					this.volume = this.volume != 1 ? 1 : 2
-				}
-		}
-		this.sortIndex = index
-        this.searchList()
-      },
-			searchTextDel(){
-				this.keyWord = ''
-			},
-			searchList(type){
-        // uni.showLoading({
-        //   mask: true,
-        //   title: '加载中...',
-				// })
-				if(type == 1){
-					this.list = []
-					this.page = 1
-				}
-				if(this.category3Id){
-					NET.request(API.GetClaasifyProducts, {
-					  classifyId: this.category3Id,
-					  type: this.type,
-					  volume: this.volume,
-					  productName: this.keyWord,
-					  page:this.page,
-					  pageSize:this.pageSize
-					}, 'GET').then(res => {
-						uni.hideLoading()
-						this.list = this.list.concat(res.data.list)
-            this.total = res.data.total
-			this.ifEmpty = this.list.length === 0
-            if (this.total === this.list.length) {
-              this.noMoreData = true
-              this.loadingType = 1
-            }
-					}).catch(res => {
-						uni.hideLoading()
-					})
-				}else{
-					NET.request(API.GgetSearchProducts, {
-					  search: this.keyWord,
-            type: this.type,
-            volume: this.volume,
-					  page: this.page,
-					  pageSize: this.pageSize
-					}, 'GET').then(res => {
-						uni.hideLoading()
-						this.list = this.list.concat(res.data.list)
-            this.total = res.data.total
-			this.ifEmpty = this.list.length === 0
-            if (this.total === this.list.length) {
-              this.noMoreData = true
-              this.loadingType = 1
-            }
-					}).catch(res => {
-						uni.hideLoading()
-					})
-				}
-			},
-			//商品详情
-			goodsDateils(shopId,productId,skuId){
-				uni.navigateTo({
-					url: 'goodsDetails?shopId='+shopId + '&productId='+productId +'&skuId='+skuId
-				})
-			}
-		}
-	}
+      }
+      if (this.category3Id) {
+        NET.request(API.GetClaasifyProducts, {
+          classifyId: this.category3Id,
+          type: this.type,
+          volume: this.volume,
+          productName: this.keyWord,
+          page: this.page,
+          pageSize: this.pageSize
+        }, 'GET').then(res => {
+          uni.hideLoading()
+          this.list = this.list.concat(res.data.list)
+          this.list = this.list.filter(item=>JSON.stringify(item)!=='{}')
+          this.total = res.data.total
+          this.loading = false
+          this.isFirstComeIn = false
+          this.ifEmpty = this.list.length === 0
+          if (this.total === this.list.length) {
+            this.noMoreData = true
+            this.loadingType = 1
+          }
+        }).catch(res => {
+          uni.hideLoading()
+        })
+      } else {
+        NET.request(API.GgetSearchProducts, {
+          search: this.keyWord,
+          type: this.type,
+          volume: this.volume,
+          page: this.page,
+          pageSize: this.pageSize
+        }, 'GET').then(res => {
+          uni.hideLoading()
+          this.loading = false
+          this.isFirstComeIn = false
+          this.list = this.list.concat(res.data.list)
+          this.list = this.list.filter(item=>JSON.stringify(item)!=='{}')
+          this.total = res.data.total
+          this.ifEmpty = this.list.length === 0
+          if (this.total === this.list.length) {
+            this.noMoreData = true
+            this.loadingType = 1
+          }
+        }).catch(res => {
+          uni.hideLoading()
+        })
+      }
+    },
+    //商品详情
+    goodsDateils(shopId, productId, skuId) {
+      uni.navigateTo({
+        url: 'goodsDetails?shopId=' + shopId + '&productId=' + productId + '&skuId=' + skuId
+      })
+    }
+  }
+}
 </script>
 
-<style lang="scss" scoped>
+<style
+    lang="scss"
+    scoped
+>
 page {
   background: #f8f8f8;
 }
+
 // 触底样式
-.reachBottom{
-	margin-top: 30rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	.reach-icon{
-		width: 150rpx;
-		height: 150rpx;
-	}
-	.reach-text{
-		margin: 20rpx 0;
-		color: #CCCCCC;
-	}
+.reachBottom {
+  margin-top: 30rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+
+  .reach-icon {
+    width: 150rpx;
+    height: 150rpx;
+  }
+
+  .reach-text {
+    margin: 20rpx 0;
+    color: #CCCCCC;
+  }
 }
 
-input{padding-left: 80upx;}
-.container{
-	height: 100%;
+input {
+  padding-left: 80upx;
+}
+
+.container {
+  height: 100%;
   background: #f8f8f8;
+
   .search {
     padding: 20rpx;
     background: #FFFFFF;
     border-top: 2rpx solid #F3F4F5;
-	  position: relative;
-	  z-index: 2;
+    position: relative;
+    z-index: 2;
   }
+
   .searchImg-box {
     position: relative;
   }
-	.emptyCart-box{
-		position: absolute;
-		top: 0;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		margin: auto;
-		.emptyCart-img{
-			width: 113upx;
-			height: 98upx;
-		}
-	}
+
+  .emptyCart-box {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+
+    .emptyCart-img {
+      width: 113upx;
+      height: 98upx;
+    }
+  }
+
   .searchBg {
     width: 100%;
     display: flex;
@@ -283,67 +417,82 @@ input{padding-left: 80upx;}
     height: 78rpx;
     justify-content: space-between;
     padding: 0 20rpx;
+
     label {
       font-weight: 400;
       color: #333333;
     }
   }
-	.searchImg{
-		width: 50upx;
-		height: 50upx;
-		position: absolute;
-		left: 0upx;
-	}
-	.search-box{
-		width: 400upx;
-		height: 66upx;
-	}
-	.searchboxPlace{
-		font-size: 26upx;
-		color: #A9A9A9;
-		padding-right: 30upx;
-	}
-	.searchClose-icon{
-		z-index: 999;
-		width: 40upx;
-		height: 40upx;
-		margin-left: -50upx;
-	}
-	.promotion618{
-		width: 130upx;
-		height: 30upx;
-	}
-	.goodsDetails-box{
+
+  .searchImg {
+    width: 50upx;
+    height: 50upx;
+    position: absolute;
+    left: 0upx;
+  }
+
+  .search-box {
+    width: 400upx;
+    height: 66upx;
+  }
+
+  .searchboxPlace {
+    font-size: 26upx;
+    color: #A9A9A9;
+    padding-right: 30upx;
+  }
+
+  .searchClose-icon {
+    z-index: 999;
+    width: 40upx;
+    height: 40upx;
+    margin-left: -50upx;
+  }
+
+  .promotion618 {
+    width: 130upx;
+    height: 30upx;
+  }
+
+  .goodsDetails-box {
     background: #FFFFFF;
     margin-top: 20rpx;
     box-sizing: border-box;
+
     .spikeList {
       border-bottom: 1upx solid #EDEDED;
       padding-top: 30rpx;
       padding-bottom: 30upx;
       position: relative;
+
       .listItem {
         display: flex;
         border-bottom: 1upx solid #EEEEEE;
         padding-left: 30rpx;
+
         .iconImg {
           width: 58rpx;
           height: 36rpx;
         }
+
         &:last-child {
           border-bottom: none;
         }
+
         .itemBox {
           width: 220upx;
           height: 220upx;
           margin-right: 30upx;
+
           img {
             width: 100%;
             height: 100%;
-					}
+          }
         }
+
         .itemInfo {
           flex: 1;
+
           p {
             font-size: 26upx;
             color: #333333;
@@ -357,11 +506,13 @@ input{padding-left: 80upx;}
             line-clamp: 2;
             -webkit-box-orient: vertical;
           }
+
           .number {
             color: #999999;
             font-size: 26upx;
             display: flex;
             align-items: center;
+
             .numText {
               padding: 0 10rpx;
               height: 40rpx;
@@ -374,6 +525,7 @@ input{padding-left: 80upx;}
           }
         }
       }
+
       .shopName {
         position: absolute;
         left: 0;
@@ -385,12 +537,15 @@ input{padding-left: 80upx;}
         padding: 10rpx 15rpx;
       }
     }
-	}
+  }
+
   .listBox {
     padding: 0 24rpx;
     box-sizing: border-box;
+
     .usersBox {
       margin-top: 20rpx;
+
       label {
         padding: 10rpx;
         border: 2rpx solid #E4E5E6;
@@ -398,13 +553,18 @@ input{padding-left: 80upx;}
     }
   }
 }
+
 .shop-list-nav {
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  height: 80rpx;
-  line-height: 76rpx;
+
   background: #fff;
+  .mlr-20{
+    margin: 0 20rpx;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    height: 80rpx;
+    line-height: 76rpx;
+  }
 }
 
 .nav-item {
@@ -441,9 +601,11 @@ input{padding-left: 80upx;}
   padding-left: 20%;
   box-sizing: border-box;
 }
-.active{
+
+.active {
   color: #C5AA7B;
 }
+
 .nav-item.padd-r {
   padding-right: 20%;
   box-sizing: border-box;
@@ -467,6 +629,7 @@ input{padding-left: 80upx;}
   align-items: center;
   justify-content: center;
   margin-left: 5rpx;
+
   .arrowDown {
     width: 0;
     height: 0;
@@ -475,6 +638,7 @@ input{padding-left: 80upx;}
     border-color: #CCCCCC transparent transparent transparent;
     margin-top: 2rpx;
   }
+
   .arrowUp {
     margin-bottom: 2rpx;
     width: 0;
@@ -483,9 +647,11 @@ input{padding-left: 80upx;}
     border-style: solid;
     border-color: transparent transparent #CCCCCC transparent;
   }
+
   .activeDown {
     border-color: #C5AA7B transparent transparent transparent;
   }
+
   .activeUp {
     border-color: transparent transparent #C5AA7B transparent;
   }
@@ -507,5 +673,6 @@ input{padding-left: 80upx;}
 .search {
   padding-top: 20rpx;
 }
+
 // #endif
 </style>

+ 20 - 8
pages_category_page1/goodsModule/inviteSpell.vue

@@ -102,7 +102,8 @@
 				</view>
 			</view>
 		</u-popup>
-		<shareSpell ref="shareSpell" @shareCancel='shareCancel' :url="url"></shareSpell>
+		<shareSpell ref="shareSpell" @shareCancel='shareCancel' :url="url" :urlParms="urlParms" :img="inviteSpell.image" title="好友邀请您来拼单啦">
+		</shareSpell>
 	</view>
 </template>
 
@@ -151,8 +152,11 @@
 				attrList: [],
 				productDetail:{},
 				userInfo: {},
-				url:'',
-				shareTitle: ''
+				url: '',
+				shareTitle: '',
+				showJoinGroup: false,
+				showGroupText: '立即参团',
+        urlParms: ''
 			};
 		},
 		components:{
@@ -221,7 +225,7 @@
 		onLoad(options) {
 			console.log(options,'options')
 			this.isIphone = getApp().globalData.isIphone;
-			let item = getApp().globalData.inviteSpellShareItem
+			let item = getApp().globalData.inviteSpellShareIte
 			if (item) {
 				this.collageId = parseInt(item.collageId)
 				this.orderId = parseInt(item.orderId)
@@ -236,10 +240,18 @@
 				this.skuId = parseInt(options.skuId)
 				this.shopGroupWorkId = parseInt(options.shopGroupWorkId)
 			}
-			this.getProductSku()
-			this.queryProductDetail()
-			this.url = '/pages_category_page1/goodsModule/inviteSpell?collageId='
-					+ this.collageId +'&orderId='+ this.orderId+'&productId='+this.productId+'&skuId='+this.skuId+'&shopGroupWorkId='+this.shopGroupWorkId
+			// #ifdef MP-WEIXIN
+			this.url = '/pages_category_page1/goodsModule/inviteSpell?collageId=' +
+				this.collageId + '&orderId=' + this.orderId + '&productId=' + this.productId + '&skuId=' + this.skuId +
+				'&shopGroupWorkId=' + this.shopGroupWorkId
+      this.urlParms = this.collageId + '&orderId=' + this.orderId + '&productId=' + this.productId + '&skuId=' + this.skuId +
+          '&shopGroupWorkId=' + this.shopGroupWorkId
+			// #endif
+			// #ifndef MP-WEIXIN
+			this.url = '/h5/#/pages_category_page1/goodsModule/inviteSpell?collageId=' +
+				this.collageId + '&orderId=' + this.orderId + '&productId=' + this.productId + '&skuId=' + this.skuId +
+				'&shopGroupWorkId=' + this.shopGroupWorkId
+			// #endif
 		},
 		methods:{
 			getOffered(){

+ 3 - 2
pages_category_page1/goodsModule/putQuestions.vue

@@ -42,8 +42,9 @@
 			  ifAnonymous:0
 			}
 		},
-		onLoad(options) {
-			this.qudata = JSON.parse(options.data)
+		onLoad(params) {
+      this.qudata = this.$getJumpParam(params);
+      console.log(this.qudata)
 		},
 		methods: {
 			seeAllFn () {

+ 269 - 207
pages_category_page1/goodsModule/qADetail.vue

@@ -1,40 +1,70 @@
 <template>
-  <view class="qaBox" v-if="ifShow">
+  <view
+      class="qaBox"
+      v-if="ifShow"
+  >
     <view class="qaTopInfo">
-      <view class="qaTopInfoBox" @click="goGoodsDetails">
+      <view
+          class="qaTopInfoBox"
+          @click="goGoodsDetails"
+      >
         <image :src="detailList.image"></image>
         <view class="qaInfoText">
-          <h3>{{detailList.productName}}</h3>
-          <span>共{{detailList.count}}个问题</span>
+          <h3>{{ detailList.productName }}</h3>
+          <span>共{{ detailList.count }}个问题</span>
         </view>
       </view>
       <view class="qaTitBox">
-        <view class="qaTit"><i>问</i><h3>{{detailList.problem}}</h3></view>
+        <view class="qaTit"><i>问</i>
+          <h3>{{ detailList.problem }}</h3></view>
         <view class="qaTitTime"><img :src="detailList.headImage" />
-		<span class="qaName">{{detailList.name}}</span>
-		<span class="qaTimeInfo">{{detailList.createTime}}</span></view>
+          <span class="qaName">{{ detailList.name }}</span>
+          <span class="qaTimeInfo">{{ detailList.createTime }}</span></view>
       </view>
     </view>
     <view class="answerListBox">
-      <view class="answerNum">共{{answerslength}}条回答</view>
-      <view class="answerList" v-for="item in detailList.answers" :key="item.answerId">
+      <view class="answerNum">共{{ answerslength }}条回答</view>
+      <view
+          class="answerList"
+          v-for="item in detailList.answers"
+          :key="item.answerId"
+      >
         <view class="answerItem">
           <view class="itemTit">
             <view class="itemAvatarBox">
-              <img :src="item.headImage" alt="">
-              <span class="answerName">{{item.name}}</span>
+              <img
+                  :src="item.headImage"
+                  alt=""
+              >
+              <span class="answerName">{{ item.name }}</span>
             </view>
-            <view class="answerTime">{{item.createTime}}</view>
+            <view class="answerTime">{{ item.createTime }}</view>
           </view>
-          <view class="answerInfo">{{item.answer}}</view>
+          <view class="answerInfo">{{ item.answer }}</view>
         </view>
       </view>
     </view>
-	<view v-if="detailList.ifExhibition==1" class="pad-bot-100"></view>
-    <view class="answerBtn" v-if="detailList.ifExhibition==1" :style="{'padding-bottom':(isIphone==true? 50:0)+'rpx'}">
+    <view
+        v-if="detailList.ifExhibition==1"
+        class="pad-bot-100"
+    ></view>
+    <view
+        class="answerBtn"
+        v-if="detailList.ifExhibition==1"
+        :style="{'padding-bottom':(isIphone==true? 50:0)+'rpx'}"
+    >
       <view class="uni-form-item uni-column answerBtnBox">
-        <input class="uni-input" v-model="answerText" focus placeholder="被邀请的用户才能回答" />
-        <view class="answerButton" @click="answer">回答</view>
+        <input
+            class="uni-input"
+            v-model="answerText"
+            focus
+            placeholder="被邀请的用户才能回答"
+        />
+        <view
+            class="answerButton"
+            @click="answer"
+        >回答
+        </view>
       </view>
     </view>
   </view>
@@ -43,227 +73,259 @@
 <script>
 const NET = require('../../utils/request')
 const API = require('../../config/api')
+import QuestionsAndAnswersList from "./components/QuestionsAndAnswersList";
 export default {
   name: "qADetail",
-  data(){
-    return{
-  	  detailList:{},//商品问答详情
-  	  productId:'',
-  	  images:'',
-  	  productName:'',
-	    problemsData:{},
-	    answerText:"",
-	    answerslength:0,
-	    num:0,
-	    isIphone: false,
+  components:{QuestionsAndAnswersList},
+  data() {
+    return {
+      detailList: {},//商品问答详情
+      productId: '',
+      images: '',
+      productName: '',
+      problemsData: {},
+      answerText: "",
+      answerslength: 0,
+      num: 0,
+      isIphone: false,
       ifShow: false
     }
   },
   onLoad(options) {
-	this.isIphone = getApp().globalData.isIphone;
-	this.problemsData = uni.getStorageSync("seeAllFnData")
-	this.getProblems()
+    this.isIphone = getApp().globalData.isIphone;
+    this.problemsData = this.$getJumpParam(options)
+    this.getProblems()
   },
-  methods:{
-	  goGoodsDetails(){
-		  let shopId = this.detailList.shopId
-		  let productId = this.detailList.productId
-		  let skuId = this.detailList.skuId
-		  uni.navigateTo({
-		  	url:'goodsDetails?shopId='+shopId+'&productId='+productId+'&skuId='+skuId
-		  })
-	  },
-	  //商品问答数据
-	  getProblems(){
-	  	NET.request(API.getProblemDetail, {
-			problemId:this.problemsData.problemId,
-			productId:this.problemsData.productId,
-		},'GET').then(res => {
-	  		this.detailList = res.data
+  methods: {
+    goGoodsDetails() {
+      let shopId = this.detailList.shopId
+      let productId = this.detailList.productId
+      let skuId = this.detailList.skuId
+      uni.navigateTo({
+        url: 'goodsDetails?shopId=' + shopId + '&productId=' + productId + '&skuId=' + skuId
+      })
+    },
+    //商品问答数据
+    getProblems() {
+      NET.request(API.getProblemDetail, {
+        problemId: this.problemsData.problemId,
+        productId: this.problemsData.productId,
+      }, 'GET').then(res => {
+        this.detailList = res.data
         this.ifShow = true
-			this.answerslength = this.detailList.answers.length
-			uni.removeStorageSync('seeAllFnData')
-	  	}).catch(res => {
-	  		uni.showToast({
-	  			title:'失败',
-	  			icon:"none"
-	  		})
-	  	})
-	  },
-	  //回答
-	  answer(){
-		  NET.request(API.addAnswer, {
-		  	productId:this.problemsData.productId,
-		  	answer:this.answerText,
-			problemId:this.problemsData.problemId
-		  },'POST').then(res => {
-			 this.getProblems()
-			 this.answerText = ""
-		  	uni.showToast({
-		  		title:'回答成功',
-		  		icon:"success"
-		  	})
-		  }).catch(res => {
-		  	uni.showToast({
-		  		title:'失败',
-		  		icon:"none"
-		  	})
-		  })
-	  }
+        this.answerslength = this.detailList.answers.length
+        uni.removeStorageSync('seeAllFnData')
+      }).catch(res => {
+        uni.showToast({
+          title: '失败',
+          icon: "none"
+        })
+      })
+    },
+    //回答
+    answer() {
+      NET.request(API.addAnswer, {
+        productId: this.problemsData.productId,
+        answer: this.answerText,
+        problemId: this.problemsData.problemId
+      }, 'POST').then(res => {
+        this.getProblems()
+        this.answerText = ""
+        uni.showToast({
+          title: '回答成功',
+          icon: "success"
+        })
+      }).catch(res => {
+        uni.showToast({
+          title: '失败',
+          icon: "none"
+        })
+      })
+    }
   }
 }
 </script>
 
-<style lang="scss" scoped>
-  .qaBox {
-    padding: 0 30upx;
-    .qaTopInfo {
-      margin-top: 20upx;
-      .qaTopInfoBox {
-        border-radius: 10upx;
+<style
+    lang="scss"
+    scoped
+>
+.qaBox {
+  padding: 0 30upx;
+
+  .qaTopInfo {
+    margin-top: 20upx;
+
+    .qaTopInfoBox {
+      border-radius: 10upx;
+      display: flex;
+      align-items: center;
+      padding: 15upx 20upx;
+      margin-bottom: 55upx;
+
+      image {
+        border: 2px solid #E4E5E6;
+        width: 120upx;
+        height: 120upx;
+        margin-right: 20upx;
+      }
+
+      .qaInfoText {
+        h3 {
+          font-size: 30upx;
+          font-weight: 500;
+          color: #333333;
+          margin-bottom: 20rpx;
+        }
+
+        span {
+          font-size: 24upx;
+          color: #999999;
+        }
+      }
+    }
+
+    .qaTitBox {
+      padding-bottom: 30upx;
+      border-bottom: 1upx solid #EEEEEE;
+
+      .qaTit {
         display: flex;
         align-items: center;
-        padding: 15upx 20upx;
-        margin-bottom: 55upx;
-        image {
-          border: 2px solid #E4E5E6;
-          width: 120upx;
-          height: 120upx;
-          margin-right: 20upx;
+        margin-bottom: 35upx;
+
+        i {
+          width: 38upx;
+          height: 38upx;
+          background: #C83732;
+          font-style: normal;
+          text-align: center;
+          color: #FFFFFF;
+          font-size: 20upx;
+          margin-right: 30upx;
         }
-        .qaInfoText {
-          h3 {
-            font-size: 30upx;
-            font-weight: 500;
-            color: #333333;
-            margin-bottom: 20rpx;
-          }
-          span {
-            font-size: 24upx;
-            color: #999999;
-          }
+
+        h3 {
+          font-size: 28upx;
+          font-weight: 500;
+          color: #333333;
         }
       }
-      .qaTitBox {
-        padding-bottom: 30upx;
-        border-bottom: 1upx solid #EEEEEE;
-        .qaTit {
-          display: flex;
-          align-items: center;
-          margin-bottom: 35upx;
-          i {
-            width: 38upx;
-            height: 38upx;
-            background: #C83732;
-            font-style: normal;
-            text-align: center;
-            color: #FFFFFF;
-            font-size: 20upx;
-            margin-right: 30upx;
-          }
-          h3 {
-            font-size: 28upx;
-            font-weight: 500;
-            color: #333333;
-          }
+
+      .qaTitTime {
+        display: flex;
+        align-items: center;
+
+        img {
+          width: 44upx;
+          height: 44upx;
+          margin-right: 20upx;
         }
-        .qaTitTime {
-          display: flex;
-          align-items: center;
-          img {
-            width: 44upx;
-            height: 44upx;
-            margin-right: 20upx;
-          }
-          .qaName {
-            font-size: 28upx;
-            color: #666666;
-            margin-right: 35upx;
-          }
-          .qaTimeInfo {
-            color: #CCCCCC;
-            font-size: 22upx;
-          }
+
+        .qaName {
+          font-size: 28upx;
+          color: #666666;
+          margin-right: 35upx;
+        }
+
+        .qaTimeInfo {
+          color: #CCCCCC;
+          font-size: 22upx;
         }
       }
     }
-    .answerListBox {
-      .answerNum {
-        font-size: 24upx;
-        color: #CCCCCC;
-        margin-bottom: 40upx;
-        margin-top: 30upx;
-      }
-      .answerList {
-        padding-bottom: 50upx;
-        .answerItem {
-          margin-bottom: 10upx;
-          .itemTit {
+  }
+
+  .answerListBox {
+    .answerNum {
+      font-size: 24upx;
+      color: #CCCCCC;
+      margin-bottom: 40upx;
+      margin-top: 30upx;
+    }
+
+    .answerList {
+      padding-bottom: 50upx;
+
+      .answerItem {
+        margin-bottom: 10upx;
+
+        .itemTit {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+
+          .itemAvatarBox {
             display: flex;
-            align-items: center;
-            justify-content: space-between;
-            .itemAvatarBox {
-              display: flex;
-              img {
-                width: 46upx;
-                height: 46upx;
-                margin-right: 20upx;
-              }
-              .answerName {
-                font-size: 26upx;
-                color: #333333;
-                font-weight: bold;
-              }
+
+            img {
+              width: 46upx;
+              height: 46upx;
+              margin-right: 20upx;
             }
-            .answerTime {
-              color: #CCCCCC;
-              font-size: 20upx;
+
+            .answerName {
+              font-size: 26upx;
+              color: #333333;
+              font-weight: bold;
             }
           }
-          .answerInfo {
-            color: #333333;
-            font-size: 28upx;
-            margin-top: 20upx;
-            font-weight: 400;
+
+          .answerTime {
+            color: #CCCCCC;
+            font-size: 20upx;
           }
         }
+
+        .answerInfo {
+          color: #333333;
+          font-size: 28upx;
+          margin-top: 20upx;
+          font-weight: 400;
+        }
       }
     }
-    .answerBtn {
-      position: fixed;
+  }
+
+  .answerBtn {
+    position: fixed;
+    width: 100%;
+    bottom: 0;
+    left: 0;
+
+    .answerBtnBox {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
       width: 100%;
-      bottom: 0;
-      left: 0;
-      .answerBtnBox {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        width: 100%;
-        padding: 30upx;
-        background: #FFFFFF;
-        input {
-          margin-right: 30upx;
-          width: 530upx;
-          background: #F1F1F1;
-          min-height: 84upx;
-          padding-left: 30upx;
-          font-size: 28upx;
-          color: #999999;
-        }
-        .input-placeholder {
-          font-size: 24upx;
-          color: #999999;
-        }
-        .answerButton {
-          width: 152upx;
-          height: 84upx;
-          background: #333333;
-          text-align: center;
-          line-height: 84upx;
-          font-size: 30upx;
-          color: #FFEBC4;
-        }
+      padding: 30upx;
+      background: #FFFFFF;
+
+      input {
+        margin-right: 30upx;
+        width: 530upx;
+        background: #F1F1F1;
+        min-height: 84upx;
+        padding-left: 30upx;
+        font-size: 28upx;
+        color: #999999;
+      }
+
+      .input-placeholder {
+        font-size: 24upx;
+        color: #999999;
+      }
+
+      .answerButton {
+        width: 152upx;
+        height: 84upx;
+        background: #333333;
+        text-align: center;
+        line-height: 84upx;
+        font-size: 30upx;
+        color: #FFEBC4;
       }
     }
   }
+}
 </style>

+ 4 - 4
pages_category_page1/goodsModule/userEvaluate.vue

@@ -200,10 +200,10 @@
 			},
 			//我的评价列表
 			getMyCommentList() {
-        uni.showLoading({
-          title: '加载中...',
-          mask: true
-        });
+        // uni.showLoading({
+        //   title: '加载中...',
+        //   mask: true
+        // });
 				NET.request(API.MyCommentList, {
 					page: this.page,
 					pageSize: this.pageSize,

+ 128 - 79
pages_category_page1/memberCenter/index.vue

@@ -1,14 +1,26 @@
 <template>
   <view>
-    <global-loading/>
-
-    <view class="memberCenter" v-if="isShow">
-      <view class="memberBg"
-            :style="{backgroundImage:'url('+memberListData[activeIndex].memberLevelBackground+')', 'padding-top': paddingTop + 'px'}">
-        <view class="member-top" :style="{'top': topHeight + 'px'}">
+    <global-loading />
+
+    <view
+        class="memberCenter"
+        v-if="isShow"
+    >
+      <view
+          class="memberBg"
+          :style="{backgroundImage:'url('+memberListData[activeIndex].memberLevelBackground+')', 'padding-top': paddingTop + 'px'}"
+      >
+        <view
+            class="member-top"
+            :style="{'top': topHeight + 'px'}"
+        >
           <view class="memberTopInfo">
             <view class="backBox">
-              <image src="https://ceres.zkthink.com/static/images/back_img04.png" class="back" @click="back"></image>
+              <image
+                  src="https://ceres.zkthink.com/static/images/back_img04.png"
+                  class="back"
+                  @click="back"
+              ></image>
             </view>
             <view class="memberTit fs30 font-color-FFF">会员中心</view>
           </view>
@@ -17,11 +29,25 @@
           <view class="posBox">
             <view class="memberBoxTop">
               <view class="memberTopPos">
-                <swiper class="swiper pro-box" next-margin="30rpx" previous-margin="30rpx" :current="activeIndex"
-                        :indicator-dots="false" :autoplay="false" @change="swiperChange">
-                  <swiper-item class="pro-item-warp" v-for="(item, index) in memberListData" :key="index">
-                    <view class='box'>
-                      <view class="memberTopBg" :style="{backgroundImage:'url('+item.memberLevelBackground+')'}">
+                <swiper
+                    class="swiper pro-box"
+                    next-margin="30rpx"
+                    previous-margin="30rpx"
+                    :current="activeIndex"
+                    :indicator-dots="false"
+                    :autoplay="false"
+                    @change="swiperChange"
+                >
+                  <swiper-item
+                      class="pro-item-warp"
+                      v-for="(item, index) in memberListData"
+                      :key="index"
+                  >
+                    <view class="box">
+                      <view
+                          class="memberTopBg"
+                          :style="{backgroundImage:'url('+item.memberLevelBackground+')'}"
+                      >
                         <view class="flex-display flex-sp-between">
                           <view class="nameBox">
                             <view class="name fs36">{{ memberData.name }}</view>
@@ -37,16 +63,28 @@
                           <view class="growingValue flex-display flex-sp-between">
                             <label class="fs24 fs-weight-400 font-color-333">当前会员成长值
                               {{ memberData.growth }}</label>
-                            <label class="fs24 fs-weight-400 font-color-333 mar-left-20"
-                                   v-if="nextGrowth !== 0 && nextGrowth !== item.growth">{{ nextGrowth }}</label>
+                            <label
+                                class="fs24 fs-weight-400 font-color-333 mar-left-20"
+                                v-if="nextGrowth !== 0 && nextGrowth !== item.growth"
+                            >{{ nextGrowth }}</label>
                           </view>
-                          <view class="progressBar" v-if="memberData.growth < nextGrowth">
+                          <view
+                              class="progressBar"
+                              v-if="memberData.growth < nextGrowth"
+                          >
                             <view style="width: 100%">
-                              <progress activeColor="#FFEBC4" :percent="getPercent(memberData.growth, nextGrowth)"
-                                        active stroke-width="2"/>
+                              <progress
+                                  activeColor="#FFEBC4"
+                                  :percent="getPercent(memberData.growth, nextGrowth)"
+                                  active
+                                  stroke-width="2"
+                              />
                             </view>
                           </view>
-                          <view class="currentName" v-else>
+                          <view
+                              class="currentName"
+                              v-else
+                          >
                             以超越该等级
                           </view>
                           <!--                      <view class="flex-display flex-sp-between">-->
@@ -66,7 +104,11 @@
           <view class="equityBox">
             <view class="equityTit">我的权益</view>
             <view class="equityList">
-              <view class="equityItem" v-for="item of equityList" :key="item.memberId">
+              <view
+                  class="equityItem"
+                  v-for="item of equityList"
+                  :key="item.memberId"
+              >
                 <image :src="item.memberIcon"></image>
                 <view class="fs26">{{ item.memberName }}</view>
               </view>
@@ -87,7 +129,11 @@
                     <view class="fs24 font-color-999">购买商品获取相应成长值</view>
                   </view>
                 </view>
-                <view class="rightBtn" @click="goToShopping">去购物</view>
+                <view
+                    class="rightBtn"
+                    @click="goToShopping"
+                >去购物
+                </view>
               </view>
             </view>
           </view>
@@ -197,7 +243,7 @@ export default {
     },
     // 获取会员等级
     getMemberByMemberLevel() {
-      NET.request(`${API.getMemberByMemberLevel}/${this.memberData.memberLevelId}`, {}, 'GET').then(res => {
+      NET.request(`${ API.getMemberByMemberLevel }/${ this.memberData.memberLevelId }`, {}, 'GET').then(res => {
         this.levelInfo = res.data
         uni.setStorageSync('storage_levelInfo', this.levelInfo);
       }).catch(res => {
@@ -211,20 +257,23 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
+<style
+    lang="scss"
+    scoped
+>
 .memberCenter {
   background-size: contain;
-  min-height: 800 rpx;
+  min-height: 800rpx;
 
   .memberBg {
     background-repeat: no-repeat;
-    padding-top: 50 rpx;
+    padding-top: 50rpx;
   }
 
   .memberBox {
     width: 100%;
     //background: #523e3a;
-    border-radius: 25 rpx;
+    border-radius: 25rpx;
     background-size: contain;
     position: relative;
     box-sizing: border-box;
@@ -236,13 +285,13 @@ export default {
         overflow: hidden;
 
         .pro-box {
-          height: 300 rpx;
+          height: 300rpx;
         }
 
         .swiper {
           .box {
-            height: 300 rpx;
-            padding: 4 rpx 10 rpx;
+            height: 300rpx;
+            padding: 4rpx 10rpx;
           }
         }
       }
@@ -250,14 +299,14 @@ export default {
       .memberTopBg {
         background-size: cover;
         background-repeat: no-repeat;
-        border-radius: 30 rpx;
-        padding: 40 rpx 30 rpx 30 rpx 30 rpx;
-        box-shadow: 0 0 5 rpx rgba(90, 90, 90, .5);
-        height: 290 rpx;
+        border-radius: 30rpx;
+        padding: 40rpx 30rpx 30rpx 30rpx;
+        box-shadow: 0 0 5rpx rgba(90, 90, 90, .5);
+        height: 290rpx;
 
         .currentName {
-          font-size: 26 rpx;
-          margin-top: 50 rpx;
+          font-size: 26rpx;
+          margin-top: 50rpx;
           color: #71521B;
         }
       }
@@ -265,9 +314,9 @@ export default {
 
     .avatarBox {
       image {
-        width: 110 rpx;
-        height: 110 rpx;
-        border: 5 rpx solid #FFFFFF;
+        width: 110rpx;
+        height: 110rpx;
+        border: 5rpx solid #FFFFFF;
         border-radius: 50%;
       }
     }
@@ -275,54 +324,54 @@ export default {
     .nameBox {
       .name {
         color: #333333;
-        margin-right: 30 rpx;
-        margin-bottom: 10 rpx;
+        margin-right: 30rpx;
+        margin-bottom: 10rpx;
       }
 
       .level {
         image {
-          width: 172 rpx;
-          height: 50 rpx;
+          width: 172rpx;
+          height: 50rpx;
         }
       }
     }
 
     .growing {
       .growingValue {
-        margin-top: 30 rpx;
+        margin-top: 30rpx;
       }
 
       .progressBar {
-        height: 20 rpx;
+        height: 20rpx;
         width: 100%;
-        margin: 20 rpx 0;
+        margin: 20rpx 0;
       }
     }
   }
 
   .equity {
-    border-radius: 25 rpx 25 rpx 0 0;
-    padding: 30 rpx;
+    border-radius: 25rpx 25rpx 0 0;
+    padding: 30rpx;
     background: #F8F8F8;
-    margin-top: 50 rpx;
+    margin-top: 50rpx;
 
     .equityBox {
       background: #FFFFFF;
-      min-height: 326 rpx;
-      border-radius: 20 rpx;
-      padding: 10 rpx 30 rpx 30 rpx 30 rpx;
+      min-height: 326rpx;
+      border-radius: 20rpx;
+      padding: 10rpx 30rpx 30rpx 30rpx;
 
       .equityTit {
         font-weight: bold;
-        height: 92 rpx;
-        line-height: 92 rpx;
+        height: 92rpx;
+        line-height: 92rpx;
       }
 
       .equityList {
-        border-top: 2 rpx solid #F3F4F5;
+        border-top: 2rpx solid #F3F4F5;
         display: flex;
         flex-flow: wrap;
-        padding-top: 30 rpx;
+        padding-top: 30rpx;
         text-align: center;
 
         .equityItem {
@@ -330,8 +379,8 @@ export default {
           color: #666666;
 
           image {
-            width: 92 rpx;
-            height: 92 rpx;
+            width: 92rpx;
+            height: 92rpx;
           }
         }
       }
@@ -339,40 +388,40 @@ export default {
   }
 
   .signIn {
-    padding: 0 30 rpx 30 rpx 30 rpx;
+    padding: 0 30rpx 30rpx 30rpx;
     background: #F8F8F8;
 
     .signInList {
       background: #FFFFFF;
-      border-radius: 20 rpx;
-      padding: 0 30 rpx 30 rpx 30 rpx;
+      border-radius: 20rpx;
+      padding: 0 30rpx 30rpx 30rpx;
 
       .signTit {
         font-weight: bold;
-        height: 92 rpx;
-        line-height: 92 rpx;
+        height: 92rpx;
+        line-height: 92rpx;
       }
 
       .signInBox {
         .signItem {
-          border-top: 2 rpx solid #F3F4F5;
-          padding: 30 rpx 0;
+          border-top: 2rpx solid #F3F4F5;
+          padding: 30rpx 0;
 
           .itemLeft {
             image {
-              width: 92 rpx;
-              height: 92 rpx;
-              margin-right: 30 rpx;
+              width: 92rpx;
+              height: 92rpx;
+              margin-right: 30rpx;
             }
           }
         }
 
         .rightBtn {
-          width: 160 rpx;
-          height: 58 rpx;
-          line-height: 58 rpx;
+          width: 160rpx;
+          height: 58rpx;
+          line-height: 58rpx;
           background: #333333;
-          border-radius: 10 rpx;
+          border-radius: 10rpx;
           color: #FFEBC4;
           text-align: center;
         }
@@ -389,7 +438,7 @@ export default {
     .memberTopInfo {
       position: relative;
       width: 100%;
-      height: 60 rpx;
+      height: 60rpx;
       display: flex;
       align-items: center;
       justify-content: center;
@@ -397,13 +446,13 @@ export default {
 
     .backBox {
       position: absolute;
-      left: 10 rpx;
-      top: 0 rpx;
+      left: 10rpx;
+      top: 0rpx;
 
       .back {
-        width: 50 rpx;
-        height: 50 rpx;
-        padding: 0 rpx 10 rpx;
+        width: 50rpx;
+        height: 50rpx;
+        padding: 0rpx 10rpx;
       }
     }
   }
@@ -416,11 +465,11 @@ page {
 
 .progressBar /deep/ .uni-progress-bar {
   background-color: rgb(235, 235, 235, 0.6) !important;
-  height: 5 rpx !important;
-  border-radius: 22 rpx;
+  height: 5rpx !important;
+  border-radius: 22rpx;
 }
 
 .progressBar /deep/ .uni-progress-bar .uni-progress-inner-bar {
-  border-radius: 22 rpx;
+  border-radius: 22rpx;
 }
 </style>

+ 258 - 85
pages_category_page1/orderModule/afterSaleApplyRefund.vue

@@ -1,18 +1,31 @@
 <template>
   <view class="container">
-    <view class="content" style="padding-bottom:200upx;">
-      <view class="order-list-box" v-for="(item,index) in list" :key="index">
+    <view
+        class="content"
+        style="padding-bottom:200upx;"
+    >
+      <view
+          class="order-list-box"
+          v-for="(item,index) in list"
+          :key="index"
+      >
         <view class="item">
           <view class="order-info-box">
             <view class="order-info">
               <view class="order-info-item">
-                <image :src="item.image" class="product-img"></image>
+                <image
+                    :src="item.image"
+                    class="product-img"
+                ></image>
                 <view class="info-box">
-                  <text class="product-name">{{item.productName}}</text>
-                  <view class="product-sku">{{item.sku}} {{item.value}}</view>
+                  <text class="product-name">{{ item.productName }}</text>
+                  <view class="product-sku">{{ item.sku }} {{ item.value }}</view>
                   <view class="price-sku-box">
-                    <text class="product-price"><text class="fuhao">¥</text>{{item.price}}</text>
-                    <text class="product-num">x {{item.number}}</text>
+                    <text class="product-price">
+                      <text class="fuhao">¥</text>
+                      {{ item.price }}
+                    </text>
+                    <text class="product-num">x {{ item.number }}</text>
                   </view>
                 </view>
               </view>
@@ -21,33 +34,73 @@
         </view>
       </view>
       <view class="afterSale-select-box">
-        <view class="item" @click="refundType">
+        <view
+            class="item"
+            @click="refundType"
+        >
           <view class="l">退款类型</view>
-          <view class="r-box" v-model="afterType" v-if="afterType == 1">
+          <view
+              class="r-box"
+              v-model="afterType"
+              v-if="afterType == 1"
+          >
             <text>仅退款</text>
-            <image src="https://ceres.zkthink.com/static/images/arrowRight.png" class="r"></image>
+            <image
+                src="https://ceres.zkthink.com/static/images/arrowRight.png"
+                class="r"
+            ></image>
           </view>
-          <view class="r-box" v-model="afterType" v-if="afterType == 2">
+          <view
+              class="r-box"
+              v-model="afterType"
+              v-if="afterType == 2"
+          >
             <text>退货退款</text>
-            <image src="https://ceres.zkthink.com/static/images/arrowRight.png" class="r"></image>
+            <image
+                src="https://ceres.zkthink.com/static/images/arrowRight.png"
+                class="r"
+            ></image>
           </view>
         </view>
-        <view class="item" @click="openStatusSelect">
+        <view
+            class="item"
+            @click="openStatusSelect"
+        >
           <view class="l">货物状态</view>
-          <view class="r-box" v-model="ReturnMoneyQuery.goodsState" v-if="ReturnMoneyQuery.goodsState == 0">
+          <view
+              class="r-box"
+              v-model="ReturnMoneyQuery.goodsState"
+              v-if="ReturnMoneyQuery.goodsState == 0"
+          >
             <text>未收到货</text>
-            <image src="https://ceres.zkthink.com/static/images/arrowRight.png" class="r"></image>
+            <image
+                src="https://ceres.zkthink.com/static/images/arrowRight.png"
+                class="r"
+            ></image>
           </view>
-          <view class="r-box" v-model="ReturnMoneyQuery.goodsState" v-if="ReturnMoneyQuery.goodsState == 1">
+          <view
+              class="r-box"
+              v-model="ReturnMoneyQuery.goodsState"
+              v-if="ReturnMoneyQuery.goodsState == 1"
+          >
             <text>已收到货</text>
-            <image src="https://ceres.zkthink.com/static/images/arrowRight.png" class="r"></image>
+            <image
+                src="https://ceres.zkthink.com/static/images/arrowRight.png"
+                class="r"
+            ></image>
           </view>
         </view>
-        <view class="item" @click="openReasonSelect">
+        <view
+            class="item"
+            @click="openReasonSelect"
+        >
           <view class="l">退款原因</view>
           <view class="r-box">
-            <text v-model="ReturnMoneyQuery.returnReason">{{liyoutext}}</text>
-            <image src="https://ceres.zkthink.com/static/images/arrowRight.png" class="r"></image>
+            <text v-model="ReturnMoneyQuery.returnReason">{{ liyoutext }}</text>
+            <image
+                src="https://ceres.zkthink.com/static/images/arrowRight.png"
+                class="r"
+            ></image>
           </view>
         </view>
       </view>
@@ -55,13 +108,18 @@
       <view class="afterSale-select-box mt20">
         <view class="item">
           <view class="l">退款金额:
-            <text class="order-status">¥ {{sellPriceitem.toFixed(2) }}</text>
+            <text class="order-status">¥ {{ sellPriceitem.toFixed(2) }}</text>
           </view>
         </view>
         <view class="item item-start">
           <view class="l">退款说明:</view>
           <view class="r-box r-box2">
-            <input v-model="ReturnMoneyQuery.returnDesc" type="text" placeholder="选填" class="r-box-input"></input>
+            <input
+                v-model="ReturnMoneyQuery.returnDesc"
+                type="text"
+                placeholder="选填"
+                class="r-box-input"
+            ></input>
           </view>
         </view>
       </view>
@@ -69,7 +127,15 @@
       <view class="afterSale-select-box mt20">
         <view class="upload-title">上传凭证</view>
         <view class="mar-left-10 mar-top-10">
-          <u-upload :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']"  max-count="4" upload-text="上传凭证" :action="action" ref="uUpload" :header="headerToken" :form-data="formData"></u-upload>
+          <u-upload
+              :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']"
+              max-count="4"
+              upload-text="上传凭证"
+              :action="action"
+              ref="uUpload"
+              :header="headerToken"
+              :form-data="formData"
+          ></u-upload>
         </view>
       </view>
 
@@ -84,64 +150,167 @@
       </view>
     </view>
 
-    <view class="order-confirm-box" style="padding-top:30upx;" :style="{'padding-bottom':(isIphone==true? 60:0)+'rpx'}">
-      <text class="btn" @click="confirmTap">提交</text>
+    <view
+        class="order-confirm-box"
+        style="padding-top:30upx;"
+        :style="{'padding-bottom':(isIphone==true? 60:0)+'rpx'}"
+    >
+      <text
+          class="btn"
+          @click="confirmTap"
+      >提交
+      </text>
     </view>
 
     <!-- 货物状态弹框 -->
-    <u-popup v-model="refundTypeShow" mode="bottom" border-radius="14">
+    <u-popup
+        v-model="refundTypeShow"
+        mode="bottom"
+        border-radius="14"
+    >
       <view class="alert-box">
         <view class="afterSale-status-box">
           <view class="status-title">退款类型</view>
           <view class="item-box">
-            <view class="item" @click="afterType = 1">
+            <view
+                class="item"
+                @click="afterType = 1"
+            >
               <text class="status-select-title">仅退款</text>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectActive.png" v-if="afterType == 1" class="status-select-img"></image>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectEmpty.png" v-else class="status-select-img"></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectActive.png"
+                  v-if="afterType == 1"
+                  class="status-select-img"
+              ></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectEmpty.png"
+                  v-else
+                  class="status-select-img"
+              ></image>
             </view>
-            <view class="item" @click="afterType = 2">
+            <view
+                class="item"
+                @click="afterType = 2"
+            >
               <text class="status-select-title">退货退款</text>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectActive.png" v-if="afterType == 2" class="status-select-img"></image>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectEmpty.png" v-else class="status-select-img"></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectActive.png"
+                  v-if="afterType == 2"
+                  class="status-select-img"
+              ></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectEmpty.png"
+                  v-else
+                  class="status-select-img"
+              ></image>
             </view>
           </view>
-          <view class="status-btn" @click="closeAfterSelect">确定</view>
+          <view
+              class="status-btn"
+              @click="closeAfterSelect"
+          >确定
+          </view>
         </view>
       </view>
     </u-popup>
-    <u-popup v-model="cargoStatusShowFalg" mode="bottom" border-radius="14">
+    <u-popup
+        v-model="cargoStatusShowFalg"
+        mode="bottom"
+        border-radius="14"
+    >
       <view class="alert-box">
         <view class="afterSale-status-box">
           <view class="status-title">货物状态</view>
           <view class="item-box">
-            <view class="item" @click="ReturnMoneyQuery.goodsState = 0">
+            <view
+                class="item"
+                @click="ReturnMoneyQuery.goodsState = 0"
+            >
               <text class="status-select-title">未收到货</text>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectActive.png" v-if="ReturnMoneyQuery.goodsState == 0" class="status-select-img"></image>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectEmpty.png" v-else class="status-select-img"></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectActive.png"
+                  v-if="ReturnMoneyQuery.goodsState == 0"
+                  class="status-select-img"
+              ></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectEmpty.png"
+                  v-else
+                  class="status-select-img"
+              ></image>
             </view>
-            <view class="item" @click="ReturnMoneyQuery.goodsState = 1">
+            <view
+                class="item"
+                @click="ReturnMoneyQuery.goodsState = 1"
+            >
               <text class="status-select-title">已收到货</text>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectActive.png" v-if="ReturnMoneyQuery.goodsState == 1" class="status-select-img"></image>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectEmpty.png" v-else class="status-select-img"></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectActive.png"
+                  v-if="ReturnMoneyQuery.goodsState == 1"
+                  class="status-select-img"
+              ></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectEmpty.png"
+                  v-else
+                  class="status-select-img"
+              ></image>
             </view>
           </view>
-          <view class="status-btn" @click="closeStatusSelect">确定</view>
+          <view
+              class="status-btn"
+              @click="closeStatusSelect"
+          >确定
+          </view>
         </view>
       </view>
     </u-popup>
     <!-- 退款原因弹框 -->
-    <u-popup v-model="reasonShowFalg" mode="bottom" border-radius="14">
+    <u-popup
+        v-model="reasonShowFalg"
+        mode="bottom"
+        border-radius="14"
+    >
       <view class="alert-box">
-        <view class="afterSale-status-box" scroll-y style="height:60%;">
+        <view
+            class="afterSale-status-box"
+            scroll-y
+            style="height:60%;"
+        >
           <view class="status-title">退款原因</view>
           <view class="item-box">
-            <view class="item" @click="returnReasonTap(item,index)" v-for="(item,index) in liyouData" :key="index">
-              <text class="status-select-title">{{item}}</text>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectActive.png" v-if="ReturnMoneyQuery.returnReason == index" class="status-select-img"></image>
-              <image mode="aspectFill" src="https://ceres.zkthink.com/static/images/selectEmpty.png" v-else class="status-select-img"></image>
+            <view
+                class="item"
+                @click="returnReasonTap(item,index)"
+                v-for="(item,index) in liyouData"
+                :key="index"
+            >
+              <text class="status-select-title">{{ item }}</text>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectActive.png"
+                  v-if="ReturnMoneyQuery.returnReason == index"
+                  class="status-select-img"
+              ></image>
+              <image
+                  mode="aspectFill"
+                  src="https://ceres.zkthink.com/static/images/selectEmpty.png"
+                  v-else
+                  class="status-select-img"
+              ></image>
             </view>
           </view>
-          <view class="status-btn" @click="closeReasonSelect">确定</view>
+          <view
+              class="status-btn"
+              @click="closeReasonSelect"
+          >确定
+          </view>
         </view>
       </view>
     </u-popup>
@@ -169,21 +338,21 @@ export default {
         returnImgs: "",
         returnReason: 0
       },
-      action:API.UploadUrl,
-      formData:{'folderId': -1},
-      headerToken:{Authorization:''},
-      fileList:[],
-      sellPriceitem: 0 ,//退款价格
-      orderCode:'',	// 选中订单编码
+      action: API.UploadUrl,
+      formData: {'folderId': -1},
+      headerToken: {Authorization: ''},
+      fileList: [],
+      sellPriceitem: 0,//退款价格
+      orderCode: '',	// 选中订单编码
       liyouData: [],
       liyoutext: '',
       liyouindex: '',
-      afterRefund:'',
-      orderId:0,
+      afterRefund: '',
+      orderId: 0,
       isIphone: false,
       commentImgs: '',
       afterType: 1,
-	  isAllSelect:0,
+      isAllSelect: 0,
     }
   },
   onReady() {
@@ -191,25 +360,25 @@ export default {
     this.fileList = this.$refs.uUpload.lists
   },
   async onLoad(options) {
-	  console.log(options,'options')
+    console.log(options, 'options')
     if (uni.getStorageSync('applyItem')) {
       this.afterRefund = uni.getStorageSync('applyItem')
       this.list.push(this.afterRefund)
     } else if (uni.getStorageSync('afterSaleApplyRefund')) {
       this.list = uni.getStorageSync('afterSaleApplyRefund')
     }
-	console.log(this.list,'this.list')
+    console.log(this.list, 'this.list')
     this.orderId = parseInt(options.orderId)
-	this.isAllSelect = options.isAllSelect
-	console.log(this.isAllSelect,'this.isAllSelect')
+    this.isAllSelect = options.isAllSelect
+    console.log(this.isAllSelect, 'this.isAllSelect')
     const res = uni.getStorageSync('storage_key');
     this.headerToken.Authorization = res.token
     this.list.forEach(el => {
-		if(this.isAllSelect > 0){
-			this.sellPriceitem = this.sellPriceitem + (el.number*el.price) + el.logisticsPrice
-		}else{
-			this.sellPriceitem = this.sellPriceitem + (el.number*el.price)
-		}
+      if (this.isAllSelect > 0) {
+        this.sellPriceitem = this.sellPriceitem + (el.number * el.price) + el.logisticsPrice
+      } else {
+        this.sellPriceitem = this.sellPriceitem + (el.number * el.price)
+      }
 
     })
     // this.sellPriceitem = options.sellPriceitem
@@ -217,7 +386,7 @@ export default {
     this.getReasonEnums()
     uni.removeStorageSync('applyItem')
     uni.removeStorageSync('afterSaleApplyRefund')
-    this.sellPriceitem=await this.HandleGetRefundMoney()
+    this.sellPriceitem = await this.HandleGetRefundMoney()
   },
   methods: {
     // 算钱
@@ -228,15 +397,15 @@ export default {
         // })
         let postData = {
           orderId: this.orderId,
-          isAllSelect: this.isAllSelect==1 ? 1 : 0,
+          isAllSelect: this.isAllSelect == 1 ? 1 : 0,
           skus: this.list,
-          afterType:2,
-          goodsState:this.ReturnMoneyQuery.goodsState
+          afterType: 2,
+          goodsState: this.ReturnMoneyQuery.goodsState
         }
         NET.request(API.GetRefundMoney, postData, "POST").then(res => {
           uni.hideLoading()
-          resolve (parseFloat(res.json))
-        }).catch(err=>{
+          resolve(parseFloat(res.json))
+        }).catch(err => {
           uni.hideLoading()
         })
       })
@@ -245,10 +414,10 @@ export default {
 
     confirmTap() {
       console.log(this.fileList, 'commentImgs')
-      if(this.fileList.length>0){
+      if (this.fileList.length > 0) {
         this.commentImgsFlag = true
-        for(let i=0;i<this.fileList.length;i++){
-          this.commentImgs += this.fileList[i].response.data.url+','
+        for (let i = 0; i < this.fileList.length; i++) {
+          this.commentImgs += this.fileList[i].response.data.url + ','
         }
       }
       this.ReturnMoney()
@@ -257,7 +426,8 @@ export default {
       NET.request(API.ReasonEnums, 'GET').then(res => {
         this.liyouData = res.data
         this.liyoutext = this.liyouData[0]
-      }).catch(res => {})
+      }).catch(res => {
+      })
     },
     ReturnMoney() {
       if (this.ReturnMoneyQuery.goodsState === '') {
@@ -290,15 +460,15 @@ export default {
         // 	skusobjdata.push(skusobj)
         // }
         NET.request(API.ApplyReturnMoney, {
-          orderId:this.orderId,
+          orderId: this.orderId,
           afterType: this.afterType,
-          goodsState:this.ReturnMoneyQuery.goodsState,
+          goodsState: this.ReturnMoneyQuery.goodsState,
           price: this.sellPriceitem,
-          returnReason:this.liyoutext,
-          explain:this.ReturnMoneyQuery.returnDesc,
-          image:this.commentImgs,
-          skus:skusobjdata,
-		  isAllSelect: this.isAllSelect
+          returnReason: this.liyoutext,
+          explain: this.ReturnMoneyQuery.returnDesc,
+          image: this.commentImgs,
+          skus: skusobjdata,
+          isAllSelect: this.isAllSelect
         }, 'POST').then(res => {
           uni.hideLoading()
           uni.showToast({
@@ -337,7 +507,7 @@ export default {
     },
     async closeStatusSelect() {
       this.cargoStatusShowFalg = false
-      this.sellPriceitem=await this.HandleGetRefundMoney()
+      this.sellPriceitem = await this.HandleGetRefundMoney()
 
     },
     closeAfterSelect() {
@@ -351,9 +521,10 @@ export default {
 </script>
 
 <style lang="scss">
-.u-active{
+.u-active {
   display: none !important;
 }
+
 .content {
   padding: 0 0 120upx;
   box-sizing: border-box;
@@ -747,6 +918,7 @@ export default {
   background: #FFFFFF;
   border: 2rpx solid #E4E5E6;
 }
+
 .afterSale-select-box /deep/ .u-upload .uicon-plus:before {
   content: '';
   width: 80rpx;
@@ -754,6 +926,7 @@ export default {
   background: url("https://ceres.zkthink.com/static/images/addImgBtn.png") center center;
   background-size: contain;
 }
+
 .afterSale-select-box /deep/ .u-add-tips {
   color: #999999 !important;
 }

+ 35 - 0
pages_category_page1/orderModule/config/orderConfig.js

@@ -0,0 +1,35 @@
+/**
+ * @FileDescription:订单模块config
+ * @Author: kahu
+ * @Date: 2022/11/18
+ * @LastEditors: kahu
+ * @LastEditTime: 2022/11/18
+ */
+export const orderTypeEnum = {
+    1:'待付款',
+    2:'待发货',
+    3:'待收货',
+    4:'已完成',
+    5:'交易关闭',
+    6:'待成团'
+}
+
+export const orderTabList = [{
+    name: '全部',
+    number: 0
+}, {
+    name: '待付款',
+    number: 1
+}, {
+    name: '待发货',
+    number: 2
+}, {
+    name: '待收货',
+    number: 3
+}, {
+    name: '待评价',
+    number: 4
+}, {
+    name: '待成团',
+    number: 6
+}]

Різницю між файлами не показано, бо вона завелика
+ 608 - 856
pages_category_page1/orderModule/index.vue


Різницю між файлами не показано, бо вона завелика
+ 453 - 272
pages_category_page1/orderModule/orderConfirm.vue


+ 103 - 445
pages_category_page1/orderModule/orderDetails.vue

@@ -284,91 +284,88 @@
         </view>
       </view>
 
-      <!-- 待付款 待发货 待收货 已完成 退款成功 -->
-      <view class="order-details-btn" style="padding-top:30upx;"
-            :style="{'padding-bottom':(isIphone==true? 40:0)+'rpx'}">
-        <text class="btn-l" @click="cancelOrder" v-if="dataList.state==1 || dataList.state==6">取消订单</text>
-        <text class="btn btn-r" @click="payOrder" v-if="dataList.state==1">立即付款</text>
-        <text class="btn-l" @click="applyMoneyAllTap" v-if="dataList.state==2 || dataList.state==3">申请退款</text>
-        <text class="btn btn-r" @click="confirmReceiptTap" v-if="dataList.state==3">确认收货</text>
-        <text class="btn" @click="applyTap" v-if="dataList.state==4">申请售后</text>
-        <text class="btn btn-r"
-              @click="goInviteSpll(dataList.collageId,dataList.orderId,dataList.skus[0].productId,dataList.skus[0].skuId,dataList.shopGroupWorkId)"
-              v-if="dataList.state==6">邀请拼单
-        </text>
-        <text class="btn-l" @click="delOrder" v-if="dataList.state==5 && dataList.collageId == 0">删除订单</text>
-        <text class="btn btn-r"
-              @click="againCollage(dataList.skus[0].productId,dataList.shopId,dataList.skus[0].skuId)"
-              v-if="dataList.state==5 && dataList.collageId == 0">再次购买
-        </text>
-        <text class="btn" @click="againCollage(dataList.skus[0].productId,dataList.shopId,dataList.skus[0].skuId)"
-              v-if="dataList.state==5 && dataList.collageId != 0">再次开团
-        </text>
-      </view>
-      <u-popup class="pay-type-popup" v-model="showPayTypePopup" mode="bottom" border-radius="14"
-               close-icon-pos="top-right" close-icon-size="20">
-        <view class="pay-type-item">
-          <radio-group @change="payTypeChange" v-model="paymentMode">
-            <view class="pay-type-radio">
-              <view class="pay-type-img">
-                <img class="pay-type-img-inner" src="https://ceres.zkthink.com/static/images/alipay.png"/>
-              </view>
-              <label class="pay-type-label">支付宝支付</label>
-              <radio class="pay-type-radio-item" style="transform:scale(0.7)" :checked="paymentMode == 2"
-                     value="2"/>
-            </view>
-            <view class="pay-type-radio">
-              <view class="pay-type-img">
-                <img class="pay-type-img-inner" src="https://ceres.zkthink.com/static/images/huabei.png"/>
-              </view>
-              <label class="pay-type-label">花呗分期</label>
-              <radio class="pay-type-radio-item" style="transform:scale(0.7)" :disabled="totalPrice < 0.03"
-                     :checked="paymentMode == 3" value="3"/>
-            </view>
-          </radio-group>
-          <view class="huabei-detail">
-            <radio-group @change="huabeiPeriodChange" v-model="huabeiPeriod">
-              <view class="period-radio">
-                <view class="period-amount">
-                  <label class="period-each">¥ {{ fenqiFeeList[0]|clip2Decimal }}x3期</label>
-                  <label class="period-each-charge">手续费¥{{ chargeFeeList[0]|clip2Decimal }}/期</label>
-                </view>
-                <radio class="period-type-radio-item" style="transform:scale(0.7)"
-                       :disabled="fenqiDisabledList[0]" :checked="huabeiPeriod == 3" value="3"/>
-              </view>
-              <view class="period-radio">
-                <view class="period-amount">
-                  <label class="period-each">¥ {{ fenqiFeeList[1]|clip2Decimal }}x6期</label>
-                  <label class="period-each-charge">手续费¥{{ chargeFeeList[1]|clip2Decimal }}/期</label>
-                </view>
-                <radio class="period-type-radio-item" style="transform:scale(0.7)"
-                       :disabled="fenqiDisabledList[1]" :checked="huabeiPeriod == 6" value="6"/>
-              </view>
-              <view class="period-radio">
-                <view class="period-amount">
-                  <label class="period-each">¥ {{ fenqiFeeList[2]|clip2Decimal }}x12期</label>
-                  <label class="period-each-charge">手续费¥{{ chargeFeeList[2]|clip2Decimal }}/期</label>
-                </view>
-                <radio class="period-type-radio-item" style="transform:scale(0.7)"
-                       :disabled="fenqiDisabledList[2]" :checked="huabeiPeriod == 12" value="12"/>
-              </view>
-            </radio-group>
-          </view>
-        </view>
-        <view class="paytype-confirm">
-          <view class="fenqi-total-amount" v-if="totalPrice >= 0.03 && paymentMode == 3">
-            <label class="fenqi-all">分期总额 ¥{{ totalPrice|clip2Decimal }}</label>
-            <label class="charge-fee-all">手续费 ¥{{ chargeFee|clip2Decimal }}</label>
-          </view>
-          <view class="fenqi-total-amount" v-if="paymentMode == 2">
-            <label class="order-amount">订单总额 ¥{{ totalPrice|clip2Decimal }}</label>
-          </view>
-          <view class="fenqi-confirm">
-            <text class="btn active" @click="continuePay">确认</text>
-          </view>
-        </view>
-      </u-popup>
-    </view>
+		<!-- 待付款 待发货 待收货 已完成 退款成功 -->
+		<view class="order-details-btn" style="padding-top:30upx;"
+			:style="{'padding-bottom':(isIphone==true? 40:0)+'rpx'}">
+			<text class="btn-l" @click="cancelOrder" v-if="dataList.state==1 || dataList.state==6">取消订单</text>
+			<text class="btn btn-r" @click="payOrder" v-if="dataList.state==1">立即付款</text>
+			<text class="btn-l" @click="applyMoneyAllTap" v-if="dataList.state==2 || dataList.state==3">申请退款</text>
+			<text class="btn btn-r" @click="confirmReceiptTap" v-if="dataList.state==3">确认收货</text>
+			<text class="btn" @click="applyTap" v-if="dataList.state==4">申请售后</text>
+			<text class="btn btn-r"
+				@click="goInviteSpll(dataList.collageId,dataList.orderId,dataList.skus[0].productId,dataList.skus[0].skuId,dataList.shopGroupWorkId)"
+				v-if="dataList.state==6">邀请拼单</text>
+			<text class="btn-l" @click="delOrder" v-if="dataList.state==5 && dataList.collageId == 0">删除订单</text>
+			<text class="btn btn-r"
+				@click="againCollage(dataList.skus[0].productId,dataList.shopId,dataList.skus[0].skuId,dataList)"
+				v-if="dataList.state==5 && dataList.collageId == 0">再次购买</text>
+			<text class="btn" @click="againCollage(dataList.skus[0].productId,dataList.shopId,dataList.skus[0].skuId,dataList)"
+				v-if="dataList.state==5 && dataList.collageId != 0">再次开团</text>
+		</view>
+		<u-popup class="pay-type-popup" v-model="showPayTypePopup" mode="bottom" border-radius="14"
+			close-icon-pos="top-right" close-icon-size="20">
+			<view class="pay-type-item">
+				<radio-group @change="payTypeChange" v-model="paymentMode">
+					<view class="pay-type-radio">
+						<view class="pay-type-img">
+							<img class="pay-type-img-inner" src="https://ceres.zkthink.com/static/images/alipay.png" />
+						</view>
+						<label class="pay-type-label">支付宝支付</label>
+						<radio class="pay-type-radio-item" style="transform:scale(0.7)" :checked="paymentMode == 2"
+							value="2" />
+					</view>
+					<view class="pay-type-radio">
+						<view class="pay-type-img">
+							<img class="pay-type-img-inner" src="https://ceres.zkthink.com/static/images/huabei.png" />
+						</view>
+						<label class="pay-type-label">花呗分期</label>
+						<radio class="pay-type-radio-item" style="transform:scale(0.7)" :disabled="totalPrice < 0.03"
+							:checked="paymentMode == 3" value="3" />
+					</view>
+				</radio-group>
+				<view class="huabei-detail">
+					<radio-group @change="huabeiPeriodChange" v-model="huabeiPeriod">
+						<view class="period-radio">
+							<view class="period-amount">
+								<label class="period-each">¥ {{fenqiFeeList[0]|clip2Decimal}}x3期</label>
+								<label class="period-each-charge">手续费¥{{chargeFeeList[0]|clip2Decimal}}/期</label>
+							</view>
+							<radio class="period-type-radio-item" style="transform:scale(0.7)"
+								:disabled="fenqiDisabledList[0]" :checked="huabeiPeriod == 3" value="3" />
+						</view>
+						<view class="period-radio">
+							<view class="period-amount">
+								<label class="period-each">¥ {{fenqiFeeList[1]|clip2Decimal}}x6期</label>
+								<label class="period-each-charge">手续费¥{{chargeFeeList[1]|clip2Decimal}}/期</label>
+							</view>
+							<radio class="period-type-radio-item" style="transform:scale(0.7)"
+								:disabled="fenqiDisabledList[1]" :checked="huabeiPeriod == 6" value="6" />
+						</view>
+						<view class="period-radio">
+							<view class="period-amount">
+								<label class="period-each">¥ {{fenqiFeeList[2]|clip2Decimal}}x12期</label>
+								<label class="period-each-charge">手续费¥{{chargeFeeList[2]|clip2Decimal}}/期</label>
+							</view>
+							<radio class="period-type-radio-item" style="transform:scale(0.7)"
+								:disabled="fenqiDisabledList[2]" :checked="huabeiPeriod == 12" value="12" />
+						</view>
+					</radio-group>
+				</view>
+			</view>
+			<view class="paytype-confirm">
+				<view class="fenqi-total-amount" v-if="totalPrice >= 0.03 && paymentMode == 3">
+					<label class="fenqi-all">分期总额 ¥{{ totalPrice|clip2Decimal }}</label>
+					<label class="charge-fee-all">手续费 ¥{{ chargeFee|clip2Decimal }}</label>
+				</view>
+				<view class="fenqi-total-amount" v-if="paymentMode == 2">
+					<label class="order-amount">订单总额 ¥{{ totalPrice|clip2Decimal }}</label>
+				</view>
+				<view class="fenqi-confirm">
+					<text class="btn active" @click="continuePay">确认</text>
+				</view>
+			</view>
+		</u-popup>
+	</view>
   </view>
 </template>
 
@@ -382,7 +379,9 @@ import {
 var jweixin = require('jweixin-module')
 // #endif
 
-import uniSteps from "@/components/uni-steps/uni-steps.vue"
+	import uniSteps from "@/components/uni-steps/uni-steps.vue"
+  import { handleDoPay } from "../../utils/payUtil";
+  import { Services } from "../../utils/services";
 
 const NET = require('../../utils/request')
 const API = require('../../config/api')
@@ -436,11 +435,12 @@ export default {
 		},
 		onLoad(options) {
 			this.isIphone = getApp().globalData.isIphone;
+      if(options.detail){
+        options = this.$getJumpParam(options)
+      }
 			this.orderId = (parseInt(options.orderId))
-			if (uni.getStorageSync("afterapplyItem")) {
-				this.item = uni.getStorageSync("afterapplyItem")
-			}
-			if (options.noticeId) {
+      this.item = options
+      if (options.noticeId) {
 				this.noticeId = options.noticeId
 			}
 			this.getDataList(this.orderId)
@@ -465,7 +465,6 @@ export default {
 		methods: {
       //去商品详情
       againCollage(productId, shopId, skuId, isStartAGroup, item) {
-        console.log(item)
         if (isStartAGroup) {
           uni.navigateTo({
             url: '../goodsModule/goodsDetails?productId=' + productId + '&shopId=' + shopId + '&skuId=' +
@@ -796,17 +795,10 @@ export default {
 					// uni.hideLoading()
 				}).finally(()=>this.$hideLoading())
 			},
-			payOrder() {
+			async payOrder() {
 				// #ifdef MP-ALIPAY
 				this.showPayTypePopup = true
 				this.totalPrice = this.dataList.price
-				// #endif
-				// #ifndef MP-ALIPAY
-				// uni.showLoading({
-				// 	mask: true,
-				// 	title: '订单提交中...',
-				// })
-        this.$showLoading("加载中...")
 				// #endif
 				let submitResult = {
 					collageId: this.dataList.collageId,
@@ -814,270 +806,9 @@ export default {
 					orderId: this.dataList.orderId,
 					type: 2
 				}
-				// #ifdef H5
-				let ua = navigator.userAgent.toLowerCase();
-				if (ua.match(/MicroMessenger/i) == "micromessenger") {
-					this.payRequest(submitResult)
-				} else {
-					NET.request(API.gotoH5Pay, submitResult, 'POST').then(res => {
-						//console.dir(res)
-            this.$hideLoading()
-						location.replace(res.data.mwebUrl)
-						// window.location.replace(url)
-					}).catch(err => {
-						this.submitActive = true
-						// uni.hideLoading()
-            this.$hideLoading()
-						uni.showToast({
-							title: '支付失败',
-							icon: 'none'
-						})
-					})
-				}
-				// #endif
-				// #ifdef MP-WEIXIN
-				NET.request(API.gotoPay, submitResult, 'POST').then(res => {
-					uni.requestPayment({
-						provider: 'wxpay',
-						timeStamp: res.data.timeStamp,
-						nonceStr: res.data.nonceStr,
-						package: res.data.package,
-						signType: res.data.signType,
-						paySign: res.data.paySign,
-						success: function(payRes) {
-							uni.showToast({
-								icon: 'none',
-								title: '支付成功'
-							})
-							uni.navigateTo({
-								url: 'index?type=0'
-							})
-						},
-						fail: function(err) {
-							uni.showToast({
-								icon: 'none',
-								title: '支付失败'
-							})
-						}
-					})
-				}).catch(err => {
-					uni.hideLoading()
-					uni.showToast({
-						title: '支付失败',
-						icon: 'none'
-					})
-				})
-				// #endif
-				// #ifdef MP-ALIPAY
-				this.alipayInfo = submitResult
-				// #endif
-				// #ifdef APP-PLUS
-				NET.request(API.gotoAppPay, submitResult, 'POST').then(res => {
-					var obj = {
-					  appid: res.data.appId,
-					  noncestr: res.data.nonceStr,
-					  package: 'Sign=WXPay',
-					  prepayid: res.data.prepayId,
-					  timestamp: res.data.timeStamp,
-					  sign: res.data.paySign,
-					  partnerid: res.data.partnerId
-					}
-					uni.requestPayment({
-						provider: 'wxpay',
-						orderInfo: obj,
-						success: function(payRes) {
-							uni.showToast({
-								icon: 'none',
-								title: '支付成功'
-							})
-							uni.navigateTo({
-								url: 'index?type=0'
-							})
-						},
-						fail: function(err) {
-							console.log(err)
-							uni.showToast({
-								icon: 'none',
-								title: '支付取消'
-							})
-						}
-					})
-				}).catch(err => {
-					uni.hideLoading()
-					uni.showToast({
-						title: '支付失败',
-						icon: 'none'
-					})
-				})
-				// #endif
+        await handleDoPay.call(this,submitResult)
 			},
-			// 继续付款
-			continuePay() {
-				// uni.showLoading({
-				// 	mask: true,
-				// 	title: '加载中...',
-				// })
-        this.$showLoading("加载中...")
 
-        const payInfo = Object.assign({}, this.alipayInfo, {
-					'paymentMode': this.paymentMode,
-					'huabeiPeriod': this.huabeiPeriod
-				});
-				this.aliPay(payInfo)
-			},
-			// 支付宝支付
-			aliPay(payInfo) {
-				NET.request(API.gotoPay, payInfo, 'POST').then(res => {
-					uni.requestPayment({
-						provider: 'alipay',
-						orderInfo: res.data.tradeNo,
-						success: function(payRes) {
-							// uni.hideLoading()
-              this.$hideLoading()
-							if (payRes.resultCode == '6001') {
-								uni.showToast({
-									icon: 'none',
-									title: '取消支付'
-								})
-							}
-							if (payRes.resultCode == '9000') {
-								uni.showToast({
-									icon: 'none',
-									title: '支付成功'
-								})
-								uni.navigateTo({
-									url: 'index?type=0'
-								})
-							}
-						},
-						fail: function(err) {
-							uni.showToast({
-								icon: 'none',
-								title: '支付取消'
-							})
-						}
-					});
-				}).catch(err => {
-					// uni.hideLoading()
-          this.$hideLoading()
-					uni.showToast({
-						title: '支付失败',
-						icon: 'none'
-					})
-				})
-			},
-			// H5支付微信内置浏览器支付
-			payRequest(payInfo) {
-				payInfo.paymentMode = 1
-				NET.request(API.gotoPay, payInfo, 'POST').then(res => {
-          this.$hideLoading()
-					jweixin.config({
-						debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-						appId: res.data.appId, // 必填,公众号的唯一标识
-						timestamp: res.data.timeStamp, // 必填,生成签名的时间戳
-						nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
-						signature: res.data.paySign, // 必填,签名,见附录1
-						jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-					});
-					jweixin.ready(function() {
-						jweixin.checkJsApi({
-							jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
-							success: function(res) {
-								// console.log('checkjsapi Success')
-								// console.log(res);
-							},
-							fail: function(res) {
-								// console.log('res')
-								// console.log(res);
-							}
-						});
-						jweixin.chooseWXPay({
-							timestamp: res.data
-								.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
-							nonceStr: res.data.nonceStr, // 支付签名随机串,不长于 32 位
-							package: res.data
-								.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
-							signType: res.data.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
-							paySign: res.data.paySign, // 支付签名
-							success: function(res) {
-								// 支付成功后的回调函数
-								uni.showToast({
-									icon: 'none',
-									title: '支付成功'
-								})
-								uni.navigateTo({
-									url: 'index?type=0'
-								})
-							},
-							cancel: function(r) {
-								uni.showToast({
-									icon: 'none',
-									title: '取消支付'
-								})
-							},
-							fail: function(res) {
-								uni.showToast({
-									icon: 'none',
-									title: '支付失败'
-								})
-							}
-						});
-					});
-					jweixin.error(function(res) {
-						console.log('error')
-						console.log(res)
-						uni.hideLoading()
-						uni.showToast({
-							icon: 'none',
-							title: '支付失败了',
-							duration: 3000
-						});
-					});
-				}).catch(err => {
-					// uni.hideLoading()
-          this.$hideLoading()
-				})
-			},
-			//立即付款
-			// payOrder() {
-			//     uni.showLoading({
-			//       title: '加载中...',
-			//     })
-			//     NET.request(API.ContinuePay, {
-			//       orderCode: this.dataList.orderCode
-			//     }, 'POST').then(res => {
-			//       uni.hideLoading()
-			//       let payInfo = res.data
-			//       uni.requestPayment({
-			//         timeStamp: payInfo.timeStamp,
-			//         nonceStr: payInfo.nonceStr,
-			//         package: payInfo.packageValue,
-			//         signType: payInfo.signType,
-			//         paySign: payInfo.paySign,
-			//         success: res => {
-			//           uni.showToast({
-			//             title: '支付成功',
-			//           })
-			//           setTimeout(() => {
-			//             this.getDataList(this.orderId)
-			//           }, 1500)
-
-			//         },
-			//         fail: res => {
-			//           uni.showToast({
-			//             title: '支付失败',
-			//             icon: 'none'
-			//           })
-			//         },
-			//         complete: res => {
-
-			//         }
-			//       })
-
-			//     }).catch(res => {
-			//       uni.hideLoading()
-			//     })
-			// },
 			//退款列表
 			Orderrefund() {
 				NET.request(API.Orderrefund, {
@@ -1227,81 +958,8 @@ export default {
 					}
 				})
 			},
-      openService(shopId){
-        console.log(shopId,"----------shopID")
-        this.isLoading = true
-        NET.request(API.CustomerService, {
-          id:shopId
-        }, 'get').then(res => {
-          console.log(res.data,"res.data")
-          if (res.code === '') {
-            this.corpId = res.data.corpId
-            this.serviceURL = res.data.url
-            this.flyToService({
-              corpId:res.data.corpId,
-              serviceURL:res.data.url
-            })
-          }
-          this.isLoading = false
-        }).catch(err => {
-          console.log(err)
-          this.isLoading = false
-        })
-      },
-      flyToService(data) {
-        let self = data
-        console.log(data,"flyToService")
-        // #ifdef MP-WEIXIN
-        if (!self.serviceURL || !self.corpId) {
-          self.hasService = false
-          return
-        }
-        wx.openCustomerServiceChat({
-          extInfo: {
-            url: self.serviceURL
-          },
-          corpId: self.corpId, // 企业ID
-          success(res) {
-          },
-          fail(err) {
-          }
-        })
-        // #endif
-        // #ifdef APP-PLUS
-        try {
-          let sweixin = null
-          plus.share.getServices(res=>{
-            sweixin = res.find(i => i.id === 'weixin')
-            if(sweixin){
-              sweixin.openCustomerServiceChat({
-                corpid: self.corpId,
-                url: self.serviceURL,
-              },suc=>{
-                console.log("success",JSON.stringify(res))
-              },err=>{
-                console.log("error",JSON.stringify(err))
-              })
-            }else{
-              plus.nativeUI.alert('当前环境不支持微信操作!')
-            }
-          },function(){
-            uni.showToast({title: "获取服务失败,不支持该操作。"+JSON.stringify(e), icon: 'error'})
-          })
-        } catch (err) {
-          uni.showToast({title: "调用失败,不支持该操作。"+JSON.stringify(err), icon: 'error'})
-        }
-        // #endif
-        /*	if (!this.serviceURL || !this.corpId) {
-            return
-          }
-          // 获取店铺id、客服链接
-          const extInfo = { // 客服信息
-            url: this.serviceURL // 客服链接
-          }
-          wx.openCustomerServiceChat({
-            extInfo,
-            corpId: this.corpId // 企业ID
-          })*/
+      async openService(shopId){
+        (await Services(shopId)).flyToService()
       }
     },
 		filters: {
@@ -1433,9 +1091,9 @@ page {
   margin-top: 20upx;
 
   .toService {
-    line-height: 40 rpx;
-    padding: 0 8 rpx;
-    border: 1 rpx solid #FAF6ED;
+    line-height: 40rpx;
+    padding: 0 8rpx;
+    border: 1rpx solid #FAF6ED;
     cursor: pointer;
     display: flex;
     align-items: center;
@@ -1443,11 +1101,11 @@ page {
     .service-img {
       width: 60upx;
       height: 60upx;
-      margin-right: 12 rpx;
+      margin-right: 12rpx;
     }
 
     text {
-      line-height: 40 rpx;
+      line-height: 40rpx;
     }
   }
 }
@@ -1625,7 +1283,7 @@ page {
 
 .order-total-box .way-color {
   color: #333333;
-  font-size: 32 rpx;
+  font-size: 32rpx;
 }
 
 .order-details-information {
@@ -1696,18 +1354,18 @@ page {
 .order-details-btn .btn-l {
   width: 50%;
   height: 100upx;
-  border: 2 rpx solid #333333;
+  border: 2rpx solid #333333;
   font-size: 28upx;
   color: #333;
   text-align: center;
   line-height: 100upx;
   box-sizing: border-box;
-  margin-right: 10 rpx;
+  margin-right: 10rpx;
 }
 
 .order-details-btn .btn-r {
   width: 50%;
-  margin-left: 10 rpx;
+  margin-left: 10rpx;
 }
 
 .mt20 {

+ 2 - 0
pages_category_page1/search/index/index.vue

@@ -191,6 +191,7 @@ input {
 		width: 30upx;
 		height: 30upx;
 		margin-left: -50upx;
+    z-index: 99999;
 	}
 }
 // 热门搜索
@@ -237,6 +238,7 @@ input {
 	.historyIconBox{
 		width: 50upx;
 		.historySearDel-icon {
+      position: relative;
 			width: 16upx;
 			height: 16upx;
 		}

+ 615 - 522
pages_category_page1/store/index.vue

@@ -1,54 +1,59 @@
 <template>
 	<view class="container">
-    <global-loading />
+		<global-loading />
 
-    <!-- 店铺首页 -->
+		<!-- 店铺首页 -->
 		<view class="content" v-if="id">
 			<view class="shop-top" :style="{'padding-top': topHeight + 'px'}">
 				<image src="https://ceres.zkthink.com/static/images/back_img04.png" class="back" @click="back"></image>
-        <view class="search-btn" @click="searchPro">
-          <image class="search-icon" src="https://ceres.zkthink.com/static/img/searchImg.png" mode="widthFix"></image>
-          <text class="fs24 font-color-999 mar-left-10">请输入您想要的宝贝</text>
-        </view>
+				<view class="search-btn" @click="searchPro">
+					<image class="search-icon" src="https://ceres.zkthink.com/static/img/searchImg.png" mode="widthFix">
+					</image>
+					<text class="fs24 font-color-999 mar-left-10">请输入您想要的宝贝</text>
+				</view>
 			</view>
-      <view class="stopInfo">
-        <view class="shop-top-content">
+			<view class="stopInfo">
+				<view class="shop-top-content">
 					<view class="contentLeft">
 						<image :src="storeInfo.shopLogo" class="photo-img"></image>
-            <view class="shop-info-top">
-              <view class="shop-name">
-                <text class="shop-name">{{storeInfo.shopName}}</text>
-                <text class="shop-num">粉丝数:{{fansNumber}}</text>
-              </view>
+						<view class="shop-info-top">
+							<view class="shop-name">
+								<text class="shop-name">{{storeInfo.shopName}}</text>
+								<text class="shop-num">粉丝数:{{fansNumber}}</text>
+							</view>
 							<!-- #ifdef MP-WEIXIN -->
 							<view v-if="hasService" class="btns flex-column-plus mar-left-10" @click="flyToService">
-								<image class="store-icon" src="https://ceres.zkthink.com/static/images/service-product-detail.png"></image>
+								<image class="store-icon"
+									src="https://ceres.zkthink.com/static/images/service-product-detail.png"></image>
 								<text>客服</text>
 							</view>
 							<!-- #endif -->
-            </view>
+						</view>
 					</view>
 					<view class="contentRight">
 						<view class="favorites-box cur-poi" @click="collectToggle">
-              <image v-if="ifCollect === 0" class="store-icon" src="https://ceres.zkthink.com/static/images/iconShoucang.png">
-              </image>
-              <image v-else class="store-icon" src="https://ceres.zkthink.com/static/images/shoucangActive.png"></image>
-              <text class="text">{{ifCollect === 0? '收藏' : '取消'}}</text>
-            </view>
+							<image v-if="ifCollect === 0" class="store-icon"
+								src="https://ceres.zkthink.com/static/images/iconShoucang.png">
+							</image>
+							<image v-else class="store-icon"
+								src="https://ceres.zkthink.com/static/images/shoucangActive.png"></image>
+							<text class="text">{{ifCollect === 0? '收藏' : '取消'}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="distributorBox flex-items flex-sp-between" @click="applyForRecruit">
+					<view class="distributor">
+						<view class="flex-display flex-items">
+							<image class="item-btn-icon" src="https://ceres.zkthink.com/static/img/user/fenxiao2.png"
+								mode="widthFix"></image>
+							<view>成为分销员</view>
+						</view>
+					</view>
+					<view class="rightArrow">
+						<image src="https://ceres.zkthink.com/static/images/arrowRight.png"></image>
 					</view>
-        </view>
-        <view class="distributorBox flex-items flex-sp-between" @click="applyForRecruit">
-          <view class="distributor">
-            <view class="flex-display flex-items">
-              <image class="item-btn-icon" src="https://ceres.zkthink.com/static/img/user/fenxiao2.png" mode="widthFix"></image>
-              <view>成为分销员</view>
-            </view>
-          </view>
-          <view class="rightArrow">
-            <image src="https://ceres.zkthink.com/static/images/arrowRight.png"></image>
-          </view>
-        </view>
-      </view>
+				</view>
+			</view>
 			<view class="shopContent">
 				<view class="tabs-nav-warp">
 					<scroll-view class="tabs-nav" scroll-x="true">
@@ -63,7 +68,8 @@
 					</scroll-view>
 				</view>
 				<view v-if="activeTab=== 'index'">
-					<canvas-page :terminal="terminal" :typeId="3" :shopId="id"></canvas-page>
+					<canvas-page :componentsData="componentsData" :terminal="terminal" :typeId="3" :shopId="id">
+					</canvas-page>
 				</view>
 				<view v-else>
 					<view class="shop-banner-box" v-if="bannerInfo && bannerInfo.length > 0">
@@ -85,47 +91,63 @@
 						<!--						</view>-->
 						<!--					</view>-->
 						<block v-if='isShowGoods'>
-              <view class="navBox">
-                <view class="shop-list-nav">
-                  <view class="nav-item-sort" @click="sortTap(1)">
-                    <text class="nav-title" :class="{'active' : sortIndex == 1}">新品</text>
-                  </view>
-                  <view class="nav-item-sort" @click="sortTap(2)">
-                    <text class="nav-title" :class="{'active' : sortIndex == 2}">价格</text>
-                    <view class="r">
-                      <image src="https://ceres.zkthink.com/static/images/arrowSortUp.png" v-if="type == 1"
-                             class="arrow-img padd-t"></image>
-                      <image src="https://ceres.zkthink.com/static/images/arrowSortDown.png" v-if="type == 2"
-                             class="arrow-img padd-b"></image>
-                    </view>
-                  </view>
-                  <view class="nav-item-sort" @click="sortTap(3)">
-                    <text class="nav-title" :class="{'active' : sortIndex == 3}">销量</text>
-                    <view class="r">
-                      <image src="https://ceres.zkthink.com/static/images/arrowSortUp.png" v-if="volume == 1"
-                             class="arrow-img padd-t"></image>
-                      <image src="https://ceres.zkthink.com/static/images/arrowSortDown.png" v-if="volume == 2"
-                             class="arrow-img padd-b"></image>
-                    </view>
-                  </view>
-                </view>
-              </view>
+							<view class="navBox">
+								<view class="shop-list-nav">
+									<view class="nav-item-sort" @click="sortTap(1)">
+										<text class="nav-title" :class="{'active' : sortIndex == 1}">新品</text>
+									</view>
+									<view class="nav-item-sort" @click="sortTap(2)">
+										<text class="nav-title" :class="{'active' : sortIndex == 2}">价格</text>
+										<view class="r">
+											<image src="https://ceres.zkthink.com/static/images/arrowSortUp.png"
+												v-if="type == 1" class="arrow-img padd-t"></image>
+											<image src="https://ceres.zkthink.com/static/images/arrowSortDown.png"
+												v-if="type == 2" class="arrow-img padd-b"></image>
+										</view>
+									</view>
+									<view class="nav-item-sort" @click="sortTap(3)">
+										<text class="nav-title" :class="{'active' : sortIndex == 3}">销量</text>
+										<view class="r">
+											<image src="https://ceres.zkthink.com/static/images/arrowSortUp.png"
+												v-if="volume == 1" class="arrow-img padd-t"></image>
+											<image src="https://ceres.zkthink.com/static/images/arrowSortDown.png"
+												v-if="volume == 2" class="arrow-img padd-b"></image>
+										</view>
+									</view>
+								</view>
+							</view>
 							<view class="shop-list-box" v-if="total > 0">
 								<view class="item" v-for="(cItem, index) in storeInfolist" :key="index"
 									@click="goodsItemTap(cItem.productId,cItem.skuId)">
 									<image :src="cItem.image" class="product-img default-img"></image>
 									<view class="product-bottom-box">
 										<view class="product-name">{{cItem.productName}}</view>
-										<view class="product-num font-color-C5AA7B mar-top-10">已售{{cItem.number}}件</view>
+										<view class="product-num font-color-C5AA7B mar-top-10">已售{{cItem.number}}件
+										</view>
 										<view class="product-price-box">
-											<image v-if="cItem.activityType===1" class="iconImg" src="https://ceres.zkthink.com/static/images/groupBuyIcon.png" alt="拼团icon"></image>
-											<image v-if="cItem.activityType === 2" class="iconImg"  src="https://ceres.zkthink.com/static/images/spikeIcon.png" alt="秒杀活动"></image>
-											<image v-if="cItem.activityType === 3" class="iconImg discountIcon" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-03-14/38184785db4b4fbca767ada611097ae9_discount.png" alt="限时折扣活动"></image>
-											<image v-if="cItem.activityType === 4" class="iconImg" src="https://ceres.zkthink.com/static/images/spikeIcon.png" alt="平台秒杀"></image>
-											<image v-if="cItem.activityType===5" class="iconImg" src="https://ceres.zkthink.com/static/images/discountListIcon.png" alt="平台折扣"></image>
-											<image v-if="cItem.activityType===9" class="iconImg" src="https://ceres.zkthink.com/static/images/memberCenterIcon.png" alt="会员价"></image>
-											<image v-if="cItem.activityType === 8" class="iconImg" src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png" alt="场景营销"></image>
-											<text class="price-box fs40 font-color-C83732 mar-right-20">¥{{cItem.price}}</text>
+											<image v-if="cItem.activityType===1" class="iconImg"
+												src="https://ceres.zkthink.com/static/images/groupBuyIcon.png"
+												alt="拼团icon"></image>
+											<image v-if="cItem.activityType === 2" class="iconImg"
+												src="https://ceres.zkthink.com/static/images/spikeIcon.png" alt="秒杀活动">
+											</image>
+											<image v-if="cItem.activityType === 3" class="iconImg discountIcon"
+												src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-03-14/38184785db4b4fbca767ada611097ae9_discount.png"
+												alt="限时折扣活动"></image>
+											<image v-if="cItem.activityType === 4" class="iconImg"
+												src="https://ceres.zkthink.com/static/images/spikeIcon.png" alt="平台秒杀">
+											</image>
+											<image v-if="cItem.activityType===5" class="iconImg"
+												src="https://ceres.zkthink.com/static/images/discountListIcon.png"
+												alt="平台折扣"></image>
+											<image v-if="cItem.activityType===9" class="iconImg"
+												src="https://ceres.zkthink.com/static/images/memberCenterIcon.png"
+												alt="会员价"></image>
+											<image v-if="cItem.activityType === 8" class="iconImg"
+												src="https://zk-cereshop.oss-cn-shenzhen.aliyuncs.com/zkthink/2022-02-15/d0d8d96f28904167b271de4ae924d1a8_sceneMarketing.png"
+												alt="场景营销"></image>
+											<text
+												class="price-box fs40 font-color-C83732 mar-right-20">¥{{cItem.price}}</text>
 											<text class="price-through">¥{{cItem.originalPrice}}</text>
 										</view>
 									</view>
@@ -146,10 +168,12 @@
 <script>
 	const NET = require('../../utils/request')
 	const API = require('../../config/api')
+	import api from '@/components/canvasShow/config/api'
 	import canvasPage from '@/components/canvasShow/canvasShowPage.vue'
 	export default {
 		data() {
 			return {
+				componentsData: [],
 				navIndex: 0,
 				id: '',
 				price: 0,
@@ -175,8 +199,8 @@
 				collectId: 0,
 				ifCollect: 0,
 				salesId: 0, //分销员id
-        fansNumber: '', // 粉丝数
-        topHeight: 10,
+				fansNumber: '', // 粉丝数
+				topHeight: 10,
 				hasService: false,
 				isLoading: false,
 			}
@@ -185,15 +209,15 @@
 			canvasPage
 		},
 		onLoad(options) {
-      // #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
-      let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
-      this.topHeight = menuButtonInfo.top
-      console.log(this.topHeight, menuButtonInfo.top, 'fsfsfsfs')
-      // #endif
-      // #ifdef APP
-      this.topHeight = 50
-      // #endif
-      this.isIphone = getApp().globalData.isIphone;
+			// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
+			let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+			this.topHeight = menuButtonInfo.top
+			console.log(this.topHeight, menuButtonInfo.top, 'fsfsfsfs')
+			// #endif
+			// #ifdef APP
+			this.topHeight = 50
+			// #endif
+			this.isIphone = getApp().globalData.isIphone;
 			if (getApp().globalData.shopShareItem) {
 				const item = getApp().globalData.shopShareItem
 				this.id = parseInt(item.storeId)
@@ -204,6 +228,7 @@
 				this.salesId = parseInt(options.salesId)
 			}
 			this.bindSalesCustomer(this.salesId, this.id)
+			this.canvasGet()
 			this.getTemplate()
 			this.getFindProductGroupList()
 			this.getShopBanner()
@@ -222,6 +247,31 @@
 			}
 		},
 		methods: {
+			// 读取画布
+			canvasGet() {
+				var _this = this
+				var apiUrl = api.getCanvas + '?terminal=' + this.terminal + '&type=' + 3
+				if (this.id) {
+					apiUrl += '&shopId=' + this.id
+				}
+				let params = {
+					url: apiUrl,
+					method: 'GET'
+				}
+				// uni.showLoading({
+				//   mask: true,
+				//   title: '加载中...',
+				// })
+				NET.request(apiUrl, {}, 'GET').then(res => {
+					if (JSON.stringify(res.data) !== '{}') {
+						var componentsData = JSON.parse(res.data.json)
+						this.componentsData = componentsData
+					}
+					uni.hideLoading()
+				}).catch(res => {
+					uni.hideLoading()
+				})
+			},
 			getShopBanner() {
 				NET.request(API.GetShopBanner, {
 					shopId: this.id
@@ -252,7 +302,7 @@
 						this.page = this.page
 					}
 					this.storeInfo = res.data;
-          console.log(this.storeInfo, '测试')
+					console.log(this.storeInfo, '测试')
 					this.total = res.data.page.total
 					this.storeInfolist = this.storeInfolist.concat(res.data.page.list)
 				}).catch(res => {
@@ -350,7 +400,7 @@
 								uni.navigateTo({
 									url: '../distributionModule/recruit?shopId=' + this.id
 								})
-							} else if (res.data.state === 1 ) {
+							} else if (res.data.state === 1) {
 								uni.showToast({
 									title: "您已申请成为该店铺的分销员",
 									icon: "none"
@@ -482,17 +532,19 @@
 			addBusinessBuyerUser() {
 				NET.request(API.AddBusinessBuyerUser, {
 					shopId: this.id
-				},"POST")
+				}, "POST")
+			},
+			// 查询产品
+			searchPro(key, type) {
+				uni.navigateTo({
+					url: `/pages_category_page1/search/index/index`
+				})
 			},
-      // 查询产品
-      searchPro(key, type) {
-        uni.navigateTo({
-          url: `/pages_category_page1/search/index/index`
-        })
-      },
 			// 获取客服url
 			getServiceUrl(id) {
-				if (this.isLoading || !id || id === 'null') { return }
+				if (this.isLoading || !id || id === 'null') {
+					return
+				}
 				const shopids = uni.getStorageSync('service_shopids') || []
 				const corpIds = uni.getStorageSync('service_corpIds') || []
 				const urls = uni.getStorageSync('service_urls') || []
@@ -551,473 +603,514 @@
 	}
 </script>
 <style lang="scss" scoped>
-page {
-  background: #F8F8F8;
-}
+	page {
+		background: #F8F8F8;
+	}
 </style>
 <style lang='scss' scoped>
-page {
-  background: #F8F8F8;
-}
-.shop-top {
-	background: #333333;
-  display: flex;
-  align-items: center;
-  width: 100%;
-  position: fixed;
-  z-index: 99;
-  padding-bottom: 20rpx;
-}
-// #ifdef APP-PLUS
-.shop-top {
-  padding-top: 80rpx;
-}
-// #endif
-.stopInfo {
-  padding: 200rpx 20rpx 20rpx 20rpx;
-  background: #F8F8F8;
-}
-// 店铺头部
-.shop-top-content {
-	padding: 10rpx 30rpx;
-  background: #FFFFFF;
-	display: flex;
-	align-items: center;
-	.contentLeft{
-		flex: 9;
+	page {
+		background: #F8F8F8;
+	}
+
+	.shop-top {
+		background: #333333;
 		display: flex;
-		.photo-img {
-			width: 102rpx;
-			height: 102rpx;
-			border-radius: 10rpx;
-			margin-right: 10rpx;
-		}
-		.shop-info-top {
-			border-radius: 20rpx 20rpx 0 0;
-			position: relative;
+		align-items: center;
+		width: 100%;
+		position: fixed;
+		z-index: 99;
+		padding-bottom: 20rpx;
+	}
+
+	// #ifdef APP-PLUS
+	.shop-top {
+		padding-top: 80rpx;
+	}
+
+	// #endif
+	.stopInfo {
+		padding: 200rpx 20rpx 20rpx 20rpx;
+		background: #F8F8F8;
+	}
+
+	// 店铺头部
+	.shop-top-content {
+		padding: 10rpx 30rpx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+
+		.contentLeft {
+			flex: 9;
 			display: flex;
-			align-items: center;
-			.shop-name {
+
+			.photo-img {
+				width: 102rpx;
+				height: 102rpx;
+				border-radius: 10rpx;
+				margin-right: 10rpx;
+			}
+
+			.shop-info-top {
+				border-radius: 20rpx 20rpx 0 0;
+				position: relative;
 				display: flex;
-				flex-direction: column;
-				justify-content: space-between;
-				font-size: 32rpx;
-				color: #333333;
-				.shop-num {
-					font-size: 26rpx;
+				align-items: center;
+
+				.shop-name {
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					font-size: 32rpx;
 					color: #333333;
-				  opacity: 0.7;
-					margin-top: 15rpx;
+
+					.shop-num {
+						font-size: 26rpx;
+						color: #333333;
+						opacity: 0.7;
+						margin-top: 15rpx;
+					}
+				}
+
+				.btns {
+					width: 100rpx;
+					height: 95%;
+					font-size: 24rpx;
+					text-align: center;
+
+					image {
+						max-width: 56rpx;
+						max-height: 56rpx;
+						margin: auto;
+					}
 				}
 			}
-			.btns{
-				width: 100rpx;
-				height: 95%;
-				font-size: 24rpx;
-				text-align: center;
-				image{
-					max-width: 56rpx;
-					max-height: 56rpx;
-					margin: auto;
+		}
+
+		.contentRight {
+			flex: 3;
+
+			.favorites-box {
+				display: flex;
+				width: 160rpx;
+				height: 60rpx;
+				background: #C83732;
+				opacity: 1;
+				border-radius: 46rpx;
+				align-items: center;
+				justify-content: center;
+
+				.store-icon {
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 8rpx;
+				}
+
+				.text {
+					font-size: 26rpx;
+					color: #fff;
 				}
 			}
 		}
 	}
-	.contentRight{
-		flex: 3;
-		.favorites-box {
-			display: flex;
-		  width: 160rpx;
-		  height: 60rpx;
-		  background: #C83732;
-		  opacity: 1;
-		  border-radius: 46rpx;
-		  align-items: center;
-		  justify-content: center;
-			.store-icon {
-				width: 32rpx;
-				height: 32rpx;
-				margin-right: 8rpx;
-			}
-			.text {
-				font-size: 26rpx;
-				color: #fff;
-			}
+
+	.rightArrow {
+		image {
+			width: 18rpx;
+			height: 24rpx;
 		}
 	}
-}
-.rightArrow {
-  image {
-    width: 18rpx;
-    height: 24rpx;
-  }
-}
-.distributorBox {
-  background: #FFFFFF;
-  margin-top: 20rpx;
-  height: 80rpx;
-  padding: 0 20rpx;
-  display: flex;
-  justify-items: center;
-  color: #333333;
-  font-size: 28rpx;
-}
-// 首页内容
-.shopContent {
-	width: 100%;
-	/* background: #fff; */
-	border-radius: 20rpx 20rpx 0 0;
-	.tabs-nav-warp {
-		padding: 0 20px;
-		.tabs-nav {
-			margin-top: 20upx;
-			.ul {
-				white-space: nowrap;
-				.li {
-					display: inline-block;
-					margin-left: 60upx;
-					font-size: 28upx;
-					color: #999999;
-					position: relative;
-					padding-bottom: 18upx;
-					&:first-child {
-						margin-left: 0;
-					}
-					&.on {
-						&:after {
-							content: '';
-							width: 100%;
-							height: 4upx;
-							background: #C5AA7B;
-							position: absolute;
-							left: 0;
-							bottom: 0;
+
+	.distributorBox {
+		background: #FFFFFF;
+		margin-top: 20rpx;
+		height: 80rpx;
+		padding: 0 20rpx;
+		display: flex;
+		justify-items: center;
+		color: #333333;
+		font-size: 28rpx;
+	}
+
+	// 首页内容
+	.shopContent {
+		width: 100%;
+		/* background: #fff; */
+		border-radius: 20rpx 20rpx 0 0;
+
+		.tabs-nav-warp {
+			padding: 0 20px;
+
+			.tabs-nav {
+				margin-top: 20upx;
+
+				.ul {
+					white-space: nowrap;
+
+					.li {
+						display: inline-block;
+						margin-left: 60upx;
+						font-size: 28upx;
+						color: #999999;
+						position: relative;
+						padding-bottom: 18upx;
+
+						&:first-child {
+							margin-left: 0;
+						}
+
+						&.on {
+							&:after {
+								content: '';
+								width: 100%;
+								height: 4upx;
+								background: #C5AA7B;
+								position: absolute;
+								left: 0;
+								bottom: 0;
+							}
+
+							font-weight:bold;
+							color: #333333;
 						}
-						font-weight:bold;
-		        color: #333333;
 					}
 				}
 			}
 		}
+
+		.shop-banner-box {
+			background: #f7f7f7;
+			padding: 20rpx 30rpx;
+			box-sizing: border-box;
+		}
+
+		.shop-list-content {
+			width: 100%;
+
+			/* background: #fff; */
+			.navBox {
+				padding: 0 20rpx;
+
+				.shop-list-nav {
+					display: flex;
+					flex-direction: row;
+					align-items: center;
+					height: 80rpx;
+					line-height: 76rpx;
+					background: #fff;
+				}
+			}
+
+			.shop-list-box {
+				width: 100%;
+				background: #f7f7f7;
+				padding: 16rpx 20rpx 0;
+				box-sizing: border-box;
+				display: flex;
+				flex-wrap: wrap;
+
+				.item {
+					width: 49%;
+					margin: 12rpx 0;
+					background: #d6d6d6;
+					border-radius: 10rpx;
+					display: flex;
+					flex-direction: column;
+				}
+
+				.item:nth-of-type(2n) {
+					margin-left: 2%;
+					margin-right: 0;
+				}
+			}
+		}
 	}
-	.shop-banner-box {
-		background: #f7f7f7;
-		padding: 20rpx 30rpx;
+
+	.shop-banner-img {
+		width: 100%;
+		height: 280rpx;
+		border-radius: 20rpx;
+	}
+
+	.nav-item {
+		flex: 1;
+		font-size: 30rpx;
+		color: #666;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		height: 80rpx;
+		line-height: 76rpx;
+	}
+
+	.nav-item.active {
+		color: #ff7911;
+	}
+
+	.nav-item .line {
+		display: inline-block;
+		width: 80rpx;
+		height: 4rpx;
+		background: #fff;
+		border-radius: 2rpx;
+	}
+
+	.nav-item.active .line {
+		background: linear-gradient(0deg, rgba(255, 162, 0, 1), rgba(255, 121, 17, 1));
+	}
+
+	.nav-item.padd-l {
+		padding-left: 20%;
 		box-sizing: border-box;
 	}
-	.shop-list-content {
-		width: 100%;
-		/* background: #fff; */
-		.navBox {
-		  padding: 0 20rpx;
-		  .shop-list-nav {
-		    display: flex;
-		    flex-direction: row;
-		    align-items: center;
-		    height: 80rpx;
-		    line-height: 76rpx;
-		    background: #fff;
-		  }
+
+	.nav-item.padd-r {
+		padding-right: 20%;
+		box-sizing: border-box;
+	}
+
+	.nav-item-sort {
+		flex: 1;
+		font-size: 24rpx;
+		color: #222;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 80rpx;
+		line-height: 80rpx;
+
+		.r {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			margin-left: 5rpx;
 		}
-		.shop-list-box {
-			width: 100%;
-			background: #f7f7f7;
-			padding: 16rpx 20rpx 0;
+
+		.r .arrow-img {
+			width: 32rpx;
+			height: 32rpx;
+			padding: 7rpx;
 			box-sizing: border-box;
-			display: flex;
-			flex-wrap: wrap;
-			.item {
-				width: 49%;
-				margin: 12rpx 0;
-				background: #d6d6d6;
-				border-radius: 10rpx;
-				display: flex;
-				flex-direction: column;
-			}
-			.item:nth-of-type(2n) {
-				margin-left: 2%;
-				margin-right: 0;
-			}
 		}
 	}
-}
-
-.shop-banner-img {
-	width: 100%;
-	height: 280rpx;
-	border-radius: 20rpx;
-}
-
-.nav-item {
-	flex: 1;
-	font-size: 30rpx;
-	color: #666;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	height: 80rpx;
-	line-height: 76rpx;
-}
-
-.nav-item.active {
-	color: #ff7911;
-}
-
-.nav-item .line {
-	display: inline-block;
-	width: 80rpx;
-	height: 4rpx;
-	background: #fff;
-	border-radius: 2rpx;
-}
-
-.nav-item.active .line {
-	background: linear-gradient(0deg, rgba(255, 162, 0, 1), rgba(255, 121, 17, 1));
-}
-
-.nav-item.padd-l {
-	padding-left: 20%;
-	box-sizing: border-box;
-}
-
-.nav-item.padd-r {
-	padding-right: 20%;
-	box-sizing: border-box;
-}
-
-.nav-item-sort {
-	flex: 1;
-	font-size: 24rpx;
-	color: #222;
-	display: flex;
-	flex-direction: row;
-	align-items: center;
-	justify-content: center;
-	height: 80rpx;
-	line-height: 80rpx;
-
-	.r {
+
+
+	.product-img {
+		width: 347rpx;
+		height: 347rpx;
+	}
+
+	.product-bottom-box {
+		padding: 20rpx;
+		box-sizing: border-box;
+		background: #fff;
+	}
+
+	.product-name {
+		display: block;
+		font-size: 28rpx;
+		color: #333;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+
+	.product-num {
+		font-size: 24rpx;
+		margin-top: 15rpx;
+		border: 2rpx solid #E4E5E6;
+		padding: 10rpx;
+		display: inline-block;
+	}
+
+	.product-price-box {
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		margin-top: 30rpx;
+
+		.iconImg {
+			width: 58rpx;
+			height: 36rpx;
+			margin-right: 10rpx;
+		}
+
+		.discountIcon {
+			width: 100rpx;
+		}
+	}
+
+	.product-price-box .price-through {
+		text-decoration: line-through;
+		font-size: 24rpx;
+		color: #CCC;
+	}
+
+	.shop-sort-list {
+		margin-top: 20rpx;
+		width: 100%;
+		display: flex;
+		flex-direction: column;
+	}
+
+	.shop-sort-list .item {
+		display: flex;
+		flex-direction: column;
+		background: #fff;
+		padding: 0 30rpx 20rpx;
+		box-sizing: border-box;
+		margin-bottom: 20rpx;
+	}
+
+	.shop-sort-list .item .sort-title {
+		font-size: 30rpx;
+		color: #333;
+		padding: 30rpx 0;
+	}
+
+	.sort-single-box {
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 100%;
+	}
+
+	.sort-single-box .single {
+		width: 340rpx;
+		height: 78rpx;
+		margin: 0 5rpx 10rpx 0;
+		background: #fff;
+		border: 1px solid #E5E5E5;
+		border-radius: 4rpx;
 		display: flex;
 		flex-direction: column;
 		align-items: center;
 		justify-content: center;
+		font-size: 26rpx;
+		color: #333;
+		box-sizing: border-box;
+	}
+
+	.sort-single-box .single:nth-of-type(2n) {
 		margin-left: 5rpx;
+		margin-right: 0;
 	}
-	.r .arrow-img {
-		width: 32rpx;
-		height: 32rpx;
-		padding: 7rpx;
-		box-sizing: border-box;
+
+	.back {
+		width: 50rpx;
+		height: 50rpx;
+		padding: 0 20rpx;
 	}
-}
-
-
-.product-img {
-	width: 347rpx;
-	height: 347rpx;
-}
-
-.product-bottom-box {
-	padding: 20rpx;
-	box-sizing: border-box;
-	background: #fff;
-}
-
-.product-name {
-	display: block;
-	font-size: 28rpx;
-	color: #333;
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-}
-
-.product-num {
-	font-size: 24rpx;
-	margin-top: 15rpx;
-  border: 2rpx solid #E4E5E6;
-  padding: 10rpx;
-  display: inline-block;
-}
-
-.product-price-box {
-	width: 100%;
-	display: flex;
-	flex-direction: row;
-	align-items: center;
-	margin-top: 30rpx;
-
-	.iconImg {
-		width: 58rpx;
-		height: 36rpx;
-		margin-right: 10rpx;
-	}
-	.discountIcon{
-		width: 100rpx;
-	}
-}
-.product-price-box .price-through {
-	text-decoration: line-through;
-	font-size: 24rpx;
-	color: #CCC;
-}
-
-.shop-sort-list {
-	margin-top: 20rpx;
-	width: 100%;
-	display: flex;
-	flex-direction: column;
-}
-
-.shop-sort-list .item {
-	display: flex;
-	flex-direction: column;
-	background: #fff;
-	padding: 0 30rpx 20rpx;
-	box-sizing: border-box;
-	margin-bottom: 20rpx;
-}
-
-.shop-sort-list .item .sort-title {
-	font-size: 30rpx;
-	color: #333;
-	padding: 30rpx 0;
-}
-
-.sort-single-box {
-	display: flex;
-	flex-direction: row;
-	flex-wrap: wrap;
-	width: 100%;
-}
-
-.sort-single-box .single {
-	width: 340rpx;
-	height: 78rpx;
-	margin: 0 5rpx 10rpx 0;
-	background: #fff;
-	border: 1px solid #E5E5E5;
-	border-radius: 4rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
-	font-size: 26rpx;
-	color: #333;
-	box-sizing: border-box;
-}
-
-.sort-single-box .single:nth-of-type(2n) {
-	margin-left: 5rpx;
-	margin-right: 0;
-}
-
-.back {
-	width: 50rpx;
-	height: 50rpx;
-  padding: 0 20rpx;
-}
-
-.empty-container {
-	width: 100%;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
-}
-
-.empty-container image {
-	width: 200rpx;
-	height: 200rpx;
-	margin-top: 150rpx;
-}
-
-.empty-container text {
-	font-size: 28rpx;
-	color: #999;
-	margin-top: 30rpx;
-	display: block;
-	width: 300rpx;
-	text-align: center;
-}
-
-.active {
-	color: #ff7911;
-}
-
-
-.distributor {
-	font-size: 26upx;
-	border-radius: 25upx;
-	display: flex;
-	align-items: center;
-
-	.item-btn-icon {
-		width: 40upx;
-		height: 40upx;
-		margin-right: 10upx;
-	}
-}
-.search-btn {
-	height: 64rpx;
-	border-radius: 4rpx;
-	display: flex;
-	flex-direction: row;
-	align-items: center;
-	margin-right: 30rpx;
-	width: 428rpx;
-	background: rgba(255, 255, 255, 0.1);
-	.search-icon {
-	  width: 44rpx;
-	  height: 44rpx;
-    margin-left: 10rpx;
-    margin-top: 8rpx;
-	}
-	.search-word {
-	  font-size: 26rpx;
-	  font-weight: 400;
-	  color: rgba(153, 153, 153, 1);
-	  margin-left: 10rpx;
-	}
-}
-// #ifdef H5 || APP-PLUS
-.search-btn {
-  width: 100%;
-}
-// #endif
-// #ifdef MP-ALIPAY
-.back {
-	width: 25rpx;
-	height: 25rpx;
-	margin-top: 15rpx;
-	padding: 10rpx;
-	display: none;
-}
-
-.shop-top {
-	margin-top: 0 !important;
-}
-
-.shop-top-content {
-	padding-top: 80rpx;
-}
-
-.nav-item-sort .r .arrow-img {
-	width: 16rpx;
-	height: 16rpx;
-	padding: 4rpx;
-}
-
-.tabs-nav {
-	margin-top: 20upx;
-
-	.ul {
-		.li {
-			&:first-child {
-				margin-left: 36upx;
+
+	.empty-container {
+		width: 100%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.empty-container image {
+		width: 200rpx;
+		height: 200rpx;
+		margin-top: 150rpx;
+	}
+
+	.empty-container text {
+		font-size: 28rpx;
+		color: #999;
+		margin-top: 30rpx;
+		display: block;
+		width: 300rpx;
+		text-align: center;
+	}
+
+	.active {
+		color: #ff7911;
+	}
+
+
+	.distributor {
+		font-size: 26upx;
+		border-radius: 25upx;
+		display: flex;
+		align-items: center;
+
+		.item-btn-icon {
+			width: 40upx;
+			height: 40upx;
+			margin-right: 10upx;
+		}
+	}
+
+	.search-btn {
+		height: 64rpx;
+		border-radius: 4rpx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		margin-right: 30rpx;
+		width: 428rpx;
+		background: rgba(255, 255, 255, 0.1);
+
+		.search-icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 10rpx;
+			margin-top: 8rpx;
+		}
+
+		.search-word {
+			font-size: 26rpx;
+			font-weight: 400;
+			color: rgba(153, 153, 153, 1);
+			margin-left: 10rpx;
+		}
+	}
+
+	// #ifdef H5 || APP-PLUS
+	.search-btn {
+		width: 100%;
+	}
+
+	// #endif
+	// #ifdef MP-ALIPAY
+	.back {
+		width: 25rpx;
+		height: 25rpx;
+		margin-top: 15rpx;
+		padding: 10rpx;
+		display: none;
+	}
+
+	.shop-top {
+		margin-top: 0 !important;
+	}
+
+	.shop-top-content {
+		padding-top: 80rpx;
+	}
+
+	.nav-item-sort .r .arrow-img {
+		width: 16rpx;
+		height: 16rpx;
+		padding: 4rpx;
+	}
+
+	.tabs-nav {
+		margin-top: 20upx;
+
+		.ul {
+			.li {
+				&:first-child {
+					margin-left: 36upx;
+				}
 			}
 		}
 	}
-}
-// #endif
+
+	// #endif
 </style>

+ 4 - 1
pages_category_page2/userModule/address.vue

@@ -178,7 +178,10 @@
 									.addData)
 							})
 						}, 500);
-					}
+					},
+          fail:(res)=>{
+            console.log('err---选择地址',res)
+          }
 				})
 			}
 		}

+ 6 - 5
pages_category_page2/userModule/bindPhone.vue

@@ -73,7 +73,7 @@
 				phone: '',
 				code: '',
 				wechatOpenId: '',
-				headImg: '',
+				headImage: '',
 				bindPhoneShow: false,
 				verifyType: 0,
 				buyerUserId: 0,
@@ -86,7 +86,7 @@
 			if (options.data) {
 				const bindPhoneData = JSON.parse(options.data)
 				this.wechatOpenId = bindPhoneData.wechatOpenId
-				this.headImg = bindPhoneData.headImg
+				this.headImage = bindPhoneData.headImage
 				this.buyerUserId = bindPhoneData.buyerUserId
 			}
 			// #ifdef MP
@@ -181,7 +181,7 @@
 									sessionKey: res1.data.sessionKey,
 									encryptedData: e.detail.encryptedData,
 									iv: e.detail.iv,
-									headImage: this.headImg
+									headImage: this.headImage
 								}, 'POST').then(res2 => {
 									const item = res2.data
 									uni.setStorageSync('storage_key', item);
@@ -212,8 +212,9 @@
 				NET.request(API.UpdateWxPhone, {
 					phone: this.phone,
 					wechatOpenId: this.wechatOpenId,
-					headImage: this.headImg,
-					verificationCode: this.code
+          headImage: this.headImage,
+					verificationCode: this.code,
+                    channelCode: this.channelCode
 				}, 'POST').then(res => {
 					const item = res.data
 					uni.setStorageSync('storage_key', item);

+ 20 - 6
pages_category_page2/userModule/footprintList.vue

@@ -1,6 +1,12 @@
 <template>
 	<view class="footprint-box">
     <global-loading />
+    <u-skeleton
+        el-color="#efefef"
+        bg-color="#fff"
+        :loading="loading && isFirstComeIn"
+        :animation="true"
+    ></u-skeleton>
 		<view v-if="!tipsShow">
 			<view class="wid function-box">
 				<view class="finishbox" @click="finishClick" v-if="allCheckShow">完成</view>
@@ -9,11 +15,11 @@
 					<label class="mar-left-10">编辑</label>
 				</view>
 			</view>
-			<view class="swipe-box" v-for="(ditem, findex) in footprintList" :key="findex" >
-				<view class="daytime">
+			<view class="swipe-box  u-skeleton" v-for="(ditem, findex) in footprintList" :key="findex" >
+				<view class="daytime  u-skeleton-fillet">
 					<label class="mar-left-30">{{ditem.createTime}}</label>
 				</view>
-        <view class="listItem" :index="index" v-for="(item, index) in ditem.products" :key="item.footprintId" @click="click(index,findex)">
+        <view class="listItem u-skeleton-fillet" :index="index" v-for="(item, index) in ditem.products" :key="item.footprintId" @click="click(index,findex)">
           <u-swipe-action :show="item.show"  ref="footActionSwipe" :disabled="allCheckShow"
 		  @open="open(index,findex)" @click="delFootProduction(index,findex)" :options="options">
             <view class="itemBox">
@@ -88,6 +94,8 @@
 		},
 		data() {
 			return {
+        loading:false,
+        isFirstComeIn:true,
 				allCheckShow:false,
 				isAllCheck:false,
 				disabled: false,
@@ -105,7 +113,7 @@
 				page:1,
 				pageSize:5,
 				loadingType:0,
-				footprintList:[],
+				footprintList:[{products:[{},{},{},{},{},{},{}],isReady:1}],
 				footEmpty:false,
 				newTimeArr:[],
                 tipsShow: false,
@@ -215,6 +223,7 @@
         //     mask: true,
 				// 	  title: '加载中...',
 				// })
+        this.loading = true
 				NET.request(API.getFootprintList,
 				{
 					page:this.page,
@@ -226,10 +235,13 @@
 						this.page = this.page
 					}else{
 						this.footprintList = this.footprintList.concat(res.data.list)
-					}
+            this.footprintList = this.footprintList.filter(item=>{return item.isReady!==1})
+          }
 					if(this.footprintList.length === 0) {
 					  this.tipsShow = true
           }
+          this.loading=false
+          this.isFirstComeIn = false
 					uni.hideLoading()
 				}).catch(res => {
 					uni.hideLoading()
@@ -325,8 +337,10 @@ page {
 		height: 50rpx;
 	}
 	.swipe-box{
+    padding: 0 24rpx;
+
     .listItem {
-      padding: 0 24rpx;
+      //padding: 0 24rpx;
       background: #F8F8F8;
       margin-bottom: 20rpx;
     }

+ 5 - 4
pages_category_page2/userModule/login.vue

@@ -36,7 +36,8 @@
 				WXloginQuery: {
 					"code": "",
 					"salesId": 0,
-					"headImg": ''
+					"headImage": '',
+          "terminal":1
 				},
 				noMp: false,
 				// beforePage: undefined,
@@ -103,7 +104,7 @@
 				// 				}, 'POST').then(res => {
 				// 					let data = {
 				// 						wechatOpenId: wechatOpenId,
-				// 						headImg: avatarUrl
+				// 						headImage: avatarUrl
 				// 					}
 				// 					that.loginSuc(res.data, data)
 				// 				}).catch(res => {
@@ -139,11 +140,11 @@
 				uni.getUserProfile({
 					desc: '正在获取', //不写不弹提示框
 					success: function(res) {
-						that.WXloginQuery.headImg = res.userInfo.avatarUrl
+						that.WXloginQuery.headImage = res.userInfo.avatarUrl
 						NET.request(API.WxLogin, that.WXloginQuery, 'POST').then(res => {
 							let data = {
 								wechatOpenId: res.data.wechatOpenId,
-								headImg: res.data.headImage
+								headImage: res.data.headImage
 							}
 							that.loginSuc(res.data, data)
 						}).catch(err => {

+ 5 - 4
pages_category_page2/userModule/questionList.vue

@@ -243,10 +243,11 @@
 					productId: productId,
 					problemId: problemId
 				}
-				uni.setStorageSync("seeAllFnData", data)
-				uni.navigateTo({
-					url: '../../pages_category_page1/goodsModule/qADetail'
-				})
+				// uni.setStorageSync("seeAllFnData", data)
+				// uni.navigateTo({
+				// 	url: '../../pages_category_page1/goodsModule/qADetail'
+				// })
+        this.$jump('/pages_category_page1/goodsModule/qADetail',data)
 			},
 			//确定批量删除
 			delClick() {

BIN
static/images/share/pyq.png


+ 59 - 0
utils/jumpUtil.js

@@ -0,0 +1,59 @@
+/**
+ * @FileDescription:
+ * @Author: kahu
+ * @Date: 2022/11/3
+ * @LastEditors: kahu
+ * @LastEditTime: 2022/11/3
+ */
+/**
+ * 跳转非tabbar页面
+ * @param url 路径
+ * @param param 参数对象
+ * @param timeout 延时时间,默认0
+ * @param type default普通跳转 redirect关闭当前页面跳转  reLaunch关闭所有页面跳转 默认default
+ */
+export const jump = (url, param, timeout = 0, type = "default") => {
+    setTimeout(() => {
+        if (param) {
+            url = `${url}?detail=${encodeURIComponent(JSON.stringify(param))}`
+        }
+        if (type === 'default') {
+            uni.navigateTo({url})
+        } else if (type === 'redirect') {
+            uni.redirectTo({url})
+        } else {
+            uni.reLaunch({url})
+        }
+    }, timeout)
+}
+
+/**
+ * 跳转到tabbar页面
+ * @param url 路径
+ * @param timeout 延时时间,默认0
+ */
+export const jumpToTabbar = (url, timeout = 0) => {
+    setTimeout(() => {
+        uni.switchTab({url})
+    }, timeout)
+}
+
+/**
+ * 关闭当前页面,返回上一级或者多级页面
+ * @param delta 级数,默认1
+ */
+export const goBack = (delta = 1) => {
+    uni.navigateBack({delta})
+}
+
+/**
+ * 获取跳转参数
+ * @param loadParam
+ * @return {{}|any}
+ */
+export const getJumpParam = (loadParam) => {
+    if (typeof loadParam === "object" && loadParam?.detail) {
+        return JSON.parse(decodeURIComponent(loadParam.detail))
+    }
+    return {}
+}

+ 325 - 0
utils/payUtil.js

@@ -0,0 +1,325 @@
+/**
+ * @FileDescription:
+ * @Author: kahu
+ * @Date: 2022/11/2
+ * @LastEditors: kahu
+ * @LastEditTime: 2022/11/2
+ */
+const NET = require('./request')
+const API = require('../config/api')
+// #ifdef H5
+const jweixin = require('jweixin-module')
+
+/**
+ * 普通H5处理
+ * @param payInfo 结算返回的支付信息
+ */
+async function payH5InEquipment(payInfo) {
+    try {
+        const res = await NET.request(API.gotoH5Pay, payInfo, 'POST')
+        location.replace(res.data.mwebUrl)
+    } catch (e) {
+        this.submitActive = true
+        uni.showToast({
+            title: '支付失败',
+            icon: 'none'
+        })
+        uni.navigateTo({
+            url: '/pages_category_page1/orderModule/index?type=1'
+        })
+    } finally {
+        uni.hideLoading()
+    }
+}
+
+/**
+ * 微信内H5处理
+ * @param payInfo 结算返回的支付信息
+ * @param orderId 订单ID
+ */
+async function payH5InWechat(payInfo) {
+    payInfo.paymentMode = 1
+    const res = await NET.request(API.gotoPay, payInfo, 'POST')
+    jweixin.config({
+        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+        appId: res.data.appId, // 必填,公众号的唯一标识
+        timestamp: res.data.timeStamp, // 必填,生成签名的时间戳
+        nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
+        signature: res.data.paySign, // 必填,签名,见附录1
+        jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+    });
+    jweixin.ready(function () {
+        jweixin.checkJsApi({
+            jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
+            success: function (res) {
+            },
+            fail: function (res) {
+            }
+        });
+        jweixin.chooseWXPay({
+            timestamp: res.data
+                .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
+            nonceStr: res.data.nonceStr, // 支付签名随机串,不长于 32 位
+            package: res.data
+                .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
+            signType: res.data.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
+            paySign: res.data.paySign, // 支付签名
+            success: function (res) {
+                // 支付成功后的回调函数
+                uni.showToast({
+                    icon: 'none',
+                    title: '支付成功'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/paySuccessful?orderId=' + payInfo.orderId
+                })
+            },
+            cancel: function (r) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '用户取消支付'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/index?type=1'
+                })
+            },
+            fail: function (res) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '微信内支付错误'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/index?type=1'
+                })
+            }
+        });
+    });
+    jweixin.error(function (res) {
+        uni.showToast({
+            icon: 'none',
+            title: '微信内支付加载失败',
+            duration: 3000
+        });
+        uni.navigateTo({
+            url: '/pages_category_page1/orderModule/index?type=1'
+        })
+    });
+}
+
+/**
+ * H5拉起支付
+ * @param payInfo 结算返回的支付信息
+ */
+async function h5Pay(payInfo) {
+    let ua = navigator.userAgent.toLowerCase();
+    if (ua.match(/MicroMessenger/i) == "micromessenger") {
+        await payH5InWechat(payInfo)
+    } else {
+        await payH5InEquipment(payInfo)
+    }
+}
+// #endif
+
+// #ifdef MP-ALIPAY
+/**
+ * 支付宝小程序拉起支付
+ * @param payInfo 结算返回的支付信息
+ * @return {Promise<void>}
+ */
+async function aliPay(payInfo) {
+    try {
+        const res = await NET.request(API.gotoPay, payInfo, 'POST')
+        uni.requestPayment({
+            provider: 'alipay',
+            orderInfo: res.data.tradeNo,
+            success: function (payRes) {
+                if (payRes.resultCode == '6001') {
+                    uni.showToast({
+                        icon: 'none',
+                        title: '取消支付'
+                    })
+                    uni.navigateTo({
+                        url: '/pages_category_page1/orderModule/index?type=1'
+                    })
+                }
+                if (payRes.resultCode == '9000') {
+                    uni.showToast({
+                        icon: 'none',
+                        title: '支付成功'
+                    })
+                    uni.navigateTo({
+                        url: '/pages_category_page1/orderModule/paySuccessful?orderId=' + orderId
+                    })
+                }
+            },
+            fail: function (err) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '支付取消'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/index?type=1'
+                })
+            }
+        });
+    } catch (e) {
+        uni.showToast({
+            title: '支付宝支付异常',
+            icon: 'none'
+        })
+        uni.navigateTo({
+            url: '/pages_category_page1/orderModule/index?type=1'
+        })
+    } finally {
+        uni.hideLoading()
+    }
+}
+// #endif
+
+// #ifdef MP-WEIXIN
+/**
+ * 微信小程序拉起支付
+ * @param payInfo
+ * @return {Promise<void>}
+ */
+async function wechatPay(payInfo){
+    try {
+        const res = await NET.request(API.gotoPay, payInfo, 'POST')
+        uni.requestPayment({
+            provider: 'wxpay',
+            timeStamp: res.data.timeStamp,
+            nonceStr: res.data.nonceStr,
+            package: res.data.package,
+            signType: res.data.signType,
+            paySign: res.data.paySign,
+            success:  async (payRes)=> {
+                // 拼团微信支付成功回调
+                if (payInfo.collageId) {
+                    await NET.request(API.paySuccess, {
+                        orderId: payInfo.orderId,
+                        collageId: payInfo.collageId
+                    }, 'POST')
+                }
+                uni.showToast({
+                    icon: 'none',
+                    title: '支付成功'
+                })
+                //console.log(submitResult.orderId, 'order Id')
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/paySuccessful?orderId=' + payInfo.orderId
+                })
+            },
+            fail: function (err) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '用户取消支付'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/index?type=1'
+                })
+            }
+        })
+    }catch(e){
+        uni.showToast({
+            title: '微信支付拉起失败',
+            icon: 'none'
+        })
+        uni.navigateTo({
+            url: '/pages_category_page1/orderModule/index?type=1'
+        })
+    }
+}
+// #endif
+
+// #ifdef APP-PLUS
+/**
+ * App拉起微信支付
+ * @param payInfo
+ * @return {Promise<void>}
+ */
+async function appWechatPay(payInfo){
+    try {
+        const res = await NET.request(API.gotoAppPay, payInfo, 'POST')
+        const obj = {
+            appid: res.data.appId,
+            noncestr: res.data.nonceStr,
+            package: 'Sign=WXPay',
+            prepayid: res.data.prepayId,
+            timestamp: res.data.timeStamp,
+            sign: res.data.paySign,
+            partnerid: res.data.partnerId
+        }
+        uni.requestPayment({
+            provider: 'wxpay',
+            orderInfo: obj,
+            success: function (payRes) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '支付成功'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/paySuccessful?orderId=' + payInfo.orderId
+                })
+            },
+            fail: function (err) {
+                uni.showToast({
+                    icon: 'none',
+                    title: '用户取消支付'
+                })
+                uni.navigateTo({
+                    url: '/pages_category_page1/orderModule/index?type=1'
+                })
+            }
+        })
+    } catch (e) {
+        console.log(e)
+        uni.showToast({
+            title: 'APP拉起微信支付失败',
+            icon: 'none'
+        })
+        uni.navigateTo({
+            url: '/pages_category_page1/orderModule/index?type=1'
+        })
+    } finally {
+        uni.hideLoading()
+    }
+}
+// #endif
+
+/**
+ * 处理支付
+ * @param submitResult 结算结果
+ */
+export async function handleDoPay(submitResult){
+    uni.showLoading({
+        mask: true,
+        title: '支付中...',
+    })
+    const {paymentMode} = submitResult
+    if(paymentMode === 1){
+        // 微信支付
+        // #ifdef APP-PLUS
+        await appWechatPay(submitResult)
+        // #endif
+        // #ifdef MP-WEIXIN
+        await wechatPay(submitResult)
+        // #endif
+        // #ifdef H5
+        await h5Pay(submitResult)
+        // #endif
+    }else if([2,3].includes(paymentMode)){
+        // 支付宝
+        // #ifdef MP-ALIPAY
+        await aliPay(submitResult)
+        // #endif
+        // #ifndef MP-ALIPAY
+        // await appWechatPay(submitResult,this.orderId)
+        console.error("支付宝相关支付暂时只支持支付宝小程序")
+        throw new Error('支付宝相关支付暂时只支持支付宝小程序')
+        // #endif
+    }
+    uni.navigateTo({
+        url: '/pages_category_page1/orderModule/index?type=2'
+    })
+    this.$hideLoading()
+}

+ 2 - 2
utils/secret.js

@@ -1,6 +1,6 @@
 const CryptoJS = require('crypto-js') // 引用AES源码js
-const key = CryptoJS.enc.Utf8.parse('1234125432ABCDEF') // 十六位十六进制数作为密钥
-const iv = CryptoJS.enc.Utf8.parse('ABCDEF1234125432') // 十六位十六进制数作为密钥偏移量
+const key = CryptoJS.enc.Utf8.parse('1234125432ABDDFF') // 十六位十六进制数作为密钥
+const iv = CryptoJS.enc.Utf8.parse('ABCDEF1234121134') // 十六位十六进制数作为密钥偏移量
 
 // 加密方法
 export function Encrypt (word) {

+ 92 - 0
utils/services.js

@@ -0,0 +1,92 @@
+const NET = require("./request");
+const API = require("../config/api");
+
+/**
+ * @FileDescription:客服相关函数
+ * @Author: kahu
+ * @Date: 2022/11/4
+ * @LastEditors: kahu
+ * @LastEditTime: 2022/11/4
+ */
+
+export function Services(shopId) {
+    let corpId = null, serviceURL = null
+
+    const getServiceUrl = async () => {
+        uni.showLoading({
+            title:'加载中...'
+        })
+        const shopIds = uni.getStorageSync('service_shopids') || []
+        const corpIds = uni.getStorageSync('service_corpIds') || []
+        const urls = uni.getStorageSync('service_urls') || []
+        try {
+            const res = await NET.request(API.CustomerService, {}, 'get')
+            if (res.code === '' && res.data.corpId && res.data.url) {
+                shopIds.push(shopId)
+                corpIds.push(res.data.corpId)
+                urls.push(res.data.url)
+                uni.setStorageSync('service_shopids', shopIds);
+                uni.setStorageSync('service_corpIds', corpIds);
+                uni.setStorageSync('service_urls', urls);
+                corpId = res.data.corpId
+                serviceURL = res.data.url
+            }
+        } finally {
+            uni.hideLoading()
+        }
+    }
+
+    const flyToService = ()=>{
+        if (!serviceURL || !corpId) {
+            return uni.showToast({
+                icon:'none',
+                title:'暂无客服~'
+            })
+        }
+        // #ifdef MP-WEIXIN
+        wx.openCustomerServiceChat({
+            extInfo: {
+                url: serviceURL
+            },
+            corpId: corpId
+        })
+        // #endif
+        // #ifdef APP-PLUS
+        try {
+            let wechatServices = null
+            plus.share.getServices(res => {
+                wechatServices = res.find(wechatItem => wechatItem.id === 'weixin')
+                if (wechatServices) {
+                    wechatServices.openCustomerServiceChat({
+                        corpid: corpId,
+                        url: serviceURL,
+                    }, success => {
+                        console.log("success", JSON.stringify(success))
+                    }, err => {
+                        console.log("error", JSON.stringify(err))
+                    })
+                } else {
+                    plus.nativeUI.alert('当前环境不支持微信操作!')
+                }
+            },  err=>{
+                console.log(err)
+                uni.showToast({title: "获取服务失败,不支持该操作。" + JSON.stringify(err), icon: 'none'})
+            })
+        } catch (err) {
+            console.log(err)
+            uni.showToast({title: "调用失败,不支持该操作。" + JSON.stringify(err), icon: 'none'})
+        }
+        // #endif
+        // #ifdef H5
+        window.open(serviceURL)
+        // #endif
+    }
+
+
+    return  getServiceUrl().then(res=>{
+        return {
+            flyToService
+        }
+    })
+
+}

+ 32 - 0
utils/timeUtil.js

@@ -0,0 +1,32 @@
+/**
+ * @FileDescription:
+ * @Author: kahu
+ * @Date: 2022/11/7
+ * @LastEditors: kahu
+ * @LastEditTime: 2022/11/7
+ */
+/**
+ * 时间格式化
+ * @param endTimeStamp
+ * @constructor
+ */
+export const TimeFormatting = (timeDifference)=>{
+    // 天数
+    let day = Math.floor(timeDifference / 3600 / 24);
+    // 小时
+    let hr = Math.floor(timeDifference / 3600 % 24);
+    // 分钟
+    let min = Math.floor(timeDifference / 60 % 60);
+    // 秒
+    let sec = Math.floor(timeDifference % 60);
+    return {
+        day : timeFormat(day),
+        hour: timeFormat(hr),
+        min : timeFormat(min),
+        sec : timeFormat(sec)
+    }
+}
+//时分秒换算
+function timeFormat(param) { //小于10的格式化函数
+    return param < 10 ? '0' + param : param;
+}

Деякі файли не було показано, через те що забагато файлів було змінено