Procházet zdrojové kódy

V6.2.4购物车增加失效商品

zhengjinyi před 5 roky
rodič
revize
fcb5eeec4d

+ 5 - 1
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-weight: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_dc2175m9e7.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_1ayob1mwcnv.ttf') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -13,6 +13,10 @@
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 }
+.icon-xiangxia1:before {
+  content: "\e771";
+}
+
 .icon-gou:before {
   content: "\e628";
 }

+ 12 - 0
common/utils/module.js

@@ -0,0 +1,12 @@
+import Vue from 'vue'
+import customA from '@/components/cm-custom/custom-a.vue'
+import customB from '@/components/cm-custom/custom-b.vue'
+import customC from '@/components/cm-custom/custom-c.vue'
+import customD from '@/components/cm-custom/custom-d.vue'
+import customP from '@/components/cm-custom/custom-p.vue'
+
+Vue.component('custom-a',customA)
+Vue.component('custom-b',customB)
+Vue.component('custom-c',customC)
+Vue.component('custom-d',customD)
+Vue.component('custom-p',customP)

+ 0 - 0
components/cm-custom.vue → components/cm-custom/cm-custom.vue


+ 0 - 0
components/cu-custom.vue → components/cm-custom/cu-custom.vue


+ 0 - 0
components/cu-tabbar.vue → components/cm-custom/cu-tabbar.vue


+ 114 - 0
components/cm-custom/custom-a.vue

@@ -0,0 +1,114 @@
+<template name="headerNavbar">
+	<!-- 自定义导航栏 -->
+	<view class='navbar-wrap' :style="{height:CustomBar+'px',paddingTop:StatusBar+'px',background:navbarData.bgColor ? navbarData.bgColor : '#FFFFFF'}"> 
+	  	<view class="navbar-text" 
+			  :style="{color:navbarData.textColor ? navbarData.textColor:'',lineHeight:(CustomBar - StatusBar)+'px;',fontSize:fontSizeSetting+'px;',paddingLeft:navbarData.textLeft ? '' : capsule.height+'px'}" :class="platformClass">
+	    	  {{navbarData.title ? navbarData.title : " "}}
+	  	</view>
+	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 
+			  :style="{top:capsule.top +'px;',left:((screenWidth-capsule.right)+5)+'px;',height:capsule.height+'px;',lineHeight:capsule.height+'px;'}">
+			  <text v-if="navbarData.haveBack" @tap="BackPage" class="iconfont icon-fanhui"></text>
+			  <text v-if="navbarData.haveHome" @tap="_goHome" class="iconfont icon-shouye"></text>
+	  	</view>
+		<view class="navbar-icon" v-if="navbarData.showSearch == 1 ? true : false"
+			  :style="{top:capsule.top+'px;',right:(capsule.width)+'px;',height:capsule.height+'px;',lineHeight:capsule.height+'px;'}">
+			  <text @click.stop="_goSearchPath" class="iconfont icon-iconfonticonfontsousuo1"></text>
+	  	</view>
+	</view>
+</template>
+
+<script>
+	var self;
+	export default{
+		name:'headerNavbar',
+		props:{
+		    navbarData: { // 由父页面传递的数据
+				type: Object
+		    }
+		},
+		data() {
+			return{
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				StatusBar: this.StatusBar,
+				fontSizeSetting:this.fontSizeSetting,
+				screenWidth:this.screenWidth,
+				capsule:this.capsule,
+				platformClass:this.platformClass,
+			}
+		},
+		created() {
+			if (getCurrentPages().length === 1) { // 当只有一个页面时
+			      this.navbarData.haveBack = false;
+			} else {
+			      this.navbarData.haveBack = true;
+			}
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			BackPage: function () {
+				this.$emit('navigateBack')
+		    },
+			_goSearchPath:function () {
+				this.$emit('goSearchPath')
+			},
+			_goHome:function(){
+				uni.switchTab({
+		        	url: '/pages/tabBar/home/home'
+		      	})
+			}
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	.navbar-wrap {
+		 position: fixed;
+		 width: 100%;
+		 top: 0;
+		 z-index: 100000;
+		 box-sizing: border-box;
+		 background: #FFFFFF;
+		 border-bottom: 1px solid #F7F7F7;
+	}
+	.navbar-text {
+		 font-size: 30rpx;
+		 color: #000000;
+		 font-weight: 500;
+	}
+	.navbar-text.center{
+		text-align: center;
+	}
+	.navbar-text.left{
+		text-align: left;
+		padding-left: 45px;
+	}
+	.navbar-icon {
+		 position: fixed;
+		 display: flex;
+		 box-sizing: border-box;
+	}
+	.navbar-icon .iconfont {
+		 display: inline-block;
+		 overflow: hidden;
+		 font-size: 44rpx;
+		 padding-right:40rpx;
+		 margin-top: 1px;
+	}
+	.navbar-icon .icon-iconfonticonfontsousuo1 {
+		color: #000000;
+	}
+	.navbar-icon view {
+		 height: 18px;
+		 border-left: 0.5px solid rgba(0,0,0, 0.3);
+		 margin-top: 6px;
+	}
+	.navbar-loading {
+		 background: #fff;
+		 text-align: center;
+	}
+</style>

+ 122 - 0
components/cm-custom/custom-b.vue

@@ -0,0 +1,122 @@
+<template name="headerNavbar">
+	<!-- 自定义导航栏 -->
+	<view class='navbar-wrap' :style="{height:CustomBar+'px',paddingTop:StatusBar+'px',background:navbarData.bgColor ? navbarData.bgColor : ''}"> 
+	  	<view class="navbar-text" 
+			  :style="{color:navbarData.textColor ? navbarData.textColor:'',lineHeight:(CustomBar - StatusBar)+'px;',fontSize:fontSizeSetting+'px;',paddingLeft:navbarData.textLeft ? '' : capsule.height+'px'}" :class="platformClass">
+	    	  {{navbarData.title ? navbarData.title : " "}}
+	  	</view>
+	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 
+			  :style="{top:capsule.top +'px;',left:((screenWidth-capsule.right)+5)+'px;',height:capsule.height+'px;',lineHeight:capsule.height+'px;'}">
+			  <text v-if="navbarData.haveBack" @tap="BackPage" class="iconfont icon-fanhui"></text>
+			  <text v-if="navbarData.haveHome" @tap="_goHome" class="iconfont icon-shouye"></text>
+	  	</view>
+		<view class="navbar-icon" v-if="navbarData.showSearch == 1 ? true : false"
+			  :style="{top:capsule.top+'px;',right:(capsule.width)+'px;',height:capsule.height+'px;',lineHeight:capsule.height+'px;'}">
+			  <text @click.stop="_goSearchPath" class="iconfont icon-iconfonticonfontsousuo1"></text>
+	  	</view>
+	</view>
+</template>
+
+<script>
+	var self;
+	export default{
+		name:'headerNavbar',
+		props:{
+		    navbarData: { // 由父页面传递的数据
+				type: Object,
+				default: () =>({
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '', // 导航栏 中间的标题
+					haveBack:false,
+					home:false,
+					textLeft:false,
+					bgColor:'',
+					textColor:'#000000'
+				})
+		    }
+		},
+		data() {
+			return{
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				StatusBar: this.StatusBar,
+				fontSizeSetting:this.fontSizeSetting,
+				screenWidth:this.screenWidth,
+				capsule:this.capsule,
+				platformClass:this.platformClass,
+			}
+		},
+		created() {
+			if (getCurrentPages().length === 1) { // 当只有一个页面时
+			      this.navbarData.haveBack = false;
+			} else {
+			      this.navbarData.haveBack = true;
+			}
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			BackPage: function () {
+				this.$emit('navigateBack')
+		    },
+			_goSearchPath:function () {
+				this.$emit('goSearchPath')
+			},
+			_goHome:function(){
+				uni.switchTab({
+		        	url: '/pages/tabBar/home/home'
+		      	})
+			}
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	.navbar-wrap {
+		 position: fixed;
+		 width: 100%;
+		 top: 0;
+		 z-index: 100000;
+		 box-sizing: border-box;
+	}
+	.navbar-text {
+		 font-size: 30rpx;
+		 color: #000000;
+		 font-weight: 500;
+	}
+	.navbar-text.center{
+		text-align: center;
+	}
+	.navbar-text.left{
+		text-align: left;
+		padding-left: 45px;
+	}
+	.navbar-icon {
+		 position: fixed;
+		 display: flex;
+		 box-sizing: border-box;
+	}
+	.navbar-icon .iconfont {
+		 display: inline-block;
+		 overflow: hidden;
+		 font-size: 44rpx;
+		 padding-right:40rpx;
+		 margin-top: 1px;
+	}
+	.navbar-icon .icon-iconfonticonfontsousuo1 {
+		color: #000000;
+	}
+	.navbar-icon view {
+		 height: 18px;
+		 border-left: 0.5px solid rgba(0,0,0, 0.3);
+		 margin-top: 6px;
+	}
+	.navbar-loading {
+		 background: #fff;
+		 text-align: center;
+	}
+</style>

+ 199 - 0
components/cm-custom/custom-c.vue

@@ -0,0 +1,199 @@
+<template name="headerNavbar">
+	<!-- 自定义导航栏 -->
+	<view class='navbar-wrap' :style="{height:navbarHeight+'px',paddingTop:statusBarHeight+'px'}"> 
+	  	<view class="navbar-text" :style="{lineHeight:(navbarHeight - statusBarHeight)+'px;',fontSize:fontSizeSetting+'px;'}" :class="platformClass">
+	    	{{navbarData.title ? navbarData.title : " "}}
+	  	</view>
+	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 
+			  :style="{top:navbarBtn.top + statusBarHeight+'px;',left:(navbarBtn.right)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">
+			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
+	  	</view>
+		<view class="navbar-icon" v-if="navbarData.showSearch == 1 ? true : false"
+			  :style="{top:navbarBtn.top + statusBarHeight+'px;',right:(navbarBtn.width)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">
+			  <text @click.stop="_goSearchPath" class="iconfont icon-iconfonticonfontsousuo1"></text>
+	  	</view>
+	</view>
+</template>
+
+<script>
+	var self;
+	export default{
+		name:'headerNavbar',
+		props:{
+		    navbarData: { // 由父页面传递的数据
+				type: Object
+		    },
+			systeminfo:{
+				type:Object
+			},
+			headerBtnPosi:{
+				type:Object
+			},
+			isShare:{
+				type:Boolean
+			},
+			isDelete:{
+				type:Boolean
+			},
+			isUsertype:{
+				type:Number
+			}
+		},
+		data() {
+			return{
+				haveBack: true,     // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
+			    statusBarHeight: 0, // 状态栏高度
+			    navbarHeight: 0,    // 顶部导航栏高度
+			    navbarBtn: {        // 胶囊位置信息
+			      height: 0,
+			      width: 0,
+			      top: 0,
+			      bottom: 0,
+			      right: 0
+				},
+				platformClass:'',
+				fontSizeSetting:0,
+				
+			}
+		},
+		created() {
+			let statusBarHeight = this.systeminfo.statusBarHeight // 状态栏高度
+			let headerPosi = this.headerBtnPosi // 胶囊位置信息
+			this.fontSizeSetting = this.systeminfo.fontSizeSetting
+			if(this.systeminfo.platform == 'android'){
+				this.platformClass = 'left'
+			}else{
+				this.platformClass = 'center'
+			}
+		    /**
+		     * wx.getMenuButtonBoundingClientRect() 坐标信息以屏幕左上角为原点
+		     * 菜单按键宽度: 87
+		     * 菜单按键高度: 32
+		     * 菜单按键左边界坐标: 278
+		     * 菜单按键上边界坐标: 26
+		     * 菜单按键右边界坐标: 365
+		     * 菜单按键下边界坐标: 58
+		     */
+			let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
+			      height: headerPosi.height,
+			      width: headerPosi.width,
+			      // 胶囊top - 状态栏高度
+			      top: headerPosi.top - statusBarHeight,
+			      // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
+			      bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
+			      // 屏幕宽度 - 胶囊right
+			      right: this.systeminfo.screenWidth - headerPosi.right
+			}
+			let haveBack;
+			if (getCurrentPages().length === 1) { // 当只有一个页面时
+			     haveBack = false;
+			} else {
+			     haveBack = true;
+			}
+		    this.haveBack=haveBack, // 获取是否是通过分享进入的小程序
+		    this.statusBarHeight=statusBarHeight,
+		    this.navbarHeight= headerPosi.bottom + btnPosi.bottom, // 原胶囊bottom + 现胶囊bottom
+		    this.navbarBtn=btnPosi
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			_goBack: function () {
+				if(this.isShare){
+					this._goHome()
+				}else if(this.isDelete){
+					this._goUser()
+				}else{
+					uni.navigateBack({
+			        	delta: 1
+			      	});
+				}
+		    },
+		    _goHome: function () {
+		      	uni.switchTab({
+		        	url: '/pages/tabBar/home/home'
+		      	})
+		    },
+		    _goUser: function () {
+		      	uni.switchTab({
+		        	url: '/pages/tabBar/user/user'
+		      	})
+		    },
+			_goSearchPath:function () {
+				this.$emit('goSearchPath')
+			}
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	.navbar-wrap {
+		 position: fixed;
+		 width: 100%;
+		 top: 0;
+		 z-index: 100000;
+		 box-sizing: border-box;
+		 background: #FFFFFF;
+	}
+	.navbar-text {
+		 font-size: 30rpx;
+		 color: #000000;
+		 font-weight: 500;
+	}
+	.navbar-text.center{
+		text-align: center;
+	}
+	.navbar-text.left{
+		text-align: left;
+		padding-left: 38px;
+	}
+	.navbar-icon {
+		 position: fixed;
+		 display: flex;
+		 box-sizing: border-box;
+	}
+	.navbar-icon .iconfont {
+		 display: inline-block;
+		 overflow: hidden;
+		 font-size: 42rpx;
+		 padding-right:40rpx;
+		 margin-top: 1px;
+	}
+	.navbar-icon .icon-iconfonticonfontsousuo1 {
+		color: #000000;
+	}
+	.navbar-icon view {
+		 height: 18px;
+		 border-left: 0.5px solid rgba(0,0,0, 0.3);
+		 margin-top: 6px;
+	}
+	.navbar-loading {
+		 background: #fff;
+		 text-align: center;
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 162 - 0
components/cm-custom/custom-d.vue

@@ -0,0 +1,162 @@
+<template name="headerNavbar">
+	<!-- 自定义导航栏 -->
+	<view class='navbar-wrap' :style="{height:navbarHeight+'px',paddingTop:statusBarHeight+'px'}"> 
+	  	<view class="navbar-text" :style="{lineHeight:(navbarHeight - statusBarHeight)+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	{{navbarData.title ? navbarData.title : " "}}
+	  	</view>
+	  	<view class="navbar-icon" v-if="navbarData.showCapsule ? navbarData.showCapsule : true" 
+			  :style="{width:headerBtnPosi.width+'px;',lineHeight:(navbarBtn.height)+'px',top:navbarBtn.top + statusBarHeight+'px;',left:navbarBtn.right+'px;',height:(navbarBtn.height)+'px;'}">
+			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-shangyibu" :style="{width:headerBtnPosi.width/2+'px',height:navbarBtn.height+'px'}"></text>
+	      	  <text  v-if='haveBack' class="iconfont icon-vertical_line" :style="{borderColor:navbarData.borderColor ? navbarData.borderColor : 'rgba(0,0,0,0.4)'}"></text>
+			  <text @click="_goHome" class="iconfont icon-shouye" :style="{width:headerBtnPosi.width/2+'px',height:navbarBtn.height+'px'}"></text>
+	  	</view>
+	</view>
+</template>
+
+<script>
+	var self;
+	export default{
+		name:'headerNavbar',
+		props:{
+		    navbarData: { // 由父页面传递的数据
+				type: Object
+		    },
+			systeminfo:{
+				type:Object
+			},
+			headerBtnPosi:{
+				type:Object
+			},
+			page:{
+				type:Number
+			}
+		},
+		data() {
+			return{
+				haveBack: true, // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
+			    statusBarHeight: 0, // 状态栏高度
+			    navbarHeight: 0, // 顶部导航栏高度
+			    navbarBtn: { // 胶囊位置信息
+			      height: 0,
+			      width: 0,
+			      top: 0,
+			      bottom: 0,
+			      right: 0
+				},
+				platform:'',
+				fontSizeSetting:0,
+				screenWidth:0
+			}
+		},
+		created() {
+			this.fontSizeSetting = this.systeminfo.fontSizeSetting
+			let statusBarHeight = this.systeminfo.statusBarHeight // 状态栏高度
+			let headerPosi = this.headerBtnPosi // 胶囊位置信息
+		    /**
+		     * wx.getMenuButtonBoundingClientRect() 坐标信息以屏幕左上角为原点
+		     * 菜单按键宽度: 87
+		     * 菜单按键高度: 32
+		     * 菜单按键左边界坐标: 278
+		     * 菜单按键上边界坐标: 26
+		     * 菜单按键右边界坐标: 365
+		     * 菜单按键下边界坐标: 58
+		     */
+			let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
+			      height: headerPosi.height,
+			      width: headerPosi.width,
+			      // 胶囊top - 状态栏高度
+			      top: headerPosi.top - statusBarHeight,
+			      // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
+			      bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
+			      // 屏幕宽度 - 胶囊right
+			      right: this.systeminfo.screenWidth - headerPosi.right
+			}
+			let haveBack;
+			if (getCurrentPages().length === 1) { // 当只有一个页面时
+			     haveBack = false;
+			} else {
+			     haveBack = true;
+			}
+		    this.haveBack=haveBack, // 获取是否是通过分享进入的小程序
+		    this.statusBarHeight=statusBarHeight,
+		    this.navbarHeight= headerPosi.bottom + btnPosi.bottom, // 原胶囊bottom + 现胶囊bottom
+		    this.navbarBtn=btnPosi
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			_goBack: function () {
+		      	uni.navigateBack({
+		        	delta: this.page
+		      	});
+		    },
+		    _goHome: function () {
+		      	uni.switchTab({
+		        	url: '/pages/tabBar/home/home'
+		      	})
+		    }
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	.navbar-wrap {
+		 position: fixed;
+		 width: 100%;
+		 top: 0;
+		 z-index: 9999;
+		 box-sizing: border-box;
+		 background: #FFFFFF;
+		 border-bottom: 1px solid #F8F8F8;
+	}
+	.navbar-text {
+		 text-align: center;
+		 color: #000000;
+		 font-weight: 500;
+	}
+	.navbar-icon {
+		 position: fixed;
+		 display: flex;
+		 border-radius: 64rpx;
+		 border: 0.5px solid rgba(0,0,0, 0.2);
+		 box-sizing: border-box;
+	}
+	.navbar-icon .iconfont {
+		 text-align: center;
+		 display: inline-block;
+		 overflow: hidden;
+		 margin-bottom: 1px;
+	}
+	.navbar-icon .icon-vertical_line {
+		color: #999999;
+	}
+	.navbar-loading {
+		 background: #fff;
+		 text-align: center;
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 194 - 0
components/cm-custom/custom-p.vue

@@ -0,0 +1,194 @@
+<template name="headerNavbar">
+	<!-- 自定义导航栏 -->
+	<view class='navbar-wrap' :class="[headerColor? 'bg-color' : 'no-color']" :style="{height:navbarHeight+'px',paddingTop:statusBarHeight+'px'}"> 
+	  	<view class="navbar-text" :style="{lineHeight:(navbarHeight - statusBarHeight)+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	{{navbarData.title ? navbarData.title : " "}}
+	  	</view>
+	  	<view class="navbar-icon" v-if="navbarData.showCapsule ? navbarData.showCapsule : true" 
+			  :style="{top:navbarBtn.top + statusBarHeight+'px;',lineHeight:navbarBtn.height+'px;',left:(navbarBtn.right+5)+'px;',width:navbarBtn.height+'px;',height:navbarBtn.height+'px;'}">
+			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
+			  <text v-else  @click="_goHome" class="iconfont icon-shouye"></text>
+	  	</view>
+	</view>
+</template>
+
+<script>
+	var self;
+	export default{
+		name:'headerNavbar',
+		props:{
+		    navbarData: { // 由父页面传递的数据
+				type: Object
+		    },
+			systeminfo:{
+				type:Object
+			},
+			headerBtnPosi:{
+				type:Object
+			},
+			page:{
+				type:Number
+			},
+			headerColor:{
+				type:Boolean
+			},
+			headerTitle:{
+				type:String
+			},
+			type:{
+				type:String
+			},
+		},
+		data() {
+			return{
+				headerType:'',
+				haveBack: true, // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
+			    statusBarHeight: 0, // 状态栏高度
+			    navbarHeight: 0, // 顶部导航栏高度,
+			    navbarBtn: { // 胶囊位置信息
+			      height: 0,
+			      width: 0,
+			      top: 0,
+			      bottom: 0,
+			      right: 0
+				},
+				platform:'',
+				fontSizeSetting:0
+			}
+		},
+		created() {
+			this.headerType = this.type
+			this.fontSizeSetting = this.systeminfo.fontSizeSetting
+			let statusBarHeight = this.systeminfo.statusBarHeight // 状态栏高度
+			let headerPosi = this.headerBtnPosi // 胶囊位置信息
+		    /**
+		     * wx.getMenuButtonBoundingClientRect() 坐标信息以屏幕左上角为原点
+		     * 菜单按键宽度: 87
+		     * 菜单按键高度: 32
+		     * 菜单按键左边界坐标: 278
+		     * 菜单按键上边界坐标: 26
+		     * 菜单按键右边界坐标: 365
+		     * 菜单按键下边界坐标: 58
+		     */
+			let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
+			      height: headerPosi.height,
+			      width: headerPosi.width,
+			      // 胶囊top - 状态栏高度
+			      top: headerPosi.top - statusBarHeight,
+			      // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
+			      bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
+			      // 屏幕宽度 - 胶囊right
+			      right: this.systeminfo.screenWidth - headerPosi.right
+			}
+			let haveBack;
+			if (getCurrentPages().length === 1) { // 当只有一个页面时
+			     haveBack = false;
+			} else {
+			     haveBack = true;
+			}
+		    this.haveBack=haveBack, // 获取是否是通过分享进入的小程序
+		    this.statusBarHeight=statusBarHeight,
+		    this.navbarHeight= headerPosi.bottom + btnPosi.bottom, // 原胶囊bottom + 现胶囊bottom
+			this.$parent.navbarHeight = this.navbarHeight
+			this.$parent.statusBarHeight = this.statusBarHeight
+			// console.log(this.navbarHeight);
+		    this.navbarBtn=btnPosi
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			_goBack: function () {
+		      	uni.navigateBack({
+		        	delta: this.page
+		      	});
+		    },
+		    _goHome: function () {
+		      	uni.switchTab({
+		        	url: '/pages/tabBar/home/home'
+		      	})
+		    }
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	.navbar-wrap {
+		 position: fixed;
+		 width: 100%;
+		 top: 0;
+		 z-index: 100000;
+		 box-sizing: border-box;
+		 &.bg-color{
+			animation: showColor 0.3s ease-in-out both;
+		 }
+		 &.no-color{
+		    animation: hideColor 0.3s ease-in-out both;
+		 }
+	}
+	.navbar-text {
+		 text-align: center;
+		 color: #000000;
+		 font-weight: 500;
+	}
+	.navbar-icon {
+		 position: fixed;
+		 display: flex;
+		 border-radius: 50%;
+		 text-align: center;
+		 background: rgba(255,255,255,0.2);
+		 border: 1px solid rgba(0,0,0, 0.1);
+		 box-sizing: border-box;
+	}
+	.navbar-icon .iconfont {
+		 height: 100%;
+		 width: 100%;
+		 font-size: 38rpx;
+		 font-weight: bold;
+		 display: inline-block;
+		 overflow: hidden;
+	}
+	.navbar-icon view {
+		 height: 18px;
+		 border-left: 0.5px solid rgba(0,0,0, 0.3);
+		 margin-top: 6px;
+	}
+	.navbar-loading {
+		 background: #fff;
+		 text-align: center;
+	}
+	@keyframes showColor {
+		0% {background: rgba(255,255,255,0);}
+		50% {background: rgba(255,255,255,0.5);}
+		100% {background: rgba(255,255,255,1);}
+	}
+	@keyframes hideColor {
+		0% {background: rgba(255,255,255,1);}
+		50% {background: rgba(255,255,255,0.5);}
+		100% {background: rgba(255,255,255,0);}
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 0 - 0
components/seller/category.vue → components/cm-module/cm-seller/category.vue


+ 0 - 0
components/seller/home.vue → components/cm-module/cm-seller/home.vue


+ 0 - 0
components/seller/user.vue → components/cm-module/cm-seller/user.vue


+ 82 - 14
components/cm-module/creatOrder/freight.vue

@@ -1,14 +1,14 @@
 <template name="freight">
-	<view class="freight-template">
+	<view class="freight-template" @click.stop="discard">
 		 <!-- 运费信息 -->
 		<view class="invoice-freight">
-			<view class="freight-left">
-				运费
-				<!-- <text class="iconfont icon-yunfeishuoming" @click="showTip"></text> -->
-			</view>
-			<view class="freight-right">
-				<text>{{freightText}}</text>
-				<text class="text" v-if="freightData.freePostFlag == 1">¥{{orderPriceToFixed(freightMoney)}}</text>
+			<view class="freight-left">运费<text class="tips" v-if="freightData.freePostFlag == 1">运费可选择到付哟~</text></view>
+			<view class="freight-right" >
+				<view class="freight-text">{{freightText}}</view>
+				<view class="select" v-if="freightData.freePostFlag == 1"  @click.stop="selectFreight">
+					<text class="select-text">{{orderPriceToFixed(freightMoney)}}</text>
+					<text class="iconfont icon-xiayibu"></text>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -24,8 +24,13 @@
 		},
 		data() {
 			return{
+				infoData:'',
 				freightText:'',
-				freightMoney:''
+				freightMoney:'',
+				isShowOption:false,
+				optionList:['到付'],
+				freePostFlag:'',
+				
 			}
 		},
 		created(){
@@ -36,6 +41,7 @@
 		},
 		methods:{
 			initData(res) {
+				this.infoData = res;
 				switch(res.freePostFlag){
 					case 0:
 						this.freightText = '包邮'
@@ -44,6 +50,7 @@
 					case 1:
 						this.freightText = ''
 						this.freightMoney = res.freight
+						this.optionList.unshift(this.orderPriceToFixed(this.freightMoney))
 						break
 					case -1:
 						this.freightText = '到付'
@@ -51,11 +58,41 @@
 						break
 				}
 			},
-			orderPriceToFixed (num){
+			selectFreight (){
+				let self = this,value;
+				uni.showActionSheet({
+				    itemList: self.optionList,
+				    success: function (res) {
+						switch(res.tapIndex){
+							case 0:
+								self.freightMoney = self.infoData.freight
+								self.freePostFlag = 1
+								break
+							case 1:
+								self.freePostFlag = -1
+								self.freightMoney ='到付'
+								break
+						}
+						self.$emit('confirmFreight',self.freePostFlag);
+				    },
+				    fail: function (res) {
+				        console.log(res.errMsg);
+				    }
+				});
+			},
+			orderPriceToFixed (value){
 				let price ='';
-				price = parseInt(num).toFixed(2);
+				if(value == '到付'){
+					price = value
+				}else{
+					price ='¥'+parseInt(value).toFixed(2)
+				}
 				return price
 			},
+			discard(){
+				this.isShowOption = false
+				this.selectClass = ''
+			},
 			showTip(){
 				this.$emit('showFreightAlert');
 			},
@@ -82,6 +119,12 @@
 			font-weight: bold;
 			.freight-left{
 				float: left;
+				.tips{
+					font-size: $font-size-24;
+					color: $color-system;
+					font-weight: normal;
+					margin-left: 20rpx;
+				}
 				.icon-yunfeishuoming{
 					height: 100%;
 					padding:15rpx;
@@ -92,10 +135,35 @@
 			.freight-right{
 				float: right;
 				color: #2A81FF;
-				.text{
-					line-height: 88rpx;
-					color: #ff0000;
+				position: relative;
+				.freight-text{
+					float: left;
+				}
+				.select{
+					float: right;
+					height: 60rpx;
+					padding: 0 20rpx;
+					margin-top: 14rpx;
+					line-height: 60rpx;
+					color: #2A81FF;
 					font-weight: normal;
+					position: relative;
+					.select-text{
+						display: inline-block;
+						float: left;
+						margin-right: 30rpx;
+					}
+					.iconfont{
+						width: 60rpx;
+						height: 60rpx;
+						line-height: 60rpx;
+						text-align: right;
+						position: absolute;
+						right: 0;
+						top: 0;
+						font-size: $font-size-28;
+						color: #2A81FF;
+					}
 				}
 			}
 		}

+ 1 - 1
components/cm-module/home/cm-custom.vue

@@ -69,7 +69,6 @@
 </script>
 
 <style lang="scss">
-	
 	.navbar-wrap {
 		 position: fixed;
 		 width: 100%;
@@ -78,6 +77,7 @@
 		 box-sizing: border-box;
 		 background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/05/%E8%83%8C%E6%99%AF1%402x.png);
 		 background-size: cover;
+		 border-bottom:none;
 	}
 	.navbar-text {
 		 font-size: 30rpx;

+ 159 - 0
components/cm-module/modelAlert/upgradeAlert.vue

@@ -0,0 +1,159 @@
+<template name="alert">
+	<view class="alert spec" :class="specClass">
+		<!-- 运费弹窗说明 -->
+		<view class="freight-alert"  @click.stop="hideFpgradeAlert">
+			<view class="content clearfix">
+				<view class="title"><text class="iconfont icon-iconfontguanbi" @click.stop="hideFpgradeAlert"></text></view>
+				<view class="text-content">
+					<view class="text-h1">您目前为<text class="col">普通机构用户</text></view>
+					<view class="text-h1">可以升级<text class="col">会员机构</text>享受更多的服务</view>
+				</view>
+				<view class="text-btn">
+					<view class="btn" @click.stop="GoApply">去升级</view>
+					<view class="btn-none" @click.stop="unBindUpgrade">暂不升级</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { cancelPrompt } from "@/api/use.js"
+	export default{
+		name:'alert',
+		props:{
+			clubStatus:{
+				type:Number
+			}
+		},
+		data() {
+			return{
+				status:""
+			}
+		},
+		created() {
+			this.status = this.clubStatus
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			hideFpgradeAlert(){
+				this.$parent.isUpgradeAlert = false
+			},
+			GoApply(){
+				this.$api.navigateTo(`/pages/login/apply?clubStatus=${this.status}`);
+			},
+			unBindUpgrade(){
+				this.$emit('unBindUpgrade')
+			}
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	/*弹窗*/
+	.model-warp.none{
+		display: none;
+	}
+	.model-warp.show{
+		display: block;
+	}
+	.freight-alert{
+		width: 100%;
+		height: 100%;
+		background: rgba(0,0,0,.5);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 8888;
+		transition: all 0.4s;
+		&.none{
+			display: none;			
+		}
+		&.show{
+			display: block;
+		}
+		.content{
+			width: 492rpx;
+			height: 710rpx;
+			position: absolute;
+			background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/05/%E7%BB%84%201422%402x.png) no-repeat;
+			background-size: contain;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			top: 0;
+			margin: auto;
+			padding:0 24rpx 20rpx 24rpx;
+			border-radius: 12rpx;
+			.title{
+				width: 100%;
+				height: 68rpx;
+				line-height: 68rpx;
+				text-align: center;
+				position: relative;
+				.icon-iconfontguanbi{
+					width: 50rpx;
+					height: 50rpx;
+					text-align: center;
+					line-height: 50rpx;
+					border-radius: 50%;
+					border: 1px solid #FFFFFF;
+					position: absolute;
+					right: -20rpx;
+					top: 0;
+					font-size: $font-size-32;
+					color: #FFFFFF;
+				}
+			}
+			.text-content{
+				width: 100%;
+				height: auto;
+				margin-top: 280rpx;
+				.text-h1{
+					line-height: 60rpx;
+					font-size: $font-size-28;
+					color: $text-color;
+					text-align: justify;
+					.col{
+						color: $color-system;
+						margin: 0 6rpx;
+					}
+				}
+			}
+			.text-btn{
+				width: 100%;
+				height: auto;
+				margin-top: 40rpx;
+				.btn{
+					width: 100%;
+					height: 88rpx;
+					float: left;
+					background: $btn-confirm;
+					line-height: 88rpx;
+					font-size: $font-size-28;
+					text-align: center;
+					color: #FFFFFF;
+					border-radius: 14rpx;
+					padding: 0;
+				}
+				.btn-none{
+					width: 100%;
+					height: 88rpx;
+					float: left;
+					line-height: 88rpx;
+					font-size: $font-size-28;
+					text-align: center;
+					color: #666666;
+					padding: 0;
+					margin-top: 20rpx;
+				}
+			}
+		}
+	}
+	
+</style>

+ 26 - 0
components/cm-module/orderDetails/orderButton.vue

@@ -136,6 +136,32 @@
 			.btn-color{
 				background: $btn-confirm;
 				margin: 22rpx 0 22rpx 22rpx;
+				.tips{
+					width: 160rpx;
+					height: 34rpx;
+					padding: 10rpx 10rpx;
+					background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
+					box-shadow:0px 2px 4px 0px rgba(0,0,0,0.2);
+					border-radius: 8rpx;
+					position: absolute;
+					color: #FFFFFF;
+					line-height: 34rpx;
+					font-size: $font-size-24;
+					text-align: left;
+					right: 24rpx;
+					top: -45rpx;
+					&:before{
+						content: "";
+						width: 25rpx;
+						height: 25rpx;
+						background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
+						position: absolute;
+						bottom: -8rpx;
+						right: 30rpx;
+						z-index: -1;
+						transform:rotate(45deg);
+					}
+				}
 			}
 			.btn-cancel{
 				background:#FFFFFF;

+ 26 - 0
components/cm-module/orderDetails/sellerDetaileButton.vue

@@ -133,6 +133,32 @@
 			.btn-color{
 				background: $btn-confirm;
 				margin: 22rpx 0 22rpx 22rpx;
+				.tips{
+					width: 160rpx;
+					height: 34rpx;
+					padding: 10rpx 10rpx;
+					background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
+					box-shadow:0px 2px 4px 0px rgba(0,0,0,0.2);
+					border-radius: 8rpx;
+					position: absolute;
+					color: #FFFFFF;
+					line-height: 34rpx;
+					font-size: $font-size-24;
+					text-align: left;
+					right: 24rpx;
+					top: -45rpx;
+					&:before{
+						content: "";
+						width: 25rpx;
+						height: 25rpx;
+						background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
+						position: absolute;
+						bottom: -8rpx;
+						right: 30rpx;
+						z-index: -1;
+						transform:rotate(45deg);
+					}
+				}
 			}
 			.btn-cancel{
 				background:#FFFFFF;

+ 93 - 92
components/cm-module/productDetails/recommend.vue

@@ -3,16 +3,21 @@
 	<view class="recommend clearfix">
 		<view class="recommend-empty" v-if="isEmpty">暂无相关推荐商品</view>
 		<view class="recommend-list" v-else>
-			<scroll-view scroll-y="true" :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower">
-				<view class="row-list" v-for="(item, index) in recommendList" :key="index" @click.stop="navToDetailPage(item.productID)">
-					<view class="list-image"><image :src="item.mainImage" mode=""></image></view>
-					<view class="list-name">{{item.name}}</view>
-				</view>
-				<!--加载loadding-->
-				<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-				<tui-nomore :visible="!pullUpOn" bgcolor="#FFFFFF" :text='nomoreText'></tui-nomore>
-				<!--加载loadding-->
-			</scroll-view>		
+			<swiper class="tui-banner-swiper" :autoplay="false" :interval="5000" :duration="500" :circular="true" @change="swiperChange">
+				<swiper-item v-for="(item,index) in recommendList" :key="index">
+					<view class="row-list" v-for="(pros, idx) in item" :key="idx" @click.stop="navToDetailPage(pros.productID)">
+						<view class="list-image"><image :src="pros.mainImage" mode=""></image></view>
+						<view class="list-name">{{pros.name}}</view>
+					</view>
+				</swiper-item>
+			</swiper>
+			<view class="swiper__recommenddots-box" v-if="recommendList.length > 1">
+				<view v-for="(item,idx) in recommendList" 
+					  :key="idx" 
+					  :class="[idx===current?'swiper__dots-long':'none']" 
+					  :data-index="current" class="swiper__dots-item">
+				</view>	  
+			</view>
 		</view>
 	</view>
 </template>
@@ -38,44 +43,27 @@
 		},
 		data() {
 			return{
+				current:0,
 				recommendList:[],
 				isEmpty:false,
-				pageNum:1,
-				pageSize:10,
-				hasNextPage:false,
-				loadding: false,
-				pullUpOn: true,
-				pullFlag: true,
-				nomoreText: '上拉显示更多',
+				pageSize:4,
 				productID:'',
-				scrollHeight: '',
 			}
 		},
 		created() {
-			// console.log(this.queryProductid)
 			this.productID = this.queryProductid
 			this.infoRecommend(this.queryProductid)
-			this.setScrollHeight();		
 		},
 		methods:{
 			infoRecommend(id){
-				queryRelevant({productID:id,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+				queryRelevant({productID:id}).then(response =>{
 					// console.log(response)
-					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
+					if( response.data.length > 0){
 						this.isEmpty = false
-						this.hasNextPage = responseData.hasNextPage
-						this.recommendList =responseData.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 = '已至底部'
+						for (var i = 0, j = response.data.length; i < j; i += this.pageSize) {
+							this.recommendList.push(response.data.slice(i, i + this.pageSize));
 						}
+						console.log(this.recommendList)
 					}else{
 						this.isEmpty = true
 					}
@@ -83,39 +71,10 @@
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			getOnReachBottomData(){
-				this.pageNum+=1
-				queryRelevant({productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
-					let responseData = response.data
-					if(responseData.results&&responseData.results.length > 0){
-						this.hasNextPage = responseData.hasNextPage
-						this.recommendList = this.recommendList.concat(responseData.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)
-				})
-			},
-			scrolltolower() {
-				if(this.hasNextPage){
-					this.loadding = true
-					this.pullUpOn = true
-					this.getOnReachBottomData(this.currentTab);
-				}	
-			},
-			setScrollHeight() {
-				const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
-				this.windowHeight = windowHeight - 1;
-				this.scrollHeight = windowHeight - 1;
+			//轮播图切换修改背景色
+			swiperChange(e) {
+				const index = e.detail.current;
+				this.current = index;
 			},
 			navToDetailPage(id) {//跳转商品详情页
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
@@ -138,38 +97,80 @@
 		text-align: center;
 	}
 	.recommend-list{
-		width: 702rpx;
+		width: 100%;
 		height: auto;
-		padding: 24rpx;
-		.row-list{
-			width: 340rpx;
-			height: auto;
-			float: left;
-			margin-right: 20rpx;
-			margin-bottom: 30rpx;
-			&:nth-child(2n){
-				margin-right: 0;
-			}
-			.list-image{
-				width: 100%;
-				height: 340rpx;
-				border-radius: 14rpx;
-				image{
+		position: relative;
+		padding-bottom: 20rpx;
+		.tui-banner-swiper {
+			width: 702rpx;
+			margin: 0 auto;
+			background: #F7F7F7;
+			padding: 20rpx 24rpx;
+			height: 900rpx;
+			overflow: hidden;
+			transform: translateY(0);
+			.row-list{
+				width: 340rpx;
+				height: auto;
+				float: left;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+				border-radius: 20rpx;
+				background: #FFFFFF;
+				&:nth-child(2n){
+					margin-right: 0;
+				}
+				.list-image{
 					width: 100%;
 					height: 340rpx;
-					border-radius: 14rpx;
+					border-radius: 20rpx 20rpx 0 0;
+					image{
+						width: 100%;
+						height: 340rpx;
+						border-radius: 20rpx 20rpx 0 0;
+					}
+				}	
+				.list-name{
+					font-size: $font-size-28;
+					color: $text-color;
+					line-height:88rpx;
+					padding: 0 10rpx;
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
 				}
-			}	
-			.list-name{
-				font-size: $font-size-28;
-				color: $text-color;
-				line-height: 44rpx;
-				overflow: hidden;
-				white-space: nowrap;
-				text-overflow: ellipsis;
 			}
 		}
 	}
+	.swiper__recommenddots-box{
+		position: absolute;
+		bottom: -20rpx;
+		left: 0;
+		right: 0;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 60rpx;
+		background: #FFFFFF;
+		.swiper__dots-item{
+			width: 8rpx;
+			height: 8rpx;
+			border-radius: 100%;
+			margin-left: 6px;
+			background-color:rgba(0,0,0,.3);
+		}
+		.swiper__dots-long{
+			width: 32rpx;
+			height: 8rpx;
+			border-radius: 4rpx;
+			background-color: #000;
+			transition: all 0.4s;
+		}
+	}
 }
 </style>
 

+ 3 - 3
main.js

@@ -1,12 +1,12 @@
 import Vue from 'vue'
 import store from './store'
 import App from './App'
-
 import * as Api from '@/common/config/caimeiApi.js'
 import * as Regs from '@/common/config/common.js'
+// import '@/common/utils/module.js'
 import Json from './json' //本地数据
-import cuCustom from './components/cu-custom.vue'
-import cmCustom from './components/cm-custom.vue'
+import cuCustom from './components/cm-custom/cu-custom.vue'
+import cmCustom from './components/cm-custom/cm-custom.vue'
 Vue.component('cu-custom',cuCustom)
 Vue.component('cm-custom',cmCustom)
 /**

+ 1242 - 1016
pages/goods/cart.vue

@@ -1,1017 +1,1243 @@
-<template>
-	<view class="container cart clearfix" v-if="hasLogin" :style="{paddingTop:CustomBar+'px'}"> 	
-		<headerNavbar :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :page='1'></headerNavbar>
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
-		<view class="container-cart-main tui-skeleton">
-			<view v-if="!isEmpty" class="container-cart">
-				<scroll-view class="cart-content"  scroll-y  @scrolltolower="toLower">
-					<view class="goods-list">
-						<view v-for="(item, index) in goodsList" :key="index" class="goods-item">
-							<view class="shoptitle">
-								<!--选择商店的全部商品"-->
-								<view class="checkbox-box" @click.stop="checkShop(item)">
-									<button class="checkbox iconfont" 
-											:class="[item.checked ?'icon-gouxuanl':'icon-weigouxuan']" 									
-											:disabled="item.isDisabled && !isshowDelbtn">
-									</button>
-								</view>
-								<view class="text">{{item.name}}</view> 
-							</view>
-							<view class="productlist">
-								<view 	class="goods-pros" v-for="(pros,idx) in item.productsList" :key="idx" >
-									<view class="goods-pros-t">
-										<!--选择商品-->
-										<view class="checkbox-box" @click.stop="ischeck(item,pros,idx)" :class="[pros.validFlag == '3' && !isshowDelbtn ?'disabled' : '']">
-											<button class="checkbox iconfont" 
-													:disabled="pros.validFlag == '3' && !isshowDelbtn"
-													:class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
-											</button>
-										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
-										<view class="pros-product">
-											<view class="producttitle" @click.stop="navToListPage(pros.productID)"	>
-												<text v-if="pros.validFlag == '3'" class="no-text">商品已下架</text>{{pros.name}}
-											</view>
-											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
-											<view class="productprice">
-												<!--使用过滤器对总价改变-->
-												<view class="price" :class="[pros.validFlag == '3' ?'disabled' : '']">
-													<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>
-													{{pros.retailPrice?pros.retailPrice.toFixed(2):''}}
-												</view>
-												<view class="count" v-if="pros.validFlag == '2'"  :class="[isshowDelbtn ? 'none':'show']">
-													<view class="number-box">
-														<view  class="iconfont icon-jianhao" :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountSub(item,pros)"></view>
-														<input class="btn-input" type="number" maxlength='4' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
-														<view  class="iconfont icon-jiahao"  :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountAdd(item,pros)"></view>
-													</view>
-												</view>
-											</view>
-										</view>	
-									</view>
-								</view>
-							</view>	
-							<view class="goods-pros-b" :class="[isshowDelbtn ? 'none':'show']" >
-								<view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice.toFixed(2)}}</text></view>
-							</view>
-						</view>
-					</view>	
-					<!--加载loadding-->
-					<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-					<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text='nomoreText'></tui-nomore>
-					<!--加载loadding-->
-				</scroll-view>
-				<!-- 脚部菜单 -->
-				<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
-					<view class="footer-le">
-						<view class="foot-check checkbox-box" @tap.stop="checkAll()">
-							<button class="checkbox iconfont" :class="[isCheckAll?'icon-gouxuan':'icon-weigouxuan']"></button> 
-							<view class="text">全选</view>
-						</view>
-						<view class="foot-check-delbtn">
-							<button class="delBtn" @tap.stop="showDelManager">删除</button>
-						</view>
-						<view class="sum">总价:<text class="money-sign">¥</text><text class="money">{{allPrice.toFixed(2)}}</text></view>
-					</view>
-					<view v-if="!isshowDelbtn" class="footer-ri" >
-						<view class="btn" @tap="toConfirmation">去结算({{allCount}})</view>
-					</view>
-					<view v-else class="footer-del">
-						<view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
-						<view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
-					</view>
-				</view>
-			</view>
-			<view v-if="isEmpty" class="cart-content empty">
-				<view  class="empty-container">
-					<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
-					<text class="error-text">购物车空空如也,快去商城逛逛吧~</text>
-					<view class="login-btn"  @click="goIndex">去商城</view>
-				</view>
-			</view>
-		</view>
-		<!-- 透明模态层 -->
-		<modal-layer v-if='modallayer'></modal-layer>
-	</view>
-</template>
-<script>
-	import authorize from '@/common/config/authorize.js'
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
-	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
-	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import headerNavbar from "@/components/cm-module/headerNavbar/headerNavbar.vue" //顶部自定义胶囊'
-	import modalLayer from "@/components/modal-layer"
-	import { mapState,mapMutations } from 'vuex';
-	import { queryShoppingCartList,shoppingCartUpdate,shoppingCartDelete } from "@/api/cart.js" 
-	
-	export default{
-		components:{
-			headerNavbar,
-			tuiSkeleton,
-			tuiLoadmore,
-			tuiNomore,
-			modalLayer
-		},
-		data(){
-			return{
-				nvabarData: {//顶部自定义导航
-					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '购物车', // 导航栏 中间的标题
-				},
-				headerBtnPosi:	this.setHeaderBtnPosi(),//获取设备顶部胶囊高度
-				systeminfo:this.setSysteminfo(),		 //获取设备信息
-				CustomBar:this.CustomBar,// 顶部导航栏高度
-				isIphoneX:this.$store.state.isIphoneX,
-				pathType:'',
-				pathProductID:'',
-				userID:'',
-				alertType:'',
-				isStock:'',
-				goodsList:[],	//购物车的商品
-				delGoodsList:'',//要删除的商品
-				setGoodData:'', //确认订单的商品
-				isCheckAll:false,//是否全选
-				allPrice:0,//所有价格
-				allCount:0,//被选中的产品数量
-				isNnder:true,
-				isModallayer:false,
-				skeletonShow:true,
-				isshowDelbtn:false,
-				isDisabled: false, // 供应商/店铺全选是否禁用状态
-				isEmpty:false,//显示空购物车
-				scrollHeight: 'auto',
-				nomoreText: '上拉显示更多',
-				hasNextPage: false,
-				loadding: false,
-				pullUpOn: true,
-				pullFlag: true,
-				pageSize: 10,
-				pageNum: 1,
-			}
-		},
-		onLoad(){
-			this.pathType = this.$getStorage("cartPathType");
-			this.pathProductID = this.$getStorage("cartPathId");
-			if(this.pathType){
-				this.nvabarData.haveBack = true
-			}else{
-				this.nvabarData.haveBack = false
-			}
-			this.setScrollHeight();
-		},
-		computed: {
-			...mapState(['hasLogin','userInfo'])
-		},
-		filters:{//单件商品的价格 × 数量
-		    totalprice(val,count){
-		        return (val * count).toFixed(2)
-		    }
-		},	
-		methods:{
-			initData(){
-				this.isModallayer = false //遮罩层 防止多次点击
-				this.skeletonShow = true //预加载圆圈
-				this.isCheckAll=false//是否全选
-				this.$api.getStorage().then((resolve) => {
-					this.userID = resolve.userID;
-					this.initGetCartGoodsList();
-				})	
-			},
-			initLogin(){
-				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-					if(wxResponse == 1){
-						this.$api.redirectTo('/pages/login/login?type=4')
-					}else{
-						this.$api.navigateTo('/pages/authorization/authorization?type=0')
-					}
-				})	
-			},
-			setScrollHeight() {
-				// 窗口高度-footer高度
-				const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
-				setTimeout(()=> {
-					const query = uni.createSelectorQuery().in(this);
-					query.selectAll('.footer').boundingClientRect();
-					query.exec(res => {
-						this.windowHeight = windowHeight;
-						if(res[0][0]) {
-							this.scrollHeight = windowHeight - res[0][0].height;
-						}
-					})
-				}, 500)
-			},
-			setHeaderBtnPosi(){
-				// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
-				return headerBtnPosi
-			},
-			setSysteminfo(){
-				let systeminfo;
-				uni.getSystemInfo({ // 获取设备信息
-					success: (res) => {
-						systeminfo = res
-					},
-				})
-				return systeminfo
-			},
-			initGetCartGoodsList(){//初始化购物车 index:1
-				let params = {userID:this.userID,pageNum:1,pageSize:this.pageSize}
-				queryShoppingCartList(params).then(response =>{
-					this.skeletonShow = false
-					this.$store.commit('updateAllNum',response.data.cartQuantity)
-					const resultsData = response.data.pageDate;	
-					if(resultsData.results&&resultsData.results.length > 0){
-						this.isEmpty =false
-						this.hasNextPage = resultsData.hasNextPage;
-						this.goodsList = resultsData.results;
-						this.goodsList.forEach((item,index) => {
-							let productsListLength = item.productsList.length,
-								invalidLength = 0;
-							item.productsList.forEach(pros => {
-								pros.shopID = item.shopID;
-								if(pros.validFlag == '3' ) {invalidLength++;}
-							})
-							item.isDisabled = invalidLength === productsListLength;
-						})
-						this.pullFlag = false;
-						setTimeout(()=>{this.pullFlag = true;},500)
-						if(this.hasNextPage){
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						}else{
-							if(this.goodsList.length < 4){
-								this.pullUpOn = true
-							}else{
-								this.pullUpOn = false
-								this.nomoreText = '已至底部'
-							}
-						}
-					} else {
-						this.goodsList = [];
-						this.isEmpty =true
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			},		
-			getOnReachBottomData(){//上拉加载
-				this.pageNum+=1
-				let params = {userID:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
-				queryShoppingCartList(params).then(response =>{
-					let resultsData = response.data.pageDate
-					this.hasNextPage = resultsData.hasNextPage;
-					this.goodsList = this.goodsList.concat(resultsData.results)
-					this.pullFlag = false;// 防上拉暴滑
-					setTimeout(()=>{this.pullFlag = true;},500)
-					if(this.hasNextPage){
-						this.pullUpOn = false
-						this.nomoreText = '上拉显示更多'
-					}else{
-						this.loadding = false
-						this.pullUpOn = false
-						this.nomoreText = '已至底部'
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			},
-			ischeck(item,pro){//为未选中的时候改变为true,反之为true
-				pro.productsChecked = !pro.productsChecked;
-				this.updateProductCheckedAllBtn(item);
-				this.updateCheckAllBtn();
-			},
-			updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
-				let productsList = item.productsList,
-					productsCheckedLength = 0,
-					disabledLength = 0;
-				if(this.isshowDelbtn) {
-					productsList.forEach(pros => {
-						if(pros.productsChecked) {
-							productsCheckedLength++;
-						}
-					})
-				} else {
-					productsList.forEach(pros => {
-						if(pros.productsChecked && pros.validFlag != '3') {
-							productsCheckedLength++;
-						}
-						if(pros.validFlag == '3') {disabledLength++;}
-					})
-				}
-				item.checked = productsCheckedLength === productsList.length - disabledLength;
-			},
-			updateCheckAllBtn() {// 全选勾选判断
-				let goodsCheckedLength = 0,
-					disabledListLength = 0,
-					goodsList = this.goodsList;
-				goodsList.forEach(item => {
-					if(item.checked) {
-						goodsCheckedLength++;
-					}
-					if(item.isDisabled && !this.isshowDelbtn) {
-						disabledListLength++;
-					}
-				})
-				this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength;
-			},
-			checkShop(item){//与单选商品类似
-				item.checked = !item.checked;
-				this.setProductChecked(item);
-				this.updateCheckAllBtn();
-			},
-			setProductChecked(item) {
-				let products = item.productsList;
-				products.forEach(pros=>{
-					if(item.checked) {
-						if(pros.validFlag =='3'){
-							// 无效
-							this.isNnder = true;
-							pros.productsChecked = this.isshowDelbtn ?true :false;
-						}else{
-							// 有效
-							this.isNnder = false;
-							pros.productsChecked = true;
-						}
-					} else {
-						pros.productsChecked = false;
-					}
-				})
-			},
-			updateBothCheckBtn() {
-				if(this.isshowDelbtn) {
-					// 当管理删除按钮出现时,失效的商品可被选择
-					this.goodsList.forEach((item)=>{
-						item.checked = this.isCheckAll;
-						this.setProductChecked(item);
-					})
-				} else {
-					this.goodsList.forEach((item)=>{
-						item.checked = this.isCheckAll && !item.isDisabled;
-						this.setProductChecked(item);
-					})
-				}
-			},
-			checkAll(){//全选方法内调用方法
-			    this.isCheckAll = !this.isCheckAll;
-				this.updateBothCheckBtn();     
-			},
-			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
-				let prosPrice=0;
-				let validPrice =0;
-				let validList=[];
-				let productsList=[];
-				this.goodsList.map((item,index)=>{
-					productsList=item.productsList;
-					prosPrice=productsList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
-					productsList.forEach(pros =>{
-						if(pros.validFlag =='3'){
-							validList.push(pros)
-							validPrice = validList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
-							item.totalPrice = prosPrice - validPrice
-						}else{
-							item.totalPrice = prosPrice
-						}
-					})
-				})
-			},
-			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-			    this.allPrice = 0
-				let prosPrice=0;
-				let validPrice=0;
-				let validList =[];
-				let productsList =[];
-			    this.goodsList.forEach((item,index)=>{
-					productsList=item.productsList;
-					productsList.forEach(pros=>{	
-						if(pros.productsChecked){
-							prosPrice+=pros.retailPrice*pros.productCount;
-							if(pros.validFlag =='3'){
-								validList.push(pros)
-								validPrice = validList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
-								this.allPrice = prosPrice - validPrice
-							}else{
-								this.allPrice = prosPrice
-							}
-						}	
-					})
-			    })
-			},
-			totalCount(){//计算总数量
-			    this.allCount = 0
-				let prosAllCount=0
-				let validCount = 0
-				let validList =[];
-				let productsList =[];
-			    this.goodsList.forEach(item=>{
-					productsList = item.productsList
-					productsList.forEach(pros=>{
-						if(pros.productsChecked){
-							prosAllCount+=parseInt(pros.productCount);
-							if(pros.validFlag =='3'){
-								validList.push(pros)
-								validList.forEach(val =>{
-									validCount += val.productCount
-								})
-								this.allCount = prosAllCount - validCount
-							}else{
-								this.allCount = prosAllCount
-							}
-						}
-					})
-			    })
-			},		
-			changeCountAdd(item,pros){//商品数量加加
-				if(pros.productCount>=pros.stock){
-					pros.productCount= pros.stock
-					this.isStock =true
-					return
-				}else{
-					pros.productCount++
-					this.processActivityPrice(pros)
-					this.isStock =false
-				}
-				this.updateShoppogNum(pros)
-				this.totalShopPeice();
-			},
-			changeCountSub(item,pros){//商品数量减减
-				if(pros.productCount<=pros.minBuyNumber){
-					pros.productCount= pros.minBuyNumber
-					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
-					return
-				}else{
-					pros.productCount--
-					this.processActivityPrice(pros)
-				}
-				this.updateShoppogNum(pros)
-				this.totalShopPeice();
-			},
-			changeNnmber(e,item,pros){//输入商品数量更新
-				let _value = e.detail.value;
-				if(!this.$api.isNumber(_value)){
-					pros.productCount = pros.minBuyNumber
-				}else if(_value < pros.minBuyNumber){	
-					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
-					pros.productCount = pros.minBuyNumber
-				}else{
-					pros.productCount = e.detail.value
-					this.processActivityPrice(pros)
-				}
-				this.updateShoppogNum(pros)
-				this.totalShopPeice();
-			},
-			processActivityPrice(pros){//单独处理活动价格和阶梯价格
-				let ladderPriceList = pros.ladderPriceList;
-				if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
-					pros.retailPrice = pros.retailPrice
-				}else{
-					ladderPriceList.forEach((item,index)=>{
-						if(pros.productCount>=item.buyNum){
-							pros.retailPrice = item.buyPrice
-						}
-					})
-				}
-			},
-			updateShoppogNum(pros){//加减购物车商品更新到后台
-				let params ={userID:this.userID,productID:pros.productID,productCount:pros.productCount}
-				shoppingCartUpdate(params).then(response =>{
-					this.isshowDelbtn = false;
-					this.initGetCartGoodsList();
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			 },
-			toConfirmation(){//跳转确认订单页面
-				let setGoodsList=[];
-				this.goodsList.forEach(res=>{
-					let products = res.productsList
-					products.forEach(pros=>{
-						if(pros.productsChecked){
-						    setGoodsList.push(pros.productID)
-						}
-					})
-				})
-				if(setGoodsList == ''){
-					this.$util.msg("请先选择结算商品~",2000);
-					return
-				}else{
-					/**
-					 * @获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
-					 * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
-					 */
-					let productID = '';
-					this.goodsList.forEach(el=>{
-						el.productsList.forEach(pros=>{
-							if(pros.productsChecked){
-							   productID += pros.productID+','
-							}
-						})
-					})
-					let cartPramsData={
-							allPrice:this.allPrice,
-							allCount:this.allCount,
-							productID:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:''
-					}
-					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
-				}
-			},
-			showDelManager(){//显示删除商品管理
-				this.isshowDelbtn = true;
-				this.isNnder = true;
-				if(this.isCheckAll) {
-					this.updateBothCheckBtn();	
-				} else {
-					// 失效也被勾选
-					this.goodsList.forEach(item => {
-						if(item.checked) {
-							item.productsList.forEach(pros => {
-								pros.productsChecked = true;
-							})
-						}
-					})
-					this.updateCheckAllBtn();
-				}
-			},
-			hideDelManage(){//隐藏删除商品管理			
-				this.isshowDelbtn = false;
-				if(this.isCheckAll) {
-					this.updateBothCheckBtn();	
-				} else {
-					// 失效商品取消勾选
-					this.goodsList.forEach(item => {
-						if(item.isDisabled) {
-							item.checked = false;
-						}
-						item.productsList.forEach(pros => {
-							if(pros.validFlag == '3') {
-								pros.productsChecked = false;
-							}
-						})
-					})
-					this.updateCheckAllBtn();
-				}
-			},			
-			deleteList(){//删除购物车商品	
-				this.delGoodsList=[];
-				this.goodsList.forEach(delitem=>{
-					let products = delitem.productsList
-					products.forEach(pros=>{
-						if(pros.productsChecked){
-						    this.delGoodsList += pros.productID+','
-						}
-					})
-				})
-				if(this.delGoodsList.length == 0){
-					this.$util.msg("请选择要删除的商品~",2000);
-					return
-				}else{				
-					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
-						shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
-							this.$util.msg('删除成功',2000);
-							setTimeout(()=>{
-								this.isshowDelbtn = false;
-								this.initGetCartGoodsList();
-							},2000)
-						}).catch(error =>{
-							this.$util.msg(error.msg,2000)
-						})
-					})
-				}
-			},
-			goIndex(){
-				uni.switchTab({
-				    url: '/pages/tabBar/home/home'
-				});
-			},
-			goNavto(url){
-				uni.navigateTo ({
-					url
-				})
-			},
-			navToListPage(id){
-				this.isModallayer = true;
-				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
-			}
-		},
-		watch:{//深度监听所有数据,每次改变重新计算总价和总数
-		    goodsList:{
-		        deep:true,
-		        handler(val,oldval){
-		            this.totalPeice()
-		            this.totalCount()
-		        }
-		    }
-		},
-		onReachBottom() {
-			if(this.hasNextPage){
-				this.loadding = true
-				this.pullUpOn = true
-				this.getOnReachBottomData()
-			}	
-		},
-		onPullDownRefresh() {//下拉刷新
-			this.initGetCartGoodsList()
-			uni.stopPullDownRefresh()
-		},
-		onShow(){
-			if(this.hasLogin){
-				this.initData()
-			}else{
-				this.initLogin()
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background: #f7f7f7;
-		height: auto;
-	}
-	.cart-content{
-		position: relative;
-		padding-bottom:74rpx;
-	}
-	.container-cart-main.none{
-		display: none;
-	}
-	.container-cart-main.show{
-		display: block;
-	}
-	.cart-content.empty.none{
-		display: none;
-	}
-	.cart-content.empty.show{
-		display: block;
-	}
-	.container-cart.show{
-		display: block;
-	}
-	.container-cart.none{
-		display: none;
-	}
-	.empty-container.none{
-		display: none;
-	}
-	.empty-container.show{
-		display: flex;
-	}
-	.checkbox-box{
-		display: flex;
-		align-items: center;
-		.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;
-		}
-		&.disabled{
-			.checkbox{
-				color:#999999
-			}
-		}
-		.text{
-			font-size: $font-size-24;
-			margin-left: 10rpx;
-		}
-	}
-	.goods-list{
-		width: 100%;
-		height: auto;
-		border-top: 1px solid #EBEBEB;
-		background-color: #F7F7F7;
-		.goods-item{
-			width: 702rpx;
-			padding: 0 24rpx;
-			background: #FFFFFF;
-			margin-bottom: 24rpx;
-		}
-		.shoptitle{
-			display: flex;
-			align-items: center;
-			height: 80rpx;
-			// border-bottom: 1px solid #EBEBEB;
-			line-height: 80rpx;
-			.checkbox-box{
-				padding: 10rpx;
-			}
-			.text{
-				margin-left: 37rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: left;
-				font-weight: bold;
-			}
-		}
-		.goods-pros{
-			width: 100%;
-			height: auto;
-		}	
-		.goods-pros-t{
-			display: flex;
-			align-items: center;
-			width: 100%;
-			height: 217rpx;
-			padding:0 0 26rpx 0;
-			.checkbox-box{
-				padding: 10rpx;
-			}
-			.pros-img{
-				width: 210rpx;
-				height: 100%;
-				border-radius: 10rpx;
-				margin:0 26rpx 0 38rpx;
-				border:1px solid #f3f3f3;
-				image{
-					width: 100%;
-					height: 100%;
-					border-radius: 10rpx;
-				}
-			}
-		}
-		.goods-pros-b{
-			width:622rpx;
-			margin-left: 84rpx;
-			height: 40rpx;
-			padding:0 0 26rpx 0;
-			// border-top: 1px solid #EBEBEB;
-			&.show{
-				display: block;
-			}
-			&.none{
-				display: none;
-			}
-			.sum{
-				font-size: $font-size-28;
-				line-height: 40rpx;
-				color: $text-color;
-				display: flex;
-				justify-content: flex-end;
-				.money{
-					color: #FF2A2A;
-					font-size: $font-size-28;
-				}
-				.money-sign{
-					font-size: $font-size-24;
-					color: #FF2A2A;
-				}
-			}
-		}
-		.pros-product{
-			width: 386rpx;
-			height: 100%;
-			line-height: 36rpx;
-			font-size: $font-size-26;	
-			position: relative;
-			.producttitle{
-				width: 100%;
-				display: inline-block;
-				height: auto;							
-				text-overflow:ellipsis;
-				display: -webkit-box;
-				word-break: break-all;
-				-webkit-box-orient: vertical;
-				-webkit-line-clamp: 2;
-				overflow: hidden;
-				margin-bottom: 8rpx;
-				.no-text{
-					display: inline-block;
-					height:36rpx;
-					padding: 0 12rpx;
-					line-height: 36rpx;
-					background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
-					border-radius:18rpx;
-					text-align: center;
-					color: #FFFFFF;
-					font-size: $font-size-24;
-					margin-right: 24rpx;
-				}
-			}
-			.productspec{
-				height: 36rpx;
-				color: #999999;
-			}
-			.productprice{
-				height: 48rpx;
-				position: absolute;
-				width: 100%;
-				bottom: 0;
-				.price{
-					line-height: 48rpx;
-					font-size: $font-size-28;
-					width: 48%;
-					color: #FF2A2A;
-					float: left;
-					&.disabled{
-						color: #999999;
-					}
-					.money-sign{
-						font-size: $font-size-24;
-						color: #FF2A2A;
-					}
-				}
-				.count{
-					height: 100%;
-					float: right;
-					position: relative;
-					&.show{
-						display: block;
-					}
-					&.none{
-						display: none;
-					}
-					.number-box{
-						display: flex;
-						justify-content: center;
-						align-items: center;
-						.iconfont{
-							font-size: $font-size-24;
-							padding:0 20rpx;
-							color: $text-color;
-							text-align: center;
-							line-height: 48rpx;
-							font-weight: bold;
-						}
-						.btn-input{
-							width: 62rpx;
-							height: 48rpx;
-							line-height: 48rpx;
-							background: #F8F8F8;
-							border-radius: 4rpx;
-							text-align: center;
-							font-size: $font-size-24;
-						}
-					}
-					.uni-numbox{
-						position: absolute;
-						left: 45rpx;
-						bottom: 0;
-						.uni-numbox-minus, .uni-numbox-plus{
-							width: 50rpx;
-							line-height: 40rpx;
-						}
-						.uni-numbox-value {
-							font-size: $font-size-28;
-							width: 60rpx;
-						}
-					}
-				}
-			}
-		}
-	}
-	.footer{
-		width: 100%;
-		background-color: #FFFFFF;
-		height: 110rpx;
-		position: fixed;
-		bottom: 0rpx;
-		z-index: 10;
-		.footer-le{
-			width: 490rpx;
-			height: 100%;
-			padding:0 30rpx;
-			float: left;
-			.text{
-				font-weight: bold;
-			}
-			.foot-check{
-				width: 100rpx;
-				float: left;
-				line-height: 110rpx;
-				font-size: $font-size-24;
-				.checkbox{
-					width: 40rpx;
-					text-align: center;
-				}
-				.text{
-					width: 60rpx;
-					float: right;
-				}
-			}
-			.foot-check-delbtn{
-				float: left;
-				.delBtn{
-					margin: 0;
-					padding: 0;
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-					box-sizing: border-box;
-					font-size: $font-size-24;
-					text-align: center;
-					text-decoration: none;
-					border-radius: 0;
-					-webkit-tap-highlight-color: transparent;
-					overflow: hidden;
-					background-color:#FFFFFF;
-					color: #FF2A2A;
-					padding: 0 24rpx;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					line-height: 110rpx;
-					font-weight: bold;
-					&.none{
-						display: none;	
-					}
-				}
-			}
-			.sum{
-				font-size: $font-size-28;
-				line-height: 110rpx;
-				color: $text-color;
-				display: flex;
-				justify-content: flex-end;
-				.money{
-					color: #FF2A2A;
-				}
-				.money-sign{
-					font-size: $font-size-24;
-					color: #FF2A2A;
-				}
-			}
-		}
-		.footer-ri{
-			width: 200rpx;
-			height: 100%;
-			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
-			float: right;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			z-index: 999;
-			&.none{
-				display: none;
-			}
-			.btn{
-				width: 200rpx;
-				height: 100%;
-				font-size: $font-size-28;
-				line-height: 110rpx;
-				color: #FFFFFF;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-			}
-		}
-		.footer-del{
-			width: 400rpx;
-			height: 110rpx;
-			position: absolute;
-			padding-left: 200rpx;
-			background: #FFFFFF;
-			right: 0;
-			top: 0;
-			z-index: 1000;
-			&.show{
-				animation: showDelbtn 0s linear both;
-			}
-			&.none{
-				animation: hideDelbtn 0s linear both;
-			}
-			.btn{
-				width: 50%;
-				height: 100%;
-				line-height: 110rpx;
-				font-size: $font-size-28;
-				color: #FFFFFF;
-				text-align: center;
-				float: left;
-			}
-			.btn.btn-cancel{
-				background:#EEC1AB;
-			}
-			.btn.btn-confirm{
-				background:#FF2A2A;
-			}
-			@keyframes showDelbtn {
-				0% {
-					transform: translateX(0);
-				}
-				100% {
-					transform: translateX(-100%);
-				}
-			}
-			@keyframes hideDelbtn {
-				0% {
-					transform: translateX(-100%);
-				}
-				100% {
-					transform: translateX(0);
-				}
-			}
-		}
-	}
+<template>
+	<view class="container cart clearfix" v-if="hasLogin" :style="{paddingTop:CustomBar+'px'}"> 	
+		<headerNavbar :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :page='1'></headerNavbar>
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<view class="container-cart-main tui-skeleton">
+			<view v-if="!isEmpty" class="container-cart">
+				<scroll-view class="cart-content"  scroll-y  @scrolltolower="toLower" :style="{paddingBottom :isIphoneX ? (68+100)+'rpx' : '100rpx'}">
+					<view class="goods-list">
+						<view v-for="(item, index) in goodsList" :key="index" class="goods-item">
+							<view class="shoptitle">
+								<!--选择商店的全部商品"-->
+								<view class="checkbox-box" @click.stop="checkShop(item)">
+									<button class="checkbox iconfont" 
+											:class="[item.checked ?'icon-gouxuanl':'icon-weigouxuan']" 									
+											:disabled="item.isDisabled && !isshowDelbtn">
+									</button>
+								</view>
+								<view class="text">{{item.name}}</view> 
+							</view>
+							<view class="productlist">
+								<view 	class="goods-pros" v-for="(pros,idx) in item.productsList" :key="idx" >
+									<view class="goods-pros-t">
+										<!--选择商品-->
+										<view class="checkbox-box" @click.stop="ischeck(item,pros)" :class="[pros.validFlag == '3' && !isshowDelbtn ?'disabled' : '']">
+											<button class="checkbox iconfont" 
+													:disabled="pros.validFlag == '3' && !isshowDelbtn"
+													:class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
+											</button>
+										</view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
+										<view class="pros-product">
+											<view class="producttitle" @click.stop="navToListPage(pros.productID)"	>
+												<text v-if="pros.validFlag == '3'" class="no-text">商品已下架</text>{{pros.name}}
+											</view>
+											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
+											<view class="productprice">
+												<!--使用过滤器对总价改变-->
+												<view class="price" :class="[pros.validFlag == '3' ?'disabled' : '']">
+													<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>
+													{{pros.retailPrice?pros.retailPrice.toFixed(2):''}}
+												</view>
+												<view class="count" v-if="pros.validFlag == '2'"  :class="[isshowDelbtn ? 'none':'show']">
+													<view class="number-box">
+														<view  class="iconfont icon-jianhao" :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountSub(item,pros)"></view>
+														<input class="btn-input" type="number" maxlength='4' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
+														<view  class="iconfont icon-jiahao"  :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountAdd(item,pros)"></view>
+													</view>
+												</view>
+											</view>
+										</view>	
+									</view>
+								</view>
+							</view>	
+							<view class="goods-pros-b" :class="[isshowDelbtn ? 'none':'show']" >
+								<view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice.toFixed(2)}}</text></view>
+							</view>
+						</view>
+					</view>	
+					<view class="failure-list" v-if="failureList.length>0">
+						<view class="failure-title">
+							<view class="title-txt">失效商品<text>{{failureList.length}}件</text></view>
+							<view class="title-btn" @click.stop="deletefailureList">清空失效商品</view>
+						</view>
+						<view class="productlist">
+							<view class="goods-pros" v-for="(failure,failureIdx) in failureList" :key="failureIdx" >
+								<view class="goods-pros-t" @click.stop="failureToProduct(failure)">
+									<!--选择商品-->
+									<view class="checkbox-box" @click.stop="ischeckFailure(failure)" v-if="isshowDelbtn">
+										<button class="checkbox iconfont" 
+										:disabled="!isshowDelbtn"
+										:class="[failure.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
+									</button>
+									</view>
+									<view class="pros-img">
+										<image :src="failure.mainImage ? failure.mainImage:''" alt="" />
+										<text class="img-tip">失效</text>
+									</view>
+									<view class="pros-product">
+										<view class="producttitle">{{failure.name}}</view>
+										<view class="productspec">规格:{{failure.unit ? failure.unit : ''}}</view>
+										<view class="productstate">{{failureStateText(failure.failureState)}}</view>
+									</view>
+									<view class="pros-marks" v-if="failure.isFailureLayer"></view>
+								</view>
+							</view>
+						</view>	
+					</view>
+				</scroll-view>
+				<!-- 脚部菜单 -->
+				<view class="footer" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
+					<view class="footer-le">
+						<view class="foot-check checkbox-box" @tap.stop="checkAll()">
+							<button class="checkbox iconfont" :class="[isCheckAll?'icon-gouxuan':'icon-weigouxuan']"></button> 
+							<view class="text">全选</view>
+						</view>
+						<view class="foot-check-delbtn">
+							<button class="delBtn" @tap.stop="showDelManager">删除</button>
+						</view>
+						<view class="sum">总价:<text class="money-sign">¥</text><text class="money">{{allPrice.toFixed(2)}}</text></view>
+					</view>
+					<view v-if="!isshowDelbtn" class="footer-ri" >
+						<view class="btn" @tap="toConfirmation">去结算({{allCount}})</view>
+					</view>
+					<view v-else class="footer-del">
+						<view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
+						<view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="isEmpty" class="cart-content empty">
+				<view  class="empty-container">
+					<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
+					<text class="error-text">购物车空空如也,快去商城逛逛吧~</text>
+					<view class="login-btn"  @click="goIndex">去商城</view>
+				</view>
+			</view>
+		</view>
+		<!-- 透明模态层 -->
+		<modal-layer v-if='modallayer'></modal-layer>
+	</view>
+</template>
+<script>
+	import authorize from '@/common/config/authorize.js'
+	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
+	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
+	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import headerNavbar from "@/components/cm-module/headerNavbar/headerNavbar.vue" //顶部自定义胶囊'
+	import modalLayer from "@/components/modal-layer"
+	import { mapState,mapMutations } from 'vuex';
+	import { queryShoppingCartList,shoppingCartUpdate,shoppingCartDelete } from "@/api/cart.js" 
+	
+	export default{
+		components:{
+			tuiSkeleton,
+			tuiLoadmore,
+			tuiNomore,
+			modalLayer,
+			headerNavbar
+		},
+		data(){
+			return{
+				nvabarData: {//顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '购物车', // 导航栏 中间的标题
+				},
+				headerBtnPosi:this.setHeaderBtnPosi(),//获取设备顶部胶囊高度
+				systeminfo:this.setSysteminfo(),		 //获取设备信息
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				isIphoneX:this.$store.state.isIphoneX,
+				userID:'',
+				alertType:'',
+				isStock:'',
+				failureList:[],	//失效商品列表
+				goodsList:[],	//购物车的商品
+				delGoodsList:'',//要删除的商品
+				setGoodData:'', //确认订单的商品
+				isCheckAll:false,//是否全选
+				allPrice:0,//所有价格
+				allCount:0,//被选中的产品数量
+				isNnder:true,
+				isModallayer:false,
+				skeletonShow:true,
+				isshowDelbtn:false,
+				isDisabled: false, // 供应商/店铺全选是否禁用状态
+				isEmpty:false,//显示空购物车
+				scrollHeight: 'auto',
+				nomoreText: '上拉显示更多',
+				hasNextPage: false,
+				loadding: false,
+				pullUpOn: true,
+				pullFlag: true,
+				pageSize: 10,
+				pageNum: 1,
+			}
+		},
+		onLoad(){
+			this.setScrollHeight();
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo'])
+		},
+		filters:{//单件商品的价格 × 数量
+		    totalprice(val,count){
+		        return (val * count).toFixed(2)
+		    }
+		},	
+		methods:{
+			initData(){
+				this.isModallayer = false //遮罩层 防止多次点击
+				this.skeletonShow = true //预加载圆圈
+				this.isCheckAll=false//是否全选
+				this.$api.getStorage().then((resolve) => {
+					this.userID = resolve.userID;
+					this.initGetCartGoodsList();
+				})	
+			},
+			initLogin(){
+				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
+					if(wxResponse == 1){
+						this.$api.redirectTo('/pages/login/login?type=4')
+					}else{
+						this.$api.navigateTo('/pages/authorization/authorization?type=0')
+					}
+				})	
+			},
+			setScrollHeight() {
+				// 窗口高度-footer高度
+				const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
+				setTimeout(()=> {
+					const query = uni.createSelectorQuery().in(this);
+					query.selectAll('.footer').boundingClientRect();
+					query.exec(res => {
+						this.windowHeight = windowHeight;
+						if(res[0][0]) {
+							this.scrollHeight = windowHeight - res[0][0].height;
+						}
+					})
+				}, 500)
+			},
+			initGetCartGoodsList(){//初始化购物车 index:1
+				let params = {userID:this.userID,pageNum:1,pageSize:this.pageSize}
+				queryShoppingCartList(params).then(response =>{
+					this.skeletonShow = false
+					this.$store.commit('updateAllNum',response.data.cartQuantity)
+					const responseData = response.data
+					if(responseData.pageDate.length > 0 && responseData.failureList.length > 0){
+						this.isEmpty =false
+					} else {
+						this.isEmpty =true
+					}
+					if( responseData.pageDate.length > 0){
+						this.goodsList = responseData.pageDate;
+						this.goodsList.forEach((item,index) => {
+							let productsListLength = item.productsList.length,
+								invalidLength = 0;
+							item.productsList.forEach(pros => {
+								pros.shopID = item.shopID;
+								if(pros.validFlag == '3' ) {invalidLength++;}
+							})
+							item.isDisabled = invalidLength === productsListLength;
+						})
+					} else {
+						this.goodsList = [];
+					}
+					if( responseData.failureList.length > 0){
+						let newFailureList = [],isFailureLayer;
+						responseData.failureList.forEach((failure,index) => {
+							if(failure.failureState == 1 || failure.failureState == 2) {
+								isFailureLayer = true
+							}else{
+								isFailureLayer = false
+							}
+							newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
+						})
+						this.failureList = newFailureList
+					} else {
+						this.failureList = [];
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},		
+			getOnReachBottomData(){//上拉加载
+				this.pageNum+=1
+				let params = {userID:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
+				queryShoppingCartList(params).then(response =>{
+					let resultsData = response.data.pageDate
+					this.hasNextPage = resultsData.hasNextPage;
+					this.goodsList = this.goodsList.concat(resultsData.results)
+					this.pullFlag = false;// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true;},500)
+					if(this.hasNextPage){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.loadding = false
+						this.pullUpOn = false
+						this.nomoreText = '已至底部'
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			ischeckFailure(failure){
+				failure.productsChecked = !failure.productsChecked;
+			},
+			ischeck(item,pro){//为未选中的时候改变为true,反之为true
+				pro.productsChecked = !pro.productsChecked;
+				this.updateProductCheckedAllBtn(item);
+				this.updateCheckAllBtn();
+			},
+			updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
+				let productsList = item.productsList,
+					productsCheckedLength = 0,
+					disabledLength = 0;
+				if(this.isshowDelbtn) {
+					productsList.forEach(pros => {
+						if(pros.productsChecked) {
+							productsCheckedLength++;
+						}
+					})
+				} else {
+					productsList.forEach(pros => {
+						if(pros.productsChecked && pros.validFlag != '3') {
+							productsCheckedLength++;
+						}
+						if(pros.validFlag == '3') {disabledLength++;}
+					})
+				}
+				item.checked = productsCheckedLength === productsList.length - disabledLength;
+			},
+			updateCheckAllBtn() {// 全选勾选判断
+				let goodsCheckedLength = 0,
+					disabledListLength = 0,
+					goodsList = this.goodsList;
+				goodsList.forEach(item => {
+					if(item.checked) {
+						goodsCheckedLength++;
+					}
+					if(item.isDisabled && !this.isshowDelbtn) {
+						disabledListLength++;
+					}
+				})
+				this.isCheckAll = goodsCheckedLength === goodsList.length - disabledListLength;
+			},
+			checkShop(item){//与单选商品类似
+				item.checked = !item.checked;
+				this.setProductChecked(item);
+				this.updateCheckAllBtn();
+			},
+			setProductChecked(item) {
+				let products = item.productsList;
+				products.forEach(pros=>{
+					if(item.checked) {
+						if(pros.validFlag =='3'){
+							// 无效
+							this.isNnder = true;
+							pros.productsChecked = this.isshowDelbtn ?true :false;
+						}else{
+							// 有效
+							this.isNnder = false;
+							pros.productsChecked = true;
+						}
+					} else {
+						pros.productsChecked = false;
+					}
+				})
+			},
+			updateBothCheckBtn() {
+				if(this.isshowDelbtn) {
+					// 当管理删除按钮出现时,失效的商品可被选择
+					this.goodsList.forEach((item)=>{
+						item.checked = this.isCheckAll;
+						this.setProductChecked(item);
+					})
+				} else {
+					this.goodsList.forEach((item)=>{
+						item.checked = this.isCheckAll && !item.isDisabled;
+						this.setProductChecked(item);
+					})
+				}
+			},
+			checkAll(){//全选方法内调用方法
+			    this.isCheckAll = !this.isCheckAll;
+				this.updateBothCheckBtn();     
+			},
+			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
+				let prosPrice=0;
+				let validPrice =0;
+				let validList=[];
+				let productsList=[];
+				this.goodsList.map((item,index)=>{
+					productsList=item.productsList;
+					prosPrice=productsList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
+					productsList.forEach(pros =>{
+						if(pros.validFlag =='3'){
+							validList.push(pros)
+							validPrice = validList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
+							item.totalPrice = prosPrice - validPrice
+						}else{
+							item.totalPrice = prosPrice
+						}
+					})
+				})
+			},
+			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
+			    this.allPrice = 0
+				let prosPrice=0;
+				let validPrice=0;
+				let validList =[];
+				let productsList =[];
+			    this.goodsList.forEach((item,index)=>{
+					productsList=item.productsList;
+					productsList.forEach(pros=>{	
+						if(pros.productsChecked){
+							prosPrice+=pros.retailPrice*pros.productCount;
+							if(pros.validFlag =='3'){
+								validList.push(pros)
+								validPrice = validList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
+								this.allPrice = prosPrice - validPrice
+							}else{
+								this.allPrice = prosPrice
+							}
+						}	
+					})
+			    })
+			},
+			totalCount(){//计算总数量
+			    this.allCount = 0
+				let prosAllCount=0
+				let validCount = 0
+				let validList =[];
+				let productsList =[];
+			    this.goodsList.forEach(item=>{
+					productsList = item.productsList
+					productsList.forEach(pros=>{
+						if(pros.productsChecked){
+							prosAllCount+=parseInt(pros.productCount);
+							if(pros.validFlag =='3'){
+								validList.push(pros)
+								validList.forEach(val =>{
+									validCount += val.productCount
+								})
+								this.allCount = prosAllCount - validCount
+							}else{
+								this.allCount = prosAllCount
+							}
+						}
+					})
+			    })
+			},		
+			changeCountAdd(item,pros){//商品数量加加
+				if(pros.productCount>=pros.stock){
+					pros.productCount= pros.stock
+					this.isStock =true
+					return
+				}else{
+					pros.productCount++
+					this.processActivityPrice(pros)
+					this.isStock =false
+				}
+				this.updateShoppogNum(pros)
+				this.totalShopPeice();
+			},
+			changeCountSub(item,pros){//商品数量减减
+				if(pros.productCount<=pros.minBuyNumber){
+					pros.productCount= pros.minBuyNumber
+					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
+					return
+				}else{
+					pros.productCount--
+					this.processActivityPrice(pros)
+				}
+				this.updateShoppogNum(pros)
+				this.totalShopPeice();
+			},
+			changeNnmber(e,item,pros){//输入商品数量更新
+				let _value = e.detail.value;
+				if(!this.$api.isNumber(_value)){
+					pros.productCount = pros.minBuyNumber
+				}else if(_value < pros.minBuyNumber){	
+					this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
+					pros.productCount = pros.minBuyNumber
+				}else{
+					pros.productCount = e.detail.value
+					this.processActivityPrice(pros)
+				}
+				this.updateShoppogNum(pros)
+				this.totalShopPeice();
+			},
+			processActivityPrice(pros){//单独处理活动价格和阶梯价格
+				let ladderPriceList = pros.ladderPriceList;
+				if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
+					pros.retailPrice = pros.retailPrice
+				}else{
+					ladderPriceList.forEach((item,index)=>{
+						if(pros.productCount>=item.buyNum){
+							pros.retailPrice = item.buyPrice
+						}
+					})
+				}
+			},
+			updateShoppogNum(pros){//加减购物车商品更新到后台
+				let params ={userID:this.userID,productID:pros.productID,productCount:pros.productCount}
+				shoppingCartUpdate(params).then(response =>{
+					this.isshowDelbtn = false;
+					this.initGetCartGoodsList();
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			 },
+			toConfirmation(){//跳转确认订单页面
+				let setGoodsList=[];
+				this.goodsList.forEach(res=>{
+					let products = res.productsList
+					products.forEach(pros=>{
+						if(pros.productsChecked){
+						    setGoodsList.push(pros.productID)
+						}
+					})
+				})
+				if(setGoodsList == ''){
+					this.$util.msg("请先选择结算商品~",2000);
+					return
+				}else{
+					/**
+					 * @获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
+					 * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
+					 */
+					let productID = '';
+					this.goodsList.forEach(el=>{
+						el.productsList.forEach(pros=>{
+							if(pros.productsChecked){
+							   productID += pros.productID+','
+							}
+						})
+					})
+					let cartPramsData={
+							allPrice:this.allPrice,
+							allCount:this.allCount,
+							productID:productID.substring(0,productID.lastIndexOf(',')),
+							productCount:''
+					}
+					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
+				}
+			},
+			showDelManager(){//显示删除商品管理
+				this.isshowDelbtn = true;
+				this.isNnder = true;
+				if(this.isCheckAll) {
+					this.updateBothCheckBtn();	
+				} else {
+					// 失效也被勾选
+					this.goodsList.forEach(item => {
+						if(item.checked) {
+							item.productsList.forEach(pros => {
+								pros.productsChecked = true;
+							})
+						}
+					})
+					this.updateCheckAllBtn();
+				}
+				this.failureList.forEach(failureItem => {
+					if(failureItem.isFailureLayer){
+						failureItem.isFailureLayer = false
+					}
+				})
+			},
+			hideDelManage(){//隐藏删除商品管理			
+				this.isshowDelbtn = false;
+				let isFailureLayer,newFailureList =[];
+				if(this.isCheckAll) {
+					this.updateBothCheckBtn();	
+				} else {
+					// 失效商品取消勾选
+					this.goodsList.forEach(item => {
+						if(item.isDisabled) {
+							item.checked = false;
+						}
+						item.productsList.forEach(pros => {
+							if(pros.validFlag == '3') {
+								pros.productsChecked = false;
+							}
+						})
+					})
+					this.updateCheckAllBtn();
+				}
+				this.failureList.forEach((failure,index) => {
+					if(failure.failureState == 1 || failure.failureState == 2) {
+						isFailureLayer = true
+					}else{
+						isFailureLayer = false
+					}
+					newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
+				})
+				this.failureList = newFailureList;
+			},		
+			deleteList(){//删除购物车商品	
+				this.delGoodsList=[];
+				this.goodsList.forEach(delitem=>{
+					let products = delitem.productsList
+					products.forEach(pros=>{
+						if(pros.productsChecked){
+						    this.delGoodsList += pros.productID+','
+						}
+					})
+				})
+				this.failureList.forEach(failure=>{
+					if(failure.productsChecked){
+						this.delGoodsList += failure.productID+','
+					}
+				})
+				if(this.delGoodsList.length == 0){
+					this.$util.msg("请选择要删除的商品~",2000);
+					return
+				}else{				
+					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
+						shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
+							this.$util.msg('删除成功',2000);
+							setTimeout(()=>{
+								this.isshowDelbtn = false;
+								this.initGetCartGoodsList();
+							},2000)
+						}).catch(error =>{
+							this.$util.msg(error.msg,2000)
+						})
+					})
+				}
+			},
+			deletefailureList(){
+				this.failureList.forEach(failure=>{
+					this.delGoodsList += failure.productID+','
+				})
+				this.$util.modal('','确定清空全部失效商品吗?','确定','取消',true,() =>{
+					shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
+						this.$util.msg('删除成功',2000);
+						setTimeout(()=>{
+							this.isshowDelbtn = false;
+							this.initGetCartGoodsList();
+						},2000)
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})
+			},
+			goIndex(){
+				uni.switchTab({
+				    url: '/pages/tabBar/home/home'
+				});
+			},
+			goNavto(url){
+				uni.navigateTo ({
+					url
+				})
+			},
+			navToListPage(id){
+				this.isModallayer = true;
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+			},
+			failureToProduct(failure){
+				if(failure.failureState == 1 || failure.failureState == 2){
+					return
+				}else{
+					this.isModallayer = true;
+					this.$api.navigateTo(`/pages/goods/product?id=${failure.productID}`)
+				}
+			},
+			failureStateText(state){
+				let stateText = '',
+					stateTextObject={
+						1:'商品已丢失',
+						2:'商品已停售',
+						3:'商品已下架',
+						4:'商品已售罄',
+						5:'价格仅会员可见,您不能购买',
+						6:'未公开价格'
+					}
+				Object.keys(stateTextObject).forEach(key => {
+					if(key == state){
+						stateText = stateTextObject[key]
+					}
+				})
+				return stateText;
+			},
+			setHeaderBtnPosi(){
+				// 获得胶囊按钮位置信息
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				return headerBtnPosi
+			},
+			setSysteminfo(){
+				let systeminfo;
+				uni.getSystemInfo({ // 获取设备信息
+					success: (res) => {
+						systeminfo = res
+					},
+				})
+				return systeminfo
+			}
+		},
+		watch:{//深度监听所有数据,每次改变重新计算总价和总数
+		    goodsList:{
+		        deep:true,
+		        handler(val,oldval){
+		            this.totalPeice()
+		            this.totalCount()
+		        }
+		    }
+		},
+		onPullDownRefresh() {//下拉刷新
+			this.initGetCartGoodsList()
+			uni.stopPullDownRefresh()
+		},
+		onShow(){
+			if(this.hasLogin){
+				this.initData()
+			}else{
+				this.initLogin()
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background: #f7f7f7;
+		height: auto;
+	}
+	.cart-content{
+		position: relative;
+	}
+	.container-cart-main.none{
+		display: none;
+	}
+	.container-cart-main.show{
+		display: block;
+	}
+	.cart-content.empty.none{
+		display: none;
+	}
+	.cart-content.empty.show{
+		display: block;
+	}
+	.container-cart.show{
+		display: block;
+	}
+	.container-cart.none{
+		display: none;
+	}
+	.empty-container.none{
+		display: none;
+	}
+	.empty-container.show{
+		display: flex;
+	}
+	.checkbox-box{
+		display: flex;
+		align-items: center;
+		.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;
+		}
+		&.disabled{
+			.checkbox{
+				color:#999999
+			}
+		}
+		.text{
+			font-size: $font-size-24;
+			margin-left: 10rpx;
+		}
+	}
+	.goods-list{
+		width: 100%;
+		height: auto;
+		border-top: 1px solid #EBEBEB;
+		background-color: #F7F7F7;
+		.goods-item{
+			width: 702rpx;
+			padding: 0 24rpx;
+			background: #FFFFFF;
+			margin-bottom: 24rpx;
+		}
+		.shoptitle{
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			// border-bottom: 1px solid #EBEBEB;
+			line-height: 80rpx;
+			.checkbox-box{
+				padding: 10rpx;
+			}
+			.text{
+				margin-left: 37rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: left;
+				font-weight: bold;
+			}
+		}
+		.goods-pros{
+			width: 100%;
+			height: auto;
+		}	
+		.goods-pros-t{
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 210rpx;
+			padding:0 0 26rpx 0;
+			.checkbox-box{
+				padding: 10rpx;
+			}
+			.pros-img{
+				width: 210rpx;
+				height: 100%;
+				border-radius: 10rpx;
+				margin:0 20rpx;
+				border:1px solid #f3f3f3;
+				image{
+					width: 100%;
+					height: 100%;
+					border-radius: 10rpx;
+				}
+			}
+		}
+		.goods-pros-b{
+			width:622rpx;
+			margin-left: 84rpx;
+			height: 40rpx;
+			padding:0 0 26rpx 0;
+			// border-top: 1px solid #EBEBEB;
+			&.show{
+				display: block;
+			}
+			&.none{
+				display: none;
+			}
+			.sum{
+				font-size: $font-size-28;
+				line-height: 40rpx;
+				color: $text-color;
+				display: flex;
+				justify-content: flex-end;
+				.money{
+					color: #FF2A2A;
+					font-size: $font-size-28;
+				}
+				.money-sign{
+					font-size: $font-size-24;
+					color: #FF2A2A;
+				}
+			}
+		}
+		.pros-product{
+			width: 402rpx;
+			height: 100%;
+			line-height: 36rpx;
+			font-size: $font-size-28;	
+			position: relative;
+			.producttitle{
+				width: 100%;
+				display: inline-block;
+				height: auto;							
+				text-overflow:ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				margin-bottom: 8rpx;
+				.no-text{
+					display: inline-block;
+					height:36rpx;
+					padding: 0 12rpx;
+					line-height: 36rpx;
+					background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
+					border-radius:18rpx;
+					text-align: center;
+					color: #FFFFFF;
+					font-size:$font-size-28;
+					margin-right: 24rpx;
+				}
+			}
+			.productspec{
+				height: 36rpx;
+				color: #999999;
+				font-size: $font-size-26;
+			}
+			.productprice{
+				height: 48rpx;
+				position: absolute;
+				width: 100%;
+				bottom: 0;
+				.price{
+					line-height: 48rpx;
+					font-size: $font-size-28;
+					width: 48%;
+					color: #FF2A2A;
+					float: left;
+					&.disabled{
+						color: #999999;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #FF2A2A;
+					}
+				}
+				.count{
+					height: 100%;
+					float: right;
+					position: relative;
+					&.show{
+						display: block;
+					}
+					&.none{
+						display: none;
+					}
+					.number-box{
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						.iconfont{
+							font-size: $font-size-24;
+							padding:0 20rpx;
+							color: $text-color;
+							text-align: center;
+							line-height: 48rpx;
+							font-weight: bold;
+						}
+						.btn-input{
+							width: 62rpx;
+							height: 48rpx;
+							line-height: 48rpx;
+							background: #F8F8F8;
+							border-radius: 4rpx;
+							text-align: center;
+							font-size: $font-size-24;
+						}
+					}
+					.uni-numbox{
+						position: absolute;
+						left: 45rpx;
+						bottom: 0;
+						.uni-numbox-minus, .uni-numbox-plus{
+							width: 50rpx;
+							line-height: 40rpx;
+						}
+						.uni-numbox-value {
+							font-size: $font-size-28;
+							width: 60rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+	.failure-list{
+		width: 702rpx;
+		height: auto;
+		padding: 0 24rpx;
+		margin-top: 20rpx;
+		background: #FFFFFF;
+		.failure-title{
+			width: 100%;
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: $font-size-28;
+			border-bottom: 1px solid #EBEBEB;
+			.title-txt{
+				float: left;
+				color: $text-color;
+				text-align: left;
+			}
+			.title-btn{
+				float: right;
+				color: $color-system;
+				text-align: right;
+			}
+		}
+		.productlist{
+			padding-top: 10rpx;
+			.goods-pros{
+				width: 100%;
+				height: auto;
+				padding: 20rpx 0;
+			}	
+			.goods-pros-t{
+				display: flex;
+				align-items: center;
+				width: 100%;
+				height: 210rpx;
+				position: relative;
+				.checkbox-box{
+					padding: 10rpx;
+				}
+				.pros-img{
+					width: 210rpx;
+					height: 100%;
+					border-radius: 10rpx;
+					margin:0 20rpx;
+					border:1px solid #f3f3f3;
+					position: relative;
+					.img-tip{
+						display: block;
+						width: 72rpx;
+						height: 36rpx;
+						line-height: 36rpx;
+						font-size: $font-size-24;
+						text-align: center;
+						color: #FFFFFF;
+						border-radius: 10rpx 0 10rpx 0;
+						background:linear-gradient(34deg,rgba(255,149,42,1) 0%,rgba(225,86,22,1) 100%);
+						position: absolute;
+						left: 0;
+						top: 0;
+					}
+					image{
+						width: 100%;
+						height: 100%;
+						border-radius: 10rpx;
+					}
+				}
+				.pros-marks{
+					width: 722rpx;
					height: 250rpx;
+					z-index: 8888;
+					background: rgba(0,0,0,.05);
+					position: absolute;
+					left:0;
+					top: -20rpx;
+				}
+			}
+			.goods-pros-b{
+				width:622rpx;
+				margin-left: 84rpx;
+				height: 40rpx;
+				padding:0 0 26rpx 0;
+				// border-top: 1px solid #EBEBEB;
+				&.show{
+					display: block;
+				}
+				&.none{
+					display: none;
+				}
+				.sum{
+					font-size: $font-size-28;
+					line-height: 40rpx;
+					color: $text-color;
+					display: flex;
+					justify-content: flex-end;
+					.money{
+						color: #FF2A2A;
+						font-size: $font-size-28;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #FF2A2A;
+					}
+				}
+			}
+			.pros-product{
+				width: 402rpx;
+				height: 100%;
+				line-height: 36rpx;
+				font-size: $font-size-28;	
+				position: relative;
+				.producttitle{
+					width: 100%;
+					display: inline-block;
+					height: auto;							
+					text-overflow:ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+					margin-bottom: 8rpx;
+					.no-text{
+						display: inline-block;
+						height:36rpx;
+						padding: 0 12rpx;
+						line-height: 36rpx;
+						background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
+						border-radius:18rpx;
+						text-align: center;
+						color: #FFFFFF;
+						font-size: $font-size-28;
+						margin-right: 24rpx;
+					}
+				}
+				.productspec{
+					height: 36rpx;
+					color: #999999;
+					font-size: $font-size-26;
+				}
+				.productstate{
+					font-size: $font-size-28;
+					height: 44rpx;
+					color: #FF2A2A;
+					position: absolute;
+					bottom: 0;
+					left: 0;
+				}
+			}
+		}
+	}
+	.footer{
+		width: 100%;
+		background-color: #FFFFFF;
+		height: 110rpx;
+		position: fixed;
+		bottom: 0rpx;
+		z-index: 10;
+		.footer-le{
+			width: 490rpx;
+			height: 100%;
+			padding:0 30rpx;
+			float: left;
+			.text{
+				font-weight: bold;
+			}
+			.foot-check{
+				width: 100rpx;
+				float: left;
+				line-height: 110rpx;
+				font-size: $font-size-24;
+				.checkbox{
+					width: 40rpx;
+					text-align: center;
+				}
+				.text{
+					width: 60rpx;
+					float: right;
+				}
+			}
+			.foot-check-delbtn{
+				float: left;
+				.delBtn{
+					margin: 0;
+					padding: 0;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					box-sizing: border-box;
+					font-size: $font-size-24;
+					text-align: center;
+					text-decoration: none;
+					border-radius: 0;
+					-webkit-tap-highlight-color: transparent;
+					overflow: hidden;
+					background-color:#FFFFFF;
+					color: #FF2A2A;
+					padding: 0 24rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					line-height: 110rpx;
+					font-weight: bold;
+					&.none{
+						display: none;	
+					}
+				}
+			}
+			.sum{
+				font-size: $font-size-28;
+				line-height: 110rpx;
+				color: $text-color;
+				display: flex;
+				justify-content: flex-end;
+				.money{
+					color: #FF2A2A;
+				}
+				.money-sign{
+					font-size: $font-size-24;
+					color: #FF2A2A;
+				}
+			}
+		}
+		.footer-ri{
+			width: 200rpx;
+			height: 100%;
+			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+			float: right;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			z-index: 999;
+			&.none{
+				display: none;
+			}
+			.btn{
+				width: 200rpx;
+				height: 100%;
+				font-size: $font-size-28;
+				line-height: 110rpx;
+				color: #FFFFFF;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+		}
+		.footer-del{
+			width: 400rpx;
+			height: 110rpx;
+			position: absolute;
+			padding-left: 200rpx;
+			background: #FFFFFF;
+			right: 0;
+			top: 0;
+			z-index: 1000;
+			&.show{
+				animation: showDelbtn 0s linear both;
+			}
+			&.none{
+				animation: hideDelbtn 0s linear both;
+			}
+			.btn{
+				width: 50%;
+				height: 100%;
+				line-height: 110rpx;
+				font-size: $font-size-28;
+				color: #FFFFFF;
+				text-align: center;
+				float: left;
+			}
+			.btn.btn-cancel{
+				background:#EEC1AB;
+			}
+			.btn.btn-confirm{
+				background:#FF2A2A;
+			}
+			@keyframes showDelbtn {
+				0% {
+					transform: translateX(0);
+				}
+				100% {
+					transform: translateX(-100%);
+				}
+			}
+			@keyframes hideDelbtn {
+				0% {
+					transform: translateX(-100%);
+				}
+				100% {
+					transform: translateX(0);
+				}
+			}
+		}
+	}
 </style>

+ 11 - 11
pages/goods/product.vue

@@ -1,13 +1,13 @@
 <template>
-	<view class="product" :style="{paddingBottom: userIdentity==1 ? '0rpx' :'120rpx'}">
-		<header-poduct  v-if="isHeaderPoduct"
-						:systeminfo='systeminfo' 
-						:navbar-data='nvabarData' 
-						:headerBtnPosi ="headerBtnPosi" 
-						:headerColor="headerColor" 
-						:type="isShareType"
-						:page='backPage'>
-		</header-poduct>
+	<view class="product" :style="{paddingBottom: userIdentity==1 ? '0rpx' :'188rpx'}">
+		<custom-p   v-if="isHeaderPoduct"
+					:systeminfo='systeminfo' 
+					:navbar-data='nvabarData' 
+					:headerBtnPosi ="headerBtnPosi" 
+					:headerColor="headerColor" 
+					:type="isShareType"
+					:page='backPage'>
+		</custom-p>
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
 		<view class="container-product tui-skeleton">
 			<view class="product-top">
@@ -165,7 +165,7 @@
 
 <script>
 	import { mapState,mapMutations } from 'vuex'
-	import headerPoduct from '@/components/cm-module/headerNavbar/header-poduct' 		 //自定义导航
+	import customP from '@/components/cm-module/headerNavbar/header-poduct' 		 //自定义导航
 	import cmPrice from "@/components/cm-module/productDetails/cm-price.vue" //价格显示
 	import cmAttributes from "@/components/cm-module/productDetails/cm-attributes.vue" //规格信息
 	import authorize from '@/common/config/authorize.js'
@@ -181,7 +181,7 @@
 	var isPreviewImg;
 	export default{
 		components:{
-			headerPoduct,
+			customP,
 			parser,
 			tuiSkeleton,
 			supplierDetails,

+ 73 - 28
pages/tabBar/cart/cart.vue

@@ -39,6 +39,7 @@
 													{{pros.retailPrice?pros.retailPrice.toFixed(2):''}}
 												</view>
 												<view class="count" v-if="pros.validFlag == '2'"  :class="[isshowDelbtn ? 'none':'show']">
+													<text class="count-tips" v-if="pros.productCount<pros.minBuyNumber">起订量:{{pros.minBuyNumber}}</text>
 													<view class="number-box">
 														<view  class="iconfont icon-jianhao" :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountSub(item,pros)"></view>
 														<input class="btn-input" type="number" maxlength='4' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
@@ -136,13 +137,6 @@
 		},
 		data(){
 			return{
-				nvabarData: {//顶部自定义导航
-					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '购物车', // 导航栏 中间的标题
-					haveBack:true,
-					textLeft:this.$store.state.isIphone,
-				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isIphoneX:this.$store.state.isIphoneX,
 				userID:'',
@@ -160,6 +154,7 @@
 				skeletonShow:true,
 				isshowDelbtn:false,
 				isDisabled: false, // 供应商/店铺全选是否禁用状态
+				isNoConfim:false,
 				isEmpty:false,//显示空购物车
 				scrollHeight: 'auto',
 				nomoreText: '上拉显示更多',
@@ -501,25 +496,36 @@
 					this.$util.msg("请先选择结算商品~",2000);
 					return
 				}else{
-					/**
-					 * @获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
-					 * @获取勾选的商品分类ID拼接字符串格式逗号隔开,最后一个逗号去掉
-					 */
-					let productID = '';
+					this.isNoConfim = false
 					this.goodsList.forEach(el=>{
 						el.productsList.forEach(pros=>{
 							if(pros.productsChecked){
-							   productID += pros.productID+','
+							   if(pros.productCount<pros.minBuyNumber){
+								   this.isNoConfim = true
+							   }
 							}
 						})
 					})
-					let cartPramsData={
-							allPrice:this.allPrice,
-							allCount:this.allCount,
-							productID:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:''
+					if(this.isNoConfim){
+						this.$util.modal('','有商品的购买量没达到最小起订量,请修改数量后再次提交结算','去修改','',false,() =>{})
+						return;
+					}else{
+						let productID = '';
+						this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
+							el.productsList.forEach(pros=>{
+								if(pros.productsChecked){
+								   productID += pros.productID+','
+								}
+							})
+						})
+						let cartPramsData={
+								allPrice:this.allPrice,
+								allCount:this.allCount,
+								productID:productID.substring(0,productID.lastIndexOf(',')),
+								productCount:''
+						    }
+						this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 					}
-					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 				}
 			},
 			showDelManager(){//显示删除商品管理
@@ -636,7 +642,11 @@
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 			},
 			failureToProduct(failure){
-				if(failure.failureState == 1 || failure.failureState == 2){
+				if(failure.failureState == 1){
+					this.$util.msg('商品已丢失,不能查看',2000)
+					return
+				}else if(failure.failureState == 2){
+					this.$util.msg('商品已停售,不能查看',2000)
 					return
 				}else{
 					this.isModallayer = true;
@@ -659,6 +669,20 @@
 					}
 				})
 				return stateText;
+			},
+			setHeaderBtnPosi(){
+				// 获得胶囊按钮位置信息
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				return headerBtnPosi
+			},
+			setSysteminfo(){
+				let systeminfo;
+				uni.getSystemInfo({ // 获取设备信息
+					success: (res) => {
+						systeminfo = res
+					},
+				})
+				return systeminfo
 			}
 		},
 		watch:{//深度监听所有数据,每次改变重新计算总价和总数
@@ -670,13 +694,6 @@
 		        }
 		    }
 		},
-		// onReachBottom() {
-		// 	if(this.hasNextPage){
-		// 		this.loadding = true
-		// 		this.pullUpOn = true
-		// 		this.getOnReachBottomData()
-		// 	}	
-		// },
 		onPullDownRefresh() {//下拉刷新
 			this.initGetCartGoodsList()
 			uni.stopPullDownRefresh()
@@ -899,6 +916,34 @@
 					&.none{
 						display: none;
 					}
+					.count-tips{
+						width: auto;
+						display: inline-block;
+						padding: 0 15rpx;
+						line-height: 44rpx;
+						height: 44rpx;
+						border-radius: 22rpx;
+						background: $btn-confirm;
+						font-size: $font-size-24;
+						text-align: center;
+						color: #FFFFFF;
+						position: absolute;
+						top:-60rpx;
+						left: -5rpx; 
+						z-index: 5;
+						&::before{
+							content: "";
+							position: absolute;
+							bottom: -30rpx;
+							right: 15rpx;
+							z-index:1;
+							width: 0; 
+							height: 0;
+							border-width: 18rpx;
+							border-style: solid;
+							border-color:$color-system transparent transparent transparent;
+						}
+					}
 					.number-box{
 						display: flex;
 						justify-content: center;
@@ -1006,7 +1051,7 @@
 				}
 				.pros-marks{
 					width: 722rpx;
					height: 250rpx;
-					z-index: 8888;
+					z-index: 9;
 					background: rgba(0,0,0,.05);
 					position: absolute;
 					left:0;

+ 0 - 1
pages/tabBar/home/home.vue

@@ -560,7 +560,6 @@
 				line-height: 36rpx;
 				border-radius: 10rpx;
 				margin-bottom: 20rpx;
-				padding-bottom:20rpx;
 				float: left;
 				&:nth-child(2n){
 					margin-right: 0;

+ 17 - 7
pages/tabBar/user/user.vue

@@ -129,17 +129,20 @@
 				</view>	
 			</view>
 		</view>	
+		<upgrade-alert v-if="isUpgradeAlert" :clubStatus="clubStatus" @unBindUpgrade="hanldUnBindUpgrade"></upgrade-alert>
 	</view>
 </template>
 <script>
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
+	import upgradeAlert from '@/components/cm-module/modelAlert/upgradeAlert.vue'
 	import authorize from '@/common/config/authorize.js'
 	import { mapState,mapMutations } from 'vuex'
-	import { personalInfo } from "@/api/use.js"
+	import { personalInfo,cancelPrompt } from "@/api/use.js"
 	
 	export default{
 		components: {
-			uniBadge
+			uniBadge,
+			upgradeAlert
 		},
 		data() {
 			return{	
@@ -154,6 +157,7 @@
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				StatusBar: this.StatusBar,
+				isUpgradeAlert:false,
 				bgImgUrl:'https://img.caimei365.com/group1/M00/03/94/Cmis216Sk_SAPDwvAAcTspdl8h0610.png',
 				name:'',
 				userType:"",
@@ -188,6 +192,7 @@
 		},
 		methods:{
 			getUserInfo(){
+				let self = this;
 				personalInfo({userID:this.userID}).then(response =>{
 					this.$store.commit('updateAllNum',response.data.count)
 					let data =response.data
@@ -224,10 +229,10 @@
 					this.shipmentsCount = this.showBadge(data.shipmentsCount)//已发货	
 					this.salesReturnCount = this.showBadge(data.salesReturnCount)//退货/款	
 					let clubInfo ={name:this.name,image:this.headpic,clubID:$clubData.clubID}
-					uni.setStorage({//缓存机构
-						key: 'clubInfo',  
-						data: clubInfo  
-					}) 
+					if($userData.tipStatus == '0'){
+						this.isUpgradeAlert = true
+					}
+					uni.setStorage({key: 'clubInfo',data: clubInfo}) 
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
@@ -249,7 +254,12 @@
 						this.$api.navigateTo('/pages/authorization/authorization?type=1')
 					}
 				})	
-			},			
+			},	
+			hanldUnBindUpgrade(){//普通用户不升级会员机构
+				cancelPrompt({ userId:this.userID}).then(response =>{
+					this.isUpgradeAlert = false
+				})
+			},
 			navigatorNex(url){
 				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
 					if(wxResponse == 1){

+ 26 - 14
pages/user/order/create-order.vue

@@ -16,7 +16,7 @@
 		<freight ref="freight" 
 				 v-if="isFreight" 
 				 :freightData="freightData" 
-				 @showFreightAlert="handFreightAlertShow">
+				 @confirmFreight="hanldFreightFn">
 		</freight>
 		<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
 		<!-- 余额抵扣 -->
@@ -62,7 +62,7 @@
 
 <script>
 	import choiceAddress from '@/components/cm-module/creatOrder/choiceAddress'  
-	import goodsList from '@/components/cm-module/creatOrder/goodsList'
+	import goodsList from '@/components/cm-module/creatOrder/goodsList' 
 	import invoiceTent from '@/components/cm-module/creatOrder/invoiceTent'
 	import freight from '@/components/cm-module/creatOrder/freight'
 	import freightAlert from '@/components/cm-module/modelAlert/freightAlert'
@@ -103,6 +103,8 @@
 				isAddress:false,		  //是否加载完成地址
 				isfreightTip:false,		  //控制邮费弹窗
 				ischecked:false,	      //是否勾选余额
+				hanldFreePostFlag:'',	  //邮费状态
+				hanldFreight:'',		  //邮费
 				addressData:{},			  //初始化地址信息
 				goodsData:[],			  //初始化商品信息
 				invoiceData:{type:0},	  //初始化发票信息
@@ -153,7 +155,9 @@
 				getOrderPostage(params).then(response =>{
 					this.isFreight = true
 					this.freightData = response.data
-					if(response.data.freePostFlag== 1){
+					this.hanldFreePostFlag = response.data.freePostFlag
+					this.hanldFreight = response.data.freight
+					if(this.hanldFreePostFlag == 1){
 						this.payAllPrice = this.allPrice + response.data.freight
 					}else{
 						this.payAllPrice = this.allPrice
@@ -182,6 +186,20 @@
 			handleChoiceaInvoiceData(data){//获取发票信息
 				this.invoiceData = data
 			},
+			hanldFreightFn(data){//显示邮费弹窗
+				switch(data){
+					case 1:
+						this.hanldFreight = this.freightData.freight
+						this.hanldFreePostFlag = data
+						this.payAllPrice =this.allPrice + this.hanldFreight
+						break
+					case -1:
+						this.hanldFreight = 0
+						this.hanldFreePostFlag = data
+						this.payAllPrice = this.allPrice
+						break
+				}
+			},
 			checkedBalabce(){//勾选使用余额
 				if(this.userMoney > 0){
 					this.ischecked = !this.ischecked
@@ -189,7 +207,7 @@
 						this.balanceDeductionFlag =1
 						this.attributePallPrice()
 					}else{
-						if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
+						if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
 							this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
 						}else{
 							this.payAllPrice = this.allPrice
@@ -201,7 +219,7 @@
 				}
 			},	
 			attributePallPrice(){//计算价格
-				if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
+				if(this.hanldFreePostFlag == 1 || this.hanldFreePostFlag == '1'){
 					this.attributeHashfreight(this.freightData.freight)
 				}else{
 					this.attributeNofreight()
@@ -251,8 +269,8 @@
 						clauseId:0,//条款(暂时保留)
 						orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
 						balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
-						freight:parseInt(this.freightData.freight).toFixed(2),//邮费
-						freePostFlag:parseInt(this.freightData.freePostFlag)//运费形式
+						freight:parseInt(this.hanldFreight).toFixed(2),//邮费
+						freePostFlag:parseInt(this.hanldFreePostFlag)//运费形式
 					}
 				let param = {
 						orderSource:6,
@@ -282,13 +300,7 @@
 						this.$util.msg(response.msg,2000);
 					}
 				}).catch(error =>{})
-			},
-			handFreightAlertShow(){//显示邮费弹窗
-				this.isfreightTip = true;
-			},
-			hideFreight(){//关闭邮费弹窗
-				this.isfreightTip = false;
-			},
+			}
 			
 		},
 		onShow() {

+ 3 - 3
seller/pages/index/index.vue

@@ -28,9 +28,9 @@
 </template>
 
 <script>
-	import sellerHome from '@/components/seller/home.vue'
-	import sellerUser from '@/components/seller/user.vue'
-	import sellerCategory from '@/components/seller/category.vue'
+	import sellerHome from '@/components/cm-module/cm-seller/home.vue'
+	import sellerUser from '@/components/cm-module/cm-seller/user.vue'
+	import sellerCategory from '@/components/cm-module/cm-seller/category.vue'
 	export default {
 		components: {
 			sellerHome,//采美采购商城 0