Преглед на файлове

Merge branch 'developer' of caimei-repository/caimei-applets-caimei into developerB

郑超 преди 4 години
родител
ревизия
3f9dd4f51c

+ 39 - 1
common/config/common.js

@@ -122,6 +122,42 @@ const utils = {
 			return "";
 		}
 	},
+	throttle: function(fn, gapTime) {
+	  if (gapTime == null || gapTime == undefined) {
+	    gapTime = 1500
+	  }
+	
+	  let _lastTime = null
+	
+	  // 返回新的函数
+	  return function () {
+	    let _nowTime = +new Date()
+	    if (_nowTime - _lastTime > gapTime || !_lastTime) {
+	      fn.apply(this, arguments) //将this和参数传给原函数
+	      _lastTime = _nowTime
+	    }
+	  }
+	},
+	
+	debounce: function(fn, delay, isImmediate) {
+	  var timer = null;  //初始化timer,作为计时清除依据
+	  return function() {
+	    var context = this;  //获取函数所在作用域this
+	    var args = arguments;  //取得传入参数
+	    clearTimeout(timer);
+	    if(isImmediate && timer === null) {
+	        //时间间隔外立即执行
+	        fn.apply(context,args);
+	      timer = 0;
+	      return;
+	    }
+	    timer = setTimeout(function() {
+	      fn.apply(context,args);
+	      timer = null;
+	    }, delay);
+	  }
+	}
+
 }
 
 module.exports = {
@@ -141,5 +177,7 @@ module.exports = {
 	checkData:utils.checkData,
 	hidePhone:utils.hidePhone,
 	interceptHtmlFn:utils.interceptHtmlFn,
-	desensitizationName:utils.desensitizationName
+	desensitizationName:utils.desensitizationName,
+	throttle: utils.throttle,
+	debounce: utils.debounce
 }

+ 2 - 2
common/config/config.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
 	// URL_CONFIG = 'http://192.168.1.33:8008'	 //俊俊联调地址
 	// URL_CONFIG = 'http://192.168.1.40:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.20:8008'	 //超超联调地址
-    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
-	URL_CONFIG = 'https://spi.caimei365.com'
+    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 1 - 3
components/cm-module/listTemplate/commodityList.vue

@@ -104,7 +104,7 @@
 			}
 		},
 		created() {		
-			console.log(this.typeId)
+			// console.log(this.typeId)
 			this.setScrollHeight();		
 			this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.clubStatus = resolve.clubStatus
@@ -165,7 +165,6 @@
 							this.setProductPrice()
 							this.showSkeleton = false
 						}
-						console.log(this.listData)
 						// 防上拉暴滑
 						this.pullFlag = false;
 						setTimeout(()=>{ this.pullFlag = true; },500)
@@ -210,7 +209,6 @@
 								}
 							}
 						});
-						console.log(this.listData)
 					}
 					this.priceLoading = false;
 				}).catch(error =>{

+ 151 - 0
components/cm-module/modelAlert/sellerShareAlert.vue

@@ -0,0 +1,151 @@
+<template name="sharealert">
+	<view class="alert spec" :class="specClass">
+		<view class="model-warp">
+			<view class="content">
+				<view class="text-content">
+					<view class="title">分享订单</view>
+					<view class="share">您的分享码:<text class="txt">{{shareCode}}</text></view>
+					<view class="text">
+						<text>有效期为24小时。订单分享后若对方无法直接登录小程序查看订单,请提供该分享码给对方,通过输入分享码查看</text>
+					</view>
+				</view>				
+				<view class="alert-btn">
+					<view class="btn btn-cancel" @click="hideConfirm">取消</view>
+					<!-- #ifdef MP-WEIXIN -->
+					<button class="btn btn-confirm" open-type="share" @click="btnConfirm(shareCode)">去分享</button>
+					<!-- #endif -->
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { queryOrderShareCode } from "@/api/order.js" 
+	export default{
+		name:'sharealert',
+		props:{
+			orderID:{
+				type:Number
+			}
+		},
+		data() {
+			return{
+				shareCode:'',
+			}
+		},
+		created() {
+			this.getShareCode(this.orderID)
+		},
+		methods:{
+			getShareCode(res){
+				queryOrderShareCode({orderID:res}).then(response =>{
+					this.shareCode = response.data
+					this.$parent.shareCode = this.shareCode;
+				}).catch(error =>{
+					this.$parent.isShareModal = false;
+					this.$util.modal('提示',error.msg,'确定','',false,() =>{})
+				})
+			},
+			hideConfirm(){
+				this.$parent.isShareModal = false
+			},
+			btnConfirm(code){//点击事件
+				this.$emit('btnConfirm')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/*弹窗*/
+	 .model-warp.none{
+		 display: none;
+	 }
+	 .model-warp.show{
+		 display: block;
+	 }
+	 .model-warp{
+		width: 100%;
+		height: 100%;
+		background: rgba(0,0,0,0.3);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10000;
+		transition: all 0.4s;
+		&.none{
+			display: none;			
+		}
+		&.show{
+			display: block;
+		}
+		.content{
+			width: 518rpx;
+			height: 418rpx;
+			position: absolute;
+			background: $bg-color;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			top: 0;
+			margin: auto;
+			border-radius: 24rpx;
+			.text-content{
+				width: 448rpx;
+				height: 264rpx;
+				padding: 20rpx 35rpx;
+				float: left;
+				.title{
+					line-height: 40rpx;
+					font-size: $font-size-28;
+					color: $text-color;
+					text-align: center;
+					font-weight: bold;
+					margin-bottom: 36rpx;
+				}
+				.share{
+					line-height: 36rpx;
+					font-size: $font-size-26;
+					color: $text-color;
+					text-align: justify;
+					margin-top: 22rpx;
+					font-weight: normal;
+					.txt{
+						margin-left: 10rpx;
+						color: #FF2A2A;
+					}
+				}
+				.text{
+					line-height: 36rpx;
+					font-size: $font-size-26;
+					color: $text-color;
+					text-align: justify;
+					margin-top: 22rpx;
+				}
+			}
+			.alert-btn{
+				width: 80%;
+				height: 70rpx;
+				display: flex;
+				margin: 0 auto;
+				.btn{
+					flex: 1;
+					line-height: 70rpx;
+					font-size: $font-size-28;
+					text-align: center;
+					color: #FFFFFF;
+					border-radius: 14rpx;
+					padding: 0;
+					margin: 0 15rpx;
+					&.btn-cancel{
+						background: $btn-cancel;
+					}
+					&.btn-confirm{
+						background: $btn-confirm;
+					}
+				}
+			}
+		}	
+	}
+</style>

+ 78 - 9
h5/pages/activity/activity_mid.vue

@@ -59,7 +59,7 @@
 									<text class="none">¥<text>???</text></text>
 								</view>
 								<view class="price-right">
-									<view class="login-btn" @click.stop="navigator()">登录</view>
+									<view class="login-btn" @click.stop="navigator">登录</view>
 								</view>
 							</view>
 						</template>
@@ -78,10 +78,14 @@
 
 <script>
 	import { mapState,mapMutations} from 'vuex';
+	import { debounce } from '@/common/config/common.js'
 	import authorize from '@/common/config/authorize.js'
+	
+	console.log(this)
 	export default {
 	    data() {
 	        return {
+			  winHeight: '',
 	          topBanner:'',
 			  userIdentity:'',
 			  clubStatus:'',
@@ -95,7 +99,10 @@
 			  	list: [],
 			  }, 
 			  dataList:[],
+			  tabSelectFlag: false,
+			  sectionPropsArr: [],
 			  scrollTopArray:[],
+			  sectionTopRangeArr: [],
 			  scrollTopIndex:0,
 			  hanldeProductID:0,
 			  hanldeProductName:'',
@@ -107,6 +114,7 @@
 				this.clubStatus = resolve.clubStatus
 				this.userIdentity = resolve.userIdentity
 			})
+			this.getWinHeight();
 			this.initData()
 			uni.setNavigationBarTitle({title:'年中大促'});
 		},
@@ -114,6 +122,9 @@
 			...mapState(['hasLogin','userInfo'])
 		},
 		methods:{
+			getWinHeight() {
+				this.winHeight = wx.getSystemInfoSync().windowHeight;
+			},
 			initData(){
 				this.ActivityService.GetRepeatActivityBrandList().then(response =>{
 					let data = response.data
@@ -146,11 +157,68 @@
 						item.productList = newProductList
 					})
 					this.isRequest = true
+					// 老郑你看下要不要加延时,可能会获取不到scrollTop
+					setTimeout(()=>{
+						this.getSectionProps();
+					},2000)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+			getSectionProps() {
+				// 获取每个tab对应区域的scrollTop值
+				let className = '.activity-section',
+					sectionPropsArr = [];
+				uni.createSelectorQuery().select('.topBanner').boundingClientRect((data)=>{//最外层盒子节点
+				  uni.createSelectorQuery().selectAll(className).boundingClientRect((res)=>{//最外层盒子节点
+						res.forEach((item, index) => {
+							sectionPropsArr.push({
+								className: `${className}${index}`,
+								scrollTop: item.top - data.top - 50
+							})
+						})
+						this.sectionPropsArr = sectionPropsArr;
+						this.sectionTopRangeArr = this.getSectionRange(sectionPropsArr);
+				  }).exec()
+				}).exec()
+			},
+			getSectionRange(arr) {
+				// 获取每个tab对应区域的区间
+				let sectionScrollTopList = [];
+				for(let i = 0; i < arr.length; i++) {
+					let thisScrollTop = arr[i].scrollTop;
+					if(i < arr.length - 1) {
+						let nextScrollTop = arr[i+1].scrollTop;
+						if(i == 0) {
+							sectionScrollTopList.push(`0-${thisScrollTop}`);
+						} else if(i == arr.length - 2){
+							sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop - this.winHeight}`);
+						} else {
+							sectionScrollTopList.push(`${thisScrollTop}-${nextScrollTop}`);
+						}
+					} else {
+						sectionScrollTopList.push(`${thisScrollTop-this.winHeight}-${thisScrollTop}`);
+					}
+				}
+				return sectionScrollTopList;
+			},
+			activeTab: debounce((top, _this)=> {
+				// 当滑动时也能同步激活tab
+				const { sectionTopRangeArr } = _this;
+				if(sectionTopRangeArr.length > 0) {
+					sectionTopRangeArr.forEach((item, index) => {
+						let splitItem = item.split('-'),
+							openInterval = Number(splitItem[0]),
+							closedInterval = Number(splitItem[1]);
+						if(top >= openInterval && top < closedInterval) {
+							_this.headTab.TabCur = index;
+							_this.headTab.scrollLeft = (index - 1) * 60;
+						}
+					})
+				}
+			},100, true),
 			tabSelect(index,item) {//tab菜单被点击
+				this.tabSelectFlag = true;
 				this.headTab.TabCur = index;
 				this.headTab.scrollLeft = (index - 1) * 60;
 				let classIndex = '.activity-section-'+index;
@@ -160,6 +228,9 @@
 				      duration:300,//过渡时间必须为0,uniapp bug,否则运行到手机会报错
 				      scrollTop:res.top - data.top - 50,//滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离
 				    })
+						setTimeout(()=>{
+							this.tabSelectFlag = false;
+						},500)
 				  }).exec()
 				}).exec()
 			},
@@ -172,6 +243,7 @@
 			navigator(){
 				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
 					if(wxResponse == 1){
+						this.$store.commit('setLoginType',9)
 						this.$api.navigateTo('/pages/login/login?type=0')
 					}else{
 						this.$api.navigateTo('/pages/authorization/authorization?type=1')
@@ -197,13 +269,6 @@
 				    duration: 600
 				});
 			},
-			createSelectorQuery(event){
-				let self = this
-				let indexLength = this.scrollTopArray.length
-				let index = this.scrollTopArray[2]
-				let classIndex  = '.activity-section-'+index;
-				this.onCreateSelectorQuery(event,index,classIndex)
-			},
 			onCreateSelectorQuery(event,index,classIndex){
 				let self = this
 				uni.createSelectorQuery().select(classIndex).boundingClientRect((res)=>{//最外层盒子节点4
@@ -218,7 +283,6 @@
 				}).exec()
 			}
 		},
-		
 		onShareAppMessage (res){//小程序三点分享转发
 			if (res.from === 'button') {
 				// 来自页面内转发按钮
@@ -230,6 +294,11 @@
 			}
 		},
 		onPageScroll(e){//实时获取到滚动的值
+			const { scrollTop } = e;
+			if(!this.tabSelectFlag) {
+				this.activeTab(scrollTop, this);
+			}
+			
 			if(e.scrollTop > 450){
 				this.inputActive = 'fixed'
 			}else{

+ 1 - 1
manifest.json

@@ -60,7 +60,7 @@
         "setting" : {
             "urlCheck" : true,
             "minified" : true,
-            "es6" : false,
+            "es6" : true,
             "postcss" : true
         },
         "usingComponents" : true,

+ 6 - 1
pages.json

@@ -161,7 +161,12 @@
 		},{
 			"path": "pages/user/order/orderShareLogin",
 			"style": {
-				"navigationBarTitleText": "订单详情"
+				"navigationBarTitleText": "输入分享码"
+			}
+		},{
+			"path": "pages/user/order/order-sharelogin",
+			"style": {
+				"navigationBarTitleText": "查看订单"
 			}
 		},{
 			"path": "pages/user/order/myOrder",

+ 3 - 1
pages/goods/product.vue

@@ -508,7 +508,9 @@
 			navToLogin(){
 				authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
 					if(wxResponse == 1){
-						this.$api.navigateTo(`/pages/login/login?type=detilType&id=${this.productID}`)
+						this.$store.commit('setLoginType',8)
+						this.$store.commit('setLoginProductId',this.productID)
+						this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
 					}else{
 						this.$api.navigateTo('/pages/authorization/authorization?type=1')
 					}

+ 0 - 4
pages/login/apply.vue

@@ -394,10 +394,6 @@ import { mapMutations } from 'vuex';
 					this.$util.msg('请填写机构详细地址',2000);
 					return
 				}
-				if( this.socialCreditCode == ''){
-					this.$util.msg('请填写社会统一社会信用代码',2000);
-					return
-				}
 				if( this.uploadBusinessImage == ''){
 					this.$util.msg('请上传您的营业执照',2000);
 					return

+ 16 - 1
pages/login/bindwechat.vue

@@ -92,6 +92,9 @@
 		onLoad(option) {
 			this.getVerificationCode()
 		},
+		computed: {
+			...mapState(['isWxAuthorize','isLoginType','isLoginProductId','isLoginOrderId'])
+		},
 		methods:{
 			...mapMutations(['login']),
 			bindWechatInfo(){
@@ -182,7 +185,19 @@
 						}
 						// console.log(params)
 						bindingWechat(params).then(response =>{
-							this.$api.switchTabTo('/pages/tabBar/user/user')
+							switch(this.isLoginType){
+								case 9:
+									this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+									break;
+								case 8:
+									this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
+									break;
+								case 7:
+									this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.isLoginOrderId}`)
+									break;
+								default:
+									this.$api.switchTabTo('/pages/tabBar/user/user')
+							}
 						}).catch(error =>{
 							this.$util.msg(error.msg,2000)
 						})							

+ 2 - 1
pages/login/login.vue

@@ -57,7 +57,7 @@
 			this.getOption = JSON.stringify(option)
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+			...mapState(['hasLogin','isWxAuthorize','isLoginType'])
 		},
 		methods:{
 			...mapMutations(['login']),
@@ -99,6 +99,7 @@
 			authorize.getSetting().then(wxResponse =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
 				if(wxResponse == 1){
 					wxLogin.wxLoginQuick()
+					console.log(this.isLoginType)
 				}else{
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
 				}	

+ 10 - 1
pages/login/logincode.vue

@@ -50,7 +50,16 @@
 						}							
 						invitationCodeLogin(params).then(response =>{
 							this.login(response.data)
-							this.$api.switchTabTo('/pages/tabBar/home/home')
+							switch(this.isLoginType){
+								case 9:
+									this.$api.navigateTo(`/h5/pages/activity/activity_mid`)
+									break;
+								case 8:
+									this.$api.navigateTo(`/pages/goods/product?id=${this.isLoginProductId}`)
+									break;
+								default:
+									this.$api.switchTabTo('/pages/tabBar/user/user')
+							}
 						}).catch(error =>{
 							this.$util.msg(error.msg,2000)
 							this.isUserInfo = false

+ 1 - 1
pages/search/search-order.vue

@@ -376,7 +376,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
 				}
 			},

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

@@ -42,7 +42,7 @@
 						<view class="order-item" @click="navigator('/pages/user/order/order-list?state=1')" hover-class="common-hover"  :hover-stay-time="50">
 							<view class="order-icon">
 								<image src="../../../static/temp/order5@3x.png" mode=""></image>
-								<text 	v-if="confirmedCount>0" 
+								<text 	v-if="confirmedCount>0 && hasLogin" 
 										class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
 										:class="[confirmedCount < 10 ? 'goleft':'']">
 										{{confirmedCount == 99? '99+' : confirmedCount}}
@@ -53,7 +53,7 @@
 						<view class="order-item" @click="navigator('/pages/user/order/order-list?state=2')"  hover-class="common-hover" :hover-stay-time="50">
 							<view class="order-icon">
 								<image src="../../../static/temp/order1@3x.png" mode=""></image>
-								<text  v-if="paymentCount >0" 
+								<text  v-if="paymentCount >0 && hasLogin" 
 									   class="uni-badge uni-badge-error uni-small uni-badge--small icon-num " 
 									   :class="[paymentCount < 10 ? 'goleft':'']">
 									   {{paymentCount == 99? '99+' : paymentCount}}
@@ -64,7 +64,7 @@
 						<view class="order-item" @click="navigator('/pages/user/order/order-list?state=3')" hover-class="common-hover"  :hover-stay-time="50">
 							<view class="order-icon">
 								<image src="../../../static/temp/order2@3x.png" mode=""></image>
-								<text   v-if="waitShipmentsCount >0" 
+								<text   v-if="waitShipmentsCount >0 && hasLogin" 
 										class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
 										:class="[waitShipmentsCount < 10 ? 'goleft':'']">
 										{{waitShipmentsCount == 99? '99+' : waitShipmentsCount}}
@@ -75,7 +75,7 @@
 						<view class="order-item" @click="navigator('/pages/user/order/order-list?state=4')" hover-class="common-hover"  :hover-stay-time="50">
 							<view class="order-icon">
 								<image src="../../../static/temp/order3@3x.png" mode=""></image>
-								<text 	v-if="shipmentsCount>0" 
+								<text 	v-if="shipmentsCount>0 && hasLogin" 
 										class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
 										:class="[shipmentsCount < 10 ? 'goleft':'']">
 										{{shipmentsCount == 99? '99+' : shipmentsCount}}
@@ -86,7 +86,7 @@
 						<view class="order-item" @click="navigator('/pages/user/order/order-list?state=5')" hover-class="common-hover"  :hover-stay-time="50">
 							<view class="order-icon">
 								<image src="../../../static/temp/order4@3x.png" mode=""></image>
-								<text 	v-if="salesReturnCount >0"
+								<text 	v-if="salesReturnCount >0 && hasLogin"
 										class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
 										:class="[salesReturnCount < 10 ? 'goleft':'']">
 										{{salesReturnCount == 99? '99+' : salesReturnCount}}

+ 5 - 2
pages/user/order/create-order.vue

@@ -306,9 +306,12 @@
 						this.$api.navigateTo(`/pages/user/order/success?data=${JSON.stringify({data:data})}`)
 					}else if(response.code === 2){
 						this.submitState ='confirm'
-						this.$api.redirectTo(`/pages/user/order/order-payment?type=${this.submitState}&orderID=${response.data.orderID}`)
+						this.$util.msg('订单提交成功',3000,true,'success')
+						setTimeout(()=>{
+							this.$api.redirectTo(`/pages/user/order/order-payment?type=${this.submitState}&orderID=${response.data.orderID}`)
+						},3000)
 					}else{
-						this.$util.msg(response.msg,2000);
+						this.$util.msg(response.msg,3000);
 					}
 				}).catch(error =>{})
 			},

+ 1 - 1
pages/user/order/myOrder.vue

@@ -322,7 +322,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
 				}
 			},

+ 1 - 1
pages/user/order/order-cashier.vue

@@ -156,7 +156,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.shareOrderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.shareOrderID}&userID=${this.userID}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 1 - 1
pages/user/order/order-details.vue

@@ -208,7 +208,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.orderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.orderID}&userID=${this.userID}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 1 - 1
pages/user/order/order-list.vue

@@ -375,7 +375,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 87 - 6
pages/user/order/order-payment.vue

@@ -1,9 +1,31 @@
 <template>
 	<view class="container cashier" :style="{paddingTop:CustomBar+'px'}">
 		<cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
-		<view class="container-cash clearfix">
+		<view class="container-cash clearfix" v-if="invoiceStatus">
+			<view class="pay-bring-title">本次交易暂不支持线上支付,请使用线下转账方式付款</view>
+			<view class="container-wrapper">
+				<view class="pay-content">
+					<view class="pay-p"><text>待付金额</text></view>
+					<view class="pay-money">
+						<text class="pay-sm">¥</text>
+						<text class="pay-bg">{{payableAmount | NumFormat}}</text>
+					</view>
+				</view>
+			</view>
+			<view class="pay-bring-wrapper clearfix">
+				<view class="pay-bring-content">
+					<view class="text-v title">转账信息</view>
+					<view class="text-v">开户行:中信银行(深圳泰然支行)</view>
+					<view class="text-v">银行卡号:{{bankNumber}}</view>
+					<view class="text-v">户名:周仁声</view>
+					<view class="text-v">订单标识:{{payOrderId}} <text class="clipboard" @click.stop="clipboard(payOrderId)">复制</text></view>
+					<view class="text-v title">特别注意</view>
+					<view class="text-v bg-color">请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</view>
+				</view>
+			</view>
+		</view>		
+		<view class="container-cash clearfix" v-else>
 			<view class="container-wrapper">
-				<view class="pay-title" v-show="isConfirm"><text>订单提交成功,请支付订单</text></view>
 				<view class="pay-content">
 					<view class="pay-p"><text>待付金额</text></view>
 					<view class="pay-money">
@@ -94,7 +116,6 @@
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				tabCurrentIndex:0,
 				isShowTip:false,
-				isConfirm:false,
 				isReceiptStatus:false,
 				buttonText:'使用微信支付',
 				btnColor:'#09BB07',
@@ -134,14 +155,14 @@
 			initData(e){
 				switch(e.type){
 					case 'confirm':
-						this.isConfirm = true
 						this.nvabarData.haveBack = false
 						this.nvabarData.haveHome = true
+						this.nvabarData.title = '支付'
 						break;
 					case 'payfirm':
-						this.isConfirm = false
 						this.nvabarData.haveBack = true
 						this.nvabarData.haveHome = false
+						this.nvabarData.title = '选择支付方式'
 						break;
 				}
 				this.orderID = e.orderID
@@ -219,10 +240,21 @@
 <style lang="scss">
 	page{
 		height: auto !important;
-		background-color: #F7F7F7;
+		background-color: #FFFFFF;
 	}
 	.container-cash{
 		width: 100%;
+		.pay-bring-title{
+			box-sizing: border-box;
+			width: 100%;
+			height: 96rpx;
+			padding: 0 24rpx;
+			line-height: 96rpx;
+			text-align: left;
+			font-size: $font-size-24;
+			background:rgba(255,234,221,1);
+			color: $color-system;
+		}
 		.container-wrapper{
 			width:662rpx;
 			margin: 0 auto;
@@ -469,6 +501,55 @@
 				}
 			}
 		}
+		.pay-bring-wrapper{
+			width: 100%;
+			padding: 24rpx 0;
+			background-color: #FFFFFF;
+			display: flex;
+			align-items: center;
+			flex-direction: column;
+			.pay-bring-content{
+				width: 654rpx;
+				height: auto;
+				padding: 0 24rpx;
+				.text{
+					font-size: $font-size-24;
+					color: #666;
+					line-height: 44rpx;
+					text-align: center;
+					&.bg-color{
+						color: $color-system;
+						line-height: 88rpx;
+					}
+				}
+				.text-v{
+					font-size: $font-size-28;
+					color: #999;
+					line-height: 70rpx;
+					text-align: left;
+					&.title{
+						font-size: $font-size-28;
+						color: #666666;
+					}
+					&.bg-color{
+						line-height: 44rpx;
+						color: $color-system;
+					}
+					.clipboard{
+						width: 84rpx;
+						height: 36rpx;
+						background:linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
+						text-align: center;
+						font-size: $font-size-24;
+						color: #FFFFFF;
+						border-radius: 4rpx;
+						line-height: 36rpx;
+						display: inline-block;
+						margin-left: 10rpx;
+					}
+				}
+			}
+		}
 	}
 	.freight-alert{
 		width: 100%;

+ 255 - 0
pages/user/order/order-sharelogin.vue

@@ -0,0 +1,255 @@
+<template>
+	<view class="container login" v-if="isShareStatus">
+		<view class="container-main clearfix">
+			<view class="main-title">此订单包含如下商品:</view>
+			<view class="main-list clearfix">
+				<view class="main-list-item" v-for="(item, index) in productList" :key="index">
+					<view class="item-image">
+						<image :src="item.productImage" mode="widthFix"></image>
+					</view>
+					<view class="item-mesage">
+						<view class="item-name">{{item.name}}</view>
+						<view class="item-num"><text>X</text>{{item.num}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="container-footer">
+			<view class="login-btn" @click.stop="goLogin(1)">账号登录查看</view>
+			<view class="login-btn" @click.stop="goLogin(2)">使用分享码查看</view>
+			<view class="pay-statustext">
+				<view class="pay-statustext-inner">
+					<view class="pay-icon">
+						<text class="iconfont icon-gantanhao-yuankuang"></text>
+					</view>
+					<view class="pay-text">
+						<text>使用账号登录支持确认订单和直接付款,使用分享码只支持查看订单,不能操作</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import authorize from '@/common/config/authorize.js' 
+	import { orderShareCode } from "@/api/order.js" 
+	export default{
+		data() {
+			return{
+				imagePath:'https://img.caimei365.com/group1/M00/03/83/Cmis214FbbCAQhKoAAKWfqqSIds292.png',
+				shareCode:'',  		//获取用户登录的邀请码
+				isUserInfo:false,	//控制显示授权弹窗
+				nickName:'',		//存储用户名
+				userInfo:'',		//存储微信用户授权信息
+				orderID:0,			//订单ID
+				userID:0,			//分享人的用户ID
+				isShareStatus:false,
+				serviceProviderId:'',
+				productList:[]
+			}
+		},
+		onLoad(e) {
+			console.log(e)
+			this.orderID = e.orderID
+			this.userID = e.userID
+			if(e.serviceProviderId){
+				this.serviceProviderId = e.serviceProviderId
+			}
+		},
+		methods:{
+			initQueryUser(){
+				authorize.getCode('weixin').then(wechatcode =>{
+					let params ={
+							code:wechatcode,
+							orderID:this.orderID,
+							userID:this.userID,
+							shareCode:this.shareCode,
+							serviceProviderId:this.serviceProviderId
+						}
+					orderShareCode(params).then(response =>{
+						console.log(response.code)
+						if(response.code === 2){
+							this.$api.navigateTo(`/seller/pages/order/order-details?type=share&orderID=${this.orderID}`)
+						}else if(response.code === 0) {
+							console.log(response.data)
+							if(response.data == true){//同为会所运营人员查看订单详情
+								this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.orderID}`)
+							}else{//游客第二次查看订单详情
+								this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderID=${this.orderID}`)
+							}
+						}else if(response.code === -2){
+							this.$util.modal('提示',response.msg,'确定','',false,() =>{})
+						}else{
+							this.getOrderCommodityData()
+						}
+					})
+				})
+			},
+			getOrderCommodityData(){
+				this.OrderService.OrderCommodityData({orderId:this.orderID}).then(response =>{
+					this.productList = response.data
+					this.isShareStatus = true
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			goLogin(index){
+				switch(index){
+					case 1:
+						this.$store.commit('setLoginType',7)
+						this.$store.commit('setLoginOrderId',this.orderID)
+						this.$api.navigateTo('/pages/login/login')
+						break;
+					case 2:
+						this.$api.navigateTo(`/pages/user/order/orderShareLogin?orderID=${this.orderID}&userID=${this.userID}`)
+						break;
+				}
+			}
+		},
+		onShow() {
+			this.initQueryUser()
+		}
+	}
+</script>
+
+<style lang="scss">
+	.login{
+		width: 100%;
+		height:100%;
+		background: #F7F7F7;
+		.model-warp.none{
+			display: none;			
+		}
+		.model-warp.show{
+			display: block;
+		}
+		.container-main{
+			width: 100%;
+			height: auto;
+			padding-top:80rpx ;
+			padding-bottom: 352rpx;
+			.main-title{
+				width: 100%;
+				height: 80rpx;
+				padding: 0 20rpx;
+				background-color: #F7F7F7;
+				line-height: 80rpx;
+				text-align: left;
+				font-size: $font-size-30;
+				color: #333;
+				box-sizing: border-box;
+				position: fixed;
+				top: 0;
+				left: 0;
+			}
+			.main-list{
+				box-sizing: border-box;
+				width: 100%;
+				height: auto;
+				background-color: #FFFFFF;
+				.main-list-item{
+					box-sizing: border-box;
+					width: 100%;
+					height: 200rpx;
+					padding: 20rpx;
+					border-bottom: 1px solid #F7F7F7;
+					.item-image{
+						width: 160rpx;
+						height: 160rpx;
+						float: left;
+						image{
+							width: 160rpx;
+							height: 160rpx;
+							display: block;
+						}
+					}
+					.item-mesage{
+						width: 530rpx;
+						height: 160rpx;
+						float: left;
+						margin-left: 20rpx;
+						.item-name{
+							width: 100%;
+							height:84rpx;
+							line-height: 42rpx;
+							font-size: $font-size-28;
+							color: #333333;
+							text-align: justify;
+							text-overflow:ellipsis;
+							display: -webkit-box;
+							word-break: break-all;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 2;
+							overflow: hidden;
+						}
+						.item-num{
+							width: 100%;
+							height:46rpx;
+							line-height: 46rpx;
+							margin-top: 30rpx;
+							font-size: $font-size-28;
+							color: #333333;
+							text-align: left;
+							text{
+								font-size: $font-size-20;
+							}
+						}
+					}
+				}
+			}
+		}
+		.login-btn{
+			width: 702rpx;
+			height: 88rpx;
+			font-size: $font-size-28;
+			line-height: 88rpx;
+			color: #FFFFFF;
+			margin: 0 auto;
+			margin-bottom: 24rpx;
+			text-align: center;
+			background: $btn-confirm;
+			border-radius: 14rpx;
+		}
+		.container-footer{
+			box-sizing: border-box;
+			width: 100%;
+			height: 352rpx;
+			padding: 0 24rpx;
+			padding-top: 24rpx;
+			padding-bottom: 24rpx;
+			background-color: #FFFFFF;
+			position: fixed;
+			bottom: 0;
+			left: 0;
+		}
+		.pay-statustext{
+			width: 100%;
+			height: auto;
+			float: left;
+			.pay-statustext-inner{
+				width: 100%;
+				margin: 0 auto;
+				.pay-icon{
+					width: 62rpx;
+					height: 100%;
+					float: left;
+					text-align: center;
+					.iconfont{
+						color: $color-system;
+						font-size:$font-size-36;
+						line-height: 20rpx;
+					}
+				}
+				.pay-text{
+					width: 635rpx;
+					height: 100%;
+					float: left;
+					line-height: 40rpx;
+					font-size: $font-size-26;
+					color: $color-system;
+					text-align: justify;
+				}
+			}
+		}
+	}
+</style>

+ 2 - 34
pages/user/order/orderShareLogin.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="container login" v-if="isShareStatus">
+	<view class="container login">
 		<view class="login-main">
 			<image class="logo" :src="imagePath" mode=""></image>
 		</view>
@@ -28,46 +28,14 @@
 				orderID:0,			//订单ID
 				userID:0			,//分享人的用户ID
 				isShareStatus:false,
-				serviceProviderId:''
 			}
 		},
 		onLoad(e) {
 			console.log(e)
 			this.orderID = e.orderID
 			this.userID = e.userID
-			if(e.serviceProviderId){
-				this.serviceProviderId = e.serviceProviderId
-			}
 		},
 		methods:{
-			initQueryUser(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					let params ={
-							code:wechatcode,
-							orderID:this.orderID,
-							userID:this.userID,
-							shareCode:this.shareCode,
-							serviceProviderId:this.serviceProviderId
-						}
-					orderShareCode(params).then(response =>{
-						console.log(response.code)
-						if(response.code === 2){
-							this.$api.navigateTo(`/seller/pages/order/order-details?type=share&orderID=${this.orderID}`)
-						}else if(response.code === 0) {
-							console.log(response.data)
-							if(response.data == true){//同为会所运营人员查看订单详情
-								this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.orderID}`)
-							}else{//游客第二次查看订单详情
-								this.$api.redirectTo(`/pages/user/order/order-sharedetails?orderID=${this.orderID}`)
-							}
-						}else if(response.code === -2){
-							this.$util.modal('提示',response.msg,'确定','',false,() =>{})
-						}else{
-							this.isShareStatus = true
-						}
-					})
-				})
-			},
 			goLogin() {
 				if(this.shareCode == ''){
 					this.$util.msg('请联系分享人获取分享码',2000);
@@ -95,7 +63,7 @@
 			},
 		},
 		onShow() {
-			this.initQueryUser()
+			
 		}
 	}
 </script>

+ 0 - 4
seller/pages/login/apply.vue

@@ -495,10 +495,6 @@ import { mapMutations } from 'vuex';
 					this.$util.msg('请填写机构详细地址',2000);
 					return
 				}
-				if( this.socialCreditCode == ''){
-					this.$util.msg('请填写社会统一社会信用代码',2000);
-					return
-				}
 				if( this.uploadBusinessImage == ''){
 					this.$util.msg('请上传您的营业执照',2000);
 					return

+ 0 - 4
seller/pages/login/register.vue

@@ -359,10 +359,6 @@
 						this.$util.msg('请填写机构详细地址',2000);
 						return
 					}
-					if( this.socialCreditCode == ''){
-						this.$util.msg('请填写社会统一社会信用代码',2000);
-						return
-					}
 					if( this.uploadBusinessImage == ''){
 						this.$util.msg('请上传您的营业执照',2000);
 						return

+ 1 - 1
seller/pages/order/myOrder.vue

@@ -322,7 +322,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAWWkhAAXDP4-6m_c397.png'
 				}
 			},

+ 3 - 3
seller/pages/order/order-details.vue

@@ -42,7 +42,7 @@
 	import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'		 //支付记录
 	import refundRecord from '@/components/cm-module/orderDetails/refundRecord'		 //退款记录
 	import orderButton from '@/components/cm-module/orderDetails/sellerDetaileButton'	 //底部按钮
-	import shareAlert from '@/components/cm-module/modelAlert/shareAlert.vue'			 //分享弹窗
+	import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert.vue'			 //分享弹窗
 	import { queryOrderDetails,cancelOrder,deleteOrder,affirmOrder } from "@/api/order.js" 
 	export default {
 		components:{
@@ -186,8 +186,8 @@
 					// 来自页面内转发按钮
 			    }
 				return {
-					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.orderID}&userID=${this.userID}&serviceProviderId=${this.serviceProviderId}`,
+					title: '您有新的订单,请点击查看~',
+					path: `/pages/user/order/order-sharelogin?orderID=${this.orderID}&userID=${this.userID}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 1 - 1
seller/pages/order/order-historylist.vue

@@ -356,7 +356,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 3 - 3
seller/pages/order/order-list.vue

@@ -110,7 +110,7 @@
 	import orderButton from '@/components/cm-module/orderDetails/sellerOrderButton' //操作按钮
 	import modalLayer from "@/components/modal-layer"
 	import empty from "@/components/empty";
-	import shareAlert from '@/components/cm-module/modelAlert/shareAlert'			 //分享弹窗
+	import shareAlert from '@/components/cm-module/modelAlert/sellerShareAlert'			 //分享弹窗
 	import { cancelOrder,deleteOrder, affirmOrder } from "@/api/order.js"
 	import { getSellerOrderList } from "@/api/seller.js" 
 	
@@ -384,8 +384,8 @@
 					// console.log(res.target)
 			    }
 				return {
-					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
+					title: '您有新的订单,请点击查看~',
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 1 - 1
seller/pages/search/search-order.vue

@@ -353,7 +353,7 @@
 			    }
 				return {
 					title: '您有新的分享订单,快来查看吧~',
-					path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
+					path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
 					imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
 				}
 			},

+ 2 - 2
services/ajax.env.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
 	// URL_CONFIG = 'http://192.168.1.33:8008'	 //俊俊联调地址
 	// URL_CONFIG = 'http://192.168.1.40:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.20:8008'	 //超超联调地址
-    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
-	URL_CONFIG = 'https://spi.caimei365.com'
+    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 9 - 1
services/index.js

@@ -1,3 +1,5 @@
+import Vue from 'vue'
+
 import ajaxService from './ajax.service.js'
 import CommonService from './common.service'
 import LocateService from './locate.service'
@@ -7,7 +9,9 @@ import PayService from './pay.service'
 import PhotoService from './photo.service'
 import SellerService from './sellse.service'
 import ActivityService from './activity.service'
-import Vue from 'vue'
+import OrderService from './order.service'
+
+
 let commonService = new CommonService(ajaxService)
 let locateService = new LocateService(ajaxService)
 let userService = new UserService(ajaxService)
@@ -16,6 +20,9 @@ let payService = new PayService(ajaxService)
 let photoService = new PhotoService(ajaxService)
 let sellerService = new SellerService(ajaxService)
 let activityService = new ActivityService(ajaxService)
+let orderService = new OrderService(ajaxService)
+
+
 Vue.prototype.AjaxService = ajaxService
 Vue.prototype.CommonService = commonService
 Vue.prototype.LocateService = locateService
@@ -25,3 +32,4 @@ Vue.prototype.PayService = payService
 Vue.prototype.PhotoService = photoService
 Vue.prototype.SellerService = sellerService
 Vue.prototype.ActivityService = activityService
+Vue.prototype.OrderService = orderService

+ 14 - 0
services/order.service.js

@@ -0,0 +1,14 @@
+/**
+ * 这是与购物有关的业务逻辑的服务
+ */
+export default class OrderService {
+	constructor(AjaxService) {
+		Object.assign(this, { AjaxService })
+		this.name = 'OrderService'
+	}
+	/* 分享订单初始化查询 orderId 订单ID */
+	OrderCommodityData (data = {}) {
+		return this.AjaxService.get({ url:'/order/commodityData', data, isLoading: true })
+	}
+
+}

+ 21 - 2
store/index.js

@@ -13,6 +13,8 @@ const store = new Vuex.Store({
 		cartNumber:0,
 		isIphoneX:false,
 		isActivity:false,
+		isLoginType:0,
+		isLoginProductId:0
 	},
 	mutations: {
 		login(state, provider) {
@@ -74,11 +76,25 @@ const store = new Vuex.Store({
 		setChangeVar(state,variable){
 			//获取设备信息是否为IphoneX
 			state.isIphoneX = variable;
-			console.log(state.isIphoneX);
 		},
 		setIsIphone(state,variable){
 			//获取设备信息是否为IphoneX
 			state.isIphone = variable;
+		},
+		setLoginType(state,variable){
+			//获取设备信息是否为IphoneX
+			state.isLoginType = variable;
+			console.log(state.isLoginType);
+		},
+		setLoginProductId(state,variable){
+			//获取设备信息是否为IphoneX
+			state.isLoginProductId = variable;
+			console.log(state.isLoginProductId);
+		},
+		setLoginOrderId(state,variable){
+			//获取设备信息是否为IphoneX
+			state.isLoginOrderId = variable;
+			console.log(state.isLoginOrderId);
 		}
 	},
 	actions:{
@@ -90,7 +106,10 @@ const store = new Vuex.Store({
 		},
 		setActivityFn:function(context,vData){
 			context.commit('setActivity',vData)
-		}
+		},
+		// setLoginTypeFn:function(context,vData){
+		// 	context.commit('setLoginType',vData)
+		// }
 	}
 })