yongzonghuang 4 rokov pred
rodič
commit
34aa30d380
100 zmenil súbory, kde vykonal 9584 pridanie a 4406 odobranie
  1. 48 14
      App.vue
  2. 166 107
      component/share.vue
  3. 1 0
      components/activities/combinedSales.vue
  4. 335 0
      components/adWindow.vue
  5. 8 5
      components/basics/categoryShow.vue
  6. 36 36
      components/canvasShow/basics/banner.vue
  7. 80 80
      components/canvasShow/basics/brandList.vue
  8. 63 63
      components/canvasShow/basics/categoryList.vue
  9. 1 1
      components/canvasShow/basics/coupon/app/index.vue
  10. 44 26
      components/canvasShow/basics/discount/app/index.vue
  11. 32 17
      components/canvasShow/basics/group/app/index.vue
  12. 71 0
      components/canvasShow/basics/live/app/index.vue
  13. 459 0
      components/canvasShow/basics/live/app/item.vue
  14. 60 0
      components/canvasShow/basics/live/mixin.js
  15. 2 1
      components/canvasShow/basics/newProduct/app/index.vue
  16. 8 22
      components/canvasShow/basics/notice.vue
  17. 41 23
      components/canvasShow/basics/price/app/index.vue
  18. 53 33
      components/canvasShow/basics/product/app/index.vue
  19. 44 20
      components/canvasShow/basics/shop.vue
  20. 1 1
      components/canvasShow/basics/spike/app/index.vue
  21. 72 60
      components/canvasShow/basics/vip/app/index.vue
  22. 4 1
      components/canvasShow/canvasShowPage.vue
  23. 4 0
      components/canvasShow/componentMap.js
  24. 1 0
      components/canvasShow/config/api.js
  25. 9 0
      components/canvasShow/config/mixin/funMixin.js
  26. BIN
      components/canvasShow/static/images/discount/bg-discount-top.png
  27. BIN
      components/canvasShow/static/images/live/huabei.png
  28. BIN
      components/canvasShow/static/images/live/icon-live-num.png
  29. BIN
      components/canvasShow/static/images/live/img-title.png
  30. BIN
      components/canvasShow/static/images/spike/bg-spike.png
  31. 405 0
      components/goodsDetalils/coupon-popup.vue
  32. 154 0
      components/hoteRecommed/index.vue
  33. 2 2
      components/modal/modal.vue
  34. 251 0
      components/wx/wxSendCoupon.vue
  35. 27 3
      config/api.js
  36. 1 0
      config/live.js
  37. 2 0
      config/subscribe.js
  38. 21 3
      manifest.json
  39. 239 159
      pages.json
  40. 463 457
      pages/tabbar/cart/index.vue
  41. 9 3
      pages/tabbar/category/index.vue
  42. 175 99
      pages/tabbar/index/index.vue
  43. 88 11
      pages/tabbar/user/index.vue
  44. 1 1
      pages_category_page1/activity.vue
  45. 214 0
      pages_category_page1/coupon/list.vue
  46. 182 0
      pages_category_page1/coupon/product.vue
  47. 1 1
      pages_category_page1/discount/discount.vue
  48. 39 24
      pages_category_page1/discount/groupBuy.vue
  49. 19 2
      pages_category_page1/discount/platformDiscount.vue
  50. 19 90
      pages_category_page1/discount/spikeList.vue
  51. 2 0
      pages_category_page1/distributionModule/commodity.vue
  52. 7 2
      pages_category_page1/distributionModule/index.vue
  53. 1 1
      pages_category_page1/distributionModule/invite.vue
  54. 1 1
      pages_category_page1/distributionModule/promotion.vue
  55. 6 3
      pages_category_page1/distributionModule/recruit.vue
  56. 2 0
      pages_category_page1/distributionModule/salesIndex.vue
  57. 20 6
      pages_category_page1/distributionModule/shareProduct.vue
  58. 2 0
      pages_category_page1/distributionModule/totalAward.vue
  59. 1 0
      pages_category_page1/distributionModule/totalClient.vue
  60. 1 0
      pages_category_page1/distributionModule/totalPersonnel.vue
  61. 2 0
      pages_category_page1/distributionModule/unliquidated.vue
  62. 467 463
      pages_category_page1/goodsModule/canvasGoods.vue
  63. 4 2
      pages_category_page1/goodsModule/combination.vue
  64. 1 1
      pages_category_page1/goodsModule/couponShopList.vue
  65. 34 192
      pages_category_page1/goodsModule/evaSuccessful.vue
  66. 1 0
      pages_category_page1/goodsModule/evaluate.vue
  67. 1 0
      pages_category_page1/goodsModule/evaluateList.vue
  68. 1074 1097
      pages_category_page1/goodsModule/goodsDetails.vue
  69. 264 297
      pages_category_page1/goodsModule/goodsList.vue
  70. 56 41
      pages_category_page1/goodsModule/invitePoster.vue
  71. 42 9
      pages_category_page1/goodsModule/inviteSpell.vue
  72. 124 103
      pages_category_page1/goodsModule/userEvaluate.vue
  73. 1 0
      pages_category_page1/homeModule/special.vue
  74. 300 0
      pages_category_page1/integral/exchangeDetail.vue
  75. 493 0
      pages_category_page1/integral/index.vue
  76. 462 0
      pages_category_page1/integral/sign.vue
  77. 1 1
      pages_category_page1/linkOthers/index.vue
  78. 56 33
      pages_category_page1/memberCenter/activityList.vue
  79. 5 20
      pages_category_page1/memberCenter/index.vue
  80. 4 1
      pages_category_page1/memberCenter/memberSign.vue
  81. 1 0
      pages_category_page1/orderModule/Intervene.vue
  82. 1 0
      pages_category_page1/orderModule/addLogistics.vue
  83. 5 3
      pages_category_page1/orderModule/afterSaleApplyRefund.vue
  84. 1 0
      pages_category_page1/orderModule/afterSaleApplyRetund.vue
  85. 86 45
      pages_category_page1/orderModule/index.vue
  86. 156 37
      pages_category_page1/orderModule/orderConfirm.vue
  87. 104 13
      pages_category_page1/orderModule/orderDetails.vue
  88. 107 78
      pages_category_page1/orderModule/paySuccessful.vue
  89. 1 0
      pages_category_page1/orderModule/platformJoin.vue
  90. 68 72
      pages_category_page1/search/index/index.vue
  91. 480 423
      pages_category_page1/store/index.vue
  92. 464 0
      pages_category_page2/channelCoupon/index.vue
  93. 1 0
      pages_category_page2/distributionModule/distributionOrder.vue
  94. 453 0
      pages_category_page2/livePage/components/liveBox.vue
  95. 94 0
      pages_category_page2/livePage/index.vue
  96. 72 5
      pages_category_page2/orderModule/afterSale.vue
  97. 0 0
      pages_category_page2/orderModule/refundDetails.vue
  98. 0 0
      pages_category_page2/orderModule/returnDetails.vue
  99. 15 14
      pages_category_page2/userModule/accountLogin.vue
  100. 85 78
      pages_category_page2/userModule/addAddress.vue

+ 48 - 14
App.vue

@@ -17,10 +17,22 @@ export default {
 		const self = this
 		uni.getSystemInfo({
 		  success: function(res) {
-			// 根据 model 进行判断
-			if (res.model === 'iPhone X'|| res.model === 'iPhone XR' || res.model === 'iPhone XS Max' || res.model === 'iPhone 11' || res.model === 'iPhone 11 Pro' || res.model === 'iPhone 11 Pro Max' || res.model === 'iPhone 12' || res.model === 'iPhone 12 Pro' || res.model === 'iPhone 12 Pro Max') {
-			  self.globalData.isIphone = true
-			}
+			  console.log(res,'检查机型')
+				// 根据 model 进行判断
+				// const iphoneModels = [
+				// 	'iPhone X',
+				// 	'iPhone XR',
+				// 	'iPhone XS Max',
+				// 	'iPhone 11',
+				// 	'iPhone 11 Pro',
+				// 	'iPhone 11 Pro Max',
+				// 	'iPhone 12/13 (Pro)',
+				// 	'iPhone 12/13 mini',
+				// 	'iPhone 12/13 Pro Max'
+				// ]
+				if (res.safeArea.top > 20 && res.model.indexOf('iPhone') !== -1) {
+				  self.globalData.isIphone = true
+				}
 		  }
 		})
 		// 购物车右上角数量
@@ -32,16 +44,6 @@ export default {
 			})
 		}
 	},
-	// onLoad:function(){
-  //   // #ifdef MP-WEIXIN
-  //   miniShopPlugin.initApp(this, wx);
-  //   // #endif
-	// },
-	onShow: function() {
-
-	},
-	onHide: function() {
-	},
 	globalData: {
 		isIphone:false,
 	},
@@ -78,6 +80,7 @@ export default {
 	.fs42{font-size: 42upx;}
 	.fs44{font-size: 44upx;}
 	.fs46{font-size: 46upx;}
+	.fs48{font-size: 46upx;}
 	.fs50{font-size: 50upx;}
 	.fs60{font-size: 60upx;}
 	.fs-bold{font-weight: bold;}
@@ -130,6 +133,7 @@ export default {
 	.mar-left-70{margin-left: 70upx;}
 	.mar-right-10{margin-right: 10upx;}
 	.mar-right-20{margin-right: 20upx;}
+	.mar-right-25{margin-right: 25upx;}
 	.mar-right-30{margin-right: 30upx;}
   .mar-right-35{margin-right: 35upx;}
 	.mar-right-40{margin-right: 40upx;}
@@ -194,6 +198,7 @@ export default {
 	.overflowNoDot{display:block;overflow:hidden;}
 	.discountsPriceLine{text-decoration:line-through;}
 	.border-bottom-Line{border-bottom: 1upx solid #EDEDED;}
+  .decoration {text-decoration: line-through;}
   .anonymous {
     margin-top: 25upx;
     .uni-checkbox-input {
@@ -266,6 +271,35 @@ export default {
   uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
     border-color: #C5AA7B;
   }
+  .u-arrow {
+    display: inline-block;
+    width: 20rpx;
+    height: 20rpx;
+    border-top: 1rpx solid #999;
+    border-right: 1rpx solid #999;
+  }
+
+  .u-arrow-up {
+    transform: rotate(-45deg);
+  }
+
+  .u-arrow-down {
+    transform: rotate(135deg);
+  }
+
+  .u-arrow-left {
+    transform: rotate(-135deg);
+  }
+
+  .u-arrow-right {
+    transform: rotate(45deg);
+  }
+  .uni-picker-container .uni-picker-action.uni-picker-action-confirm {
+    color: #C5AA7B;
+  }
+  .u-drawer-content {
+    border-radius: 0 !important;
+  }
 </style>
 <style>
 .uni-modal__btn_primary {

+ 166 - 107
component/share.vue

@@ -1,55 +1,60 @@
 <template>
-	<view class="isshareShow" v-show="isshareShow">
-		<!-- <u-mask :show="true" class="flex-items-plus flex-row"> -->
-			<view class="share-box">
-				<view class="inactive-box flex-items-plus flex-column-plus">
-					<view class="flex-row-plus">
-						<view class="fs36 mar-left-60">邀请好友</view>
-						<view @click="cancel" class="close-btn">
-							<image class="close-icon" src="../static/images/close.png"></image>
+	<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/weixin2x.png"></image>
+							<label class="label">微信</label>
 						</view>
-					</view>
-					<view class="mar-top-50 flex-row-plus">
-						<!-- <view class="flex-column-plus flex-items-plus">
-							<view class="weixin-box flex-items-plus">
-								<image src="../static/img/weixin2x.png"></image>
-							</view>
-							<label class="fs24 mar-top-20">微信</label>
+						<view class="li" @click="share('qq')">
+							<image class="icon" src="../static/images/qq2x.png"></image>
+							<label class="label">QQ</label>
 						</view>
-						<view class="flex-column-plus flex-items-plus mar-left-50">
-							<view class="weixin-box flex-items-plus">
-								<image src="../static/images/qq2x.png"></image>
-							</view>
-							<label class="fs24 mar-top-20">QQ</label>
+						<view class="li" @click="share('weibo')">
+							<image class="icon" src="../static/images/weibo2x.png"></image>
+							<label class="label">微博</label>
 						</view>
-						<view class="flex-column-plus flex-items-plus mar-left-50">
-							<view class="weixin-box flex-items-plus">
-								<image src="../static/images/weibo2x.png"></image>
-							</view>
-							<label class="fs24 mar-top-20">微博</label>
-						</view> -->
-						<view class="copy-color " :data-clipboard-text="url" @click="copy">
-							<view class="weixin-box flex-items-plus">
-							</view>
-							<label class="fs24 mar-top-20">链接</label>
+						<!-- #endif -->
+						<view class="li" @click="share('lianjie')">
+							<image class="icon" src="../static/images/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-mask> -->
-	</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:{
-			isshareShow:{
-				type:Boolean,
-				dafault:false
-			},
 			url:{
 				type:String,
 				dafault:''
@@ -58,92 +63,146 @@
 		name:"share",
 		data() {
 			return {
-
+				shareShow: false,
+				wapShow: false,
+				longUrl: ''
 			};
 		},
+		mounted () {
+    	this.longUrl = API.shareLink + '/#' + this.url
+			console.log(this.longUrl,this.url)
+		},
 		methods:{
-			cancel(){
-				this.$emit('shareCancel')
+			cancel(key){
+				if(key === 1){
+					this.shareShow = false
+					this.$emit('shareCancel')
+				} else if(key === 2) {
+					this.wapShow = false
+				}
+
 			},
-			copy() {
-				// #ifndef H5
-				uni.setClipboardData({
-				    data: this.url,
-				    success: function () {
-				        uni.showToast({
-							title:'复制成功',
-							icon:'success'
-						})
-				    }
-				});
-				// #endif
+			share(key){
+				var desc = `推荐好文:看到一篇不错的文章,值得一看,推荐给大家。`
+				console.log(this.url)
 				// #ifdef H5
-				let clipboard = new ClipboardJS('.copy-color');
-				clipboard.on('success', function (e) {
-				   uni.showToast({
-									title:'复制成功',
-									icon:'success'
+				this.shareShow = false
+				this.wapShow = true
+				// #endif
+				// #ifdef APP
+				switch (key) {
+					case 'weixin':
+						break
+					case 'qq':
+
+						break
+					case 'weibo':
+
+						break
+					case 'lianjie':
+						uni.setClipboardData({
+							data: this.longUrl,
+							success: () => {
+								uni.showToast({
+									title: '复制成功'
 								})
-				   clipboard.destroy();
-				})
-				clipboard.on('error', function (e) {
-				   uni.showToast({
-				   	title:'复制失败',
-				   	icon:'success'
-				   })
-				   clipboard.destroy();
-				})
+							}
+						})
+						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>
 
 <style lang="scss">
-	.isshareShow{
-		width: 100%;
-		height: 100%;
-		position: absolute;
-		top: 0;
-		left: 0;
-		background-color: #636363;
+	.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: 26px;
+			color: #333;
+		}
+	}
+
+	.share-h5{
+		padding:0 20rpx;
 		display: flex;
 		justify-content: center;
-		align-items: center;
-		z-index: 999;
-	}
-.close-btn{
-	position: relative;
-	left: 120rpx;
-}
-.close-icon{
-	width: 46rpx;
-	height: 46rpx;
-}
-.copy-color{
-	display: flex;
-	justify-content: center;
-	align-items:center;
-	flex-direction: column;
-}
-.share-box{
-	background-color: #FFFFFF;
-	width: 550rpx;
-	height: 380rpx;
-	border-radius: 20rpx;
-}
-.inactive-box{
-	padding: 40rpx 40rpx;
-	.weixin-box{
-		width: 100rpx;
-		height: 100rpx;
-		border-radius: 50%;
-    background: url("../static/img/lianjie.png") no-repeat center center;
-    background-size: contain;
-		image{
-			width: 55rpx;
-			height: 55rpx;
+		.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;
+			}
 		}
 	}
-}
 </style>

+ 1 - 0
components/activities/combinedSales.vue

@@ -158,6 +158,7 @@ export default {
     changeSkuItemValue(item,index) {
       this.curProIndex = index
       uni.showLoading({
+        mask: true,
         title: '加载中...'
       })
       NET.request(API.QueryProductDetail, {

+ 335 - 0
components/adWindow.vue

@@ -0,0 +1,335 @@
+<template>
+	<view v-if="visible">
+		<view v-if="adInfo.jumpType === 3 && couponList && couponList.length> 0" class="mask mask-coupon ad-coupons"
+			@touchmove.stop.prevent="moveHandle">
+			<view class="ad-box-warp">
+				<view class="ad-boxs">
+					<image class="img" :src="adInfo.popupImg" mode="widthFix"></image>
+					<view class="coupon-list">
+						<scroll-view :scroll-top="0" class="scrollBox" scroll-y="true">
+							<view class="item" v-for="(item, index) in couponList" :key="index">
+								<view class="money">
+									<text class="num"
+										:class="[item.discountMode ===1?'num-minus':'num-discount']">{{ item.reduceMoney }}</text>
+									<text class="text">
+										满{{ item.fullMoney }}元可用
+									</text>
+								</view>
+								<view class="text">
+									<text>
+										{{item.activityName}}
+									</text>
+								</view>
+							</view>
+						</scroll-view>
+					</view>
+					<WxSendCoupon v-if="couponList && couponList.length > 0" :couponList="couponList" @closeAd="close">
+						<view class="btn-receive">一键领取</view>
+					</WxSendCoupon>
+				</view>
+				<view class="close-btn">
+					<image :src="adInfo.closeImg" class='btn' mode="widthFix" @click="close()"></image>
+				</view>
+			</view>
+		</view>
+		<view v-else-if="adInfo.jumpType !== 3" class="mask mask-coupon ad-link">
+			<view class="ad-box-warp">
+				<view class="ad-boxs" @click="goRoll()">
+					<image class="img" :src="adInfo.popupImg" mode="widthFix"></image>
+				</view>
+				<view class="close-btn">
+					<image :src="adInfo.closeImg" class='btn' mode="widthFix" @click="close()"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import WxSendCoupon from "./wx/wxSendCoupon";
+	const NET = require('../utils/request')
+	const API = require('../config/api')
+
+	export default {
+		name: "adWindow",
+		components: {
+			WxSendCoupon
+		},
+		props: {
+			triggerCondition: {
+				type: Number,
+				default: 1
+			}
+		},
+		data() {
+			return {
+				visible: false,
+				adInfo: {},
+				jumpContent: {},
+				couponList: [],
+				isLogin: false,
+				buyerUserId: 0,
+				cParams: {}
+			};
+		},
+		methods: {
+			// 阻止滑动
+			moveHandle() {
+				return
+			},
+			// 获取广告信息
+			getAd() {
+				const res = uni.getStorageSync('storage_key'),
+						token = res.token;
+				this.buyerUserId = res.buyerUserId
+				this.isLogin = !!token
+				NET.request(API.GetAd, {
+					triggerCondition: this.triggerCondition
+				}, 'POST').then(res => {
+					if (res.data) {
+						this.adInfo = res.data[0]
+						if (this.adInfo.jumpContent) {
+							this.jumpContent = JSON.parse(this.adInfo.jumpContent)
+						}
+						this.visible = true
+						if (this.adInfo.jumpType === 3) {
+							this.getCoupons()
+						}
+					}
+				}).catch(res => {
+
+				})
+			},
+			// 查询优惠券
+			getCoupons() {
+				if (this.isLogin) {
+					const _items = this.jumpContent.items
+					if (_items) {
+						NET.request(API.getCoupons, {
+							page: 1,
+							pageSize: 99,
+							ids: _items
+						}, 'GET').then(res => {
+							if (res.data) {
+								this.couponList = res.data.list
+							}
+						}).catch(res => {
+
+						})
+					}
+				} else {
+					uni.showToast({
+						title: '登录之后领取更多优惠',
+						icon: "none"
+					})
+					// uni.navigateTo({
+					// 	url: '/pages_category_page2/userModule/login'
+					// })
+				}
+			},
+			// 关闭弹窗
+			close() {
+				this.visible = false
+				var params = {}
+				if (this.isLogin) {
+					params.buyerUserId = this.buyerUserId
+				} else {
+					uni.getSystemInfo({
+						success: function(res) {
+							params.deviceId = res.deviceId
+						}
+					})
+				}
+				NET.request(API.adClose, params, 'POST').then(res => {}).catch(res => {})
+			},
+			goRoll() {
+				this.visible = false
+				switch (this.adInfo.jumpType) {
+					case 1:
+						uni.navigateTo({
+							url: '/pages_category_page1/goodsModule/goodsDetails?shopId=' + this.jumpContent
+								.shopId + '&productId=' + this.jumpContent.productId + '&skuId=' + this.jumpContent
+								.skuId
+						})
+						break
+					case 2:
+						uni.navigateTo({
+							url: `/pages_category_page1/goodsModule/goodsList?category3Id=${this.jumpContent.id}`
+						})
+						break
+					case 4:
+						uni.navigateToMiniProgram({
+							appId: this.jumpContent.appId,
+							path: this.jumpContent.id,
+							success(res) {
+								// 打开成功
+							}
+						})
+					case 5:
+						uni.navigateTo({
+							path: this.jumpContent.link
+						})
+						break
+				}
+			},
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+.mask {
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	z-index: 55;
+	background-color: rgba(0, 0, 0, 0.5);
+}
+
+
+.mask-coupon {
+	z-index: 9999;
+	background: rgba(39, 38, 39, .15);
+	display: flex;
+	justify-content: center;
+	align-items: center;
+
+	.ad-box-warp {
+		width: 100%;
+		position: relative;
+	}
+
+	flex-direction: column;
+
+	.ad-boxs {
+		position: relative;
+		width: 100%;
+
+		.img {
+			width: 100%;
+		}
+	}
+	.btn-receive {
+		width: 446rpx;
+		height: 84rpx;
+		background: #EC6F43;
+		border-radius: 42rpx;
+		display: block;
+		text-align: center;
+		font-size: 28rpx;
+		line-height: 84rpx;
+		color: #fff;
+		position: absolute;
+		bottom: 32rpx;
+		left: 50%;
+		margin-left: -223rpx;
+	}
+	.close-btn {
+		position: absolute;
+		bottom: -70rpx;
+		left: 50%;
+		margin-left: -25rpx;
+
+		.btn {
+			width: 50rpx;
+			height: 50rpx;
+		}
+	}
+}
+
+.ad-coupons {
+	.ad-box-warp {
+		width: 510rpx;
+	}
+
+	.coupon-list {
+		width: 446rpx;
+		height: 295rpx;
+		overflow: auto;
+		position: absolute;
+		top: 308rpx;
+		left: 50%;
+		margin-left: -223rpx;
+		.scrollBox {
+			height: 294upx;
+		}
+		.item {
+			width: 100%;
+			height: 140rpx;
+			background-color: #fff;
+			margin-top: 15rpx;
+			border-radius: 8rpx;
+			display: flex;
+			position: relative;
+			align-items: center;
+
+			&:first-child {
+				margin-top: 0px;
+			}
+
+			&:before,
+			&:after {
+				content: '';
+				width: 32rpx;
+				height: 32rpx;
+				background: #000;
+				border-radius: 50%;
+				display: block;
+				position: absolute;
+				top: 50%;
+				margin-top: -16rpx;
+			}
+
+			&:before {
+				left: -16rpx;
+			}
+
+			&:after {
+				right: -16rpx;
+			}
+
+			.money {
+				width: 190rpx;
+				text-align: center;
+
+				.num {
+					font-size: 48rpx;
+					color: #EC6F43;
+					display: block;
+
+					&.num-minus::before {
+						content: '¥';
+						font-size: 36rpx;
+					}
+
+					&.num-discount::after {
+						content: '折';
+						font-size: 36rpx;
+					}
+				}
+
+				.text {
+					font-size: 24rpx;
+					color: #999;
+				}
+			}
+
+			.text {
+				flex: 1;
+				padding-right: 16rpx;
+				width: 0;
+
+				text {
+					font-size: 32rpx;
+					color: #333;
+					display: block;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+			}
+		}
+	}
+}
+</style>

+ 8 - 5
components/basics/categoryShow.vue

@@ -9,7 +9,7 @@
             </view>
             <view class="product-list-info">
               <view class="product-name">{{item.productName}}</view>
-              <view>
+              <view class="flex">
                 <view class="shop-box" @click.stop="jumpStore(item)">
                   <view class="shop-name" @click="jumpProductDetail(item)">{{item.shopName}}</view>
                   <view class="shop-logo">
@@ -64,6 +64,7 @@ name: "categoryShow",
   methods:{
     getData(){
       uni.showLoading({
+        mask: true,
         title:'加载中...'
       })
       NET.request(API.getProducts, {
@@ -156,11 +157,16 @@ name: "categoryShow",
         margin-bottom: 18upx;
         line-height: 40upx;
       }
+      .flex{
+        display: flex;
+        align-items: center;
+      }
       .shop-box{
         background-color: #333333;
         border-radius: 0upx 20upx 20upx 0upx;
         line-height: 40upx;
-        display: inline-block;
+        display: flex;
+        align-items: center;
         height: 40upx;
         margin-right: 10upx;
         float: left;
@@ -187,12 +193,9 @@ name: "categoryShow",
       .buy-count{
         color: #C5AA7B;
         font-size: 20upx;
-        margin-bottom: 16upx;
         border: 2upx solid #E4E5E6;
         line-height: 36upx;
         padding: 0 5upx;
-        display: inline-block;
-
       }
       .price-warp{
         display: flex;

+ 36 - 36
components/canvasShow/basics/banner.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="banner" :class="'terminal' + terminal">
     <swiper class="swiper" :indicator-dots="false" :autoplay="true" :style="{'height':bannerHeight + 'rpx'}" @change="swiperChange">
-      <swiper-item class="banner-item" v-for="(item,index) in bannerList" :key="index" :style="{backgroundImage: 'url('+ item.bannerUrl +')','height':bannerHeight + 'rpx'}"  @click="jumpLink(item.linkObj)">
-        <!--        <div class="a-link" @click="jumpLink(item.linkObj)"><img class="img" :src="item.bannerUrl" v-show="item.bannerUrl" mode="widthFix"></div>-->
+      <swiper-item class="banner-item" v-for="(item,index) in bannerList" :key="index" :style="{backgroundImage: 'url('+ item.bannerUrl +')'}"  @click="jumpLink(item.linkObj)">
+<!--        <div class="a-link" @click="jumpLink(item.linkObj)"><img class="img" :src="item.bannerUrl" v-show="item.bannerUrl" mode="widthFix"></div>-->
       </swiper-item>
     </swiper>
     <view class="swiper-dots" v-if="bannerList && bannerList.length > 1">
@@ -13,43 +13,43 @@
 </template>
 
 <script>
-import {funMixin} from '../config/mixin'
-export default {
-  name: 'cereBanner',
-  mixins: [funMixin],
-  data () {
-    return {
-      bannerHeight: 0,
-      swiperCurrent: 0
-    }
-  },
-  props: {
-    terminal: {
-      type: Number,
-      default: 4
+  import {funMixin} from '../config/mixin'
+  export default {
+    name: 'cereBanner',
+    mixins: [funMixin],
+    data () {
+      return {
+        bannerHeight: 0,
+        swiperCurrent: 0
+      }
     },
-    componentContent: {
-      type: Object
-    }
-  },
-  mounted() {
-    this.bannerHeight = this.componentContent.height
-    this.$forceUpdate() // 刷新轮播图
-  },
-  computed: {
-    bannerList: function () {
-      console.log(this.componentContent)
-      return this.componentContent.bannerData.filter(function (item) {
-        return item.bannerUrl
-      })
-    }
-  },
-  methods:{
-    swiperChange(e) {
-      this.swiperCurrent = e.detail.current;
+    props: {
+      terminal: {
+        type: Number,
+        default: 4
+      },
+      componentContent: {
+        type: Object
+      }
+    },
+    mounted() {
+      this.bannerHeight = this.componentContent.height
+      this.$forceUpdate() // 刷新轮播图
+    },
+    computed: {
+      bannerList: function () {
+        console.log(this.componentContent)
+        return this.componentContent.bannerData.filter(function (item) {
+          return item.bannerUrl
+        })
+      }
+    },
+    methods:{
+      swiperChange(e) {
+        this.swiperCurrent = e.detail.current;
+      }
     }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 80 - 80
components/canvasShow/basics/brandList.vue

@@ -33,99 +33,99 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.brand-list{
-  color: #fff;
-  padding: 20upx 0;
-  .hom-title{
-    font-size: 22upx;
-    color: #333;
-    line-height: 1em;
-    margin-bottom: 23upx;
-    font-weight: bold;
-  }
-  .content-warp{
-    display: flex;
-  }
-  .first{
-    width: 24%;
-    padding-top: 10upx;
-    .item{
-      background-color: #7A8594;
-      height: 336upx;
+  .brand-list{
+    color: #fff;
+    padding: 20upx 0;
+    .hom-title{
+      font-size: 22upx;
+      color: #333;
+      line-height: 1em;
+      margin-bottom: 23upx;
+      font-weight: bold;
+    }
+    .content-warp{
       display: flex;
-      flex-direction: column;
-      justify-content: center;
-      .h3{
-        font-size: 30upx;
-        line-height: 46upx;
-        margin-bottom: 10upx;
-      }
     }
-  }
-  .ul{
-    width: 100%;
-    .li{
-      width: 25%;
-      float: left;
-      padding: 10upx 0 0 10upx;
-      box-sizing: border-box;
+    .first{
+      width: 24%;
+      padding-top: 10upx;
       .item{
-        height: auto;
+        background-color: #7A8594;
+        height: 336upx;
         display: flex;
         flex-direction: column;
         justify-content: center;
-        .imgBox {
-          padding-bottom: 80%;
-          background-color: #cacaca;
-          position: relative;
-        }
-        .h4{
-          font-size: 18upx;
-          color: #333333;
-          text-align: center;
-          height: 40upx;
-          line-height: 40upx;
-        }
-        .p{
-          font-size: 12upx;
-          margin: 7upx 0 12upx;
-        }
-        img {
-          max-width: 100%;
-          height: 100%;
-          max-height: 100%;
-          position: absolute;
-          margin: auto;
-          top: 0;
-          right: 0;
-          bottom: 0;
-          left: 0;
+        .h3{
+          font-size: 30upx;
+          line-height: 46upx;
+          margin-bottom: 10upx;
         }
       }
     }
-  }
-}
-.terminal1,.terminal2,.terminal3{
-  &.brand-list{
-    width: 710upx;
-    margin: 0 auto;
-    .content-warp{
-      display: block;
-    }
-    .first{
-      width: 100%;
-    }
     .ul{
-      width: auto;
-      margin-left: -15upx;
+      width: 100%;
       .li{
-        width: 50%;
-        padding: 15upx 0 0 15upx;
-        .item {
-          padding-left: 0;
+        width: 25%;
+        float: left;
+        padding: 10upx 0 0 10upx;
+        box-sizing: border-box;
+        .item{
+          height: auto;
+          display: flex;
+          flex-direction: column;
+          justify-content: center;
+          .imgBox {
+            padding-bottom: 80%;
+            background-color: #cacaca;
+            position: relative;
+          }
+          .h4{
+            font-size: 18upx;
+            color: #333333;
+            text-align: center;
+            height: 40upx;
+            line-height: 40upx;
+          }
+          .p{
+            font-size: 12upx;
+            margin: 7upx 0 12upx;
+          }
+          img {
+            max-width: 100%;
+            height: 100%;
+            max-height: 100%;
+            position: absolute;
+            margin: auto;
+            top: 0;
+            right: 0;
+            bottom: 0;
+            left: 0;
+          }
+        }
+      }
+    }
+  }
+  .terminal1,.terminal2,.terminal3{
+    &.brand-list{
+      width: 710upx;
+      margin: 0 auto;
+      .content-warp{
+        display: block;
+      }
+      .first{
+        width: 100%;
+      }
+      .ul{
+        width: auto;
+        margin-left: -15upx;
+        .li{
+          width: 50%;
+          padding: 15upx 0 0 15upx;
+          .item {
+            padding-left: 0;
+          }
         }
       }
     }
   }
-}
 </style>

+ 63 - 63
components/canvasShow/basics/categoryList.vue

@@ -32,78 +32,78 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.category-list{
-  padding: 20upx 0;
-  .hom-title{
-    font-size: 22upx;
-    color: #333;
-    line-height: 1em;
-    margin-bottom: 23upx;
-    font-weight: bold;
-    text-align: center;
-  }
-  .content-warp{
-    display: flex;
-    .ul{
-      width: 100%;
+  .category-list{
+    padding: 20upx 0;
+    .hom-title{
+      font-size: 22upx;
+      color: #333;
+      line-height: 1em;
+      margin-bottom: 23upx;
+      font-weight: bold;
+      text-align: center;
+    }
+    .content-warp{
       display: flex;
-      flex-wrap: wrap;
-      .li{
-        flex: 1;
-        padding: 10upx 0 0 10upx;
-        box-sizing: border-box;
-        .item{
-          height: auto;
-          display: flex;
-          flex-direction: column;
-          justify-content: center;
-          .imgBox {
-            padding-bottom: 80%;
-            background-color: #cacaca;
-            position: relative;
-          }
-          img {
-            max-width: 100%;
-            height: 100%;
-            max-height: 100%;
-            position: absolute;
-            margin: auto;
-            top: 0;
-            right: 0;
-            bottom: 0;
-            left: 0;
+      .ul{
+        width: 100%;
+        display: flex;
+        flex-wrap: wrap;
+        .li{
+          flex: 1;
+          padding: 10upx 0 0 10upx;
+          box-sizing: border-box;
+          .item{
+            height: auto;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            .imgBox {
+              padding-bottom: 80%;
+              background-color: #cacaca;
+              position: relative;
+            }
+            img {
+              max-width: 100%;
+              height: 100%;
+              max-height: 100%;
+              position: absolute;
+              margin: auto;
+              top: 0;
+              right: 0;
+              bottom: 0;
+              left: 0;
+            }
           }
         }
       }
-    }
-    .number5 {
-      display: block;
-      .li {
-        width: 25%;
-        float: left;
-      }
-      .li:nth-child(1) {
-        width: 50%;
+      .number5 {
+        display: block;
+        .li {
+          width: 25%;
+          float: left;
+        }
+        .li:nth-child(1) {
+          width: 50%;
+        }
       }
     }
   }
-}
-@media screen and (max-width: 768px) {
-  .category-list .content-warp .ul .li{
-    flex: 0 0 50%;
+  @media screen and (max-width: 768px) {
+    .category-list .content-warp .ul .li{
+      flex: 0 0 50%;
+    }
   }
-}
-.terminal1,.terminal2,.terminal3{
-  &.category-list .content-warp{
-    display: block;
-    .ul{
-      margin: -15upx 0 0 -15upx;
-      width: auto;
-      .li{
-        flex: 0 0 50%;
-        padding: 15upx 0 0 15upx;
+  .terminal1,.terminal2,.terminal3{
+    &.category-list .content-warp{
+      display: block;
+      .ul{
+        margin: -15upx 0 0 -15upx;
+        width: auto;
+        .li{
+          flex: 0 0 50%;
+          padding: 15upx 0 0 15upx;
+        }
       }
     }
   }
-}
 </style>

+ 1 - 1
components/canvasShow/basics/coupon/app/index.vue

@@ -18,7 +18,7 @@
             <div class="b" v-else>{{item.reduceMoney}}</div>
             <div class="b" v-if="item.couponType == 2">折券</div>
           </div>
-          <div class="coupon-item-date">{{item.activityStartTime.split(' ')[0].replace(/-/g, '.')}}-{{item.activityEndTime.split(' ')[0].replace(/-/g, '.')}}</div>
+          <div class="coupon-item-date">{{item.startTime.split(' ')[0].replace(/-/g, '.')}}-{{item.endTime.split(' ')[0].replace(/-/g, '.')}}</div>
           <div class="coupon-item-text">{{item.content}}</div>
         </div>
         <button v-if="item.state === 0" class="coupon-item-btn">已领取</button>

+ 44 - 26
components/canvasShow/basics/discount/app/index.vue

@@ -9,7 +9,7 @@
       <!-- #endif -->
     </div>
     <div v-if="componentContent.arrangeType == '横向滑动' && productData.products.length > 2" class="product-list">
-      <swiper ref="mySwiper" class="swiper product-list-box" :indicator-dots="true" :autoplay="true" :display-multiple-items="2">
+      <swiper ref="mySwiper" class="swiper product-list-box" :indicator-dots="false" :autoplay="true" :display-multiple-items="2" @change="swiperChange">
         <swiper-item class="swiper-slide product-list-item-warp" v-for="(item,index) in productData.products.slice(0, 10)" :key="index" @click="jumpProductDetail(item)">
           <div class="product-list-item">
           <div class="product-list-img">
@@ -40,6 +40,10 @@
           </div>
         </swiper-item>
       </swiper>
+      <view class="swiper-dots" v-if="productData.products && productData.products.length > 2">
+        <text class="dot" :class="index - swiperCurrent <= 1 && index - swiperCurrent >=0  && 'dot-active'" v-for="(dot, index) in productData.products.length"
+              :key="index"></text>
+      </view>
 <!--      <div class="pagination discount-pagination" slot="pagination"></div>-->
     </div>
     <div v-else class="product-list">
@@ -85,20 +89,12 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
-      // swiperOption: {
-      //   slidesPerView: 2,
-      //   spaceBetween: 14,
-      //   autoplay: false, // 可选选项,自动滑动
-      //   loop: true,
-      //   pagination: {
-      //     el: '.discount-pagination',
-      //     clickable: true
-      //   },
-      //   navigation: {
-      //     nextEl: '.swiper-button-next',
-      //     prevEl: '.swiper-button-prev'
-      //   }
-      // }
+      swiperCurrent: 0,
+    }
+  },
+  methods:{
+    swiperChange(e) {
+      this.swiperCurrent = e.detail.current;
     }
   }
 }
@@ -231,22 +227,43 @@ export default {
   }
 }
 
-::v-deep .uni-swiper-dots{
+//::v-deep .uni-swiper-dots{
+//  display: flex;
+//  justify-content: center;
+//  padding: 10upx 0;
+//  .uni-swiper-dot{
+//    width: 10upx;
+//    height: 10upx;
+//    background: #333333;
+//    opacity: 0.3;
+//    border-radius: 5upx;
+//    margin: 0 5upx;
+//    &-active{
+//      width: 20upx;
+//      height: 10upx;
+//      opacity: 1;
+//    }
+//  }
+//}
+.swiper-dots {
   display: flex;
-  justify-content: center;
-  padding: 10upx 0;
-  .uni-swiper-dot{
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: 15rpx;
+  z-index: 66;
+  .dot {
     width: 10upx;
     height: 10upx;
     background: #333333;
     opacity: 0.3;
     border-radius: 5upx;
-    margin: 0 5upx;
-    &-active{
-      width: 20upx;
-      height: 10upx;
-      opacity: 1;
-    }
+    margin: 0 10upx;
+  }
+
+  .dot-active {
+    width: 20upx;
+    opacity: 1;
   }
 }
 //.pagination{
@@ -276,7 +293,8 @@ export default {
   font-size: 24upx;
   background-color: transparent;
   margin: 20upx auto 0;
-  display: block;
+  display: flex;
+  align-items: center;
 }
 
 </style>

+ 32 - 17
components/canvasShow/basics/group/app/index.vue

@@ -13,7 +13,7 @@
          <a v-show="componentContent.showMore" class="btn-all a-link" @click="jumpGroupWorks(productData)">更多<i class="iconfont icon-arrow-right"></i></a>
        </div>
        <div>
-       <swiper class="swiper pro-box" :indicator-dots="productData.show" :autoplay="true" :display-multiple-items="3">
+       <swiper class="swiper pro-box" :indicator-dots="false" :autoplay="true" :display-multiple-items="3" @change="swiperChange">
          <swiper-item class="swiper-slide pro-item-warp" v-for="(item,index) in productData.products" :key="index" @click="jumpProductDetail(item)">
           <div class="pro-item-inner">
             <div class="pro-item">
@@ -34,7 +34,10 @@
          <swiper-item v-if="productData.products.length" class="swiper-slide pro-item-warp" v-for="item in (3 - productData.products.length)">
          </swiper-item>
        </swiper>
- <!--      <div class="pagination group-pagination"></div>-->
+         <view class="swiper-dots" v-if="productData.products && productData.products.length > 3">
+           <text class="dot" :class="index - swiperCurrent <= 2 && index - swiperCurrent >=0  && 'dot-active'" v-for="(dot, index) in productData.products.length"
+                 :key="index"></text>
+         </view>
       </div>
     </div>
   </div>
@@ -46,22 +49,13 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
-      // swiperOption: {
-      //   slidesPerView: 3, // 显示数量
-      //   spaceBetween: 0, // 间隔
-      //   autoplay: false, // 可选选项,自动滑动
-      //   loop: true,
-      //   pagination: {
-      //     el: '.group-pagination'
-      //   },
-      //   navigation: {
-      //     nextEl: '.swiper-button-next',
-      //     prevEl: '.swiper-button-prev'
-      //   }
-      // }
+      swiperCurrent: 0,
     }
   },
-  mounted() {
+  methods:{
+    swiperChange(e) {
+      this.swiperCurrent = e.detail.current;
+    }
   }
 }
 </script>
@@ -77,6 +71,7 @@ export default {
       box-shadow: 0px 20upx 30upx rgba(0, 0, 0, 0.3);
       opacity: 1;
       border-radius: 20upx;
+      position: relative;
     }
     .title{
       display: flex;
@@ -104,7 +99,7 @@ export default {
       }
     }
     .pro-box{
-      height: 432upx;
+      height: 390upx;
       display: flex;
       &.swiper-disabled{
         .uni-swiper-wrapper{
@@ -191,5 +186,25 @@ export default {
     //    opacity: 1;
     //  }
     //}
+    .swiper-dots {
+      display: flex;
+      position: absolute;
+      left: 50%;
+      transform: translateX(-50%);
+      bottom: 15rpx;
+      z-index: 66;
+      .dot {
+        width: 24upx;
+        height: 4upx;
+        background: #fff;
+        opacity: 0.5;
+        border-radius: 2upx;
+        margin: 0 10upx;
+      }
+
+      .dot-active {
+        opacity: 1;
+      }
+    }
   }
 </style>

+ 71 - 0
components/canvasShow/basics/live/app/index.vue

@@ -0,0 +1,71 @@
+<template>
+  <div class="live-list-page" v-if="roomList && roomList.length > 0">
+    <div class="title">
+      <!-- #ifdef MP-WEIXIN -->
+      <img class="title-img" src="../../../static/images/live/img-title.png" alt="直播"  mode="widthFix"/>
+      <!-- #endif -->
+      <!-- #ifdef H5 || APP-PLUS -->
+      <image class="title-img" src="../../../static/images/live/img-title.png" alt="直播"  mode="widthFix"/>
+      <!-- #endif -->
+    </div>
+    <div class="live-list">
+      <LiveBox class="live-item"
+        v-for="item in roomList"
+        :key="item.roomid"
+        :liveData.sync="item"
+        @click="toLiveRoom(item)"
+      />
+    </div>
+    <button v-show="componentContent.showMore" class="btn-more" @click="jumpLive()">查看全部 <span class="icon iconfont icon-arrow-right"></span></button>
+  </div>
+</template>
+
+<script>
+// const NET = require('../../../../../utils/request')
+// const API = require('../../../../../config/api')
+import {commonMixin} from '../mixin'
+import LiveBox from './item.vue'
+export default {
+  mixins: [commonMixin],
+  components: {
+    LiveBox
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.live-list-page{
+  .title{
+    text-align: center;
+    margin-bottom: 20rpx;
+    .title-img{
+      width: 211rpx;
+      height: 32rpx;
+    }
+  }
+  .live-list{
+    padding-left: 20rpx;
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    .live-item{
+      margin:0 14rpx 14rpx 0;
+      width: 348rpx;
+      height: 464rpx;
+      border-radius: 8rpx;
+      overflow: hidden;
+    }
+  }
+  .btn-more {
+    width: 170rpx;
+    height: 54rpx;
+    border: 2rpx solid #C5AA7B;
+    color: #C5AA7B;
+    font-size: 24rpx;
+    background-color: transparent;
+    margin: 20rpx auto 0;
+    display: flex;
+    align-items: center;
+  }
+}
+</style>

+ 459 - 0
components/canvasShow/basics/live/app/item.vue

@@ -0,0 +1,459 @@
+<template>
+  <view class="live-box">
+    <view class="live-ongoing" v-if="liveData.liveStatus === 101">
+      <image class="cover-img" :src="liveData.feedsImg" />
+      <view class="status">
+        <view class="status-state">
+          <!-- #ifdef MP-WEIXIN -->
+          <img class="img" src="../../../static/images/live/icon-live-num.png" mode="widthFix"/>
+          <!-- #endif -->
+          <!-- #ifdef H5 || APP-PLUS -->
+          <image class="img" src="../../../static/images/live/icon-live-num.png" mode="widthFix"/>
+          <!-- #endif -->
+          直播中
+        </view>
+        <!-- <view class="status-num">1000人</view> -->
+      </view>
+      <view class="user">
+        <view class="user-pic">
+          <image class="img" :src="liveData.anchorHeadImg" />
+        </view>
+        <view class="user-name">{{ liveData.anchorNickName }}</view>
+      </view>
+      <view class="products">
+        <view class="uni-padding-wrap">
+          <view class="page-section swiper">
+            <view class="page-section-spacing">
+              <swiper class="swiper"
+                      :indicator-dots="indicatorDots"
+                      :autoplay="autoplay"
+                      :interval="interval"
+                      :duration="duration"
+                      :vertical="true"
+              >
+                <swiper-item
+                    v-for="item in liveData.goods"
+                    :key="item.goods_id"
+                >
+                  <view class="swiper-item">{{ item.name }}</view>
+                </swiper-item>
+              </swiper>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="live-other" v-else @click="toLive">
+      <image class="cover-img" :src="liveData.feedsImg" />
+      <div class="filter-box-warp">
+        <div class="filter-box">
+          <image class="cover-img" :src="liveData.feedsImg" />
+        </div>
+      </div>
+      <view class="user">
+        <view class="user-pic"><image class="img" :src="liveData.anchorHeadImg" /></view>
+        <view class="user-name">{{ liveData.anchorNickName }}</view>
+      </view>
+      <view class="count-down" v-if="liveStatus === 102">
+        <image v-if="isLate" class="img" src="@/static/img/live/live-late.png"/>
+        <view class="text">{{ liveTimeTitle }}</view>
+        <view v-if="!isLate" class="time">
+          <view class="time-item">{{times[0]}}</view>
+          <view class="dot">:</view>
+          <view class="time-item">{{times[1]}}</view>
+          <view class="dot">:</view>
+          <view class="time-item">{{times[2]}}</view>
+        </view>
+      </view>
+      <!-- #ifdef MP-WEIXIN -->
+      <view
+        v-if="liveStatus === 102 && !isLate"
+        class="btn-subscribe"
+        :class="{subscribed : subscribeLive === '已预约'}"
+        @click.stop="onSubscribe"
+      >{{ subscribeLive }}</view>
+      <!-- #endif -->
+      <view class="endContainer" v-if="liveStatus === 103">
+        <view class="endBox">
+          <view></view>
+          <view></view>
+          <view></view>
+          <view></view>
+        </view>
+        <view>直播已结束</view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+const NET = require('@/utils/request')
+const API = require('@/config/api')
+
+import { startLiveTemplate } from '@/config/subscribe.js'
+import { liveAppid } from '@/config/live.js'
+
+// #ifdef MP-WEIXIN
+const livePlayer = requirePlugin('live-player-plugin')
+// #endif
+export default {
+  props: {
+    liveData: {
+      type: Object,
+      default: () => ({
+        roomId: 0,
+        anchorNickName: '',
+        feedsImg: '' // 官方收录封面
+      })
+    }
+  },
+  data () {
+    return {
+      background: ['color1', 'color2', 'color3'],
+      indicatorDots: false,
+      autoplay: true,
+      interval: 2000, // 自动播放间隔时长
+      duration: 500, // 幻灯片切换时长(ms)
+      d: 0,
+      m: 0,
+      s: 0,
+      times: [],
+      liveStatus: 100,
+      liveTimeTitle: '开播倒计时',
+      subscribeLive: '立即预约',
+      timer: null,
+      isLate: false,
+    }
+  },
+  created() {
+    this.liveStatus = this.liveData.liveStatus
+    this.subscribeLive = this.liveData.subscribeStatus === 0 ? '立即预约' : '已预约'
+    this.getStatus()
+    this.countTime()
+    // this.getSubscribeStatus()
+  },
+  destroyed() {
+    clearTimeout(this.timer)
+  },
+  methods: {
+    getStatus() {
+      if (!this.liveData.roomId) { return }
+      let _this = this
+      // #ifdef MP-WEIXIN
+      livePlayer.getLiveStatus({ room_id: this.liveData.roomId })
+      .then(res => {
+        // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
+        // _this.liveData.liveStatus = res.liveStatus
+        _this.liveStatus = res.liveStatus
+      })
+      .catch(err => {
+          console.log('get live status', err)
+      })
+      this.timer = setInterval(() => {
+        livePlayer.getLiveStatus({ room_id: this.liveData.roomId })
+          .then(res => {
+            // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
+            _this.liveStatus = res.liveStatus
+            this.countTime()
+            console.log('get live status', res.liveStatus)
+          })
+          .catch(err => {
+            console.log('get live status', err)
+          })
+      }, 60000)
+      // #endif
+    },
+    changeIndicatorDots(e) {
+        this.indicatorDots = !this.indicatorDots
+    },
+    changeAutoplay(e) {
+        this.autoplay = !this.autoplay
+    },
+    intervalChange(e) {
+        this.interval = e.target.value
+    },
+    durationChange(e) {
+        this.duration = e.target.value
+    },
+    countTime(){
+      var nowtime = new Date().getTime()  //获取当前时间
+      const starttime = new Date(this.liveData.startTime).getTime()
+      if(this.liveStatus === 102){
+        if(starttime > nowtime){
+          var lefttime = starttime - nowtime  //距离结束时间的毫秒数
+          var leftd = Math.floor(lefttime/(1000*60*60)),  //计算小时数
+              leftm = Math.floor(lefttime/(1000*60)%60),  //计算分钟数
+              lefts = Math.floor(lefttime/1000%60);  //计算秒数
+          this.times = [leftd < 10?'0'+ leftd:leftd,leftm < 10?'0'+ leftm:leftm,lefts < 10?'0'+ lefts:lefts]
+          this.liveTimeTitle = '开播倒计时'
+          setTimeout(() => {
+            this.countTime()
+          },1000)
+        } else {
+          this.times = ['00', '00', '00']
+          this.isLate = true
+          this.liveTimeTitle = '正在赶来的路上...'
+        }
+      }
+    },
+    toLive() {
+			if (!liveAppid || !this.liveData) { return }
+			// 跳转直播间携带路由参数
+			// let customParams = encodeURIComponent(JSON.stringify({ path: 'livePage/index', pid: 1 }))
+			// #ifdef MP-WEIXIN
+			wx.navigateTo({
+        url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}`
+				// url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}&custom_params=${customParams}`
+			})
+			// #endif
+    },
+    onSubscribe() {
+      if (this.subscribeLive === '立即预约') {
+        const _this = this
+        // #ifdef MP-WEIXIN
+        uni.requestSubscribeMessage({
+          tmplIds: [startLiveTemplate],
+          success (res) {
+            if (res[startLiveTemplate] === "accept") {
+              NET.request(API.SubScribeLive, {id: _this.liveData.id }, 'post')
+              .then(res => {
+                if (res.data) {
+                  _this.subscribeLive = '已预约'
+                } else {
+                  uni.showToast({
+                    title: res.message || '订阅失败,请稍后再试!',
+                    icon: "none"
+                  })
+                }
+              })
+              .catch(err => {
+                console.log(err)
+                uni.showToast({
+                  title: res.message || '订阅失败,请稍后再试!',
+                  icon: "none"
+                })
+              })
+            }
+          }
+        })
+        // #endif
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.live-box{
+  position: relative;
+  color: #fff;
+  width: 100%;
+  height: 100%;
+  .cover-img{
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    z-index: 0;
+  }
+  .user{
+    display: flex;
+    line-height: 60rpx;
+    height: 64rpx;
+    &-pic{
+      .img{
+        width: 60rpx;
+        height: 60rpx;
+        border: 2px solid rgba(255, 255, 255, 0.5019607843137255);
+        border-radius: 50%;
+        overflow: hidden;
+      }
+    }
+    &-name{
+      font-size: 28rpx;
+      margin-left: 16rpx;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      width: 245rpx;
+    }
+  }
+  .live-ongoing{
+    width: 100%;
+    height: 100%;
+    position: relative;
+    .status{
+      position: absolute;
+      top: 22rpx;
+      left: 22rpx;
+      //width: 212upx;
+      height: 48rpx;
+      // background: rgba(0,0,0,0.3);
+      // border: 2rpx solid rgba(255,255,255,0.3);
+      border-radius: 24rpx;
+      font-size: 20rpx;
+      line-height: 44rpx;
+      display: flex;
+      // padding-right: 8rpx;
+      &-state{
+        width: 118rpx;
+        height: 44rpx;
+        background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
+        opacity: 1;
+        border-radius: 26rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        .img{
+          width: 20rpx;
+          height: 20rpx;
+          margin-right: 6rpx;
+        }
+      }
+      &-num{
+        min-width: 80rpx;
+        padding: 0 8rpx;
+      }
+    }
+    .user{
+      position: absolute;
+      bottom: 62rpx;
+      left: 20rpx;
+    }
+    .products{
+      position: absolute;
+      left: 0rpx;
+      bottom: 20rpx;
+      width: 100%;
+      padding:0 20rpx;
+      .swiper{
+        height: 34rpx;
+        line-height: 34rpx;
+        font-size: 24rpx;
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+      }
+    }
+  }
+  .live-other{
+    position: relative;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .filter-box-warp{
+      background-color: #000000;
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+      .filter-box{
+        position: absolute;
+        top: -30rpx;
+        left: -30rpx;
+        width: 348rpx;
+        height: 464rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        -webkit-filter: blur(20px);
+        -moz-filter: blur(21px);
+        -ms-filter: blur(20px);
+        -o-filter: blur(20px);
+        padding: 30rpx;
+        box-sizing: content-box;
+      }
+    }
+    .user{
+      position: absolute;
+      top: 20rpx;
+      left: 20rpx;
+    }
+    .count-down{
+      position: relative;
+      .text{
+        font-size: 26rpx;
+        line-height: 36rpx;
+        margin-bottom: 16rpx;
+        opacity: 0.5;
+        text-align: center;
+      }
+      .img{
+        display: block;
+        width: 80rpx;
+        height: 80rpx;
+        margin: 16rpx auto;
+      }
+      .time{
+        display: flex;
+        justify-content: space-around;
+        align-items: center;
+        &-item{
+          min-width: 52rpx;
+          padding: 0 5rpx;
+          height: 52rpx;
+          line-height: 52rpx;
+          background: #FFFFFF;
+          opacity: 1;
+          border-radius: 6rpx;
+          font-size: 26rpx;
+          color: #C83732;
+          text-align: center;
+          .dot{
+            line-height: 52rpx;
+          }
+        }
+      }
+    }
+    .btn-subscribe{
+      width: 200rpx;
+      height: 64rpx;
+      line-height: 64rpx;
+      background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
+      box-shadow: 0rpx 6rpx 12rpx rgba(233, 0, 0, 0.3);
+      opacity: 1;
+      border-radius: 6rpx;
+      color: #fff;
+      font-size: 24rpx;
+      text-align: center;
+      position: absolute;
+      bottom: 60rpx;
+      left: 50%;
+      margin-left: -100rpx;
+      &.subscribed{
+        background: #FFFFFF;
+        color: #999999;
+        box-shadow: none;
+      }
+    }
+    .endContainer{
+      position: relative;
+      .endBox{
+        width: 40%;
+        height: 60rpx;
+        margin: 20rpx auto;
+        display: flex;
+        justify-content: space-between;
+        align-items: flex-end;
+        view{
+          width: 0;
+          border: 2rpx solid #FFF;
+        }
+        view:nth-of-type(1){
+          height: 20%;
+        }
+        view:nth-of-type(2){
+          height: 50%;
+        }
+        view:nth-of-type(3){
+          height: 30%;
+        }
+        view:nth-of-type(4){
+          height: 70%;
+        }
+      }
+    }
+  }
+}
+</style>

+ 60 - 0
components/canvasShow/basics/live/mixin.js

@@ -0,0 +1,60 @@
+const NET = require('@/utils/request')
+const API = require('@/config/api')
+import {funMixin} from '../../config/mixin'
+
+export const commonMixin = {
+  mixins: [funMixin],
+  data() {
+    return {
+      appid: 'wx2b03c6e691cd7370',
+      roomId: [], // 填写具体的房间号
+      roomList: [],
+      page: {
+				page: 1,
+				pageSize: 6,
+			},
+    }
+  },
+  props: {
+    terminal: {
+      type: Number,
+      default: 4
+    },
+    typeId: {
+      type: Number,
+      default: 1
+    },
+    shopId: {
+      type: Number,
+      default: 0
+    },
+    componentContent: {
+      type: Object
+    }
+  },
+  created() {
+    this.getLiveRooms()
+  },
+  methods: {
+    // 获取直播间列表
+    getLiveRooms () {
+      NET.request(API.LiveRoomes, this.page, 'get').then(res => {
+				console.log(res)
+				this.roomList = res.data.list
+			})
+    },
+    toLiveRoom (item) {
+      this.roomId.push(item.roomid)
+      if (!this.appid || !this.roomId.length) { return }
+      // 路由参数
+      let customParams = encodeURIComponent(JSON.stringify({ path: 'livePage/index', pid: 1 }))
+      // let customParams
+      // 开发者在直播间页面路径上携带自定义参数(如示例中的path和pid参数),后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断)
+      // #ifdef MP-WEIXIN
+      wx.navigateTo({
+        url: `plugin-private://${this.appid}/pages/live-player-plugin?room_id=${this.roomId}&custom_params=${customParams}`
+      })
+      // #endif
+    }
+  }
+}

+ 2 - 1
components/canvasShow/basics/newProduct/app/index.vue

@@ -187,7 +187,8 @@ export default {
   font-size: 24upx;
   background-color: transparent;
   margin: 20upx auto 0;
-  display: block;
+  display: flex;
+  align-items: center;
 }
 
 </style>

+ 8 - 22
components/canvasShow/basics/notice.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="notice-list" :class="'terminal'+terminal" :style="{backgroundColor:componentContent.bgColor}">
-    <div class="swiper-wrapper">
-      <div class="swiper-slide" v-for="(item,index) in noticesList" :key="index">
+    <swiper class="swiper-wrapper" :indicator-dots="false" :autoplay="true" :vertical="true">
+      <swiper-item class="swiper-slide" v-for="(item,index) in noticesList" :key="index">
         <div class="a-link" @click="jumpNoticeDetail(item)" :style="{color:componentContent.titColor}"><span>{{item.noticeTitle}}</span></div>
-      </div>
-    </div>
+      </swiper-item>
+    </swiper>
   </div>
 </template>
 
@@ -19,13 +19,6 @@ export default {
   data () {
     return {
       noticesList: [],
-      // swiperOption: {
-      //   autoplay: false, // 可选选项,自动滑动
-      //   loop: true,
-      //   pagination: {
-      //     el: '.swiper-pagination'
-      //   }
-      // }
     }
   },
   props: {
@@ -37,13 +30,6 @@ export default {
       type: Object
     }
   },
-  // components: {
-  //   Swiper,
-  //   SwiperSlide
-  // },
-  // directives: {
-  //   swiper: directive
-  // },
   mounted() {
     this.getData()
   },
@@ -67,14 +53,13 @@ export default {
 .notice-list{
   height: 60upx;
   line-height: 60upx;
-  padding: 0 20upx;
   .a-link{
-    display: block;
+    // display: block;
     cursor: pointer;
     overflow: hidden;
     text-overflow:ellipsis;
     white-space: nowrap;
-    text-align: center;
+    margin: 0 20upx;
     span{
       display: inline-block;
       padding-left: 50upx;
@@ -94,9 +79,10 @@ export default {
       margin: 0 auto;
     }
     .a-link{
-      display: block;
       cursor: pointer;
+      display: block;
       text-align: left;
+      margin: 0 20upx;
       span{
         display: block;
         padding-left: 25upx;

+ 41 - 23
components/canvasShow/basics/price/app/index.vue

@@ -20,7 +20,7 @@
         <a v-show="componentContent.showMore" class="btn-all a-link" @click="jumpCombination(productData)">更多<i class="iconfont icon-arrow-right"></i></a>
       </div>
       <div>
-      <swiper class="swiper pro-box" :indicator-dots="true" :autoplay="true" :display-multiple-items="2">
+      <swiper class="swiper pro-box" :indicator-dots="false" :autoplay="true" :display-multiple-items="2" @change="swiperChange">
         <swiper-item class="pro-item-warp" v-for="(item,index) in productData.composeProducts" :key="index" @click="jumpProductDetail(item)">
           <div class="pro-item-inner">
           <div class="pro-item">
@@ -47,6 +47,10 @@
           </div>
         </swiper-item>
       </swiper>
+        <view class="swiper-dots" v-if="productData.composeProducts && productData.composeProducts.length > 2">
+          <text class="dot" :class="index - swiperCurrent <= 1 && index - swiperCurrent >=0  && 'dot-active'" v-for="(dot, index) in productData.composeProducts.length"
+                :key="index"></text>
+        </view>
       </div>
     </div>
   </div>
@@ -57,23 +61,16 @@
 import {commonMixin} from '../mixin'
 export default {
   mixins: [commonMixin],
-  // data () {
-    // return {
-    //   swiperOption: {
-    //     slidesPerView: 2, // 显示数量
-    //     spaceBetween: 20, // 间隔
-    //     autoplay: false, // 可选选项,自动滑动
-    //     loop: true,
-    //     pagination: {
-    //       el: '.price-pagination'
-    //     },
-    //     navigation: {
-    //       nextEl: '.swiper-button-next',
-    //       prevEl: '.swiper-button-prev'
-    //     }
-    //   }
-    // }
-  // }
+  data () {
+    return {
+      swiperCurrent: 0,
+    }
+  },
+  methods:{
+    swiperChange(e) {
+      this.swiperCurrent = e.detail.current;
+    }
+  }
 }
 </script>
 
@@ -87,6 +84,7 @@ export default {
     box-shadow: 0 20upx 30upx rgba(0, 0, 0, 0.3);
     opacity: 1;
     border-radius: 20upx;
+    position: relative;
   }
   .title{
     display: flex;
@@ -181,18 +179,38 @@ export default {
       }
     }
   }
-  .pagination{
+  //.pagination{
+  //  display: flex;
+  //  justify-content: center;
+  //  ::v-deep .swiper-pagination-bullet{
+  //    width: 24upx;
+  //    height: 4upx;
+  //    background: #fff;
+  //    opacity: 0.5;
+  //    border-radius: 2upx;
+  //    margin: 0 5upx;
+  //  }
+  //  ::v-deep .swiper-pagination-bullet-active{
+  //    opacity: 1;
+  //  }
+  //}
+  .swiper-dots {
     display: flex;
-    justify-content: center;
-    ::v-deep .swiper-pagination-bullet{
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+    bottom: 15rpx;
+    z-index: 66;
+    .dot {
       width: 24upx;
       height: 4upx;
       background: #fff;
       opacity: 0.5;
       border-radius: 2upx;
-      margin: 0 5upx;
+      margin: 0 10upx;
     }
-    ::v-deep .swiper-pagination-bullet-active{
+
+    .dot-active {
       opacity: 1;
     }
   }

+ 53 - 33
components/canvasShow/basics/product/app/index.vue

@@ -9,15 +9,15 @@
       <!-- #endif -->
     </div>
     <div v-if="componentContent.arrangeType == '横向滑动' && productData.length > 2" class="product-list">
-      <swiper ref="mySwiper" class="swiper product-list-box" :indicator-dots="true" :autoplay="true" :display-multiple-items="2">
-        <swiper-item class="product-list-item-warp" v-for="(item,index) in productData.slice(0, 10)" :key="index" @click="jumpProductDetail(item)">
+      <swiper ref="mySwiper" class="swiper product-list-box" :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 class="product-list-img">
               <img v-show="item.image" class="img" :src="item.image">
             </div>
             <div class="product-list-info">
               <label class="product-name">{{item.productName}}</label>
-              <div>
+              <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-logo">
@@ -54,7 +54,10 @@
           </div>
         </swiper-item>
       </swiper>
-<!--      <div class="pagination product-pagination" slot="pagination"></div>-->
+      <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" >
@@ -65,7 +68,7 @@
             </div>
             <div class="product-list-info">
               <label class="product-name">{{item.productName}}</label>
-              <div>
+              <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-logo">
@@ -113,20 +116,12 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
-      // swiperOption: {
-      //   slidesPerView: 2,
-      //   spaceBetween: 0,
-      //   autoplay: false, // 可选选项,自动滑动
-      //   loop: true,
-      //   pagination: {
-      //     el: '.product-pagination',
-      //     clickable: true
-      //   },
-      //   navigation: {
-      //     nextEl: '.swiper-button-next',
-      //     prevEl: '.swiper-button-prev'
-      //   }
-      // }
+      swiperCurrent: 0,
+    }
+  },
+  methods:{
+    swiperChange(e) {
+      this.swiperCurrent = e.detail.current;
     }
   }
 }
@@ -193,11 +188,16 @@ export default {
         margin-bottom: 18upx;
         line-height: 40upx;
       }
+      .flex{
+        display: flex;
+        align-items: center;
+      }
       .shop-box{
         background-color: #333333;
         border-radius: 0upx 20upx 20upx 0upx;
         line-height: 40upx;
-        display: inline-block;
+        display: flex;
+        align-items: center;
         height: 40upx;
         margin-right: 10upx;
         .shop-name{
@@ -220,11 +220,9 @@ export default {
       .buy-count{
         color: #C5AA7B;
         font-size: 20upx;
-        margin-bottom: 16upx;
         border: 2upx solid #E4E5E6;
         line-height: 40upx;
         padding: 0 5upx;
-        display: inline-block;
       }
       .price-warp{
         display: flex;
@@ -252,22 +250,43 @@ export default {
     //}
   }
 }
-::v-deep .uni-swiper-dots{
+//::v-deep .uni-swiper-dots{
+//  display: flex;
+//  justify-content: center;
+//  padding: 10upx 0;
+//  .uni-swiper-dot{
+//    width: 10upx;
+//    height: 10upx;
+//    background: #333333;
+//    opacity: 0.3;
+//    border-radius: 5upx;
+//    margin: 0 5upx;
+//    &-active{
+//      width: 20upx;
+//      height: 10upx;
+//      opacity: 1;
+//    }
+//  }
+//}
+.swiper-dots {
   display: flex;
-  justify-content: center;
-  padding: 10upx 0;
-  .uni-swiper-dot{
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: 15rpx;
+  z-index: 66;
+  .dot {
     width: 10upx;
     height: 10upx;
     background: #333333;
     opacity: 0.3;
     border-radius: 5upx;
-    margin: 0 5upx;
-    &-active{
-      width: 20upx;
-      height: 10upx;
-      opacity: 1;
-    }
+    margin: 0 10upx;
+  }
+
+  .dot-active {
+    width: 20upx;
+    opacity: 1;
   }
 }
 //.pagination{
@@ -298,7 +317,8 @@ export default {
   font-size: 24upx;
   background-color: transparent;
   margin: 20upx auto 0;
-  display: block;
+  display: flex;
+  align-items: center;
 }
 
 </style>

+ 44 - 20
components/canvasShow/basics/shop.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="shop"  :class="'terminal' + terminal">
-    <swiper class="swiper" :indicator-dots="true" :autoplay="true">
+    <swiper class="swiper" :indicator-dots="false" :autoplay="true" @change="swiperChange">
       <swiper-item class="shop-item" v-for="(item,index) in imgList" :key="index">
         <div class="shop-item-warp">
           <img class="img" :src="item.img" mode="widthFix">
@@ -10,7 +10,10 @@
         </div>
       </swiper-item>
     </swiper>
-<!--    <div class="pagination shop-pagination"></div>-->
+    <view class="swiper-dots" v-if="imgList && imgList.length">
+      <text class="dot" :class="index === swiperCurrent  && 'dot-active'" v-for="(dot, index) in imgList.length"
+            :key="index"></text>
+    </view>
   </div>
 </template>
 
@@ -23,13 +26,12 @@ export default {
   mixins: [funMixin],
   data () {
     return {
-      // swiperOption: {
-      //   autoplay: false, // 可选选项,自动滑动
-      //   loop: true,
-      //   pagination: {
-      //     el: '.shop-pagination'
-      //   }
-      // }
+      swiperCurrent: 0,
+    }
+  },
+  methods:{
+    swiperChange(e) {
+      this.swiperCurrent = e.detail.current;
     }
   },
   props: {
@@ -63,7 +65,7 @@ export default {
 .shop{
   position: relative;
   .swiper{
-    height: 480upx;
+    height: 460upx;
   }
   &-item{
     &-warp{
@@ -71,6 +73,7 @@ export default {
       padding: 0 20upx;
       .img{
         width: 100%;
+        height: 420upx;
       }
       .a-link{
         width: 220upx;
@@ -111,22 +114,43 @@ export default {
   //    border-radius: 8upx;
   //  }
   //}
-  ::v-deep .uni-swiper-dots{
+  //::v-deep .uni-swiper-dots{
+  //  display: flex;
+  //  justify-content: center;
+  //  padding: 0upx 0;
+  //  .uni-swiper-dot{
+  //    width: 10upx;
+  //    height: 10upx;
+  //    background: #333333;
+  //    opacity: 0.3;
+  //    border-radius: 5upx;
+  //    margin: 0 5upx;
+  //    &-active{
+  //      width: 20upx;
+  //      height: 10upx;
+  //      opacity: 1;
+  //    }
+  //  }
+  //}
+  .swiper-dots {
     display: flex;
-    justify-content: center;
-    padding: 0upx 0;
-    .uni-swiper-dot{
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+    bottom: 15rpx;
+    z-index: 66;
+    .dot {
       width: 10upx;
       height: 10upx;
       background: #333333;
       opacity: 0.3;
       border-radius: 5upx;
-      margin: 0 5upx;
-      &-active{
-        width: 20upx;
-        height: 10upx;
-        opacity: 1;
-      }
+      margin: 0 10upx;
+    }
+
+    .dot-active {
+      width: 20upx;
+      opacity: 1;
     }
   }
 }

+ 1 - 1
components/canvasShow/basics/spike/app/index.vue

@@ -13,7 +13,7 @@
         <div class="spike-card-top-time" v-if="state===2">
           活动已结束
         </div>
-        <div class="spike-card-top-time" v-else>
+        <div class="spike-card-top-time" v-if="state !==2 && count.length">
           距离{{count[0]}}还有 <div class="span">{{count[1]}}:{{count[2]}}:{{count[3]}}</div>
         </div>
         <a class="btn-more" @click="jumpSeckills(productData)">更多<i class="iconfont icon-arrow-right"></i></a>

+ 72 - 60
components/canvasShow/basics/vip/app/index.vue

@@ -11,45 +11,51 @@
         <a v-show="componentContent.showMore" class="btn-more a-link" @click="jumpVip">更多<i class="iconfont icon-arrow-right"></i></a>
       </div>
       <div>
-      <swiper class="swiper vip-list" :indicator-dots="true" :autoplay="true" v-if="productData.length > 2">
-        <swiper-item class="vip-item-warp" v-for="(itemJ,indexJ) in listTemp" :key="indexJ">
-          <div class="vip-item"  v-for="(item,index) in itemJ" :key="index"  @click="jumpProductDetail(item)">
-            <div class="vip-item-img">
-              <image v-show="item.image" class="img" :src="item.image">
-            </div>
-            <div class="vip-item-info">
-              <h3 class="name">
-                {{item.productName}}
-              </h3>
-              <div class="stock">
-                还剩{{item.stockNumber}}件
-              </div>
-              <div class="original-price">
-                ¥ {{item.originalPrice}}
-              </div>
-              <div class="price-warp">
-                <div class="flag">
-                  <!-- #ifdef MP-WEIXIN -->
-                  <img src="../../../static/images/vip/flag-vip.png" alt="会员价" class="flagImg"/>
-                  <!-- #endif -->
-                  <!-- #ifdef H5 || APP-PLUS -->
-                  <image class="flagImg" src="../../../static/images/vip/flag-vip.png" alt="会员专区" mode="widthFix"/>
-                  <!-- #endif -->
-                </div>
-                <div class="price">
-                  ¥ {{item.price}}
+        <div v-if="productData.length > 2">
+          <swiper class="swiper vip-list" :indicator-dots="false" :autoplay="true" @change="swiperChange">
+            <swiper-item class="vip-item-warp" v-for="(itemJ,indexJ) in listTemp" :key="indexJ">
+              <div class="vip-item"  v-for="(item,index) in itemJ" :key="index"  @click="jumpProductDetail(item)">
+                <div class="vip-item-img">
+                  <image v-show="item.image" class="img" :src="item.image">
                 </div>
-              </div>
-              <div class="btn-buy">
-                <span>去购买</span>
-                <div class="progress">
-                  <i></i>
+                <div class="vip-item-info">
+                  <h3 class="name">
+                    {{item.productName}}
+                  </h3>
+                  <div class="stock">
+                    还剩{{item.stockNumber}}件
+                  </div>
+                  <div class="original-price">
+                    ¥ {{item.originalPrice}}
+                  </div>
+                  <div class="price-warp">
+                    <div class="flag">
+                      <!-- #ifdef MP-WEIXIN -->
+                      <img src="../../../static/images/vip/flag-vip.png" alt="会员价" class="flagImg"/>
+                      <!-- #endif -->
+                      <!-- #ifdef H5 || APP-PLUS -->
+                      <image class="flagImg" src="../../../static/images/vip/flag-vip.png" alt="会员专区" mode="widthFix"/>
+                      <!-- #endif -->
+                    </div>
+                    <div class="price">
+                      ¥ {{item.price}}
+                    </div>
+                  </div>
+                  <div class="btn-buy">
+                    <span>去购买</span>
+                    <div class="progress">
+                      <i></i>
+                    </div>
+                  </div>
                 </div>
               </div>
-            </div>
-          </div>
-        </swiper-item>
-      </swiper>
+            </swiper-item>
+          </swiper>
+          <view class="swiper-dots" v-if="listTemp && listTemp.length > 1">
+            <text class="dot" :class="swiperCurrent === index && 'dot-active'" v-for="(dot, index) in listTemp.length"
+                  :key="index"></text>
+          </view>
+        </div>
         <div class="swiper vip-list" v-else>
           <div class="vip-item-warp" v-for="(itemJ,indexJ) in listTemp" :key="indexJ">
             <div class="vip-item"  v-for="(item,index) in itemJ" :key="index" @click="jumpProductDetail(item)">
@@ -101,13 +107,7 @@ export default {
   mixins: [commonMixin],
   data () {
     return {
-      // swiperOption: {
-      //   autoplay: false, // 可选选项,自动滑动
-      //   loop: true,
-      //   pagination: {
-      //     el: '.vip-pagination'
-      //   }
-      // }
+      swiperCurrent: 0,
     }
   },
   computed: {
@@ -126,6 +126,11 @@ export default {
       return arrTemp;
     }
   },
+  methods:{
+    swiperChange(e) {
+      this.swiperCurrent = e.detail.current;
+    }
+  }
 }
 </script>
 
@@ -134,6 +139,7 @@ export default {
   &-card{
     background: #333333;
     padding: 0 20upx 20upx;
+    position: relative;
   }
   &-title{
     padding: 42upx 0 28upx 30upx;
@@ -160,7 +166,7 @@ export default {
     }
   }
   &-list{
-    height: 620upx;
+    height: 562upx;
   }
   &-item{
     display: flex;
@@ -186,10 +192,10 @@ export default {
       position: relative;
       .name{
         font-size: 28upx;
-        height: 75rpx;
+        //height: 75rpx;
         line-height: 40upx;
         color: #333333;
-        padding: 30upx 0 10upx;
+        margin: 30upx 0 10upx;
         overflow:hidden;
         text-overflow:ellipsis;
         display:-webkit-box;
@@ -214,6 +220,7 @@ export default {
         font-size: 24upx;
         line-height: 34upx;
         color: #CCCCCC;
+        text-decoration: line-through;
       }
       .flag{
         float: left;
@@ -246,6 +253,7 @@ export default {
           line-height: 34upx;
           color: #FFFFFF;
           margin-bottom: 10upx;
+          display: block;
         }
         .progress{
           height: 8upx;
@@ -265,28 +273,32 @@ export default {
       }
     }
   }
-  ::v-deep .uni-swiper-dots{
+.vip-item-info {
+  .price-warp {
+    display: flex;
+    align-items: center;
+  }
+}
+  .swiper-dots {
     display: flex;
-    justify-content: center;
-    padding-top:20upx;
-    .uni-swiper-dot{
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+    bottom: 15upx;
+    z-index: 66;
+    .dot {
       width: 24upx;
       height: 4upx;
       background: #fff;
       opacity: 0.5;
       border-radius: 2upx;
-      margin: 0 5upx;
-      &-active{
-        opacity: 1;
-      }
+      margin: 0 10upx;
+    }
+
+    .dot-active {
+      opacity: 1;
     }
   }
-.vip-item-info {
-  .price-warp {
-    display: flex;
-    align-items: center;
-  }
-}
   //.pagination{
   //  display: flex;
   //  justify-content: center;

+ 4 - 1
components/canvasShow/canvasShowPage.vue

@@ -22,6 +22,7 @@
         <com-price v-if="item.type==='priceList'" :componentContent="item.componentContent" :terminal="terminal" :typeId="typeId" :shopId="shopId"></com-price>
         <com-new-product v-if="item.type==='newProduct'" :componentContent="item.componentContent" :terminal="terminal" :typeId="typeId" :shopId="shopId"></com-new-product>
         <com-shop v-if="item.type==='shop'" :componentContent="item.componentContent" :terminal="terminal" :typeId="typeId" :shopId="shopId"></com-shop>
+        <com-live v-if="item.type==='live'" :componentContent="item.componentContent" :terminal="terminal" :typeId="typeId" :shopId="shopId"></com-live>
       </div>
   </div>
 </template>
@@ -48,6 +49,7 @@
   import comPrice from '@/components/canvasShow/basics/price/app'
   import comNewProduct from '@/components/canvasShow/basics/newProduct/app'
   import comShop from '@/components/canvasShow/basics/shop'
+  import comLive from '@/components/canvasShow/basics/live/app'
   import api from './config/api'
   import {sendReqMixin} from './config/mixin'
   export default {
@@ -83,7 +85,8 @@
       comNotice,
       comVip,
       comNewProduct,
-      comShop
+      comShop,
+      comLive
     },
     props: {
       terminal: {

+ 4 - 0
components/canvasShow/componentMap.js

@@ -22,6 +22,7 @@ export const componentMap = [
     ['priceList', () => import('./basics/price/app')], // 定价捆绑
     ['discountList', () => import('./basics/discount/app')], // 限时折扣
     ['newProduct', () => import('./basics/newProduct/app')], // 每日上新
+    ['live', () => import('./basics/live/app')], // 直播
     ['shop', () => import('./basics/shop')] // 每日好店
   ]),
   // H5
@@ -47,6 +48,7 @@ export const componentMap = [
     ['priceList', () => import('./basics/price/app')], // 定价捆绑
     ['discountList', () => import('./basics/discount/app')], // 限时折扣
     ['newProduct', () => import('./basics/newProduct/app')], // 每日上新
+    ['live', () => import('./basics/live/app')], // 直播
     ['shop', () => import('./basics/shop')] // 每日好店
   ]),
   // APP
@@ -72,6 +74,7 @@ export const componentMap = [
     ['priceList', () => import('./basics/price/app')], // 定价捆绑
     ['discountList', () => import('./basics/discount/app')], // 限时折扣
     ['newProduct', () => import('./basics/newProduct/app')], // 每日上新
+    ['live', () => import('./basics/live/app')], // 直播
     ['shop', () => import('./basics/shop')] // 每日好店
   ]),
   // PC
@@ -97,6 +100,7 @@ export const componentMap = [
     ['priceList', () => import('./basics/price/pc')], // 定价捆绑
     ['discountList', () => import('./basics/discount/pc')], // 限时折扣
     ['newProduct', () => import('./basics/newProduct/app')], // 每日上新
+    ['live', () => import('./basics/live/app')], // 直播
     ['shop', () => import('./basics/shop')] // 每日好店
   ])
 ]

+ 1 - 0
components/canvasShow/config/api.js

@@ -2,6 +2,7 @@
 
 // 获取当前环境变量 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://ceres.zkthink.com/api' : 'https://ceres.zkthink.com/api'
 
 

+ 9 - 0
components/canvasShow/config/mixin/funMixin.js

@@ -28,6 +28,7 @@ export const tool = {
     // 判断url
     jumpLink (linkObj) {
       var link = ''
+      console.log(linkObj.data)
       if(linkObj && linkObj.typeText && linkObj.data){
         switch (linkObj.typeText) {
           case '类别':
@@ -41,6 +42,8 @@ export const tool = {
             break
           case '自定义':
             // router.push("/category");
+          case '公告':
+            this.jumpNoticeDetail(linkObj.data)
             break
         }
       } else if(linkObj.selsectValue==='/index'){
@@ -157,6 +160,12 @@ export const tool = {
         url: '/pages_category_page2/userModule/messageDetail?noticeId=' + item.noticeId
       })
     },
+    // 跳转到直播列表
+    jumpLive(){
+      uni.navigateTo({
+        url: '/pages_category_page2/livePage/index'
+      })
+    },
     // 领取优惠券
     // receiveCoupon(item) {
     //   var key = canvasConfig.getToken()

BIN
components/canvasShow/static/images/discount/bg-discount-top.png


BIN
components/canvasShow/static/images/live/huabei.png


BIN
components/canvasShow/static/images/live/icon-live-num.png


BIN
components/canvasShow/static/images/live/img-title.png


BIN
components/canvasShow/static/images/spike/bg-spike.png


+ 405 - 0
components/goodsDetalils/coupon-popup.vue

@@ -0,0 +1,405 @@
+<template>
+  <view class="coupon-popup" :class="showActivity && 'show'" >
+	<view class="mask" @click="closePopup"></view>  
+    <view class="couponShow-box" id="popupInner">
+        <view class="tabsbox">
+            <u-tabs
+              :list="activeTypeList"
+              bar-width="0"
+              bar-height="0"
+              :bold="false"
+              active-color="#C5AA7B"
+              inactive-color="#999999"
+              :is-scroll="false"
+              :current="activeTypeFlag"
+              @change="activeTypeActive"
+            ></u-tabs>
+        </view>
+        <view v-if="activeTypeFlag === 0" class="couponShow">
+            <view class="title-box">
+                <image class="close-btn" @click="onActivityClose" src="../../static/images/close.png"></image>
+            </view>
+            <view class="shopCouponBox" :class="markTools.length === 0 && 'flex'">
+                <view class="list" v-if="markTools.length > 0">
+                    <view class="item"
+                      v-for="(item, index) in markTools"
+                      :key="index"
+                      :class="{received: item.state === 1}"
+                    >
+                        <view class="info-box">
+                            <view class="discoun" v-if="item.couponType == 1"><text style="font-size: 28rpx">¥</text>{{item.reduceMoney}}</view>
+                            <view class="discoun" v-if="item.couponType == 2">{{item.reduceMoney}}折</view>
+                            <view class="info-date">{{getDate(item.startTime)}}-{{getDate(item.endTime)}}</view>
+                            <view class="info-condition mar-top-30">{{item.content}}</view>
+                            <!--                  <view class="info-condition" v-if="item.couponType == 2">{{item.reduceMoney}}折优惠</view>-->
+                            <wx-send-coupon @success="success" v-if="item.state === 3" :couponList="[item]">
+                                <view class="use-btn mar-top-10"
+                                      v-if="item.state === 3">
+                                    立即领取
+                                </view>
+                            </wx-send-coupon>
+                            <view class="use-btn mar-top-10" v-if="item.state === 0">已领取</view>
+                            <view class="use-btn mar-top-10" v-if="item.state === 1">已使用</view>
+                        </view>
+                    </view>
+                </view>
+                <view v-else class="emptyOrder-box flex-items-plus flex-column">
+                    <image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
+                    <label class="font-color-999 fs26 mar-top-30">你还没有优惠券哦~</label>
+                </view>
+            </view>
+        </view>
+        <view v-if="activeTypeFlag === 1" class="couponShow">
+            <view class="title-box">
+                <image class="close-btn" @click="onActivityClose" src="../../static/images/close.png"></image>
+            </view>
+            <view class="shopCouponBox" :class="shopMarkTools.length === 0 && 'flex'">
+                <view class="list" v-if="shopMarkTools.length > 0">
+                    <view
+                      class="item"
+                      v-for="(item, index) in shopMarkTools"
+                      :key="index"
+                      :class="{received: item.state === 1}"
+                    >
+                        <view class="info-box">
+                            <view class="discoun" v-if="item.couponType === 1"><text
+                                    style="font-size: 28rpx">¥</text>{{item.reduceMoney}}</view>
+                            <view class="discoun" v-if="item.couponType === 2">{{item.reduceMoney}}折</view>
+                            <view class="info-date">{{getDate(item.startTime)}}-{{getDate(item.endTime)}}</view>
+                            <view class="info-condition" v-if="item.couponType === 1">
+                                满{{item.fullMoney}}元减{{item.reduceMoney}}元</view>
+                            <view class="info-condition" v-if="item.couponType === 2">{{item.reduceMoney}}折优惠
+                            </view>
+                            <view class="use-btn" @click="receiveTap(item,1)" v-if="item.state === 3">立即领取
+                            </view>
+                            <view class="use-btn" v-if="item.state === 0">已领取</view>
+                        </view>
+                    </view>
+                </view>
+                <view v-else class="emptyOrder-box flex-items-plus flex-column">
+                    <image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
+                    <label class="font-color-999 fs26 mar-top-30">你还没有优惠券哦~</label>
+                </view>
+            </view>
+        </view>
+        <view class="receive-success" v-if="isShowSuccess">
+            <view class="success-box">
+                <image class="success-img" src="../../static/images/success_tu.png"></image>
+                <view class="text">领取成功</view>
+            </view>
+        </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import WxSendCoupon from "@/components/wx/wxSendCoupon";
+const NET = require('../../utils/request')
+const API = require('../../config/api')
+
+export default {
+    name: "coupon-popup",
+    components: {
+        WxSendCoupon,
+    },
+    props: {
+        markTools: {
+            type: Array,
+            default: ()=>[]
+        },
+        shopMarkTools: {
+            type: Array,
+            default: ()=>[]
+        },
+        setTop: {
+          type: Number,
+          default: 0
+        }
+    },
+    data () {
+        return {
+            showActivity: false,
+            isShowSuccess: false,
+            activeTypeFlag: 0,
+            activeTypeList: [{
+                name: '平台活动'
+            }, {
+                name: '店铺活动'
+            }],
+        }
+    },
+    methods:{
+        activeTypeActive(index) {
+          this.activeTypeFlag = index
+        },
+        //关闭优惠券弹窗
+        onActivityClose() {
+            this.showActivity = false
+        },
+        // 时间格式化
+        getDate(time) {
+            if (!time) return '';
+            return time.split(' ')[0].split('-').join('.');
+        },
+        // 领取优惠券
+        receiveTap(couponItemInfo, type) {
+            uni.showLoading({
+                mask: true,
+                title: '领取中...',
+            })
+            let ReceiveCoupon
+            if (type === 0) {
+                ReceiveCoupon = {
+                    couponId: couponItemInfo.couponId,
+                    shopId:this.shopId
+                }
+            } else {
+                ReceiveCoupon = {
+                    shopCouponId: couponItemInfo.shopCouponId,
+                    shopId:this.shopId
+                }
+            }
+            NET.request(API.ReceiveCoupon, ReceiveCoupon, 'POST').then(res => {
+                uni.hideLoading()
+                this.isShowSuccess = true
+                setTimeout(() => {
+                    this.isShowSuccess = false
+                    // this.showActivity = false;
+                    // this.queryProductDetail()
+                }, 1500);
+                // setTimeout(() => {
+                // 	this.showActivity = false
+                // }, 3000);
+            }).catch(res => {
+                uni.hideLoading()
+                uni.showToast({
+                    title: res.msg,
+                    icon: 'none'
+                })
+            })
+        },
+		success(){
+			this.isShowSuccess = true
+			setTimeout(() => {
+			    this.isShowSuccess = false
+			}, 1500);
+		},
+        closePopup(){
+          this.showActivity = false;
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.coupon-popup{
+    display: block;
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    overflow: hidden;
+    // background-color: rgba(0, 0, 0, 0.6);
+    z-index: -1;
+    opacity: 0;
+    &.show{
+        z-index: 1000;
+        opacity: 1;
+        .couponShow-box{
+            /*transform: translate3D(0px, 0px, 0px);*/
+            bottom: 0;
+        }
+    }
+	.mask{
+		display: block;
+		position: fixed;
+		width: 100%;
+		height: 100%;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		overflow: hidden;
+		background-color: rgba(0, 0, 0, 0.6);
+		z-index:1001;
+	}
+    .couponShow-box{
+        width: 100%;
+        height: auto;
+        /*transform: translate3d(0px, 100%, 0px);*/
+        transition: all 0.3s ease-in-out 0s;
+        background-color: #fff;
+        position: absolute;
+        left: 0;
+        right: 0;
+        bottom: -100%;
+		z-index: 1002;
+        .tabsbox{
+            padding:0 20rpx;
+            /deep/ .u-tab-item{
+                height: 100rpx !important;
+                line-height: 100rpx !important;
+            }
+        }
+        .title-box .close-btn {
+            width: 50upx;
+            height: 50upx;
+            box-sizing: border-box;
+            position: absolute;
+            top: 20upx;
+            right: 20upx;
+        }
+
+        // #ifdef MP-ALIPAY
+        .title-box .close-btn {
+            width: 30upx;
+            height: 30upx;
+            top: 10upx;
+            right: 10upx;
+        }
+        // #endif
+        .shopCouponBox {
+            height: 100%;
+            overflow: auto;
+            position: relative;
+            &.flex{
+                display: flex;
+                justify-content: center;
+                align-items: center;
+            }
+            .emptyOrder-box {
+                position: absolute;
+                top: 0;
+                bottom: 0;
+                right: 0;
+                left: 0;
+                margin: auto;
+                // padding-top: 80upx;
+                .emptyOrder-img {
+                    width: 225upx;
+                    height: 196upx;
+                }
+            }
+            .list {
+                display: flex;
+                flex-wrap: wrap;
+            }
+            .item {
+                width: 50%;
+                height: 291rpx;
+                background: url("https://ceres.zkthink.com/static/images/couponsIcon.png") no-repeat center top;
+                border-radius: 10rpx;
+                margin-top: 20rpx;
+                display: flex;
+                flex-direction: row;
+                position: relative;
+                background-size: contain;
+                padding: 0 50rpx;
+                margin-bottom: 30rpx;
+            }
+            .received {
+                background: url("https://ceres.zkthink.com/static/images/couponsIcon1.png") no-repeat center top;
+                background-size: contain;
+                .discoun {
+                    color: #999999;
+                    padding-top: 35rpx;
+                }
+                .use-btn {
+                    height: 48rpx;
+                    border: 2rpx solid #CCCCCC;
+                    line-height: 48rpx;
+                    text-align: center;
+                    font-size: 24rpx;
+                    font-weight: 400;
+                    background-color: #CCCCCC;
+                    color: #FFFFFF;
+                    margin: 50rpx auto 0 auto;
+                    padding: 0 10rpx;
+                }
+            }
+
+            /*.item:last-child {*/
+                /*margin-bottom: 100rpx;*/
+            /*}*/
+
+            .discoun {
+                display: flex;
+                flex-direction: row;
+                align-items: baseline;
+                font-size: 40rpx;
+                color: #C5AA7B;
+                margin: 0 auto;
+                padding-top: 40rpx;
+            }
+            .discoun text {
+                display: inline-block;
+            }
+            .info-box {
+                width: 100%;
+                display: flex;
+                flex-direction: column;
+                align-items: center;
+            }
+            .info-condition {
+                font-size: 20rpx;
+                font-weight: 400;
+                color: #999999;
+                margin:0 auto;
+            }
+            .info-date {
+                font-size: 20rpx;
+                font-family: PingFang SC;
+                font-weight: 400;
+                color: #999999;
+                margin: 10rpx auto;
+                line-height: 20rpx;
+            }
+            .use-btn {
+                height: 48rpx;
+                border: 2rpx solid #C5AA7B;
+                line-height: 48rpx;
+                text-align: center;
+                font-size: 24rpx;
+                font-weight: 400;
+                background-color: #C5AA7B;
+                color: #FFFFFF;
+                margin: 50rpx auto 0 auto;
+                padding: 0 10rpx;
+            }
+        }
+    }
+}
+.receive-success {
+    width: 100%;
+    position: fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    z-index: 8888;
+    .success-box {
+        width: 380upx;
+        height: 280upx;
+        background: rgba(0, 0, 0, 0.5);
+        border-radius: 10upx;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        .success-img {
+            width: 200upx;
+            height: 130upx;
+        }
+        .text {
+            font-size: 28upx;
+            margin-top: 50upx;
+            font-weight: 400;
+            color: rgba(255, 255, 255, 1);
+        }
+    }
+}
+</style>

+ 154 - 0
components/hoteRecommed/index.vue

@@ -0,0 +1,154 @@
+<template>
+  <view class="hotTemplate" v-if="productList.length">
+    <view class="evaluateIcon flex-items">
+      <image src="@/static/images/evaluateIcon.png"></image>
+      <text>热门推荐</text>
+    </view>
+    <view class="recommendList">
+      <view
+        class="itemBox"
+        v-for="(item, index) of productList"
+        @click="goodsDateils(item.shopId,item.productId,item.skuId)"
+      >
+        <view class="itemImg">
+          <image :src="item.image"></image>
+        </view>
+        <view class="itemTit">{{item.productName}}</view>
+        <view class="flex-items shopNameBox">
+          <view class="shopName">{{item.shopName}}</view>
+          <view class="paymentNum">{{item.users}}人付款</view>
+        </view>
+        <view class="itemPrice">
+          <view class="price">¥{{item.price}}</view>
+          <view class="originalPrice">¥{{item.originalPrice}}</view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+const NET = require('@/utils/request')
+const API = require('@/config/api')
+
+export default {
+  data () {
+    return {
+      listQuery: {
+        page: 1,
+        pageSize: 5
+      },
+      productList: []
+    }
+  },
+  created() {
+    this.GetremenList()
+  },
+  methods: {
+    // 获取列表数据
+    GetremenList() {
+      this.listQuery.timestamp = new Date().getTime()
+      NET.request(API.GetremenList, this.listQuery, 'get').then(res => {
+        uni.stopPullDownRefresh();
+        if (res.code == 200) {
+          this.productList = res.data.list
+        } else {
+          uni.showToast({
+            title: res.message,
+            icon: 'none'
+          })
+        }
+      })
+    },
+    //商品详情
+    goodsDateils(shopId, productId, skuId) {
+      uni.navigateTo({
+        url: '/pages_category_page1/goodsModule/goodsDetails?shopId=' + shopId + '&productId=' + productId + '&skuId=' +
+            skuId
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.hotTemplate{
+  padding: 1rpx 0 50rpx 0;
+  background: #efefef;
+  .evaluateIcon {
+    margin: 30rpx 0 20rpx 0;
+    justify-content: center;
+    image {
+      width: 36rpx;
+      height: 32rpx;
+      margin-right: 20rpx;
+    }
+  }
+  .recommendList {
+    display: flex;
+    flex-wrap: wrap;
+    .itemBox {
+      width: 47%;
+      margin: 16rpx 1% 16rpx 2%;
+      background: #FFFFFF;
+      .itemImg {
+        width: 100%;
+        height: 314rpx;
+        image {
+          width: 100%;
+          height: 100%;
+        }
+      }
+      .itemTit {
+        padding: 0 20rpx;
+        height: 40rpx;
+        width: 100%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow:ellipsis;
+      }
+      .shopNameBox {
+        padding: 0 20rpx;
+        height: 40rpx;
+        justify-content: space-between;
+        margin-top: 20rpx;
+        .shopName {
+          color: #FFEBC4;
+          font-size: 20rpx;
+          width: 140rpx;
+          height: 40rpx;
+          line-height: 40rpx;
+          border-radius: 0 20rpx 20rpx 0;
+          background: #333333;
+          padding-left: 10rpx;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow:ellipsis;
+        }
+        .paymentNum {
+          border: 2rpx solid #E4E5E6;
+          color: #C5AA7B;
+          font-size: 20rpx;
+          padding: 5rpx;
+        }
+      }
+      .itemPrice {
+        display: flex;
+        align-items: center;
+        padding: 0 20rpx 10rpx 20rpx;
+        margin-top: 20rpx;
+        .price {
+          font-size: 40rpx;
+          color: #C83732;
+          margin-right: 10rpx;
+        }
+        .originalPrice {
+          color: #CCCCCC;
+          font-size: 24rpx;
+          text-decoration: line-through;
+        }
+      }
+    }
+  }
+}
+</style>

+ 2 - 2
components/modal/modal.vue

@@ -42,7 +42,7 @@
 			},
 			radius: {
 				type: String,
-				default: "24rpx"
+				default: "10rpx"
 			},
 			//标题
 			title: {
@@ -153,7 +153,7 @@
 		left: 0;
 		right: 0;
 		bottom: 0;
-		background: rgb(0,0,0,0.1);
+		background: rgb(0,0,0,0.5);
 		z-index: 9999;
 		transition: all 0.3s ease-in-out;
 		opacity: 0;

+ 251 - 0
components/wx/wxSendCoupon.vue

@@ -0,0 +1,251 @@
+<template>
+    <view class="warp">
+        <!-- #ifdef MP-WEIXIN -->
+        <send-coupon
+          v-if="cParams"
+          @sendcoupon="sendcoupon"
+          @userconfirm="userconfirm"
+          :send_coupon_params="cParams.send_coupon_params"
+          :sign="cParams.sign"
+          :send_coupon_merchant="cParams.send_coupon_merchant"
+        >
+            <slot></slot>
+        </send-coupon>
+        <view v-else @click.stop="receiveCoupon">
+            <slot></slot>
+        </view>
+        <!-- #endif -->
+        <!-- #ifndef MP-WEIXIN -->
+        <view @click.stop="receiveCoupon">
+            <slot></slot>
+        </view>
+        <!-- #endif -->
+
+        <!-- 优惠券领取 -->
+        <tui-modal :show="confirmVisible" :custom="true" :fadein="true">
+            <view class="Put-box1">
+                <view class="text-align fs34 fs-bold">
+                    是否领取此优惠券
+                </view>
+                <view class="flex-display flex-sp-between">
+                    <view class="btn" @click="confirmVisible = false">
+                        取消
+                    </view>
+                    <view class="btn submit" @click="receive">
+                        确定
+                    </view>
+                </view>
+            </view>
+        </tui-modal>
+    </view>
+</template>
+
+<script>
+    const NET = require('../../utils/request')
+    const API = require('../../config/api')
+    import tuiModal from "@/components/modal/modal";
+    export default {
+        name: "wxSendCoupon",
+        components: {
+            tuiModal
+        },
+        props: {
+            couponList: {
+                type: Array,
+                default: ()=>[]
+            },
+            // 卡券无法加询问
+            // isConfirm: {
+            //     type: Boolean,
+            //     default: false
+            // }
+        },
+        data(){
+         return {
+             cParams: '',
+             confirmVisible: false,
+             successList: []
+         }
+        },
+        mounted(){
+            console.log(this.couponList,'couponList')
+            let ids = []
+            this.couponList.forEach(item=>{
+                if(item.cardId){
+                    ids.push(item.cardId)
+                } else {
+                    this.successList.push(item)
+                }
+            })
+            // #ifdef MP-WEIXIN
+            if(ids && ids.length > 0){
+               this.buildParam4Plug(ids)
+            }
+            // #endif
+        },
+        methods:{
+            // 获取微信卡券参数
+            buildParam4Plug(ids){
+                NET.request(API.buildParam4Plug, ids, 'POST').then(res => {
+                    this.cParams = res.data
+                }).catch(res => {
+
+                })
+            },
+            // 领取优惠券
+            receiveCoupon() {
+                if(this.successList.length > 0){
+                    const res = uni.getStorageSync('storage_key'),token = res.token;
+                    if (token) {
+                        if (this.couponList.length === 1 && this.couponList[0].ifCredit) {
+                            // 单个积分兑换的卡券去积分中心兑
+                            uni.navigateTo({
+                                url: `../integral/exchangeDetail?data=${JSON.stringify(this.couponList[0])}`
+                            })
+                        } else {
+                            let params = []
+                            this.successList.forEach(item=>{
+                                params.push({
+                                    couponId: item.couponId,
+                                    couponCode: item.couponCode,
+                                    source: 1
+                                })
+                            })
+                            // 领取优惠卷
+                            NET.request(API.takeBatchCoupon, params, 'POST').then(res => {
+                                if (res.code === '200') {
+                                    this.$emit('success')
+                                    this.$emit('closeAd')
+                                }
+                            }).catch(res => {
+                                if(res.data.code !== '200'){
+                                    uni.showToast({
+                                        title:res.data.message,
+                                        icon:"none"
+                                    })
+                                }
+                            })
+                        }
+                    } else {
+                        uni.showToast({
+                            title:'请先登录',
+                            icon:"none"
+                        })
+                        uni.navigateTo({
+                            url:'/pages_category_page2/userModule/login'
+                        })
+                    }
+                } else {
+                  this.$emit('closeAd')
+                }
+            },
+            // 领取优惠券回调
+            sendcoupon(e){
+                console.log('领取了微信卡券', e)
+                const errcode = e.detail.errcode,resultList = e.detail.send_coupon_result
+                switch (errcode) {
+                    case 'OK':
+                        break
+                    case 'PARAM_ERROR':
+                        console.log('参数错误,请开发者查看msg中具体的错误信息并进行修复处理')
+                        break
+                    case 'USER_NOT_EXISTS':
+                        console.log('登录态获取失效')
+                        break
+                    case 'USER_GET_FAILED':
+                        console.log('登录态获取失败')
+                        break
+                    case 'SIGN_ERROR':
+                        console.log('签名错误')
+                        break
+                    case 'SYSTEMERROR':
+                        console.log('发券超时')
+                        break
+                    case 'FREQUENCY_LIMITED':
+                        console.log('发券频率过高')
+                        break
+                }
+                if(errcode === 'OK'){
+                    resultList.forEach(item=>{
+                        let cName = ''
+                        this.couponList.forEach(citem=>{
+                            if(item.stock_id === citem.cardId){
+                                cName = citem.activityName
+                                if(item.code === 'SUCCESS'){
+                                    citem.couponCode = item.coupon_code
+                                    this.successList.push(citem)
+                                }
+                            }
+                        })
+                        switch (item.code) {
+                            case 'FAILED':
+                                console.log('该张券发券失败,查看message中的具体错误信息')
+                                break
+                            case 'NOTENOUGH':
+                                uni.showToast({
+                                    title:cName + '优惠券已被领取完',
+                                    icon:"none"
+                                })
+                                console.log('总预算用完')
+                                break
+                            case 'DAYLIMIT':
+                                uni.showToast({
+                                    title:cName + '优惠券领取张数已达到上限',
+                                    icon:"none"
+                                })
+                                console.log('用户达到单天限领')
+                                break
+                            case 'NATURELIMIT':
+                                uni.showToast({
+                                    title:cName + '优惠券领取张数已达到上限',
+                                    icon:"none"
+                                })
+                                console.log('用户自然人限领')
+                                break
+                            case 'MAXQUOTA':
+                                uni.showToast({
+                                    title:cName + '优惠券领取张数已达到上限',
+                                    icon:"none"
+                                })
+                                console.log('用户领取张数达到上限')
+                                break
+                            case 'DUPREQUEST':
+                                uni.showToast({
+                                    title:cName + '优惠券领取张数已达到上限',
+                                    icon:"none"
+                                })
+                                console.log('已通过该发券凭证给用户发券')
+                                break
+                            case 'NOTRUNNING':
+                                console.log('批次状态非运营中')
+                                break
+                            case 'EXPIRED':
+                                uni.showToast({
+                                    title:cName + '优惠券已过期',
+                                    icon:"none"
+                                })
+                                console.log('该批次已过期')
+                                break
+                            case 'NOTMONEY':
+                                console.log('账户余额不足')
+                                break
+                            case 'USERLIMIT':
+                                console.log('用户已超限领额度')
+                                break
+                            case 'FREQUENCYLIMIT':
+                                console.log('超过频率限制')
+                                break
+                        }
+                    })
+                    this.receiveCoupon()
+                } else {
+                    this.$emit('closeAd')
+                }
+            },
+            // 用户确认领券事件
+            userconfirm(e){
+                console.log('用户确认领券', e)
+            }
+        }
+    }
+</script>

+ 27 - 3
config/api.js

@@ -35,7 +35,11 @@ module.exports = {
 	WxAppLogin: WX_API_BASE + '/app/wxAppLogin', // APP微信登录
 
 
-
+	// 查询直播间列表
+	LiveRoomes: WX_API_BASE + '/canvas/selectLiveList',
+	SubScribeLive: WX_API_BASE + '/live/subscribeLive',
+	// 小程序客服查询
+	CustomerService: WX_API_BASE + '/kf/getAppletKf',
 
 
 	//分类
@@ -120,9 +124,11 @@ module.exports = {
 	SelectedCart: WX_API_BASE + '/cart/selected', //  选中商品
 	UpdateSkuCart: WX_API_BASE + '/cart/updateSku', //  购物车更换商品规格
 
-
 	//优惠券
+	getCoupons: WX_API_BASE + '/canvas/getCoupons', // 优惠券查询
 	ReceiveCoupon: WX_API_BASE + '/coupon/takeCoupon', //  领取优惠券
+	buildParam4Plug: WX_API_BASE + '/coupon/buildParam4Plug', //  领取优惠券
+
 
 	//分销中心
 	FindSaleStoreList: WX_API_BASE + '/distributor/getDistributorAll', //  分销中心列表查询
@@ -146,6 +152,7 @@ module.exports = {
 	CancelReturnGoods: WX_API_BASE + '/after/returnGoods', //  撤销退货
 	ShippingCompany: WX_API_BASE + '/order/getExpressSelect', //  选择快递公司查询
 	SendReturnGoods: WX_API_BASE + '/order/returnExpress', //  填写退货物流单
+	deleteAfter: WX_API_BASE + '/after/deleteAfter', //  删除售后记录
 
 	//申请分销员
 	Apply: WX_API_BASE + '/distributor/addDistributor', //  申请分销员
@@ -230,5 +237,22 @@ module.exports = {
 	selectProductListByPriceId: WX_API_BASE + '/product/selectProductListByPriceId', // 捆绑商品查询
 	// queryProductListBySession:				 WX_API_BASE + '/platform-seckill/queryProductListBySession' // 根据场次时间查询商品列表 /order/getOrderPolite
 	// 支付有礼
-	getOrderPolite: WX_API_BASE + '/order/getOrderPolite' // 支付有礼
+	getOrderPolite: WX_API_BASE + '/order/getOrderPolite', // 支付有礼
+	// 积分签到
+	creditSignIn: WX_API_BASE + '/credit/signIn', // 积分签到
+	exchangeCoupon: WX_API_BASE + '/credit/exchangeCoupon', // 积分兑换优惠券
+	selectByMonth: WX_API_BASE + '/credit/selectByMonth', // 根据月份查询签到记录
+	selectCreditCouponList: WX_API_BASE + '/credit/selectCreditCouponList', // 查询可以积分兑换的优惠券
+	selectCreditRecord: WX_API_BASE + '/credit/selectCreditRecord', // 查询积分记录
+
+	// 首页广告
+	GetAd: WX_API_BASE + '/advert/selectByCondition', //  获取首页广告
+	adClose: WX_API_BASE + '/advert/closeAdvert', //  关闭首页广告
+	takeBatchCoupon: WX_API_BASE + '/coupon/takeBatchCoupon', //  批量领取优惠券
+
+	// 渠道优惠券
+	getChannelCoupon: WX_API_BASE + '/coupon/getChannelCouponDetail', // 获取渠道优惠券
+	getChannelProduct: WX_API_BASE + '/credit/signIn', // 获取渠道优惠券推荐产品
+	getRandomProduct: WX_API_BASE + '/product/getRandomSortProduct', // 查询随机排序的商品
+
 }

+ 1 - 0
config/live.js

@@ -0,0 +1 @@
+export const liveAppid = 'wx2b03c6e691cd7370'

+ 2 - 0
config/subscribe.js

@@ -0,0 +1,2 @@
+// 直播通知订阅id
+export const startLiveTemplate = 'tn_0hfHg3PoINFXqdUpHAaC8PXPKCcMsKjSTRE1CQwY'

+ 21 - 3
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "cereshop",
-    "appid" : "__UNI__BA992F9",
+    "appid" : "__UNI__FF9597B",
     "description" : "cereshop",
     "versionName" : "1.5.0",
     "versionCode" : 150,
@@ -9,6 +9,10 @@
         "kernel" : {
             "ios" : "WKWebview"
         },
+        "optimization" : {
+            "subPackages" : true // 小程序 开启分包优化
+        },
+        "runmode" : "liberate", // 开启分包优化后,必须配置资源释放模式
         "usingComponents" : true,
         "compilerVersion" : 3,
         /* 5+App特有相关 */
@@ -121,8 +125,22 @@
             "postcss" : true,
             "minified" : false
         },
-        "usingComponents" : true,
-        "permission" : {}
+        // "usingComponents" : true,
+        "component" : true,
+        "permission" : {},
+        "plugins" : {
+            // 卡券
+            "sendCoupon" : {
+                "version" : "latest",
+                "provider" : "wxf3f436ba9bd4be7b"
+            },
+            // 直播
+            "live-player-plugin" : {
+                // "version": "1.3.2", // 注意该直播组件最新版本号,微信开发者工具调试时可获取最新版本号
+                "version" : "latest",
+                "provider" : "wx2b03c6e691cd7370"
+            }
+        }
     },
     "mp-alipay" : {
         "appid" : "2021002142606276"

+ 239 - 159
pages.json

@@ -52,14 +52,14 @@
 				}
 			}
 			,{
-			    "path" : "discount/discount",
-			    "style" :
-			    {
-			        "navigationBarTitleText": "限时折扣专区",
+				"path" : "discount/discount",
+				"style" :
+				{
+					"navigationBarTitleText": "限时折扣专区",
 					"navigationBarBackgroundColor": "#333333",
 					"backgroundColor": "#333333",
 					"navigationBarTextStyle": "white"
-			    }
+				}
 			},
 			{
 				"path" : "discount/platformDiscount",
@@ -79,6 +79,45 @@
 					"backgroundColor": "#333333",
 					"navigationBarTextStyle": "white"
 				}
+			},{
+				"path" : "integral/index",
+				"style" :
+				{
+					"navigationBarTitleText": "我的积分",
+					"navigationBarBackgroundColor": "#333333",
+					"backgroundColor": "#333333",
+					"navigationBarTextStyle": "white"
+				}
+			},{
+				"path" : "integral/exchangeDetail",
+				"style" :
+				{
+					"navigationBarTitleText": "积分兑换",
+					"navigationBarBackgroundColor": "#333333",
+					"backgroundColor": "#333333",
+					"navigationBarTextStyle": "white"
+				}
+			},{
+				"path" : "integral/sign",
+				"style" :
+				{
+					"navigationBarTitleText": "签到领积分",
+					"navigationBarBackgroundColor": "#333333",
+					"backgroundColor": "#333333",
+					"navigationBarTextStyle": "white"
+				}
+			},{
+				"path" : "coupon/list",
+				"style" :
+				{
+					"navigationBarTitleText": "优惠券"
+				}
+			},{
+				"path" : "coupon/product",
+				"style" :
+				{
+					"navigationBarTitleText": "可用商品"
+				}
 			},{
 				"path" : "goodsModule/combination",
 				"style" :
@@ -230,33 +269,13 @@
 				"style": {
 					"navigationBarTitleText": "填写退货物流"
 				}
-			}, {
-				"path": "orderModule/refundDetails",
-				"style": {
-					"navigationBarTitleText": "退款详情",
-					"navigationBarBackgroundColor": "#333333",
-					"backgroundColor": "#333333",
-					"navigationBarTextStyle": "white"
-				}
-			}, {
+			},{
 				"path": "orderModule/Intervene",
 				"style": {
 					"navigationBarTitleText": "平台介入"
 				}
-			}, {
-				"path": "orderModule/returnDetails",
-				"style": {
-					"navigationBarTitleText": "退货详情",
-					"navigationBarBackgroundColor": "#333333",
-					"backgroundColor": "#333333",
-					"navigationBarTextStyle": "white"
-				}
-			}, {
-				"path": "orderModule/afterSale",
-				"style": {
-					"navigationBarTitleText": "我的售后"
-				}
-			}, {
+			},
+			{
 				"path": "distributionModule/index",
 				"style": {
 					"navigationBarTitleText": "分销中心",
@@ -317,14 +336,6 @@
 					"backgroundColor": "#333333",
 					"navigationBarTextStyle": "white"
 				}
-			}, {
-				"path": "distributionModule/distributionOrder",
-				"style": {
-					"navigationBarTitleText": "我的分销订单",
-					"navigationBarBackgroundColor": "#333333",
-					"backgroundColor": "#333333",
-					"navigationBarTextStyle": "white"
-				}
 			}, {
 				"path": "distributionModule/promotion",
 				"style": {
@@ -357,23 +368,21 @@
 				}
 			},
 			{
-			    "path" : "goodsModule/invitePoster",
-			    "style" :
-			    {
-			        "navigationBarTitleText": "生成邀请海报"
-			        // "enablePullDownRefresh": false
-			    }
+				"path" : "goodsModule/invitePoster",
+				"style" :
+				{
+					"navigationBarTitleText": "生成邀请海报"
+				}
 			},
 			{
-			    "path" : "goodsModule/inviteSpell",
-			    "style" :
-			    {
-			        "navigationBarTitleText": "邀请好友拼单",
-			        "enablePullDownRefresh": false,
+				"path" : "goodsModule/inviteSpell",
+				"style" : {
+					"navigationBarTitleText": "邀请好友拼单",
+					"enablePullDownRefresh": false,
 					"navigationBarBackgroundColor": "#333333",
 					"backgroundColor": "#333333",
 					"navigationBarTextStyle": "white"
-			    }
+				}
 			},
 			{
 				"path" : "linkOthers/index",
@@ -442,129 +451,200 @@
 					"navigationBarTextStyle": "white"
 				}
 			},
-			 {
-			     "path" : "userModule/collection",
-			     "style" :
-			     {
-			         "navigationBarTitleText": "我的收藏",
-			         "enablePullDownRefresh": false,
-			 		"app-plus":{
-			 		      "bounce":"none"
-			 		}
-			     }
-
-			 }
-			 ,{
-			     "path" : "userModule/footprintList",
-			     "style" :
-			     {
-			         "navigationBarTitleText": "浏览足迹",
-			         "enablePullDownRefresh": false,
-			 		"app-plus":{
-			 		      "bounce":"none"
-			 		}
-			     }
-
-			 }
-			 ,{
-			     "path" : "userModule/questionList",
-			     "style" :
-			     {
-			         "navigationBarTitleText": "我的问答",
-			         "enablePullDownRefresh": false,
-			 		"app-plus":{
-			 		    "bounce":"none"
-			 		}
-			     }
-
-			 },
-			 {
-			 	"path": "userModule/personalDetails",
-			 	"style": {
-			 		"navigationBarTitleText": "个人信息"
-			 	}
-			 }, {
-			 	"path": "userModule/coupon",
-			 	"style": {
-			 		"navigationBarTitleText": "我的卡券"
-			 	}
-			 },
-			 {
-			 	"path": "userModule/login",
-			 	"style": {
-					"navigationStyle": "custom",
-			 		"navigationBarTitleText": "登录"
-			 	}
-			 },
-			 {
-			 	"path": "userModule/protocol",
-			 	"style": {
-			 		"navigationBarTitleText": "《cereshop》商城用户协议"
-			 	}
-			 }, {
-			 	"path": "userModule/register",
-			 	"style": {
-			 		"navigationBarTitleText": "注册"
-			 	}
-			 },
-			 {
-			 	"path": "userModule/memberAccount",
-			 	"style": {
-			 		"navigationBarTitleText": "我的账户",
+			{
+				"path" : "userModule/collection",
+				"style" :{
+						"navigationBarTitleText": "我的收藏",
+						"enablePullDownRefresh": false,
+						"app-plus":{
+									"bounce":"none"
+						}
+				}
+			},
+			{
+					"path" : "userModule/footprintList",
+					"style" :
+					{
+						"navigationBarTitleText": "浏览足迹",
+						"enablePullDownRefresh": false,
+						"app-plus":{
+							"bounce":"none"
+						}
+					}
+			},
+			{
+				"path" : "userModule/questionList",
+				"style" :
+				{
+					"navigationBarTitleText": "我的问答",
+					"enablePullDownRefresh": false,
+					"app-plus":{
+						"bounce":"none"
+					}
+				}
+			},
+			{
+			"path": "userModule/personalDetails",
+			"style": {
+				"navigationBarTitleText": "个人信息"
+			}
+			}, {
+			"path": "userModule/coupon",
+			"style": {
+				"navigationBarTitleText": "我的卡券"
+			}
+			},
+			{
+				"path": "orderModule/afterSale",
+				"style": {
+					"navigationBarTitleText": "我的售后"
+				}
+			},
+			{
+				"path": "orderModule/returnDetails",
+				"style": {
+					"navigationBarTitleText": "退货详情",
+					"navigationBarBackgroundColor": "#333333",
+					"backgroundColor": "#333333",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "orderModule/refundDetails",
+				"style": {
+					"navigationBarTitleText": "退款详情",
+					"navigationBarBackgroundColor": "#333333",
+					"backgroundColor": "#333333",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+			"path": "userModule/login",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "登录"
+			}
+			},
+			{
+			"path": "userModule/protocol",
+			"style": {
+				"navigationBarTitleText": "《cereshop》商城用户协议"
+			}
+			}, {
+			"path": "userModule/register",
+			"style": {
+				"navigationBarTitleText": "注册"
+			}
+			},
+			{
+			"path": "userModule/memberAccount",
+			"style": {
+				"navigationBarTitleText": "我的账户",
+				"navigationBarBackgroundColor": "#333333",
+				"backgroundColor": "#333333",
+				"navigationBarTextStyle": "white"
+			}
+			},
+			{
+				"path": "distributionModule/distributionOrder",
+				"style": {
+					"navigationBarTitleText": "我的分销订单",
 					"navigationBarBackgroundColor": "#333333",
 					"backgroundColor": "#333333",
 					"navigationBarTextStyle": "white"
 				}
-			 }, {
-			 	"path": "userModule/withdraw",
-			 	"style": {
-			 		"navigationBarTitleText": "提现"
-			 	}
-			 },
-			 // {
-			 // 	"path": "userModule/u-city-select",
-			 // 	"style": {}
-			 // }, {
-			 // 	"path": "userModule/u-bank-select",
-			 // 	"style": {}
-			 // },
-			 {
-			 	"path": "userModule/messageCenter",
-			 	"style": {
-			 		"navigationBarTitleText": "消息中心"
-			 	}
-			 }, {
-			 	"path": "userModule/messageDetail",
-			 	"style": {
-			 		"navigationBarTitleText": "公告详情"
-			 	}
-			 },
-			 {
-			     "path" : "userModule/bindPhone",
-			     "style" :
-			     {
-			         "navigationBarTitleText": "绑定手机号",
-			         "enablePullDownRefresh": false
-			     }
+			},
+			{
+			"path": "userModule/withdraw",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+			},
+			// {
+			// 	"path": "userModule/u-city-select",
+			// 	"style": {}
+			// }, {
+			// 	"path": "userModule/u-bank-select",
+			// 	"style": {}
+			// },
+			{
+			"path": "userModule/messageCenter",
+			"style": {
+				"navigationBarTitleText": "消息中心"
+			}
+			}, {
+			"path": "userModule/messageDetail",
+			"style": {
+				"navigationBarTitleText": "公告详情"
+			}
+			},
+			{
+					"path" : "userModule/bindPhone",
+					"style" :
+					{
+							"navigationBarTitleText": "绑定手机号",
+							"enablePullDownRefresh": false
+					}
 
-			 },
-			 {
-			     "path" : "userModule/mobilePhone",
-			     "style" :
-			     {
-			         "navigationBarTitleText": "手机号授权",
-			         "enablePullDownRefresh": false
-			     }
+			},
+			{
+				"path" : "userModule/mobilePhone",
+				"style" :
+				{
+					"navigationBarTitleText": "手机号授权",
+					"enablePullDownRefresh": false
+				}
+			},
+			{
+				"path": "livePage/index",
+				"style": {
+					"navigationBarTitleText": "直播推荐",
+					"navigationBarBackgroundColor": "#333333",
+					"backgroundColor": "#333333",
+					"navigationBarTextStyle": "white",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path" : "channelCoupon/index",
+				"style" :
+				{
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
 
-			 }
+			}
 		]
 	}],
-
+	// 配置文档 https://uniapp.dcloud.io/collocation/pages?id=subpackages
+	"preloadRule": {
+		"pages_category_page1/search/index/index": {
+			"network": "all",
+			"packages": ["pages_category_page1"]
+		},
+		"pages_category_page1/goodsModule/inviteSpell": {
+			"network": "all",
+			"packages": ["pages_category_page1"]
+		},
+		"pages_category_page1/goodsModule/invitePoster": {
+			"network": "all",
+			"packages": ["pages_category_page1"]
+		},
+		"pages_category_page1/orderModule/orderDetails": {
+			"network": "all",
+			"packages": ["pages_category_page1"]
+		}
+	},
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "cereshop",
 		"navigationBarBackgroundColor": "#fff",
-		"backgroundColor": "#F8F8F8"
+		"backgroundColor": "#F8F8F8",
+		"mp-weixin": {
+			"usingComponents": {
+				"send-coupon": "plugin://sendCoupon/send-coupon"
+			}
+		}
 	},
 	"tabBar": {
 		"borderStyle": "black",

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 463 - 457
pages/tabbar/cart/index.vue


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

@@ -10,7 +10,7 @@
 					{{item.classifyName}}
 				</view>
 			</scroll-view>
-			<scroll-view v-if="slist.length > 0"  scroll-with-animation scroll-y class="right-aside">
+			<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">
 			  <image class="emptyOrder-img" src="../../../static/images/classRight.png"></image>
@@ -25,7 +25,7 @@
 					</view>
 				</view>
 			</scroll-view>
-			<view v-else class="emptyOrder-box flex-items-plus flex-column">
+			<view v-if="ifEmpty" class="emptyOrder-box flex-items-plus flex-column">
 				<image class="emptyOrder-img" src="../../../static/img/bgnull.png"></image>
 				<label class="font-color-999 fs26 mar-top-30">该分类没有商品~</label>
 			</view>
@@ -44,7 +44,8 @@
 				currentIndex: 0,
 				currentId:'',
 				flist: [],
-				slist: []
+				slist: [],
+        ifEmpty: false
 			}
 		},
 		onLoad() {
@@ -53,6 +54,7 @@
 		methods: {
 			loadData(){
 				uni.showLoading({
+          mask: true,
 					title:'加载中...'
 				})
 				NET.request(API.FindCategoryListByDepth, {
@@ -68,6 +70,7 @@
 			},
 			getChildCategory(){
 				uni.showLoading({
+          mask: true,
 					title:'加载中...'
 				})
 				NET.request(API.FindCategoryListByDepth,{
@@ -75,6 +78,9 @@
 				},'GET').then(res => {
 					uni.hideLoading()
 					this.slist = res.data
+          if (this.slist.length === 0) {
+            this.ifEmpty = true
+          }
 				}).catch(res => {
 					uni.hideLoading()
 				})

+ 175 - 99
pages/tabbar/index/index.vue

@@ -1,42 +1,76 @@
 <template>
-	<div class="" :class="'terminal' + terminal">
-		<view class="header">
-			<view class="topBox">
-				<image class="logo" src="@/static/assets/img/logo.png" mode="widthFix"></image>
-				<view class="search-btn" @click="searchPro">
-					<image class="search-icon" src="@/static/img/search.png" mode="widthFix"></image>
-				</view>
-			</view>
-			<category-list @tabChange='tabChange'></category-list>
-		</view>
+	<div>
+    <!-- #ifdef MP-WEIXIN -->
+    <view class="header weiXinBox" :style="{'padding-top': topHeight + 'px'}">
+      <view class="topBox" :style="{'height': height + 'px'}">
+        <image class="logo" src="@/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="@/static/images/searchImg.png" mode="widthFix"></image>
+        <text>请输入您想要的宝贝</text>
+      </view>
+    </view>
+    <!-- #endif -->
+    <!-- #ifdef H5 || APP-PLUS -->
+    <view class="header">
+      <view class="topBox">
+        <image class="logo" src="@/static/assets/img/logo.png" mode="widthFix"></image>
+        <view class="search-btn" @click="searchPro">
+          <image class="search-icon" src="@/static/img/search.png" mode="widthFix"></image>
+        </view>
+      </view>
+    </view>
+    <!-- #endif -->
+    <category-list @tabChange='tabChange'></category-list>
 		<canvas-page v-if="activeTab==0" :terminal="terminal" :typeId="1"></canvas-page>
 		<category-show v-else :categoryid="categoryid"></category-show>
+    <ad-window ref="adWindow" :triggerCondition="1"></ad-window>
+		<view class="reachBottom" v-if="topLeft > 400">
+			<image class="reach-icon" src="@/static/img/reachBottom.png" mode="widthFix"></image>
+			<text class="reach-text">这里到底了哦~~</text>
+		</view>
 	</div>
 </template>
 
 <script>
-	const API = require('../../../config/api')
+	import AdWindow from "@/components/adWindow";
+  const API = require('../../../config/api')
 	import CategoryList from "@/components/basics/categoryList.vue"
 	import CategoryShow from "@/components/basics/categoryShow.vue"
 	import canvasPage from '@/components/canvasShow/canvasShowPage.vue'
+
 	export default {
 		components: {
+      AdWindow,
 			CategoryList,
 			CategoryShow,
-			canvasPage
+			canvasPage,
 		},
 		data() {
 			return {
 				terminal: API.terminal,
 				activeTab: 0,
-				categoryid: 0
+				categoryid: 0,
+        topHeight: 0,
+        height: 0,
+				topLeft: 0
 			}
 		},
+		onShow() {
+      let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+      this.topHeight = menuButtonInfo.top + 10
+      this.height = menuButtonInfo.height
+            this.$refs.adWindow.getAd()
+    },
+		onPageScroll(e) {
+			this.topLeft = e.scrollTop
+		},
 		methods: {
 			tabChange(index, id) {
 				this.activeTab = index
 				this.categoryid = id
-				console.log(index, id)
 			},
 			// 查询产品
 			searchPro(key, type) {
@@ -49,111 +83,153 @@
 </script>
 
 <style lang="scss" scoped>
-	.header {
-		.topBox {
-			padding-top: 90rpx;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			width: 100%;
-		}
-		.logo {
-			width: 280rpx;
-			height: 42rpx;
-			// margin-left: 30rpx;
-		}
-
-		.search-btn {
-			height: 66rpx;
-			background: rgba(255, 255, 255, 1);
-			border-radius: 33rpx;
-			display: flex;
-			flex-direction: row;
-			align-items: center;
-			margin-right: 30rpx;
+.header {
+	.toLive{
+		height: 40px;
+		color: #FFF;
+		background-color: #333;
+	}
+	.topBox {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		width: 100%;
+	}
+	.logo {
+		width: 280rpx;
+		height: 42rpx;
+		margin-top: -40rpx;
+		// margin-left: 30rpx;
+	}
 
-			.search-icon {
-				width: 60rpx;
-				height: 60rpx;
-				// margin-left: 33rpx;
-			}
+	.search-btn {
+		height: 66rpx;
+		background: rgba(255, 255, 255, 1);
+		border-radius: 33rpx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		margin-right: 30rpx;
 
-			.search-word {
-				font-size: 26rpx;
-				font-weight: 400;
-				color: rgba(153, 153, 153, 1);
-				margin-left: 10rpx;
-			}
+		.search-icon {
+			width: 60rpx;
+			height: 60rpx;
+			// margin-left: 33rpx;
 		}
 
-		.tabs-nav-warp {
-			margin-top: 20rpx;
-			padding: 0 30rpx;
+		.search-word {
+			font-size: 26rpx;
+			font-weight: 400;
+			color: rgba(153, 153, 153, 1);
+			margin-left: 10rpx;
 		}
+	}
 
-		.tabs-nav {
-			.ul {
-				display: flex;
-
-				.li {
-					flex: 1 0 auto;
-					margin-left: 36rpx;
-					font-size: 30rpx;
-					color: #999999;
-					position: relative;
-					padding-bottom: 18rpx;
+	.tabs-nav-warp {
+		margin-top: 20rpx;
+		padding: 0 30rpx;
+	}
 
-					&:first-child {
-						margin-left: 0;
-					}
+	.tabs-nav {
+		.ul {
+			display: flex;
 
-					&.on {
-						&:after {
-							content: '';
-							width: 100%;
-							height: 4rpx;
-							background: #C5AA7B;
-							position: absolute;
-							left: 0;
-							bottom: 0;
-						}
+			.li {
+				flex: 1 0 auto;
+				margin-left: 36rpx;
+				font-size: 30rpx;
+				color: #999999;
+				position: relative;
+				padding-bottom: 18rpx;
 
-						font-weight:bold;
-					}
+				&:first-child {
+					margin-left: 0;
 				}
-			}
-		}
-	}
 
-	.terminal1 {
-		padding-top: 80upx;
-
-		.header {
-			.topBox {
-				// justify-content: left;
-
-				.search-btn {
-					.search-icon {
-						margin-left: 0rpx;
+				&.on {
+					&:after {
+						content: '';
+						width: 100%;
+						height: 4rpx;
+						background: #C5AA7B;
+						position: absolute;
+						left: 0;
+						bottom: 0;
 					}
+
+					font-weight:bold;
 				}
 			}
 		}
 	}
-  .topTitle {
+}
+.weiXinBox {
+  width: 100%;
+  position: fixed;
+  background: #FFFFFF;
+  z-index: 99;
+}
+.wxBtnBg {
+  padding: 0 20rpx;
+  .weiXinBoxBtn {
     display: flex;
-    justify-content: center;
     align-items: center;
-    height: 100rpx;
+    padding: 10rpx 0 10rpx 15rpx;
     width: 100%;
-    .topText {
-      text-align: center;
-      color: #000000;
-      font-size: 38rpx;
-      font-weight: bold;
+    background: #F3F4F5;
+    opacity: 1;
+    .search-icon {
+      width: 50rpx;
+      height: 50rpx;
+      margin-right: 20rpx;
+    }
+    text {
+      color: #999999;
     }
   }
-	.terminal2 {}
+}
+.terminal1 {
+	.header {
+		.topBox {
+			// justify-content: left;
 
-	.terminal3 {}
+			.search-btn {
+				.search-icon {
+					margin-left: 0rpx;
+				}
+			}
+		}
+	}
+}
+.topTitle {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100rpx;
+  width: 100%;
+  .topText {
+    text-align: center;
+    color: #000000;
+    font-size: 38rpx;
+    font-weight: bold;
+  }
+}
+.terminal2 {}
+
+.terminal3 {}
+// 触底样式
+.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>

+ 88 - 11
pages/tabbar/user/index.vue

@@ -24,7 +24,7 @@
 					<view class="user-logoin-title" v-else>{{infoitem.phone}}</view>
 					<view class="experience flex-items" @click="goToMemberCenter">
 						<label>成长值</label>
-						<view class="experienceValue">{{useritem.growth}} / {{useritem.nextLevelGrowth}}</view>
+						<view class="experienceValue">{{useritem.growth || 0}} / {{useritem.nextLevelGrowth || 0}}</view>
 					</view>
 				</view>
 				<view class="notice" @click="toMessage">
@@ -125,6 +125,31 @@
 					<image class="item-btn-icon" src="../../../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="../../../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="../../../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="../../../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="../../../static/img/user/service.png" mode="widthFix"></image>
+						<view class="item-btn-text">平台客服</view>
+					</view> -->
+				<button open-type="contact" class="item-btn btnNone">
+					<image class="item-btn-icon" src="../../../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="../../../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="../../../static/img/user/kaquan.png" mode="widthFix"></image>-->
 <!--          <view class="item-btn-text">测试</view>-->
@@ -147,7 +172,10 @@
 			return {
 				item: {},
 				infoitem: {},
-				useritem: {}
+				useritem: {},
+				isLoading: false,
+				corpId: null,
+				serviceURL: null,
 			}
 		},
 		onLoad() {},
@@ -164,6 +192,13 @@
       //     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({
@@ -283,19 +318,18 @@
 				})
 				// #endif
 				// #ifdef MP-WEIXIN
-				console.log('wx test')
-				var url = API.SettledMerchantPrefix + `/#/?username=${username}&user=${token}`
+				var url = API.SettledMerchantPrefix
 				uni.navigateTo({
-					url: `../../../pages_category_page1/linkOthers/index?url=${url}`
+					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 + `/#/?username=${username}&user=${token}`
+				var url = API.SettledMerchantPrefix
 				uni.navigateTo({
-					url: `../../../pages_category_page1/linkOthers/index?url=${url}`
+          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'
@@ -347,7 +381,7 @@
 					})
 				} else {
 					uni.navigateTo({
-						url: '../../../pages_category_page1/orderModule/afterSale'
+						url: '../../../pages_category_page2/orderModule/afterSale'
 					})
 				}
 			},
@@ -363,6 +397,41 @@
 					})
 				}
 			},
+      // 我的积分
+      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, {
@@ -384,7 +453,7 @@
 						url: '../../../pages_category_page1/orderModule/index?type=' + type
 					})
 				}
-			}
+			},
 		}
 	}
 </script>
@@ -511,7 +580,7 @@
 
 			.order-box {
 				width: 690upx;
-				height: 196upx;
+				height: 196upx !important;
 				background: rgba(255, 255, 255, 1);
 				box-shadow: 0px 0px 10upx 0px rgba(51, 51, 51, 0.1);
 				display: flex;
@@ -566,7 +635,7 @@
 
 				.item-btn-icon {
 					width: 90upx;
-					height: 90upx;
+					height: 90upx !important;
 				}
 
 				.item-btn-text {
@@ -595,6 +664,14 @@
 				}
 
 			}
+			.btnNone{
+				margin: 0;
+				padding: 0;
+				line-height: normal;
+				&::after{
+					display: none;
+				}
+			}
 
 			.mt20 {
 				margin-top: 20upx;

+ 1 - 1
pages_category_page1/activity.vue

@@ -90,7 +90,7 @@
 	}
 </script>
 
-<style lang="less" scoped>
+<style lang="scss" scoped>
 	page {
 		background-color: #FBE7E0;
 	}

+ 214 - 0
pages_category_page1/coupon/list.vue

@@ -0,0 +1,214 @@
+<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>
+          <view class="priceValue">{{item.reduceMoney}}{{item.discountMode === 1 ? '' : '折'}}</view>
+        </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>
+          <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="getCouponList" :couponList="[item]">
+              <view class="exchangeBtn fs24 font-color-FFF">{{item.ifCredit?'立即兑换':'立即领取'}}</view>
+            </wx-send-coupon>
+          </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="@/static/img/reachBottom.png" mode="widthFix"></image>
+      <text class="reach-text">这里到底了哦~~</text>
+    </view>
+  </view>
+</template>
+
+<script>
+
+import WxSendCoupon from "../../components/wx/wxSendCoupon";
+const NET = require('../../utils/request')
+const API = require('../../config/api')
+export default {
+  name: "list",
+  components: {WxSendCoupon},
+  data() {
+    return {
+      couponList: [], // 优惠券列表getCoupons
+      page: 1,
+      pageSize: 10,
+      loadingType: 0,
+      topLeft: 0
+    }
+  },
+  onLoad () {
+    this.getCouponList()
+  },
+  onReachBottom (){
+    if (this.loadingType == 1) {
+      uni.stopPullDownRefresh()
+    }else{
+      this.page = this.page + 1
+      this.getCouponList()
+    }
+  },
+  onPageScroll(e) {
+    this.topLeft = e.scrollTop
+  },
+  methods: {
+    getCouponList() {
+      // uni.showLoading({
+      //   mask: true,
+      //   title: '加载中...'
+      // })
+      NET.request(API.getCoupons, {
+        page: this.page,
+        pageSize: this.pageSize
+      }, 'GET').then(res => {
+        uni.hideLoading()
+        if (res.data.list.length === 0) {
+          this.loadingType = 1
+        } else {
+          this.couponList = this.couponList.concat(res.data.list)
+          this.$forceUpdate()
+        }
+      }).catch(res => {
+        uni.hideLoading()
+      })
+    },
+    // 跳转到可用商品列表
+    goProductList (item) {
+      console.log(item, 'test')
+      uni.navigateTo({
+        url: `../coupon/product?id=${item.couponId}`
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+page {
+  background: #F8F8F8;
+  .couponList {
+    padding: 0 20rpx 40upx;
+    margin-top: 30rpx;
+    .couponItem {
+      background: #333333;
+      margin-top: 40rpx;
+      padding: 25rpx 35rpx;
+      overflow: hidden;
+      background-image: url("../../static/images/borderIcon.png");
+      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;
+          top: -50rpx;
+          width: 32rpx;
+          height: 32rpx;
+          background: #FFFFFF;
+          border-radius: 50%;
+        }
+        .bottomIcon {
+          position: absolute;
+          right: -16rpx;
+          bottom: -50rpx;
+          width: 32rpx;
+          height: 32rpx;
+          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;
+            }
+          }
+        }
+      }
+    }
+  }
+  .Put-box1 {
+    .btn {
+      text-align: center;
+      margin-top: 40rpx;
+      border: 2rpx solid #333333;
+      height: 80upx;
+      line-height: 80upx;
+      width: 100%;
+      color: #333333;
+    }
+    .submit {
+      background-color: #333333;
+      color: #FFEBC4;
+      margin-left: 20rpx;
+    }
+  }
+}
+// 触底样式
+.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>

+ 182 - 0
pages_category_page1/coupon/product.vue

@@ -0,0 +1,182 @@
+<template>
+  <view class="couponProduct">
+    <view class="productList">
+      <view class="couponTit flex-items">
+        <image src="../../static/images/counponTitIcon.png"></image>
+        <text class="fs24 font-color-C83732" v-if="currentCoupon.discountMode === 1">以下商品使用满{{currentCoupon.fullMoney}}元减{{currentCoupon.reduceMoney}}元的优惠券</text>
+        <text class="fs24 font-color-C83732" v-else>以下商品使用满{{currentCoupon.fullMoney}}打{{currentCoupon.reduceMoney}}折</text>
+      </view>
+      <view class="productListBox">
+        <view v-if="!ifEmpty" class="productItemBox mar-top-30">
+          <view class="productItem"
+            v-for="(item, index) of productList"
+            :key="item.productId"
+            @click="goodsDateils(item.shopId,item.productId,item.skuId)"
+          >
+            <view class="productImg">
+              <image :src="item.image"></image>
+            </view>
+            <view class="productTit fs28 font-color-333">{{item.productName}}</view>
+            <view class="productPrice font-color-C83732 fs40">¥{{item.price}}</view>
+          </view>
+        </view>
+        <view v-if="ifEmpty" class="emptyOrder-box flex-items-plus flex-column">
+          <image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
+          <label class="font-color-999 fs26 mar-top-30">暂无可用商品~</label>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import NET from "../../utils/request";
+import API from "../../config/api";
+
+export default {
+  name: "productLIst",
+  data() {
+    return {
+      productList: [],
+      page: 1,
+      pageSize: 10,
+      loadingType: 0,
+      currentCoupon: {},
+      cid: 0,
+      ifEmpty: false
+    }
+  },
+  onReachBottom(){
+    if(this.loadingType == 1){
+      uni.stopPullDownRefresh()
+    }else{
+      this.page = this.page + 1
+      this.getProductList()
+    }
+  },
+  onLoad(options) {
+    console.log(options,'options')
+    if (options.id) {
+      this.cid = options.id
+      this.getCoupon()
+      this.getProductList()
+    }
+  },
+  methods: {
+    getCoupon(){
+      NET.request(API.getCoupons, {
+        page:1,
+        pageSize: 1,
+        ids: this.cid
+      },'GET').then(res => {
+        if(res.data){
+          this.currentCoupon = res.data.list[0]
+        }
+      }).catch(res => {
+
+      })
+    },
+    getProductList() {
+      uni.showLoading({
+        title: '加载中...',
+      })
+      NET.request(API.getCouponProducts, {
+        activityId: this.cid,
+        page: this.page,
+        pageSize: this.pageSize
+      }, 'GET').then(res => {
+        uni.hideLoading()
+        if (res.data.list.length === 0) {
+          this.loadingType = 1
+        } else {
+          this.productList = this.productList.concat(res.data.list)
+        }
+        if (this.productList.length === 0) {
+          this.ifEmpty = true
+        }
+      }).catch(res => {
+        uni.hideLoading()
+      })
+    },
+    // 商品详情
+    goodsDateils(shopId, productId, skuId){
+      uni.navigateTo({
+        url: '/pages_category_page1/goodsModule/goodsDetails?shopId='+shopId + '&productId='+productId +'&skuId='+skuId
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+page {
+  background: #FFFFFF;
+}
+.couponProduct {
+  padding: 0 20rpx;
+  .productList {
+    .couponTit {
+      padding: 0 20rpx;
+      height: 86rpx;
+      background: #F9F6F1;
+      image {
+        width: 66rpx;
+        height: 46rpx;
+        margin-right: 15rpx;
+      }
+    }
+  }
+}
+.productListBox{
+  .productItemBox {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    width: 100%;
+    .productItem {
+      padding: 0 20rpx;
+      height: 420rpx;
+      flex: 1;
+      margin: 0 20rpx 20rpx 0;
+      width: calc((100% - 20rpx) / 2);
+      min-width: calc((100% - 20rpx) / 2);
+      max-width: calc((100% - 20rpx) / 2);
+      &:nth-child(2n) {
+        margin-right: 0;
+      }
+      .productImg {
+        width: 325rpx;
+        height: 325rpx;
+        image {
+          width: 100%;
+          height: 100%;
+        }
+      }
+      .productTit {
+        overflow:hidden;
+        text-overflow:ellipsis;
+        white-space:nowrap;
+      }
+      .productPrice {
+        margin-top: 15rpx;
+      }
+    }
+  }
+  .emptyOrder-box{
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    .emptyOrder-img{
+      width: 325rpx;
+      height: 325rpx;
+      image {
+        width: 100%;
+        height: 100%;
+      }
+    }
+  }
+}
+</style>

+ 1 - 1
pages_category_page1/discount/discount.vue

@@ -282,7 +282,7 @@ page {
     .discountBg {
       width: 100%;
       height: 480rpx;
-      background: url("../../static/images/discount.png") no-repeat left top;
+      background: url("https://ceres.zkthink.com/static/images/discount.png") no-repeat left top;
       background-size: contain;
       position: relative;
       .discountInfoBox {

+ 39 - 24
pages_category_page1/discount/groupBuy.vue

@@ -36,8 +36,10 @@
 		   <img :src="item.image">
 		 </view>
        <view class="itemInfo">
-         <p>{{item.productName}}</p>
-         <view class="number" v-if="item.limitNumber">限量{{item.limitNumber}}件 / 剩余{{item.limitStockNumber}}件</view>
+         <view class="title">
+           <p>{{item.productName}}</p>
+           <view class="number" v-if="item.limitNumber">限量{{item.limitNumber}}件 / 剩余{{item.limitStockNumber}}件</view>
+         </view>
          <view class="originalPrice">原价: ¥{{item.originalPrice}}</view>
          <view class="price">
            <view class="currentPrice flex-row-plus flex-items-plus font-color-FF7800">
@@ -57,7 +59,10 @@
            </view>
          </view>
        </view>
-
+     </view>
+     <view v-if="ifEmpty" class="emptyOrder-box flex-items-plus flex-column">
+       <image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
+       <label class="font-color-999 fs26 mar-top-30">暂无活动商品~</label>
      </view>
    </view>
  </view>
@@ -83,7 +88,8 @@ export default {
 			volume:1,//销量
 			shopShowType:false,
 			selectIndex:0,
-      sortIndex: 0
+      sortIndex: 0,
+      ifEmpty: false
 		}
 	},
 	onLoad(options) {
@@ -171,6 +177,9 @@ export default {
 			})
 		},
 		getGroupBuylist(){
+      uni.showLoading({
+        title: '加载中...',
+      })
       let param = {
         page:this.page,
         pageSize:this.pageSize,
@@ -180,19 +189,20 @@ export default {
         volume:this.volume
       }
 			NET.request(API.getGroupBuyList,param,'GET').then(res => {
-				console.log(res,123456)
-
+        uni.hideLoading()
 				if(res.data.page.list.length == 0){
 					this.loadingType = 1
 					this.page = this.page
 				}else{
 					this.groupBuy = this.groupBuy.concat(res.data.page.list)
+          if (this.groupBuy.length === 0) {
+            this.ifEmpty = true
+          }
 				}
 				if(this.shopShowType == false){
 					this.dateformat(res.data.time)
 					this.countDown()
 				}
-				console.log(this.groupBuy,2222)
 			}).catch(res => {
 				uni.showToast({
 					title:'失败',
@@ -335,6 +345,9 @@ page {
       }
       .itemInfo {
         flex: 1;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
         .iconBox {
           image {
             width: 58rpx;
@@ -354,15 +367,17 @@ page {
           line-clamp: 2;
           -webkit-box-orient: vertical;
         }
-        .number {
-          color: #C5AA7B;
-          font-size: 26rpx;
-          height: 40rpx;
-          background: #FFFFFF;
-          border: 2rpx solid #E4E5E6;
-          font-weight: 400;
-          display: inline;
-          padding: 0 5rpx;
+        .tilte{
+          .number {
+            color: #C5AA7B;
+            font-size: 26rpx;
+            height: 40rpx;
+            background: #FFFFFF;
+            border: 2rpx solid #E4E5E6;
+            font-weight: 400;
+            display: inline;
+            padding: 0 5rpx;
+          }
         }
         .originalPrice {
           font-size: 24upx;
@@ -420,7 +435,6 @@ page {
   height: 80rpx;
   line-height: 76rpx;
 }
-
 .nav-item {
   flex: 1;
   font-size: 30rpx;
@@ -431,14 +445,9 @@ page {
   height: 80rpx;
   line-height: 76rpx;
 }
-
-.nav-title {
-}
-
 .nav-item.active {
   color: #C5AA7B;
 }
-
 .nav-item .line {
   display: inline-block;
   width: 80rpx;
@@ -446,11 +455,9 @@ page {
   background: #fff;
   border-radius: 2rpx;
 }
-
 .nav-item.active .line {
   background: #C5AA7B;
 }
-
 .nav-item.padd-l {
   padding-left: 20%;
   box-sizing: border-box;
@@ -504,6 +511,14 @@ page {
     border-color: transparent transparent #C5AA7B transparent;
   }
 }
+.emptyOrder-box {
+  margin-top: 70upx;
+  .emptyOrder-img {
+    margin-top: 45%;
+    width: 113upx;
+    height: 98upx;
+  }
+}
 </style>
 <style scoped>
 .snapUpBtn /deep/ .uni-progress-bar {

+ 19 - 2
pages_category_page1/discount/platformDiscount.vue

@@ -66,6 +66,10 @@
           </view>
         </view>
       </view>
+      <view v-if="ifEmpty" class="emptyOrder-box flex-items-plus flex-column">
+        <image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
+        <label class="font-color-999 fs26 mar-top-30">暂无活动商品~</label>
+      </view>
     </view>
   </view>
 </template>
@@ -95,7 +99,8 @@ export default {
       sortIndex: 0,
       discountInfo: {},
       time: '',
-      discountId: ''
+      discountId: '',
+      ifEmpty: false
 		}
 	},
 	onLoad(options) {
@@ -203,6 +208,7 @@ export default {
 		},
 		getDiscountList(){
       uni.showLoading({
+        mask: true,
         title: 'Loading...',
       })
       let param = {
@@ -219,6 +225,9 @@ export default {
 					this.page = this.page
 				}else{
 					this.getDiscount = this.getDiscount.concat(res.data.list)
+          if (this.getDiscount.length === 0) {
+            this.ifEmpty = true
+          }
 				}
 			}).catch(res => {
 				uni.showToast({
@@ -303,7 +312,7 @@ page {
     .discountBg {
       width: 100%;
       height: 480rpx;
-      background: url("../../static/images/discount.png") no-repeat left top;
+      background: url("https://ceres.zkthink.com/static/images/discount.png") no-repeat left top;
       background-size: contain;
       position: relative;
       .discountInfoBox {
@@ -482,7 +491,15 @@ page {
 
 .nav-title {
 }
+.emptyOrder-box {
+  margin-top: 70upx;
 
+  .emptyOrder-img {
+    margin-top: 30%;
+    width: 216upx;
+    height: 152upx;
+  }
+}
 .nav-item.active {
   color: #C5AA7B;
 }

+ 19 - 90
pages_category_page1/discount/spikeList.vue

@@ -1,8 +1,5 @@
 <template>
   <view class="spikeListBox">
-<!--	<view class="countdown" v-if="shopShowType == false">-->
-<!--	   距结束<view class="endDate"><span>{{hou}}</span><i>:</i><span>{{min}}</span><i>:</i><span>{{sec}}</span></view>-->
-<!--	 </view>-->
     <view class="spikeBg">
       <image src="../../static/images/spikelLogo.png"></image>
     </view>
@@ -30,8 +27,8 @@
           <view class="number">限量件 {{item.total}} / 剩余{{item.total - item.saleNumber}}件</view>
           <view class="originalPrice">原价: ¥{{item.originalPrice}}</view>
           <view class="price">
-            <view class="currentPrice flex-row-plus flex-items-plus font-color-FF7800">
-				<view class="iconBox">
+            <view class="currentPrice flex-items font-color-FF7800">
+				<view class="iconBox flex-items">
           <image src="../../static/images/spikeIcon.png"></image>
         </view>
 				<view class="flex-row-plus flex-items priceInfo">
@@ -41,19 +38,19 @@
 			</view>
             <view class="snapUpBtn" v-if="currentTime > timestamp" @click="gogoodsDetails(item.shopId,item.productId,item.skuId)">
               <view class="btnText">去抢购</view>
-              <view style="width: 82%;margin: 0 auto">
+              <view class="progressBox">
                 <progress activeColor="#FFFFFF" :percent="getPercent(item.saleNumber, item.total)" active stroke-width="5" />
               </view>
             </view>
             <view class="snapUpBtn" :class="{btnStyle1: currentTime < timestamp}" v-if="currentTime < timestamp">
               <view class="btnText">即将开始</view>
-              <view style="width: 82%;margin: 0 auto">
+              <view class="progressBox">
                 <progress activeColor="#FFFFFF" :percent="getPercent(item.saleNumber, item.total)" active stroke-width="5" />
               </view>
             </view>
             <view class="snapUpBtn" :class="{btnStyle2: currentTime > endTime}" v-if="currentTime > endTime">
               <view class="btnText">已结束</view>
-              <view style="width: 82%;margin: 0 auto">
+              <view class="progressBox">
                 <progress activeColor="#FFFFFF" :percent="getPercent(item.saleNumber, item.total)" active stroke-width="5" />
               </view>
             </view>
@@ -114,13 +111,7 @@ export default {
 			this.shopSeckillId = 0
 		}
     this.getQuerySession()
-    // this.queryProductListBySession()
 	},
-	// onUnload() {
-	// 	if(this.timeOut){
-	// 	    clearTimeout(this.timeOut)
-	// 	}
-	// },
   tabChange(key, value) {
     this.activeTab = key
     this.changeType = value
@@ -128,7 +119,6 @@ export default {
     if (key !== 'index') {
       this.classifyId = key === 'All' ? '' : key
       this.list = []
-      // this.getBillList()
     }
   },
 	onReachBottom(){
@@ -175,12 +165,13 @@ export default {
         arr.forEach(item => {
           let obj = {}
           obj["time"] = item
-          let date = new Date(this.getCaption(item, 0))
-          let endDate = new Date(this.getCaption(item, 1))
+          let date = new Date(this.getCaption(item, 0).replace(/-/g, '/'))
+          let endDate = new Date(this.getCaption(item, 1).replace(/-/g, '/'))
           console.log(date, 'date121212121')
           obj["timestamp"] = date.getTime()
           obj["endTime"] = endDate.getTime()
           obj["startTime"] = item.substring(5, 16)
+          console.log(obj)
           this.querySessionData.push(obj)
         })
         console.log(this.querySessionData, 'data')
@@ -190,7 +181,7 @@ export default {
         this.getSpikeLike()
       }).catch(res => {
         uni.showToast({
-          title:'失败',
+          title:'失败1111',
           icon:"none"
         })
       })
@@ -209,16 +200,6 @@ export default {
 				url:'../goodsModule/goodsDetails?shopId='+shopId + '&productId='+productId +'&skuId='+skuId
 			})
 		},
-		// progressNum(total, limitNumber){
-		// 	let progress = 0
-		// 	if(limitNumber>0){
-		// 		progress = parseInt(users) / parseInt(limitNumber)
-		// 		progress = progress.toFixed(2)
-		// 	}else{
-		// 		progress = 0
-		// 	}
-		// 	return progress
-		// },
     getPercent(num, total){
       num = parseFloat(num);
       total = parseFloat(total);
@@ -229,6 +210,7 @@ export default {
     },
 		getSpikeLike(){
       uni.showLoading({
+        mask: true,
         title: 'Loading...',
       })
 			let param = ''
@@ -257,67 +239,7 @@ export default {
 					icon:"none"
 				})
 			})
-		},
-		// //时分秒换算
-		// dateformat(micro_second) {
-		// 	// 总秒数
-		// 	let second = Math.floor(micro_second / 1000);
-		// 	// 天数
-		// 	let day = Math.floor(second / 3600 / 24);
-		// 	// 小时
-		// 	let hr = Math.floor(second / 3600 % 24);
-		// 	// 分钟
-		// 	let min = Math.floor(second / 60 % 60);
-		// 	// 秒
-		// 	let sec = Math.floor(second % 60);
-		// 	this.hou = hr+day*24
-		// 	this.min = min
-		// 	this.sec = sec
-		// },
-		// countDown(){
-		//     let timeOut = setTimeout(() => {
-		//       let hou = parseInt(this.hou);
-		//       let min = parseInt(this.min);
-		//       let sec = parseInt(this.sec);
-    //
-		//       let netxSec = sec - 1;
-		//       let netxMin = min
-		//       let netxHou = hou;
-		// 		console.log(netxSec,netxMin,netxHou)
-		//       if (netxHou == 0 && netxMin == 0 && netxSec == -1) {
-		//         clearTimeout(timeOut)
-		// 		uni.switchTab({
-		// 			url:'../../pages/tabbar/index/index'
-		// 		})
-		// 		uni.showToast({
-		// 			title:"活动结束",
-		// 			duration:2000,
-		// 			icon:'none'
-		// 		})
-		//       } else {
-		//         if (netxSec == -1) {
-		//           netxSec = 59
-		//           netxMin = netxMin - 1;
-		//         }
-		//         if (netxMin == -1) {
-		//           netxMin = 59
-		//           netxHou = netxHou - 1
-		//         }
-		//         // if (netxHou == -1) {
-		//         //   netxHou = 23
-		//         // }
-    //
-		//         this.hou = this.timeFormat(netxHou),
-		//         this.min = this.timeFormat(netxMin),
-		//         this.sec = this.timeFormat(netxSec),
-		//         this.timeOut = timeOut
-		//         this.countDown();
-		//       }
-		//     }, 1000)
-		// },
-		// timeFormat(param) { //小于10的格式化函数
-		//     return param < 10 ? '0' + param : param;
-		// },
+		}
 	}
 }
 </script>
@@ -413,7 +335,8 @@ page {
           p {
             font-size: 26upx;
             color: #333333;
-            line-height: 40upx;
+            line-height: 35upx;
+            height: 70rpx;
             margin-bottom: 20upx;
             text-overflow: -o-ellipsis-lastline;
             overflow: hidden;
@@ -455,6 +378,12 @@ page {
               box-shadow: 0rpx 6rpx 12rpx rgba(233, 0, 0, 0.3);
               opacity: 1;
               border-radius: 10rpx;
+              .progressBox {
+                width: 82%;
+                margin: 0 auto;
+                border-radius: 10rpx;
+                overflow: hidden
+              }
               .btnText {
                 color: #FFFFFF;
                 font-weight: 400;

+ 2 - 0
pages_category_page1/distributionModule/commodity.vue

@@ -68,6 +68,7 @@
 		methods: {
 			getStoreProductList() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.StoreProductList, {
@@ -104,6 +105,7 @@
 				// #endif
 
 				uni.showLoading({
+          mask: true,
 				  title: '请稍候...'
 				})
 				NET.request(API.getSharePic, {

+ 7 - 2
pages_category_page1/distributionModule/index.vue

@@ -3,7 +3,7 @@
 		<view class="inStoreBackImg flex-items-plus" v-if="StoreListData.length>0">
 			<label>选择进入的店铺</label>
 		</view>
-		<view v-if="StoreListData.length>0">
+		<view>
 			<view class="flex-items-plus flex-column" v-for="(item,index) in StoreListData" :key="index" @click="getStore(item)">
 				<view class="store-box flex-items-plus flex-sp-between mar-top-30 bor-line-E5E5E5 pad-bot-30">
           <view class="flex-items-plus">
@@ -23,7 +23,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-else class="emptyCart-box flex-items-plus flex-column">
+		<view v-if="ifEmpty" class="emptyCart-box flex-items-plus flex-column">
 			<image class="emptyCart-img" src="../../static/img/bgnull.png"></image>
 			<label class="font-color-999 fs26 mar-top-30">这里空空如也~</label>
 		</view>
@@ -44,6 +44,7 @@
 				page: 1,
 				pageSize: 20,
 				loadingType:0,
+        ifEmpty: false
 			}
 		},
 		onLoad() {
@@ -72,6 +73,7 @@
 			},
 			getStoreList() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.FindSaleStoreList, {
@@ -84,6 +86,9 @@
 						this.page = this.page
 					}
 					this.StoreListData = this.StoreListData.concat(res.data.list)
+          if (this.StoreListData.length === 0) {
+            this.ifEmpty = true
+          }
 				}).catch(res => {
 					uni.hideLoading()
 				})

+ 1 - 1
pages_category_page1/distributionModule/invite.vue

@@ -206,7 +206,7 @@
 	}
 </script>
 
-<style lang="less" scoped>
+<style lang="scss" scoped>
 	.guanbiBox{
 		padding: 30upx 20upx;
 

+ 1 - 1
pages_category_page1/distributionModule/promotion.vue

@@ -215,7 +215,7 @@
 	}
 </script>
 
-<style lang="less" scoped>
+<style lang="scss" scoped>
 	.warp {
 		display: flex;
 		align-items: center;

+ 6 - 3
pages_category_page1/distributionModule/recruit.vue

@@ -61,7 +61,7 @@
 			</view>
 
 		</view>
-		<view class="butBox flex-items-plus" @click="informationShowClick">
+		<view class="butBox flex-items-plus" :style="{'padding-bottom':(isIphone === true? 20:0)+'rpx'}" @click="informationShowClick">
 			<view class="submitbut">我要成为分销员</view>
 		</view>
 		<!-- 填写信息弹窗 -->
@@ -104,10 +104,12 @@
 				userName:'',
 				mobile:'',
 				inviteId:'',
-				shopId:0
+				shopId:0,
+				isIphone:false
 			}
 		},
 		onLoad(options) {
+			this.isIphone = getApp().globalData.isIphone;
 			if (getApp().globalData.distributeRecruitItem) {
 				const item = getApp().globalData.distributeRecruitItem
 				this.shopId = parseInt(item.shopId)
@@ -115,6 +117,7 @@
 			} else {
 				this.shopId = parseInt(options.shopId)
 			}
+			this.isIphone = getApp().globalData.isIphone;
 		},
 		methods: {
 			informationShowClick() {
@@ -212,7 +215,7 @@
 		}
 
 		.butBox {
-			height: 98upx;
+			height: 130upx;
 			width: 100%;
 			position: absolute;
 			bottom: 0upx;

+ 2 - 0
pages_category_page1/distributionModule/salesIndex.vue

@@ -80,6 +80,7 @@
 		methods: {
 			getSalesMainInfo() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.QuerySalesMainInfo, {
@@ -135,6 +136,7 @@
 				// #endif
 
 				uni.showLoading({
+          mask: true,
 				  title: '请稍候...'
 				})
 				/* const res = {'data':'https://cereshop.oss-cn-shenzhen.aliyuncs.com/test/2021-06-10/64223b9f0eef41abbb5d4056b9a40e2a08441534-3cbe-47af-8134-fc74635e069f.png'}

+ 20 - 6
pages_category_page1/distributionModule/shareProduct.vue

@@ -14,13 +14,21 @@
 					</view>
 					<!-- 内容 -->
 					<view class="imgBox">
-						<view v-if="shareType==1" class="boxInner imgBoxShop" :style="{'backgroundImage':'url(' + erweima + ')'}"></view>
-						<view v-else class="boxInner imgBoxProduct" :style="{'backgroundImage':'url(' + erweima + ')'}"></view>
+						<view
+							v-if="shareType==1"
+							class="boxInner imgBoxShop"
+							:style="{'backgroundImage':'url(' + erweima + ')'}"
+						></view>
+						<view
+							v-else
+							class="boxInner imgBoxProduct"
+							:style="{'backgroundImage':'url(' + erweima + ')'}"
+						></view>
 					</view>
 					<!-- 分享 -->
 				</view>
 			</view>
-			<view class="fenx">
+			<view class="fenx" :style="{'height':(isIphone === true? 140:130)+'rpx'}">
 				<view class="shareBox" :class="{'width100':noMp}" hover-class="btn-click" @click="WXfenx">
 					<view style="flex: 1;text-align: center;display: flex;">
 						<view style="margin-left: 120rpx;" v-if="noMp">
@@ -70,10 +78,12 @@
 				salesId: null,
 				productId: null,
 				noMp: false,
-				shareType: 1
+				shareType: 1,
+				isIphone:false
 			}
 		},
 		onLoad: function(options) {
+			this.isIphone = getApp().globalData.isIphone;
 			if (options.productId) {
 				this.productId = options.productId
 			}
@@ -103,17 +113,22 @@
 			// 保存图片到本地
 			WXfenx() {
 				// #ifdef MP-WEIXIN || MP-ALIPAY
+				uni.showLoading({
+					title:'图片保存中...'
+				})
 				uni.getImageInfo({
 					src: this.erweima,
 					success: function(image) {
 						uni.saveImageToPhotosAlbum({
 							filePath: image.path,
 							success: function() {
+								uni.hideLoading()
 								uni.showToast({
 									title: '图片保存成功'
 								});
 							},
 							fail: function() {
+								uni.hideLoading()
 								uni.showModal({
 									title: '图片保存失败',
 									content: '请确认是否已开启授权',
@@ -195,7 +210,7 @@
 	}
 </script>
 
-<style lang="less" scoped>
+<style lang="scss" scoped>
 	.warp {
 		display: flex;
 		align-items: center;
@@ -260,7 +275,6 @@
 		z-index: 10001;
 		background-color: #F7F7F7;
 		width: 100%;
-		height: 98rpx;
 		display: flex;
 		color: #343434;
 

+ 2 - 0
pages_category_page1/distributionModule/totalAward.vue

@@ -162,6 +162,7 @@
 		methods: {
 			getZSalesOrderData() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.FindSalesOrderPage, {
@@ -185,6 +186,7 @@
 			},
 			getJSalesOrderData() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.FindSalesOrderPage, {

+ 1 - 0
pages_category_page1/distributionModule/totalClient.vue

@@ -77,6 +77,7 @@
 		methods: {
 			getSalesCustomer() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.FindSalesCustomerList, {

+ 1 - 0
pages_category_page1/distributionModule/totalPersonnel.vue

@@ -74,6 +74,7 @@
 		methods: {
 			getSubordinateSales() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.FindSubordinateSalesList, {

+ 2 - 0
pages_category_page1/distributionModule/unliquidated.vue

@@ -160,6 +160,7 @@
 		methods: {
 			getZSalesOrderData() {
 				uni.showLoading({
+          mask: true,
 					title:'加载中...'
 				})
 				NET.request(API.GetNotReward, {
@@ -183,6 +184,7 @@
 			},
 			getJSalesOrderData() {
 				uni.showLoading({
+          mask: true,
 					title:'加载中...'
 				})
 				NET.request(API.GetNotReward, {

+ 467 - 463
pages_category_page1/goodsModule/canvasGoods.vue

@@ -1,507 +1,511 @@
 <template>
-	<view class="container">
-		<!-- 商品列表 -->
-<!--		<view class="flex-items-plus flex-row search">-->
-<!--      <view class="searchBg">-->
-<!--        <view class="searchImg-box flex-items-plus">-->
-<!--          <image class="searchImg" src="../../static/img/searchImg.png"></image>-->
-<!--          <input class="search-box" v-model="keyWord" placeholder-class="searchboxPlace" placeholder="请输入您想要的宝贝" />-->
-<!--&lt;!&ndash;          <image class="searchClose-icon" @click="searchTextDel" src="../../static/img/index/searchClose_icon.png"></image>&ndash;&gt;-->
-<!--        </view>-->
-<!--        <label class="mar-left-40 fs28" @click="searchList(1)">搜索</label>-->
-<!--      </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>-->
-<!--          &lt;!&ndash;          <image src="../../static/images/arrowSortUp.png" v-if="type == 1" class="arrow-img padd-t"></image>&ndash;&gt;-->
-<!--          &lt;!&ndash;          <image src="../../static/images/arrowSortDown.png" v-if="type == 2" class="arrow-img padd-b"></image>&ndash;&gt;-->
-<!--        </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>-->
-<!--          &lt;!&ndash;          <image src="../../static/images/arrowSortUp.png" v-if="volume == 1" class="arrow-img padd-t"></image>&ndash;&gt;-->
-<!--          &lt;!&ndash;          <image src="../../static/images/arrowSortDown.png" v-if="volume == 2" class="arrow-img padd-b"></image>&ndash;&gt;-->
-<!--        </view>-->
-<!--      </view>-->
-<!--    </view>-->
-		<view v-if="list.length>0" 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 v-if="item.activityType === 0" class="goodsDetails flex-items-plus flex-row">
-					<image class="goodsImg" :src="item.image"></image>
-					<view class="mar-left-30">
-						<view class="goodsName-box overflowNoDot">
-							<label class="goodsName fs26">{{item.productName}}</label>
-						</view>
+  <view class="container">
+    <!-- 商品列表 -->
+    <!--		<view class="flex-items-plus flex-row search">-->
+    <!--      <view class="searchBg">-->
+    <!--        <view class="searchImg-box flex-items-plus">-->
+    <!--          <image class="searchImg" src="../../static/img/searchImg.png"></image>-->
+    <!--          <input class="search-box" v-model="keyWord" placeholder-class="searchboxPlace" placeholder="请输入您想要的宝贝" />-->
+    <!--&lt;!&ndash;          <image class="searchClose-icon" @click="searchTextDel" src="../../static/img/index/searchClose_icon.png"></image>&ndash;&gt;-->
+    <!--        </view>-->
+    <!--        <label class="mar-left-40 fs28" @click="searchList(1)">搜索</label>-->
+    <!--      </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>-->
+    <!--          &lt;!&ndash;          <image src="../../static/images/arrowSortUp.png" v-if="type == 1" class="arrow-img padd-t"></image>&ndash;&gt;-->
+    <!--          &lt;!&ndash;          <image src="../../static/images/arrowSortDown.png" v-if="type == 2" class="arrow-img padd-b"></image>&ndash;&gt;-->
+    <!--        </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>-->
+    <!--          &lt;!&ndash;          <image src="../../static/images/arrowSortUp.png" v-if="volume == 1" class="arrow-img padd-t"></image>&ndash;&gt;-->
+    <!--          &lt;!&ndash;          <image src="../../static/images/arrowSortDown.png" v-if="volume == 2" class="arrow-img padd-b"></image>&ndash;&gt;-->
+    <!--        </view>-->
+    <!--      </view>-->
+    <!--    </view>-->
+    <view v-if="list.length>0" 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 v-if="item.activityType === 0" class="goodsDetails flex-items-plus flex-row">
+          <image class="goodsImg" :src="item.image"></image>
+          <view class="mar-left-30">
+            <view class="goodsName-box overflowNoDot">
+              <label class="goodsName fs26">{{item.productName}}</label>
+            </view>
             <view class="usersBox">
               <label class="fs24 font-color-C5AA7B" v-if="item.users != null">{{item.users}}人付款</label>
               <label class="fs24 font-color-C5AA7B" v-else>0人付款</label>
             </view>
-						<view class="priceBuyNum-box flex-items mar-top-20">
-							<view>
-								<label class="fs30 font-color-C83732">¥</label>
-							    <label class="fs36 font-color-C83732 mar-left-10">{{item.price}}</label>
-							</view>
-							<view style="margin-left: 20upx; color: #CCCCCC; text-decoration:line-through">
-								<label class="fs24">¥{{item.originalPrice}}</label>
-							</view>
-						</view>
-						<view class="flex-display flex-sp-between flex-row mar-top-10 flex-items shopName">
-							<label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
-<!--							<image class="arrowImg" src="../../static/img/user/arrow.png"></image>-->
-						</view>
-					</view>
-				</view>
-				<view v-else class="spikeList goodsDetails">
-				  <view class="listItem">
-				    <view class="itemBox">
-				      <img :src="item.image">
-				    </view>
-				    <view class="itemInfo mar-top-30">
-				      <p>{{item.productName}}</p>
-				      <view class="number" v-if="item.users != null">
+            <view class="priceBuyNum-box flex-items mar-top-20">
+              <view>
+                <label class="fs30 font-color-C83732">¥</label>
+                <label class="fs36 font-color-C83732 mar-left-10">{{item.price}}</label>
+              </view>
+              <view style="margin-left: 20upx; color: #CCCCCC; text-decoration:line-through">
+                <label class="fs24">¥{{item.originalPrice}}</label>
+              </view>
+            </view>
+            <view class="flex-display flex-sp-between flex-row mar-top-10 flex-items shopName">
+              <label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
+              <!--							<image class="arrowImg" src="../../static/img/user/arrow.png"></image>-->
+            </view>
+          </view>
+        </view>
+        <view v-else class="spikeList goodsDetails">
+          <view class="listItem">
+            <view class="itemBox">
+              <img :src="item.image">
+            </view>
+            <view class="itemInfo mar-top-30">
+              <p>{{item.productName}}</p>
+              <view class="number" v-if="item.users != null">
                 <view class="numText">{{item.users}}人付款</view>
-<!--                <view class="numText" v-if="item.total !=0">限量{{item.total}}件</view>-->
+                <!--                <view class="numText" v-if="item.total !=0">限量{{item.total}}件</view>-->
+              </view>
+              <view class="flex-row-plus flex-item mar-top-30">
+                <image class="iconImg" v-if="item.activityType == 1" src="../../static/images/groupBuyIcon.png"></image>
+                <image class="iconImg" v-if="item.activityType == 2" src="../../static/images/spikeIcon.png"></image>
+                <image class="iconImg" v-if="item.activityType == 4" src="../../static/images/spikeIcon.png"></image>
+                <image class="iconImg" v-if="item.activityType == 3" src="../../static/images/discountListIcon.png"></image>
+                <image class="iconImg" v-if="item.activityType == 5" src="../../static/images/discountListIcon.png"></image>
+                <image class="iconImg" v-if="item.activityType == 8" src="../../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-row-plus flex-item mar-top-30">
-              <image class="iconImg" v-if="item.activityType == 1" src="../../static/images/groupBuyIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 2" src="../../static/images/spikeIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 4" src="../../static/images/spikeIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 3" src="../../static/images/discountListIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 5" src="../../static/images/discountListIcon.png"></image>
-              <image class="iconImg" v-if="item.activityType == 8" src="../../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-10 flex-items shopName">
-					  	<label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
-<!--					  	<image class="arrowImg" src="../../static/img/user/arrow.png"></image>-->
-					  </view>
-				    </view>
-				  </view>
-				</view>
-			</view>
-		</view>
+              <view class="flex-display flex-sp-between flex-row mar-top-10 flex-items shopName">
+                <label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
+                <!--					  	<image class="arrowImg" src="../../static/img/user/arrow.png"></image>-->
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
 
-		<!-- 搜索为空 -->
-		<view v-else class="emptyCart-box flex-items-plus flex-column">
-			<image class="emptyCart-img" src="../../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>
+    <!-- 搜索为空 -->
+    <view v-if="ifEmpty" class="emptyCart-box flex-items-plus flex-column">
+      <image class="emptyCart-img" src="../../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>
 </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: 0,
-        ifNew:0,//是否新品
-        type:1,//价格排序条件
-        volume:1,//销量排序条件
-        sourceType: '',
-        ids: [],
-        classifyId: 0
-			}
-		},
-		onLoad(option) {
-			if(option.sourceType){
-        this.sourceType = option.sourceType
-        if(option.sourceType === '1'){
-          this.ids = option.ids
-        } else if(option.sourceType === '2'){
-          this.classifyId = option.classifyId
-        }
-			}
-			this.searchList(1)
-		},
-		onReachBottom(){
-			if(this.loadingType == 1){
-				uni.stopPullDownRefresh()
-			}else{
-				this.page = this.page+1
-				this.searchList(0)
-			}
-		},
-		methods: {
-      sortTap(index){
-        this.page = 1
+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: 0,
+      ifNew:0,//是否新品
+      type:1,//价格排序条件
+      volume:1,//销量排序条件
+      sourceType: '',
+      ids: [],
+      classifyId: 0,
+      ifEmpty: false
+    }
+  },
+  onLoad(option) {
+    if(option.sourceType){
+      this.sourceType = option.sourceType
+      if(option.sourceType === '1'){
+        this.ids = option.ids
+      } else if(option.sourceType === '2'){
+        this.classifyId = option.classifyId
+      }
+    }
+    this.searchList(1)
+  },
+  onReachBottom(){
+    if(this.loadingType == 1){
+      uni.stopPullDownRefresh()
+    }else{
+      this.page = this.page+1
+      this.searchList(0)
+    }
+  },
+  methods: {
+    sortTap(index){
+      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
+      }
+      this.searchList()
+    },
+    // searchTextDel(){
+    // 	this.keyWord = ''
+    // },
+    searchList(type){
+      uni.showLoading({
+        title: '加载中...',
+      })
+      if(type == 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
+        this.page = 1
+      }
+      var params = {
+        page: this.page,
+        pageSize: this.pageSize
+      }
+      if (this.sourceType === '1') {
+        if(this.ids && this.ids.length>0){
+          params.ids = this.ids
+        } else {
+          this.list = []
         }
-        this.searchList()
-      },
-			// searchTextDel(){
-			// 	this.keyWord = ''
-			// },
-			searchList(type){
-				wx.showLoading({
-				      title: '加载中...',
-				})
-				if(type == 1){
-					this.list = []
-					this.page = 1
-				}
-        var params = {
-          page: this.page,
-          pageSize: this.pageSize
+      } else if(this.sourceType === '2'){
+        if(this.classifyId) {
+          params.classifyId = this.classifyId
+        } else {
+          this.list = []
         }
-        if (this.sourceType === '1') {
-          if(this.ids && this.ids.length>0){
-            params.ids = this.ids
-          } else {
-            this.list = []
-          }
-        } else if(this.sourceType === '2'){
-          if(this.classifyId) {
-            params.classifyId = this.classifyId
-          } else {
-            this.list = []
+      }
+      if(params.ids || params.classifyId){
+        NET.request(API.getProducts, params, 'GET').then(res => {
+          uni.hideLoading()
+          this.list = this.list.concat(res.data.list)
+          if (this.list.length === 0) {
+            this.ifEmpty = true
           }
-        }
-        if(params.ids || params.classifyId){
-          NET.request(API.getProducts, params, 'GET').then(res => {
-            uni.hideLoading()
-            this.list = this.list.concat(res.data.list)
-          }).catch(res => {
-            uni.hideLoading()
-          })
-        }
-			},
-			//商品详情
-			goodsDateils(shopId,productId,skuId){
-				uni.navigateTo({
-					url: 'goodsDetails?shopId='+shopId + '&productId='+productId +'&skuId='+skuId
-				})
-			}
-		}
-	}
+        }).catch(res => {
+          uni.hideLoading()
+        })
+      }
+    },
+    //商品详情
+    goodsDateils(shopId,productId,skuId){
+      uni.navigateTo({
+        url: 'goodsDetails?shopId='+shopId + '&productId='+productId +'&skuId='+skuId
+      })
+    }
+  }
+}
 </script>
 
 <style lang="scss">
 page {
   background: #f8f8f8;
 }
-	input{padding-left: 80upx;}
-	.container{
-		height: 100%;
-    background: #f8f8f8;
-    .search {
-      padding: 20rpx;
-      background: #FFFFFF;
-      border-top: 2rpx solid #F3F4F5;
+input{padding-left: 80upx;}
+.container{
+  height: 100%;
+  background: #f8f8f8;
+  .search {
+    padding: 20rpx;
+    background: #FFFFFF;
+    border-top: 2rpx solid #F3F4F5;
+  }
+  .searchImg-box {
+    position: relative;
+  }
+  .emptyCart-box{
+    margin-top: 70upx;
+    .emptyCart-img{
+      width: 113upx;
+      height: 98upx;
     }
-    .searchImg-box {
-      position: relative;
+  }
+  .searchBg {
+    width: 100%;
+    display: flex;
+    background-color: #F7F7F7;
+    align-items: center;
+    height: 78rpx;
+    justify-content: space-between;
+    padding: 0 20rpx;
+    label {
+      font-weight: 400;
+      color: #333333;
     }
-		.emptyCart-box{
-			margin-top: 70upx;
-			.emptyCart-img{
-				width: 113upx;
-				height: 98upx;
-			}
-		}
-    .searchBg {
-      width: 100%;
-      display: flex;
-      background-color: #F7F7F7;
-      align-items: center;
-      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{
+    background: #FFFFFF;
+    margin-top: 20rpx;
+    box-sizing: border-box;
+    .goodsDetails{
+      border-bottom: 1upx solid #EDEDED;
+      padding-top: 30rpx;
+      padding-bottom: 30upx;
+      position: relative;
+      .goodsName-box{
+        width: 389upx;
+        height: 85upx;
+        .img618-cion{
+          width:70upx;
+          height:36upx;
+        }
       }
-    }
-		.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;
-			.goodsDetails{
-				border-bottom: 1upx solid #EDEDED;
-        padding-top: 30rpx;
-				padding-bottom: 30upx;
-        position: relative;
-				.goodsName-box{
-					width: 389upx;
-					height: 85upx;
-					.img618-cion{
-						width:70upx;
-						height:36upx;
-					}
-				}
-        .shopName {
-          position: absolute;
-          left: 0;
-          top: 0;
-          height: 50rpx;
-          background: #333333;
-          opacity: 1;
-          border-radius: 0 20rpx 20rpx 0;
-          padding: 10rpx 15rpx;
+      .shopName {
+        position: absolute;
+        left: 0;
+        top: 0;
+        height: 50rpx;
+        background: #333333;
+        opacity: 1;
+        border-radius: 0 20rpx 20rpx 0;
+        padding: 10rpx 15rpx;
+      }
+      .goodsImg{
+        width: 260upx;
+        height: 260upx;
+      }
+      .discounts-box{
+        margin-left: -10upx;
+        margin-top: 20upx;
+        .discounts-text{
+          margin-left: 10upx;
+          color: #C5AA7B;
+          background-color: #FFE4CC;
+          padding: 6upx 12upx;
+          border-radius: 4upx;
         }
-				.goodsImg{
-					width: 260upx;
-					height: 260upx;
-				}
-				.discounts-box{
-					margin-left: -10upx;
-					margin-top: 20upx;
-					.discounts-text{
-						margin-left: 10upx;
-						color: #C5AA7B;
-						background-color: #FFE4CC;
-						padding: 6upx 12upx;
-						border-radius: 4upx;
-					}
-				}
-				.arrowImg{
-					width: 20upx;
-					height: 20upx;
-				}
-			}
+      }
+      .arrowImg{
+        width: 20upx;
+        height: 20upx;
+      }
+    }
 
 
-		}
-		.spikeList {
-			.arrowImg{
-				width: 20upx;
-				height: 20upx;
-			}
-		  // padding: 108upx 30upx 20upx 30upx;
-		  padding-top: 30rpx;
-		  border-bottom: 1upx solid #EDEDED;
-		  .listItem {
-		    display: flex;
-		    // padding-bottom: 10upx;
-		    border-bottom: 1upx solid #EEEEEE;
-		    margin-bottom: 30upx;
-        .iconImg {
-          width: 58rpx;
-          height: 36rpx;
+  }
+  .spikeList {
+    .arrowImg{
+      width: 20upx;
+      height: 20upx;
+    }
+    // padding: 108upx 30upx 20upx 30upx;
+    padding-top: 30rpx;
+    border-bottom: 1upx solid #EDEDED;
+    .listItem {
+      display: flex;
+      // padding-bottom: 10upx;
+      border-bottom: 1upx solid #EEEEEE;
+      margin-bottom: 30upx;
+      .iconImg {
+        width: 58rpx;
+        height: 36rpx;
+      }
+      &:last-child {
+        border-bottom: none;
+      }
+      .itemBox {
+        width: 260upx;
+        height: 260upx;
+        margin-right: 30upx;
+        img {
+          width: 100%;
+          height: 100%;
+        }
+      }
+      .itemInfo {
+        flex: 1;
+        p {
+          font-size: 26upx;
+          color: #333333;
+          line-height: 40upx;
+          margin-bottom: 20upx;
+          text-overflow: -o-ellipsis-lastline;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          display: -webkit-box;
+          -webkit-line-clamp: 2;
+          line-clamp: 2;
+          -webkit-box-orient: vertical;
         }
-		    &:last-child {
-		      border-bottom: none;
-		    }
-		    .itemBox {
-		      width: 260upx;
-		      height: 260upx;
-		      margin-right: 30upx;
-		      img {
-		        width: 100%;
-		        height: 100%;
-		      }
-		    }
-		    .itemInfo {
-		      flex: 1;
-		      p {
-		        font-size: 26upx;
-		        color: #333333;
-		        line-height: 40upx;
-		        margin-bottom: 20upx;
-		        text-overflow: -o-ellipsis-lastline;
-		        overflow: hidden;
-		        text-overflow: ellipsis;
-		        display: -webkit-box;
-		        -webkit-line-clamp: 2;
-		        line-clamp: 2;
-		        -webkit-box-orient: vertical;
-		      }
-		      .number {
-		        color: #999999;
-		        font-size: 26upx;
-            display: flex;
-            align-items: center;
-            .numText {
-              padding: 0 10rpx;
-              height: 40rpx;
-              line-height: 40rpx;
-              border: 2rpx solid #E4E5E6;
-              color: #C5AA7B;
-              font-size: 20rpx;
-              margin-right: 10rpx;
-            }
-		      }
-		    }
-		  }
-		}
-    .listBox {
-      padding: 0 24rpx;
-      box-sizing: border-box;
-      .usersBox {
-        margin-top: 20rpx;
-        label {
-          padding: 10rpx;
-          border: 2rpx solid #E4E5E6;
+        .number {
+          color: #999999;
+          font-size: 26upx;
+          display: flex;
+          align-items: center;
+          .numText {
+            padding: 0 10rpx;
+            height: 40rpx;
+            line-height: 40rpx;
+            border: 2rpx solid #E4E5E6;
+            color: #C5AA7B;
+            font-size: 20rpx;
+            margin-right: 10rpx;
+          }
         }
       }
     }
-	}
-  .shop-list-nav {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    height: 80rpx;
-    line-height: 76rpx;
-    background: #fff;
   }
-
-  .nav-item {
-    flex: 1;
-    font-size: 30rpx;
-    color: #666;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    height: 80rpx;
-    line-height: 76rpx;
+  .listBox {
+    padding: 0 24rpx;
+    box-sizing: border-box;
+    .usersBox {
+      margin-top: 20rpx;
+      label {
+        padding: 10rpx;
+        border: 2rpx solid #E4E5E6;
+      }
+    }
   }
+}
+.shop-list-nav {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  height: 80rpx;
+  line-height: 76rpx;
+  background: #fff;
+}
 
-  .nav-title {
-  }
+.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: #C5AA7B;
-  }
+.nav-title {
+}
 
-  .nav-item .line {
-    display: inline-block;
-    width: 80rpx;
-    height: 4rpx;
-    background: #fff;
-    border-radius: 2rpx;
-  }
+.nav-item.active {
+  color: #C5AA7B;
+}
 
-  .nav-item.active .line {
-    background: #C5AA7B;
-  }
+.nav-item .line {
+  display: inline-block;
+  width: 80rpx;
+  height: 4rpx;
+  background: #fff;
+  border-radius: 2rpx;
+}
 
-  .nav-item.padd-l {
-    padding-left: 20%;
-    box-sizing: border-box;
-  }
-  .active{
-    color: #C5AA7B;
+.nav-item.active .line {
+  background: #C5AA7B;
+}
+
+.nav-item.padd-l {
+  padding-left: 20%;
+  box-sizing: border-box;
+}
+.active{
+  color: #C5AA7B;
+}
+.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;
+}
+
+.nav-item-sort .r {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  margin-left: 5rpx;
+  .arrowDown {
+    width: 0;
+    height: 0;
+    border-width: 10rpx;
+    border-style: solid;
+    border-color: #CCCCCC transparent transparent transparent;
+    margin-top: 2rpx;
   }
-  .nav-item.padd-r {
-    padding-right: 20%;
-    box-sizing: border-box;
+  .arrowUp {
+    margin-bottom: 2rpx;
+    width: 0;
+    height: 0;
+    border-width: 10rpx;
+    border-style: solid;
+    border-color: transparent transparent #CCCCCC transparent;
   }
-
-  .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;
+  .activeDown {
+    border-color: #C5AA7B transparent transparent transparent;
   }
-
-  .nav-item-sort .r {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    margin-left: 5rpx;
-    .arrowDown {
-      width: 0;
-      height: 0;
-      border-width: 10rpx;
-      border-style: solid;
-      border-color: #CCCCCC transparent transparent transparent;
-      margin-top: 2rpx;
-    }
-    .arrowUp {
-      margin-bottom: 2rpx;
-      width: 0;
-      height: 0;
-      border-width: 10rpx;
-      border-style: solid;
-      border-color: transparent transparent #CCCCCC transparent;
-    }
-    .activeDown {
-      border-color: #C5AA7B transparent transparent transparent;
-    }
-    .activeUp {
-      border-color: transparent transparent #C5AA7B transparent;
-    }
+  .activeUp {
+    border-color: transparent transparent #C5AA7B transparent;
   }
+}
 
-  //.nav-item-sort .r .arrow-img {
-  //  width: 32rpx;
-  //  height: 32rpx;
-  //  padding: 7rpx;
-  //  box-sizing: border-box;
-  //}
-  //// #ifdef MP-ALIPAY
-  //.nav-item-sort .r .arrow-img {
-  //  width: 16rpx;
-  //  height: 16rpx;
-  //  padding: 4rpx;
-  //  box-sizing: border-box;
-  //}
-  .search {
-    padding-top: 20rpx;
-  }
-  // #endif
+//.nav-item-sort .r .arrow-img {
+//  width: 32rpx;
+//  height: 32rpx;
+//  padding: 7rpx;
+//  box-sizing: border-box;
+//}
+//// #ifdef MP-ALIPAY
+//.nav-item-sort .r .arrow-img {
+//  width: 16rpx;
+//  height: 16rpx;
+//  padding: 4rpx;
+//  box-sizing: border-box;
+//}
+.search {
+  padding-top: 20rpx;
+}
+// #endif
 </style>

+ 4 - 2
pages_category_page1/goodsModule/combination.vue

@@ -120,7 +120,8 @@ export default {
   },
   methods: {
     getSelectByPriceId() {
-      wx.showLoading({
+      uni.showLoading({
+        mask: true,
         title: '加载中...',
       })
       NET.request(API.selectByPriceId,{
@@ -311,7 +312,8 @@ export default {
             icon: "none"
           })
         } else {
-          wx.showLoading({
+          uni.showLoading({
+            mask: true,
             title: '添加中...',
           })
           NET.request(API.ShoppingaddCart, {

+ 1 - 1
pages_category_page1/goodsModule/couponShopList.vue

@@ -81,7 +81,7 @@
 		},
 		methods: {
 			searchList(type){
-				wx.showLoading({
+        uni.showLoading({
 				      title: '加载中...',
 				})
 				if(type == 1){

+ 34 - 192
pages_category_page1/goodsModule/evaSuccessful.vue

@@ -10,46 +10,28 @@
         <view class="homeBtn btn" @click="goToHome">返回首页</view>
       </view>
     </view>
-    <view class="evaluateIcon flex-items">
-      <image src="../../static/images/evaluateIcon.png"></image>
-      <text>热门推荐</text>
-    </view>
-    <view class="recommendList">
-      <view class="itemBox" v-for="(item, index) of productList" @click="goodsDateils(item.shopId,item.productId,item.skuId)">
-        <view class="itemImg">
-          <image :src="item.image"></image>
-        </view>
-        <view class="itemTit">{{item.productName}}</view>
-        <view class="flex-items shopNameBox">
-          <view class="shopName">{{item.shopName}}</view>
-          <view class="paymentNum">{{item.users}}人付款</view>
-        </view>
-        <view class="itemPrice">
-          <view class="price">¥{{item.price}}</view>
-          <view class="originalPrice">¥{{item.originalPrice}}</view>
-        </view>
-      </view>
-    </view>
+
+    <HotTemplate />
   </view>
 </template>
 
 <script>
+import HotTemplate from '@/components/hoteRecommed/index.vue'
+
 const NET = require('@/utils/request')
 const API = require('@/config/api')
 export default {
   name: "evaSuccessful",
+  components: {
+    HotTemplate
+  },
   data() {
     return {
       orderId: null,
       orderPolite: {},
       list: [],
-      pageSize: 1,
-      productList:[]
     }
   },
-  onLoad() {
-    this.GetremenList()
-  },
   methods: {
     goToOrder() {
       uni.navigateTo({
@@ -61,34 +43,6 @@ export default {
         url: '../../pages/tabbar/index/index'
       })
     },
-    // 获取列表数据
-    GetremenList() {
-      let timestamp = new Date().getTime()
-      NET.request(API.GetremenList, {
-        page: this.pageSize,
-        pageSize: 5,
-        timestamp: timestamp
-      }, 'get').then(res => {
-        uni.stopPullDownRefresh();
-        console.log(res)
-        if (res.code == 200) {
-          this.productList = res.data.list
-        } else {
-          uni.showToast({
-            title: res.message,
-            icon: 'none'
-          })
-        }
-      })
-    },
-    //商品详情
-    goodsDateils(shopId, productId, skuId) {
-      console.log(111)
-      uni.navigateTo({
-        url: 'goodsDetails?shopId=' + shopId + '&productId=' + productId + '&skuId=' +
-            skuId
-      })
-    }
   }
 }
 </script>
@@ -102,151 +56,39 @@ page {
   .evaBox {
     padding: 30rpx 30rpx 50rpx 30rpx;
     background: #FFFFFF;
-  }
-  .imgBox {
-    padding-top: 100rpx;
-    display: flex;
-    justify-content: center;
-    image {
-      width: 166rpx;
-      height: 121rpx;
-    }
-  }
-  .successful {
-    text-align: center;
-    margin-top: 30rpx;
-  }
-  .btnBox {
-    display: flex;
-    justify-content: center;
-    margin-top: 30rpx;
-    .btn {
-      width: 140rpx;
-      height: 58rpx;
-      line-height: 58rpx;
-      border: 2rpx solid #999999;
-      text-align: center;
-      font-size: 24rpx;
-      color: #999999;
-    }
-    .orderBtn {
-      margin-right: 30rpx;
-    }
-    .homeBtn {
-      background: #333333;
-      border: none;
-      color: #FFEBC4;
-    }
-  }
-  .orderPolite {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 670rpx;
-    background: #FFF9F6;
-    border: 2rpx solid #FBE9E6;
-    margin: 100rpx auto 0 auto;
-    padding: 30rpx;
-    box-sizing: border-box;
-    .politeImgBox {
+    .imgBox {
+      padding-top: 100rpx;
+      display: flex;
+      justify-content: center;
       image {
-        width: 186rpx;
-        height: 186rpx;
+        width: 166rpx;
+        height: 121rpx;
       }
     }
-    .rightInfo {
-      font-size: 28rpx;
-      color: #333333;
-      .growthBox {
-        margin-bottom: 30rpx;
-        .growth {
-          color: #C83732;
-        }
-      }
-      .couponBox {
-        margin-bottom: 30rpx;
-        .coupon {
-          color: #C83732;
-        }
-        &:last-child {
-          margin-bottom: 0 !important;
-        }
-      }
-    }
-  }
-  .evaluateIcon {
-    margin: 50rpx 0;
-    justify-content: center;
-    image {
-      width: 36rpx;
-      height: 32rpx;
-      margin-right: 20rpx;
+    .successful {
+      text-align: center;
+      margin-top: 30rpx;
     }
-  }
-  .recommendList {
-    padding: 0 20rpx;
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: space-between;
-    .itemBox {
-      background: #FFFFFF;
-      width: 345rpx;
-      margin: 0 0 20rpx 0;
-      .itemImg {
-        width: 345rpx;
-        height: 314rpx;
-        image {
-          width: 100%;
-          height: 314rpx;
-        }
-      }
-      .itemTit {
-        padding: 0 20rpx;
-        height: 40rpx;
-        width: 100%;
-        overflow: hidden;
-        white-space: nowrap;
-        text-overflow:ellipsis;
+    .btnBox {
+      display: flex;
+      justify-content: center;
+      margin-top: 30rpx;
+      .btn {
+        width: 140rpx;
+        height: 58rpx;
+        line-height: 58rpx;
+        border: 2rpx solid #999999;
+        text-align: center;
+        font-size: 24rpx;
+        color: #999999;
       }
-      .shopNameBox {
-        padding: 0 20rpx;
-        height: 40rpx;
-        justify-content: space-between;
-        margin-top: 20rpx;
-        .shopName {
-          color: #FFEBC4;
-          font-size: 20rpx;
-          width: 140rpx;
-          overflow: hidden;
-          white-space: nowrap;
-          text-overflow:ellipsis;
-          border-radius: 0 20rpx 20rpx 0;
-          background: #333333;
-          height: 40rpx;
-          padding-left: 10rpx;
-        }
-        .paymentNum {
-          border: 2rpx solid #E4E5E6;
-          color: #C5AA7B;
-          font-size: 20rpx;
-          padding: 5rpx;
-        }
+      .orderBtn {
+        margin-right: 30rpx;
       }
-      .itemPrice {
-        display: flex;
-        align-items: center;
-        padding: 0 20rpx 10rpx 20rpx;
-        margin-top: 20rpx;
-        .price {
-          font-size: 40rpx;
-          color: #C83732;
-          margin-right: 10rpx;
-        }
-        .originalPrice {
-          color: #CCCCCC;
-          font-size: 24rpx;
-          text-decoration: line-through;
-        }
+      .homeBtn {
+        background: #333333;
+        border: none;
+        color: #FFEBC4;
       }
     }
   }

+ 1 - 0
pages_category_page1/goodsModule/evaluate.vue

@@ -117,6 +117,7 @@
 					return
 				}
 				uni.showLoading({
+          mask: true,
 				    title: '提交中...',
 				})
 				if(this.fileList.length>0){

+ 1 - 0
pages_category_page1/goodsModule/evaluateList.vue

@@ -80,6 +80,7 @@
 			//点赞
 			zanTap(index, likeId, actionType) {
 				uni.showLoading({
+          mask: true,
 					title: '提交中...',
 				})
 				NET.request(API.LikeOrUnLikeComment, {

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1074 - 1097
pages_category_page1/goodsModule/goodsDetails.vue


+ 264 - 297
pages_category_page1/goodsModule/goodsList.vue

@@ -6,7 +6,6 @@
         <view class="searchImg-box flex-items-plus">
           <image class="searchImg" src="../../static/img/searchImg.png"></image>
           <input class="search-box" v-model="keyWord" placeholder-class="searchboxPlace" placeholder="请输入您想要的宝贝" />
-<!--          <image class="searchClose-icon" @click="searchTextDel" src="../../static/img/index/searchClose_icon.png"></image>-->
         </view>
         <label class="mar-left-40 fs28" @click="searchList(1)">搜索</label>
       </view>
@@ -20,8 +19,6 @@
         <view class="r">
           <view class="arrowUp" :class="{activeUp: type == 1}"></view>
           <view class="arrowDown" :class="{activeDown: type == 2}"></view>
-          <!--          <image src="../../static/images/arrowSortUp.png" v-if="type == 1" class="arrow-img padd-t"></image>-->
-          <!--          <image src="../../static/images/arrowSortDown.png" v-if="type == 2" class="arrow-img padd-b"></image>-->
         </view>
       </view>
       <view class="nav-item-sort" @click="sortTap(3)">
@@ -29,48 +26,21 @@
         <view class="r">
           <view class="arrowUp" :class="{activeUp: volume == 1}"></view>
           <view class="arrowDown" :class="{activeDown: volume == 2}"></view>
-          <!--          <image src="../../static/images/arrowSortUp.png" v-if="volume == 1" class="arrow-img padd-t"></image>-->
-          <!--          <image src="../../static/images/arrowSortDown.png" v-if="volume == 2" class="arrow-img padd-b"></image>-->
         </view>
       </view>
     </view>
-		<view v-if="list.length>0" class="listBox">
+		<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 v-if="item.activityType === 0" class="goodsDetails flex-items-plus flex-row">
-					<image class="goodsImg" :src="item.image"></image>
-					<view class="mar-left-30">
-						<view class="goodsName-box overflowNoDot">
-							<label class="goodsName fs26">{{item.productName}}</label>
-						</view>
-            <view class="usersBox">
-              <label class="fs24 font-color-C5AA7B" v-if="item.users != null">{{item.users}}人付款</label>
-              <label class="fs24 font-color-C5AA7B" v-else>0人付款</label>
-            </view>
-						<view class="priceBuyNum-box flex-items mar-top-20">
-							<view>
-								<label class="fs30 font-color-C83732">¥</label>
-							    <label class="fs36 font-color-C83732 mar-left-10">{{item.price}}</label>
-							</view>
-							<view style="margin-left: 20upx; color: #CCCCCC; text-decoration:line-through">
-								<label class="fs24">¥{{item.originalPrice}}</label>
-							</view>
-						</view>
-						<view class="flex-display flex-sp-between flex-row mar-top-10 flex-items shopName">
-							<label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
-<!--							<image class="arrowImg" src="../../static/img/user/arrow.png"></image>-->
-						</view>
-					</view>
-				</view>
-				<view v-else class="spikeList goodsDetails">
+				<view class="spikeList goodsDetails">
 				  <view class="listItem">
 				    <view class="itemBox">
 				      <img :src="item.image">
 				    </view>
-				    <view class="itemInfo mar-top-30">
+				    <view class="itemInfo">
 				      <p>{{item.productName}}</p>
 				      <view class="number" v-if="item.users != null">
                 <view class="numText">{{item.users}}人付款</view>
-                <view class="numText" v-if="item.total !=0">限量{{item.total}}件</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="../../static/images/groupBuyIcon.png"></image>
@@ -85,9 +55,8 @@
 							</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-10 flex-items shopName">
+					  <view class="flex-display flex-sp-between flex-row mar-top-20 flex-items shopName">
 					  	<label class="fs22 font-color-FFEBC4">{{item.shopName}}</label>
-<!--					  	<image class="arrowImg" src="../../static/img/user/arrow.png"></image>-->
 					  </view>
 				    </view>
 				  </view>
@@ -96,11 +65,16 @@
 		</view>
 
 		<!-- 搜索为空 -->
-		<view v-else class="emptyCart-box flex-items-plus flex-column">
+		<view v-if="ifEmpty" class="emptyCart-box flex-items-plus flex-column">
 			<image class="emptyCart-img" src="../../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="topLeft > 400 && list.length > 0">
+			<image class="reach-icon" src="@/static/img/reachBottom.png" mode="widthFix"></image>
+			<text class="reach-text">这里到底了哦~~</text>
+		</view>
 	</view>
 </template>
 
@@ -121,6 +95,8 @@
         ifNew:0,//是否新品
         type:1,//价格排序条件
         volume:1,//销量排序条件
+				topLeft: 0,
+        ifEmpty: false
 			}
 		},
 		onLoad(option) {
@@ -140,6 +116,9 @@
 				this.searchList(0)
 			}
 		},
+		onPageScroll(e) {
+			this.topLeft = e.scrollTop
+		},
 		methods: {
       sortTap(index){
         this.page = 1
@@ -161,7 +140,7 @@
 				this.keyWord = ''
 			},
 			searchList(type){
-				wx.showLoading({
+        uni.showLoading({
 				      title: '加载中...',
 				})
 				if(type == 1){
@@ -179,6 +158,9 @@
 					}, 'GET').then(res => {
 						uni.hideLoading()
 						this.list = this.list.concat(res.data.list)
+            if (this.list.length === 0) {
+              this.ifEmpty = true
+            }
 					}).catch(res => {
 						uni.hideLoading()
 					})
@@ -192,6 +174,9 @@
 					}, 'GET').then(res => {
 						uni.hideLoading()
 						this.list = this.list.concat(res.data.list)
+            if (this.list.length === 0) {
+              this.ifEmpty = true
+            }
 					}).catch(res => {
 						uni.hideLoading()
 					})
@@ -207,164 +192,135 @@
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 page {
   background: #f8f8f8;
 }
-	input{padding-left: 80upx;}
-	.container{
-		height: 100%;
-    background: #f8f8f8;
-    .search {
-      padding: 20rpx;
-      background: #FFFFFF;
-      border-top: 2rpx solid #F3F4F5;
-    }
-    .searchImg-box {
-      position: relative;
-    }
-		.emptyCart-box{
-			margin-top: 70upx;
-			.emptyCart-img{
-				width: 113upx;
-				height: 98upx;
-			}
-		}
-    .searchBg {
-      width: 100%;
-      display: flex;
-      background-color: #F7F7F7;
-      align-items: center;
-      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{
-      background: #FFFFFF;
-      margin-top: 20rpx;
-      box-sizing: border-box;
-			.goodsDetails{
-				border-bottom: 1upx solid #EDEDED;
-        padding-top: 30rpx;
-				padding-bottom: 30upx;
-        position: relative;
-				.goodsName-box{
-					width: 389upx;
-					height: 85upx;
-					.img618-cion{
-						width:70upx;
-						height:36upx;
-					}
-				}
-        .shopName {
-          position: absolute;
-          left: 0;
-          top: 0;
-          height: 50rpx;
-          background: #333333;
-          opacity: 1;
-          border-radius: 0 20rpx 20rpx 0;
-          padding: 10rpx 15rpx;
-        }
-				.goodsImg{
-					width: 260upx;
-					height: 260upx;
-				}
-				.discounts-box{
-					margin-left: -10upx;
-					margin-top: 20upx;
-					.discounts-text{
-						margin-left: 10upx;
-						color: #C5AA7B;
-						background-color: #FFE4CC;
-						padding: 6upx 12upx;
-						border-radius: 4upx;
-					}
-				}
-				.arrowImg{
-					width: 20upx;
-					height: 20upx;
-				}
-			}
-
+// 触底样式
+.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%;
+  background: #f8f8f8;
+  .search {
+    padding: 20rpx;
+    background: #FFFFFF;
+    border-top: 2rpx solid #F3F4F5;
+  }
+  .searchImg-box {
+    position: relative;
+  }
+	.emptyCart-box{
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		margin: auto;
+		.emptyCart-img{
+			width: 113upx;
+			height: 98upx;
 		}
-		.spikeList {
-			.arrowImg{
-				width: 20upx;
-				height: 20upx;
-			}
-		  // padding: 108upx 30upx 20upx 30upx;
-		  padding-top: 30rpx;
-		  border-bottom: 1upx solid #EDEDED;
-		  .listItem {
-		    display: flex;
-		    // padding-bottom: 10upx;
-		    border-bottom: 1upx solid #EEEEEE;
-		    margin-bottom: 30upx;
+	}
+  .searchBg {
+    width: 100%;
+    display: flex;
+    background-color: #F7F7F7;
+    align-items: center;
+    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{
+    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: 260upx;
-		      height: 260upx;
-		      margin-right: 30upx;
-		      img {
-		        width: 100%;
-		        height: 100%;
-		      }
-		    }
-		    .itemInfo {
-		      flex: 1;
-		      p {
-		        font-size: 26upx;
-		        color: #333333;
-		        line-height: 40upx;
-		        margin-bottom: 20upx;
-		        text-overflow: -o-ellipsis-lastline;
-		        overflow: hidden;
-		        text-overflow: ellipsis;
-		        display: -webkit-box;
-		        -webkit-line-clamp: 2;
-		        line-clamp: 2;
-		        -webkit-box-orient: vertical;
-		      }
-		      .number {
-		        color: #999999;
-		        font-size: 26upx;
+        &: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;
+            line-height: 40upx;
+            margin-bottom: 30upx;
+            text-overflow: -o-ellipsis-lastline;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            display: -webkit-box;
+            -webkit-line-clamp: 2;
+            line-clamp: 2;
+            -webkit-box-orient: vertical;
+          }
+          .number {
+            color: #999999;
+            font-size: 26upx;
             display: flex;
             align-items: center;
             .numText {
@@ -376,130 +332,141 @@ page {
               font-size: 20rpx;
               margin-right: 10rpx;
             }
-		      }
-		    }
-		  }
-		}
-    .listBox {
-      padding: 0 24rpx;
-      box-sizing: border-box;
-      .usersBox {
-        margin-top: 20rpx;
-        label {
-          padding: 10rpx;
-          border: 2rpx solid #E4E5E6;
+          }
         }
       }
+      .shopName {
+        position: absolute;
+        left: 0;
+        top: 0;
+        height: 50rpx;
+        background: #333333;
+        opacity: 1;
+        border-radius: 0 20rpx 20rpx 0;
+        padding: 10rpx 15rpx;
+      }
     }
 	}
-  .shop-list-nav {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    height: 80rpx;
-    line-height: 76rpx;
-    background: #fff;
+  .listBox {
+    padding: 0 24rpx;
+    box-sizing: border-box;
+    .usersBox {
+      margin-top: 20rpx;
+      label {
+        padding: 10rpx;
+        border: 2rpx solid #E4E5E6;
+      }
+    }
   }
+}
+.shop-list-nav {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  height: 80rpx;
+  line-height: 76rpx;
+  background: #fff;
+}
 
-  .nav-item {
-    flex: 1;
-    font-size: 30rpx;
-    color: #666;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    height: 80rpx;
-    line-height: 76rpx;
-  }
+.nav-item {
+  flex: 1;
+  font-size: 30rpx;
+  color: #666;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  height: 80rpx;
+  line-height: 76rpx;
+}
 
-  .nav-title {
-  }
+.nav-title {
+}
 
-  .nav-item.active {
-    color: #C5AA7B;
-  }
+.nav-item.active {
+  color: #C5AA7B;
+}
 
-  .nav-item .line {
-    display: inline-block;
-    width: 80rpx;
-    height: 4rpx;
-    background: #fff;
-    border-radius: 2rpx;
-  }
+.nav-item .line {
+  display: inline-block;
+  width: 80rpx;
+  height: 4rpx;
+  background: #fff;
+  border-radius: 2rpx;
+}
 
-  .nav-item.active .line {
-    background: #C5AA7B;
-  }
+.nav-item.active .line {
+  background: #C5AA7B;
+}
 
-  .nav-item.padd-l {
-    padding-left: 20%;
-    box-sizing: border-box;
-  }
-  .active{
-    color: #C5AA7B;
+.nav-item.padd-l {
+  padding-left: 20%;
+  box-sizing: border-box;
+}
+.active{
+  color: #C5AA7B;
+}
+.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;
+}
+
+.nav-item-sort .r {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  margin-left: 5rpx;
+  .arrowDown {
+    width: 0;
+    height: 0;
+    border-width: 10rpx;
+    border-style: solid;
+    border-color: #CCCCCC transparent transparent transparent;
+    margin-top: 2rpx;
   }
-  .nav-item.padd-r {
-    padding-right: 20%;
-    box-sizing: border-box;
+  .arrowUp {
+    margin-bottom: 2rpx;
+    width: 0;
+    height: 0;
+    border-width: 10rpx;
+    border-style: solid;
+    border-color: transparent transparent #CCCCCC transparent;
   }
-
-  .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;
+  .activeDown {
+    border-color: #C5AA7B transparent transparent transparent;
   }
-
-  .nav-item-sort .r {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    margin-left: 5rpx;
-    .arrowDown {
-      width: 0;
-      height: 0;
-      border-width: 10rpx;
-      border-style: solid;
-      border-color: #CCCCCC transparent transparent transparent;
-      margin-top: 2rpx;
-    }
-    .arrowUp {
-      margin-bottom: 2rpx;
-      width: 0;
-      height: 0;
-      border-width: 10rpx;
-      border-style: solid;
-      border-color: transparent transparent #CCCCCC transparent;
-    }
-    .activeDown {
-      border-color: #C5AA7B transparent transparent transparent;
-    }
-    .activeUp {
-      border-color: transparent transparent #C5AA7B transparent;
-    }
+  .activeUp {
+    border-color: transparent transparent #C5AA7B transparent;
   }
+}
 
-  //.nav-item-sort .r .arrow-img {
-  //  width: 32rpx;
-  //  height: 32rpx;
-  //  padding: 7rpx;
-  //  box-sizing: border-box;
-  //}
-  //// #ifdef MP-ALIPAY
-  //.nav-item-sort .r .arrow-img {
-  //  width: 16rpx;
-  //  height: 16rpx;
-  //  padding: 4rpx;
-  //  box-sizing: border-box;
-  //}
-  .search {
-    padding-top: 20rpx;
-  }
-  // #endif
+//.nav-item-sort .r .arrow-img {
+//  width: 32rpx;
+//  height: 32rpx;
+//  padding: 7rpx;
+//  box-sizing: border-box;
+//}
+//// #ifdef MP-ALIPAY
+//.nav-item-sort .r .arrow-img {
+//  width: 16rpx;
+//  height: 16rpx;
+//  padding: 4rpx;
+//  box-sizing: border-box;
+//}
+.search {
+  padding-top: 20rpx;
+}
+// #endif
 </style>

+ 56 - 41
pages_category_page1/goodsModule/invitePoster.vue

@@ -47,7 +47,8 @@
 				headImage:'',
 				image:'',
 				qrcode:'',
-				qrcodeimg:''
+				qrcodeimg:'',
+				loadingQrcode: true
 			};
 		},
 		onLoad(options) {
@@ -56,11 +57,18 @@
 		},
 		methods:{
 			savePoster(type){
+				if (this.loadingQrcode) {
+					uni.showToast({
+						icon:"none",
+						title:"请稍等,正在生成二维码..."
+					})
+					return
+				}
 				if(type == 1){
 					uni.showLoading({
-						title:"保存中..."
+            mask: true,
+						title:"生成图片中..."
 					})
-          console.log(9999)
 					let that = this
 					setTimeout(function(){
             // #ifdef H5 || MP-WEIXIN || APP-PLUS
@@ -69,7 +77,7 @@
 							quality: 0, // 图片质量
 							canvasId: 'posterCanvas', // 画布ID
 							success(res) {
-							  console.log(res.tempFilePath, 'test')
+							  console.log(res.tempFilePath, 'test0000')
                 that.saveDownload(res.tempFilePath)
 							},
 							fail() {
@@ -116,6 +124,7 @@
 					},5000)
 				}else if(type == 2){
 					uni.showLoading({
+            mask: true,
 						title:"图片生成中..."
 					})
 					let that = this
@@ -161,43 +170,48 @@
 				}
 			},
       saveDownload (file) {
-        uni.downloadFile({
-          url: file,//网络路径,下载下来
-          success: (res1) => {
-            if (res1.statusCode === 400 || res1.statusCode === 200) {
-              // 2-保存图片至相册
-              console.log(2222)
-              uni.saveImageToPhotosAlbum({ // 存成图片至手机
-                filePath: file, //画布保存的图片临时文件
-                success(res2) {
-                  console.log(3333)
-                  uni.hideLoading();
-                  uni.showToast({
-                    title: '图片保存成功~',
-                    duration: 2000
-                  })
-                },
-                fail(res3) {
-                  if (res3.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
-                    that.$store.dispatch('SetPhoneShow', 1)
-                    uni.showToast({
-                      title: '保存失败,稍后再试',
-                      duration: 2000,
-                      icon: 'none'
-                    })
-                  } else {
-                    uni.showToast({
-                      title: '保存失败,稍后再试',
-                      duration: 2000,
-                      icon: 'none'
-                    })
-                  }
-                  uni.hideLoading();
-                }
-              })
-            }
-          }
-        })
+				const that = this
+			  uni.showLoading({
+			  mask: true,
+			  			title:"图片保存中..."
+			  		})
+	        console.log(file,'test1')
+	        uni.getImageInfo({
+	          src: file,
+	          success: (res1) => {
+	            console.log(res1, 'test2')
+	              // 2-保存图片至相册
+	              console.log(2222)
+	              uni.saveImageToPhotosAlbum({ // 存成图片至手机
+	                filePath: res1.path, //画布保存的图片临时文件
+	                success(res2) {
+	                  console.log(3333)
+	                  uni.hideLoading();
+	                  uni.showToast({
+	                    title: '图片保存成功~',
+	                    duration: 2000
+	                  })
+	                },
+	                fail(res3) {
+	                  if (res3.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
+	                    // that.$store.dispatch('SetPhoneShow', 1)
+	                    uni.showToast({
+	                      title: '保存失败,请检查是否授权小程序保存图片!',
+	                      duration: 3000,
+	                      icon: 'none'
+	                    })
+	                  } else {
+	                    uni.showToast({
+	                      title: '保存失败,稍后再试',
+	                      duration: 2000,
+	                      icon: 'none'
+	                    })
+	                  }
+	                  uni.hideLoading();
+	                }
+	              })
+	          }
+	        })
       },
 			getShare(){
 				NET.request(API.getShare,
@@ -211,6 +225,7 @@
 				"GET").then(res => {
 					this.qrcode = res.data.qrcode
 					this.getCanvas()
+					this.loadingQrcode = false
 				}).catch(res => {
 				})
 			},

+ 42 - 9
pages_category_page1/goodsModule/inviteSpell.vue

@@ -98,7 +98,7 @@
 				</view>
 			</view>
 		</u-popup>
-		<shareSpell :isshareShow="isshareShow" @shareCancel='shareCancel' :url="url"></shareSpell>
+		<shareSpell ref="shareSpell" @shareCancel='shareCancel' :url="url"></shareSpell>
 	</view>
 </template>
 
@@ -119,7 +119,6 @@
 				}, {
 					name: '人满成团 失败退款'
 				}, ],
-				isshareShow:false,
 				collageId:0,
 				orderId:0,
 				type:0,
@@ -147,12 +146,45 @@
 				shopId:0,
 				attrList: [],
 				productDetail:{},
-				url:''
+				url:'',
+				shareTitle: ''
 			};
 		},
 		components:{
 			shareSpell
 		},
+		onShareAppMessage: function(res) {
+			var that = this;
+			//console.log('res=====',res);
+			if (res.from === 'button') {
+				//console.log('来自页面内转发按钮');
+			} else if (res.from === 'menu'){
+				//console.log('右上角菜单转发按钮');
+			}
+			this.url = '/pages_category_page1/goodsModule/inviteSpell?collageId='
+					+ this.collageId +'&orderId='+ this.orderId+'&type=0'+'&productId='+this.productId+'&skuId='+this.skuId+'&shopGroupWorkId='+this.shopGroupWorkId
+			this.shareTitle = `【仅剩${this.remainPerson}个名额】我${this.inviteSpell.price}元拼了${this.inviteSpell.productName}`
+			// 返回数据
+			return {
+				title: that.shareTitle,
+				path: that.url,
+				success: function(res) {
+					// 转发成功,可以把当前页面的链接发送给后端,用于记录当前页面被转发了多少次或其他业务
+					wx.request({
+						url: app.buildUrl("/member/share"),
+						data: {
+							url: utils.getCurrentPageUrlWithArgs()
+						},
+						success: function(res) {
+							//console.log('成功');
+						}
+					});
+				},
+				fail: function(res) {
+					// 转发失败
+				}
+			}
+		},
 		onUnload() {
 			if(this.timeOut){
 			    clearTimeout(this.timeOut)
@@ -169,7 +201,7 @@
 			this.getInviteSpell()
 			this.getProductSku()
 			this.queryProductDetail()
-			this.url = API.shareLink + '/#/pages_category_page1/goodsModule/inviteSpell?collageId='
+			this.url = '/pages_category_page1/goodsModule/inviteSpell?collageId='
 					+ this.collageId +'&orderId='+ this.orderId+'&type=0'+'&productId='+this.productId+'&skuId='+this.skuId+'&shopGroupWorkId='+this.shopGroupWorkId
 		},
 		methods:{
@@ -323,10 +355,10 @@
 				}
 			},
 			shareClick(){
-				this.isshareShow = true
+				this.$refs.shareSpell.shareShow = true
 			},
 			shareCancel(){
-				this.isshareShow = false
+				this.$refs.shareSpell.shareShow = false
 			},
 			goinvitePoster(){
 			  console.log(this.inviteSpell, 'test')
@@ -348,6 +380,7 @@
 			},
 			getInviteSpell(){
 				uni.showLoading({
+          mask: true,
 				  title: '加载中...',
 				})
 				NET.request(API.getInviteSpell, {
@@ -656,7 +689,7 @@ page{background-color: #F7F7F7;}
 		width: 690upx;
 		height: 80upx;
 		border-radius: 40upx 40upx;
-		background-image: linear-gradient(135deg, #FFA100 10%, #FF7911 100%);
+		background-color: #3D3C3D;
 		color: #FFFEFE;
 		font-size: 28upx;
 		line-height: 80upx;
@@ -690,7 +723,7 @@ page{background-color: #F7F7F7;}
 				width: 343upx;
 				height: 80upx;
 				border-radius: 40upx 0 0 40upx;
-				background-color: #FFC300;
+				background-color: #3D3C3D;
 				color: #FFFEFE;
 				font-size: 28upx;
 				line-height: 80upx;
@@ -702,7 +735,7 @@ page{background-color: #F7F7F7;}
 				width: 343upx;
 				height: 80upx;
 				border-radius: 0 40upx 40upx 0;
-				background-color: #FF6F00;
+				background-color: #3D3C3D;
 				color: #FFFEFE;
 				font-size: 28upx;
 				line-height: 80upx;

+ 124 - 103
pages_category_page1/goodsModule/userEvaluate.vue

@@ -2,13 +2,24 @@
 	<view class="container">
 		<!-- 我的评论 -->
 		<view class="evaluateTitle-box flex-row-plus flex-sp-around">
-			<view class="allEvaluate" :class="{'evaluateTitle-on' : evaluateTitleFlag == 1}" @click="evaluateTitleClick(1)">全部评价({{myCommentList.total}})</view>
+			<view class="allEvaluate"
+				:class="{'evaluateTitle-on' : evaluateTitleFlag == 1}"
+				@click="evaluateTitleClick(1)"
+			>全部评价({{ myCommentList.total || 0}})</view>
       <view class="centerLine">|</view>
-			<view :class="{'evaluateTitle-on' : evaluateTitleFlag == 2}" @click="evaluateTitleClick(2)">有图({{myCommentList.imageTotal}})</view>
+			<view
+				:class="{'evaluateTitle-on' : evaluateTitleFlag == 2}"
+				@click="evaluateTitleClick(2)"
+			>有图({{ myCommentList.imageTotal || 0}})</view>
 		</view>
 		<view v-if="evaluateTitleFlag == 1" class="mar-top-20">
-			<template v-if="myCommentList.total > 0">
-				<view class="evaluate-contentbox" @click="commentDetails(index)" v-for="(item, index) in commentVOList" :key="index">
+			<template>
+				<view
+					class="evaluate-contentbox"
+					v-for="(item, index) in commentVOList"
+					:key="index"
+					@click="commentDetails(index)"
+				>
 					<view class="evaluate-content flex-items flex-row flex-sp-between">
 						<view class="flex-items">
 							<image class="user-headSmallImg" v-if="item.headImage" :src="item.headImage"></image>
@@ -61,14 +72,18 @@
           </view>
 				</view>
 			</template>
-			<view v-else class="emptyOrder-box flex-items-plus flex-column">
+			<view v-if="evaluateEmpty" class="emptyOrder-box flex-items-plus flex-column">
 				<image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
 				<label class="font-color-999 fs26 mar-top-30">你还没有评论哦~</label>
 			</view>
 		</view>
 		<view v-if="evaluateTitleFlag == 2" class="mar-top-20">
-			<template v-if="myCommentList.imageTotal>0">
-			<view class="evaluate-contentbox" v-for="(item, index) in commentVOList" :key="index">
+			<template>
+			<view
+				class="evaluate-contentbox"
+				v-for="(item, index) in commentVOList"
+				:key="index"
+			>
 				<view class="evaluate-content flex-column" @click="commentDetails(index)" >
 					<view class="flex-items">
 						<image class="user-headSmallImg" v-if="item.headImage" :src="item.headImage"></image>
@@ -108,7 +123,7 @@
 				</view>
 			</view>
 			</template>
-			<view v-else class="emptyOrder-box flex-items-plus flex-column">
+			<view v-if="evaluateEmpty" class="emptyOrder-box flex-items-plus flex-column">
 				<image class="emptyOrder-img" src="../../static/img/bgnull.png"></image>
 				<label class="font-color-999 fs26 mar-top-30">你还没有评论哦~</label>
 			</view>
@@ -129,6 +144,8 @@
 				page:1,//当前页
 				pageSize:20,//每页记录数
 				loadingType:0,
+				topLeft: 0,
+        evaluateEmpty: false
 			}
 		},
 		onLoad() {
@@ -166,6 +183,7 @@
 				return imgDataResult
 			},
 			evaluateTitleClick(type) {
+        this.evaluateEmpty = false
 				if(type == 1){
 					this.state = ''
 				}else{
@@ -194,6 +212,9 @@
 					}
 					this.myCommentList = res.data
 					this.commentVOList = this.commentVOList.concat(res.data.page.list)
+          if (this.commentVOList.length === 0) {
+            this.evaluateEmpty = true
+          }
 				}).catch(res => {
           uni.hideLoading()
           uni.showToast({
@@ -235,122 +256,122 @@
 	}
 </script>
 
-<style lang="scss">
-	page {
-		background-color: #FFFFFF;
-	}
+<style lang="scss" scoped>
+page {
+	background-color: #FFFFFF;
+}
 
-	.container {
-		.emptyOrder-box {
-			margin-top: 70upx;
+.container {
+	.emptyOrder-box {
+		margin-top: 70upx;
 
-			.emptyOrder-img {
-				margin-top: 45%;
-				width: 113upx;
-				height: 98upx;
-			}
+		.emptyOrder-img {
+			margin-top: 45%;
+			width: 113upx;
+			height: 98upx;
 		}
+	}
 
-		.evaluateTitle-box {
-			color: #CCCCCC;
-			margin-top: 26upx;
-      border-bottom: 2rpx solid #F3F4F5;
-			.evaluateTitle-on {
-				padding-bottom: 20upx;
-				border-bottom: 4upx solid #C5AA7B;
-        color: #333333;
-			}
+	.evaluateTitle-box {
+		color: #CCCCCC;
+		margin-top: 26upx;
+    border-bottom: 2rpx solid #F3F4F5;
+		.evaluateTitle-on {
+			padding-bottom: 20upx;
+			border-bottom: 4upx solid #C5AA7B;
+      color: #333333;
 		}
+	}
 
-		.evaluate-contentbox {
+	.evaluate-contentbox {
+		display: flex;
+		justify-content: center;
+		flex-direction: column;
+		padding: 30upx 30upx;
+		background-color: #FFFFFF;
+    border-bottom: 2rpx solid #F3F4F5;
+		.evaluate-content {
+			width: 670upx;
 			display: flex;
-			justify-content: center;
-			flex-direction: column;
-			padding: 30upx 30upx;
-			background-color: #FFFFFF;
-      border-bottom: 2rpx solid #F3F4F5;
-			.evaluate-content {
-				width: 670upx;
-				display: flex;
-				justify-content: space-between;
-				.user-headSmallImg {
-					width: 46upx;
-					height: 46upx;
-					border-radius: 50%;
-				}
-        .skuValue {
-          text-align: left;
-          padding-left: 30rpx;
-        }
+			justify-content: space-between;
+			.user-headSmallImg {
+				width: 46upx;
+				height: 46upx;
+				border-radius: 50%;
 			}
+      .skuValue {
+        text-align: left;
+        padding-left: 30rpx;
+      }
+		}
 
-			.evaluateImg-box {
-				display: flex;
-				flex-direction: row;
-				flex-wrap: wrap;
-				margin-left: -9upx;
+		.evaluateImg-box {
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+			margin-left: -9upx;
 
-				.evaluate-Img {
-					width: 224upx;
-					height: 224upx;
-					border-radius: 10upx;
-					margin-left: 9upx;
-					margin-top: 9upx;
-				}
+			.evaluate-Img {
+				width: 224upx;
+				height: 224upx;
+				border-radius: 10upx;
+				margin-left: 9upx;
+				margin-top: 9upx;
 			}
+		}
 
-			.goodsDes-box {
-				background-color: #F7F7F7;
-				padding: 20upx 44upx 20upx 20upx;
-
-				.goodsDes-img {
-					width: 180upx;
-					height: 180upx;
-					border-radius: 10upx;
-				}
+		.goodsDes-box {
+			background-color: #F7F7F7;
+			padding: 20upx 44upx 20upx 20upx;
 
-				.goodsDesText-box {
-					width: 416upx;
-					margin-left: 30upx;
-				}
+			.goodsDes-img {
+				width: 180upx;
+				height: 180upx;
+				border-radius: 10upx;
+			}
 
+			.goodsDesText-box {
+				width: 416upx;
+				margin-left: 30upx;
+			}
 
 
-				.praise-box {
-					.praise-icon {
-						width: 50upx;
-						height: 50upx;
-					}
 
+			.praise-box {
+				.praise-icon {
+					width: 50upx;
+					height: 50upx;
 				}
-			}
 
-			.addComments-box {
-				border-top: 1upx solid #EEEEEE;
-				margin-top: 35upx;
 			}
 		}
-	}
-	.praise-icon {
-		width: 50upx;
-		height: 50upx;
-	}
-	.addCommentsBut {
-		width: 140upx;
-		height: 58upx;
-    background: #333333;
-		font-size: 26upx;
-		line-height: 58upx;
-		text-align: center;
-		color: #C5AA7B;
-	}
 
-	.addCommentsBut1 {
-		width: 140upx;
-		height: 58upx;
-		font-size: 26upx;
-    background: #333333;
-		line-height: 58upx;
-		text-align: center;
+		.addComments-box {
+			border-top: 1upx solid #EEEEEE;
+			margin-top: 35upx;
+		}
 	}
+}
+.praise-icon {
+	width: 50upx;
+	height: 50upx;
+}
+.addCommentsBut {
+	width: 140upx;
+	height: 58upx;
+  background: #333333;
+	font-size: 26upx;
+	line-height: 58upx;
+	text-align: center;
+	color: #C5AA7B;
+}
+
+.addCommentsBut1 {
+	width: 140upx;
+	height: 58upx;
+	font-size: 26upx;
+  background: #333333;
+	line-height: 58upx;
+	text-align: center;
+}
 </style>

+ 1 - 0
pages_category_page1/homeModule/special.vue

@@ -69,6 +69,7 @@
 			getSubjectDetailByKeyList() {
 				let _this = this
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.SubjectWithProduct + this.key, {

+ 300 - 0
pages_category_page1/integral/exchangeDetail.vue

@@ -0,0 +1,300 @@
+<template>
+  <view class="exchangeDetailBox">
+    <view class="topBg">
+      <view class="exchangeCoupon flex-items">
+        <view class="couponInfo">
+          <view class="font-color-FFF fs60">{{currentCoupon.couponType === 1 ? `满${currentCoupon.fullMoney}减${currentCoupon.reduceMoney}元` : `打${currentCoupon.reduceMoney}折`}}</view>
+          <view class="font-color-FFF mar-top-30 fs48">{{currentCoupon.couponType === 1 ? '满减券' : '折扣券'}}</view>
+        </view>
+      </view>
+    </view>
+    <view class="cent mar-top-30">
+      <view class="bg integralInfo flex-display flex-sp-between">
+        <view class="integralLeft flex-display">
+          <view>
+            <view class="fs48 font-color-C83732 flex-items">
+              <view class="mar-right-20">{{currentCoupon.credit||0}}积分</view>
+              <view class="remaining fs24 font-color-C83732">
+                还剩{{currentCoupon.stockNumber - currentCoupon.takeCount||0}}件
+              </view>
+            </view>
+            <view class="fs32 font-color-333" v-if="currentCoupon.fullMoney !== 0">满{{currentCoupon.fullMoney}}{{currentCoupon.couponType === 1 ? '减' : '打'}}{{currentCoupon.reduceMoney}}{{currentCoupon.couponType === 1 ? '元' : '折'}}券</view>
+            <view class="fs32 font-color-333" v-if="currentCoupon.fullMoney === 0">无门槛{{currentCoupon.couponType === 1 ? '减' : '打'}}{{currentCoupon.reduceMoney}}{{currentCoupon.couponType === 1 ? '元' : '折'}}券</view>
+          </view>
+        </view>
+        <view class="integralRight flex-column-plus flex-end">
+          <view class="remaining fs28 font-color-999">已兑{{currentCoupon.takeCount||0}}</view>
+        </view>
+      </view>
+    </view>
+    <view class="cent mar-top-30">
+      <view class="bg exchangeCondition">
+        <view class="conditionTit fs32 font-color-333 font-weight-bold">兑换条件</view>
+        <view class="flex-items flex-sp-between mar-top-30">
+          <text class="fs28 font-color-333">有效期</text>
+          <text class="fs28 font-color-999">{{currentCoupon.startTime.replace(/-/g, '.')}}-{{ currentCoupon.endTime.replace(/-/g, '.')}}</text>
+        </view>
+        <view class="flex-items flex-sp-between mar-top-30">
+          <text class="fs28 font-color-333">兑换须知</text>
+          <text class="fs28 font-color-999">虚拟权益兑换后不可退换</text>
+        </view>
+      </view>
+    </view>
+    <view class="cent mar-top-30">
+      <view class="bg proCondition">
+        <view class="conditionTit fs32 font-color-333 font-weight-bold">可用商品</view>
+        <view class="productItemBox mar-top-30">
+          <view class="productItem" v-for="item of productList" :key="item.productId" @click="goodsDateils(item.shopId,item.productId,item.skuId)">
+            <view class="productImg">
+              <image :src="item.image"></image>
+            </view>
+            <view class="productTit mar-top-10 fs28 font-color-333">{{ item.productName }}</view>
+            <view class="productPrice font-color-C83732 fs40">¥{{ item.price }}</view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="exchangeBtnBg flex-items">
+      <view class="exchangeBtn" @click.stop="receiveCoupon">立即兑换</view>
+    </view>
+    <!-- 签到弹窗 -->
+    <tui-modal :show="exchangeTips" :custom="true" :fadein="true">
+      <view class="Put-box1">
+        <view class="text-align fs34 fs-bold">
+          是否兑换此优惠券
+        </view>
+        <view class="flex-display flex-sp-between">
+          <view class="btn" @click="exchangeTips = false">
+            取消
+          </view>
+          <view class="btn submit" @click="exchangeFn">
+            确定
+          </view>
+        </view>
+      </view>
+    </tui-modal>
+  </view>
+</template>
+
+<script>
+import tuiModal from "@/components/modal/modal";
+import NET from "../../utils/request";
+import API from "../../config/api";
+export default {
+  name: "exchangeDetail",
+  components: {
+    tuiModal
+  },
+  data() {
+    return {
+      productList: [],
+      page: 1,
+      pageSize: 10,
+      loadingType: 0,
+      currentCoupon: {
+		  stockNumber:0,
+		  credit:0,
+		  takeCount:0
+	  },
+      exchangeTips: false
+    }
+  },
+  onReachBottom(){
+    if(this.loadingType == 1){
+      uni.stopPullDownRefresh()
+    }else{
+      this.page = this.page + 1
+      this.getProductList()
+    }
+  },
+  onLoad(options) {
+    if (options.data) {
+      this.currentCoupon = JSON.parse(options.data)
+	  console.log(this.currentCoupon)
+      this.getProductList()
+    }
+  },
+  methods: {
+    getProductList() {
+      uni.showLoading({
+        title: '加载中...',
+      })
+      NET.request(API.getCouponProducts, {
+        activityId: this.currentCoupon.couponId,
+        page: this.page,
+        pageSize: this.pageSize
+      }, 'GET').then(res => {
+        uni.hideLoading()
+        if (res.data.list.length === 0) {
+          this.loadingType = 1
+        } else {
+          this.productList = this.productList.concat(res.data.list)
+        }
+      }).catch(res => {
+        uni.hideLoading()
+      })
+    },
+    receiveCoupon() {
+      this.exchangeTips = true
+    },
+    exchangeFn() {
+      let paramsData = {
+        couponId: this.currentCoupon.couponId,
+        source: 3
+      }
+      NET.request(API.exchangeCoupon, paramsData, 'POST').then(res => {
+        this.exchangeTips = false
+        uni.showToast({
+          title: '兑换成功',
+          icon:"success"
+        })
+        // setTimeout(() => {
+        //   uni.navigateTo({
+        //     url: '/pages_category_page1/integral/index?tabActive=2'
+        //   })
+        // }, 2000)
+      }).catch(res => {
+        if(res.code !== '200'){
+          uni.showToast({
+            title:res.data.message,
+            icon:"none"
+          })
+        }
+      })
+    },
+    // 商品详情
+    goodsDateils(shopId, productId, skuId){
+      uni.navigateTo({
+        url: '/pages_category_page1/goodsModule/goodsDetails?shopId='+shopId + '&productId='+productId +'&skuId='+skuId
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+page {
+  background: #F8F8F8;
+}
+.exchangeDetailBox {
+  padding-bottom: 200rpx;
+  background: #F8F8F8;
+ .topBg {
+   background: url("../../static/images/addBankBg.png") no-repeat left top;
+   background-size: contain;
+   height: 350rpx;
+   padding: 40rpx 20rpx 0 20rpx;
+   .exchangeCoupon {
+     background: url("../../static/images/exchagneCoupon.png") no-repeat left top;
+     background-size: contain;
+     height: 302rpx;
+     border-radius: 16rpx;
+     .couponInfo {
+       color: #FDFED6;
+       margin-left: 48rpx;
+       font-weight: 400;
+     }
+   }
+  }
+  .cent {
+    padding: 0 20rpx;
+    .bg {
+      background: #FFFFFF;
+      padding: 30rpx;
+      border-radius: 16rpx;
+    }
+  }
+  .integralInfo {
+    .integralLeft {
+      .remaining {
+        width: auto;
+        height: 48rpx;
+        line-height: 48rpx;
+        padding: 0 15rpx;
+        text-align: center;
+        background: rgba(200, 55, 50, 0.16);
+        border-radius: 24rpx 24rpx 24rpx 0;
+        font-weight:300;
+      }
+    }
+  }
+  .conditionTit {
+    border-bottom: 2rpx solid #F3F4F5;
+    height: 92rpx;
+    line-height: 92rpx;
+  }
+  .productItemBox {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: flex-start;
+    width: 100%;
+    .productItem {
+      height: 420rpx;
+      flex: 1;
+      margin: 0 20rpx 40rpx 0;
+      width: calc((100% - 20rpx) / 2);
+      min-width: calc((100% - 20rpx) / 2);
+      max-width: calc((100% - 20rpx) / 2);
+      &:nth-child(2n) {
+        margin-right: 0;
+      }
+    }
+  }
+  .proCondition {
+    .productItem {
+      .productImg {
+        width: 325rpx;
+        height: 325rpx;
+        image {
+          width: 100%;
+          height: 100%;
+        }
+      }
+      .productTit {
+        overflow:hidden;
+        text-overflow:ellipsis;
+        white-space:nowrap;
+      }
+      .productPrice {
+        margin-top: 15rpx;
+      }
+    }
+  }
+  .exchangeBtnBg {
+    width: 100%;
+    height: 164rpx;
+    background: #FFFFFF;
+    box-shadow: 0 -1rpx 0rpx rgba(197, 202, 207, 0.5);
+    padding: 0 20rpx;
+    position: fixed;
+    left: 0;
+    bottom: 0;
+    .exchangeBtn {
+      width: 100%;
+      height: 100rpx;
+      line-height: 100rpx;
+      text-align: center;
+      background: #333333;
+      border-radius: 50rpx;
+      color: #FFEBC4;
+    }
+  }
+  .Put-box1 {
+    .btn {
+      text-align: center;
+      margin-top: 40rpx;
+      border: 1px solid #333333;
+      height: 80upx;
+      line-height: 80upx;
+      width: 100%;
+      color: #333333;
+    }
+
+    .submit {
+      background-color: #333333;
+      color: #FFEBC4;
+      margin-left: 20rpx;
+    }
+  }
+}
+</style>

+ 493 - 0
pages_category_page1/integral/index.vue

@@ -0,0 +1,493 @@
+<template>
+  <view class="memberCenter" v-if="ifShow">
+    <view class="memberBox">
+      <view class="posBox">
+        <view class="memberBoxTop">
+          <view class="memberTopPos" :style="{backgroundImage:'url('+levelInfo.memberLevelBackground+')'}">
+            <view class="memberTopBg">
+              <view class="flex-items">
+                <view class="avatarBox">
+                  <image :src="memberData.headImage"></image>
+                </view>
+                <view class="nameBox">
+                  <view class="name fs36">{{memberData.name}}</view>
+                  <view class="level">
+                    <image :src="levelInfo.memberLevelIcon"></image>
+                  </view>
+                </view>
+              </view>
+              <view class="integralInfo flex-items flex-sp-between mar-top-20">
+                <view class="itemBox">
+                  <view class="integraNum fs36 font-color-333">{{ memberData.totalCredit }}</view>
+                  <view class="fs24 font-color-666">累计积分</view>
+                </view>
+                <view class="itemBox">
+                  <view class="integraNum fs36 font-color-333">{{ memberData.totalCredit - memberData.credit }}</view>
+                  <view class="fs24 font-color-666">累计消费</view>
+                </view>
+                <view class="itemBox">
+                  <view class="integraNum fs36 font-color-333">{{ memberData.credit }}</view>
+                  <view class="fs24 font-color-666">剩余积分</view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="signBox flex-items flex-sp-between mar-top-30" @click="goToSign">
+      <view class="signLeft flex-items flex-sp-between">
+        <view class="signIcon"></view>
+        <view class="signText fs28 font-color-C5AA7B">积分签到</view>
+      </view>
+      <view class="u-arrow u-arrow-right"></view>
+    </view>
+    <view class="signTabs mar-top-30 flex-items">
+      <view :class="{active: tabActive === 1}" class="tabItem flex-items flex-center" @click="changeTab(1)">
+        <view class="icon detailIcon"></view>
+        <text>积分明细</text>
+      </view>
+      <view :class="{active: tabActive === 2}" class="tabItem flex-items flex-center" @click="changeTab(2)">
+        <view class="icon exchangeIcon"></view>
+        <text>积分兑换</text>
+      </view>
+    </view>
+    <view class="signInfo mar-top-20" v-if="tabActive === 1">
+      <view class="signInBox">
+        <view class="signItem flex-items flex-sp-between" v-for="(item, index) of integralRecord" :key="index">
+          <view class="leftBox flex-items">
+            <image src="../../static/images/signIcon1.png"></image>
+            <view class="leftInfo">
+              <label class="fs28 font-color-333">{{item.recordContent}}</label>
+              <view class="fs24 font-color-999">{{item.createTime}}</view>
+            </view>
+          </view>
+          <view class="rightBtn">{{item.recordType === 1 ? '+' : '-'}}{{item.credit}}</view>
+        </view>
+        <view class="emptyCart-box flex-items-plus flex-column" v-if="integralRecord.length === 0">
+          <image class="emptyCart-img" src="../../static/images/searchEmpty.png"></image>
+          <label class="font-color-999 fs26 mar-top-30">暂无记录~</label>
+        </view>
+      </view>
+    </view>
+    <view class="signExchange mar-top-20" v-else>
+      <view class="exchangeInfoBox">
+        <view class="exchangeItem flex-items flex-sp-between" v-for="(item, index) of creditCouponList" :key="index">
+          <view class="exchangeLeft flex-items">
+            <view class="discountBox mar-right-20">
+              <view class="fs24" v-if="item.couponType === 1">{{item.fullMoney === 0 ? `无门槛减${item.reduceMoney}元` : `满${item.fullMoney}元减${item.reduceMoney}元`}}</view>
+              <view class="fs24" v-else>{{item.fullMoney === 0 ? `无门槛打${item.reduceMoney}折` : `满${item.fullMoney}元打${item.reduceMoney}折`}}</view>
+              <view class="fs30">{{item.couponType === 1 ? '满减券' : '折扣券'}}</view>
+            </view>
+            <view class="exchangeInfo">
+              <view class="fs28 font-color-333" v-if="item.couponType === 1">{{item.fullMoney === 0 ? `无门槛减${item.reduceMoney}元` : `满${item.fullMoney}元减${item.reduceMoney}元`}}</view>
+              <view class="fs28 font-color-333" v-else>{{item.fullMoney === 0 ? `无门槛打${item.reduceMoney}折` : `满${item.fullMoney}元打${item.reduceMoney}折`}}</view>
+              <view class="fs24 state" v-if="item.stockNumber > 0">还剩{{item.stockNumber}}个</view>
+              <view class="fs24 state finish" v-else>已兑完</view>
+              <view class="integral fs32">{{ item.credit }}积分</view>
+            </view>
+          </view>
+          <view class="exchangeRight">
+            <view class="exchangeBtn fs28 font-color-FFF" v-if="item.state === 0 && item.stockNumber !== 0" @click="goExchangeDetail(item)">兑换</view>
+            <view class="exchangeBtn available fs28 font-color-FFF" v-if="item.stockNumber === 0">已兑完</view>
+            <view class="exchangeBtn available fs28 font-color-FFF" v-if="item.state === 1" @click="goExchangeDetail(item)">已兑换</view>
+          </view>
+        </view>
+        <view class="emptyCart-box flex-items-plus flex-column" v-if="creditCouponList.length === 0">
+          <image class="emptyCart-img" src="../../static/images/searchEmpty.png"></image>
+          <label class="font-color-999 fs26 mar-top-30">暂无优惠券~</label>
+        </view>
+      </view>
+    </view>
+    <tui-modal :show="isConvertible" :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="goToSign">
+            去签到
+          </view>
+        </view>
+        <view v-if="isConvertible" @click="isConvertible = false" class="cancelDel">
+          <image src="../../static/images/cancelClose.png" mode=""></image>
+        </view>
+      </view>
+    </tui-modal>
+  </view>
+</template>
+
+<script>
+import tuiModal from "@/components/modal/modal";
+const NET = require('../../utils/request')
+const API = require('../../config/api')
+export default {
+  name: "index",
+  components: {
+    tuiModal
+  },
+  data() {
+    return {
+      memberData: {},
+      equityList: [],
+      integralRecord: [],
+      creditCouponList: [],
+      levelInfo: {},
+      tabActive: 1,
+      isConvertible: false,
+      integralInfo: {
+        page: 1,
+        pageSize: 10,
+        session: ""
+      },
+      couponListInfo: {
+        page: 1,
+        pageSize: 10,
+        session: ""
+      },
+      ifShow: false
+    }
+  },
+  onLoad(option) {
+    this.memberData = uni.getStorageSync('storage_userInfo');
+    this.GetUser()
+    if (option.tabActive) {
+      this.tabActive = parseInt(option.tabActive)
+    }
+    this.getIntegralList()
+    this.getCreditCouponList()
+    this.getMemberByMemberLevel()
+  },
+  methods: {
+    GetUser() {
+      NET.request(API.GetUser, {}, 'GET').then(res => {
+        this.memberData = res.data
+        uni.setStorageSync('storage_userInfo', this.memberData);
+      }).catch(res => {
+
+      })
+    },
+    getIntegralList() {
+      // 获取签到信息
+      uni.showLoading({
+        mask: true,
+        title: '加载中...',
+      })
+      NET.request(API.selectCreditRecord, this.integralInfo, 'POST').then(res => {
+        uni.hideLoading()
+        this.ifShow = true
+        this.integralRecord = res.data.list
+      }).catch(res => {
+      })
+    },
+    // 获取可兑换优惠券列表
+    getCreditCouponList() {
+      NET.request(API.selectCreditCouponList, this.couponListInfo, 'POST').then(res => {
+        this.creditCouponList = res.data.list
+      }).catch(res => {
+      })
+    },
+    // 去首页
+    goToShopping () {
+      uni.switchTab({
+        url: '../../pages/tabbar/index/index'
+      })
+    },
+    getPercent(num, total){
+      num = parseFloat(num);
+      total = parseFloat(total);
+      if (isNaN(num) || isNaN(total)) {
+        return "-";
+      }
+      return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0;
+    },
+    // 获取会员等级
+    getMemberByMemberLevel() {
+      NET.request(`${API.getMemberByMemberLevel}/${this.memberData.memberLevelId}`,{}, 'GET').then(res => {
+        this.levelInfo = res.data
+        uni.setStorageSync('storage_levelInfo', this.levelInfo);
+      }).catch(res => {
+      })
+    },
+    // 签到
+    goToSign() {
+      uni.navigateTo({
+        url: '../../pages_category_page1/integral/sign'
+      })
+    },
+    // 跳转到兑换优惠详情
+    goExchangeDetail (item) {
+      console.log(item, 'test')
+      if (this.memberData.credit < item.credit) {
+        this.isConvertible = true
+      } else {
+        uni.navigateTo({
+          url: `../integral/exchangeDetail?data=${JSON.stringify(item)}`
+        })
+      }
+    },
+    // 切换tab
+    changeTab(type) {
+      this.tabActive = type
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+page {
+  background: #F8F8F8;
+}
+.memberCenter {
+  border-top: 2rpx solid #4b4b4b;
+  background: url("../../static/images/addBankBg.png") no-repeat left top;
+  background-size: contain;
+  min-height: 800rpx;
+  padding: 0 20rpx;
+  .memberBox {
+    min-height: 230rpx;
+    margin-top: 120rpx;
+    width: 100%;
+    border-radius: 25rpx;
+    background-size: contain;
+    position: relative;
+    box-sizing: border-box;
+    .posBox {
+      position: absolute;
+      width: 100%;
+      left: 0;
+      top: -80rpx;
+    }
+    .memberBoxTop {
+      position: relative;
+      .memberTopPos{
+        //background: url("../../static/images/integralBg.png") no-repeat left top;
+        background-size: cover;
+        height: 302rpx;
+        border-radius: 24rpx;
+        box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.05);
+        .memberTopBg {
+          padding: 40rpx 30rpx;
+          .integralInfo {
+            padding: 0 50rpx;
+            .itemBox {
+              text-align: center;
+            }
+          }
+        }
+      }
+    }
+    .avatarBox {
+      margin-left: 30rpx;
+      image {
+        width: 110rpx;
+        height: 110rpx;
+        border: 5rpx solid #FFFFFF;
+        border-radius: 50%;
+      }
+    }
+    .nameBox {
+      margin-left: 20rpx;
+      .name {
+        color: #71521B;
+        margin-right: 30rpx;
+      }
+      .level {
+        image {
+          width: 172rpx;
+          height: 50rpx;
+        }
+      }
+    }
+  }
+  .signBox {
+    background: #f9f6ed;
+    height: 96rpx;
+    border-radius: 24rpx;
+    padding: 0 20rpx;
+    .signLeft {
+      .signIcon {
+        background: url("../../static/images/signIcon.png") no-repeat center left;
+        background-size: contain;
+        height: 120rpx;
+        width: 96rpx;
+        margin-right: 20rpx;
+      }
+    }
+    .u-arrow {
+      width: 24rpx;
+      height: 24rpx;
+      border-top: 3rpx solid #C5AA7B;
+      border-right: 3rpx solid #C5AA7B;
+    }
+  }
+  .signTabs {
+    .tabItem {
+      width: 50%;
+      height: 96rpx;
+      border-radius: 16rpx;
+      text {
+        color: #999999;
+        font-size: 28rpx;
+      }
+      .icon {
+        width: 40rpx;
+        height: 40rpx;
+        margin-right: 15rpx;
+      }
+      .detailIcon {
+        background: url("../../static/images/detailIcon.png") no-repeat center center;
+        background-size: contain;
+      }
+      .exchangeIcon {
+        background: url("../../static/images/exchangeIcon.png") no-repeat center center;
+        background-size: contain;
+      }
+    }
+    .active {
+      background: #333333;
+      .detailIcon {
+        background: url("../../static/images/detailIcon1.png") no-repeat center center;
+        background-size: contain;
+      }
+      .exchangeIcon {
+        background: url("../../static/images/exchangeIcon1.png") no-repeat center center;
+        background-size: contain;
+      }
+      text {
+        color: #FFEBC4;
+      }
+    }
+  }
+  .signInfo {
+    background: #FFFFFF;
+    border-radius: 16rpx;
+    box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.05);
+    padding: 30rpx;
+    .signInBox {
+      .signItem {
+        border-top: 2rpx solid #F3F4F5;
+        padding: 30rpx 0;
+        .leftBox {
+          image {
+            width: 90rpx;
+            height: 90rpx;
+            margin-right: 30rpx;
+          }
+        }
+      }
+      .signItem:first-child {
+        border-top: none;
+      }
+      .rightBtn {
+        width: 160rpx;
+        height: 58rpx;
+        line-height: 58rpx;
+        background: #FFF9F6;
+        border-radius: 10rpx;
+        color: #C83732;
+        text-align: center;
+        font-weight: 300;
+        font-size: 24rpx;
+      }
+    }
+  }
+  .signExchange {
+    box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.05);
+    background: #FFFFFF;
+    border-radius: 16rpx;
+    padding: 40rpx 30rpx;
+    .exchangeInfoBox {
+      .exchangeItem {
+        padding-bottom: 20rpx;
+        margin-bottom: 20rpx;
+        border-bottom: 2rpx #F3F4F5 solid;
+        .exchangeLeft {
+          .discountBox {
+            color: #FDFED6;
+            width: 300rpx;
+            height: 146rpx;
+            background: url('../../static/images/exchangeItem.png') no-repeat left top;
+            background-size: contain;
+            padding: 30rpx 25rpx;
+          }
+          .exchangeInfo {
+            .state {
+              text-align: center;
+              background: #333333;
+              color: #FFEBC4;
+              font-size: 24rpx;
+              margin: 8rpx 0 4rpx 0;
+              padding: 8rpx 14rpx;
+              border-radius: 8rpx;
+            }
+            .finish {
+              color: #CCCCCC;
+              border: 2rpx solid #CCCCCC;
+              background: none;
+            }
+            .integral {
+              color: #D72E2E;
+            }
+          }
+        }
+        .exchangeRight {
+          height: 146rpx;
+          display: flex;
+          flex-direction: column;
+          justify-content: flex-end;
+          .exchangeBtn {
+            width: 120rpx;
+            height: 48rpx;
+            line-height: 48rpx;
+            text-align: center;
+            background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
+            box-shadow: 0 6rpx 12rpx rgba(233, 0, 0, 0.3);
+            border-radius: 24rpx;
+          }
+          .available {
+            background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
+            box-shadow: 0 6rpx 12rpx rgba(233, 0, 0, 0.3);
+          }
+        }
+      }
+      .exchangeItem:last-child {
+        border-bottom: none;
+      }
+    }
+  }
+  .cancelDel {
+    position: absolute;
+    bottom: -100rpx;
+    left: 45%;
+
+    image {
+      width: 60upx;
+      height: 60upx;
+
+    }
+  }
+  .Put-box1 {
+    .btn {
+      margin-top: 50rpx;
+      width: 100%;
+      height: 84rpx;
+      line-height: 84rpx;
+      text-align: center;
+      background: #333333;
+      color: #FFEBC4;
+    }
+  }
+  .emptyCart-box{
+    margin: 60upx 0;
+    .emptyCart-img{
+      width: 113upx;
+      height: 98upx;
+    }
+  }
+}
+</style>
+

+ 462 - 0
pages_category_page1/integral/sign.vue

@@ -0,0 +1,462 @@
+<template>
+  <view class="signBox" v-if="ifShow">
+    <view class="signBg">
+      <view class="signDayNumBox flex-center" v-if="continuousNum">
+        <view class="signDayNum fs28">
+          当前周期已连续签到
+          <text class="fs40">{{ continuousNum || '0' }}</text>
+          天
+        </view>
+      </view>
+      <view v-if="currentDay === lastDay" class="signState flex-center mar-top-30">
+        <view class="signStateBg flex-items flex-center noSign" @click="test">
+          <text class="fs48">已签到</text>
+        </view>
+      </view>
+      <view v-if="currentDay !== lastDay" class="signState flex-center mar-top-30" @click="signInFn" >
+        <view class="signStateBg flex-items flex-center">
+          <text class="fs48">未签到</text>
+        </view>
+      </view>
+      <view class="calendarBox">
+        <view class="calendarBg">
+          <view class="calendar-box">
+            <view class="month">
+              <view class="u-arrow u-arrow-left" @click="lastMonth"></view>
+              <view>{{year}}年{{month}}月</view>
+              <view class="u-arrow u-arrow-right" @click="nextMonth"></view>
+              <picker v-if="checkDate" class="picker" mode="date" fields="month" @change="changeDate" />
+            </view>
+            <view class="week">
+              <view :style="'color:'+(weeks==weeked?bgweek:'')+';'" v-for="weeks in weekArr">{{weeks}}</view>
+            </view>
+            <view class="day">
+              <view
+                class="dayItem"
+                v-for="(days,index) in dayArr"
+                :key="index"
+                @click="signToday(days,index)"
+              >
+                <view
+                  :class="[
+                    {'checkday':days.date==''},
+                    {'choose':days.date==currentDay},
+                    {'select': days.select === 1}
+                  ]"
+                  class="dayValue"
+                >{{days.day}}</view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="redEnvelope mar-top-20">
+      <view class="redEnvelopeBg flex-items flex-end">
+        <view>
+          <view class="fs32 font-color-333">积分兑换红包优惠券</view>
+          <view class="fs24 font-color-999 mar-top-10">各种大额红包等你兑换哦</view>
+          <view class="fs24 font-color-FFF exchangeBtn mar-top-20" @click="goToexchange">马上兑换</view>
+        </view>
+      </view>
+    </view>
+    <!-- 签到弹窗 -->
+    <tui-modal :show="signTips" :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="signTips = false">
+            取消
+          </view>
+          <view class="btn submit" @click="signTips = false">
+            确定
+          </view>
+        </view>
+      </view>
+    </tui-modal>
+  </view>
+</template>
+
+<script>
+import tuiModal from "@/components/modal/modal";
+const NET = require('../../utils/request')
+const API = require('../../config/api')
+export default {
+  components: {
+    tuiModal
+  },
+  name: "sign",
+  data() {
+    return {
+      signList: [],
+      year: new Date().getFullYear(), // 当前年
+      month: new Date().getMonth() + 1, // 当前月
+      continuousNum: '', // 连续签到天数
+      currentDay: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${this.formatNum(new Date().getDate())}`,
+      lastDay: '',
+      weeked: '', // 今天周几
+      dayArr: [], // 当前月每日
+      localDate: '', // 今天日期
+      day: new Date().getDate(), // 当前日
+      weekArr: ['日', '一', '二', '三', '四', '五', '六'], // 每周
+      type: 'sign',
+      checkDate: true,
+      bgweek: '#C5AA7B',
+      bgday: '#C5AA7B',
+      signTips: false,
+      ifShow: false
+    }
+  },
+  onLoad() {
+    this.getSignData()
+  },
+  methods: {
+    getSignData() {
+      uni.showLoading({
+        mask: true,
+        title: '请稍等...',
+      })
+      let currentDay = new Date().getFullYear() + '-' + this.formatNum(new Date().getMonth() + 1) + '-' + this.formatNum(new Date().getDate())
+      let selectMoth = this.year + '-' + this.formatNum(this.month)
+      NET.request(API.selectByMonth,
+        {
+          month: `${this.year}-${this.formatNum(this.month)}`
+        },
+        'POST')
+        .then(res => {
+          uni.hideLoading()
+          let currentMoth  = `${new Date().getFullYear()}-${this.formatNum(new Date().getMonth() + 1)}`
+          this.signList = res.data
+          // 初始日期
+          this.initDate()
+          // 今天日期
+          if (currentMoth === selectMoth) {
+            console.log('currentMoth === selectMoth', currentMoth === selectMoth)
+            this.continuousNum = this.signList[this.signList.length - 1].continueDay || 0;
+            this.lastDay = this.signList[this.signList.length - 1].createTime.substring(0,10);
+            this.localDate = currentDay;
+          }
+          // 今天周几
+          this.weeked = this.weekArr[new Date().getDay()];
+          // 签到功能
+          if (this.type != 'calendar') {
+            for (let i in this.dayArr) {
+              this.$set(this.dayArr[i], 'flag', false);
+            }
+          }
+          this.signList.forEach((item) => {
+            item['day'] = parseInt(item.createTime.slice(8, 10))
+          })
+          for (let i = 0; i < this.signList.length; i++) {
+            for (let j = 0; j < this.dayArr.length; j++) {
+              if (this.signList[i].day === this.dayArr[j].day && this.dayArr[j].date !== '') {
+                console.log(this.signList[i].day, '-', this.dayArr[j].day)
+                this.dayArr[j].select = 1
+              }
+            }
+          }
+          this.ifShow = true
+        console.log(this.dayArr, 'dayArr')
+      }).catch(res => {})
+    },
+    signDate(event) {
+      console.log(event);
+    },
+    // 签到
+    signInFn() {
+      uni.showLoading({
+        mask: true,
+        title: '请稍等...',
+      })
+      NET.request(API.creditSignIn, {}, 'POST').then(res => {
+        uni.hideLoading()
+        this.getSignData()
+        this.signTips = true
+      }).catch(res => {})
+    },
+    test() {
+      this.signTips = true
+    },
+    // 格式化日期位数
+    formatNum(num) {
+      return num < 10 ? ('0' + num) : num;
+    },
+    // 选择年月
+    changeDate(e) {
+      let that = this;
+      that.year = parseInt(e.detail.value.split('-')[0]);
+      that.month = parseInt(e.detail.value.split('-')[1]);
+      this.getSignData()
+    },
+    // 点击签到
+    signToday(obj, index) {
+    },
+    // 初始化日期
+    initDate() {
+      let that = this;
+      that.dayArr = [];
+      // 当前月总天数
+      let totalDay = new Date(that.year, that.month, 0).getDate();
+      // 遍历总天数将日期逐个添加至数组
+      for (let i = 1; i <= totalDay; i++) {
+        // 得到需补充天数
+        let value = (new Date(that.year, that.month - 1, i)).getDay();
+        // 补充前面空白日期
+        if (i == 1 && value != 0) that.addBefore(value);
+        // 添加本月日期
+        let obj = {};
+        obj.date = that.year + '-' + that.formatNum(that.month) + '-' + that.formatNum(i);
+        obj.day = i;
+        obj.select = 0
+        that.dayArr.push(obj);
+        // 补充后面空白日期
+        if (i == totalDay && value != 6) that.addAfter(value);
+      }
+    },
+    // 补充前面空白日期
+    addBefore(value) {
+      let that = this;
+      let totalDay = new Date(that.year, that.month - 1, 0).getDate();
+      for (let i = 0; i < value; i++) {
+        let obj = {};
+        obj.date = '';
+        obj.day = totalDay - (value - i) + 1;
+        that.dayArr.push(obj);
+      }
+    },
+    // 补充后空白日期
+    addAfter(value) {
+      let that = this;
+      for (let i = 0; i < (6 - value); i++) {
+        let obj = {};
+        obj.date = '';
+        obj.day = i + 1;
+        that.dayArr.push(obj);
+      }
+    },
+    // 上一个月
+    lastMonth() {
+      let that = this;
+      if (that.month == 1) {
+        that.year -= 1;
+        that.month = 12;
+      } else {
+        that.month -= 1;
+      }
+      that.getSignData();
+    },
+    // 下一个月
+    nextMonth() {
+      let that = this;
+      if (that.month == 12) {
+        that.year += 1;
+        that.month = 1;
+      } else {
+        that.month += 1;
+      }
+      that.getSignData();
+    },
+    goToexchange() {
+      uni.navigateTo({
+        url: '../../pages_category_page1/integral/index?tabActive=2'
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+page {
+  background: #F8F8F8;
+}
+.signBox {
+  padding-bottom: 50rpx;
+  .signBg {
+    background: url("https://ceres.zkthink.com/static/images/signBg.png") no-repeat left top;
+    background-size: contain;
+    min-height: 702rpx;
+    padding-top: 160rpx;
+    .signDayNumBox {
+      width: 100%;
+      .signDayNum {
+        color: #93866F;
+        text {
+          color: #FDF3D0;
+          margin: 0 10rpx;
+        }
+      }
+    }
+    .signState {
+      .signStateBg {
+        width: 300rpx;
+        height: 300rpx;
+        background: url("https://ceres.zkthink.com/static/images/signState.png") no-repeat left top;
+        background-size: contain;
+        text {
+          color: #C83732;
+        }
+      }
+      .noSign {
+        background: url("https://ceres.zkthink.com/static/images/signState1.png") no-repeat left top;
+        background-size: contain;
+        text {
+          color: #FFFFFF;
+        }
+      }
+    }
+    .checked {
+      .signStateBg {
+        text {
+          color: #FFFFFF;
+        }
+      }
+    }
+    .calendarBox {
+      padding: 0 20rpx;
+      min-height: 300rpx;
+      .calendarBg {
+        border-radius: 16rpx;
+        background: #FFFFFF;
+        box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.05);
+        overflow: hidden;
+      }
+    }
+  }
+  .redEnvelope {
+    padding: 0 20rpx;
+    .redEnvelopeBg {
+      height: 230rpx;
+      background: url("https://ceres.zkthink.com/static/images/redEnvelopeBg.png") no-repeat left top;
+      background-size: contain;
+      padding-right: 50rpx;
+      .exchangeBtn {
+        width: 160rpx;
+        height: 56rpx;
+        line-height: 56rpx;
+        background: #C83732;
+        border-radius: 8rpx;
+        text-align: center;
+      }
+    }
+  }
+}
+.calendar-box {
+  width: 100%;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.calendar-box,
+.month,
+.week,
+.day {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.month,
+.week,
+.day {
+  width: 100%;
+}
+
+.month {
+  height: 96rpx;
+  padding: 0 50rpx;
+  position: relative;
+  background: #FAF6ED;
+  .u-arrow {
+    border-top: 4rpx solid #666;
+    border-right: 4rpx solid #666;
+  }
+}
+
+.picker {
+  width: 160rpx;
+  height: 40rpx;
+  position: absolute;
+  top: 20rpx;
+  left: 50%;
+  transform: translate(-50%, -50%);
+}
+
+.day {
+  flex-wrap: wrap;
+  .dayValue {
+
+  }
+}
+
+.week>view,
+.day>view.dayItem {
+  width: 100rpx;
+  height: 100rpx;
+  position: relative;
+  line-height: 100rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.dayValue {
+  width: 60rpx;
+  height: 60rpx;
+  text-align: center;
+  position: relative;
+  line-height: 60rpx;
+}
+.checkday {
+  color: #999;
+}
+
+.select {
+  background: #FAF6ED;
+  color: #C5AA7B;
+  border-radius: 50%;
+}
+
+.choose {
+  color: #FFFFFF;
+  background: #C5AA7B;
+  border-radius: 50%;
+}
+
+.circle {
+  width: 10rpx;
+  height: 10rpx;
+  border-radius: 50%;
+  position: absolute;
+  bottom: 10%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+}
+
+.sign {
+  background-color: #0089fe;
+}
+
+.repair {
+  background-color: #f4a01a;
+}
+.Put-box1 {
+  .btn {
+    text-align: center;
+    margin-top: 40rpx;
+    border: 2rpx solid #333333;
+    height: 80upx;
+    line-height: 80upx;
+    width: 240upx;
+    color: #333333;
+  }
+
+  .submit {
+    background-color: #333333;
+    color: #FFEBC4;
+  }
+}
+</style>

+ 1 - 1
pages_category_page1/linkOthers/index.vue

@@ -13,7 +13,7 @@ export default {
   },
   onLoad(e) {
     // 获取传递过来的链接
-    this.url = e.url
+    this.url = `${e.url}/#/?&username=${e.username}&user=${e.user}`
   }
 }
 </script>

+ 56 - 33
pages_category_page1/memberCenter/activityList.vue

@@ -11,32 +11,33 @@
       <!--		<view class="item" :class="selectIndex == 1 ? 'selected' : ''" @click="sales"><span>销量</span></view>-->
       <!--		<view class="item" :class="selectIndex == 2 ? 'selected' : ''" @click="priceClick"><span>价格</span></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>
-            <!--          <image src="../../static/images/arrowSortUp.png" v-if="type == 1" class="arrow-img padd-t"></image>-->
-            <!--          <image src="../../static/images/arrowSortDown.png" v-if="type == 2" class="arrow-img padd-b"></image>-->
+      <view id="boxFixed" class="nav-warp">
+        <view class="shop-list-nav" :class="{'is-fixed' : isFixed}">
+          <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>
-            <!--          <image src="../../static/images/arrowSortUp.png" v-if="volume == 1" class="arrow-img padd-t"></image>-->
-            <!--          <image src="../../static/images/arrowSortDown.png" v-if="volume == 2" class="arrow-img padd-b"></image>-->
+          <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>
+              <!--          <image src="../../static/images/arrowSortUp.png" v-if="type == 1" class="arrow-img padd-t"></image>-->
+              <!--          <image src="../../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">
+              <view class="arrowUp" :class="{activeUp: volume == 1}"></view>
+              <view class="arrowDown" :class="{activeDown: volume == 2}"></view>
+              <!--          <image src="../../static/images/arrowSortUp.png" v-if="volume == 1" class="arrow-img padd-t"></image>-->
+              <!--          <image src="../../static/images/arrowSortDown.png" v-if="volume == 2" class="arrow-img padd-b"></image>-->
+            </view>
           </view>
         </view>
       </view>
     </view>
-    <view class="spikeList mar-top-20">
+    <view class="spikeList">
       <view class="listItem" v-for="(item,index) in getDiscount" :key="index">
         <view class="itemBox">
           <img :src="item.image">
@@ -88,9 +89,24 @@ export default {
       volume: '',//销量
       shopShowType:false,
       selectIndex:0,
-      sortIndex: 1
+      sortIndex: 1,
+      isFixed: false,
+        boxFixedTop: 0,
     }
   },
+  onPageScroll(res) {
+    console.log(res,'ssssssssss')
+      let scrollTop = res.scrollTop // 滚动条偏移量
+      let offsetTop = this.boxFixedTop // 要滚动到顶部吸附的元素的偏移量
+      this.isFixed = scrollTop > offsetTop ? true : false; // 如果滚动到顶部了,this.isFixed就为true
+  },
+    onReady(){
+        const query = uni.createSelectorQuery().in(this);
+        query.select('#boxFixed').boundingClientRect(data => {
+            console.log(data,'boxFixed')
+            this.boxFixedTop = data.top
+        }).exec()
+    },
   onLoad(options) {
     if(options.shopId && options.shopDiscountId){
       this.shopShowType = false
@@ -288,14 +304,6 @@ page {
 </style>
 <style lang="scss" scoped>
 .spikeListBox {
-  .spikeBgBox {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    z-index: 99;
-    background: #333333;
-  }
   .discountBg {
     width: 100%;
     height: 440rpx;
@@ -343,7 +351,6 @@ page {
   }
   .spikeList {
     padding: 20upx 30upx 20upx 30upx;
-    margin-top: 400rpx;
     .listItem {
       display: flex;
       padding: 30rpx;
@@ -431,7 +438,7 @@ page {
   }
  /* #ifdef MP-WEIXIN */
  .spikeList{
-	 margin-top: 530rpx;
+	 /*margin-top: 530rpx;*/
  }
  /* #endif */
   .filterBox {
@@ -447,15 +454,31 @@ page {
     }
   }
 }
-
+.nav-warp{
+  height: 80rpx;
+}
 .shop-list-nav {
   display: flex;
   flex-direction: row;
   align-items: center;
   height: 80rpx;
   line-height: 76rpx;
+  background-color: #333;
+  &.is-fixed{
+    position: fixed;
+    top: 44rpx;
+    left: 0;
+    width: 100%;
+    z-index: 999;
+  }
+    /* #ifdef MP-WEIXIN */
+    &.is-fixed{
+        top: 0px;
+    }
+    /* #endif */
 }
 
+
 .nav-item {
   flex: 1;
   font-size: 30rpx;

+ 5 - 20
pages_category_page1/memberCenter/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="memberCenter">
+  <view class="memberCenter" v-if="isShow">
     <view class="memberBox">
       <view class="posBox">
         <view class="memberBoxTop">
@@ -46,18 +46,6 @@
     <view class="signInList">
       <view class="signTit fs30 font-color-333">快速成长</view>
       <view class="signInBox">
-        <view class="signItem flex-items flex-sp-between">
-          <view class="itemLeft flex-items">
-            <view class="leftIcon">
-              <image src="../../static/img/member/memberList1.png"></image>
-            </view>
-            <view class="leftInfo">
-              <label class="fs28 font-color-333">签到</label>
-              <view class="fs24 font-color-999">每日签到获取成长值</view>
-            </view>
-          </view>
-          <view class="rightBtn" @click="goToSign">去签到</view>
-        </view>
         <view class="signItem flex-items flex-sp-between">
           <view class="itemLeft flex-items">
             <view class="leftIcon">
@@ -84,7 +72,8 @@ export default {
     return {
       memberData: {},
       equityList: [],
-      levelInfo: {}
+      levelInfo: {},
+      isShow: false
     }
   },
   onLoad() {
@@ -97,11 +86,13 @@ export default {
     getMemberShipList() {
       // 获取会员信息
       uni.showLoading({
+        mask: true,
         title: '加载中...',
       })
       NET.request(API.getMemberShipList, {
       }, 'GET').then(res => {
         uni.hideLoading()
+        this.isShow = true
         this.equityList = res.data
       }).catch(res => {
       })
@@ -127,12 +118,6 @@ export default {
         uni.setStorageSync('storage_levelInfo', this.levelInfo);
       }).catch(res => {
       })
-    },
-    // 签到
-    goToSign() {
-      uni.navigateTo({
-        url: '../memberCenter/memberSign'
-      })
     }
   }
 }

+ 4 - 1
pages_category_page1/memberCenter/memberSign.vue

@@ -106,7 +106,7 @@
 			}else{
 				this.page = this.page+1
 				this.getSelectSigninHistory()
-			}		
+			}
 		},
 		methods: {
 			getSelectSigninRecordList() {
@@ -114,6 +114,7 @@
 				this.signDate = 0
 				// 获取签到
 				uni.showLoading({
+          mask: true,
 					title: '加载中...',
 				})
 				NET.request(API.selectSigninRecordList, {}, 'GET').then(res => {
@@ -133,6 +134,7 @@
 					pageSize: this.pageSize,
 				}
 				uni.showLoading({
+          mask: true,
 					title: '加载中...',
 				})
 				NET.request(API.selectSigninHistory, param, 'GET').then(res => {
@@ -151,6 +153,7 @@
 			signInFn() {
 				if (this.upDate !== this.currentData) {
 					uni.showLoading({
+            mask: true,
 						title: '请稍等...',
 					})
 					NET.request(API.signIn, {}, 'POST').then(res => {

+ 1 - 0
pages_category_page1/orderModule/Intervene.vue

@@ -69,6 +69,7 @@ export default {
         return
       }
       uni.showLoading({
+        mask: true,
         title: '提交中...',
       })
       if(this.fileList.length>0){

+ 1 - 0
pages_category_page1/orderModule/addLogistics.vue

@@ -112,6 +112,7 @@
 			},
 			getSendReturnGoods() {
 				uni.showLoading({
+          mask: true,
 					url:'物流信息提交中...'
 				})
 				NET.request(API.SendReturnGoods, {

+ 5 - 3
pages_category_page1/orderModule/afterSaleApplyRefund.vue

@@ -235,9 +235,11 @@ export default {
           uni.showToast({
             title: '提交成功'
           })
-          uni.navigateTo({
-            url: 'afterSale'
-          })
+          setTimeout(() => {
+            uni.navigateTo({
+              url: '../../pages_category_page2/orderModule/afterSale'
+            })
+          }, 2000)
         }).catch(res => {
           uni.showToast({
             title: '商品已在售后,请勿重新操作!',

+ 1 - 0
pages_category_page1/orderModule/afterSaleApplyRetund.vue

@@ -201,6 +201,7 @@ export default {
         });
       } else {
         uni.showLoading({
+          mask: true,
           title: '正在提交...',
         })
         let skusobjdata = []

+ 86 - 45
pages_category_page1/orderModule/index.vue

@@ -7,7 +7,7 @@
 					@change="orderStateChange"></u-tabs>
 			</view>
 			<view class="order-list-box">
-				<view v-if="listTotal > 0">
+				<view>
 					<view class="item" v-if="item.skus[0].ifAdd!==1"  v-for="(item, index) in list" :key="index" @click="itemTap(item.orderId,item)">
 						<view class="order-list-top">
 							<view class="top-l" @click.stop="goShop(item.shopId)">
@@ -77,7 +77,7 @@
 						</view>
 					</view>
 				</view>
-				<view v-else class="emptyOrder-box flex-items-plus flex-column">
+				<view v-if="ifEmpty" class="emptyOrder-box flex-items-plus flex-column">
 					<image class="emptyOrder-img" src="../../static/images/emptyOrderImg.png"></image>
 					<label class="font-color-999 fs26 mar-top-30">你还没有订单哦~</label>
 				</view>
@@ -89,7 +89,7 @@
 				<radio-group @change="payTypeChange" v-model="paymentMode">
 					<view class="pay-type-radio">
 						<view class="pay-type-img">
-							<img class="pay-type-img-inner" src="../../static/images/alipay.png" />
+							<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"
@@ -146,16 +146,39 @@
 				</view>
 			</view>
 		</u-popup>
+    <!-- 取消订单 -->
+    <tui-modal :show="closeTips" :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="closeTips = false">
+            点错了
+          </view>
+          <view class="btn submit" @click="doCancel">
+            确定取消
+          </view>
+        </view>
+      </view>
+    </tui-modal>
 	</view>
 </template>
 
 <script>
+  import tuiModal from "@/components/modal/modal";
 	const NET = require('../../utils/request')
 	const API = require('../../config/api')
 	// #ifdef H5
 	var jweixin = require('jweixin-module')
 	// #endif
 	export default {
+    components: {
+      tuiModal
+    },
 		data() {
 			return {
 				type: 0,
@@ -195,7 +218,11 @@
 				fenqiDisabledList: [true, true, true],
 				huabeiChargeType: 1,
 				huabeiFeeRateList: [0, 0, 0],
-				alipayInfo: {}
+				alipayInfo: {},
+        ifEmpty: false,
+        closeTips: false,
+        currentOrderId: null,
+        currentIndex: null
 			}
 		},
 		onLoad(options) {
@@ -254,6 +281,7 @@
 				this.orderState = this.tabList[index].number
 				this.page = 1
 				this.list = []
+        this.ifEmpty = false
 				this.getListData()
 			},
 			// 订单列表数据
@@ -262,6 +290,7 @@
 					this.orderState = ''
 				}
 				uni.showLoading({
+          mask: true,
 					title: '加载中...',
 				})
 				NET.request(API.FindOrderList, {
@@ -276,41 +305,38 @@
 					uni.hideLoading()
 					this.listTotal = res.data.total
 					this.list = this.list.concat(res.data.list)
+          if (this.list.length === 0) {
+            this.ifEmpty = true
+          }
 				}).catch(res => {
 					uni.hideLoading()
 				})
 			},
 			cancelOrder(orderId, index) {
-				uni.showModal({
-					title: '温馨提示',
-					content: '您确定要取消该订单吗?',
-					confirmText: '确定取消',
-					cancelText: '点错了',
-					success: res => {
-						if (res.confirm) {
-							this.doCancel(orderId, index)
-						} else if (res.cancel) {
-							console.log('用户点击取消')
-						}
-					}
-				})
+        this.currentOrderId = orderId
+        this.currentIndex = index
+        this.closeTips = true
 			},
-			doCancel(orderId, index) {
+			doCancel() {
+        this.closeTips = false
 				uni.showLoading({
+          mask: true,
 					title: '提交中...',
 				})
 				NET.request(API.CancelOrder, {
-					orderId: orderId
+					orderId: this.currentOrderId
 				}, 'POST').then(res => {
 					uni.hideLoading()
 					uni.showToast({
 						title: '取消成功',
 					})
 					setTimeout(() => {
-						this.type = 0
-						this.orderState = 0
+						// this.type = 0
+						// this.orderState = 0
 						this.page = 1
 						this.list = []
+            this.currentOrderId = null
+            this.currentIndex = null
 						this.getListData()
 					}, 1500);
 
@@ -384,8 +410,8 @@
 						title: '删除成功',
 					})
 					setTimeout(() => {
-						this.type = 0;
-						this.orderState = 0
+						// this.type = 0;
+						// this.orderState = 0
 						this.page = 1
 						this.list = []
 						this.getListData()
@@ -1065,32 +1091,47 @@
 	}
 
 	.period-radio {
-		margin: 30upx;
-		padding-right: 100upx;
-		width: 95%;
-		border-bottom: 1px solid #EFEFEF;
+    margin: 30 upx;
+    padding-right: 100 upx;
+    width: 95%;
+    border-bottom: 1px solid #EFEFEF;
 
-		.period-amount {
-			display: inline-block;
+    .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-charge {
+        display: inline-block;
+        margin-top: 12 upx;
+        margin-left: 6 upx;
+        font-size: 26 upx;
+        color: #b7b7b7;
+        margin-bottom: 13 upx;
+      }
+    }
 
-		.period-each {
-			display: block;
-		}
+    .period-each {
+      display: block;
+    }
 
-		.period-type-radio-item {
-			float: right;
-		}
-	}
+    .period-type-radio-item {
+      float: right;
+    }
+  }
+  .Put-box1 {
+    .btn {
+      text-align:center;
+      margin-top:40rpx;
+      border: 2rpx solid #333333;
+      height: 80rpx;
+      line-height: 80rpx;
+      width: 240rpx;
+      color: #333333;
+    }
+    .submit {
+      background-color: #333333;
+      color: #FFEBC4;
+    }
+  }
 </style>
 <style scoped>
 	.container /deep/ .u-tab-item {

+ 156 - 37
pages_category_page1/orderModule/orderConfirm.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 提交订单 -->
-  <view>
+  <view v-if="ifShow">
     <view class="content">
       <view class="address-box" @click="addAddressTap">
         <image src="../../static/images/orderAddress.png" class="address-img"></image>
@@ -11,7 +11,7 @@
             <text class="phone">{{userAddressInfo.receivePhone}}</text>
           </view>
           <view class="address-info">
-            <text>{{userAddressInfo.receiveAdress}}</text>
+            <text>{{userAddressInfo.receiveAdress}} {{userAddressInfo.address}}</text>
           </view>
         </view>
         <!-- 没有地址的 -->
@@ -97,6 +97,17 @@
           <image class="discount-img" src="../../static/images/arrowRight.png"></image>
         </view>
       </view>
+<!--      积分支付-->
+      <view class="integralPayBox" v-if="settlement.creditDeductLimit !== 0 && totalprice > orderCreditThreshold && integralNum !== 0">
+        <view class="integralBg">
+          <view class="integralTit fs26">可用{{integralNum}}积分抵扣{{integralPrice}}元</view>
+          <view class="maxIntegral">
+            <checkbox-group @change="changeIntegral" style="width: 50rpx">
+              <checkbox style="transform:scale(0.7);" class="integralCheckbox" color="#C5AA7B" value="1" :checked="selectIntegral"/>
+            </checkbox-group>
+          </view>
+        </view>
+      </view>
       <view class="pay-type-item">
         <radio-group @change="payTypeChange">
           <view class="pay-type-radio" v-if="showWechatPayType">
@@ -108,7 +119,7 @@
           </view>
           <view class="pay-type-radio" v-if="showAlipayPayType">
             <view class="pay-type-img">
-              <image class="pay-type-img-inner" src="../../static/images/alipay.png" mode="widthFix"/>
+              <image class="pay-type-img-inner" src="https://ceres.zkthink.com/static/images/alipay.png" mode="widthFix"/>
             </view>
             <label class="pay-type-label">支付宝支付</label>
             <radio class="pay-type-radio-item" style="transform:scale(0.7)" value="2" :checked="paymentMode == 2"/>
@@ -165,15 +176,17 @@
             <view class="content-box">
               <view v-if="usableListLength">
                 <view class="label-lingqu">可用优惠券列表</view>
-                <view class="coupon-item" v-for="(usableItem, index) in settlement.coupons" :key="index" @click="couponItemTap(index,usableItem)">
-                  <view class="money-box" v-if="usableItem.couponType == 1">¥{{usableItem.reduceMoney}}</view>
-                  <view class="money-box" v-else>{{usableItem.reduceMoney}}折券</view>
-                  <view class="info-box">
-                    <view class="info">满{{usableItem.fullMoney}}元可用</view>
-                    <view class="date" style="font-size:22upx;  margin-top: 20upx;">{{getDate(usableItem.startTime)}}至{{getDate(usableItem.endTime)}}</view>
+                <view class="couponBox">
+                  <view class="coupon-item" v-for="(usableItem, index) in settlement.coupons" :key="index" @click="couponItemTap(index,usableItem)">
+                    <view class="money-box" v-if="usableItem.couponType == 1">¥{{usableItem.reduceMoney}}</view>
+                    <view class="money-box" v-else>{{usableItem.reduceMoney}}折券</view>
+                    <view class="info-box">
+                      <view class="date font-color-999" style="font-size:22upx;  margin-top: 20upx;">{{getDate(usableItem.startTime.replace(/-/g, '.'))}}-{{getDate(usableItem.endTime.replace(/-/g, '.'))}}</view>
+                      <view class="info font-color-999">满{{usableItem.fullMoney}}元可用</view>
+                    </view>
+                    <image class="check-img" src="../../static/images/selectActive.png" v-if="couponCheckedindex == index"></image>
+                    <image class="check-img" src="../../static/images/selectEmpty.png" v-else></image>
                   </view>
-                  <image class="check-img" src="../../static/images/selectActive.png" v-if="couponCheckedindex == index"></image>
-                  <image class="check-img" src="../../static/images/selectEmpty.png" v-else></image>
                 </view>
               </view>
             </view>
@@ -196,9 +209,9 @@
                   <view class="coupon-item" v-for="(sItem, index) in shopCouponslist.shopCoupons" :key="sItem.id" @click="shopCouponItemTap(index,sItem)">
                     <view class="money-box" v-if="sItem.couponType == 1">¥{{sItem.reduceMoney}}</view>
                     <view class="money-box" v-else>{{sItem.reduceMoney}}折券</view>
-                    <view class="date" style="font-size:22upx;  margin-top: 10upx;">{{getDate(sItem.startTime)}}-{{getDate(sItem.endTime)}}</view>
+                    <view class="date font-color-999" style="font-size:22upx;  margin-top: 10upx;">{{getDate(sItem.startTime.replace(/-/g, '.'))}}-{{getDate(sItem.endTime.replace(/-/g, '.'))}}</view>
                     <view class="info-box">
-                      <view class="info">满{{sItem.fullMoney}}元可用</view>
+                      <view class="info font-color-999">满{{sItem.fullMoney}}元可用</view>
                     </view>
                     <image class="check-img" src="../../static/images/selectActive.png" v-if="selectCouponIdList.indexOf(sItem.id) >= 0"></image>
                     <image class="check-img" src="../../static/images/selectEmpty.png" v-else></image>
@@ -310,7 +323,15 @@ export default {
       showAlipayPayType: false,
       showHuabeiPayType: false,
       orderId: null,
-      couponType: 0
+      couponType: 0,
+      selectIntegral: true,
+      integralNum: 0,
+      skuCreditAmountMap: {},
+      ifShow: false,
+      integralRatio: 0, // 积分兑换比例
+      userTotalCredit: 0,
+      integralPrice: 0, // 总积分可减多少元
+      orderCreditThreshold: 0 // 满多少元可以抵扣
     }
   },
   onLoad(options) {
@@ -321,6 +342,7 @@ export default {
     this.decidePayType()
   },
   onShow() {
+    this.getQuery()
     if (uni.getStorageSync("skuItemDTOList") != "") {
       this.skuItemDTOList = uni.getStorageSync('skuItemDTOList')
       //console.log(this.skuItemDTOList, 66666)
@@ -347,6 +369,25 @@ export default {
     return true
   },
   methods: {
+    getQuery(){
+      NET.request(API.Query,{
+        name: 'credit_exchange_rate'
+      }, 'GET').then(res => {
+        this.integralRatio = parseFloat(res.data.dictDescribe)
+      }).catch(res => {
+
+      })
+    },
+    // 积分价格计算
+    changeIntegral() {
+      this.selectIntegral = !this.selectIntegral
+      if (this.selectIntegral) {
+        this.totalprice = this.totalprice - this.integralPrice
+      } else {
+        this.totalprice = this.totalprice + this.integralPrice
+      }
+      console.log(this.selectIntegral, 'test')
+    },
     back() {
       if (this.type == 2 || this.type) {
         uni.switchTab({
@@ -457,9 +498,9 @@ export default {
         }
         uni.removeStorageSync('receiveItem')
         this.usableListLength = res.data.coupons.length
-        //console.log(this.settlement, 'settlement')
         //console.log(this.selectCouponIdList, 'selectCouponIdList')
         this.getTotal()
+        this.ifShow = true
       }).catch(res => {
         uni.hideLoading()
       })
@@ -529,7 +570,7 @@ export default {
     // 店铺优惠券选择
     shopCouponItemTap(index, sItem) {
       // 取消选择优惠券
-      //console.log(this.selectShopCoupon, 'Youhui')
+      console.log(this.selectShopCoupon, sItem, 'Youhui')
       for (let i = 0; i < this.selectShopCoupon.length; i++) {
         // let skusTotal = 0
         // this.settlement.shops[this.shopIndex].skus.forEach((value, index) => {
@@ -540,7 +581,7 @@ export default {
         //   skusTotal += this.settlement.shops[this.shopIndex].distribution.distributionPrice
         // }
         // this.settlement.shops[this.shopIndex].total = skusTotal
-        this.settlement.shops[this.shopIndex].totalNum =   this.settlement.shops[this.shopIndex].total
+        this.settlement.shops[this.shopIndex].totalNum = this.settlement.shops[this.shopIndex].total
         this.settlement.shops[this.shopIndex].currentCoupon = {}
         this.shopcouponCheckedindex = 99999999
         this.shopCouponCheckedType = false
@@ -562,6 +603,8 @@ export default {
           icon: 'none'
         })
       } else {
+        console.log('fsdfsdfsdfdss')
+        console.log(this.totalprice, 'total')
         // 选择优惠券
         if (this.selectCouponIdList.indexOf(sItem.id) === -1) {
           if (this.promotionInfoDTO.couponId !== 0) {
@@ -584,6 +627,7 @@ export default {
               return false
             }
           }
+          console.log(this.settlement.shops[this.shopIndex].currentCoupon, '优惠券')
           for (let i = 0; i < this.selectShopCoupon.length; i++) {
             if (this.selectShopCoupon[i].id === this.settlement.shops[this.shopIndex].currentCoupon.id) {
               this.selectCouponIdList.splice(i, 1)
@@ -624,7 +668,6 @@ export default {
                   skustotal = this.settlement.shops[this.shopIndex].skus[k].total * (this.settlement.shops[this.shopIndex].shopCoupons[
                       this.shopCouIndex].reduceMoney / 10)
                   this.settlement.shops[this.shopIndex].skus[k].skuTotalNum = skustotal
-                  //console.log(skustotal)
                 }
               }
               shoptotal += this.settlement.shops[this.shopIndex].skus[k].skuTotalNum
@@ -639,6 +682,8 @@ export default {
     getTotal(item) {
       this.totalprice = 0
       this.totalCount = 0
+      this.integralPrice = 0
+      this.integralNum = 0
       let allNum = 0
       let shopslen = this.settlement.shops.length
       for (let i = 0; i < shopslen; i++) {
@@ -646,14 +691,38 @@ export default {
         allNum += this.settlement.shops[i].totalNum
         this.totalCount += this.settlement.shops[i].number
       }
-      if (item.couponType === 1 && this.totalprice - this.reduceMoney > 0) {
-        this.discountPrice = allNum - this.totalprice + this.reduceMoney
-      } else if (item.couponType === 2 && this.reduceMoney > 0) {
-        this.discountPrice = allNum - this.totalprice * (this.reduceMoney / 10)
-        console.log(this.discountPrice, allNum, this.totalprice, this.reduceMoney)
-        this.totalprice = allNum - this.discountPrice
-      } else {
-        this.discountPrice = allNum
+      if (item) {
+        console.log(this.discountPrice, 'discountPrice', allNum, 'allNum', this.totalprice, 'totalprice', this.reduceMoney, 'reduceMoney')
+        if (item.couponType === 1 && this.totalprice - this.reduceMoney > 0) {
+          this.discountPrice = allNum - this.totalprice + this.reduceMoney
+          this.totalprice = allNum - this.discountPrice
+        } else if (item.couponType === 2 && this.reduceMoney > 0) {
+          console.log(121212)
+          this.discountPrice = allNum - this.totalprice * (this.reduceMoney / 10)
+          this.totalprice = allNum
+        } else {
+          this.discountPrice = allNum
+        }
+      }
+      // 积分支付计算
+      var skuCreditMap = Object.keys(this.settlement.skuCreditMap);
+      if(skuCreditMap.length > 0) {
+        let creditNum = {}
+        creditNum = this.settlement.skuCreditMap
+        this.orderCreditThreshold = this.settlement.orderCreditThreshold
+        this.userTotalCredit = this.settlement.userTotalCredit
+        for (let i in creditNum) {
+          console.log(creditNum[i], 'item')
+          this.integralNum += creditNum[i]
+        }
+        if (this.integralNum > this.settlement.creditDeductLimit) {
+          this.integralNum = this.settlement.creditDeductLimit
+        } else if (this.integralNum > this.userTotalCredit) {
+          this.integralNum = this.userTotalCredit
+        }
+        this.integralPrice = this.integralNum * this.integralRatio
+        // 总价减去积分金额
+        this.totalprice = this.totalprice - this.integralPrice
       }
       this.recalcHuabei()
       // console.log(this.totalprice - this.reduceMoney, 'dis')
@@ -757,6 +826,7 @@ export default {
       } else {
         if (this.userAddressInfo.receiveName) {
           uni.showLoading({
+            mask: true,
             title: '订单提交中...',
           })
           let couponIdinfo = 0
@@ -820,6 +890,30 @@ export default {
               skusobj["priceId"] = this.settlement.shops[n].skus[m].priceId
               skusobj["useMember"] = this.settlement.shops[n].skus[m].useMember
               skusobj["composeId"] = this.settlement.shops[n].skus[m].composeId
+              // 积分传参
+              if (this.selectIntegral && this.settlement.creditDeductLimit !== 0 && this.totalprice > this.orderCreditThreshold && this.integralNum !== 0) {
+                let creditArr = this.settlement.skuCreditMap
+                for(let key in creditArr) {
+                  if (key == this.settlement.shops[n].skus[m].skuId) {
+                    if (this.settlement.shops[n].skus[m].ifCredit == 1) {
+                      if (this.integralNum !== 0) {
+                        if (this.settlement.shops[n].skus[m].creditLimit > this.integralNum) {
+                          skusobj["useCredit"] = this.integralNum
+                          skusobj["useCreditAmount"] = this.integralNum * this.integralRatio
+                          this.integralNum = 0
+                        } else {
+                          skusobj["useCredit"] = this.settlement.shops[n].skus[m].creditLimit
+                          skusobj["useCreditAmount"] = this.settlement.shops[n].skus[m].creditLimit * this.integralRatio
+                          this.integralNum = this.integralNum - this.settlement.shops[n].skus[m].creditLimit
+                        }
+                      } else {
+                        console.log('false')
+                        return false
+                      }
+                    }
+                  }
+                }
+              }
               data.shops[n].skus.push(skusobj)
             }
           }
@@ -843,6 +937,7 @@ export default {
           // #endif
 
           // uni.hideLoading()
+          console.log(this.settlement, '价格')
           NET.request(API.PlaceOrder, data, 'POST').then(res => {
             let submitResult = res.data
             that.orderId = res.data.orderId
@@ -1159,8 +1254,8 @@ page {
 }
 
 .address-box .address-img {
-  width: 70upx;
-  height: 70upx;
+  width: 71upx;
+  height: 57upx;
   margin-right: 20upx;
 }
 
@@ -1407,14 +1502,13 @@ page {
 
 .discount-item1 {
   width: 100%;
-  height: 60upx;
   box-sizing: border-box;
   display: flex;
   flex-direction: row;
   align-items: center;
   justify-content: space-between;
   background: white;
-  padding: 0 20rpx;
+  padding: 20rpx;
   border: 2rpx solid #E4E5E6;
 }
 .discount-item {
@@ -1426,7 +1520,7 @@ page {
   flex-direction: row;
   align-items: center;
   justify-content: space-between;
-  padding: 0 30upx;
+  padding: 0 20upx;
   background: white;
 }
 
@@ -1452,7 +1546,6 @@ page {
 
     .pay-type-radio-item {
       float: right;
-      margin-right: 20upx;
       width: 50upx;
       height: 50upx;
     }
@@ -1636,7 +1729,7 @@ page {
   height: 120upx;
   margin-top: 20upx;
   color: #FFFFFF;
-  flex-shrink: 0
+  flex-shrink: 0;
 }
 
 .coupon-item2 {
@@ -1704,7 +1797,7 @@ page {
 .check-img {
   width: 40upx;
   height: 40upx;
-  margin-top: 30rpx;
+  margin-top: 40rpx;
 }
 
 .mt30 {
@@ -1779,10 +1872,11 @@ page {
   display: flex;
   flex-flow: wrap;
   margin-top: 30rpx;
+  justify-content: space-between;
 }
 
 .coupon-item {
-  width: 50%;
+  width: 48%;
   height: 291rpx;
   background: url("../../static/images/couponsIcon.png") no-repeat center top;
   margin-top: 20upx;
@@ -1790,6 +1884,7 @@ page {
   flex-shrink: 0;
   text-align: center;
   padding-top: 1rpx;
+  background-size: contain;
 }
 
 .un-coupon-item {
@@ -1799,12 +1894,36 @@ page {
 .money-box {
   font-size: 40upx;
   font-weight: 500;
-  margin-top: 40rpx;
+  margin-top: 30rpx;
+}
+.integralPayBox {
+  margin: 20rpx 0;
+  .integralBg {
+    height: 98rpx;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    background: #FFFFFF;
+    padding: 0 20rpx;
+    .maxDeduction {
+      margin-right: 15rpx;
+    }
+  }
 }
 </style>
-<style scoped>
+<style>
  .pay-type-item /deep/ .uni-radio-input-checked {
    background-color: #C5AA7B !important;
    border-color: #C5AA7B !important;
  }
+ .maxIntegral /deep/ .uni-checkbox-input {
+   width: 30rpx;
+   height: 30rpx;
+ }
+ .maxIntegral /deep/ .uni-checkbox-input-checked:before {
+   font-size: 30rpx;
+ }
+ .maxIntegral /deep/.uni-checkbox-input-checked {
+  border: 2rpx solid #C5AA7B !important;
+ }
 </style>

+ 104 - 13
pages_category_page1/orderModule/orderDetails.vue

@@ -75,7 +75,7 @@
 							<text class="phone">{{dataList.receivePhone}}</text>
 						</view>
 						<view class="address-info">
-							<text>{{dataList.receiveAdress}}</text>
+							<text>{{dataList.receiveAdress}} {{dataList.address}}</text>
 						</view>
 					</view>
 					<image src="../../static/images/arrowRight.png" v-if="false" class="arrow-right-img"></image>
@@ -89,17 +89,21 @@
 								<text class="shop-name">{{dataList.shopName}}</text>
 								<image src="../../static/images/arrowRight.png" class="arrow-img"></image>
 							</view>
+							<view class="toService" @click="openService">
+								<image src="../../static/images/serviceImg-order-detail.png"  class="service-img" ></image>
+								<text>联系客服</text>
+							</view>
 						</view>
 						<view class="order-info-box">
 							<view class="order-info">
-								<view class="order-info-item" v-for="(proItem, proIndex) in dataList.skus"
+								<view class="order-info-item" v-for="proItem in dataList.skus"
 									:key="proItem.productId" @click="goodsItemTap(proItem.productId,proItem.skuId)">
 									<image :src="proItem.image" class="product-img"></image>
 									<view class="info-box">
 										<text class="product-name">{{proItem.productName}}</text>
 										<view class="price-sku-box">
 											<view class="product-sku">
-												<view class="mar-left-20" v-for="(vItem, proIndex) in proItem.values">
+												<view class="mar-left-20" v-for="vItem in proItem.values">
 													<text>{{vItem}}</text>
 												</view>
 											</view>
@@ -275,7 +279,7 @@
 				<radio-group @change="payTypeChange" v-model="paymentMode">
 					<view class="pay-type-radio">
 						<view class="pay-type-img">
-							<img class="pay-type-img-inner" src="../../static/images/alipay.png" />
+							<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"
@@ -336,18 +340,29 @@
 </template>
 
 <script>
-	const NET = require('../../utils/request')
-	const API = require('../../config/api')
-	import uniSteps from "@/components/uni-steps/uni-steps.vue"
 	import ClipboardJS from "clipboard";
 	// #ifdef H5
 	var jweixin = require('jweixin-module')
 	// #endif
+
+	import uniSteps from "@/components/uni-steps/uni-steps.vue"
+
+	const NET = require('../../utils/request')
+	const API = require('../../config/api')
 	export default {
+		components: {
+			uniSteps,
+		},
 		data() {
 			return {
 				canApplyIntervention: false,
-				dataList: [],
+				dataList: {
+					orderFormid:null,
+					createTime:null,
+					orderPrice:0,
+					logisticsPrice:0,
+					discountPrice:0
+				},
 				orderId: 0,
 				active: 0,
 				steps: [],
@@ -370,12 +385,14 @@
 				fenqiDisabledList: [true, true, true],
 				huabeiChargeType: 1,
 				huabeiFeeRateList: [0, 0, 0],
-				alipayInfo: {}
+				alipayInfo: {},
+
+				// 客服
+				serviceURL: '',
+				corpId: '',
+				isLoading: false
 			}
 		},
-		components: {
-			uniSteps
-		},
 		onLoad(options) {
 			this.isIphone = getApp().globalData.isIphone;
 			this.orderId = (parseInt(options.orderId))
@@ -469,6 +486,7 @@
 					let data = res.data
 					this.dateformat(res.data.time)
 					this.dataList = data
+					console.log(this.dataList)
 					console.log(dataList.collageDetail.length, 888)
 					this.getShippingTrace(this.dataList.express, this.dataList.deliverFormid)
 					if (this.dataList.state == 1 || this.dataList.state == 6) {
@@ -571,6 +589,7 @@
 			},
 			doDel() {
 				uni.showLoading({
+          mask: true,
 					title: '提交中...',
 				})
 				NET.request(API.DelOrder, {
@@ -639,6 +658,7 @@
 			},
 			doCancel() {
 				uni.showLoading({
+          mask: true,
 					title: '提交中...',
 				})
 				NET.request(API.CancelOrder, {
@@ -663,6 +683,7 @@
 				// #endif
 				// #ifndef MP-ALIPAY
 				uni.showLoading({
+          mask: true,
 					title: '订单提交中...',
 				})
 				// #endif
@@ -775,6 +796,7 @@
 			// 继续付款
 			continuePay() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...',
 				})
 				const payInfo = Object.assign({}, this.alipayInfo, {
@@ -1050,6 +1072,59 @@
 					}
 				})
 			},
+			openService() {
+				if (this.isLoading) { return }
+				const shopids = uni.getStorageSync('service_shopids') || []
+				const corpIds = uni.getStorageSync('service_corpIds') || []
+				const urls = uni.getStorageSync('service_urls') || []
+
+				const index = shopids.indexOf(this.shopId)
+				if (index === -1) {
+					this.isLoading = true
+					const id = this.shopId || null
+					NET.request(API.CustomerService, {
+						id
+					}, 'get').then(res => {
+						if (res.code === '') {
+							shopids.push(this.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);
+
+							this.corpId = res.data.corpId
+							this.serviceURL = res.data.url
+							// #ifdef MP-WEIXIN
+							this.flyToService()
+							// #endif
+						}
+						this.isLoading = false
+					}).catch(err => {
+						console.log(err)
+						this.isLoading = false
+					})
+				} else {
+					this.corpId = corpIds[index]
+					this.serviceURL = urls[index]
+
+					// #ifdef MP-WEIXIN
+					this.flyToService()
+					// #endif
+				}
+			},
+			flyToService() {
+				if (!this.serviceURL || !this.corpId) { return }
+				// 获取店铺id、客服链接
+				const extInfo = { // 客服信息
+					url: this.serviceURL // 客服链接
+				}
+				wx.openCustomerServiceChat({
+					extInfo,
+					corpId: this.corpId // 企业ID
+				})
+			}
 		},
 		filters: {
 			clip2Decimal(value) {
@@ -1062,7 +1137,7 @@
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 	page {
 		background: #f7f7f7;
 	}
@@ -1178,6 +1253,22 @@
 
 	.order-list-box {
 		margin-top: 20upx;
+		.toService{
+			line-height: 40rpx;
+			padding: 0 8rpx;
+			border: 1rpx solid #FAF6ED;
+			cursor: pointer;
+			display: flex;
+			align-items: center;
+			.service-img{
+				width: 60upx;
+				height: 60upx;
+				margin-right: 12rpx;
+			}
+			text{
+				line-height: 40rpx;
+			}
+		}
 	}
 
 	.order-list-box .item {

+ 107 - 78
pages_category_page1/orderModule/paySuccessful.vue

@@ -1,30 +1,56 @@
 <template>
   <view class="payCourteous">
-    <view class="imgBox">
-      <image src="../../static/images/payIcon.png"></image>
-    </view>
-    <view class="successful">支付成功</view>
-    <view class="btnBox fs28 font-color-333">
-      <view class="orderBtn btn" @click="goToOrder">查看订单</view>
-      <view class="homeBtn btn" @click="goToHome">返回首页</view>
-    </view>
-    <view class="orderPolite" v-if="orderPolite.growth || orderPolite.couponList">
-      <view class="politeImgBox">
-        <image src="../../static/images/politeIcon.png"></image>
+    <view class="resultCard">
+      <view class="imgBox">
+        <image src="../../static/images/payIcon.png"></image>
       </view>
-      <view class="rightInfo">
-        <view class="growthBox" v-if="orderPolite.growth">恭喜获得额外会员成长值<text class="growth">{{ orderPolite.growth }}</text></view>
-        <view class="couponBox" v-for="(item, index) of orderPolite.couponList" :key="index">恭喜获得<text class="coupon">{{item.discount}}</text>{{ item.couponType === 1 ? '满减优惠券' : '折扣券'}} </view>
+      <view class="successful">支付成功</view>
+      <view class="btnBox fs28 font-color-333">
+        <view class="orderBtn btn" @click="goToOrder">查看订单</view>
+        <view class="homeBtn btn" @click="goToHome">返回首页</view>
+      </view>
+      <view class="orderPolite" v-if="orderPolite.growth || orderPolite.couponList">
+        <view class="politeImgBox">
+          <image src="../../static/images/politeIcon.png"></image>
+        </view>
+        <view class="rightInfo">
+          <view class="growthBox"
+            v-if="orderPolite.credit">
+            恭喜获得额外积分<text class="growth">{{ orderPolite.credit }}</text>
+          </view>
+		  <view class="growthBox"
+            v-if="orderPolite.growth">
+            恭喜获得额外会员成长值<text class="growth">{{ orderPolite.growth }}</text>
+          </view>
+          <view class="couponBox"
+            v-for="(item, index) of orderPolite.couponList"
+            :key="index"
+          >
+            恭喜获得<text class="coupon">{{item.discount}}</text>{{ item.couponType === 1 ? '满减优惠券' : '折扣券'}}
+          </view>
+        </view>
       </view>
     </view>
+
+    <!-- 推荐 -->
+    <HotTemplate />
+    <!-- 广告 -->
+    <ad-window ref="adWindow" :triggerCondition="2"></ad-window>
   </view>
 </template>
 
 <script>
+import HotTemplate from '@/components/hoteRecommed/index.vue'
+import AdWindow from "../../components/adWindow";
+
 const NET = require('../../utils/request')
 const API = require('../../config/api')
 export default {
   name: "payCourteous",
+  components: {
+    AdWindow,
+    HotTemplate
+  },
   data() {
     return {
       orderId: null,
@@ -36,6 +62,7 @@ export default {
     if (this.orderId) {
       this.getOrderPoliteFn()
     }
+    this.$refs.adWindow.getAd()
   },
   methods: {
     goToOrder() {
@@ -49,16 +76,17 @@ export default {
       })
     },
     getOrderPoliteFn() {
-      wx.showLoading({
+      uni.showLoading({
+        mask: true,
         title: '加载中...',
       })
       NET.request(API.getOrderPolite,{
         orderId: this.orderId
       },'GET').then(res => {
-        wx.hideLoading()
+        uni.hideLoading()
         this.orderPolite = res.data
       }).catch(res => {
-        wx.hideLoading()
+        uni.hideLoading()
       })
     }
   }
@@ -67,75 +95,76 @@ export default {
 
 <style lang="scss" scoped>
 .payCourteous {
-  border-top: 2rpx solid #F3F4F5;
-  padding: 30rpx;
-  .imgBox {
-    padding-top: 100rpx;
-    display: flex;
-    justify-content: center;
-    image {
-      width: 166rpx;
-      height: 121rpx;
+  .resultCard{
+    padding: 200rpx 0 50rpx 0;
+    .imgBox {
+      padding-top: 100rpx;
+      display: flex;
+      justify-content: center;
+      image {
+        width: 166rpx;
+        height: 121rpx;
+      }
     }
-  }
-  .successful {
-    text-align: center;
-    margin-top: 30rpx;
-  }
-  .btnBox {
-    display: flex;
-    justify-content: center;
-    margin-top: 30rpx;
-    .btn {
-      width: 140rpx;
-      height: 58rpx;
-      line-height: 58rpx;
-      border: 2rpx solid #999999;
+    .successful {
       text-align: center;
-      font-size: 24rpx;
-      color: #999999;
-    }
-    .orderBtn {
-      margin-right: 30rpx;
-    }
-    .homeBtn {
-      background: #333333;
-      border: none;
-      color: #FFEBC4;
+      margin-top: 30rpx;
     }
-  }
-  .orderPolite {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 670rpx;
-    background: #FFF9F6;
-    border: 2rpx solid #FBE9E6;
-    margin: 100rpx auto 0 auto;
-    padding: 30rpx;
-    box-sizing: border-box;
-    .politeImgBox {
-      image {
-        width: 186rpx;
-        height: 186rpx;
+    .btnBox {
+      display: flex;
+      justify-content: center;
+      margin-top: 30rpx;
+      .btn {
+        width: 140rpx;
+        height: 58rpx;
+        line-height: 58rpx;
+        border: 2rpx solid #999999;
+        text-align: center;
+        font-size: 24rpx;
+        color: #999999;
+      }
+      .orderBtn {
+        margin-right: 30rpx;
+      }
+      .homeBtn {
+        background: #333333;
+        border: none;
+        color: #FFEBC4;
       }
     }
-    .rightInfo {
-      font-size: 28rpx;
-      color: #333333;
-      .growthBox {
-        margin-bottom: 30rpx;
-        .growth {
-          color: #C83732;
+    .orderPolite {
+      display: flex;
+      align-items: center;
+      width: 670rpx;
+      background: #FFF9F6;
+      border: 2rpx solid #FBE9E6;
+      margin: 50rpx auto 0 auto;
+      padding: 0 30rpx;
+      box-sizing: border-box;
+      .politeImgBox {
+        image {
+          width: 186rpx;
+          height: 186rpx;
         }
       }
-      .couponBox {
-        margin-bottom: 30rpx;
-        .coupon {
-          color: #C83732;
+      .rightInfo {
+		flex: 1;
+        font-size: 28rpx;
+        color: #333333;
+        .growthBox {
+          margin-bottom: 30rpx;
+          .growth {
+            color: #C83732;
+          }
         }
-        &:last-child {
-          margin-bottom: 0 !important;
+        .couponBox {
+          margin-bottom: 30rpx;
+          .coupon {
+            color: #C83732;
+          }
+          &:last-child {
+            margin-bottom: 0 !important;
+          }
         }
       }
     }

+ 1 - 0
pages_category_page1/orderModule/platformJoin.vue

@@ -64,6 +64,7 @@ const API = require('../../config/api')
           }
         }
         uni.showLoading({
+          mask: true,
           title:'正在申请介入...'
         })
         NET.request(API.platform, {

+ 68 - 72
pages_category_page1/search/index/index.vue

@@ -15,8 +15,8 @@
 		</view>
 
 		<!-- 热门搜索 -->
-		<view class="hotSearchBox">
-			<view class="mar-top-30 mar-leftgetList-30" v-if="hotSearchList.length>0">
+		<view class="hotSearchBox tipsBox">
+			<view class="boxTitle mar-leftgetList-30" v-if="hotSearchList.length>0">
 				<label class="fs30 font-color-999 fs-weight-300">热门搜索</label>
 				<image class="seeIcon hotSearchListSee-icon" v-if="isSee" @click="changeHotSearchListIsSee"
 					src="../../../static/img/see.png"></image>
@@ -26,8 +26,8 @@
 			<view>
 				<view class="flex-wrap-1 flex-row" v-if="isSee">
 					<view v-for="(item, index) in hotSearchList" :key="index"
-						class="historySearDel-box mar-top-30 flex-items-plus mar-right-30">
-						<view @click="historyKeyword(item)" class="fs28">{{item}}</view>
+						class="historySearDel-box flex-items-plus mar-right-30">
+						<view class="boxContent" @click="historyKeyword(item)">{{item}}</view>
 					</view>
 				</view>
 				<view v-else class="notSeeContent">当前热门搜索已隐藏</view>
@@ -36,19 +36,22 @@
 		<view class="line" color="#F3F4F5" />
 
 		<!-- 历史搜索 -->
-		<view class="historyBox">
-			<view class="mar-top-30 mar-leftgetList-30" v-if="historyList.length>0">
+		<view class="historyBox tipsBox">
+			<view class="boxTitle mar-leftgetList-30" v-if="historyList.length>0">
 				<label class="fs30 font-color-999 fs-weight-300 ">历史搜索</label>
 				<image class="historyDel-icon" @click="historyDelAll" src="../../../static/img/index/historyDel_icon.png">
 				</image>
 			</view>
 			<view class="historySear-box flex-wrap-1 flex-row">
-				<view v-for="(item, index) in historyList" :key="item.searchId"
-					class="historySearDel-box mar-top-30 flex-items-plus flex-sp-between mar-right-30">
-					<view @click="historyKeyword(item.search)" class="historyText fs28 line1">{{item.search}}</view>
-					<view class="historyIconBox">
-						<label class="font-color-DDD fs22 pad-topbot-10 text-align">|</label>
-						<image class="historySearDel-icon text-align" @click="historyDelOne(item.searchId)"
+				<view
+					v-for="(item, index) in historyList"
+					:key="item.searchId"
+					class="historySearDel-box flex-items-plus flex-sp-between mar-right-30"
+				>
+					<view class="boxContent historyText line1" @click="historyKeyword(item.search)">{{item.search}}</view>
+					<label class="font-color-DDD fs22 pad-topbot-10 text-align">|</label>
+					<view class="historyIconBox" @click="historyDelOne(item.searchId)">
+						<image class="historySearDel-icon text-align"
 							src="../../../static/img/index/historySearDel_icon.png"></image>
 					</view>
 				</view>
@@ -164,104 +167,97 @@
 </script>
 
 <style lang='scss' scoped>
-	input {
-		padding-left: 80upx;
-	}
-
-	.emptyCart-box {
-		margin-top: 70upx;
-
-		.emptyCart-img {
-			width: 270upx;
-			height: 270upx;
-		}
-	}
-
+input {
+	padding-left: 80upx;
+}
+.searchImg-box{
 	.searchImg {
 		width: 36upx;
 		height: 36upx;
 		position: absolute;
 		left: 60upx;
 	}
-
 	.search-box {
 		background-color: #F1F1F1;
 		width: 530upx;
 		height: 66upx;
 	}
-
 	.searchboxPlace {
 		font-size: 26upx;
 		color: #A9A9A9;
 		padding-right: 30upx;
 	}
-
 	.searchClose-icon {
 		width: 30upx;
 		height: 30upx;
 		margin-left: -50upx;
 	}
-
-	.historyDel-icon {
-		width: 30upx;
-		height: 30upx;
-		position: absolute;
-		right: 30upx;
-	}
-
-	.historySearDel-box {
-		background-color: #F1F1F1;
-		padding: 10upx 30upx;
-		text-align: center;
-		height: 54upx;
-		line-height: 54upx;
-		overflow: hidden;
+}
+// 热门搜索
+.hotSearchBox{
+	padding: 0 36upx;
+	.historyText{
+		flex: 1;
 	}
-
-	.historySearDel-icon {
-		width: 16upx;
-		height: 16upx;
+	.hotSearchListSee-icon {
+		height: 24upx;
 	}
-	.hotSearchBox{
-		padding: 0 36upx;
-		
+	.hotSearchListNotSee-icon {
+		height: 36upx;
 	}
 	.seeIcon {
 		width: 40upx;
 		position: absolute;
 		right: 30upx;
 	}
-
-	.hotSearchListSee-icon {
-		height: 24upx;
-	}
-
-	.hotSearchListNotSee-icon {
-		height: 36upx;
-	}
-
 	.notSeeContent {
 		margin-top: 20upx;
 		text-align: center;
 		font-size: 24upx;
 		color: #CCCCCC;
 	}
-	.line{
-		margin: 70upx 30upx;
-		height: 2upx;
-		background: #F3F4F5;
+}
+.line{
+	margin: 70upx 0;
+	height: 2upx;
+	background: #F3F4F5;
+}
+// 历史搜索
+.historyBox{
+	padding: 0 36upx;
+	.historySear-box{
+		width: 100%;
 	}
-	.historyBox{
-		padding: 0 36upx;
-		
-		.historySear-box{
-			width: 100%;
-		}
-	}
-	.historyText{
-		flex: 1;
+	.historyDel-icon {
+		width: 30upx;
+		height: 30upx;
+		position: absolute;
+		right: 30upx;
 	}
 	.historyIconBox{
 		width: 50upx;
+		.historySearDel-icon {
+			width: 16upx;
+			height: 16upx;
+		}
+	}
+}
+.tipsBox{
+	padding: 15rpx 24rpx;
+}
+.boxTitle{
+	margin: 30rpx 0;
+}
+.historySearDel-box {
+	height: 54upx;
+	line-height: 54upx;
+	margin: 15rpx 15rpx;
+	background-color: #F1F1F1;
+	text-align: center;
+	overflow: hidden;
+	.boxContent{
+		font-size: 28rpx;
+		padding: 0 30rpx;
 	}
+}
 </style>

+ 480 - 423
pages_category_page1/store/index.vue

@@ -1,30 +1,39 @@
 <template>
 	<view class="container">
 		<!-- 店铺首页 -->
-		<view class="content" v-if="id !== ''">
-			<view class="shop-top">
+		<view class="content" v-if="id">
+			<view class="shop-top" :style="{'padding-top': topHeight + 'px'}">
 				<image src="../../static/images/back_img04.png" class="back" @click="back"></image>
         <view class="search-btn" @click="searchPro">
           <image class="search-icon" src="@/static/images/searchImg1.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="flex-items">
-            <image :src="storeInfo.shopLogo" class="photo-img"></image>
+					<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>
+							<!-- #ifdef MP-WEIXIN -->
+							<view v-if="hasService" class="btns flex-column-plus mar-left-10" @click="flyToService">
+								<image class="store-icon" src="../../static/images/service-product-detail.png"></image>
+								<text>客服</text>
+							</view>
+							<!-- #endif -->
             </view>
-            <view class="favorites-box cur-poi" @click="collectToggle">
+					</view>
+					<view class="contentRight">
+						<view class="favorites-box cur-poi" @click="collectToggle">
               <image v-if="ifCollect === 0" class="store-icon" src="../../static/images/iconShoucang.png">
               </image>
               <image v-else class="store-icon" src="../../static/images/shoucangActive.png"></image>
               <text class="text">{{ifCollect === 0? '收藏' : '取消'}}</text>
             </view>
-          </view>
+					</view>
         </view>
         <view class="distributorBox flex-items flex-sp-between" @click="applyForRecruit">
           <view class="distributor">
@@ -38,7 +47,7 @@
           </view>
         </view>
       </view>
-			<view class="shop-info-box">
+			<view class="shopContent">
 				<view class="tabs-nav-warp">
 					<scroll-view class="tabs-nav" scroll-x="true">
 						<view class="ul">
@@ -74,38 +83,40 @@
 						<!--						</view>-->
 						<!--					</view>-->
 						<block v-if='isShowGoods'>
-							<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="../../static/images/arrowSortUp.png" v-if="type == 1"
-											class="arrow-img padd-t"></image>
-										<image src="../../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="../../static/images/arrowSortUp.png" v-if="volume == 1"
-											class="arrow-img padd-t"></image>
-										<image src="../../static/images/arrowSortDown.png" v-if="volume == 2"
-											class="arrow-img padd-b"></image>
-									</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="../../static/images/arrowSortUp.png" v-if="type == 1"
+                             class="arrow-img padd-t"></image>
+                      <image src="../../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="../../static/images/arrowSortUp.png" v-if="volume == 1"
+                             class="arrow-img padd-t"></image>
+                      <image src="../../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"></image>
 									<view class="product-bottom-box">
-										<text class="product-name">{{cItem.productName}}</text>
-										<text class="product-num">{{cItem.users}}人付款</text>
+										<view class="product-name">{{cItem.productName}}</view>
+										<view class="product-num font-color-C5AA7B mar-top-10">{{cItem.users}}人付款</view>
 										<view class="product-price-box">
-											<text class="price-box"><text class="fuhao">¥</text>{{cItem.price}}</text>
+											<text class="price-box fs40 font-color-C83732 mar-right-20">¥{{cItem.price}}</text>
 											<text class="price-through">¥{{cItem.originalPrice}}</text>
 										</view>
 									</view>
@@ -118,7 +129,6 @@
 						</block>
 					</view>
 				</view>
-
 			</view>
 		</view>
 	</view>
@@ -156,14 +166,20 @@
 				collectId: 0,
 				ifCollect: 0,
 				salesId: 0, //分销员id
-        fansNumber: '' // 粉丝数
+        fansNumber: '', // 粉丝数
+        topHeight: 0,
+				hasService: false,
+				isLoading: false,
 			}
 		},
 		components: {
 			canvasPage
 		},
 		onLoad(options) {
-			this.isIphone = getApp().globalData.isIphone;
+      let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+      this.topHeight = menuButtonInfo.top
+      console.log(this.topHeight, menuButtonInfo.top, 'fsfsfsfs')
+      this.isIphone = getApp().globalData.isIphone;
 			if (getApp().globalData.shopShareItem) {
 				const item = getApp().globalData.shopShareItem
 				this.id = parseInt(item.storeId)
@@ -179,6 +195,9 @@
 			this.getShopBanner()
 			this.getShopInfo()
 			this.addBusinessBuyerUser();
+			// #ifdef MP-WEIXIN
+			this.getServiceUrl(this.id)
+			// #endif
 		},
 		onReachBottom() {
 			if (this.loadingType == 1) {
@@ -456,40 +475,163 @@
         uni.navigateTo({
           url: `/pages_category_page1/search/index/index`
         })
-      }
+      },
+			// 获取客服url
+			getServiceUrl(id) {
+				if (this.isLoading || !id) { return }
+				const shopids = uni.getStorageSync('service_shopids') || []
+				const corpIds = uni.getStorageSync('service_corpIds') || []
+				const urls = uni.getStorageSync('service_urls') || []
+
+				const index = shopids.indexOf(id)
+				if (index === -1) {
+					this.isLoading = true
+					NET.request(API.CustomerService, {
+						id
+					}, 'get').then(res => {
+						if (res.code === '' && res.data.corpId && res.data.url) {
+							shopids.push(this.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);
+
+							this.corpId = res.data.corpId
+							this.serviceURL = res.data.url
+							if (this.serviceURL) {
+								this.hasService = true
+							}
+						}
+						this.isLoading = false
+					}).catch(err => {
+						console.log(err)
+						this.isLoading = false
+					})
+				} else {
+					this.corpId = corpIds[index]
+					this.serviceURL = urls[index]
+					if (this.serviceURL) {
+						this.hasService = true
+					}
+				}
+			},
+			// 跳转客服
+			flyToService() {
+				if (!this.serviceURL || !this.corpId) {
+					this.hasService = false
+					return
+				}
+				const extInfo = { // 客服信息
+					url: this.serviceURL // 客服链接
+				}
+				// #ifdef MP-WEIXIN
+				wx.openCustomerServiceChat({
+					extInfo,
+					corpId: this.corpId // 企业ID
+				})
+				// #endif
+			},
 		}
 	}
 </script>
-<style>
+<style lang="scss" scoped>
 page {
   background: #F8F8F8;
 }
 </style>
-<style lang='scss'>
+<style lang='scss' scoped>
 page {
   background: #F8F8F8;
 }
-	.shop-top {
-		background: #333333;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 100%;
-    padding-top: 20rpx;
-	}
-  // #ifdef APP-PLUS
-  .shop-top {
-    padding-top: 80rpx;
-  }
-  // #endif
+.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: 20rpx;
+  padding: 200rpx 20rpx 20rpx 20rpx;
   background: #F8F8F8;
 }
-	.shop-top-content {
-		padding: 10rpx 30rpx;
-    background: #FFFFFF;
+// 店铺头部
+.shop-top-content {
+	padding: 10rpx 30rpx;
+  background: #FFFFFF;
+	display: flex;
+	align-items: center;
+	.contentLeft{
+		flex: 9;
+		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;
+			display: flex;
+			align-items: center;
+			.shop-name {
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				font-size: 32rpx;
+				color: #333333;
+				.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;
+				}
+			}
+		}
 	}
+	.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;
@@ -506,433 +648,348 @@ page {
   color: #333333;
   font-size: 28rpx;
 }
-	.shop-info-box {
-		width: 100%;
-		/* background: #fff; */
-		border-radius: 20rpx 20rpx 0 0;
-	}
-
-	.shop-info-top {
-		border-radius: 20rpx 20rpx 0 0;
-		position: relative;
-		display: flex;
-		align-items: center;
-	}
-
-	.photo-img {
-		width: 102rpx;
-		height: 102rpx;
-		border-radius: 10rpx;
-		margin-right: 10rpx;
-	}
-
-	.shop-name {
-		font-size: 32rpx;
-		color: #333333;
-		display: block;
-    width: 400rpx;
-	}
-
-	.shop-num {
-		font-size: 26rpx;
-		color: #333333;
-    opacity: 0.7;
-		margin-top: 15rpx;
-	}
-
-	.favorites-box {
-		display: flex;
-    width: 160rpx;
-    height: 60rpx;
-    background: #C83732;
-    opacity: 1;
-    border-radius: 46rpx;
-    align-items: center;
-    justify-content: center;
-	}
-
-	.favorites-box .store-icon {
-		width: 32rpx;
-		height: 32rpx;
-		margin-right: 8rpx;
-	}
-
-	.favorites-box .text {
-		font-size: 26rpx;
-		color: #fff;
+// 首页内容
+.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;
+					}
+				}
+			}
+		}
 	}
-
 	.shop-banner-box {
 		background: #f7f7f7;
 		padding: 20rpx 30rpx;
 		box-sizing: border-box;
 	}
-
-	.shop-banner-img {
-		width: 100%;
-		height: 280rpx;
-		border-radius: 20rpx;
-	}
-
 	.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-list-nav {
-		display: flex;
-		flex-direction: row;
-		align-items: center;
-		height: 80rpx;
-		line-height: 76rpx;
-		background: #fff;
-	}
-
-	.nav-item {
-		flex: 1;
-		font-size: 30rpx;
-		color: #666;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		height: 80rpx;
-		line-height: 76rpx;
-	}
-
-	.nav-title {}
+.shop-banner-img {
+	width: 100%;
+	height: 280rpx;
+	border-radius: 20rpx;
+}
 
-	.nav-item.active {
-		color: #ff7911;
-	}
+.nav-item {
+	flex: 1;
+	font-size: 30rpx;
+	color: #666;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	height: 80rpx;
+	line-height: 76rpx;
+}
 
-	.nav-item .line {
-		display: inline-block;
-		width: 80rpx;
-		height: 4rpx;
-		background: #fff;
-		border-radius: 2rpx;
-	}
+.nav-item.active {
+	color: #ff7911;
+}
 
-	.nav-item.active .line {
-		background: linear-gradient(0deg, rgba(255, 162, 0, 1), rgba(255, 121, 17, 1));
-	}
+.nav-item .line {
+	display: inline-block;
+	width: 80rpx;
+	height: 4rpx;
+	background: #fff;
+	border-radius: 2rpx;
+}
 
-	.nav-item.padd-l {
-		padding-left: 20%;
-		box-sizing: border-box;
-	}
+.nav-item.active .line {
+	background: linear-gradient(0deg, rgba(255, 162, 0, 1), rgba(255, 121, 17, 1));
+}
 
-	.nav-item.padd-r {
-		padding-right: 20%;
-		box-sizing: border-box;
-	}
+.nav-item.padd-l {
+	padding-left: 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;
-	}
+.nav-item.padd-r {
+	padding-right: 20%;
+	box-sizing: border-box;
+}
 
-	.nav-item-sort .r {
+.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;
 	}
-
-	.nav-item-sort .r .arrow-img {
+	.r .arrow-img {
 		width: 32rpx;
 		height: 32rpx;
 		padding: 7rpx;
 		box-sizing: border-box;
 	}
+}
 
-	/* .nav-item-sort .r .arrow-img.padd-t {
-	  padding-top: 20rpx;
-	}
-
-	.nav-item-sort .r .arrow-img.padd-b {
-	  padding-bottom: 20rpx;
-	}  */
-
-	.shop-list-box {
-		width: 100%;
-		background: #f7f7f7;
-		padding: 12rpx 30rpx 0;
-		box-sizing: border-box;
-		display: flex;
-		flex-wrap: wrap;
-	}
-
-	.shop-list-box .item {
-		width: 340rpx;
-		margin: 0 5rpx 12rpx 0;
-		background: #d6d6d6;
-		border-radius: 10rpx;
-		display: flex;
-		flex-direction: column;
-	}
-
-	.shop-list-box .item:nth-of-type(2n) {
-		margin-left: 5rpx;
-		margin-right: 0;
-	}
-
-	.product-img {
-		width: 340rpx;
-		height: 340rpx;
-		border-radius: 10rpx 10rpx 0 0;
-	}
-
-	.product-bottom-box {
-		padding: 20rpx;
-		box-sizing: border-box;
-		background: #fff;
-		border-radius: 0 0 10rpx 10rpx;
-	}
-
-	.product-name {
-		display: block;
-		font-size: 28rpx;
-		color: #333;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-	}
-
-	.product-num {
-		font-size: 24rpx;
-		color: #999;
-		margin-top: 15rpx;
-	}
-
-	.product-price-box {
-		width: 100%;
-		display: flex;
-		flex-direction: row;
-		align-items: center;
-		justify-content: space-between;
-		margin-top: 30rpx;
-	}
-
-	.product-price-box .price-box {
-		font-size: 36rpx;
-		color: #ff7911;
-		font-weight: 400;
-	}
-
-	.product-price-box .price-box .fuhao {
-		font-size: 24rpx;
-	}
-
-	.product-price-box .price-through {
-		text-decoration: line-through;
-		font-size: 24rpx;
-		color: #999;
-	}
-
-	.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;
-	}
+.product-img {
+	width: 347rpx;
+	height: 347rpx;
+}
 
-	.shop-sort-list .item .sort-title {
-		font-size: 30rpx;
-		color: #333;
-		padding: 30rpx 0;
-	}
+.product-bottom-box {
+	padding: 20rpx;
+	box-sizing: border-box;
+	background: #fff;
+}
 
-	.sort-single-box {
-		display: flex;
-		flex-direction: row;
-		flex-wrap: wrap;
-		width: 100%;
-	}
+.product-name {
+	display: block;
+	font-size: 28rpx;
+	color: #333;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
 
-	.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;
-	}
+.product-num {
+	font-size: 24rpx;
+	margin-top: 15rpx;
+  border: 2rpx solid #E4E5E6;
+  padding: 10rpx;
+  display: inline-block;
+}
 
-	.sort-single-box .single:nth-of-type(2n) {
-		margin-left: 5rpx;
-		margin-right: 0;
-	}
+.product-price-box {
+	width: 100%;
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	margin-top: 30rpx;
+}
+.product-price-box .price-through {
+	text-decoration: line-through;
+	font-size: 24rpx;
+	color: #CCC;
+}
 
-	.back {
-		width: 40rpx;
-		height: 40rpx;
-		padding: 20rpx;
-	}
+.shop-sort-list {
+	margin-top: 20rpx;
+	width: 100%;
+	display: flex;
+	flex-direction: column;
+}
 
-	.empty-container {
-		width: 100%;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
+.shop-sort-list .item {
+	display: flex;
+	flex-direction: column;
+	background: #fff;
+	padding: 0 30rpx 20rpx;
+	box-sizing: border-box;
+	margin-bottom: 20rpx;
+}
 
-	.empty-container image {
-		width: 200rpx;
-		height: 200rpx;
-		margin-top: 150rpx;
-	}
+.shop-sort-list .item .sort-title {
+	font-size: 30rpx;
+	color: #333;
+	padding: 30rpx 0;
+}
 
-	.empty-container text {
-		font-size: 28rpx;
-		color: #999;
-		margin-top: 30rpx;
-		display: block;
-		width: 300rpx;
-		text-align: center;
-	}
+.sort-single-box {
+	display: flex;
+	flex-direction: row;
+	flex-wrap: wrap;
+	width: 100%;
+}
 
-	.active {
-		color: #ff7911;
-	}
+.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;
+}
 
-	.tabs-nav-warp {
-		padding: 0 20px;
-	}
+.sort-single-box .single:nth-of-type(2n) {
+	margin-left: 5rpx;
+	margin-right: 0;
+}
 
-	.tabs-nav {
-		margin-top: 20upx;
+.back {
+	width: 50rpx;
+	height: 50rpx;
+  padding: 0 20rpx;
+}
 
-		.ul {
-			white-space: nowrap;
+.empty-container {
+	width: 100%;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+}
 
-			.li {
-				display: inline-block;
-				margin-left: 36upx;
-				font-size: 30upx;
-				color: #333;
-				position: relative;
-				padding-bottom: 18upx;
+.empty-container image {
+	width: 200rpx;
+	height: 200rpx;
+	margin-top: 150rpx;
+}
 
-				&:first-child {
-					margin-left: 0;
-				}
+.empty-container text {
+	font-size: 28rpx;
+	color: #999;
+	margin-top: 30rpx;
+	display: block;
+	width: 300rpx;
+	text-align: center;
+}
 
-				&.on {
-					&:after {
-						content: '';
-						width: 100%;
-						height: 8upx;
-						background: #C5AA7B;
-						position: absolute;
-						left: 0;
-						bottom: 0;
-					}
+.active {
+	color: #ff7911;
+}
 
-					font-weight:bold;
-				}
-			}
-		}
-	}
 
-	.distributor {
-		font-size: 26upx;
-		border-radius: 25upx;
-		display: flex;
-		align-items: center;
+.distributor {
+	font-size: 26upx;
+	border-radius: 25upx;
+	display: flex;
+	align-items: center;
 
-		.item-btn-icon {
-			width: 40upx;
-			height: 40upx;
-			margin-right: 10upx;
-		}
+	.item-btn-icon {
+		width: 40upx;
+		height: 40upx;
+		margin-right: 10upx;
 	}
-.search-btn {
-  height: 66rpx;
-  border-radius: 33rpx;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  margin-right: 30rpx;
-
-  .search-icon {
-    width: 50rpx;
-    height: 50rpx;
-    // margin-left: 33rpx;
-  }
-
-  .search-word {
-    font-size: 26rpx;
-    font-weight: 400;
-    color: rgba(153, 153, 153, 1);
-    margin-left: 10rpx;
-  }
 }
-	// #ifdef MP-ALIPAY
-	.back {
-		width: 25rpx;
-		height: 25rpx;
-		margin-top: 15rpx;
-		padding: 10rpx;
-		display: none;
+.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: 50rpx;
+	  height: 50rpx;
+	   margin-left: 10rpx;
+	}
+
+	.search-word {
+	  font-size: 26rpx;
+	  font-weight: 400;
+	  color: rgba(153, 153, 153, 1);
+	  margin-left: 10rpx;
 	}
+}
+// #ifdef MP-ALIPAY
+.back {
+	width: 25rpx;
+	height: 25rpx;
+	margin-top: 15rpx;
+	padding: 10rpx;
+	display: none;
+}
 
-	.shop-top {
-		margin-top: 0 !important;
-	}
+.shop-top {
+	margin-top: 0 !important;
+}
 
-	.shop-top-content {
-		padding-top: 80rpx;
-	}
+.shop-top-content {
+	padding-top: 80rpx;
+}
 
-	.nav-item-sort .r .arrow-img {
-		width: 16rpx;
-		height: 16rpx;
-		padding: 4rpx;
-	}
+.nav-item-sort .r .arrow-img {
+	width: 16rpx;
+	height: 16rpx;
+	padding: 4rpx;
+}
 
-	.tabs-nav {
-		margin-top: 20upx;
+.tabs-nav {
+	margin-top: 20upx;
 
-		.ul {
-			.li {
-				&:first-child {
-					margin-left: 36upx;
-				}
+	.ul {
+		.li {
+			&:first-child {
+				margin-left: 36upx;
 			}
 		}
 	}
-
-	// #endif
-
-// #ifdef MP
-.shop-top {
-  padding-top: 90rpx;
 }
 // #endif
 </style>

+ 464 - 0
pages_category_page2/channelCoupon/index.vue

@@ -0,0 +1,464 @@
+<template>
+  <view class="channel-coupon">
+    <view class="details">
+      <swiper class="swiper" :indicator-dots="true" :autoplay="true">
+        <swiper-item v-for="(imgItem, index) in channelCouponData.productImageList" :key="index">
+          <image class="swiper-img" :src='imgItem'></image>
+        </swiper-item>
+      </swiper>
+      <view class="info">
+        <view class="price-box">
+          <view class="icon">
+            <img class="icon-img" src="../../static/img/channelCoupon/icon-coupon.png" alt="" mode="widthFix"/>
+          </view>
+          <label class="price">¥{{channelCouponData.price}}</label>
+          <label class="original-price">¥{{channelCouponData.originalPrice}}</label>
+          <label class="buy-count">{{channelCouponData.buyUserCount}}人付款</label>
+        </view>
+        <text class="name" @click="jumpProductDetail(channelCouponData)">{{channelCouponData.productName}}</text>
+      </view>
+      <view class="coupon">
+        <view class="price">
+          <text class="unit" v-if="channelCouponData.couponType === 1">¥</text>
+          <text class="val">{{channelCouponData.reduceMoney}}</text>
+          <text class="unit" v-if="channelCouponData.couponType === 2">折</text>
+        </view>
+        <view class="coupon-content">
+          <view class="time">
+            <text class="text">有效期</text>
+            <text class="val">{{channelCouponData.startTime.slice(0,10)}} - {{channelCouponData.endTime.slice(0,10)}}</text>
+          </view>
+          <view class="btn" @click="receiveCoupon(channelCouponData)">立即领取</view>
+        </view>
+      </view>
+    </view>
+    <div class="pro-list" v-if="productList && productList.length > 0">
+      <div class="title">
+        <img class="title-img" src="../../static/img/channelCoupon/img-title.png" alt="商品推荐" mode="widthFix"/>
+      </div>
+      <div class="product-list">
+        <div class="product-list-box" >
+          <div class="product-list-item-warp" v-for="(item,index) in productList" :key="index" @click="jumpProductDetail(item)">
+            <div class="product-list-item">
+              <div class="product-list-img">
+                <img v-show="item.image" class="img" :src="item.image">
+              </div>
+              <div class="product-list-info">
+                <label class="product-name">{{item.productName}}</label>
+                <div class="flex">
+                  <div class="shop-box" @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.users?item.users: 0}}人付款</label>
+                </div>
+                <div class="price-warp">
+                  <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 == 8" src="../../static/images/memberCenterIcon.png">
+                  <div class="price">
+                    ¥ {{item.price}}
+                  </div>
+                  <div class="original-price">
+                    ¥ {{item.originalPrice}}
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </view>
+</template>
+
+<script>
+const NET = require('../../utils/request')
+const API = require('../../config/api')
+export default {
+  name: "channelCoupon",
+  data() {
+    return {
+      channelCouponData:{},
+      productList:[],
+      isLogin: false,
+      params:{
+        productId: 0,
+        shopCouponId: 0,
+        shopId: 0
+      }
+    }
+  },
+  onLoad(options) {
+    console.log(options,'options')
+    this.params.productId = options.productId
+    this.params.shopCouponId = options.shopCouponId
+    this.params.shopId = options.shopId
+    const res = uni.getStorageSync('storage_key'),token = res.token;
+    this.isLogin = !!token
+    this.getChannelCoupon()
+    this.getProductList()
+  },
+  methods:{
+    // 获取渠道优惠券
+    getChannelCoupon(){
+      uni.showLoading({
+        mask: true,
+        title: '加载中...'
+      })
+      NET.request(API.getChannelCoupon, this.params, 'GET').then(res => {
+        this.channelCouponData = res.data
+        uni.hideLoading()
+      }).catch(res => {
+        uni.hideLoading()
+        uni.showToast({
+          title: '失败',
+          icon: "none"
+        })
+      })
+    },
+    // 获取推荐产品
+    getProductList(){
+      uni.showLoading({
+        mask: true,
+        title: '加载中...'
+      })
+      var params ={
+        page: 1,
+        pageSize: 10,
+        timestamp: new Date().getTime()
+      }
+      NET.request(API.getRandomProduct, params, 'GET').then(res => {
+        this.productList = res.data.list
+        uni.hideLoading()
+      }).catch(res => {
+        uni.hideLoading()
+      })
+    },
+    // 领取优惠券
+    receiveCoupon(item) {
+      if (this.isLogin) {
+        var paramsData = {
+          shopCouponId: item.shopCouponId,
+          shopId: this.params.shopId
+        }
+        NET.request(API.ReceiveCoupon, paramsData, 'POST').then(res => {
+          uni.showToast({
+            title:'领取成功',
+            icon:"success"
+          })
+		  let data = {
+			  shopId:this.channelCouponData.shopId,
+			  productId:this.channelCouponData.productId,
+			  skuId:this.channelCouponData.skuId,
+		  }
+		  setTimeout(()=>{
+			  this.jumpProductDetail(data)
+		  },2000)
+        }).catch(res => {
+          if(res.data.code !== '200'){
+            uni.showToast({
+              title:res.data.message,
+              icon:"none"
+            })
+          }
+        })
+      } else {
+        uni.showToast({
+          title:'请先登录',
+          icon:"none"
+        })
+        uni.navigateTo({
+          url:'/pages_category_page2/userModule/login'
+        })
+      }
+    },
+    // 跳转到店铺主页
+    jumpStore(item){
+      uni.navigateTo({
+        url: `/pages_category_page1/store/index?storeId=${item.shopId}`
+      })
+    },
+    // 跳转到商品详情
+    jumpProductDetail(item){
+      uni.navigateTo({
+        url: '/pages_category_page1/goodsModule/goodsDetails?shopId=' + item.shopId + '&productId=' + item.productId + '&skuId=' + item
+            .skuId
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.channel-coupon{
+  .details{
+    background-color: #fff;
+    padding-bottom: 48rpx;
+    .swiper{
+      height: 750rpx;
+      &-img{
+        width: 100%;
+        height: 100%;
+      }
+    }
+    .info{
+      padding: 0 20rpx;
+      margin-top: 20rpx;
+      .price-box{
+        display: flex;
+        align-items: center;
+        position: relative;
+        .icon{
+          padding-right: 8rpx;
+          width: 66rpx;
+          height: 46rpx;
+          &-img{
+            width: 100%;
+            height: 100%;
+          }
+        }
+        .price{
+          color: #C83732;
+          font-weight: bold;
+          font-size: 60rpx;
+          margin-right: 10rpx;
+        }
+        .original-price{
+          padding-top: 20rpx;
+          font-size: 24px;
+          color: #CCCCCC;
+          text-decoration:line-through;
+        }
+        .buy-count{
+          position: absolute;
+          right: 0;
+          font-size: 26rpx;
+          color: #CCCCCC;
+        }
+      }
+      .name{
+        margin-top: 20rpx;
+        font-size: 32rpx;
+        line-height: 48rpx;
+        color: #333333;
+      }
+    }
+    .coupon{
+      margin: 32rpx 20rpx;
+      height: 140rpx;
+      background: #333333 url("../../static/img/channelCoupon/border-coupon.png") no-repeat right center / auto 140rpx;
+      display: flex;
+      .price{
+        position: relative;
+        width: 204rpx;
+        display: flex;
+        justify-content: center;
+        align-items: baseline;
+        height: 100%;
+        border-right: 2rpx solid #666666;
+        line-height: 140rpx;
+        .unit{
+          font-size: 36rpx;
+          color: #FFEBC4;
+        }
+        .val{
+          font-size: 70rpx;
+          color: #FFEBC4;
+        }
+        &:before,&:after{
+          content: '';
+          width: 24rpx;
+          height: 24rpx;
+          background: #fff;
+          border-radius: 50%;
+          position: absolute;
+          right: -12rpx;
+        }
+        &:before{
+          top: -12rpx;
+        }
+        &:after{
+          bottom: -12rpx;
+        }
+      }
+      &-content{
+        flex: 1;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        padding: 0 50rpx;
+        .time{
+          .text{
+            font-size: 32rpx;
+            color: #FFFFFF;
+            line-height: 44rpx;
+            display: block;
+          }
+          .val{
+            font-size: 20rpx;
+            color: #999999;
+            line-height: 28rpx;
+          }
+        }
+        .btn{
+          width: 122rpx;
+          height: 52rpx;
+          line-height: 52rpx;
+          border: 2rpx solid #999999;
+          font-size: 24rpx;
+          text-align: center;
+          color: #FFFFFF;
+        }
+      }
+    }
+  }
+}
+.pro-list{
+  background: #F8F8F8;
+  padding: 42upx 13upx 20upx;
+  .title{
+    text-align: center;
+    margin-bottom: 36upx;
+    .title-img{
+      width: 211upx;
+    }
+  }
+  /**多行多列**/
+  .product-list {
+    position: relative;
+    &-box {
+      display: flex;
+      flex-wrap: wrap;
+      flex-direction: row;
+      &.swiper{
+        height: 620upx;
+      }
+    }
+    &.product-swiper .product-list-box{
+      padding-left: 0;
+    }
+    &-item-warp{
+      margin: 0 0 20upx 0;
+    }
+    &-item {
+      width: 348upx;
+      padding: 0 7upx;
+      box-sizing: content-box;
+    }
+    &-img {
+      width: 348upx;
+      height: 348upx;
+      background-color: #f5f5f5;
+      border-radius: 10upx 10upx 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{
+        font-weight: normal;
+      }
+      .product-name{
+        font-size: 28upx;
+        color: #333;
+        display: block;
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+        margin-bottom: 18upx;
+        line-height: 40upx;
+      }
+      .flex{
+        display: flex;
+        align-items: center;
+      }
+      .shop-box{
+        background-color: #333333;
+        border-radius: 0upx 20upx 20upx 0upx;
+        line-height: 40upx;
+        display: flex;
+        align-items: center;
+        height: 40upx;
+        margin-right: 10upx;
+        .shop-name{
+          font-size: 20upx;
+          color: #FFEBC4;
+          padding: 0 8upx 0 12upx;
+        }
+        .shop-logo{
+          border: 2upx solid #707070;
+          border-radius: 50%;
+          overflow: hidden;
+          float: right;
+          img{
+            width: 34upx;
+            height: 34upx;
+            display: block;
+          }
+        }
+      }
+      .buy-count{
+        color: #C5AA7B;
+        font-size: 20upx;
+        border: 2upx solid #E4E5E6;
+        line-height: 40upx;
+        padding: 0 5upx;
+      }
+      .price-warp{
+        display: flex;
+        align-items: baseline;
+        line-height: 56upx;
+        .iconImg {
+          width: 58rpx;
+          height: 36rpx;
+          margin-right: 10rpx;
+        }
+        .price{
+          color: #C83732;
+          font-size: 40upx;
+          margin-right: 20upx;
+        }
+        .original-price{
+          font-size: 24upx;
+          color: #ccc;
+          text-decoration: line-through;
+        }
+      }
+    }
+  }
+}
+
+.swiper-dots {
+  display: flex;
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: 15rpx;
+  z-index: 66;
+  .dot {
+    width: 10upx;
+    height: 10upx;
+    background: #333333;
+    opacity: 0.3;
+    border-radius: 5upx;
+    margin: 0 10upx;
+  }
+
+  .dot-active {
+    width: 20upx;
+    opacity: 1;
+  }
+}
+</style>

+ 1 - 0
pages_category_page1/distributionModule/distributionOrder.vue → pages_category_page2/distributionModule/distributionOrder.vue

@@ -65,6 +65,7 @@
 		methods: {
 			getSalesOrderPage() {
 				uni.showLoading({
+          mask: true,
 					title: '加载中...'
 				})
 				NET.request(API.FindMySalesPage, {

+ 453 - 0
pages_category_page2/livePage/components/liveBox.vue

@@ -0,0 +1,453 @@
+<template>
+  <view class="live-box">
+    <view class="live-ongoing" v-if="liveData.liveStatus === 101">
+      <image class="cover-img" :src="liveData.feedsImg" />
+      <view class="status">
+        <view class="status-state">
+          <image class="img" src="../../../static/img/live/icon-live-num.png" />直播中
+        </view>
+        <!-- <view class="status-num">1000人</view> -->
+      </view>
+      <view class="user">
+        <view class="user-pic">
+          <image class="img" :src="liveData.anchorHeadImg" />
+        </view>
+        <view class="user-name">{{ liveData.anchorNickName }}</view>
+      </view>
+      <view class="products">
+        <view class="uni-padding-wrap">
+          <view class="page-section swiper">
+            <view class="page-section-spacing">
+              <swiper class="swiper"
+                :indicator-dots="indicatorDots"
+                :autoplay="autoplay"
+                :interval="interval"
+                :duration="duration"
+                :vertical="true"
+              >
+                <swiper-item
+                  v-for="item in liveData.goods"
+                  :key="item.goods_id"
+                >
+                  <view class="swiper-item">{{ item.name }}</view>
+                </swiper-item>
+              </swiper>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="live-other" v-else @click="toLive">
+      <image class="cover-img" :src="liveData.feedsImg" />
+      <div class="filter-box-warp">
+        <div class="filter-box">
+          <image class="cover-img" :src="liveData.feedsImg" />
+        </div>
+      </div>
+      <view class="user">
+        <view class="user-pic"><image class="img" :src="liveData.anchorHeadImg" /></view>
+        <view class="user-name">{{ liveData.anchorNickName }}</view>
+      </view>
+      <view class="count-down" v-if="liveStatus === 102">
+        <image v-if="isLate" class="img" src="@/static/img/live/live-late.png"/>
+        <view class="text">{{ liveTimeTitle }}</view>
+        <view v-if="!isLate" class="time">
+          <view class="time-item">{{times[0]}}</view>
+          <view class="dot">:</view>
+          <view class="time-item">{{times[1]}}</view>
+          <view class="dot">:</view>
+          <view class="time-item">{{times[2]}}</view>
+        </view>
+      </view>
+      <!-- #ifdef MP-WEIXIN -->
+      <view
+        v-if="liveStatus === 102 && !isLate"
+        class="btn-subscribe"
+        :class="{subscribed : subscribeLive === '已预约'}"
+        @click.stop="onSubscribe"
+      >{{ subscribeLive }}</view>
+      <!-- #endif -->
+      <view class="endContainer" v-if="liveStatus === 103">
+        <view class="endBox">
+          <view></view>
+          <view></view>
+          <view></view>
+          <view></view>
+        </view>
+        <view>直播已结束</view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+const NET = require('@/utils/request')
+const API = require('@/config/api')
+
+import { startLiveTemplate } from '@/config/subscribe.js'
+import { liveAppid } from '@/config/live.js'
+
+// #ifdef MP-WEIXIN
+const livePlayer = requirePlugin('live-player-plugin')
+// #endif
+export default {
+  props: {
+    liveData: {
+      type: Object,
+      default: () => ({
+        roomId: 0,
+        anchorNickName: '',
+        feedsImg: '' // 官方收录封面
+      })
+    }
+  },
+  data () {
+    return {
+      background: ['color1', 'color2', 'color3'],
+      indicatorDots: false,
+      autoplay: true,
+      interval: 2000, // 自动播放间隔时长
+      duration: 500, // 幻灯片切换时长(ms)
+      d: 0,
+      m: 0,
+      s: 0,
+      times: ['00', '00', '00'],
+      liveStatus: 100,
+      liveTimeTitle: '开播倒计时',
+      subscribeLive: '立即预约',
+      timer: null,
+      isLate: false,
+    }
+  },
+  created() {
+    this.liveStatus = this.liveData.liveStatus
+    this.subscribeLive = this.liveData.subscribeStatus === 0 ? '立即预约' : '已预约'
+    this.getStatus()
+    this.countTime()
+    // this.getSubscribeStatus()
+  },
+  destroyed() {
+    clearTimeout(this.timer)
+  },
+  methods: {
+    getStatus() {
+      if (!this.liveData.roomId) { return }
+      let _this = this
+      // #ifdef MP-WEIXIN
+      livePlayer.getLiveStatus({ room_id: this.liveData.roomId })
+      .then(res => {
+        // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
+        // _this.liveData.liveStatus = res.liveStatus
+        _this.liveStatus = res.liveStatus
+      })
+      .catch(err => {
+          console.log('get live status', err)
+      })
+      this.timer = setInterval(() => {
+        livePlayer.getLiveStatus({ room_id: this.liveData.roomId })
+          .then(res => {
+            // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期
+            _this.liveStatus = res.liveStatus
+            this.countTime()
+            console.log('get live status', res.liveStatus)
+          })
+          .catch(err => {
+            console.log('get live status', err)
+          })
+      }, 60000)
+      // #endif
+    },
+    changeIndicatorDots(e) {
+        this.indicatorDots = !this.indicatorDots
+    },
+    changeAutoplay(e) {
+        this.autoplay = !this.autoplay
+    },
+    intervalChange(e) {
+        this.interval = e.target.value
+    },
+    durationChange(e) {
+        this.duration = e.target.value
+    },
+    countTime(){
+      const nowtime = new Date().getTime()  //获取当前时间
+      const starttime = new Date(this.liveData.startTime).getTime()
+      if(this.liveStatus === 102){
+        if(starttime > nowtime){
+          var lefttime = starttime - nowtime  //距离结束时间的毫秒数
+          var leftd = Math.floor(lefttime/(1000*60*60)),  //计算小时数
+              leftm = Math.floor(lefttime/(1000*60)%60),  //计算分钟数
+              lefts = Math.floor(lefttime/1000%60);  //计算秒数
+          this.times = [leftd < 10?'0'+ leftd:leftd,leftm < 10?'0'+ leftm:leftm,lefts < 10?'0'+ lefts:lefts]
+          this.liveTimeTitle = '开播倒计时'
+          setTimeout(() => {
+            this.countTime()
+          },1000)
+        } else {
+          this.times = ['00', '00', '00']
+          this.isLate = true
+          this.liveTimeTitle = '正在赶来的路上...'
+        }
+      }
+    },
+    toLive() {
+			if (!liveAppid || !this.liveData) { return }
+			// 跳转直播间携带路由参数
+			// let customParams = encodeURIComponent(JSON.stringify({ path: 'livePage/index', pid: 1 }))
+			// #ifdef MP-WEIXIN
+			wx.navigateTo({
+        url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}`
+				// url: `plugin-private://${liveAppid}/pages/live-player-plugin?room_id=${this.liveData.roomId}&custom_params=${customParams}`
+			})
+			// #endif
+    },
+    onSubscribe() {
+      if (this.subscribeLive === '立即预约') {
+        const _this = this
+        // #ifdef MP-WEIXIN
+        uni.requestSubscribeMessage({
+          tmplIds: [startLiveTemplate],
+          success (res) {
+            if (res[startLiveTemplate] === "accept") {
+              NET.request(API.SubScribeLive, {id: _this.liveData.id }, 'post')
+              .then(res => {
+                if (res.data) {
+                  _this.subscribeLive = '已预约'
+                } else {
+                  uni.showToast({
+                    title: res.message || '订阅失败,请稍后再试!',
+                    icon: "none"
+                  })
+                }
+              })
+              .catch(err => {
+                console.log(err)
+                uni.showToast({
+                  title: res.message || '订阅失败,请稍后再试!',
+                  icon: "none"
+                })
+              })
+            }
+          }
+        })
+        // #endif
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.live-box{
+  position: relative;
+  color: #fff;
+  width: 100%;
+  height: 100%;
+  .cover-img{
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    z-index: 0;
+  }
+  .user{
+    display: flex;
+    line-height: 60rpx;
+    height: 64rpx;
+    &-pic{
+      .img{
+        width: 60rpx;
+        height: 60rpx;
+        border: 2px solid rgba(255, 255, 255, 0.5019607843137255);
+        border-radius: 50%;
+        overflow: hidden;
+      }
+    }
+    &-name{
+      font-size: 28rpx;
+      margin-left: 16rpx;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      width: 245rpx;
+    }
+  }
+  .live-ongoing{
+    width: 100%;
+    height: 100%;
+    position: relative;
+    .status{
+      position: absolute;
+      top: 22rpx;
+      left: 22rpx;
+      //width: 212upx;
+      height: 48rpx;
+      // background: rgba(0,0,0,0.3);
+      // border: 2rpx solid rgba(255,255,255,0.3);
+      border-radius: 24rpx;
+      font-size: 20rpx;
+      line-height: 44rpx;
+      display: flex;
+      // padding-right: 8rpx;
+      &-state{
+        width: 118rpx;
+        height: 44rpx;
+        background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
+        opacity: 1;
+        border-radius: 26rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        .img{
+          width: 20rpx;
+          height: 20rpx;
+          margin-right: 6rpx;
+        }
+      }
+      &-num{
+        min-width: 80rpx;
+        padding: 0 8rpx;
+      }
+    }
+    .user{
+      position: absolute;
+      bottom: 62rpx;
+      left: 20rpx;
+    }
+    .products{
+      position: absolute;
+      left: 0rpx;
+      bottom: 20rpx;
+      width: 100%;
+      padding:0 20rpx;
+      .swiper{
+        height: 34rpx;
+        line-height: 34rpx;
+        font-size: 24rpx;
+        overflow: hidden;
+        text-overflow:ellipsis;
+        white-space: nowrap;
+      }
+    }
+  }
+  .live-other{
+    position: relative;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    .filter-box-warp{
+      background-color: #000000;
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+      .filter-box{
+        position: absolute;
+        top: -30rpx;
+        left: -30rpx;
+        width: 348rpx;
+        height: 464rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        -webkit-filter: blur(20px);
+        -moz-filter: blur(21px);
+        -ms-filter: blur(20px);
+        -o-filter: blur(20px);
+        padding: 30rpx;
+        box-sizing: content-box;
+      }
+    }
+    .user{
+      position: absolute;
+      top: 20rpx;
+      left: 20rpx;
+    }
+    .count-down{
+      position: relative;
+      .text{
+        font-size: 26rpx;
+        line-height: 36rpx;
+        margin-bottom: 16rpx;
+        opacity: 0.5;
+        text-align: center;
+      }
+      .img{
+        display: block;
+        width: 80rpx;
+        height: 80rpx;
+        margin: 16rpx auto;
+      }
+      .time{
+        display: flex;
+        justify-content: space-around;
+        align-items: center;
+        &-item{
+          min-width: 52rpx;
+          padding: 0 5rpx;
+          height: 52rpx;
+          line-height: 52rpx;
+          background: #FFFFFF;
+          opacity: 1;
+          border-radius: 6rpx;
+          font-size: 26rpx;
+          color: #C83732;
+          text-align: center;
+          .dot{
+            line-height: 52rpx;
+          }
+        }
+      }
+    }
+    .btn-subscribe{
+      width: 200rpx;
+      height: 64rpx;
+      line-height: 64rpx;
+      background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
+      box-shadow: 0rpx 6rpx 12rpx rgba(233, 0, 0, 0.3);
+      opacity: 1;
+      border-radius: 6rpx;
+      color: #fff;
+      font-size: 24rpx;
+      text-align: center;
+      position: absolute;
+      bottom: 60rpx;
+      left: 50%;
+      margin-left: -100rpx;
+      &.subscribed{
+        background: #FFFFFF;
+        color: #999999;
+        box-shadow: none;
+      }
+    }
+    .endContainer{
+      position: relative;
+      .endBox{
+        width: 40%;
+        height: 60rpx;
+        margin: 20rpx auto;
+        display: flex;
+        justify-content: space-between;
+        align-items: flex-end;
+        view{
+          width: 0;
+          border: 2rpx solid #FFF;
+        }
+        view:nth-of-type(1){
+          height: 20%;
+        }
+        view:nth-of-type(2){
+          height: 50%;
+        }
+        view:nth-of-type(3){
+          height: 30%;
+        }
+        view:nth-of-type(4){
+          height: 70%;
+        }
+      }
+    }
+  }
+}
+</style>

+ 94 - 0
pages_category_page2/livePage/index.vue

@@ -0,0 +1,94 @@
+<template>
+	<view class="live-list-page">
+		<view class="live-list" v-if="roomList.length">
+			<LiveBox class="live-item"
+				v-for="item in roomList"
+				:key="item.roomid"
+				:liveData="item"
+			/>
+		</view>
+    <view v-else class="emptyCart-box">
+      <image class="emptyCart-img" src="@/static/images/collectEmpty.png"></image>
+      <label class="text font-color-999 fs26 mar-top-30">暂无直播~</label>
+    </view>
+	</view>
+</template>
+
+<script>
+const NET = require('@/utils/request')
+const API = require('@/config/api')
+
+import LiveBox from './components/liveBox.vue'
+export default {
+	components: {
+		LiveBox
+	},
+	data() {
+		return {
+			page: {
+				page: 1,
+				pageSize: 10,
+			},
+			isLoading: false,
+			roomList: []
+		}
+	},
+	onLoad() {
+		this.getLiveRooms()
+	},
+	onReachBottom() {
+		this.page.page ++
+		this.getLiveRooms()
+  },
+	methods: {
+		// 获取直播间列表
+		getLiveRooms () {
+			if (this.isLoading) { return }
+			this.isLoading = true
+			NET.request(API.LiveRoomes, this.page, 'get').then(res => {
+				if (this.page.page === 1) { // 第一次查询
+					this.roomList = res.data.list
+				} else { // 下拉继续查询
+					this.roomList = this.roomList.concat(res.data.list)
+				}
+				this.isLoading = false
+			}).catch(err => {
+				console.log(err)
+				this.isLoading = false
+			})
+		},
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.live-list-page{
+	.live-list{
+		width: 100%;
+		display: flex;
+		flex-wrap: wrap;
+		.live-item{
+			width: 48%;
+			height: 460rpx;
+			margin: 1%;
+			border-radius: 8rpx;
+      overflow: hidden;
+		}
+	}
+  .emptyCart-box{
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+    .emptyCart-img{
+      width: 198upx;
+      height: 183upx;
+    }
+  }
+}
+</style>

+ 72 - 5
pages_category_page1/orderModule/afterSale.vue → pages_category_page2/orderModule/afterSale.vue

@@ -3,7 +3,7 @@
 	<view>
 		<view class="content">
 			<view class="order-list-box">
-				<view v-if="FindReturnData.total>0">
+				<view>
 					<view class="item" v-for="item in FindReturnDatalist">
 						<view class="order-list-top">
 							<view class="top-l" @click="goShop(item.shopId)">
@@ -71,19 +71,39 @@
 						</view>
 					</view>
 				</view>
-				<view v-else class="emptyCart-box flex-items-plus flex-column">
+				<view v-if="ifEmpty" class="emptyCart-box flex-items-plus flex-column">
 					<image class="emptyCart-img" src="../../static/img/bgnull.png"></image>
-					<label class="font-color-999 fs26 mar-top-30">这里空空如也~</label>
+					<label class="font-color-999 fs26 mar-top-30">暂无售后记录~</label>
 				</view>
 			</view>
 		</view>
+    <!-- 优惠券领取 -->
+    <tui-modal :show="delRecord" :custom="true" :fadein="true">
+      <view class="Put-box1">
+        <view class="text-align fs34 fs-bold">
+          是否删除此记录
+        </view>
+        <view class="flex-display flex-sp-between">
+          <view class="btn" @click="delRecord = false">
+            取消
+          </view>
+          <view class="btn submit" @click="delRecordFn">
+            确定
+          </view>
+        </view>
+      </view>
+    </tui-modal>
 	</view>
 </template>
 
 <script>
+  import tuiModal from "@/components/modal/modal";
 	const NET = require('../../utils/request')
 	const API = require('../../config/api')
 	export default {
+    components: {
+      tuiModal
+    },
 		data() {
 			return {
 				FindReturnData:[],
@@ -95,6 +115,9 @@
 				page:1,//当前页
 				pageSize:20,//每页记录数
 				loadingType:0,
+        delRecord: false,
+        currentAfterId: '',
+        ifEmpty: false
 			}
 		},
 		onLoad(){
@@ -153,6 +176,9 @@
 						this.page = this.page
 					}
 					this.FindReturnDatalist = this.FindReturnDatalist.concat(res.data.list)
+          if (this.FindReturnDatalist.length === 0) {
+            this.ifEmpty = true
+          }
 					this.FindReturnData = res.data
 				}).catch(res => {
 					uni.hideLoading()
@@ -161,6 +187,32 @@
 			},
       // 删除记录
       deleteRecord (item) {
+        this.currentAfterId = item.afterId
+        this.delRecord = true
+      },
+      delRecordFn () {
+        this.delRecord = false
+        uni.showLoading({
+          title:'正在删除...'
+        })
+        NET.request(API.deleteAfter, {
+          id: this.currentAfterId,
+        }, 'POST').then(res => {
+          uni.hideLoading()
+          uni.showToast({
+            title:'删除成功',
+            icon:'none',
+            duration:1500
+          })
+          this.currentAfterId = ''
+          setTimeout(() => {
+            this.page = 1
+            this.FindReturnDatalist = []
+            this.getFindReturn()
+          }, 2000);
+        }).catch(res => {
+          uni.hideLoading()
+        })
       },
 			// 撤销申请
 			cancelRefundTap(item){
@@ -231,11 +283,26 @@
 	}
 </script>
 
-<style lang="less" scoped>
+<style lang="scss" scoped>
 	page {
 		background-color: #F7F7F7;
 	}
-
+  .Put-box1 {
+    .btn {
+      text-align: center;
+      margin-top: 40rpx;
+      border: 2rpx solid #333333;
+      height: 80upx;
+      line-height: 80upx;
+      width: 100%;
+      color: #333333;
+    }
+    .submit {
+      background-color: #333333;
+      color: #FFEBC4;
+      margin-left: 20rpx;
+    }
+  }
 	.emptyCart-box {
 		margin-top: 70upx;
 

+ 0 - 0
pages_category_page1/orderModule/refundDetails.vue → pages_category_page2/orderModule/refundDetails.vue


+ 0 - 0
pages_category_page1/orderModule/returnDetails.vue → pages_category_page2/orderModule/returnDetails.vue


+ 15 - 14
pages_category_page2/userModule/accountLogin.vue

@@ -86,6 +86,7 @@
 				} else {
 					const that = this
 					uni.showLoading({
+            mask: true,
 						title: '正在登录...',
 						duration: 2000,
 					});
@@ -115,22 +116,22 @@
 								uni.removeStorageSync('inviteSpell');
 							}, 2000)
 						} else {
-              if (that.beforePage && that.beforePage.route !==
-                  'pages_category_page2/userModule/accountLogin' &&
-                  that.beforePage.route !== 'pages_category_page2/userModule/login' &&
+							if (that.beforePage && that.beforePage.route !==
+								'pages_category_page2/userModule/accountLogin' &&
+								that.beforePage.route !== 'pages_category_page2/userModule/login' &&
                   that.beforePage.route !== 'pages_category_page2/userModule/register') {
-                console.log(19)
-                uni.navigateBack({
-                  delta: 1
-                })
-              } else if (that.doubleBeforePage && that.doubleBeforePage.route !==
-                  'pages_category_page2/userModule/accountLogin' &&
-                  that.doubleBeforePage.route !== 'pages_category_page2/userModule/login' &&
+							  console.log(19)
+								uni.navigateBack({
+									delta: 1
+								})
+							} else if (that.doubleBeforePage && that.doubleBeforePage.route !==
+								'pages_category_page2/userModule/accountLogin' &&
+								that.doubleBeforePage.route !== 'pages_category_page2/userModule/login' &&
                   that.doubleBeforePage.route !== 'pages_category_page2/userModule/register') {
-                uni.navigateBack({
-                  delta: 2
-                })
-              } else {
+								uni.navigateBack({
+									delta: 2
+								})
+							} else {
 							setTimeout(function() {
 								uni.switchTab({
 									url: '../../pages/tabbar/user/index'

+ 85 - 78
pages_category_page2/userModule/addAddress.vue

@@ -2,30 +2,30 @@
 	<!-- 编辑/添加地址 -->
 	<view class="container flex-center flex-column">
     <!-- #ifdef MP-WEIXIN -->
-    <view class="wxAddress flex-items flex-end" v-if="type == 1">
-      <view class="wxBtnBox flex-items" @click="addAddressWx">
-        <image class="" src="../../static/images/withdraw.png"></image>
-      </view>
-    </view>
+<!--    <view class="wxAddress flex-items flex-end" v-if="type == 1">-->
+<!--      <view class="wxBtnBox flex-items" @click="addAddressWx">-->
+<!--        <image class="" src="../../static/images/withdraw.png"></image>-->
+<!--      </view>-->
+<!--    </view>-->
     <!-- #endif -->
 		<view class="addressBack-box">
 			<view class="consignee-box bor-line-F7F7F7">
-				<input v-model="username" class="fs28"  placeholder-class="consignee" placeholder="收货人" />
+				<input v-model="addressData.username" class="fs28"  placeholder-class="consignee" placeholder="收货人" />
 			</view>
 			<view class="iphoneNum-box bor-line-F7F7F7">
-				<input type="number" v-model="phone" class="fs28" placeholder-class="iphoneNum" placeholder="手机号码" />
+				<input type="number" v-model="addressData.phone" class="fs28" placeholder-class="iphoneNum" placeholder="手机号码" />
 			</view>
 			<view @click="locationClick" class="location-box bor-line-F7F7F7 flex-row-plus flex-sp-between flex-items">
 				<view class="fs28 location">所在地</view>
 				<view class="locationBox">
 <!--					<city-select v-model="locationShowFalg" @city-change="cityChange"></city-select>-->
-          <u-picker-cere mode="region" v-model="locationShowFalg" @confirm="cityChange" :default-region='defaultRegion' title="所在地"></u-picker-cere>
-					<text v-model="ssqText">{{ssqText}}</text>
+          <u-picker-cere mode="region" v-model="locationShowFalg" @confirm="cityChange" :default-region='addressData.defaultRegion' title="所在地"></u-picker-cere>
+					<text v-model="addressData.ssqText">{{addressData.ssqText}}</text>
 					<image class="arrow mar-left-20" src="../../static/images/greyArrow.png"></image>
 				</view>
 			</view>
 			<view class="detailAddress-box">
-				<input class="fs28" v-model="address" placeholder-class="detailAddress" placeholder="详细地址:如道路、门牌号、小区、楼栋号、单元等" />
+				<input class="fs28" v-model="addressData.address" placeholder-class="detailAddress" placeholder="详细地址:如道路、门牌号、小区、楼栋号、单元等" />
 			</view>
 		</view>
 		<view class="addressTagBack-box">
@@ -38,14 +38,14 @@
 			</view>
 			<view class="defaultState-box flex-row-plus flex-sp-between flex-items">
 				<view class="fs28 defaultState">设为默认地址</view>
-				<u-switch v-model="isDefault" active-color="#C5AA7B" inactive-color="#eee"></u-switch>
+				<u-switch v-model="ifDefault" active-color="#C5AA7B" inactive-color="#eee"></u-switch>
 			</view>
 		</view>
 		<view class="deleteAddress-box" @click="delAddress" v-if="type == 2">
 			<text class="font-color-C5AA7B">删除收货地址</text>
 		</view>
 		<view class="saveAddress-box">
-			<view class="saveAddress" v-if="type == 1" @click="addAddressClick">保存</view>
+			<view class="saveAddress" v-if="type == 1 || type == 3" @click="addAddressClick">保存</view>
 			<view class="saveAddress" v-else @click="saveAddressClick">保存</view>
 		</view>
 		<!-- 所在地弹窗 -->
@@ -95,7 +95,7 @@ const API = require('../../config/api')
 				ssqText:'',
 				address:'',
 				tag:'',
-				isDefault:false,
+				ifDefault:false,
 				province:'',
 				city:'',
 				area:'',
@@ -103,7 +103,16 @@ const API = require('../../config/api')
 				ordertype:0,
 				editAddress:{},
         addressTagIndex: 0,
-        defaultRegion: []
+        defaultRegion: [],
+        addressData: {
+          username: '',
+          phone: '',
+          ssqText: '',
+          address: '',
+          defaultRegion: [],
+          city:'',
+          province:'',
+        }
 			}
 		},
 		onLoad(options) {
@@ -112,58 +121,56 @@ const API = require('../../config/api')
 				this.ordertype = 1
 			}
 			let receiveId = options.receiveId
+      this.id = receiveId
 			if(this.type == 2){
         uni.showLoading({
+          mask: true,
           title: '请稍后...',
         })
         NET.request(API.receiveGetInfo,{receiveId:receiveId},"GET").then(res => {
           this.editAddress = res.data
-          this.username = this.editAddress.receiveName
-          this.phone = this.editAddress.receivePhone
-          this.ssqText = this.editAddress.receiveAdress
-          this.address = this.editAddress.address
+          this.addressData.username = this.editAddress.receiveName
+          this.addressData.phone = this.editAddress.receivePhone
+          this.addressData.ssqText = this.editAddress.receiveAdress
+          this.addressData.address = this.editAddress.address
           this.tag = this.editAddress.label
           for(let i=0;i<this.addressTagList.length;i++){
             if(this.addressTagList[i].label === this.tag){
               this.addressTagIndex = i
             }
           }
-          this.isDefault = this.editAddress.defult
-          this.defaultRegion = this.ssqText.split("-")
-          this.province = this.defaultRegion[0]
-          this.city = this.defaultRegion[1]
-          this.area = this.defaultRegion[2]
-          this.id = this.editAddress.receiveId
+          this.ifDefault = this.editAddress.defult
+          this.addressData.defaultRegion = this.ssqText.split("-")
+          this.addressData.province = this.defaultRegion[0]
+          this.addressData.city = this.defaultRegion[1]
+          this.addressData.area = this.defaultRegion[2]
+          this.addressData.id = this.editAddress.receiveId
           uni.hideLoading()
         }).catch(res => {
 
         })
-        // this.editAddress = JSON.parse(uni.getStorageSync('editAddress')) receiveGetInfo
-        // if(Object.keys(this.editAddress).length > 0){
-        //   this.username = this.editAddress.receiveName
-        //   this.phone = this.editAddress.receivePhone
-        //   this.ssqText = this.editAddress.receiveAdress
-        //   this.address = this.editAddress.address
-        //   this.tag = this.editAddress.label
-        //   this.isDefault = this.editAddress.defult
-        //   let ssqarr = this.ssqText.split("-")
-        //   this.province = ssqarr[0]
-        //   this.city = ssqarr[1]
-        //   this.area = ssqarr[2]
-        //   this.id = this.editAddress.receiveId
-        // }
-
 			}
+      if (this.type == 3) {
+        let obj = JSON.parse(options.wxAddressData)
+        this.addressData = obj
+        // this.username = obj.username
+        // this.phone = obj.phone
+        // this.ssqText =  obj.ssqText
+        // this.defaultRegion = obj.defaultRegion
+        // this.address = obj.address
+        // this.province = obj.provinceName
+        // this.city = obj.cityName
+      }
 			if(this.editAddress != ''){
 				uni.removeStorageSync('editAddress')
 			}
 		},
 		methods: {
 			cityChange(e) {
-				this.ssqText = e.province.label + '-' + e.city.label + '-' + e.area.label;
-				this.province = e.province.label
-				this.city = e.city.label
-				this.area = e.area.label
+				this.addressData.ssqText = e.province.label + '-' + e.city.label + '-' + e.area.label;
+				this.addressData.province = e.province.label
+				this.addressData.city = e.city.label
+				this.addressData.area = e.area.label
 			},
 			locationClick(){
 				this.locationShowFalg = true
@@ -183,31 +190,31 @@ const API = require('../../config/api')
 			//编辑地址
 			saveAddressClick(){
 				let phoneCodeVerification = /^[1][3-9][0-9]{9}$/;
-				if(this.username==''){
+				if(this.addressData.username==''){
 					uni.showToast({
 					    title: '请输入收货人!',
 					    duration: 2000,
 						icon:'none'
 					});
-				}else if(this.phone==''){
+				}else if(this.addressData.phone ==''){
 					uni.showToast({
 					    title: '请输入手机号!',
 					    duration: 2000,
 						icon:'none'
 					});
-				}else if(!phoneCodeVerification.test(this.phone)){
+				}else if(!phoneCodeVerification.test(this.addressData.phone)){
 					uni.showToast({
 						title: '请输入正确的手机号!',
 						duration: 2000,
 						icon:'none'
 					});
-				}else if(this.province==''||this.city==''||this.city==''){
+				}else if(this.addressData.province==''||this.addressData.city==''){
 					uni.showToast({
 					    title: '所在地不能为空!',
 					    duration: 2000,
 						icon:'none'
 					});
-				}else if(this.address==''){
+				}else if(this.addressData.address==''){
 					uni.showToast({
 					    title: '请输入详细地址!',
 					    duration: 2000,
@@ -216,12 +223,12 @@ const API = require('../../config/api')
 				}else{
 					NET.request(API.AddresUpdate,{
 						receiveId: this.id,
-						receiveName: this.username,
-						receivePhone: this.phone,
-						receiveAdress: this.ssqText,
-						address:this.address,
+						receiveName: this.addressData.username,
+						receivePhone: this.addressData.phone,
+						receiveAdress: this.addressData.ssqText,
+						address:this.addressData.address,
 						label:this.tag,
-						defult:this.isDefault
+						defult:this.ifDefault
 					},'POST').then(res => {
 						uni.navigateBack({
 							delta: 1
@@ -236,31 +243,31 @@ const API = require('../../config/api')
 			//新增地址
 			addAddressClick(){
 				let phoneCodeVerification = /^[1][3-9][0-9]{9}$/;
-				if(this.username==''){
+				if(this.addressData.username==''){
 					uni.showToast({
 					    title: '请输入收货人!',
 					    duration: 2000,
 						icon:'none'
 					});
-				}else if(this.phone==''){
+				}else if(this.addressData.phone==''){
 					uni.showToast({
 					    title: '请输入手机号!',
 					    duration: 2000,
 						icon:'none'
 					});
-				}else if(!phoneCodeVerification.test(this.phone)){
+				}else if(!phoneCodeVerification.test(this.addressData.phone)){
 				 	uni.showToast({
 				 	    title: '请输入正确的手机号!',
 				 	    duration: 2000,
 				 		icon:'none'
 				 	});
-				 }else if(this.province==''||this.city==''||this.city==''){
+				 }else if(this.addressData.province==''||this.addressData.city==''){
 					uni.showToast({
 					    title: '所在地不能为空!',
 					    duration: 2000,
 						icon:'none'
 					});
-				}else if(this.address==''){
+				}else if(this.addressData.address==''){
 					uni.showToast({
 					    title: '请输入详细地址!',
 					    duration: 2000,
@@ -269,12 +276,12 @@ const API = require('../../config/api')
 				}else{
 					NET.request(API.AddresAdd,
 					{
-						receiveName: this.username,
-						receivePhone: this.phone,
-						receiveAdress: this.ssqText,
-						address:this.address,
+						receiveName: this.addressData.username,
+						receivePhone: this.addressData.phone,
+						receiveAdress: this.addressData.ssqText,
+						address:this.addressData.address,
 						label:this.tag,
-						defult:this.isDefault
+            ifDefault: this.ifDefault ? 1 : 0
 					},'POST').then(res => {
 						if(this.ordertype == 1){
 							uni.setStorageSync('receiveItem', res.data)
@@ -291,20 +298,20 @@ const API = require('../../config/api')
 					})
 				}
 			},
-      addAddressWx() {
-        let self = this
-        uni.chooseAddress({
-          success(res){
-            self.username = res.userName
-            self.phone = res.telNumber
-            self.ssqText =  `${res.provinceName}-${res.cityName}-${res.countyName}`
-            self.defaultRegion = self.ssqText.split("-")
-            self.address = res.detailInfo
-            self.province = res.provinceName
-            self.city = res.cityName
-          }
-        })
-      },
+      // addAddressWx() {
+      //   let self = this
+      //   uni.chooseAddress({
+      //     success(res){
+      //       self.username = res.userName
+      //       self.phone = res.telNumber
+      //       self.ssqText =  `${res.provinceName}-${res.cityName}-${res.countyName}`
+      //       self.defaultRegion = self.ssqText.split("-")
+      //       self.address = res.detailInfo
+      //       self.province = res.provinceName
+      //       self.city = res.cityName
+      //     }
+      //   })
+      // },
 			//删除地址
 			delAddress(){
 				uni.showModal({
@@ -322,7 +329,7 @@ const API = require('../../config/api')
 			},
 			subm(){
 				NET.request(API.AddresDelete,{
-					receiveId:this.id
+					receiveId: this.id
 				},'POST').then(res => {
 					if(res.code === "200"){
 						uni.navigateBack({

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov