yuwenjun 4 lat temu
rodzic
commit
8607a19588

+ 0 - 5
App.vue

@@ -12,7 +12,6 @@ export default {
 		uni.getSystemInfo({
 			success: function(e) {
 				let modelmes = e.model
-				console.log(e)
 				self.$store.commit('setWindowHeight', e.windowHeight)
 				if (
 					modelmes.search('iPhone 11') ||
@@ -111,10 +110,6 @@ export default {
 			let date = Date.now()
 			return date - t < 2 * 60 * 1000 ? false : true
 		}
-	},
-	onShow: function() {},
-	onHide: function() {
-		console.log('App Hide')
 	}
 }
 </script>

+ 39 - 47
components/cm-module/listTemplate/productList.vue

@@ -35,17 +35,13 @@
 					:src="item.mainImage"
 					class="list-img"
 					alt="list-img"
+					lazy-load
 				></image>
 				<view class="list-details-info">
+					<!-- 商品名称 -->
 					<text class="list-details-title">{{ item.productName }}</text>
-					<!-- 商品标签 -->
-					<!-- <view class="list-details-tags">
-							<tui-tag type="red" class="tag" padding="6rpx" size="20rpx" plain>商品标签</tui-tag>
-							<tui-tag type="red" class="tag" padding="6rpx" size="20rpx" plain>商品标签</tui-tag>
-						</view> -->
-					<!-- 活动标签 -->
 					<view class="list-details-price">
-						<view class="floor-item-act" v-if="item.actStatus == 1">
+						<!-- <view class="floor-item-act" v-if="item.actStatus == 1">
 							<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
 								{{ item.promotions.name
 								}}<text v-if="item.price1TextFlag != 1"
@@ -59,7 +55,7 @@
 							v-if="item.actStatus == 0 && item.ladderPriceFlag == 1"
 						>
 							<view class="floor-tags">阶梯价格</view>
-						</view>
+						</view> -->
 					</view>
 					<text class="list-details-specs"
 						>规格:{{ item.unit != null ? item.unit : '' }}</text
@@ -169,21 +165,24 @@ export default {
 			userId: ''
 		}
 	},
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'identity'])
+	},
 	async created() {
+		// 获取采购员组织id
 		const userInfo = uni.getStorageSync('userInfo')
 		this.organizeId = userInfo.organizeId
+		// 获取商品列表
 		this.productList = await this.getGoodsList()
+		// 购物车数量统计
 		this.getCartQuantity()
 	},
 	filters: {
+		//处理金额
 		NumFormat: function(text) {
-			//处理金额
 			return Number(text).toFixed(2)
 		}
 	},
-	computed: {
-		...mapState(['hasLogin', 'userInfo', 'identity'])
-	},
 	methods: {
 		// 获取购物车商品数量
 		getCartQuantity() {
@@ -194,35 +193,7 @@ export default {
 				this.cartQuantity = res.data
 			})
 		},
-		// 模糊框单击事件
-		fuzzyClickHandle(e) {
-			console.log(e)
-		},
-		// 绑定数据
-		searchValChange(val) {
-			this.searchVal = val
-		},
-		searchValBlur() {
-			this.searchKeyWords()
-		},
-		// 关键字搜索
-		async searchKeyWords() {
-			this.pageNum = 1
-			this.productList = await this.getGoodsList()
-		},
-		// 搜索按钮点击事件
-		async searchValHandle(val) {
-			// 如果输入框内容为空
-			if (val.trim().length <= 0) {
-				this.searchVal = ''
-				return
-			}
-			this.searchKeyWords()
-		},
-		async searchValClear() {
-			this.searchVal = ''
-			this.searchKeyWords()
-		},
+
 		// 上拉加载更多
 		async scrolltolower() {
 			if (!this.hasNextPage) {
@@ -266,22 +237,43 @@ export default {
 			}
 			// 是否还有下一页
 			this.hasNextPage = result.hasNextPage
-			// 返回数据
+			this.loadingNow = false
+			// 返回列表
 			return result.list
 		},
+		// 关键字搜索
+		async searchKeyWords() {
+			this.pageNum = 1
+			this.productList = await this.getGoodsList()
+		},
+		searchValChange(val) {
+			this.searchVal = val
+		},
+		searchValBlur() {
+			this.searchKeyWords()
+		},
+		async searchValClear() {
+			this.searchVal = ''
+			this.searchKeyWords()
+		},
+		// 搜索按钮点击事件
+		async searchValHandle(val) {
+			// 如果输入框内容为空
+			if (val.trim().length <= 0) {
+				this.searchVal = ''
+				return
+			}
+			this.searchKeyWords()
+		},
 		operationHanld(prop) {
 			this.$emit('operationConfim', prop)
 		},
+		// 跳转详情
 		navToDetailPage(id) {
 			this.isModallayer = true
 			this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 			this.isModallayer = false
 		},
-		toIndexPage() {
-			uni.switchTab({
-				url: '/pages/tabBar/home/index'
-			})
-		},
 		repurchModel() {
 			this.$util.modal(
 				'',

+ 338 - 337
pages/goods/list.vue

@@ -2,11 +2,10 @@
 	<view class="container all-type-list-wrapper">
 		<product-list ref="productList" @operationConfim="hanldOperationConfim"></product-list>
 		<!--底部选择模态层弹窗组件 -->
-		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
+		<view class="popup spec" :class="specClass" @tap="hideSpec">
 			<!-- 遮罩层 -->
 			<view class="mask"></view>
-			<!-- :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-460rpx' : '-400rpx'}" -->
-			<view class="layer" @tap.stop="discard">
+			<view class="layer">
 				<view class="content">
 					<view class="layer-smimg">
 						<image :src="handleData.mainImage" mode=""></image>
@@ -15,21 +14,34 @@
 						<view class="layer-nunbox-b">
 							<view class="text">
 								<text class="p sm">¥</text>
-								<text class="p bg">{{buyRetailPrice.toFixed(2)}}</text>
+								<text class="p bg">{{ buyRetailPrice.toFixed(2) }}</text>
 							</view>
 						</view>
 						<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>
 				</view>
 				<view class="btn">
-					<!-- <view class="button buy" @click="toConfirmation">立即购买</view> -->
 					<view class="button add" @click="getAddProductCart">加入购物车</view>
 				</view>
 			</view>
@@ -38,384 +50,373 @@
 </template>
 
 <script>
-	import productList from '@/components/cm-module/listTemplate/productList'
-	export default{
-		components:{
-			productList
-		},
-		data(){
-			return{
-				userId: '',
-				serverUrl: '',
-				emptyText: '',
-				lastPageType: '',
-				lastPageVal: '',
-				isIphoneX:this.$store.state.isIphoneX,
-				specClass: '',//规格弹窗css类,控制开关动画
-				handleData:{},
-				isQuantity:false,
-				isStock:false,
-				minBuyNumber:0,
-				number:0,
-				buyRetailPrice:0,
-				buyRetailPriceStep:1,
+import productList from '@/components/cm-module/listTemplate/productList'
+export default {
+	components: {
+		productList
+	},
+	data() {
+		return {
+			userId: '',
+			specClass: '', //规格弹窗css类,控制开关动画
+			handleData: {},
+			isQuantity: false,
+			isStock: false,
+			minBuyNumber: 0,
+			number: 0,
+			buyRetailPrice: 0,
+			buyRetailPriceStep: 1
+		}
+	},
+	onLoad() {
+		// 获取机构id
+		const clubInfo = uni.getStorageSync('clubInfo')
+		this.userId = clubInfo.userId
+	},
+	methods: {
+		//显示选择数量确认弹窗
+		hanldOperationConfim(data) {
+			this.specClass = 'show'
+			this.handleData = data
+			this.minBuyNumber = data.minBuyNumber
+			this.buyRetailPrice = data.retailPrice
+			this.buyRetailPriceStep = data.step
+			if (this.handleData.ladderPriceFlag == '1') {
+				this.number = data.maxBuyNumber
+			} else {
+				this.number = data.minBuyNumber
 			}
 		},
-		onLoad() {
-			const clubInfo = uni.getStorageSync('clubInfo')
-			this.userId = clubInfo.userId
+		//关闭选择数量确认弹窗
+		hideSpec() {
+			this.specClass = 'hide'
+			setTimeout(() => {
+				this.specClass = 'none'
+			}, 200)
 		},
-		methods:{
-			//显示选择数量确认弹窗
-			hanldOperationConfim(data){
-				this.specClass = 'show'
-				this.handleData = data
-				this.minBuyNumber = data.minBuyNumber
-				this.buyRetailPrice = data.retailPrice
-				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.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.ladderPriceList.forEach((item, index) => {
+					if (this.number >= item.buyNum) {
+						this.buyRetailPrice = item.buyPrice
 					}
-					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.ladderPriceList.forEach((item,index)=>{
-						if(this.number>=item.buyNum){
-							this.buyRetailPrice = item.buyPrice
-						}
-					})
-				}
-			},
-			//跳转确认订单页面
-			toConfirmation(){
-				this.specClass = 'hide';
-				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})}`)
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
-			//增加购物车成功和toast弹窗提示成功
-			getAddProductCart(){
-				this.ProductService.shoppingAddCart({productId:this.handleData.productId,userId:this.userId,productCount:this.number}).then(response => {
-					this.specClass = 'hide';
-					this.$util.msg(response.msg,1500,true,'success')
-					setTimeout(() => {this.specClass = 'none'}, 200)
-					this.$refs.productList.cartQuantity = response.data
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
 				})
-			},
-			discard(){
-				//丢弃
 			}
+		},
+		//增加购物车成功和toast弹窗提示成功
+		getAddProductCart() {
+			this.ProductService.shoppingAddCart({
+				productId: this.handleData.productId,
+				userId: this.userId,
+				productCount: this.number
+			})
+				.then(response => {
+					this.specClass = 'hide'
+					this.$util.msg(response.msg, 1500, true, 'success')
+					setTimeout(() => {
+						this.specClass = 'none'
+					}, 200)
+					this.$refs.productList.cartQuantity = response.data
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
 		}
 	}
+}
 </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;
 	}
-	.popup {
+	50% {
+		top: -60rpx;
+		opacity: 1;
+	}
+	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: -420rpx;
+		width: 702rpx;
+		padding: 24rpx 24rpx 36rpx 24rpx;
+		height: 360rpx;
+		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);
+			margin-top: 40rpx;
 		}
-		.layer {
-			position: fixed;
-			z-index: 22;
-			bottom: -420rpx;
-			width: 702rpx;
-			padding: 24rpx 24rpx 36rpx 24rpx;
-			height: 360rpx;
-			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%;
-				margin-top: 40rpx;
-			}
-			.btn {
-				width: 100%;
-				height: 88rpx;
+			justify-content: center;
+			.button {
+				width: 600rpx;
+				height: 90rpx;
+				color: #fff;
 				display: flex;
+				align-items: center;
 				justify-content: center;
-				.button {
-					width: 600rpx;
-					height: 90rpx;
-					color: #fff;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					font-size: $font-size-28;
-					border-radius: 45rpx;
-					&.buy{
-						background: $btn-confirm;
-					}
-					&.add{
-						background: rgba(0, 0, 0, 1.0);
-					}
+				font-size: $font-size-28;
+				border-radius: 45rpx;
+				&.buy {
+					background: $btn-confirm;
+				}
+				&.add {
+					background: rgba(0, 0, 0, 1);
 				}
 			}
 		}
-		
-		&.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{
-			border: 1px solid #eee;
+	}
+	.layer-smimg {
+		border: 1px solid #eee;
+		width: 136rpx;
+		height: 136rpx;
+		float: left;
+		border-radius: 10rpx;
+		margin-right: 24rpx;
+		image {
 			width: 136rpx;
 			height: 136rpx;
-			float: left;
 			border-radius: 10rpx;
-			margin-right: 24rpx;
-			image{
-				width: 136rpx;
-				height: 136rpx;	
-				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 #e1e1e1;
-					border-radius: 30rpx;
-					height: 48rpx;
-					margin-left: 20rpx;
-					.iconfont{
-						font-size: $font-size-24;
-						padding:0 18rpx;
-						color: #333333;
-						text-align: center;
-						line-height: 48rpx;
-						font-weight: bold;
-						background: #FFFFFF;
-						&.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 #e1e1e1;
+				border-radius: 30rpx;
+				height: 48rpx;
+				margin-left: 20rpx;
+				.iconfont {
+					font-size: $font-size-24;
+					padding: 0 18rpx;
+					color: #333333;
+					text-align: center;
+					line-height: 48rpx;
+					font-weight: bold;
+					background: #ffffff;
+					&.icon-jianhao {
+						border-radius: 30rpx 0 0 30rpx;
 					}
-					.btn-input{
-						width: 62rpx;
-						height: 44rpx;
-						line-height: 44rpx;
-						border-radius: 4rpx;
-						text-align: center;
-						font-size: $font-size-24;
-						border-bottom: 2rpx solid #e1e1e1;
-						border-top: 2rpx solid #e1e1e1;
-						color: #333333;
-						background-color: #f7f7f7;
+					&.icon-jiahao {
+						border-radius: 0 30rpx 30rpx 0;
 					}
 				}
-				.product-step{
-					position: absolute;
-					left: 45rpx;
-					bottom: 0;
+				.btn-input {
+					width: 62rpx;
 					height: 44rpx;
-					background: #FFFFFF;
+					line-height: 44rpx;
+					border-radius: 4rpx;
+					text-align: center;
+					font-size: $font-size-24;
+					border-bottom: 2rpx solid #e1e1e1;
+					border-top: 2rpx solid #e1e1e1;
+					color: #333333;
+					background-color: #f7f7f7;
 				}
 			}
-			.layer-nunbox-b{
-				width: 100%;
-				height:44rpx;
-				padding: 8rpx 0 16rpx;
-				.text{
-					font-weight: bold;
-				}
+			.product-step {
+				position: absolute;
+				left: 45rpx;
+				bottom: 0;
+				height: 44rpx;
+				background: #ffffff;
 			}
-			.text{
-				line-height: 44rpx;
-				font-size: $font-size-32;
-				.p{
-					color: #FF2A2A;
-				}
-				// .p:first-child{
-				// 	margin-left: 30rpx;
-				// }
-				.p.sm{
-					font-size: $font-size-24;
-				}
+		}
+		.layer-nunbox-b {
+			width: 100%;
+			height: 44rpx;
+			padding: 8rpx 0 16rpx;
+			.text {
+				font-weight: bold;
 			}
 		}
-	}	
+		.text {
+			line-height: 44rpx;
+			font-size: $font-size-32;
+			.p {
+				color: #ff2a2a;
+			}
+			// .p:first-child{
+			// 	margin-left: 30rpx;
+			// }
+			.p.sm {
+				font-size: $font-size-24;
+			}
+		}
+	}
+}
 </style>

+ 23 - 20
pages/goods/product.vue

@@ -113,7 +113,11 @@
 										class="p-title-name"
 										:class="product.beautyActFlag == '1' ? 'indent' : ''"
 									>
-										{{ product.name == undefined ? '' : product.name }}
+										{{
+											product.productName == undefined
+												? ''
+												: product.productName
+										}}
 									</view>
 									<!-- 分享 -->
 									<button
@@ -139,14 +143,13 @@
 							</view>
 							<!-- 承诺 -->
 							<view class="product-seve">
-								<text class="label">采美承诺:</text>
-								<text class="iconfont icon-dui tui-skeleton-rect"
-									><text class="text">无忧退货</text></text
-								>
-								<text class="iconfont icon-dui tui-skeleton-rect"
+								<text class="iconfont icon-duigou tui-skeleton-rect">
+									<text class="text">无忧退货</text>
+								</text>
+								<text class="iconfont icon-duigou tui-skeleton-rect"
 									><text class="text">快速退款</text></text
 								>
-								<text class="iconfont icon-dui tui-skeleton-rect"
+								<text class="iconfont icon-duigou tui-skeleton-rect"
 									><text class="text">正品保证</text></text
 								>
 							</view>
@@ -194,16 +197,16 @@
 					</view>
 				</view>
 				<!-- 锚点 3 -->
-				<view class="product-details service product-details2">
+				<view
+					class="product-details service product-details2"
+					v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo"
+				>
 					<!-- 服务项目 -->
 					<view class="title"> <view class="title-tab">服务项目</view> </view>
-					<view
-						class="content service"
-						v-if="product.productDetail.orderInfo || product.productDetail.serviceInfo"
-					>
+					<view class="content service">
 						<cm-service :product="product.productDetail" v-if="isRequest"></cm-service>
 					</view>
-					<view class="content-none" v-else> <text>暂无服务项目</text> </view>
+					<!-- <view class="content-none" v-else> <text>暂无服务项目</text> </view> -->
 				</view>
 				<!-- 商品参数 -->
 				<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
@@ -786,6 +789,7 @@ page {
 	width: 100%;
 	height: 750rpx;
 	position: relative;
+	background: #f1f1f1;
 }
 .banner {
 	width: 100%;
@@ -825,7 +829,6 @@ page {
 		height: auto;
 		float: left;
 		padding-bottom: 20rpx;
-		border-bottom: 1px solid #f8f8f8;
 		&.none {
 			.p-title {
 				color: #999999;
@@ -982,16 +985,17 @@ page {
 	}
 	.wrap-label {
 		float: left;
-		width: 100%;
+		width: 620rpx;
+		padding: 0 24rpx;
 		box-sizing: border-box;
 		.label-a {
 			padding: 0 18rpx;
 			line-height: 32rpx;
 			font-size: $font-size-20;
-			color: $color-system;
+			color: rgb(196, 118, 31);
 			text-align: center;
 			border-radius: 6rpx;
-			background: #ffe6dc;
+			background: rgb(255, 243, 226);
 			margin: 0 20rpx 15rpx 0;
 			display: inline-block;
 		}
@@ -1119,13 +1123,13 @@ page {
 		color: #333333;
 	}
 	.iconfont {
-		color: #fea785;
+		color: #999999;
 		margin-right: 20rpx;
 		font-size: $font-size-22;
 	}
 	.text {
 		font-size: $font-size-22;
-		color: #fea785;
+		color: #999999;
 		margin-left: 10rpx;
 	}
 }
@@ -1151,7 +1155,6 @@ page {
 .product-parameter {
 	width: 702rpx;
 	height: 90rpx;
-	padding: 0 24rpx;
 	background-color: #ffffff;
 	position: relative;
 	display: flex;

+ 20 - 49
pages/index/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<!-- 机构信息区域 -->
-		<template>
+		<template v-show="!isRequest">
 			<view class="ws-header">
 				<!-- 用户信息 -->
 				<view class="user-info">
@@ -94,31 +94,20 @@ export default {
 	},
 	data() {
 		return {
-			nvabarData: {
-				//顶部自定义导航
-				showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-				showSearch: 0,
-				title: '我的', // 导航栏 中间的标题
-				haveBack: false,
-				textLeft: this.$store.state.isIphone,
-				textColor: '#FFFFFF',
-				bgColor: ''
-			},
-			CustomBar: this.CustomBar, // 顶部导航栏高度
-			StatusBar: this.StatusBar,
-			organizeName: '',
+			organizeName: '',  //采购员组织名称
 			isRequest: false,
 			paymentCount: 0, //待付款角标
 			waitShipmentsCount: 0, //待收货角标
 			shipmentsCount: 0, //已发货角标
 			salesReturnCount: '', //退货/款角标
-			organizeId: ''
+			organizeId: '',
+			refresh:false
 		}
 	},
 	onLoad() {
 		// 获取用户是否授权
+		//0:为取消授权 1:为已授权 2:为未操作
 		authorize.getSetting().then(res => {
-			//0:为取消授权 1:为已授权 2:为未操作
 			if (res == 1) {
 				console.log('用户已授权')
 				this.GetWxAuthorize()
@@ -135,43 +124,44 @@ export default {
 			// 获取微信code
 			const wechatCode = await authorize.getCode('weixin')
 			this.UserService.userInfoLogin({code:wechatCode}).then(res=>{
-				// 登录成功
+				// 登录成功  将信息保存在userInfo中 保存在本地和store
 				this.login(res.data)
-				const organizeId = res.data.organizeId
 				this.organizeId = res.data.organizeId
-				this.getUserInfoPersonal(organizeId)
-				console.log(res)
+				this.getUserInfoPersonal(this.organizeId)
+				this.refresh = true
 			}).catch(err=>{
 				// 缓存游客openid
-				console.log(err)
 				uni.setStorageSync('openid',err.data.openid)
 				this.logout()
+				this.refresh = true
 			})
 		},
 		//初始化个人中心数据
 		getUserInfoPersonal(organizeId) {
 			this.UserService.userInfoPersonal({ organizeId: organizeId })
 				.then(response => {
-					this.organizeName = response.data.organizeName
+					this.organizeName = response.data.organizeName  //采购员组织名称
 					this.paymentCount = this.showBadge(response.data.paymentCount) //待付款
 					this.waitShipmentsCount = this.showBadge(response.data.waitShipmentsCount) //待收货
 					this.shipmentsCount = this.showBadge(response.data.shipmentsCount) //已发货
 					this.salesReturnCount = this.showBadge(response.data.salesReturnCount) //退货/款
 					this.isRequest = true //个人中心初始化成功后才显示页面
-					console.log(response)
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
+		// 客服
 		handleContact(e) {
 			console.log(e.detail.path)
 			console.log(e.detail.query)
 		},
+		// 栏目跳转
 		navigator(url) {
-			authorize.getSetting().then(wxResponse => {
-				// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if (wxResponse == 1) {
+			authorize.getSetting().then(res => {
+				// console.log('是否已授权',res);
+				//0:为取消授权 1:为已授权 2:为未操作
+				if (res == 1) {
 					if (this.hasLogin) {
 						// 已登录
 						this.$api.navigateTo(url)
@@ -184,32 +174,13 @@ export default {
 				}
 			})
 		},
-		navigatorNex(url, type) {
-			authorize.getSetting().then(wxResponse => {
-				// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if (wxResponse == 1) {
-					if (!this.hasLogin) {
-						this.$api.navigateTo(url)
-					}
-				} else {
-					this.$api.navigateTo(`/pages/authorization/authorization?type=${type}`)
-				}
-			})
-		},
-		showBadge(n) {
-			let num = ''
-			if (n > 100) {
-				num = 99
-			} else {
-				num = n
-			}
-			return num
-		},
+		//下拉刷新
 		onPullDownRefresh() {
-			//下拉刷新
 			if (this.hasLogin) {
 				this.GetWxAuthorize()
-				uni.stopPullDownRefresh()
+				if(this.refresh){
+					uni.stopPullDownRefresh()
+				}
 			} else {
 				uni.stopPullDownRefresh()
 			}

+ 20 - 21
pages/user/club/club-list.vue

@@ -31,6 +31,7 @@
 					class="club-empty-image"
 					src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"
 					mode="aspectFit"
+					lazy-load
 				></image>
 				<view class="txt">暂无机构数据</view>
 			</view>
@@ -65,10 +66,10 @@
 								</view>
 							</view>
 							<view class="list-opea">
-								<view class="btn border-btn" @click.stop="_goGoodsList(item)">
+								<view class="btn border-btn" @click.stop="goOrderList(item)">
 									<text>订单列表</text>
 								</view>
-								<view class="btn border-btn" @click.stop="_goGoodsList(item)">
+								<view class="btn border-btn" @click.stop="goGoodsList(item)">
 									<text>立即下单</text>
 								</view>
 							</view>
@@ -100,11 +101,10 @@ export default {
 	},
 	data() {
 		return {
-			isShowClose: false,
+			isShowClose: false, //是否显示搜索框关闭按钮
 			searchInputVal: '', //搜索框数据
 			isEmpty: false, //机构列表是否为空
 			nomoreText: '上拉显示更多',
-			status: 66,
 			pageNum: 1, //当前页码
 			pageSize: 10, //每页获取条数
 			hasNextPage: false, //是否还有下一页
@@ -112,8 +112,6 @@ export default {
 			pullUpOn: true,
 			pullFlag: true,
 			scrollHeight: '', //scoll-view高度
-			currPage: '', //当前页面
-			prevPage: '', //上一个页面
 			clubList: [],
 			showSearchModal: false, //模糊搜索框是否显示
 			organizeId: ''
@@ -123,17 +121,14 @@ export default {
 		this.setScrollHeight()
 		// 获取传过来的organizeId
 		this.organizeId = data.id
+		// 初始化列表
 		this.init()
-		console.log(this.scrollHeight)
 	},
 	methods: {
-		// 初始胡机构列表
-		init() {
-			this.$api.getStorage().then(async response => {
-				this.serviceProviderId = response.serviceProviderID
-				this.pageNum = 1
-				this.clubList = await this.getClubList()
-			})
+		// 初始化机构列表
+		async init() {
+			this.pageNum = 1
+			this.clubList = await this.getClubList()
 		},
 		// 设置scroll高度
 		setScrollHeight() {
@@ -147,7 +142,7 @@ export default {
 			}
 			this.searchKeyWords()
 		},
-		async searchKeyWords(){
+		async searchKeyWords() {
 			this.pageNum = 1
 			this.clubList = await this.getClubList()
 		},
@@ -158,11 +153,15 @@ export default {
 				name: this.searchInputVal,
 				pageNum: this.pageNum,
 				pageSize: this.pageSize
-				// status: this.status
 			}
 			const { data: res } = await this.SellerService.GetSellerClubList(params).catch(
 				error => {
-					this.$util.msg(error.msg, 2000)
+					this.$util.msg(error.msg, 1500)
+					setTimeout(() => {
+						uni.navigateBack({
+							delta: 1
+						})
+					}, 1500)
 				}
 			)
 			this.pageNum = res.pageNum
@@ -205,12 +204,12 @@ export default {
 			this.searchKeyWords()
 		},
 		// 跳转下单产品列表
-		_goGoodsList(item) {
-			this.$api.setStorage('clubInfo', item)
-			this.$api.navigateTo(`/pages/goods/list?userId=${item.userId}`)
+		goGoodsList(item) {
+			uni.setStorageSync('clubInfo', item)
+			this.$api.navigateTo(`/pages/goods/list`)
 		},
 		// 跳转订单列表
-		_goOrderList(item) {
+		goOrderList(item) {
 			this.$api.setStorage('clubInfo', item)
 			this.$api.navigateTo(`pages/user/order/order-list`)
 		},

+ 4 - 4
store/index.js

@@ -6,11 +6,11 @@ import authorize from '../common/config/authorize.js'
 Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
-		isWxAuthorize: false,
+		isWxAuthorize: false, //是否授权
 		hasLogin: false,
-		userInfo: {},
-		identity: 0,
-		wechatUserInfo: {},
+		userInfo: {}, //登录用户信息
+		identity: 0,   
+		wechatUserInfo: {}, //用户微信相关信息
 		cartNumber: 0,
 		isIphoneX: false,
 		isActivity: false,