Bläddra i källkod

commit -m 测试修复

zhengjinyi 4 år sedan
förälder
incheckning
3f7fc9f466

+ 1 - 1
components/cm-custom/ws-custom.vue

@@ -111,7 +111,7 @@
 		    },
 		    _goHome: function () {
 		      	uni.reLaunch({
-		        	url: '/pages/index/index'
+		        	url: '/pages/tabBar/index/index'
 		      	})
 		    }
 		},

+ 2 - 3
components/cm-module/productDetails/cm-price.vue

@@ -8,8 +8,7 @@
 				<text class="txt big">{{ showIndexOfMoney }} </text>
 				<text class="txt sm">{{ smallMoney }} </text>
 			</view>
-			<view class="floor-item-act" v-if="product.activeStatus == -1">
-				<text class="tag tag-01">促销</text>
+			<view class="floor-item-act" v-if="product.activeStatus == 1">
 				<view class="tag tag-02" @click.stop="clickPopupShow()">活动价</view>
 			</view>
 		</view>
@@ -167,7 +166,7 @@ export default {
 					this.showIndexOfMoney=this.$api.FormatMoney(this.ableUserMoney)
 					this.smallMoney=".00"
 				}else{
-					this.smallMoney = this.ableUserMoney.toString().substring(i,i+3);
+					this.smallMoney = this.ableUserMoney.toString().substring(i);
 					this.showIndexOfMoney= this.$api.FormatMoney(this.ableUserMoney.toString().substring(0,i))
 					if(this.smallMoney.length == 2) { //补0,实际上用不着
 						this.smallMoney = this.smallMoney + '0';

+ 7 - 0
pages.json

@@ -125,6 +125,13 @@
 					"navigationStyle": "custom"
 				}
 			},
+			{
+				"path": "order/order-payment",
+				"style": {
+					"navigationBarTitleText": "收银台",
+					"navigationStyle": "custom"
+				}
+			},
 			{
 				"path": "order/search-order",
 				"style": {

+ 16 - 5
pages/goods/cart.vue

@@ -30,7 +30,9 @@
 											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>{{pros.productName}}</view>
 											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
 											<view class="floor-item-act" v-if="pros.activeStatus == 1">
-												<view class="tag"@click.stop="clickPopupShow(pros,2)">活动价</view>
+												<text class="tag tag-01" v-if="!pros.heUserId">自营</text>
+												<text class="tag tag-01" v-else>促销</text>
+												<text class="tag tag-02" @click.stop="clickPopupShow(pros,2)">活动价</text>
 											</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
@@ -1056,15 +1058,24 @@
 				float: left;
 				.tag{
 					display: inline-block;
-					width: 80rpx;
-					height: 30rpx;
-					background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png)top center no-repeat;
-					background-size: contain;
+					height: 32rpx;
 					font-size: 22rpx;
 					line-height: 30rpx;
 					text-align: center;
 					color: #f83c6c;
 					float: left;
+					margin-right: 10rpx;
+					&.tag-02{
+						width: 80rpx;
+						background: url(https://static.caimei365.com/app/mini-hehe/icon/icon-active.png)top center no-repeat;
+						background-size: contain;
+					}
+					&.tag-01{
+						width: 56rpx;
+						color: #fff;
+						background-color: #f83c6c;
+						border-radius: 4rpx;
+					}
 				}
 			}
 		}

+ 0 - 2
pages/goods/product-activi.vue

@@ -561,7 +561,6 @@
 				uni.createSelectorQuery().select('.container-product').boundingClientRect((data)=>{//最外层盒子节点
 				  uni.createSelectorQuery().selectAll(className).boundingClientRect((res)=>{//最外层盒子节点
 						res.forEach((item, index) => {
-							console.log(item);
 							sectionPropsArr.push({
 								className: `${className}${index}`,
 								scrollTop: item.top - data.top,
@@ -601,7 +600,6 @@
 				(top, _this) => {
 					//当滑动时也能同步激活tab
 					const { sectionTopRangeArr } = _this
-					console.log(sectionTopRangeArr);
 					if (sectionTopRangeArr.length > 0) {
 						sectionTopRangeArr.forEach((item, index) => {
 							let splitItem = item.split('-'),

+ 1 - 3
pages/goods/product.vue

@@ -561,7 +561,6 @@
 				uni.createSelectorQuery().select('.container-product').boundingClientRect((data)=>{//最外层盒子节点
 				  uni.createSelectorQuery().selectAll(className).boundingClientRect((res)=>{//最外层盒子节点
 						res.forEach((item, index) => {
-							console.log(item);
 							sectionPropsArr.push({
 								className: `${className}${index}`,
 								scrollTop: item.top - data.top,
@@ -601,7 +600,6 @@
 				(top, _this) => {
 					//当滑动时也能同步激活tab
 					const { sectionTopRangeArr } = _this
-					console.log(sectionTopRangeArr);
 					if (sectionTopRangeArr.length > 0) {
 						sectionTopRangeArr.forEach((item, index) => {
 							let splitItem = item.split('-'),
@@ -1139,7 +1137,7 @@
 		bottom: 0;
 		left: 0;
 		background: #FFFFFF;
-		z-index: 999;
+		z-index: 990;
 		.bottom-le{
 			width: 300rpx;
 			height: 100rpx;

+ 19 - 5
pages/tabBar/index/index.vue

@@ -140,27 +140,42 @@
 				this.CommonService.GetProductCarousel().then(response =>{
 					let data = response.data;
 					this.bannerImageList = data
+					this.skeletonShow = false;
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetHomeProductList(){//初始化首页商品数据
-				this.ProductService.QueryProductList({pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+				this.ProductService.QueryProductList(
+					{
+						pageNum:this.pageNum,
+						pageSize:this.pageSize,
+					}
+				)
+				.then(response =>{
 					let data = response.data;
 					this.productList = data.list
 					this.hasNextPage = data.hasNextPage
 					this.GetCartNumber();
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			GetOnReachBottomProductList(){//上滑加载更多
 				this.pageNum+=1
-				this.ProductService.QueryProductList({pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+				this.ProductService.QueryProductList(
+					{
+						pageNum:this.pageNum,
+						pageSize:this.pageSize,
+						}
+				)
+				.then(response =>{
 					let data = response.data;
 					this.hasNextPage = data.hasNextPage
 					this.productList = this.productList.concat(data.list) 
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
@@ -196,7 +211,6 @@
 				)
 				.then(response => {
 					this.$store.commit('updateAllNum',response.data)
-					this.skeletonShow = false;
 				})
 				.catch(error =>{
 					console.log('查询购物车数量错误信息',error)

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

@@ -117,7 +117,7 @@
 				}
 			}
 			.activity-list-msg{
-				width: 460rpx;
+				width: 470rpx;
 				height: 100%;
 				float: right;
 				position: relative;

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

@@ -159,7 +159,8 @@
 					setTimeout(()=>{
 						this.isSubLoading = false;
 					},2000)
-					this.MiniWxPayFor(data)
+					this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.payableAmount}`)
+					// this.MiniWxPayFor(data)
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})

+ 5 - 149
pages/user/order/order-payment.vue

@@ -220,138 +220,11 @@
 				this.payOrderId ='#'+e.orderId+'#';
 				this.optionType = e.type;
 				console.log(this.optionType)
-				switch(e.type){
-					case 'confirm':
-						this.nvabarData.haveBack = false
-						this.nvabarData.haveHome = true
-						this.nvabarData.title = '支付'
-						this.PayOrderOnLineSwitch()
-						this.PayOrderCheckoutCounter(this.orderId)
-						break;
-					case 'payfirm':
-						this.nvabarData.haveBack = true
-						this.nvabarData.haveHome = false
-						this.nvabarData.title = '选择支付方式'
-						this.PayOrderOnLineSwitch()
-						this.PayOrderCheckoutCounter(this.orderId)
-						break;
-					case 'onlinePay':
-						this.invoiceStatus = true
-						this.isPaySwitch = false
-						this.nvabarData.haveBack = true
-						this.nvabarData.haveHome = false
-						this.nvabarData.title = '付款提示'
-						this.payableAmount = this.ableUserMoney = e.Amount
-						this.payBringTitle = '您已通过线下转账的方式支付了订单部分款项,剩余款项依然需要使用线下转账方式,给您带来的不便敬请谅解'
-						this.initAbleUserMoney(this.payableAmount)
-						break;
-				}
-			},
-			PayOrderOnLineSwitch(){
-				this.PayService.PayOrderOnLineSwitch().then(response=>{
-					if(response.data === 0 ){
-						this.isPaySwitch = true
-					}else{
-						this.isPaySwitch = false
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			PayOrderCheckoutCounter(orderId){
-				this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
-					let data = response.data.order
-					this.payableAmount = this.ableUserMoney = data.payableAmount - data.receiptAmount  //待付金额
-					this.receiptStatus =  data.receiptStatus
-					this.onlinePayFlag = data.onlinePayFlag		
-					this.initAbleUserMoney(this.payableAmount)
-					if(this.payableAmount > 5000){
-						this.tabCurrentIndex = 1
-						this.isUnbindWxPay = false
-					}
-					//判断线上线下显示
-					this.invoiceStatus = true
-					// if(this.optionType == 'onlinePay'){
-					// 	this.invoiceStatus = true
-					// }else{
-					// 	this.invoiceStatus = data.invoiceStatus
-					// }
-					if(data.receiptAmount > 0){
-						this.payStatusText = '使用微信和网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
-						this.isReceiptStatus = false
-					}else{
-						this.payStatusText = '使用微信和网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
-						this.isReceiptStatus = true
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			goOrderCash(){
-				if(this.invoiceStatus){
-					this.$util.modal('','本次交易暂不支持线上支付开票,请使用线下转账的方式付款','知道了','',false,() =>{})
-					this.payStatusText = '使用微信和网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
-					this.isReceiptStatus = true
-				}else{
-					switch(this.tabCurrentIndex){
-						case 0:
-							this.MiniWxPayFor()
-							break;
-						case 1:
-							this.payType = '1'
-							this.BuildCatenate()
-							break;
-						case 2:
-							this.payType = '2'
-							this.BuildCatenate()
-							break;
-					}
-				}
-			},
-			async MiniWxPayFor(){
-				const wechatCode = await authorize.getCode('weixin')
-				if(this.payableAmount > 5000){
-					this.$util.modal('','本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付','知道了','',false,() =>{})
-					return
-				}
-				let params ={
-						payAmount:this.payableAmount*100,
-						payWay:"WEIXIN",
-						code:wechatCode,
-						orderId:this.orderId
-					}
-				this.PayService.WeChatMiniWxPay(params).then(response =>{
-					let PayInfo = JSON.parse(response.data.data.payInfo);
-					this.WxRequestPayment(PayInfo)
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000)
-				})
-			},
-			WxRequestPayment(data){
-				let self = this
-				wx.requestPayment({
-					'timeStamp': data.timeStamp,
-					'nonceStr': data.nonceStr,
-					'package': data.package,
-					'signType': data.signType,
-					'paySign': data.paySign,
-					'success':function(res){
-						wx.reLaunch({url: '/pages/index/index'});
-					},
-					'fail':function(res){
-						console.log(res)
-						self.$util.msg('用户取消支付~')
-					},
-					'complete':function(res){
-			
-					}
-				})
-			},
-			BuildCatenate(){
-				this.PayService.PayOrderPayLink({unpaidAmount:this.payableAmount,orderId:this.orderId,payType:this.payType}).then(response =>{
-					this.payHttpUrl = response.data
-					this.isHttpUrlShowTip = true
-				})
+				this.invoiceStatus = true
+				this.nvabarData.haveBack = true
+				this.nvabarData.haveHome = true
+				this.nvabarData.title = '收银台'
+				this.initAbleUserMoney(e.money)
 			},
 			initAbleUserMoney(money){//拆分金额并转千分位格式显示
 				if(money == 0){
@@ -373,23 +246,6 @@
 					console.log(this.smallMoney)
 				}
 			},
-			tabClick(index) {//tab切换
-				this.tabCurrentIndex = index;
-				switch(index){
-					case 0:
-						this.btnColor="#09BB07"
-						this.buttonText='使用微信支付';
-						break;
-					case 1:
-						this.btnColor="#034582"
-						this.buttonText='使用企业网银支付';
-						break;
-					case 2:
-						this.btnColor="#034582"
-						this.buttonText='使用个人网银支付';
-						break;
-				}
-			},
 			hanldNavigateBack(){//页面返回
 				uni.navigateBack({
 					delta: 1