Bladeren bron

超级会员会员中心页面修改

zhengjinyi 3 jaren geleden
bovenliggende
commit
ea5e7dca6c

+ 20 - 20
main.js

@@ -7,7 +7,7 @@ import * as Regs from '@/common/config/common.js'
 import { umtrackWxKey } from '@/utils/config.js'
 
 // 友盟依赖包
-import uma from 'umtrack-wx'
+// import uma from 'umtrack-wx'
 
 // 公共组件
 import { msg, modal, prePage, boundingClientRect } from './utils/util'
@@ -35,25 +35,25 @@ Vue.prototype.$getStorage = function(key) {
 /**
  * 友盟+小程序统计
  */
-if (process.env.NODE_ENV != 'development') {
-    // #ifdef MP-WEIXIN
-    uma.init({
-        appKey: umtrackWxKey, //由友盟分配的APP_KEY
-        // 使用Openid进行统计,此项为false时将使用友盟+uuid进行用户统计。
-        // 使用Openid来统计微信小程序的用户,会使统计的指标更为准确,对系统准确性要求高的应用推荐使用Openid。
-        useOpenid: true,
-        // 使用openid进行统计时,是否授权友盟自动获取Openid,
-        // 如若需要,请到友盟后台"设置管理-应用信息"(https://mp.umeng.com/setting/appset)中设置appId及secret
-        autoGetOpenid: true,
-        debug: true, //是否打开调试模式
-        uploadUserInfo: false // 自动上传用户信息,设为false取消上传,默认为false
-    })
-    uma.install = function(Vue) {
-        Vue.prototype.$uma = uma
-    }
-    Vue.use(uma)
-    // #endif
-}
+// if (process.env.NODE_ENV != 'development') {
+// 	// #ifdef MP-WEIXIN
+// 	uma.init({
+// 		appKey: umtrackWxKey, //由友盟分配的APP_KEY
+// 		// 使用Openid进行统计,此项为false时将使用友盟+uuid进行用户统计。
+// 		// 使用Openid来统计微信小程序的用户,会使统计的指标更为准确,对系统准确性要求高的应用推荐使用Openid。
+// 		useOpenid: true,
+// 		// 使用openid进行统计时,是否授权友盟自动获取Openid,
+// 		// 如若需要,请到友盟后台"设置管理-应用信息"(https://mp.umeng.com/setting/appset)中设置appId及secret
+// 		autoGetOpenid: true,
+// 		debug: true, //是否打开调试模式
+// 		uploadUserInfo: false // 自动上传用户信息,设为false取消上传,默认为false
+// 	})
+// 	uma.install = function(Vue) {
+// 		Vue.prototype.$uma = uma
+// 	}
+// 	Vue.use(uma)
+// 	// #endif
+// }
 
 // Vue实例化
 Vue.config.productionTip = false

+ 1 - 1
pages/user/member/member-pay.vue

@@ -7,7 +7,7 @@
 					<view class="pay-money">
 						<text class="pay-sm">¥</text> <text class="pay-bg">{{ handelPayMsg.price | NumFormat }}</text>
 					</view>
-					<view class="pay-mouth">套餐:{{ handelPayMsg.month }}</view>
+					<view class="pay-mouth">套餐:{{ handelPayMsg.duration }}个月</view>
 				</view>
 				<view class="pay-check">
 					<view class="check-title"><view class="text">选择支付方式</view></view>

+ 30 - 3
pages/user/member/member-product.vue

@@ -24,7 +24,7 @@
 									<view class="floor-tags" v-else>{{ pro.promotions.name }}</view>
 								</template>
 								<template v-if="pro.svipProductFlag == 1">
-									<template v-if="pro.priceFlag != 1 && userIdentity == 2">
+									<template v-if="hasLogin && pro.priceFlag != 1 && userIdentity == 2">
 										<view class="svip-tags">
 											<view class="tags">SVIP</view>
 											<view class="price">{{ pro.svipPriceTag }}</view>
@@ -36,7 +36,7 @@
 								</template>
 							</view>
 						</view>
-						<view class="product-price">
+						<view class="product-price" v-if="hasLogin">
 							<view class="list-none" v-if="pro.priceFlag == 1">¥未公开价格</view>
 							<template v-else>
 								<view class="list-none" v-if="pro.priceFlag == 2 && userIdentity == 4"
@@ -45,6 +45,10 @@
 								<view class="list-none-price" v-else>¥{{ pro.price | NumFormat }}</view>
 							</template>
 						</view>
+						<view v-else class="product-price-none">
+							<text class="p-no">¥</text>
+							<uni-grader :grade="Number(pro.priceGrade)"></uni-grader>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -61,9 +65,12 @@
 <script>
 import { mapState, mapMutations } from 'vuex'
 import modalLayer from '@/components/modal-layer'
+import uniGrader from '@/components/uni-grade/uni-grade.vue'
+
 export default {
 	components: {
-		modalLayer
+		modalLayer,
+		uniGrader
 	},
 	data() {
 		return {
@@ -199,6 +206,16 @@ export default {
 			this.getOnReachBottomData()
 		}
 	},
+	onShareAppMessage(res){//分享转发
+		if (res.from === 'button') {
+	      // 来自页面内转发按钮
+	    }
+		return {
+		  title: '采美超级会员,巨量优惠享不停',
+		  path: '/pages/user/member/member-product',
+		  imageUrl:'https://static.caimei365.com/app/img/icon/icon-member-share@2x.png'
+		}
+	},
 	onShow() {
 		
 	}
@@ -297,6 +314,16 @@ page {
 						color: #999999;
 					}
 				}
+				.product-price-none {
+					color: #f8c499;
+					float: left;
+					line-height: 54rpx;
+					.p-no {
+						float: left;
+						font-size: $font-size-24;
+						color: $text-color;
+					}
+				}
 				.product-svip {
 					width: 100%;
 					height: 32rpx;

+ 1 - 1
pages/user/member/member-renew.vue

@@ -46,7 +46,7 @@
 					<view class="text-content">
 						<view class="text"
 							>确定使用<text class="text-p">{{ handelPayMsg.beans }}</text
-							>个采美豆抵扣{{ handelPayMsg.month }}的采美超级会员吗?</view
+							>个采美豆抵扣{{ handelPayMsg.duration }}个月的采美超级会员吗?</view
 						>
 					</view>
 					<view class="text-button">

+ 59 - 28
pages/user/member/member.vue

@@ -61,7 +61,6 @@
 					:key="index"
 					:id="coupon.couponId"
 					class="coupon-list"
-					:class="coupon.useStatus == 1 ? 'none' : ''"
 				>
 					<view class="list-cell-tags">{{ coupon.couponType | TypeFormat }}</view>
 					<view class="list-cell-le">
@@ -86,7 +85,9 @@
 						<view class="icon-used-btn receive" v-if="coupon.getFlag == 0" @click="receiveCoupon(coupon)"
 							>立即领取</view
 						>
-						<view class="icon-used-btn make" v-if="coupon.getFlag == 1">已领取</view>
+						<view class="icon-used-btn make" v-if="coupon.getFlag == 1" @click="toUseCoupon(coupon)"
+							>去使用</view
+						>
 					</view>
 				</view>
 			</view>
@@ -158,7 +159,7 @@
 					<view class="text-content">
 						<view class="text"
 							>确定使用<text class="text-p">{{ handelPayMsg.beans }}</text
-							>个采美豆抵扣{{ handelPayMsg.month }}的采美超级会员吗?</view
+							>个采美豆抵扣{{ handelPayMsg.duration }}个月的采美超级会员吗?</view
 						>
 					</view>
 					<view class="text-button">
@@ -249,7 +250,7 @@ export default {
 			},
 			productCouponList: [],
 			productList: [],
-			isReceiveLoading:false
+			isReceiveLoading: false
 		}
 	},
 	onLoad() {},
@@ -329,26 +330,28 @@ export default {
 					console.log('获取会员套餐异常~')
 				})
 		},
-		receiveCoupon(coupon){// 点击优惠券领取按钮
-			if(this.isReceiveLoading){return}
-			this.ProductService.ReceiveCoupon(
-				{
-					userId:this.payParam.userId,
-					couponId:coupon.couponId,
-					source:2
-				}) 
-			.then(response =>{
-				this.isReceiveLoading = true
-				this.$util.msg('领取成功',1500,true,'success')
-				setTimeout(()=>{
-					coupon.getFlag = 1
-					this.isReceiveLoading = false
-				},1500)
-			})
-			.catch(error =>{
-				this.$util.msg(error.msg,2000)
-				this.isReceiveLoading = false
+		receiveCoupon(coupon) {
+			// 点击优惠券领取按钮
+			if (this.isReceiveLoading) {
+				return
+			}
+			this.ProductService.ReceiveCoupon({
+				userId: this.payParam.userId,
+				couponId: coupon.couponId,
+				source: 2
 			})
+				.then(response => {
+					this.isReceiveLoading = true
+					this.$util.msg('领取成功', 1500, true, 'success')
+					setTimeout(() => {
+						coupon.getFlag = 1
+						this.isReceiveLoading = false
+					}, 1500)
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+					this.isReceiveLoading = false
+				})
 		},
 		hanldeShowBeans() {
 			// 显示采美豆抵扣开通超级会员弹窗
@@ -380,6 +383,38 @@ export default {
 			this.payParam.packageId = pay.packageId
 			this.handelPayMsg = pay
 		},
+		toUseCoupon(coupon) {
+			// 去使用跳转路径
+			console.log('coupon', coupon)
+			switch (coupon.couponType) {
+				case 0: // 活动券:跳转到商城首页 / 或者活动页(看是否指定了商品)
+					if (coupon.productType == 1) {
+						// 1 全商城通用 2 指定商品
+						this.$api.switchTabTo('/pages/tabBar/home/index')
+					} else {
+						this.$api.navigateTo('/pages/user/coupon/coupon-product?couponId=' + coupon.couponId)
+					}
+					break
+				case 1: // 品类券:跳转到产品 287 / 仪器页 286
+					let categoryId = 0
+					if (coupon.categoryType == 1) {
+						categoryId = 287
+					} else {
+						categoryId = 286
+					}
+					this.$api.navigateTo(`/pages/goods/good-floor?linkId=${coupon.categoryType == 1 ? 287 : 286}`)
+					break
+				case 2: // 用户专享券:跳转到商城首页
+					this.$api.switchTabTo('/pages/tabBar/home/index')
+					break
+				case 3: // 店铺券:跳转到店铺首页
+					this.$api.navigateTo('/pages/supplier/user/my-shop?shopId=' + coupon.shopId)
+					break
+				case 4: // 新用户券:跳转到商城首页
+					this.$api.switchTabTo('/pages/tabBar/home/index')
+					break
+			}
+		},
 		hanldPayUrl(url) {
 			// 跳转
 			this.$api.navigateTo(url)
@@ -643,10 +678,6 @@ page {
 			&:nth-child(2n) {
 				margin-right: 0;
 			}
-			&.none {
-				background: url(https://static.caimei365.com/app/img/icon/icon-member-coupon-none@2x.png);
-				background-size: cover;
-			}
 			.list-cell-tags {
 				display: inline-block;
 				padding: 0 10rpx;
@@ -718,7 +749,7 @@ page {
 					}
 					&.make {
 						padding: 30rpx 28rpx;
-						color: #ffffff;
+						color: #55331d;
 					}
 				}
 			}

+ 2 - 2
services/ajax.env.js

@@ -2,9 +2,9 @@ let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // URL_CONFIG = 'http://192.168.2.67:8008'	 //智捷联调地址
-    URL_CONFIG = 'http://192.168.2.68:8008'	 	 //涛涛联调地址
+    // URL_CONFIG = 'http://192.168.2.68:8008'	 	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
-    // URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
+    URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
     // URL_CONFIG = 'https://spi.caimei365.com'
 }else{ 
     // 生产环境

+ 2 - 2
services/config.env.js

@@ -2,9 +2,9 @@ let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
-    URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
+    // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-    // URL_CONFIG = 'https://core-b.caimei365.com'
+    URL_CONFIG = 'https://core-b.caimei365.com'
     // URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境