瀏覽代碼

commit -m 商品收藏

zhengjinyi 3 年之前
父節點
當前提交
86e0a51228
共有 3 個文件被更改,包括 45 次插入36 次删除
  1. 6 6
      pages/login/login.vue
  2. 4 4
      pages/tabBar/user/user.vue
  3. 35 26
      pages/user/collection/collection.vue

+ 6 - 6
pages/login/login.vue

@@ -22,15 +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"  @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{
@@ -76,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){
 				// 友盟埋点注册入口点击事件
@@ -96,7 +96,7 @@
 				this.$api.navigateTo(url)
 			},
 			passwordClick() { //密码显隐操作
-				this.isShowEye = !this.isShowEye;
+				this.isShowEye = !this.isShowEye
 			},
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
 				wxLogin.wxLoginQuick()	

+ 4 - 4
pages/tabBar/user/user.vue

@@ -22,10 +22,10 @@
 					</view>
 					<view class="header-text">
 						<view class="user-item">
-							<text class="u-h1" @click="navigator('/pages/login/login')">账号登录/注册</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>
+							<text class="u-p" @click="navigator('/pages/login/login')">登录采美商城更多惊喜等着您~</text>
 						</view>
 						<view class="user-code" @click="navigatorLoginCode('/pages/login/logincode')">邀请码登录></view>
 					</view>
@@ -400,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: '个人中心',
 						})
 					}

+ 35 - 26
pages/user/collection/collection.vue

@@ -2,7 +2,7 @@
 	<view class="container product clearfix">
 		<view class="superv-header" v-if="!isEmpty">
 			<view class="superv-header-click">
-				<view class="oltext">共<text class="red">3</text>件商品</view>
+				<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>
@@ -18,25 +18,25 @@
 					<text class="error-text">暂无收藏商品~</text>
 				</view>
 				<!-- 列表 -->
-				<view class="tui-cart-cell  tui-mtop" v-for="(item, index) in productList" :key="index">
+				<view class="tui-cart-cell  tui-mtop" v-for="(pros, index) in productList" :key="index" @click.stop="navToDetailPage(pros.productId)">
 					<view class="tui-goods-item">
 						<view class="tui-goods-main">
 							<view class="tui-goods-checkBox" v-if="popupShow">
 								<view
 									class="checkbox iconfont"
-									:class="[item.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
-									@click="checkedSoperv(item)"
+									:class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
+									@click="checkedSoperv(pros)"
 								>
 								</view>
 							</view>
-							<view class="tui-goods-image"> <image :src="item.image" class="tui-goods-img" /> </view>
+							<view class="tui-goods-image"> <image :src="pros.image" class="tui-goods-img" /> </view>
 							<view class="tui-goods-info" :style="{ width: popupShow ? '420rpx' : '528rpx' }">
-								<text class="list-details-title">{{ item.name }}</text>
-								<text class="list-details-specs">规格:{{ item.unit != null ? item.unit : '' }}</text>
-								<view class="list-details-price" v-if="item.priceFlag == 1">
+								<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="item.priceFlag == 2">
+								<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>
@@ -44,35 +44,35 @@
 										<view class="list-price">
 											<text
 												class="price-larger"
-												:class="PromotionsFormat(item.promotions) ? 'none' : ''"
+												:class="PromotionsFormat(pros.promotions) ? 'none' : ''"
 											>
 												¥{{
-													(PromotionsFormat(item.promotions)
-														? item.originalPrice
-														: item.price) | NumFormat
+													(PromotionsFormat(pros.promotions)
+														? pros.originalPrice
+														: pros.price) | NumFormat
 												}}
 											</text>
 										</view>
-										<view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, item)"
+										<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="item.actStatus == 1">
+										<view class="floor-item-act" v-if="pros.actStatus == 1">
 											<template>
-												<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
-													{{ item.promotions.name }}
-													<text v-if="item.priceFlag != 1"
-														>:¥{{ item.price | NumFormat }}</text
+												<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>{{ item.promotions.name }}</view>
+												<view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
 											</template>
 										</view>
-										<view class="floor-item-act" v-if="item.actStatus == 0">
+										<view class="floor-item-act" v-if="pros.actStatus == 0">
 											<view
 												class="floor-tags"
-												v-if="item.actStatus == 0 && item.ladderPriceFlag == 1"
+												v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
 												>阶梯价格</view
 											>
 										</view>
@@ -213,6 +213,7 @@ export default {
 					plain: false
 				}
 			],
+			totalRecord:0,
 			cartQuantity: 0,
 			popupShow: false,
 			popupShow1: false,
@@ -237,7 +238,9 @@ export default {
 			modal: false
 		}
 	},
-	onLoad() {},
+	onLoad() {
+		this.initGetStotage()
+	},
 	filters: {
 		NumFormat: function(text) {
 			//处理金额
@@ -264,6 +267,7 @@ export default {
 					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(() => {
@@ -531,6 +535,11 @@ export default {
 					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')
 		},
@@ -558,7 +567,7 @@ export default {
 		}, 200)
 	},
 	onShow() {
-		this.initGetStotage()
+		
 	}
 }
 </script>
@@ -581,7 +590,7 @@ page {
 	left: 0;
 	box-sizing: border-box;
 	padding: 0 24rpx;
-	z-index: 999;
+	z-index: 99;
 	.superv-header-click {
 		width: 100%;
 		height: 80rpx;
@@ -829,7 +838,7 @@ page {
 .tui-popup-box {
 	position: relative;
 	box-sizing: border-box;
-	min-height: 200rpx;
+	min-height: 168rpx;
 	padding: 6rpx 24rpx;
 	.tui-popup-content {
 		padding-top: 30rpx;