Przeglądaj źródła

Merge remote-tracking branch 'origin/developer' into developerC

# Conflicts:
#	pages/goods/product.vue
#	services/product.service.js
zhengjinyi 3 lat temu
rodzic
commit
473532045f

+ 1 - 1
components/cm-module/listTemplate/productList.vue

@@ -28,7 +28,7 @@
 						</view>
 						<view class="list-details-price">
 							<view class="floor-item-act" v-if="item.actStatus==1">
-								<template v-if="item.actStatus==0">
+								<template>
 									<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
 										{{item.promotions.name}}
 										<text v-if="item.priceFlag != 1">:¥{{ item.price | NumFormat }}</text>

+ 196 - 0
components/uni-keyinput/uni-keyinput.vue

@@ -0,0 +1,196 @@
+<template>
+	<view class="vcode-input-body">
+		<text
+			class="vcode-input-item"
+			:class="{
+				'vcode-input-line': isBorderLine,
+				'vcode-input-border': !isBorderLine,
+				'on': textLength === index && focus
+			}"
+			v-for="(v, index) in sum"
+			:key="index"
+			@tap.stop="setFocus"
+			:style="{
+				borderColor:
+					text.length === index && focus
+						? borderActiveColor
+						: text.length > index
+						? borderValueColor
+						: borderColor,
+				color: text.length > index ? borderValueColor : borderColor
+			}"
+		>
+			{{ text[index] ? text[index] : '' }}
+		</text>
+		<view class="hidden-input">
+			<input
+				id="vcodeInput"
+				ref="vcodeInput"
+				type="number"
+				:show-confirm-bar="false"
+				auto-blur
+				:focus="focus"
+				:maxlength="sum"
+				v-model="value"
+				@blur="setBlur"
+				:password="isPassword"
+				placeholder="验证码"
+			/>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'VcodeInput',
+	props: {
+		sum: {
+			type: Number,
+			default: 6
+		},
+		isBorderLine: {
+			type: Boolean,
+			default: false
+		},
+		borderColor: {
+			type: String,
+			default: '#e8e8e8'
+		},
+		borderValueColor: {
+			type: String,
+			default: '#424456'
+		},
+		borderActiveColor: {
+			type: String,
+			default: '#FF6B00'
+		},
+		isAutoComplete: {
+			type: Boolean,
+			default: true
+		},
+		isPassword: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			focus: false,
+			text: [],
+			value: ''
+		}
+	},
+	watch: {
+		value(value, oldVal) {
+			this.$emit('vcodeChange', value)
+			if (this.isAutoComplete) {
+				if (value.length >= this.sum) {
+					this.focus = false
+					this.$emit('vcodeInput', value)
+				}
+			} else {
+				this.$emit('vcodeInput', value)
+			}
+			if (this.isPassword) {
+				let val = ''
+				for (let i = 0; i < value.length; i++) {
+					val += '●'
+				}
+				this.text = val
+			} else {
+				this.text = value.split('')
+			}
+		}
+	},
+	computed:{
+		textLength(){
+			return this.text.length
+		}
+	},
+	mounted() {
+		this.$nextTick(() => {
+			this.initInput()
+		})
+	},
+	methods: {
+		initInput() {
+			this.focus = true
+			// #ifdef H5
+			this.$refs.vcodeInput.$refs.input.setAttribute('type', 'number')
+			this.$refs.vcodeInput.$refs.input.setAttribute('pattern', '[0-9]*')
+			// #endif
+		},
+		setBlur() {
+			this.$nextTick(() => {
+				this.focus = false
+			})
+		},
+		setFocus() {
+			this.focus = !this.focus
+		},
+		clearValue() {
+			this.value = ''
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+@keyframes cursorflash {
+	0%{
+		opacity: .2;
+	}
+	50%{
+		opacity: .8;
+	}
+	100%{
+		opacity:.2;
+	}
+}
+.vcode-input-body {
+	margin-left: -36rpx;
+	margin-right: -36rpx;
+	position: relative;
+	overflow: hidden;
+	/* #ifndef APP-NVUE */
+	display: flex;
+	/* #endif */
+	flex-direction: row;
+	justify-content: center;
+	align-items: center;
+}
+.vcode-input-item {
+	width: 76rpx;
+	height: 76rpx;
+	margin-left: 12rpx;
+	margin-right: 12rpx;
+	line-height: 76rpx;
+	text-align: center;
+	font-weight: 500;
+	color: #E15616 !important;
+	border-radius: 8rpx;
+}
+.vcode-input-item.on::after {
+	content: '|';
+	animation: cursorflash 2s infinite ease-in-out;
+}
+.vcode-input-border {
+	border-style: solid;
+	border-width: 2rpx; 
+	border-color: $uni-border-color;
+	border-radius: 8rpx;
+}
+.vcode-input-line {
+	border-bottom-style: solid;
+	border-bottom-width: 2rpx;
+	border-color: $uni-border-color;
+}
+.hidden-input {
+	width: 0px;
+	height: 0px;
+	position: absolute;
+	left: -1px;
+	top: -1px;
+	overflow: hidden;
+}
+</style>

+ 7 - 0
pages.json

@@ -397,6 +397,13 @@
                         "navigationBarTitleText": "活动商品",
                         "enablePullDownRefresh": true
                     }
+                },
+                {
+                    "path": "collection/collection",
+                    "style": {
+                        "navigationBarTitleText": "收藏商品",
+                        "enablePullDownRefresh": true
+                    }
                 }
             ]
         },

+ 1 - 1
pages/goods/product.vue

@@ -2626,4 +2626,4 @@ rich-text.img {
 	width: 100%;
 	height: auto;
 }
-</style>
+</style>

+ 8 - 11
pages/login/login.vue

@@ -22,16 +22,15 @@
 				<view class="login-pwd" @click.stop="this.$api.navigateTo('/pages/login/password')">忘记密码?</view>
 			</view>
 		</view>
-		<view class="login-btn"  @click="confirmLogin">登录</view>
-		<view class="login-btn-last" @click.stop="this.$api.navigateTo(`/pages/login/logincode?data=${getOption}`)">邀请码登录</view>
-		<view class="login-tel">客服热线:0755-22907771</view>
+		<view class="login-btn"  @click="confirmLogin">账号登录</view>
+		<view class="login-btn-last" @click.stop="this.$api.navigateTo(`/pages/login/logincode?data=${getOption}`)">邀请码登录></view>
 	</view>
 </template>
 
 <script>
-	import { mapState,mapMutations } from 'vuex';
+	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
-	import wxLogin from "@/common/config/wxLogin.js"
+	import wxLogin from '@/common/config/wxLogin.js'
 	export default{
 		data() {
 			return{
@@ -77,14 +76,14 @@
 								this.$api.navigateTo('/pages/login/apply-supplier')
 							})
 						}else{
-							this.$util.msg(response.msg,2000);
+							this.$util.msg(response.msg,2000)
 						}
 					})
 			},
 			storeUpdataeStatus(data){
 				uni.setStorageSync('token',data.token)
 				this.$store.commit('updateStatus',data)
-				this.login(data);
+				this.login(data)
 			},
 			navigatorRegirst(url){
 				// 友盟埋点注册入口点击事件
@@ -97,7 +96,7 @@
 				this.$api.navigateTo(url)
 			},
 			passwordClick() { //密码显隐操作
-				this.isShowEye = !this.isShowEye;
+				this.isShowEye = !this.isShowEye
 			},
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
 				wxLogin.wxLoginQuick()	
@@ -198,14 +197,12 @@
 		.login-btn-last{
 			width: 600rpx;
 			height: 86rpx;
-			border-radius: 44rpx;
 			font-size: $font-size-28;
 			line-height: 88rpx;
 			color: $color-system;
 			margin: 0 auto;
 			text-align: center;
-			border: 1px solid $color-system;
-			margin-top: 20rpx;
+			margin-top: 100rpx;
 		}
 		.login-tel{
 			width: 702rpx;

+ 49 - 22
pages/login/logincode.vue

@@ -5,16 +5,17 @@
 			<image class="logo" src="https://static.caimei365.com/app/img/icon/logo@2x.png" mode=""></image>
 		</view>
 		<view class="login-input">
-			<input type="number" 
-				   v-model="params.invitationCode"  
-				   maxlength="6" 
-				   class="input" 
-				   placeholder="请输入邀请码"
-			/>
+			<keyInput
+				borderValueColor="#E1E1E1"
+				borderActiveColor="#E1E1E1"
+				ref="vcodeInputRef"
+				@vcodeInput="keyInput"
+				@vcodeChange="keyInputChangeHandle"
+				sum="6"
+			>
+			</keyInput>
 		</view>
-		<view class="login-row" @click.stop="navigatorRegirst('/pages/login/register-select')"><text>免费注册</text></view>
-		<view class="login-btn"  @click.stop="goLogin">邀请码登录</view>
-		<view class="login-btn-last" @click.stop="this.$api.navigateTo('/pages/login/login')">账号登录</view>
+		<button class="login-btn"  @click.stop="goLogin" :class="isDisabled ? 'disabled' : ''" :disabled="isDisabled">邀请码登录</button>
 		<view class="login-tips">
 			邀请码是采美平台为了方便机构内成员互相邀请并快速注册采美账号推出的一项邀请机制。机构成员在任一渠道(包括采美365网站和微信“采美采购商城”小程序)注册了采美账号,该成员可在其个人中心添加其他机构成员,系统自动为每一个成员生成邀请码。其他成员使用邀请码可直接登录“采美采购商城”小程序。
 		</view>
@@ -25,7 +26,12 @@
 	import authorize from '@/common/config/authorize.js'
 	import wxLogin from "@/common/config/wxLogin.js"
 	import {mapState,mapMutations } from 'vuex';
+	import keyInput from '@/components/uni-keyinput/uni-keyinput'
+	
 	export default{
+		components: { 
+			keyInput 
+		},
 		data() {
 			return{
 				params:{
@@ -40,7 +46,10 @@
 
 		},
 		computed: {
-			...mapState(['isWxAuthorize','isLoginType','isLoginProductId','isLoginOrderId'])
+			...mapState(['isWxAuthorize','isLoginType','isLoginProductId','isLoginOrderId']),
+			isDisabled() {// 邀请码长度是否符合要求
+				return this.params.invitationCode.trim().length < 6
+			},
 		},
 		methods:{
 			...mapMutations(['login','wxLogin']),
@@ -51,6 +60,13 @@
 				}
 				this.isUserInfo = false
 				this.params.unionId = uni.getStorageSync('unionId')
+				// 友盟埋点邀请码确认登录点击事件
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_InvitationCode', {
+						Um_Key_PageName: '邀请码登录',
+						Um_Key_SourcePage: '邀请码页面',
+					})
+				}
 				this.GetUserProfile()
 			},
 			navigatorRegirst(url){
@@ -110,6 +126,24 @@
 					this.isUserInfo = false
 				})
 			},
+			keyInput(val) {// 输入框输入介绍
+				// this.params.invitationCode = val
+				console.log(val)
+			},
+			keyInputChangeHandle(val) {// 输入框输入事件
+				this.params.invitationCode = val
+				// console.log(val)
+			},
+			setFocus() {// 控制组件获取焦点
+				this.$refs.VcodeInput.setFocus()
+			},
+			
+			setBlur() {// 控制组件失去焦点
+				this.$refs.VcodeInput.setBlur()
+			},
+			clearValue() {// 清除已输入
+				this.$refs.VcodeInput.clearValue()
+			},
 			InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
 				wxLogin.wxLoginQuick()
 			}
@@ -151,20 +185,10 @@
 			width: 600rpx;
 			height: 88rpx;
 			padding: 24rpx 0;
-			margin: 0 auto;
+			margin: 30rpx auto;
 			margin-bottom: 30rpx;
 			background: #FFFFFF;
 			position: relative;
-			box-sizing: border-box;
-			border-bottom: 1px solid #E1E1E1;
-			.input{
-				width: 100%;
-				height: 100%;
-				background: #FFFFFF;
-				font-size: $font-size-28;
-				line-height: 88rpx;
-				color: #333333;
-			}
 		}
 		.login-row{
 			padding: 0 75rpx;
@@ -183,7 +207,10 @@
 			color: #FFFFFF;
 			margin: 0 auto;
 			text-align: center;
-			background: $btn-confirm;
+			background:$btn-confirm;
+			&.disabled{
+				background: #E1E1E1;
+			}
 		}
 		.login-btn-last{
 			width: 600rpx;

+ 363 - 340
pages/seller/cart/buyagain.vue

@@ -1,416 +1,439 @@
 <template>
 	<view class="container all-type-list-wrapper">
-		<buyagain-list ref="productList" 
-					   @operationConfim="hanldOperationConfim"
-					   @goCartPage="hanldToCartPage">
+		<buyagain-list ref="productList" @operationConfim="hanldOperationConfim" @goCartPage="hanldToCartPage">
 		</buyagain-list>
 		<!--底部选择模态层弹窗组件 -->
-		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
+		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="discard" @tap="hideSpec">
 			<!-- 遮罩层 -->
 			<view class="mask"></view>
-			<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-352rpx' : '-320rpx'}">
+			<view
+				class="layer"
+				@tap.stop="discard"
+				:style="{ paddingBottom: isIphoneX ? '68rpx' : '36rpx', bottom: isIphoneX ? '-352rpx' : '-320rpx' }"
+			>
 				<view class="content">
-					<view class="layer-smimg">
-						<image :src="handleData.image" mode=""></image>
-					</view>
+					<view class="layer-smimg"> <image :src="handleData.image" mode=""></image> </view>
 					<view class="layer-nunbox">
 						<view class="layer-nunbox-t">
 							<view class="layer-nunbox-text">数量:</view>
 							<view class="number-box">
-								<view  class="iconfont icon-jianhao" :class="[isQuantity==true?'disabled':'']" @click="changeCountSub()"></view>
-								<input class="btn-input" type="number" v-model="number" maxlength='4'  @blur="changeNumber($event)">
-								<view  class="iconfont icon-jiahao"  :class="[isStock==true?'disabled':'']" @click="changeCountAdd()"></view>
+								<view
+									class="iconfont icon-jianhao"
+									:class="[isQuantity == true ? 'disabled' : '']"
+									@click="changeCountSub()"
+								></view>
+								<input
+									class="btn-input"
+									type="number"
+									v-model="number"
+									maxlength="4"
+									@blur="changeNumber($event)"
+								/>
+								<view
+									class="iconfont icon-jiahao"
+									:class="[isStock == true ? 'disabled' : '']"
+									@click="changeCountAdd()"
+								></view>
 							</view>
 						</view>
 						<view class="layer-nunbox-b">
-							<view class="text">单价:
-								<text class="p sm">¥</text>
-								<text class="p bg">{{buyRetailPrice.toFixed(2)}}</text>
+							<view class="text"
+								>单价: <text class="p sm">¥</text>
+								<text class="p bg">{{ buyRetailPrice.toFixed(2) }}</text>
 							</view>
 						</view>
 					</view>
 				</view>
-				<view class="btn">
-					<view class="button add" @click="getAddProductCart">加入购物车</view>
-				</view>
+				<view class="btn"> <view class="button add" @click="getAddProductCart">加入购物车</view> </view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	import buyagainList from '@/components/cm-module/listTemplate/buyagainList'
-	export default{
-		components:{
-			buyagainList
+import buyagainList from '@/components/cm-module/listTemplate/buyagainList'
+export default {
+	components: {
+		buyagainList
+	},
+	data() {
+		return {
+			isIphoneX: this.$store.state.isIphoneX,
+			clubID: '', //机构ID
+			serviceProviderId: '', //协销ID
+			serverUrl: '',
+			emptyText: '',
+			lastPageType: '',
+			lastPageVal: '',
+			specClass: '', //规格弹窗css类,控制开关动画
+			handleData: {},
+			isQuantity: false,
+			isStock: false,
+			minBuyNumber: 0,
+			number: 0,
+			buyRetailPrice: 0,
+			buyRetailPriceStep: 1
+		}
+	},
+	onLoad() {},
+	methods: {
+		getClubProductNum() {
+			this.SellerService.GetSellerProductNum({
+				clubId: this.clubID,
+				serviceProviderId: this.serviceProviderId
+			}).then(response => {
+				this.$refs.productList.cartQuantity = response.data
+			})
 		},
-		data(){
-			return{
-				isIphoneX:this.$store.state.isIphoneX,
-				clubID:'',//机构ID
-				serviceProviderId:'',//协销ID
-				serverUrl: '',
-				emptyText: '',
-				lastPageType: '',
-				lastPageVal: '',
-				specClass: '',//规格弹窗css类,控制开关动画
-				handleData:{},
-				isQuantity:false,
-				isStock:false,
-				minBuyNumber:0,
-				number:0,
-				buyRetailPrice:0,
-				buyRetailPriceStep:1,
+		hanldOperationConfim(data) {
+			//显示选择数量确认弹窗
+			console.log(data)
+			this.specClass = 'show'
+			this.handleData = data
+			this.minBuyNumber = data.minBuyNumber
+			this.buyRetailPrice = data.price
+			this.buyRetailPriceStep = data.step
+			if (this.handleData.ladderPriceFlag == 1) {
+				this.number = data.maxBuyNumber
+			} else {
+				this.number = data.minBuyNumber
 			}
 		},
-		onLoad() {
-		
+		hideSpec() {
+			//关闭选择数量确认弹窗
+			this.specClass = 'hide'
+			setTimeout(() => {
+				this.specClass = 'none'
+			}, 200)
 		},
-		methods:{
-			getClubProductNum(){
-				this.SellerService.GetSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
-					this.$refs.productList.cartQuantity = response.data
-				})
-			},
-			hanldOperationConfim(data){//显示选择数量确认弹窗
-				console.log(data)
-				this.specClass = 'show';
-				this.handleData = data
-				this.minBuyNumber = data.minBuyNumber
-				this.buyRetailPrice = data.price;
-				this.buyRetailPriceStep = data.step
-				if(this.handleData.ladderPriceFlag == '1'){
-					this.number = data.maxBuyNumber
-				}else{
-					this.number = data.minBuyNumber
-				}
-			},
-			hideSpec() {//关闭选择数量确认弹窗
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
-			changeCountAdd(){//popup弹窗数量增加按钮
-				if(this.buyRetailPriceStep == 2){
-					this.number += this.minBuyNumber
-				}else{
-					this.number++
+		changeCountAdd() {
+			//popup弹窗数量增加按钮
+			if (this.buyRetailPriceStep == 2) {
+				this.number += this.minBuyNumber
+			} else {
+				this.number++
+			}
+			this.calculatPerice()
+		},
+		changeCountSub() {
+			//popup弹窗数量减按钮
+			if (this.number <= this.minBuyNumber) {
+				this.number = this.minBuyNumber
+				this.isQuantity = true
+				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
+				return
+			} else {
+				if (this.buyRetailPriceStep == 2) {
+					this.number -= this.minBuyNumber
+				} else {
+					this.number--
 				}
 				this.calculatPerice()
-			},
-			changeCountSub(){//popup弹窗数量减按钮
-				if(this.number<=this.minBuyNumber){
-					this.number= this.minBuyNumber
-					this.isQuantity =true
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
-					return
-				}else{
-					if(this.buyRetailPriceStep == 2){
-						this.number-=this.minBuyNumber
-					}else{
-						this.number--
-					}
-					this.calculatPerice()
-					this.isQuantity =false
-				}
-			 },
-			changeNumber(e){
-				let _value = e.detail.value;
-				if(!this.$api.isNumber(_value)){
-					this.number = this.minBuyNumber
-				}else if(_value < this.minBuyNumber){	
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
-					this.number = this.minBuyNumber
-				}else if( _value % this.minBuyNumber !=0 ){
-					this.$util.msg(`购买量必须为起订量的整数倍`,2000);
-					this.number = this.minBuyNumber
-				}else{
-					this.number = e.detail.value
-					this.calculatPerice()
-				}
-			},
-			calculatPerice(){//判断是否为阶梯价然后做计算价格处理
-				if(this.handleData.ladderPriceFlag == '1'){
-					this.handleData.ladderPrices.forEach((item,index)=>{
-						if(this.number>=item.buyNum){
-							this.buyRetailPrice = item.buyPrice
-						}
-					})
-				}else{
-					this.buyRetailPrice = this.handleData.retailPrice;
-				}
-			},
-			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
-				let params ={
-						productId:this.handleData.productId,
-						clubId:this.clubID,
-						serviceProviderId:this.serviceProviderId,
-						num:this.number
+				this.isQuantity = false
+			}
+		},
+		changeNumber(e) {
+			let _value = e.detail.value
+			if (!this.$api.isNumber(_value)) {
+				this.number = this.minBuyNumber
+			} else if (_value < this.minBuyNumber) {
+				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
+				this.number = this.minBuyNumber
+			} else if (_value % this.minBuyNumber != 0) {
+				this.$util.msg('购买量必须为起订量的整数倍', 2000)
+				this.number = this.minBuyNumber
+			} else {
+				this.number = e.detail.value
+				this.calculatPerice()
+			}
+		},
+		calculatPerice() {
+			//判断是否为阶梯价然后做计算价格处理
+			if (this.handleData.ladderPriceFlag == 1) {
+				this.handleData.ladderPrices.forEach((item, index) => {
+					if (this.number >= item.buyNum) {
+						this.buyRetailPrice = item.buyPrice
 					}
-				this.SellerService.ShoppingCartAddCart(params).then(response => {
-					this.specClass = 'hide';
-					this.$util.msg('加入购物车成功',1500,true,'success')
-					this.getClubProductNum()
-					setTimeout(() => {this.specClass = 'none'}, 200)
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
 				})
-			},
-			hanldToCartPage(){
-				this.$api.navigateTo('/pages/seller/cart/cart')
-			},
-			discard(){
-				//丢弃
+			} else {
+				this.buyRetailPrice = this.handleData.retailPrice
 			}
 		},
-		onShow() {
-			this.$api.getComStorage('orderUserInfo').then((resolve) =>{
-				this.clubID = resolve.clubID
-			})
-			this.$api.getStorage().then((resolve) =>{
-				this.serviceProviderId = resolve.serviceProviderId
-				this.getClubProductNum()
-			})
+		getAddProductCart() {
+			//增加购物车成功和toast弹窗提示成功
+			let params = {
+				productId: this.handleData.productId,
+				clubId: this.clubID,
+				serviceProviderId: this.serviceProviderId,
+				num: this.number
+			}
+			this.SellerService.ShoppingCartAddCart(params)
+				.then(response => {
+					this.specClass = 'hide'
+					this.$util.msg('加入购物车成功', 1500, true, 'success')
+					this.getClubProductNum()
+					setTimeout(() => {
+						this.specClass = 'none'
+					}, 200)
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		hanldToCartPage() {
+			this.$api.navigateTo('/pages/seller/cart/cart')
 		},
+		discard() {
+			//丢弃
+		}
+	},
+	onShow() {
+		this.$api.getComStorage('orderUserInfo').then(resolve => {
+			this.clubID = resolve.clubID
+		})
+		this.$api.getStorage().then(resolve => {
+			this.serviceProviderId = resolve.serviceProviderId
+			this.getClubProductNum()
+		})
 	}
+}
 </script>
 
 <style lang="scss">
-	page {
-		background: $sub-bg-color;
-		.all-type-list-wrapper {
-			display: flex;
-			flex-direction: column;
-		}
+page {
+	background: $sub-bg-color;
+	.all-type-list-wrapper {
+		display: flex;
+		flex-direction: column;
 	}
-	/* 加入购物模态层*/
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-		100% {
-			opacity: 1;
-		}
+}
+/* 加入购物模态层*/
+@keyframes showPopup {
+	0% {
+		opacity: 0;
 	}
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-		100% {
-			opacity: 0;
-		}
+	100% {
+		opacity: 1;
 	}
-	@keyframes showLayer {
-		0% {
-			transform: translateY(0);
-		}
-		100% {
-			transform: translateY(-100%);
-		}
+}
+@keyframes hidePopup {
+	0% {
+		opacity: 1;
 	}
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(-100%);
-		}
-		100% {
-			transform: translateY(0);
-		}
+	100% {
+		opacity: 0;
 	}
-	@keyframes showAmnation {
-		0% {
-			top: -12rpx;
-			opacity: 0;
-		}
-		50% {
-			top: -60rpx;
-			opacity: 1;
-		}
-		100% {
-			top: -100rpx;
-			opacity: 0;
-		}
+}
+@keyframes showLayer {
+	0% {
+		transform: translateY(0);
 	}
-	@keyframes hideAmnation {
-		0% {
-			top: -100rpx;
-			opacity: 0;
-		}
-		100% {
-			top: -12rpx;
-			opacity: 0;
-		}
+	100% {
+		transform: translateY(-100%);
+	}
+}
+@keyframes hideLayer {
+	0% {
+		transform: translateY(-100%);
+	}
+	100% {
+		transform: translateY(0);
+	}
+}
+@keyframes showAmnation {
+	0% {
+		top: -12rpx;
+		opacity: 0;
+	}
+	50% {
+		top: -60rpx;
+		opacity: 1;
 	}
-	.popup {
+	100% {
+		top: -100rpx;
+		opacity: 0;
+	}
+}
+@keyframes hideAmnation {
+	0% {
+		top: -100rpx;
+		opacity: 0;
+	}
+	100% {
+		top: -12rpx;
+		opacity: 0;
+	}
+}
+.popup {
+	position: fixed;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	z-index: 999;
+	display: none;
+	.mask {
 		position: fixed;
 		top: 0;
 		width: 100%;
 		height: 100%;
-		z-index: 999;
-		display: none;
-		.mask{
-			position: fixed;
-			top: 0;
+		z-index: 21;
+		background-color: rgba(0, 0, 0, 0.6);
+	}
+	.layer {
+		position: fixed;
+		z-index: 22;
+		bottom: -294rpx;
+		width: 702rpx;
+		padding: 24rpx 24rpx 36rpx 24rpx;
+		height: 260rpx;
+		border-radius: 20rpx 20rpx 0 0;
+		background-color: #fff;
+		display: flex;
+		flex-wrap: wrap;
+		align-content: space-between;
+		.content {
 			width: 100%;
-			height: 100%;
-			z-index: 21;
-			background-color: rgba(0, 0, 0, 0.6);
 		}
-		.layer {
-			position: fixed;
-			z-index: 22;
-			bottom: -294rpx;
-			width: 702rpx;
-			padding: 24rpx 24rpx 36rpx 24rpx;
-			height: 260rpx;
-			border-radius: 20rpx 20rpx 0 0;
-			background-color: #fff;
+		.btn {
+			width: 100%;
+			height: 88rpx;
 			display: flex;
-			flex-wrap: wrap;
-			align-content: space-between;
-			.content {
-				width: 100%;
-			}
-			.btn {
-				width: 100%;
+			.button {
+				width: 702rpx;
 				height: 88rpx;
+				color: #fff;
 				display: flex;
-				.button {
-					width: 702rpx;
-					height: 88rpx;
-					color: #fff;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					font-size: $font-size-28;
-					border-radius: 44rpx;
-					background: $btn-confirm;
-				}
+				align-items: center;
+				justify-content: center;
+				font-size: $font-size-28;
+				border-radius: 44rpx;
+				background: $btn-confirm;
 			}
 		}
-		
-		&.show {
-			display: block;
-			.mask{
-				animation: showPopup 0.2s linear both;
-			}
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
+	}
+
+	&.show {
+		display: block;
+		.mask {
+			animation: showPopup 0.2s linear both;
 		}
-		&.hide {
-			display: block;
-			.mask{
-				animation: hidePopup 0.2s linear both;
-			}
-			
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
+		.layer {
+			animation: showLayer 0.2s linear both;
 		}
-		&.none {
-			display: none;
+	}
+	&.hide {
+		display: block;
+		.mask {
+			animation: hidePopup 0.2s linear both;
 		}
-		&.service {
-			.row {
-				margin: 30upx 0;
-				.title {
-					font-size: 30upx;
-					margin: 10upx 0;
-				}
-				.description {
-					font-size: 28upx;
-					color: #999;
-				}
+
+		.layer {
+			animation: hideLayer 0.2s linear both;
+		}
+	}
+	&.none {
+		display: none;
+	}
+	&.service {
+		.row {
+			margin: 30upx 0;
+			.title {
+				font-size: 30upx;
+				margin: 10upx 0;
+			}
+			.description {
+				font-size: 28upx;
+				color: #999;
 			}
 		}
-		.layer-smimg{
+	}
+	.layer-smimg {
+		width: 114rpx;
+		height: 114rpx;
+		float: left;
+		border-radius: 10rpx;
+		margin-right: 24rpx;
+		image {
 			width: 114rpx;
 			height: 114rpx;
-			float: left;
 			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 114rpx;
-				height: 114rpx;	
-				border-radius: 10rpx;
-			}
 		}
-		.layer-nunbox{
-			justify-content: space-between;
-			align-items: center;
-			width: 536rpx;
-			height: 88rpx;
-			padding: 13rpx 0 0 0;
-			float: left;
-			.layer-nunbox-t{
-				width: 100%;
-				height:44rpx;
-				position:relative;
+	}
+	.layer-nunbox {
+		justify-content: space-between;
+		align-items: center;
+		width: 536rpx;
+		height: 88rpx;
+		padding: 13rpx 0 0 0;
+		float: left;
+		.layer-nunbox-t {
+			width: 100%;
+			height: 44rpx;
+			position: relative;
+			display: flex;
+			.layer-nunbox-text {
+				line-height: 44rpx;
+				font-size: $font-size-28;
+			}
+			.number-box {
 				display: flex;
-				.layer-nunbox-text{
-					line-height: 44rpx;
-					font-size: $font-size-28;
-				}
-				.number-box{
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					border: 2rpx solid #ffe6dc;
-					border-radius: 30rpx;
-					height: 48rpx;
-					margin-left: 20rpx;
-					.iconfont{
-						font-size: $font-size-24;
-						padding:0 18rpx;
-						color: #999999;
-						text-align: center;
-						line-height: 48rpx;
-						font-weight: bold;
-						background: #fef6f3;
-						&.icon-jianhao{
-							border-radius: 30rpx 0 0 30rpx;
-						}
-						&.icon-jiahao{
-							border-radius: 0 30rpx 30rpx 0;
-						}
+				justify-content: center;
+				align-items: center;
+				border: 2rpx solid #ffe6dc;
+				border-radius: 30rpx;
+				height: 48rpx;
+				margin-left: 20rpx;
+				.iconfont {
+					font-size: $font-size-24;
+					padding: 0 18rpx;
+					color: #999999;
+					text-align: center;
+					line-height: 48rpx;
+					font-weight: bold;
+					background: #fef6f3;
+					&.icon-jianhao {
+						border-radius: 30rpx 0 0 30rpx;
 					}
-					.btn-input{
-						width: 62rpx;
-						height: 48rpx;
-						line-height: 48rpx;
-						background: #FFFFFF;
-						border-radius: 4rpx;
-						text-align: center;
-						font-size: $font-size-28;
+					&.icon-jiahao {
+						border-radius: 0 30rpx 30rpx 0;
 					}
 				}
-				.product-step{
-					position: absolute;
-					left: 45rpx;
-					bottom: 0;
-					height: 44rpx;
-					background: #FFFFFF;
+				.btn-input {
+					width: 62rpx;
+					height: 48rpx;
+					line-height: 48rpx;
+					background: #ffffff;
+					border-radius: 4rpx;
+					text-align: center;
+					font-size: $font-size-28;
 				}
 			}
-			.layer-nunbox-b{
-				width: 100%;
-				height:44rpx;
-				margin-top: 13rpx;
+			.product-step {
+				position: absolute;
+				left: 45rpx;
+				bottom: 0;
+				height: 44rpx;
+				background: #ffffff;
 			}
-			.text{
-				line-height: 44rpx;
-				font-size: $font-size-28;
-				.p{
-					color: #FF2A2A;
-				}
-				.p:first-child{
-					margin-left: 30rpx;
-				}
-				.p.sm{
-					font-size: $font-size-24;
-				}
+		}
+		.layer-nunbox-b {
+			width: 100%;
+			height: 44rpx;
+			margin-top: 13rpx;
+		}
+		.text {
+			line-height: 44rpx;
+			font-size: $font-size-28;
+			.p {
+				color: #ff2a2a;
+			}
+			.p:first-child {
+				margin-left: 30rpx;
+			}
+			.p.sm {
+				font-size: $font-size-24;
 			}
 		}
-	}	
+	}
+}
 </style>

+ 121 - 87
pages/tabBar/user/user.vue

@@ -2,12 +2,15 @@
 	<view class="container user clearfix">
 		<cm-custom :navbar-data='nvabarData' v-if="isCmcustom"></cm-custom>
 		<view class="user-section">
-			<view class="header" :style="{height:(CustomBar+90)-StatusBar+'px',paddingTop:CustomBar+'px',background:'url('+ bgImgUrl +')',backgroundSize:'cover'}">
+			<view class="header" 
+				  :style="{height:(CustomBar+90)-StatusBar+'px',paddingTop:CustomBar+'px',background:'url('+ bgImgUrl +')',backgroundSize:'cover'}">
 				<view class="header-main" v-if="hasLogin">
-					<view class="header-icon"><image :src="headpic == null? 'https://static.caimei365.com/app/img/icon/icon-club@3x.png' : headpic" mode=""></image></view>
+					<view class="header-icon">
+						<image :src="headpic ? headpic : 'https://static.caimei365.com/app/img/icon/icon-club@3x.png' " mode=""></image>
+					</view>
 					<view class="header-text">
-						<view class="user-item amount">
-							<text class="u-h1">{{name}}</text>
+						<view class="user-item"><text class="u-h1">{{name}}</text></view>
+						<view class="user-item">
 							<text class="u-viptips" v-if="userIdentity == 2">{{userType}}</text>
 							<text class="u-tips" v-if="userIdentity == 4">{{userType}}</text>
 						</view>
@@ -19,15 +22,12 @@
 					</view>
 					<view class="header-text">
 						<view class="user-item">
-							<text class="u-h1" @click="navigator('/pages/login/login')">账号登录</text><text class="u-h1 line">|</text>
-							<text class="u-h1" @click="navigatorRegirst('/pages/login/register-select')">立即注册</text>
+							<text class="u-h1" @click="navigatorRegirst('/pages/login/login')">账号登录/注册></text>
 						</view>
 						<view class="user-item">
-							<text class="u-p" @click="navigator('/pages/login/login')">登录商城了解更多产品信息吧!</text>
-						</view>
-						<view class="user-item" @click="navigatorNex('/pages/login/logincode')">
-							<view class="u-btn"><text>邀请码登录</text><text class="iconfont icon-xiangyouhuabeifen"></text></view>
+							<text class="u-p" @click="navigator('/pages/login/login')">登录采美商城更多惊喜等着您~</text>
 						</view>
+						<view class="user-code" @click="navigatorLoginCode('/pages/login/logincode')">邀请码登录></view>
 					</view>
 				</view>
 				<!-- 我的资产 -->
@@ -67,7 +67,10 @@
 							<text class="iconfont icon-xiayibu"></text>
 						</view>
 						<view class="order-section">
-							<view class="order-item" @click="navigator('/pages/user/order/order-list?state=1')" hover-class="common-hover"  :hover-stay-time="50">
+							<view class="order-item" 
+								  @click="navigator('/pages/user/order/order-list?state=1')" 
+								  hover-class="common-hover"  
+								  :hover-stay-time="50">
 								<view class="order-icon">
 									<image src="https://static.caimei365.com/app/img/icon/order5@3x.png" mode=""></image>
 									<text 	v-if="confirmedCount>0 && hasLogin" 
@@ -78,7 +81,10 @@
 								</view>
 								<text class="order-t">待确认</text>
 							</view>
-							<view class="order-item" @click="navigator('/pages/user/order/order-list?state=2')"  hover-class="common-hover" :hover-stay-time="50">
+							<view class="order-item" 
+								  @click="navigator('/pages/user/order/order-list?state=2')"  
+								  hover-class="common-hover" 
+								  :hover-stay-time="50">
 								<view class="order-icon">
 									<image src="https://static.caimei365.com/app/img/icon/order1@3x.png" mode=""></image>
 									<text  v-if="paymentCount >0 && hasLogin" 
@@ -89,7 +95,10 @@
 								</view>
 								<text class="order-t">待付款</text>
 							</view>
-							<view class="order-item" @click="navigator('/pages/user/order/order-list?state=3')" hover-class="common-hover"  :hover-stay-time="50">
+							<view class="order-item" 
+								  @click="navigator('/pages/user/order/order-list?state=3')" 
+								  hover-class="common-hover"  
+								  :hover-stay-time="50">
 								<view class="order-icon">
 									<image src="https://static.caimei365.com/app/img/icon/order2@3x.png" mode=""></image>
 									<text   v-if="waitShipmentsCount >0 && hasLogin" 
@@ -100,7 +109,10 @@
 								</view>
 								<text class="order-t">待发货</text>
 							</view>
-							<view class="order-item" @click="navigator('/pages/user/order/order-list?state=4')" hover-class="common-hover"  :hover-stay-time="50">
+							<view class="order-item" 
+								  @click="navigator('/pages/user/order/order-list?state=4')" 
+								  hover-class="common-hover"  
+								  :hover-stay-time="50">
 								<view class="order-icon">
 									<image src="https://static.caimei365.com/app/img/icon/order3@3x.png" mode=""></image>
 									<text 	v-if="shipmentsCount>0 && hasLogin" 
@@ -111,7 +123,10 @@
 								</view>
 								<text class="order-t">已发货</text>
 							</view>
-							<view class="order-item" @click="navigator('/pages/user/order/order-list?state=5')" hover-class="common-hover"  :hover-stay-time="50">
+							<view class="order-item" 
+								  @click="navigator('/pages/user/order/order-list?state=5')" 
+								  hover-class="common-hover"  
+								  :hover-stay-time="50">
 								<view class="order-icon">
 									<image src="https://static.caimei365.com/app/img/icon/order4@3x.png" mode=""></image>
 									<text 	v-if="salesReturnCount >0 && hasLogin"
@@ -127,11 +142,12 @@
 				</view>
 				<!-- 底部跳转 -->
 				<view class="header-main-listcell">
-				<!--<view class="list-cell-avtiv" @click="navigator('/pages/user/coupon/coupon')">
-						<image src="http://static.caimei365.com/app/meibohui/app/activity-in.png" mode=""></image>
-					</view> -->
 					<view class="list-cell-item" v-show="hasLogin">
-						<view class="list-cell" v-show="userIdentity == 4" @click="navigatorClubUpgrade(`/pages/login/apply?clubStatus=${clubStatus}`)" hover-class="cell-hover" :hover-stay-time="50">
+						<view class="list-cell" 
+							  v-show="userIdentity == 4" 
+							  @click="navigatorClubUpgrade(`/pages/login/apply?clubStatus=${clubStatus}`)" 
+							  hover-class="cell-hover" 
+							  :hover-stay-time="50">
 							<view class="cell-icon">
 								<image class="cell-icon-image" src="https://static.caimei365.com/app/img/icon/icon_club_8@2x.png" mode=""></image>
 							</view>
@@ -144,16 +160,34 @@
 								<text class="iconfont icon-xiayibu"></text>
 							</text>
 						</view>
-						<view class="list-cell" @click="navigator('/pages/user/regularPurchase/regularPurchase')" hover-class="cell-hover" :hover-stay-time="50">
+						<view class="list-cell" 
+							  @click="navigator('/pages/user/regularPurchase/regularPurchase')" 
+							  hover-class="cell-hover" 
+							  :hover-stay-time="50">
 							<view class="cell-icon">
 								<image class="cell-icon-image" src="https://static.caimei365.com/app/img/icon/icon_club_9@2x.png" mode=""></image>
 							</view>
 							<text class="cell-tit">再次购买</text>
 							<text class="cell-more iconfont icon-xiayibu"></text>
 						</view>
+						<view class="list-cell" 
+							  @click="navigator('/pages/user/collection/collection')" 
+							  hover-class="cell-hover" 
+							  :hover-stay-time="50">
+							<view class="cell-icon">
+								<image class="cell-icon-image" src="https://static.caimei365.com/app/img/icon/icon_club_13@2x.png" mode=""></image>
+							</view>
+							<text class="cell-tit">收藏商品</text>
+							<text class="cell-more iconfont icon-xiayibu"></text>
+						</view>
 					</view>
 					<view class="list-cell-item">
-						<view class="list-cell"  v-for="(item, index) in firstList" :key="index" @click="navigator(item.path)" hover-class="cell-hover" :hover-stay-time="50">
+						<view class="list-cell"  
+							  v-for="(item, index) in firstList" 
+							  :key="index" 
+							  @click="navigator(item.path)" 
+							  hover-class="cell-hover" 
+							  :hover-stay-time="50">
 							<view class="cell-icon">
 								<image class="cell-icon-image" :src="item.icon" mode=""></image>
 							</view>
@@ -172,14 +206,20 @@
 							<text class="cell-tit cont">联系我们</text>
 							<text class="cell-more cont" @click="toPhone">{{contactNumber}}</text>
 						</view>
-						<view class="list-cell" @click="this.$api.navigateTo('/pages/user/about/about')" hover-class="cell-hover" :hover-stay-time="50">
+						<view class="list-cell" 
+							  @click="this.$api.navigateTo('/pages/user/about/about')" 
+							  hover-class="cell-hover" 
+							  :hover-stay-time="50">
 							<view class="cell-icon">
 								<image class="cell-icon-image" src="https://static.caimei365.com/app/img/icon/icon_club_6@2x.png" mode=""></image>
 							</view>
 							<text class="cell-tit">关于我们</text>
 							<text class="cell-more iconfont icon-xiayibu"></text>
 						</view>
-						<view class="list-cell last" @click="this.$api.navigateTo('/pages/h5/article/page?linkType=99')" hover-class="cell-hover" :hover-stay-time="50">
+						<view class="list-cell last" 
+							  @click="this.$api.navigateTo('/pages/h5/article/page?linkType=99')" 
+							  hover-class="cell-hover" 
+							  :hover-stay-time="50">
 							<view class="cell-icon">
 								<image class="cell-icon-image" src="https://static.caimei365.com/app/img/icon/icon_club_7@2x.png" mode=""></image>
 							</view>
@@ -209,16 +249,16 @@
 		},
 		data() {
 			return{	
-				nvabarData: {			// 顶部自定义导航
-					showCapsule: 1, 	// 是否显示左上角图标  1表示显示  0表示不显示,
+				nvabarData: {				// 顶部自定义导航
+					showCapsule: 1, 		// 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
-					title: '我的', 		// 导航栏中间的标题
+					title: '个人中心', 		// 导航栏中间的标题
 					haveBack:false,
 					textLeft:this.$store.state.isIphone,
-					textColor:'#FFFFFF',
+					textColor:'#333333',
 					bgColor:''
 				},
-				CustomBar:this.CustomBar,// 顶部导航栏高度
+				CustomBar:this.CustomBar,	// 顶部导航栏高度
 				StatusBar: this.StatusBar,
 				userId:0,
 				beanNumber:50,
@@ -228,7 +268,7 @@
 				isCmcustom:false,
 				bgImgUrl:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z_i6ASHobAAhl69yz3SM078.png',
 				name:'',
-				userType:"",
+				userType:'',
 				headpic:'',
 				userBeans:0,
 				userMoney:'0.00',
@@ -320,31 +360,31 @@
 				this.CommonService.QueryAfterSale().then(response =>{
 					this.contactNumber = response.data.contactNumber
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			toPhone(){// 拨号
 				uni.makePhoneCall({
 				    phoneNumber:this.contactNumber //仅为示例
-				});
+				})
 			},
 			filtersMoney(param){
-				let moneyText;
+				let moneyText
 				if( param == 0 ){
-					moneyText = '0.00';
+					moneyText = '0.00'
 				}else{
-					let i =  param.toString().lastIndexOf('.');
-					let money;
+					let i =  param.toString().lastIndexOf('.')
+					let money
 					if(i==-1){
-						money = this.$api.FormatMoney(param); //会所剩余余额
+						money = this.$api.FormatMoney(param) //会所剩余余额
 						moneyText = money +'.00'
 					}else{
-						money = this.$api.FormatMoney(param); //会所剩余余额
+						money = this.$api.FormatMoney(param) //会所剩余余额
 						moneyText = money
 					}
 				}
 				console.log('moneyText',moneyText)
-				return moneyText;
+				return moneyText
 			},
 			handleBeanlClick(){//关闭采美豆弹窗
 				this.isActivityBean = false
@@ -360,8 +400,8 @@
 				if(!this.hasLogin){
 					// 友盟埋点注册入口点击事件
 					if(process.env.NODE_ENV != 'development'){
-						this.$uma.trackEvent('Um_Event_zhuce', {
-							Um_Key_PageName: '立即注册',
+						this.$uma.trackEvent('Um_Event_totalLoginAndRegister', {
+							Um_Key_PageName: '登录注册统一入口',
 							Um_Key_SourcePage: '个人中心',
 						})
 					}
@@ -379,28 +419,39 @@
 				}
 				this.$api.navigateTo(url)
 			},
+			navigatorLoginCode(url){
+				// 友盟埋点普通机构升级点击事件
+				if(process.env.NODE_ENV != 'development'){
+					this.$uma.trackEvent('Um_Event_LoginCodeBtn', {
+						Um_Key_ClubName: `${this.name}`,
+						Um_Key_PageName: '邀请码登录',
+						Um_Key_SourcePage: '个人中心',
+					})
+				}
+				this.$api.navigateTo(url)
+			},
 			navigatorNex(url){
 				if(!this.hasLogin){
 					this.$api.navigateTo(url)
 				}
 			},		
 			showBadge(n){
-				let num ='';
-				if(n>100){num = 99}else{num = n;}
-				return num;
+				let num =''
+				if(n>100){num = 99}else{num = n}
+				return num
 			},	
 			clubStatusText(state){
-				let stateText;
+				let stateText
 				switch(state){
 					case 90:
 						 stateText = ''
-						 break;
+						 break
 					case 1:
 						 stateText = '正在审核中'
-						 break;
+						 break
 					case 92:
 						 stateText = '审核不通过'
-						 break;
+						 break
 				}
 				return stateText
 			}
@@ -408,8 +459,8 @@
 		onPageScroll(e){//实时获取到滚动的值
 			if(e.scrollTop>20){
 				this.isCmcustom = true
-				this.nvabarData.bgColor = '#E37A4B'
-				this.nvabarData.textColor = '#FFFFFF'
+				this.nvabarData.bgColor = '#FFFFFF'
+				this.nvabarData.textColor = '#333333'
 			}else{
 				this.isCmcustom = false
 				this.nvabarData.bgColor = ''
@@ -467,15 +518,11 @@
 			display: flex;
 			flex-direction: column;
 			box-sizing: border-box;
-			padding-left: 20rpx;
+			padding: 10rpx 0 0 20rpx;
 			.user-item{
 				flex: 1;
 				height: 64rpx;
 				line-height: 64rpx;
-				&.amount{
-					height: 135rpx;
-					line-height: 135rpx;
-				}
 				.u-tips{
 					display: inline-block;
 					float: left;
@@ -488,8 +535,6 @@
 					font-size: $font-size-20;
 					text-align: center;
 					color: #FFFFFF;
-					margin-left: 10rpx;
-					margin-top: 50rpx;
 				}
 				.u-viptips{
 					display: inline-block;
@@ -503,13 +548,11 @@
 					font-size: $font-size-20;
 					text-align: center;
 					color: #FFE600;
-					margin-left: 10rpx;
-					margin-top: 50rpx;
 				}
 				.u-h1{
-					width: 300rpx;
+					width: 400rpx;
 					float: left;
-					font-size: $font-size-34;
+					font-size: $font-size-30;
 					color: #FFFFFF;
 					text-align: left;
 					-o-text-overflow: ellipsis;
@@ -548,6 +591,23 @@
 			flex: 8;
 			display: flex;
 			flex-direction: column;
+			position: relative;
+			box-sizing: border-box;
+			padding: 20rpx 0;
+			.user-code{
+				width: 193rpx;
+				height: 56rpx;
+				background: rgba(255,255,255,.2);
+				color: #FFFFFF;
+				line-height: 56rpx;
+				font-size: $font-size-26;
+				padding: 0 20rpx 0 23rpx;
+				box-sizing: border-box;
+				border-radius: 28rpx 0 0 28rpx;
+				position: absolute;
+				right: -24rpx;
+				top: 46rpx;
+			}
 			.user-item{
 				flex: 1;
 				height: 50rpx;
@@ -557,7 +617,7 @@
 				}
 				.u-h1{
 					float: left;
-					font-size: $font-size-34;
+					font-size: $font-size-28;
 					color: #FFFFFF;
 					text-align: left;
 					-o-text-overflow: ellipsis;
@@ -574,22 +634,6 @@
 					color: #EFEFEF;
 					text-align: left;
 				}
-				.u-btn{
-					width: 160rpx;
-					height: 40rpx;
-					background: rgba(255,255,255,.8);
-					border-radius: 8rpx;
-					line-height: 40rpx;
-					text-align: center;
-					font-size: $font-size-24;
-					color: $color-system;
-					display: block;
-					margin-top: 5rpx;
-					padding-left: 6rpx;
-					.icon-xiangyouhuabeifen{
-						font-size: $font-size-24;
-					}
-				}
 			}
 		}
 		.header-icon{
@@ -785,16 +829,6 @@
 		padding: 0 24rpx;
 		margin-bottom: 60rpx;
 	}	
-	.list-cell-avtiv{
-		width: 702rpx;
-		height: 240rpx;
-		margin-bottom: 24rpx;
-		image{
-			width: 100%;
-			height: 100%;
-			display: block;
-		}
-	}
 	.list-cell-item{
 		width: 654rpx;
 		height: auto;

+ 1027 - 0
pages/user/collection/collection.vue

@@ -0,0 +1,1027 @@
+<template>
+	<view class="container product clearfix">
+		<view class="superv-header" v-if="!isEmpty">
+			<view class="superv-header-click">
+				<view class="oltext"
+					>共<text class="red">{{ totalRecord }}</text
+					>件商品</view
+				>
+				<view class="ortext" @click="showPopup(0)" v-if="!popupShow">编辑</view>
+				<view class="ortext" @click="hidePopup(0)" v-else>完成</view>
+			</view>
+		</view>
+		<view class="product-content" :style="{ paddingBottom: popupShow ? '68rpx' : '0' }">
+			<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
+				<!-- 空白页 -->
+				<view class="empty-container" v-if="isEmpty">
+					<image
+						class="empty-container-image"
+						:src="StaticUrl + '/icon/icon-collection-empty@2x.png'"
+					></image>
+					<text class="error-text">暂无收藏商品~</text>
+				</view>
+				<!-- 列表 -->
+				<view class="tui-cart-cell  tui-mtop" v-for="(pros, index) in productList" :key="index">
+					<view class="tui-goods-item">
+						<view class="tui-goods-main">
+							<view class="tui-goods-checkBox" v-if="popupShow">
+								<view
+									class="checkbox iconfont"
+									:class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
+									@click="checkedSoperv(pros)"
+								>
+								</view>
+							</view>
+							<view class="tui-goods-image" @click.stop="navToDetailPage(pros.productId)"
+								><image :src="pros.image" class="tui-goods-img" />
+							</view>
+							<view
+								class="tui-goods-info"
+								:style="{ width: popupShow ? '420rpx' : '528rpx' }"
+								@click.stop="navToDetailPage(pros.productId)"
+							>
+								<text class="list-details-title">{{ pros.name }}</text>
+								<text class="list-details-specs">规格:{{ pros.unit != null ? pros.unit : '' }}</text>
+								<view class="list-details-price" v-if="pros.priceFlag == 1">
+									<view class="list-none"><view class="price-small">¥未公开价格</view></view>
+								</view>
+								<view class="list-details-price" v-else-if="pros.priceFlag == 2">
+									<view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
+								</view>
+								<template v-else>
+									<view class="list-details-price">
+										<view class="list-price">
+											<text
+												class="price-larger"
+												:class="PromotionsFormat(pros.promotions) ? 'none' : ''"
+											>
+												¥{{
+													(PromotionsFormat(pros.promotions)
+														? pros.originalPrice
+														: pros.price) | NumFormat
+												}}
+											</text>
+										</view>
+										<view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
+											>数量</view
+										>
+									</view>
+									<view class="list-details-price none">
+										<view class="floor-item-act" v-if="pros.actStatus == 1">
+											<template>
+												<view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
+													{{ pros.promotions.name }}
+													<text v-if="pros.priceFlag != 1"
+														>:¥{{ pros.price | NumFormat }}</text
+													>
+												</view>
+												<view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
+											</template>
+										</view>
+										<view class="floor-item-act" v-if="pros.actStatus == 0">
+											<view
+												class="floor-tags"
+												v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
+												>阶梯价格</view
+											>
+										</view>
+									</view>
+								</template>
+							</view>
+						</view>
+					</view>
+				</view>
+				<!--加载loadding-->
+				<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+				<tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"></tui-nomore>
+				<!--加载loadding-->
+			</view>
+		</view>
+		<!-- 取消收藏操作 -->
+		<tui-bottom-popup :radius="false" :mask="false" :show="popupShow">
+			<view class="tui-popup-box clearfix">
+				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
+					<view class="tui-flex-1">
+						<view class="superv-header-checked">
+							<view class="oltext" @click="isCheckedAll">
+								<view
+									class="checkbox iconfont"
+									:class="[isAllChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
+								></view>
+								<view class="text">全选</view>
+							</view>
+						</view>
+						<view class="tui-button" :class="isProductChecked ? 'active' : ''" @click="handleAllUnder"
+							>取消收藏</view
+						>
+					</view>
+				</view>
+			</view>
+		</tui-bottom-popup>
+		<!-- 购买弹窗 -->
+		<tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
+			<view class="tui-popup-box clearfix">
+				<view class="tui-popup-content">
+					<view class="layer-smimg"> <image :src="handleData.image" mode=""></image> </view>
+					<view class="layer-nunbox">
+						<view class="layer-nunbox-t">
+							<view class="layer-nunbox-text">数量:</view>
+							<view class="number-box">
+								<view
+									class="iconfont icon-jianhao"
+									:class="[isQuantity == true ? 'disabled' : '']"
+									@click="changeCountSub()"
+								></view>
+								<input
+									class="btn-input"
+									type="number"
+									v-model="number"
+									maxlength="4"
+									@blur="changeNumber($event)"
+								/>
+								<view
+									class="iconfont icon-jiahao"
+									:class="[isStock == true ? 'disabled' : '']"
+									@click="changeCountAdd()"
+								></view>
+							</view>
+						</view>
+						<view class="layer-nunbox-b">
+							<view class="text"
+								>单价: <text class="p sm">¥</text>
+								<text class="p bg">{{ buyRetailPrice.toFixed(2) }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
+					<view class="tui-flex-btn">
+						<view class="button add" @click="getAddProductCart">加入购物车</view>
+						<view class="button buy" @click="toConfirmation">立即购买</view>
+					</view>
+				</view>
+			</view>
+		</tui-bottom-popup>
+		<!-- 弹窗提示 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			@cancel="hideMobel"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		>
+		</tui-modal>
+		<!-- 可拖动悬浮按钮 -->
+		<cm-drag
+			:cartNum="cartQuantity"
+			:isDock="true"
+			:existTabBar="true"
+			@btnClick="btnClick"
+			@btnTouchstart="btnTouchstart"
+			@btnTouchend="btnTouchend"
+		>
+		</cm-drag>
+	</view>
+</template>
+<script>
+import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
+import tuiNomore from '@/components/tui-components/nomore/nomore'
+import cmDrag from '@/components/cm-custom/cm-drag.vue'
+
+import { mapState, mapMutations } from 'vuex'
+const defaultListQuery = {
+	userId: 0,
+	pageNum: 1,
+	pageSize: 10
+}
+export default {
+	components: {
+		tuiLoadmore,
+		tuiNomore,
+		cmDrag
+	},
+	data() {
+		return {
+			StaticUrl: this.$Static,
+			modalButton: [
+				{
+					text: '取消',
+					type: 'gray',
+					plain: true //是否空心
+				},
+				{
+					text: '确认',
+					customStyle: {
+						color: '#fff',
+						bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
+					},
+					plain: false
+				}
+			],
+			totalRecord: 0,
+			cartQuantity: 0,
+			popupShow: false,
+			popupShow1: false,
+			isProductChecked: false,
+			listQuery: Object.assign({}, defaultListQuery),
+			productList: [],
+			handleData: {},
+			number: 0,
+			buyRetailPrice: 0,
+			buyRetailPriceStep: 1,
+			isQuantity: false,
+			scrollTop: 0,
+			isEmpty: false,
+			isAllChecked: false,
+			loadding: false,
+			pullUpOn: true,
+			pullFlag: true,
+			hasNextPage: false,
+			navbarHeight: '',
+			nomoreText: '上拉显示更多',
+			contentModalText: '', //操作文字提示语句
+			modal: false
+		}
+	},
+	onLoad() {
+		this.initGetStotage()
+	},
+	filters: {
+		NumFormat: function(text) {
+			//处理金额
+			return Number(text).toFixed(2)
+		}
+	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo'])
+	},
+	methods: {
+		...mapMutations(['login', 'logout']),
+		async initGetStotage() {
+			const userInfo = await this.$api.getStorage()
+			this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
+			this.GetProductListInfo()
+			this.shoppingHeaderCartNumber()
+		},
+		GetProductListInfo() {
+			this.productList = []
+			this.listQuery.pageNum = 1
+			this.ProductService.getProductUserLikeList(this.listQuery)
+				.then(response => {
+					let data = response.data
+					if (data.results && data.results.length > 0) {
+						this.isEmpty = false
+						this.hasNextPage = data.hasNextPage
+						this.totalRecord = data.totalRecord
+						this.productList = data.results
+						this.pullFlag = false
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							if (this.productList.length < 8) {
+								this.pullUpOn = true
+							} else {
+								this.pullUpOn = false
+								this.loadding = false
+								this.nomoreText = '已至底部'
+							}
+						}
+					} else {
+						this.isEmpty = true
+					}
+					this.isRequest = true
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		GetOnReachBottomData(index) {
+			//上拉加载
+			this.listQuery.pageNum += 1
+			this.ProductService.getProductUserLikeList(this.listQuery)
+				.then(response => {
+					let data = response.data
+					if (data.results && data.results.length > 0) {
+						this.hasNextPage = data.hasNextPage
+						this.productList = this.productList.concat(data.results)
+						this.pullFlag = false // 防上拉暴滑
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		shoppingHeaderCartNumber() {
+			// 获取用户购物车储量
+			this.ProductService.shoppingHeaderCartNumber({
+				userId: this.listQuery.userId
+			})
+				.then(response => {
+					this.cartQuantity = response.data.length
+				})
+				.catch(error => {
+					console.log('获取购物车数量失败')
+				})
+		},
+		handleAllUnder() {
+			//批量下架操作
+			let checkedArray = []
+			this.productIds = ''
+			if (this.isProductChecked) {
+				this.productList.forEach(el => {
+					if (el.isChecked) {
+						checkedArray.push(el)
+					}
+				})
+				checkedArray.forEach(el => {
+					this.productIds += el.productId + ','
+				})
+				this.modal = true
+				this.contentModalText = '确定要取消收藏吗?'
+			}
+		},
+		handleClick(e) {
+			//取消收藏
+			if (e.index == 1) {
+				this.handleDeleteUserLike()
+			}
+			this.modal = false
+		},
+		handleDeleteUserLike() {
+			//操作取消收藏
+			this.ProductService.getDeleteUserLike({
+				productIds: this.productIds,
+				userId: this.listQuery.userId
+			})
+				.then(response => {
+					this.$util.msg('取消收藏成功', 2000, true, 'success')
+					setTimeout(() => {
+						this.GetProductListInfo()
+					}, 2000)
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		hideMobel() {
+			this.modal = false
+		},
+		updateCheckAllBtn() {
+			//勾选单个判断全选
+			let goodsCheckedLength = 0
+			this.productList.forEach(item => {
+				if (item.isChecked) {
+					goodsCheckedLength++
+				}
+			})
+			this.isAllChecked = goodsCheckedLength === this.productList.length
+			if (goodsCheckedLength > 0) {
+				this.isProductChecked = true
+			} else {
+				this.isProductChecked = false
+			}
+		},
+		updateBothCheckBtn() {
+			//全选勾选判断
+			this.productList.forEach(item => {
+				item.isChecked = this.isAllChecked
+			})
+		},
+		isCheckedAll() {
+			//全选
+			this.isAllChecked = !this.isAllChecked
+			if (this.isAllChecked) {
+				this.isProductChecked = true
+			} else {
+				this.isProductChecked = false
+			}
+			this.updateBothCheckBtn()
+		},
+		checkedSoperv(item) {
+			//选择
+			item.isChecked = !item.isChecked
+			console.log(item)
+			this.updateCheckAllBtn()
+		},
+		PromotionsFormat(promo) {
+			//促销活动类型数据处理
+			if (promo != null) {
+				if (promo.type == 1 && promo.mode == 1) {
+					return true
+				} else {
+					return false
+				}
+			}
+			return false
+		},
+		changeCountAdd() {
+			//popup弹窗数量增加按钮
+			if (this.buyRetailPriceStep == 2) {
+				this.number += this.minBuyNumber
+			} else {
+				this.number++
+			}
+			this.calculatPerice()
+		},
+		changeCountSub() {
+			//popup弹窗数量减按钮
+			if (this.number <= this.minBuyNumber) {
+				this.number = this.minBuyNumber
+				this.isQuantity = true
+				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
+				return
+			} else {
+				if (this.buyRetailPriceStep == 2) {
+					this.number -= this.minBuyNumber
+				} else {
+					this.number--
+				}
+				this.calculatPerice()
+				this.isQuantity = false
+			}
+		},
+		changeNumber(e) {
+			let _value = e.detail.value
+			if (!this.$api.isNumber(_value)) {
+				this.number = this.minBuyNumber
+			} else if (_value < this.minBuyNumber) {
+				this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
+				this.number = this.minBuyNumber
+			} else if (_value % this.minBuyNumber != 0) {
+				this.$util.msg('购买量必须为起订量的整数倍', 2000)
+				this.number = this.minBuyNumber
+			} else {
+				this.number = e.detail.value
+				this.calculatPerice()
+			}
+		},
+		calculatPerice() {
+			//判断是否为阶梯价然后做计算价格处理
+			if (this.handleData.ladderPriceFlag == 1) {
+				this.handleData.ladderPrices.forEach((item, index) => {
+					if (this.number >= item.buyNum) {
+						this.buyRetailPrice = item.buyPrice
+					}
+				})
+			}
+		},
+		toConfirmation() {
+			//跳转确认订单页面
+			this.popupShow1 = false
+			let productStp = {
+				allPrice: this.number * this.buyRetailPrice,
+				allCount: this.number,
+				productID: this.handleData.productId,
+				productCount: this.number
+			}
+			this.$api.navigateTo(
+				`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
+			)
+		},
+		getAddProductCart() {
+			//增加购物车成功和toast弹窗提示成功
+			this.ProductService.shoppingAddCart({
+				productID: this.handleData.productId,
+				userID: this.listQuery.userId,
+				productCount: this.number
+			})
+				.then(response => {
+					this.popupShow1 = false
+					this.$util.msg('加入购物车成功', 1500, true, 'success')
+					this.shoppingHeaderCartNumber()
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		showPopup(index, pros) {
+			// 弹窗显示
+			switch (index) {
+				case 0:
+					this.popupShow = true
+					break
+				case 1:
+					this.popupShow1 = true
+					this.handleData = pros
+					console.log(this.handleData)
+					this.buyRetailPrice = this.handleData.price
+					this.buyRetailPriceStep = this.handleData.step
+					if (this.handleData.ladderPriceFlag == 1) {
+						this.number = this.handleData.maxBuyNumber ? this.handleData.maxBuyNumber : 1
+					} else {
+						this.number = this.handleData.minBuyNumber
+					}
+					break
+			}
+		},
+		hidePopup(index) {
+			// 弹窗隐藏
+			switch (index) {
+				case 0:
+					this.popupShow = false
+					break
+				case 1:
+					this.popupShow1 = false
+					break
+			}
+		},
+		navToDetailPage(id) {
+			this.isModallayer = true
+			this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+			this.isModallayer = false
+		},
+		btnClick() {
+			this.$api.switchTabTo('/pages/tabBar/cart/index')
+		},
+		btnTouchstart() {
+			// console.log('btnTouchstart');
+		},
+		btnTouchend() {
+			// console.log('btnTouchend');
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+	},
+	onReachBottom() {
+		if (this.hasNextPage) {
+			this.loadding = true
+			this.pullUpOn = true
+			this.GetOnReachBottomData()
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.listQuery.pageNum = 1
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShow() {}
+}
+</script>
+
+<style lang="scss">
+@import '@/uni.scss';
+page {
+	background: #fff;
+}
+.empty-container {
+	z-index: 9999;
+}
+.superv-header {
+	width: 100%;
+	height: 80rpx;
+	background-color: #f7f7f7;
+	line-height: 80rpx;
+	position: fixed;
+	top: 0;
+	left: 0;
+	box-sizing: border-box;
+	padding: 0 24rpx;
+	z-index: 99;
+	.superv-header-click {
+		width: 100%;
+		height: 80rpx;
+		font-size: $font-size-30;
+		.oltext {
+			float: left;
+			color: #666666;
+			.red {
+				color: $color-system;
+			}
+		}
+		.ortext {
+			float: right;
+			color: #333333;
+			text-align: right;
+		}
+	}
+}
+.tui-header {
+	width: 100%;
+	font-size: 16px;
+	font-weight: 500;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	position: relative;
+	padding: 0 40rpx;
+}
+.header-sit {
+	width: 100%;
+	box-sizing: border-box;
+	height: 80rpx;
+	line-height: 80rpx;
+	box-sizing: border-box;
+	padding: 0 40rpx;
+	text-align: left;
+	font-size: $font-size-40;
+	color: #ffffff;
+	font-weight: 600;
+	font-family: '正楷';
+	margin-top: 30rpx;
+	.iconfont {
+		font-size: 42rpx;
+		margin-left: 30rpx;
+	}
+}
+.mine {
+	width: 100%;
+	height: 100%;
+	position: relative;
+}
+.product-content {
+	width: 100%;
+	height: auto;
+	position: relative;
+	padding: 0;
+	padding-top: 80rpx;
+	box-sizing: border-box;
+	.empty-container-image {
+		width: 260rpx;
+		height: 260rpx;
+		margin-top: -300rpx;
+	}
+}
+.tui-goods-item {
+	padding: 30rpx 20rpx 0 20rpx;
+	box-sizing: border-box;
+	position: relative;
+	.tui-goods-main {
+		display: flex;
+		width: 100%;
+		height: 100%;
+		border-bottom: 1px solid #ebebeb;
+		padding-bottom: 24rpx;
+	}
+}
+.tui-goods-checkBox {
+	display: flex;
+	align-items: center;
+	margin: 0 15rpx;
+	.checkbox {
+		display: flex;
+		margin: 0;
+		padding: 0;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		box-sizing: border-box;
+		text-align: center;
+		text-decoration: none;
+		border-radius: 0;
+		-webkit-tap-highlight-color: transparent;
+		overflow: hidden;
+		background-color: #ffffff;
+		font-size: 36rpx;
+		color: $color-system;
+	}
+	.text {
+		font-size: $font-size-24;
+		margin-left: 10rpx;
+	}
+}
+.tui-goods-image {
+	width: 180rpx;
+	height: 180rpx !important;
+	border-radius: 12rpx;
+	.tui-goods-img {
+		width: 180rpx;
+		height: 180rpx !important;
+		border-radius: 12rpx;
+		flex-shrink: 0;
+		display: block;
+	}
+}
+.tui-goods-info {
+	padding-left: 20rpx;
+	box-sizing: border-box;
+	position: relative;
+	.list-details-title {
+		line-height: 38rpx;
+		text-overflow: ellipsis;
+		overflow: hidden;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		line-clamp: 2;
+		-webkit-box-orient: vertical;
+		font-size: 26rpx;
+		color: #333333;
+	}
+	.list-details-specs {
+		width: 100%;
+		display: inline-block;
+		margin-top: 8rpx;
+		color: #999999;
+		font-size: 24rpx;
+	}
+	.list-details-price {
+		width: 100%;
+		line-height: 54rpx;
+		float: left;
+		&.none {
+			height: 32rpx;
+			line-height: 32rpx;
+		}
+		.floor-item-act {
+			height: 54rpx;
+			text-align: center;
+			box-sizing: border-box;
+			float: left;
+			.coupon-tags {
+				height: 32rpx;
+				box-sizing: border-box;
+				border-radius: 8rpx;
+				background-color: #fff1eb;
+				line-height: 28rpx;
+				color: #f94b4b;
+				text-align: center;
+				display: inline-block;
+				padding: 0 10rpx;
+				font-size: $font-size-20;
+				border: 1px solid #f94b4b;
+				float: left;
+				margin-right: 12rpx;
+			}
+			.floor-tags {
+				height: 32rpx;
+				box-sizing: border-box;
+				border-radius: 8rpx;
+				background-color: #ffffff;
+				line-height: 28rpx;
+				color: $color-system;
+				text-align: center;
+				display: inline-block;
+				padding: 0 16rpx;
+				font-size: $font-size-20;
+				border: 1px solid #e15616;
+				float: left;
+			}
+		}
+		.price-icon {
+			width: 22rpx;
+			height: 28rpx;
+			vertical-align: middle;
+			margin-right: 10rpx;
+		}
+		.price-icon + text {
+			font-size: 25rpx;
+			vertical-align: middle;
+		}
+		.list-login-now {
+			width: 375rpx;
+			color: #f8c499;
+			position: absolute;
+			bottom: 0;
+			.p-no {
+				float: left;
+				font-size: $font-size-24;
+				color: $color-system;
+				margin-right: 10rpx;
+			}
+		}
+		.login-now {
+			padding: 10rpx 10rpx 10rpx 0;
+		}
+		.list-none {
+			margin-top: 20rpx;
+			.price-small {
+				font-size: $font-size-26;
+				line-height: 40rpx;
+				color: #ff2a2a;
+			}
+		}
+		.list-price {
+			color: #ff2a2a;
+			float: left;
+			line-height: 54rpx;
+			align-items: center;
+			justify-content: center;
+			.price-larger {
+				font-size: $font-size-30;
+				display: inline-block;
+				&.none {
+					text-decoration: line-through;
+					color: #999999;
+				}
+			}
+		}
+		.add-cart-btn {
+			float: right;
+			width: 140rpx;
+			height: 54rpx;
+			line-height: 54rpx;
+			border-radius: 30rpx;
+			color: #fff;
+			font-size: 24rpx;
+			margin-right: 0;
+			background: #ffffff;
+			border: 1px solid #c9c9c9;
+			color: $text-color;
+			text-align: center;
+		}
+	}
+}
+.tui-popup-box {
+	position: relative;
+	box-sizing: border-box;
+	min-height: 168rpx;
+	padding: 6rpx 24rpx;
+	.tui-popup-content {
+		padding-top: 30rpx;
+	}
+}
+.layer-smimg {
+	width: 114rpx;
+	height: 114rpx;
+	float: left;
+	border-radius: 10rpx;
+	margin-right: 24rpx;
+	image {
+		width: 114rpx;
+		height: 114rpx;
+		border-radius: 10rpx;
+	}
+}
+.layer-nunbox {
+	justify-content: space-between;
+	align-items: center;
+	width: 536rpx;
+	height: 88rpx;
+	padding: 13rpx 0 0 0;
+	float: left;
+	.layer-nunbox-t {
+		width: 100%;
+		height: 44rpx;
+		position: relative;
+		display: flex;
+		.layer-nunbox-text {
+			line-height: 44rpx;
+			font-size: $font-size-28;
+		}
+		.number-box {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border: 2rpx solid #ffe6dc;
+			border-radius: 30rpx;
+			height: 48rpx;
+			margin-left: 20rpx;
+			.iconfont {
+				font-size: $font-size-24;
+				padding: 0 18rpx;
+				color: #999999;
+				text-align: center;
+				line-height: 48rpx;
+				font-weight: bold;
+				background: #fef6f3;
+				&.icon-jianhao {
+					border-radius: 30rpx 0 0 30rpx;
+				}
+				&.icon-jiahao {
+					border-radius: 0 30rpx 30rpx 0;
+				}
+			}
+			.btn-input {
+				width: 62rpx;
+				height: 48rpx;
+				line-height: 48rpx;
+				background: #ffffff;
+				border-radius: 4rpx;
+				text-align: center;
+				font-size: $font-size-28;
+			}
+		}
+		.product-step {
+			position: absolute;
+			left: 45rpx;
+			bottom: 0;
+			height: 44rpx;
+			background: #ffffff;
+		}
+	}
+	.layer-nunbox-b {
+		width: 100%;
+		height: 44rpx;
+		margin-top: 13rpx;
+	}
+	.text {
+		line-height: 44rpx;
+		font-size: $font-size-28;
+		.p {
+			color: #ff2a2a;
+		}
+		.p:first-child {
+			margin-left: 30rpx;
+		}
+		.p.sm {
+			font-size: $font-size-24;
+		}
+	}
+}
+.tui-popup-btn {
+	width: 100%;
+	height: auto;
+	float: left;
+	box-sizing: border-box;
+	margin-top: 30rpx;
+	.superv-header-checked {
+		float: left;
+		font-size: $font-size-30;
+		.oltext {
+			width: 120rpx;
+			float: left;
+			color: #666666;
+			display: flex;
+			margin-left: 10rpx;
+			.checkbox {
+				display: flex;
+				margin: 0;
+				padding: 0;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				box-sizing: border-box;
+				text-align: center;
+				text-decoration: none;
+				border-radius: 0;
+				-webkit-tap-highlight-color: transparent;
+				overflow: hidden;
+				font-size: 34rpx;
+				color: $color-system;
+				line-height: 80rpx;
+			}
+			.text {
+				float: left;
+				line-height: 80rpx;
+				margin-left: 15rpx;
+			}
+		}
+		.ortext {
+			width: 120rpx;
+			float: right;
+			color: $color-system;
+			text-align: right;
+		}
+	}
+	.tui-button {
+		width: 210rpx;
+		height: 88rpx;
+		float: right;
+		background: #e1e1e1;
+		line-height: 88rpx;
+		text-align: center;
+		color: #ffffff;
+		font-size: $font-size-28;
+		border-radius: 44rpx;
+		&.active {
+			background: $btn-confirm;
+		}
+	}
+	.tui-flex-btn {
+		width: 100%;
+		height: 88rpx;
+		display: flex;
+		box-sizing: border-box;
+		padding: 0 34rpx;
+		.button {
+			width: 280rpx;
+			height: 88rpx;
+			color: #fff;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-size: $font-size-28;
+			border-radius: 44rpx;
+			&.buy {
+				background: $btn-confirm;
+				margin-left: 78rpx;
+			}
+			&.add {
+				background: #ffe6dc;
+				color: #e15616;
+			}
+		}
+	}
+}
+</style>

+ 15 - 15
pages/user/regularPurchase/regularPurchase.vue

@@ -70,17 +70,17 @@
 				this.minBuyNumber = data.minBuyNumber
 				this.buyRetailPrice = data.price
 				this.buyRetailPriceStep = data.step
-				if(this.handleData.ladderPriceFlag == '1'){
+				if(this.handleData.ladderPriceFlag == 1){
 					this.number = data.maxBuyNumber
 				}else{
 					this.number = data.minBuyNumber
 				}
 			},
 			hideSpec() {//关闭选择数量确认弹窗
-				this.specClass = 'hide';
+				this.specClass = 'hide'
 				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
+					this.specClass = 'none'
+				}, 200)
 			},
 			changeCountAdd(){//popup弹窗数量增加按钮
 				if(this.buyRetailPriceStep == 2){
@@ -94,7 +94,7 @@
 				if(this.number<=this.minBuyNumber){
 					this.number= this.minBuyNumber
 					this.isQuantity =true
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
+					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000)
 					return
 				}else{
 					if(this.buyRetailPriceStep == 2){
@@ -107,14 +107,14 @@
 				}
 			 },
 			changeNumber(e){
-				let _value = e.detail.value;
+				let _value = e.detail.value
 				if(!this.$api.isNumber(_value)){
 					this.number = this.minBuyNumber
 				}else if(_value < this.minBuyNumber){	
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
+					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000)
 					this.number = this.minBuyNumber
 				}else if( _value % this.minBuyNumber !=0 ){
-					this.$util.msg(`购买量必须为起订量的整数倍`,2000);
+					this.$util.msg('购买量必须为起订量的整数倍',2000)
 					this.number = this.minBuyNumber
 				}else{
 					this.number = e.detail.value
@@ -122,7 +122,7 @@
 				}
 			},
 			calculatPerice(){//判断是否为阶梯价然后做计算价格处理
-				if(this.handleData.ladderPriceFlag == '1'){
+				if(this.handleData.ladderPriceFlag == 1){
 					this.handleData.ladderPriceList.forEach((item,index)=>{
 						if(this.number>=item.buyNum){
 							this.buyRetailPrice = item.buyPrice
@@ -131,7 +131,7 @@
 				}
 			},
 			toConfirmation(){//跳转确认订单页面
-				this.specClass = 'hide';
+				this.specClass = 'hide'
 				let productStp ={
 						allPrice:this.number*this.buyRetailPrice,
 						allCount:this.number,
@@ -140,17 +140,17 @@
 				}	
 				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
 				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
+					this.specClass = 'none'
+				}, 200)
 			},
 			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
 				this.ProductService.shoppingAddCart({productID:this.handleData.productId,userID:this.userId,productCount:this.number}).then(response => {
-					this.specClass = 'hide';
+					this.specClass = 'hide'
 					this.$util.msg(response.msg,1500,true,'success')
 					setTimeout(() => {this.specClass = 'none'}, 200)
 					this.GetUserCartNumber()
 				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
+					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetUserCartNumber(){
@@ -165,7 +165,7 @@
 			}
 		},
 		onShow() {
-			let pages = getCurrentPages(),thisPage = pages[pages.length - 1];
+			let pages = getCurrentPages(),thisPage = pages[pages.length - 1]
 			this.$api.getStorage().then((resolve) =>{
 				this.userId = resolve.userId ? resolve.userId : 0
 			})

+ 180 - 140
services/product.service.js

@@ -2,21 +2,21 @@
  * 这是与购物有关的业务逻辑的服务
  */
 export default class ProductService {
-	constructor(AjaxService) {
-		Object.assign(this, { AjaxService })
-		this.name = 'ProductService'
-	}
-	/**
+    constructor(AjaxService) {
+        Object.assign(this, { AjaxService })
+        this.name = 'ProductService'
+    }
+    /**
 	 * @商城首页-常用商品列表
 	 * @param:userId 用户ID(未登录传0或者''),
 	 * @param:preferredFlag 新品上线(001) 优惠商品(010) 常用商品(100),,
 	 * @param:pageNum 页码
 	 * @param:pageSize 每页条数
 	 */
-	queryProductPreferred (data = {}) {
-		return this.AjaxService.get({ url:'/product/preferred', data, isLoading: false })
-	}
-	/**
+    queryProductPreferred (data = {}) {
+        return this.AjaxService.get({ url:'/product/preferred', data, isLoading: false })
+    }
+    /**
 	 * @分类-商品列表
 	 * @param:userId 用户ID(未登录传0或者''),
 	 * @param:bigTypeID 
@@ -26,96 +26,96 @@ export default class ProductService {
 	 * @param:pageNum 页码
 	 * @param:pageSize 每页条数
 	 */
-	GetProductListByTypeID(data = {}) {
-		return this.AjaxService.get({ url:'/product/listByTypeID', data, isLoading: false })
-	}
-	/**
+    GetProductListByTypeID(data = {}) {
+        return this.AjaxService.get({ url:'/product/listByTypeID', data, isLoading: false })
+    }
+    /**
 	 * @商品列表-查询商品价格
 	 * @param:userId 用户ID(未登录传0或者'')
 	 * @param:productID 商品ID','符号拼接
 	 */
-	querySearchProductPrice (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/price/list', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
+    querySearchProductPrice (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/price/list',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
 	
-	/**
+    /**
 	 * @查询凑单商品页初始化
 	 * @param:promotionsId 促销ID
 	 */
-	queryProductPromotionInfo (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/promotions/info', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    queryProductPromotionInfo (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/promotions/info',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 * @查询凑单商品列表
 	 * @param:promotionsId 促销ID
 	 * @param:pageSize 查询条数
 	 * @param:pageNum 查询页数
 	 */
-	queryProductPromotionList (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/promotions/product', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
+    queryProductPromotionList (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/promotions/product',
+            data,
+            isLoading: true ,
+            isHost:true
+        })
+    }
 	
-	/**
+    /**
 	 * @商品详情-查询商品详情
 	 * @param:userId 用户ID(未登录传0或者'')
 	 * @param:productIds 商品ID
 	 */
-	QueryProductDetils (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/product/details', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    QueryProductDetils (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/product/details',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 * @商品详情-查看相关优惠券
 	 * @param:userId 用户ID(未登录传0或者'')
 	 * @param:productId 商品ID
 	 * @param:source 来源 1 WWW  2小程序
 	 * @param:status 优惠券领取状态 1 未领取  2 已领取
 	 */
-	QueryProductDetilsCoupons (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/coupon/details/coupons', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    QueryProductDetilsCoupons (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/coupon/details/coupons',
+            data,
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 * @商品详情-相关推荐
 	 * @param:productIds 商品ID
 	 */
-	queryProductDetilsRelevant (data = {}) {
-		return this.AjaxService.get({ url:'/product/detail/recommend', data, isLoading: false })
-	}
+    queryProductDetilsRelevant (data = {}) {
+        return this.AjaxService.get({ url:'/product/detail/recommend', data, isLoading: false })
+    }
 	
-	/**
+    /**
 	 * @加入购物车
 	 * @param:userId 用户ID(必填)
 	 * @param:productID 用户ID(必填)
 	 * @param:productCount 商品数量(必填)
 	 */
 	shoppingAddCart (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/cart/add', 
-			data, 
+		return this.AjaxService.post({
+			url:'/order/club/cart/add',
+			data,
 			isLoading: true ,
 			isHost:true
 		})
@@ -124,41 +124,41 @@ export default class ProductService {
 	 * @查询购物车数量
 	 * @param:userId 用户ID(必填)
 	 */
-	shoppingHeaderCartNumber (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/shoppingCart/header/cart', 
-			data, 
-			isLoading: false ,
-		})
-	}
+    shoppingHeaderCartNumber (data = {}) {
+        return this.AjaxService.get({
+            url:'/shoppingCart/header/cart',
+            data,
+            isLoading: false ,
+        })
+    }
 	
-	/**
+    /**
 	 * @购物车列表
 	 * @param:userId 用户ID(必填)
 	 */
 	QueryShoppingCartList (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/cart/list', 
-			data, 
+		return this.AjaxService.get({
+			url:'/order/club/cart/list',
+			data,
 			isLoading: false ,
 			isHost:true
 		})
 	}
 	
-	/**
+    /**
 	 * @更新购物车加减数量
 	 * @param:userId 用户ID(必填)
 	 */
 	ShoppingCartUpdate (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/cart/update', 
-			data, 
+		return this.AjaxService.post({
+			url:'/order/club/cart/update',
+			data,
 			isLoading: false ,
 			isHost:true
 		})
 	}
 	
-	/**
+    /**
 	 * @购物车领券弹窗优惠券列表
 	 * @param:userId 用户ID(必填)
 	 * @param:shopId 供应商ID(必填)
@@ -166,9 +166,9 @@ export default class ProductService {
 	 * @param:status 状态 1 未领取 2已领取
 	 */
 	ShoppingCartGetCoupon(data = {}) {
-		return this.AjaxService.get({ 
-			url:'/order/club/coupon', 
-			data, 
+		return this.AjaxService.get({
+			url:'/order/club/coupon',
+			data,
 			isLoading: true ,
 			isHost:true
 		})
@@ -179,9 +179,9 @@ export default class ProductService {
 	 * @param:productIDs 商品ID(用','号拼接)
 	 */
 	ShoppingCartDelete (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/order/club/cart/delete', 
-			data, 
+		return this.AjaxService.post({
+			url:'/order/club/cart/delete',
+			data,
 			isLoading: true ,
 			isHost:true
 		})
@@ -305,82 +305,122 @@ export default class ProductService {
 	 * @param:pageSize 每页条数
 	 * @param:couponId 优惠券ID
 	 */
-	QueryCouponActivityList (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/coupon/activity/page', 
-			data, 
-			isLoading: true,
-			isHost:true
-		})
-	}
-	/**
+    QueryCouponActivityList (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/coupon/activity/page',
+            data,
+            isLoading: true,
+            isHost:true
+        })
+    }
+    /**
 	 * @优惠券-个人中心优惠券列表
 	 * @param:userId 用户userId(必传)
 	 * @param:pageNum 页码
 	 * @param:pageSize 每页条数
 	 * @param:status 使用状态 1未使用 2已使用 3已失效
 	 */
-	QueryCouponCenter (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/coupon/center', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    QueryCouponCenter (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/coupon/center',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 * @优惠券-领取中心优惠券列表
 	 * @param:userId 用户userId(未登录传0)
 	 * @param:pageNum 每页页码
 	 * @param:pageSize 条数
 	 */
-	QueryCouponCollarList (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/coupon/collar/list', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
-	/**
+    QueryCouponCollarList (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/coupon/collar/list',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
 	 * @优惠券-领取优惠券
 	 * @param:userId 用户userId
 	 * @param:couponId 优惠券Id
 	 * @param:source 来源: 1WWW 2小程序
 	 */
-	ReceiveCoupon (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/commodity/coupon/collar', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    ReceiveCoupon (data = {}) {
+        return this.AjaxService.post({
+            url:'/commodity/coupon/collar',
+            data,
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 * @优惠券-兑换优惠券
 	 * @param:userId 用户userId
 	 * @param:redemptionCode 优惠券兑换码
 	 * @param:source 来源: 1WWW 2小程序
 	 */
-	ExchangeCoupon (data = {}) {
-		return this.AjaxService.post({ 
-			url:'/commodity/coupon/redeem', 
-			data, 
-			isLoading: true ,
-			isHost:true
-		})
-	}
-	/**
+    ExchangeCoupon (data = {}) {
+        return this.AjaxService.post({
+            url:'/commodity/coupon/redeem',
+            data,
+            isLoading: true ,
+            isHost:true
+        })
+    }
+    /**
 	 * @优惠券-我的优惠券数量统计
 	 * @param:userId 用户userId(必传)
 	 */
-	QueryCouponsCount (data = {}) {
-		return this.AjaxService.get({ 
-			url:'/commodity/coupon/coupons/count', 
-			data, 
-			isLoading: false ,
-			isHost:true
-		})
-	}
+    QueryCouponsCount (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/coupon/coupons/count',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
+	 * @商品收藏-操作
+	 * @param:userId 用户userId(必传)
+	 * @param:productId 商品Id
+	 */
+    getProductUserLike (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/userLike/likeOne',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
+	 * @商品收藏-列表
+	 * @param:userId 用户userId(必传)
+	 * @param:pageNum 页码
+	 * @param:pageSize 条数
+	 */
+    getProductUserLikeList (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/userLike/likeList',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
+    /**
+	 * @商品收藏-取消收藏
+	 * @param:userId 用户userId(必传)
+	 * @param:productIDs 商品Id字符串逗号隔开
+	 */
+    getDeleteUserLike (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/userLike/deleteList',
+            data,
+            isLoading: false ,
+            isHost:true
+        })
+    }
 	
 }