Forráskód Böngészése

commit -m 采美美博会价值优惠券

zhengjinyi 3 éve
szülő
commit
f85eace9f7

+ 21 - 17
components/cm-module/cart-components/index.vue

@@ -384,23 +384,26 @@
 										</view>
 										<view class="list-cell-btn">
 											<view class="icon-used">
-												<template v-if="coupon.moneyCouponFlag == 1">
-													<view class="icon-used-text">购买</view>
-													<view
-														class="icon-used-btn receive"
-														@click="toPayCoupon(coupon)"
-														>¥{{ coupon.moneyCouponPrice }}</view
-													>
-												</template>
-												<template v-else>		
-													<view
-														class="icon-used-btn receive"
-														v-if="coupon.couponBtnType == 0"
-														@click="receiveCoupon(coupon)"
-														>领取</view
-													>
-													<view class="icon-used-btn make" v-if="coupon.couponBtnType == 1">已领取</view>
+												<template v-if="coupon.couponBtnType == 0">
+													<template v-if="coupon.moneyCouponFlag == 1">
+														<view class="icon-used-text">购买</view>
+														<view
+															class="icon-used-btn receive"
+															@click="toPayCoupon(coupon)"
+															>¥{{ coupon.moneyCouponPrice }}</view
+														>
+													</template>
+													<template v-else>	
+														<view
+															class="icon-used-btn receive"
+															@click="receiveCoupon(coupon)"
+															>领取</view
+														>
+													</template>
 												</template>
+												<view class="icon-used-btn make" v-if="coupon.couponBtnType == 1"
+													>已领取</view
+												>
 											</view>
 										</view>
 									</view>
@@ -1469,7 +1472,8 @@ export default {
 					userId: this.userId,
 					couponId: coupon.couponId,
 					payWay: 'WEIXIN',
-					code: wechatcode
+					code: wechatcode,
+					source: 1 //支付来源 1 小程序 2 WWW
 				}
 			)
 			.then(response => {

+ 11 - 6
components/thorui/tui-nomore/tui-nomore.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="tui-nomore-class tui-loadmore-none" v-if="visible">
 		<view :class="[isDot?'tui-nomore-dot':'tui-nomore']">
-			<view :style="{backgroundColor:backgroundColor}" :class="[isDot?'tui-dot-text':'tui-nomore-text']">{{isDot?dotText:text}}</view>
+			<view :style="{backgroundColor:backgroundColor,color:color}" :class="[isDot?'tui-dot-text':'tui-nomore-text']">{{isDot?dotText:text}}</view>
 		</view>
 	</view>
 </template>
 
 <script>
 	export default {
-		name: "tuiNomore",
+		name: 'tuiNomore',
 		props: {
 			//是否可见
 			visible: {
@@ -18,23 +18,28 @@
 			//当前页面背景颜色
 			backgroundColor: { 
 				type: String,
-				default: "#fafafa"
+				default: '#fafafa'
 			},
 			//是否以圆点代替 "没有更多了"
 			isDot: {
 				type: Boolean,
 				default: false
 			},
+			//是否以圆点代替 "没有更多了"
+			color: {
+				type: String,
+				default: '#999999'
+			},
 			//isDot为false时生效
 			text: {
 				type: String,
-				default: "没有更多了"
+				default: '没有更多了'
 			}
 		},
 		data() {
 			return {
-				dotText: "●"
-			};
+				dotText: '●'
+			}
 		}
 	}
 </script>

+ 1 - 1
pages.json

@@ -400,7 +400,7 @@
                 {
                     "path": "coupon/coupon-activity",
                     "style": {
-                        "navigationBarTitleText": "采美线上美博会",
+                        "navigationBarTitleText": "采美上美博会",
                         "enablePullDownRefresh": true
                     }
                 },

+ 29 - 24
pages/goods/product.vue

@@ -417,25 +417,26 @@
 												</view>
 												<view class="list-cell-btn">
 													<view class="icon-used">
-														<template v-if="coupon.moneyCouponFlag == 1">
-															<view class="icon-used-text">购买</view>
-															<view
-																class="icon-used-btn receive"
-																@click="toPayCoupon(coupon)"
-																>¥{{ coupon.moneyCouponPrice }}</view
-															>
-														</template>
-														<template v-else>	
-															<view
-																class="icon-used-btn receive"
-																v-if="coupon.couponBtnType == 0"
-																@click="receiveCoupon(coupon)"
-																>领取</view
-															>
-															<view class="icon-used-btn make" v-if="coupon.couponBtnType == 1"
-																>已领取</view
-															>
+														<template v-if="coupon.couponBtnType == 0">
+															<template v-if="coupon.moneyCouponFlag == 1">
+																<view class="icon-used-text">购买</view>
+																<view
+																	class="icon-used-btn receive"
+																	@click="toPayCoupon(coupon)"
+																	>¥{{ coupon.moneyCouponPrice }}</view
+																>
+															</template>
+															<template v-else>	
+																<view
+																	class="icon-used-btn receive"
+																	@click="receiveCoupon(coupon)"
+																	>领取</view
+																>
+															</template>
 														</template>
+														<view class="icon-used-btn make" v-if="coupon.couponBtnType == 1"
+															>已领取</view
+														>
 													</view>
 												</view>
 											</view>
@@ -817,6 +818,7 @@ export default {
 					this.buyRetailPriceStep = this.product.step
 					this.number = this.product.minBuyNumber
 					this.minBuyNumber = this.product.minBuyNumber
+					
 					//处理商品图片列表
 					this.product.imageList.forEach(item => {
 						this.productImage.push(item.image)
@@ -830,7 +832,6 @@ export default {
 						this.retailPrice = this.product.price.toFixed(2)
 						this.buyRetailPrice = this.product.price
 					}
-
 					//处理下架商品和售罄商品
 					if (this.product.validFlag == 3 || this.stock == 0) {
 						this.isNoneDisabled = true
@@ -901,9 +902,13 @@ export default {
 						? this.$api.adaptRichTextImg(product.productDetail.detailInfo)
 						: defaulHtml
 				} else {
-					html = product.productDetail
-						? this.$api.adaptRichTextImg(product.productDetail.commonDetailInfo)
-						: defaulHtml
+					if(product.productDetail.commonDetailInfo){
+						html = product.productDetail
+							? this.$api.adaptRichTextImg(product.productDetail.commonDetailInfo)
+							: defaulHtml
+					}else{
+						html = defaulHtml
+					}
 				}
 			}
 			return html
@@ -1013,7 +1018,8 @@ export default {
 					userId: this.userId,
 					couponId: coupon.couponId,
 					payWay: 'WEIXIN',
-					code: wechatcode
+					code: wechatcode,
+					source: 1 //支付来源 1 小程序 2 WWW
 				}
 			)
 			.then(response => {
@@ -1149,7 +1155,6 @@ export default {
 				}
 				this.isBtnType = type
 				this.popupShow3 = true
-				console.log('1313123113121')
 			} else {
 				this.$api.navigateTo('/pages/login/login?type=1')
 			}

+ 2 - 1
pages/seller/cart/coupon-share.vue

@@ -107,7 +107,8 @@ export default {
 				userId: this.userId,
 				couponId: this.couponId,
 				payWay: 'WEIXIN',
-				code: wechatcode
+				code: wechatcode,
+				source: 1 //支付来源 1 小程序 2 WWW
 			})
 				.then(response => {
 					// 友盟埋点收集微信支付

+ 4 - 4
pages/seller/cart/coupon.vue

@@ -75,6 +75,7 @@ export default {
 			StaticUrl: this.$Static,
 			isIphoneX: this.$store.state.isIphoneX,
 			listQuery: {
+				userId:0,
 				pageNum: 1,
 				pageSize: 10
 			},
@@ -87,7 +88,6 @@ export default {
 			pullUpOn: true,
 			pullFlag: true,
 			isReceiveLoading: false, //领券操作状态
-			shareUserId: 0 // 机构Id
 		}
 	},
 	onLoad() {
@@ -122,7 +122,7 @@ export default {
 		async initGetStotage() {
 			const userInfo = await this.$api.getStorage()
 			const clubInfo = await this.$api.getComStorage('orderUserInfo')
-			this.shareUserId = clubInfo.userId ? clubInfo.userId : 0
+			this.listQuery.userId = clubInfo.userId ? clubInfo.userId : 0
 			this.QueryCouponList()
 		},
 		QueryCouponList() {
@@ -196,12 +196,12 @@ export default {
 		//分享购买优惠券
 		const coupon = res.target.dataset.coupon
 		console.log('优惠券', coupon)
-		console.log('机构Id', this.shareUserId)
+		console.log('机构Id', this.listQuery.userId)
 		if (res.from === 'button') {
 			// console.log('来自页面内转发按钮')
 			return {
 				title: `只售${coupon.moneyCouponPrice}元,${coupon.couponAmount}元优惠券等您抢购~`,
-				path: `pages/seller/cart/coupon-share?couponId=${coupon.couponId}&userId=${this.shareUserId}`,
+				path: `pages/seller/cart/coupon-share?couponId=${coupon.couponId}&userId=${this.listQuery.userId}`,
 				imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
 			}
 		}

+ 6 - 5
pages/user/coupon/coupon-activity.vue

@@ -5,7 +5,7 @@
 			<view class="container-banner">
 				<image
 					class="image2x"
-					src="https://static.caimei365.com/app/meibohui/app/activity-banner@2x.png"
+					src="https://static.caimei365.com/app/meibohui/app/activity-banner@2x.jpg"
 					mode=""
 				></image>
 			</view>
@@ -82,7 +82,7 @@
 					</view>
 					<!--加载loadding-->
 					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-					<tui-nomore :visible="!pullUpOn" :backgroundColor="'#FFF1EB'" :text="nomoreText"></tui-nomore>
+					<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ff6b2b'" :color="'#FFFFFF'" :text="nomoreText"></tui-nomore>
 					<!--加载loadding-->
 				</template>
 			</view>
@@ -317,7 +317,8 @@ export default {
 				userId: this.listQuery.userId,
 				couponId: coupon.couponId,
 				payWay: 'WEIXIN',
-				code: wechatcode
+				code: wechatcode,
+				source: 1 //支付来源 1 小程序 2 WWW
 			})
 				.then(response => {
 					// 友盟埋点收集微信支付
@@ -389,7 +390,7 @@ export default {
 
 <style lang="scss">
 page {
-	background-color: #fff1eb;
+	background-color: #ff6b2b;
 }
 .container {
 	width: 100%;
@@ -410,7 +411,7 @@ page {
 	line-height: 130rpx;
 	text-align: center;
 	font-size: $font-size-36;
-	color: #f94b4b;
+	color: #FFFFFF;
 }
 .container-list {
 	box-sizing: border-box;

+ 2 - 1
pages/user/coupon/coupon-collection.vue

@@ -295,7 +295,8 @@ export default {
 				userId: this.listQuery.userId,
 				couponId: coupon.couponId,
 				payWay: 'WEIXIN',
-				code: wechatcode
+				code: wechatcode,
+				source: 1 //支付来源 1 小程序 2 WWW
 			})
 				.then(response => {
 					// 友盟埋点收集微信支付