Pārlūkot izejas kodu

Merge branch 'master' of http://git.liuniu946.com/lhl/myc

hwq 3 gadi atpakaļ
vecāks
revīzija
b8eb6d7b1f

+ 2 - 2
pages/coupon/consumer.vue

@@ -103,7 +103,7 @@ export default {
 			tabCurrentIndex: 0,
 			navList: [
 				{
-					state: 1,
+					state: 6,
 					text: '支出',
 					loadingType: 'more',
 					orderList: [],
@@ -111,7 +111,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 2,
+					state: 5,
 					text: '收入',
 					loadingType: 'more',
 					orderList: [],

+ 2 - 1
pages/order/createOrder.vue

@@ -302,7 +302,8 @@ export default {
 				new: 1, //商品是否新增加到购物车1为不加入0为加入
 				mer_id: +opt.merid, //商店id
 				combinationId: +opt.gid, //拼团商品id
-				productId: +opt.pid //普通商品id
+				productId: +opt.pid, //普通商品id
+				// type: obj.is_consumer == 1 ?1: 0
 			})
 				.then(function(e) {
 					let da = e.data;

+ 2 - 1
pages/product/product.vue

@@ -536,7 +536,8 @@ export default {
 				cartNum: obj.goodsNumber, //商品数量
 				uniqueId: obj.uniqueId, //商品标签
 				new: '1', //商品是否新增加到购物车1为不加入0为加入
-				mer_id: obj.shopId
+				mer_id: obj.shopId,
+				// type: 0,//0为余额支付  1为消费券支付 2为积分支付
 			};
 			if (obj.type == 2) {
 				data.new = 0;

+ 36 - 10
pages/received/index.vue

@@ -30,10 +30,10 @@
 						设置金额
 					</view> -->
 					<view class="setType flex" v-if="actionInd == 0" @click="showChooseType">
-							<image src="../../static/icon/jf.png" mode="" class="type-logo"></image>
+							<image :src="showType[showPayType].img" mode="" class="type-logo"></image>
 							<view class="type-wrapper">
-								<view class="type-tit">积分</view>
-								<view class="type-info">使用积分支付</view>
+								<view class="type-tit">{{showType[showPayType].tit}}</view>
+								<view class="type-info">使用{{showType[showPayType].tit}}支付</view>
 							</view>
 							<view class="sele-wrap">
 								<image src="../../static/img/back.png" mode="" class="selecte-ic"></image>
@@ -87,8 +87,8 @@
 							<image src="../../static/img/yue.png" mode="aspectFill"></image>
 							<view class="zf">余额支付</view>
 						</view>
-						<label class="radio" @click="changePayType(1)">
-							<radio style="transform:scale(0.7)" class="rad" value="" :checked="payType == 1" color="#5dbc7c"></radio>
+						<label class="radio" @click="changePayType(0)">
+							<radio style="transform:scale(0.7)" class="rad" value="" :checked="payType == 0" color="#5dbc7c"></radio>
 						</label>
 					</view>
 					<view class="paybox-main flex">
@@ -103,9 +103,9 @@
 							<image src="../../static/icon/xfq.png" mode="aspectFill"></image>
 							<view class="zf">消费券支付</view>
 						</view>
-						<label class="radio1" @click="changePayType(3)"><radio style="transform:scale(0.7)" value="" :checked="payType == 3" color="#5dbc7c"></radio></label>
+						<label class="radio1" @click="changePayType(1)"><radio style="transform:scale(0.7)" value="" :checked="payType == 1" color="#5dbc7c"></radio></label>
 					</view>
-					<view class="paybtn">
+					<view class="paybtn" @click="qrchange">
 						确定切换
 					</view>
 				</view>
@@ -134,7 +134,9 @@ export default {
 	},
 	// #endif
 	data() {
-		return {
+		return {
+			showPayType: 0,
+			payType: 0,//付款码type 0-余额  1-消费券  2-积分
 			url: '',
 			uid: '',
 			qrsize: 80, // 二维码大小
@@ -167,7 +169,23 @@ export default {
 			showSqr: true,
 			code: '', //保存扫码code
 			indexNum: 0, //默认没有商品
-			payType: 0,
+			showType: [
+				{
+					type: 0,
+					tit: '余额',
+					img: '../../static/img/yue.png'
+				},
+				{
+					type: 1,
+					tit: '消费券',
+					img: '../../static/icon/xfq.png'
+				},
+				{
+					type: 2,
+					tit: '积分',
+					img: '../../static/icon/jf.png'
+				}
+			]
 		};
 	},
 
@@ -425,7 +443,9 @@ export default {
 		scanQR(e) {},
 		// 获取付款码
 		receivedPaymentCode() {
-			receivedPaymentCode()
+			receivedPaymentCode({
+				type: this.payType
+			})
 				.then(e => {
 					this.val = e.data.code;
 					console.log(e);
@@ -475,6 +495,12 @@ export default {
 		},
 		changePayType(index) {
 			this.payType = index
+		},
+		qrchange() {
+			this.showPayType = this.payType
+			this.$refs.popupPay.close()
+			console.log(this.payType)
+			this.clickItem(0)
 		}
 	}
 };