Browse Source

2023-12-7

cmy 1 year ago
parent
commit
fe335089f7

+ 1 - 1
pages/goods_details/index.vue

@@ -205,7 +205,7 @@
 									</view> -->
 									</view>
 									<view class="wrapper">
-										<view v-if="couponList.length && diyProduct.is_coupon"
+										<view v-if="couponList.length && diyProduct.is_coupon&&storeInfo.product_type!==6&&storeInfo.product_type!==5"
 											class="coupon acea-row row-between-wrapper skeleton-rect" @click="couponTap"
 											style="margin-top: 0rpx;">
 											<view class="hide line1 acea-row">

+ 36 - 52
pages/users/user_order/index.vue

@@ -1,26 +1,27 @@
 <template>
-	<view  style="height: 100vh">
-		<view class="content">
-			<view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
-				<view class="showtime">
-					<text class="float_left order-no-text">{{ item.card_name|| '' }}</text>
-				</view>
-				<view class="item-info" v-for="good in item.card" @click="goGoods(good)">
-					<image :src="good.product.image" mode=""></image>
-					<view class="info-info">
-						<view class="clamp2">
-							{{good.product.store_name || ''}}
-						</view>
-						<view class="info-cs">
-							剩余使用次数:{{good.repertory || ''}}
-						</view>
+	<view class="content">
+		<view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
+			<view class="showtime">
+				<text>{{ item.card_name|| '' }}</text>
+			</view>
+			<view class="item-info" v-for="good in item.card" @click="goGoods(good)">
+				<image class="tip" :src="good.product.image" mode=""></image>
+				<view class="info-info">
+					<view class="line2">
+						{{good.product.store_name || ''}}
+					</view>
+					<view class="info-cs clamp2">
+						原价:{{good.product.price|| ''}}
+					</view>
+					<view class="info-cs">
+						剩余使用次数:{{good.repertory || ''}}
 					</view>
 				</view>
 			</view>
-			
-			<view v-if="list.length == 0 && loadingType=='nomore'">
-				<emptyPage title="暂无订单信息~"></emptyPage>
-			</view>
+		</view>
+		
+		<view v-if="list.length == 0 && loadingType=='nomore'">
+			<emptyPage title="暂无订单信息~"></emptyPage>
 		</view>
 	</view>
 </template>
@@ -45,10 +46,10 @@
 
 		},
 		onShow() {
-			// this.getList()
+			this.getList()
 		},
 		onReachBottom() {
-			// this.getList()
+			this.getList()
 		},
 		onReady() {
 
@@ -103,32 +104,35 @@
 		background-color:#f8f6f6 ;
 		height: auto;
 		min-height: 100%;
+		padding-top: 30rpx;
 		
 	}
 	.dyquan-wrap {
-		padding: 20rpx;
+		padding: 30rpx;
 		background-color: #fff;
-		margin-bottom: 15rpx;
+		margin: 0 30rpx;
+		margin-bottom: 30rpx;
+		border-radius: 20rpx;
 		.showtime {
 			height: 50rpx;
+			border-bottom: 1px solid #f8f6f6;
+			font-size: 30rpx;
+			font-weight: bold;
 		}
 		.item-info {
-			width: 750rpx;
-			height: 205rpx;
 			display: flex;
 			justify-content: flex-start;
-			align-items: center;
-			
-			image {
+			align-items: stretch;
+			padding-top: 20rpx;
+			.tip {
 				width: 160rpx;
 				height: 160rpx;
-				margin-right: 30rpx;
+				margin-right: 20rpx;
+				border-radius: 10rpx;
+				flex-shrink: 0;
 			}
 
 			.info-info {
-				height: 160rpx;
-				padding: 15rpx 0;
-				padding-right: 50rpx;
 				font-size: 30rpx;
 				font-weight: 500;
 				color: #666666;
@@ -143,25 +147,5 @@
 				}
 			}
 		}
-
-		.btm {
-			width: 100%;
-			height: 95rpx;
-			background-color: #fff;
-			display: flex;
-			justify-content: flex-end;
-			align-items: center;
-
-			.btn {
-				width: 144rpx;
-				height: 55rpx;
-				border-radius: 28rpx;
-				font-size: 26rpx;
-				font-weight: 500;
-				color: #FFFFFF;
-				line-height: 55rpx;
-				text-align: center;
-			}
-		}
 	}
 </style>

+ 188 - 104
pages/users/user_payment/index.vue

@@ -9,19 +9,39 @@
 			</view>
 			<view class="payment">
 				<view class="nav acea-row row-around row-middle">
-					<view class="item" :class="active==index?'on':''" v-for="(item,index) in navRecharge" :key="index" @click="navRecharges(index)">{{item}}</view>
+					<view class="item" :class="active==index?'on':''" v-for="(item,index) in navRecharge" :key="index"
+						@click="navRecharges(index)">{{item}}</view>
 				</view>
-				<view class='tip picList' v-if='!active' >
-					<view class="pic-box pic-box-color acea-row row-center-wrapper row-column" :class="activePic == index ? 'pic-box-color-active' : ''"
-					 v-for="(item, index) in picList" :key="index" @click="picCharge(index, item)" v-if="item.price">
+				<view class='tip picList' v-if='!active'>
+					<view class="pic-box pic-box-color acea-row row-center-wrapper row-column"
+						:class="activePic == index ? 'pic-box-color-active' : ''" v-for="(item, index) in picList"
+						:key="index" @click="picCharge(index, item)" v-if="item.price">
 						<view class="pic-number-pic">
 							{{ item.price }}<span class="pic-number"> 元</span>
 						</view>
 						<view class="pic-number">赠送:{{ item.give_money }} 元</view>
 					</view>
-					<view class="pic-box pic-box-color acea-row row-center-wrapper" :class="activePic == picList.length ? 'pic-box-color-active' : ''"
-					 @click="picCharge(picList.length)">
-						<input type="digit" placeholder="其他" v-model="money" class="pic-box-money pic-number-pic" :class="activePic == picList.length ? 'pic-box-color-active' : ''" />
+					<view class="pic-box pic-box-color acea-row row-center-wrapper"
+						:class="activePic == picList.length ? 'pic-box-color-active' : ''"
+						@click="picCharge(picList.length)">
+						<input type="digit" placeholder="其他" v-model="money" class="pic-box-money pic-number-pic"
+							:class="activePic == picList.length ? 'pic-box-color-active' : ''" />
+					</view>
+
+					<view class="flex share-user">
+						<view class="title">
+							邀请人:
+						</view>
+						<view class="input-box">
+							<input type="text" placeholder="请输入邀请人" v-model="verify_code" class="input-user" />
+						</view>
+						<!-- #ifdef H5 -->
+						<view v-if="isWeixin" class="iconfont icon-saoma" @click="scanCode"></view>
+						<!-- #endif -->
+						<!-- #ifdef MP || MP-WEIXIN || APP -->
+						<view class="iconfont icon-saoma" @click="scanCode">
+						</view>
+						<!-- #endif -->
 					</view>
 					<view class="tips-box">
 						<view class="tips mt-30">注意事项:</view>
@@ -29,13 +49,16 @@
 							{{ item }}
 						</view>
 					</view>
-
 				</view>
 				<view class="tip" v-else>
-					<view class='input'><text>¥</text><input @input='inputNum' :maxlength="moneyMaxLeng" placeholder="0.00" type='digit' placeholder-class='placeholder' :value="number" name="number"></input></view>
+					<view class='input'><text>¥</text><input @input='inputNum' :maxlength="moneyMaxLeng"
+							placeholder="0.00" type='digit' placeholder-class='placeholder' :value="number"
+							name="number"></input></view>
 					<view class="tips-title">
 						<view style="font-weight: bold; font-size: 26rpx;">提示:</view>
-						<view style="margin-top: 10rpx;">当前可转入佣金为 <text class='font-color'>¥{{userinfo.commissionCount || 0}}</text>,冻结佣金为<text class='font-color'>¥{{userinfo.broken_commission}}</text></view>
+						<view style="margin-top: 10rpx;">当前可转入佣金为 <text
+								class='font-color'>¥{{userinfo.commissionCount || 0}}</text>,冻结佣金为<text
+								class='font-color'>¥{{userinfo.broken_commission}}</text></view>
 					</view>
 					<view class="tips-box">
 						<view class="tips mt-30">注意事项:</view>
@@ -44,11 +67,11 @@
 						</view>
 					</view>
 				</view>
-				<button class='but bg-color' formType="submit" > {{active ? '立即转入': '立即充值' }}</button>
+				<button class='but bg-color' formType="submit"> {{active ? '立即转入': '立即充值' }}</button>
 			</view>
 		</form>
-		<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @changePayType="changePayType" @onChangeFun="onChangeFun"
-			:order_id="pay_order_id" :totalPrice="totalPrice"></payment>
+		<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @changePayType="changePayType"
+			@onChangeFun="onChangeFun" :order_id="pay_order_id" :totalPrice="totalPrice"></payment>
 		<home v-if="navigation"></home>
 		<view v-show="false" v-html="formContent"></view>
 		<!-- #ifdef MP -->
@@ -86,7 +109,7 @@
 			home,
 			payment
 		},
-		mixins:[colors],
+		mixins: [colors],
 		data() {
 			let that = this;
 			return {
@@ -96,14 +119,15 @@
 				number: '',
 				userinfo: {},
 				placeholder: "0.00",
+				verify_code:'',//邀请会员码
 				from: '',
 				isAuto: false, //没有授权的不会自动授权
 				isShowAuth: false, //是否隐藏授权
 				picList: [],
 				activePic: 0,
 				money: "",
-				numberPic:'',
-				rechar_id:0,
+				numberPic: '',
+				rechar_id: 0,
 				password: '',
 				goodsList: [],
 				pay_order_id: '',
@@ -133,21 +157,21 @@
 				isWeixin: this.$wechat.isWeixin(),
 				// #endif
 				type: '',
-				rechargeAttention:[],
-				moneyMaxLeng:8
+				rechargeAttention: [],
+				moneyMaxLeng: 8
 			};
 		},
 		computed: mapGetters(['isLogin']),
-		watch:{
-			isLogin:{
-				handler:function(newV,oldV){
-					if(newV){
+		watch: {
+			isLogin: {
+				handler: function(newV, oldV) {
+					if (newV) {
 						this.getOrderPayType();
 						this.getUserInfo();
 						this.getRecharge();
 					}
 				},
-				deep:true
+				deep: true
 			}
 		},
 		onLoad(options) {
@@ -166,18 +190,42 @@
 			uni.removeStorageSync('form_type_cart');
 		},
 		methods: {
+			scanCode() {
+				var self = this;
+				// #ifdef MP || APP
+				uni.scanCode({
+					scanType: ["qrCode", "barCode"],
+					success(res) {
+						self.verify_code = res.result
+					},
+					fail(res) {},
+				})
+				// #endif
+				//#ifdef H5
+				this.$wechat.wechatEvevt('scanQRCode', {
+					needResult: 1,
+					scanType: ["qrCode", "barCode"]
+				}).then(res => {
+					let result = res.resultStr;
+					if(result.includes(',')){
+						 result = result.split(",")[1]
+					}
+					this.verify_code = result
+				});
+				//#endif
+			},
 			onLunch() {
 				this.getOrderPayType();
 				this.getUserInfo();
 				this.getRecharge();
-				
+
 			},
 			inputNum: function(e) {
 				let val = e.detail.value;
 				let dot = val.indexOf('.');
-				if(dot>-1){
-					this.moneyMaxLeng = dot+3;
-				}else{
+				if (dot > -1) {
+					this.moneyMaxLeng = dot + 3;
+				} else {
 					this.moneyMaxLeng = 8
 				}
 			},
@@ -262,7 +310,7 @@
 				// #ifndef H5
 				this.payType = e == 'alipay' ? 'alipay' : 'routine'
 				// #endif
-				console.log('双方各大华股份不报错',this.payType);
+				console.log('双方各大华股份不报错', this.payType);
 			},
 			onChangeFun: function(e) {
 				let opt = e;
@@ -286,14 +334,18 @@
 				})
 				let that = this
 				let money = parseFloat(this.money);
-				if( this.rechar_id == 0){
-					if(Number.isNaN(money)){
-						return that.$util.Tips({title: '充值金额必须为数字'});
+				if (this.rechar_id == 0) {
+					if (Number.isNaN(money)) {
+						return that.$util.Tips({
+							title: '充值金额必须为数字'
+						});
 					}
-					if(money <= 0){
-						return that.$util.Tips({title: '充值金额不能为0'});
+					if (money <= 0) {
+						return that.$util.Tips({
+							title: '充值金额不能为0'
+						});
 					}
-				}else{
+				} else {
 					// money = this.numberPic
 				}
 				rechargeRecharge({
@@ -304,11 +356,11 @@
 				}).then(res => {
 					uni.hideLoading();
 					let data = res.data.data;
-					let mp_pay_name=''
-					if(uni.requestOrderPayment){
-						mp_pay_name='requestOrderPayment'
-					}else{
-						mp_pay_name='requestPayment'
+					let mp_pay_name = ''
+					if (uni.requestOrderPayment) {
+						mp_pay_name = 'requestOrderPayment'
+					} else {
+						mp_pay_name = 'requestPayment'
 					}
 					uni[mp_pay_name]({
 						// #ifdef MP
@@ -319,7 +371,7 @@
 						paySign: data.paySign,
 						// #endif
 						// #ifdef APP-PLUS
-						provider: this.payType==='alipay'?'alipay':'wxpay',
+						provider: this.payType === 'alipay' ? 'alipay' : 'wxpay',
 						orderInfo: data,
 						// #endif
 						success: function(res) {
@@ -350,57 +402,58 @@
 				});
 				// #endif
 				// #ifdef H5
-					let that = this
-					this.pay_close = true;
-					this.totalPrice = this.rechar_id == 0 ? this.money : this.numberPic;
-					if (!this.payType) {
-						this.changePayType(type);
-					}
-					rechargeWechat({
-						price: parseFloat(this.totalPrice),
-						// from: this.payType == '' ? this.$wechat.isWeixin() ? 'weixin' :'weixinh5' : this.payType,
-						from: this.payType,
-						rechar_id: that.rechar_id
-					}).then(res => {
-						let data = res.data;
-						if (data.type == "weixinh5") {
-							uni.showToast({
-								title: data.msg,
-								success() {
-									location.href = data.data.mweb_url;
-								}
-							});
-						}else if(data.type == "alipay") {
-							uni.hideLoading();
-							uni.hideLoading();
-							this.formContent = data.data;
-							this.$nextTick(() => {
-								document.getElementById('alipaysubmit').submit();
+				let that = this
+				this.pay_close = true;
+				this.totalPrice = this.rechar_id == 0 ? this.money : this.numberPic;
+				if (!this.payType) {
+					this.changePayType(type);
+				}
+				rechargeWechat({
+					price: parseFloat(this.totalPrice),
+					// from: this.payType == '' ? this.$wechat.isWeixin() ? 'weixin' :'weixinh5' : this.payType,
+					from: this.payType,
+					rechar_id: that.rechar_id,
+					bar_code:that.verify_code
+				}).then(res => {
+					let data = res.data;
+					if (data.type == "weixinh5") {
+						uni.showToast({
+							title: data.msg,
+							success() {
+								location.href = data.data.mweb_url;
+							}
+						});
+					} else if (data.type == "alipay") {
+						uni.hideLoading();
+						uni.hideLoading();
+						this.formContent = data.data;
+						this.$nextTick(() => {
+							document.getElementById('alipaysubmit').submit();
+						});
+					} else if (data.type == "weixin") {
+						this.$wechat.pay(data.data).then(res => {
+							this.$util.Tips({
+								title: '支付成功',
+								icon: 'success'
+							}, {
+								tab: 5,
+								url: '/pages/users/user_money/index'
 							});
-						}else if(data.type == "weixin") {
-							this.$wechat.pay(data.data).then(res => {
-								this.$util.Tips({
-									title: '支付成功',
-									icon: 'success'
-								}, {
-									tab: 5,
-									url: '/pages/users/user_money/index'
+						}).catch(err => {
+							if (err.errMsg == 'chooseWXPay:cancel') {
+								uni.showToast({
+									title: '取消支付',
+									icon: 'none'
 								});
-							}).catch(err => {
-								if (err.errMsg == 'chooseWXPay:cancel') {
-									uni.showToast({
-										title: '取消支付',
-										icon: 'none'
-									});
-								}
-							});
-						}
-					}).catch(err=>{
-						uni.hideLoading();
-						return that.$util.Tips({
-							title: err
-						})
+							}
+						});
+					}
+				}).catch(err => {
+					uni.hideLoading();
+					return that.$util.Tips({
+						title: err
 					})
+				})
 				// #endif
 			},
 			/*
@@ -424,14 +477,16 @@
 								// #ifdef MP || APP-PLUS
 								rechargeRoutine({
 									price: parseFloat(value),
-									type: 1
+									type: 1,
+									bar_code:that.verify_code
 								})
 								// #endif
 								// #ifdef H5
 								rechargeWechat({
 										price: parseFloat(value),
 										from: that.from,
-										type: 1
+										type: 1,
+										bar_code:that.verify_code
 									})
 									// #endif
 									.then(res => {
@@ -460,7 +515,7 @@
 					this.pay_close = true;
 					// #endif
 					// #ifndef MP
-						this.pay_close = true;
+					this.pay_close = true;
 					// #endif
 					this.totalPrice = this.rechar_id == 0 ? parseFloat(this.money) : parseFloat(this.numberPic);
 				}
@@ -475,9 +530,11 @@
 		height: 100%;
 		background-color: #fff;
 	}
-	.bgcolor{
+
+	.bgcolor {
 		background-color: var(--view-theme)
 	}
+
 	.payment {
 		position: relative;
 		width: 100%;
@@ -486,6 +543,29 @@
 		padding-top: 25rpx;
 		border-top-right-radius: 39rpx;
 		border-top-left-radius: 39rpx;
+
+		.share-user {
+			width: 100%;
+			align-items: center;
+			line-height: 1;
+			border-bottom: 1px solid #f3f3f3;
+			padding-top: 20rpx;
+			padding-bottom: 10rpx;
+			.title {
+				font-size: 30rpx;
+				color: #656565;
+				font-weight: 800;
+				flex-shrink: 0;
+			}
+			.input-box {
+				flex-grow: 1;
+				.input-user{
+					width: 100%;
+					height: 50rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
 	}
 
 	.payment .nav {
@@ -514,7 +594,7 @@
 		font-size: 56rpx;
 		color: #333333;
 		flex-wrap: nowrap;
-		
+
 	}
 
 	.payment .input text {
@@ -613,26 +693,30 @@
 			color: #fff !important;
 		}
 	}
-	.tips-box{
+
+	.tips-box {
 		.tips {
-		  font-size: 28rpx;
-		  color: #333333;
-		  font-weight: 800;
-		  margin-bottom: 14rpx;
+			font-size: 28rpx;
+			color: #333333;
+			font-weight: 800;
+			margin-bottom: 14rpx;
 			margin-top: 20rpx;
 		}
+
 		.tips-samll {
-		  font-size: 24rpx;
-		  color: #333333;
-		  margin-bottom: 14rpx;
+			font-size: 24rpx;
+			color: #333333;
+			margin-bottom: 14rpx;
 		}
+
 		.tip-box {
-		  margin-top: 30rpx;
+			margin-top: 30rpx;
 		}
 	}
-	.tips-title{
+
+	.tips-title {
 		margin-top: 20rpx;
 		font-size: 24rpx;
 		color: #333;
 	}
-</style>
+</style>

+ 1 - 0
pages/users/user_pwd_edit/index.vue

@@ -61,6 +61,7 @@
 				isAuto: false, //没有授权的不会自动授权
 				isShowAuth: false ,//是否隐藏授权
 				key: '',
+				captcha:'',
 			};
 		},
 		computed: mapGetters(['isLogin']),