Browse Source

界面优化

yuxingxing 2 years ago
parent
commit
c1b82e4b51

+ 1 - 1
components/homeList/index.vue

@@ -54,7 +54,7 @@
 					{
 						name: this.$t(`搜索`),
 						icon: 'icon-sousuo6',
-						url: '/pages/goods/goods_search/index',
+						url: '/pages/goods/goods_list/index',
 						after: 'dialog_after'
 					},
 					{

+ 0 - 171
components/payment/index.vue

@@ -134,19 +134,6 @@
 					// #ifdef MP 
 					'from': 'routine',
 					// #endif
-					// #ifdef H5
-					'from': this.$wechat.isWeixin() ? 'weixin' : 'weixinh5',
-					// #endif
-					// #ifdef H5
-					quitUrl: location.port ? location.protocol + '//' + location.hostname + ':' + location
-						.port +
-						'/pages/goods/order_details/index?order_id=' + this.order_id : location.protocol +
-						'//' + location.hostname +
-						'/pages/goods/order_details/index?order_id=' + this.order_id
-					// #endif
-					// #ifdef APP-PLUS
-					quitUrl: '/pages/goods/order_details/index?order_id=' + this.order_id
-					// #endif
 				}).then(res => {
 					let jsConfig = res.data.result.jsConfig;
 					switch (paytype) {
@@ -154,7 +141,6 @@
 							if (res.data.result === undefined) return that.$util.Tips({
 								title: that.$t(`缺少支付参数`)
 							});
-
 							// #ifdef MP
 							let mp_pay_name=''
 							if(uni.requestOrderPayment){
@@ -202,163 +188,6 @@
 								},
 							});
 							// #endif
-							// #ifdef H5
-							let data = res.data;
-							if (data.status == "WECHAT_H5_PAY") {
-								uni.hideLoading();
-								location.replace(data.result.jsConfig.mweb_url);
-								return that.$util.Tips({
-									title: that.$t(`支付成功`),
-									icon: 'success'
-								}, () => {
-									that.$emit('onChangeFun', {
-										action: 'pay_complete'
-									});
-								});
-							} else {
-								that.$wechat.pay(data.result.jsConfig)
-									.then(() => {
-										return that.$util.Tips({
-											title: that.$t(`支付成功`),
-											icon: 'success'
-										}, () => {
-											that.$emit('onChangeFun', {
-												action: 'pay_complete'
-											});
-										});
-									})
-									.catch(()=> {
-										return that.$util.Tips({
-											title: that.$t(`支付失败`),
-										}, () => {
-											that.$emit('onChangeFun', {
-												action: 'pay_fail'
-											});
-										});
-									});
-							}
-							// #endif
-							// #ifdef APP-PLUS
-							uni.requestPayment({
-								provider: 'wxpay',
-								orderInfo: jsConfig,
-								success: (e) => {
-									let url = '/pages/goods/order_pay_status/index?order_id=' + orderId +
-										'&msg=支付成功';
-									uni.showToast({
-										title: that.$t(`支付成功`)
-									})
-									setTimeout(res => {
-										that.$emit('onChangeFun', {
-											action: 'pay_complete'
-										});
-									}, 2000)
-								},
-								fail: (e) => {
-									uni.showModal({
-										content: that.$t(`支付失败`),
-										showCancel: false,
-										success: function(res) {
-											if (res.confirm) {
-												that.$emit('onChangeFun', {
-													action: 'pay_fail'
-												});
-											} else if (res.cancel) {}
-										}
-									})
-								},
-								complete: () => {
-									uni.hideLoading();
-								},
-							});
-							// #endif
-							break;
-						case 'yue':
-							uni.hideLoading();
-							return that.$util.Tips({
-								title: res.msg,
-								icon: 'success'
-							}, () => {
-								that.$emit('onChangeFun', {
-									action: 'pay_complete'
-								});
-							});
-							break;
-						case 'offline':
-							uni.hideLoading();
-							return that.$util.Tips({
-								title: res.msg,
-								icon: 'success'
-							}, () => {
-								that.$emit('onChangeFun', {
-									action: 'pay_complete'
-								});
-							});
-							break;
-						case 'friend':
-							uni.hideLoading();
-							return that.$util.Tips({
-								title: res.msg,
-								icon: 'success'
-							}, () => {
-								that.$emit('onChangeFun', {
-									action: 'pay_complete'
-								});
-							});
-							break;
-						case 'alipay':
-							uni.hideLoading();
-							//#ifdef H5
-							if (this.$wechat.isWeixin()) {
-								uni.redirectTo({
-									url: `/pages/users/alipay_invoke/index?id=${res.data.result.order_id}&pay_key=${res.data.result.pay_key}`
-								});
-							} else {
-								uni.hideLoading();
-								that.formContent = res.data.result.jsConfig;
-								that.$nextTick(() => {
-									document.getElementById('alipaysubmit').submit();
-								});
-							}
-							//#endif
-							// #ifdef MP
-							uni.navigateTo({
-								url: `/pages/users/alipay_invoke/index?id=${res.data.result.order_id}&link=${res.data.result.jsConfig.qrCode}`
-							});
-							// #endif
-							// #ifdef APP-PLUS
-							uni.requestPayment({
-								provider: 'alipay',
-								orderInfo: jsConfig,
-								success: (e) => {
-									uni.showToast({
-										title: that.$t(`支付成功`)
-									})
-									setTimeout(res => {
-										that.$emit('onChangeFun', {
-											action: 'pay_complete'
-										});
-									}, 2000)
-
-								},
-								fail: (e) => {
-									uni.showModal({
-										content: that.$t(`支付失败`),
-										showCancel: false,
-										success: function(res) {
-											if (res.confirm) {
-												that.$emit('onChangeFun', {
-													action: 'pay_fail'
-												});
-											} else if (res.cancel) {}
-										}
-									})
-								},
-								complete: () => {
-									uni.hideLoading();
-								},
-							});
-							// #endif
 							break;
 					}
 				}).catch(err => {

+ 2 - 2
pages/goods/order_confirm/index.vue

@@ -209,9 +209,9 @@
 				<view>{{ $t(`合计`) }}:
 					<text class='font-color'>{{ $t(`¥`) }}{{ totalPrice || 0 }}</text>
 				</view>
-				<view class='settlement' style='z-index:100' @tap.stop="goPay" v-if="totalPrice > 0">{{ $t(`立即支付`) }}
+				<view class='settlement' style='z-index:100' @tap.stop="goPay" v-if="totalPrice > 0">{{ $t(`提交订单`) }}
 				</view>
-				<view class='settlement bg-color-hui' style='z-index:100' v-else>{{ $t(`立即支付`) }}</view>
+				<view class='settlement bg-color-hui' style='z-index:100' v-else>{{ $t(`提交订单`) }}</view>
 			</view>
 		</view>
 		<view class="alipaysubmit" v-html="formContent"></view>

+ 1 - 1
pages/goods/order_list/index.vue

@@ -117,7 +117,7 @@
 		<home></home>
 		<!-- #endif -->
 		<payment :payMode="payMode" :pay_close="pay_close" @onChangeFun="onChangeFun" :order_id="pay_order_id"
-			:totalPrice="totalPrice"></payment>
+			:totalPrice="totalPrice"></payment> 
 	</view>
 </template>
 

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

@@ -260,6 +260,7 @@
 				Routine.getUserProfile()
 					.then(res => {
 						let userInfo = res.userInfo;
+						console.log(this.code);
 						console.log(userInfo);
 						userInfo.code = this.code;
 						// userInfo.spread_spid = app.globalData.spid || this.$Cache.get('spread'); //获取推广人ID