更新
This commit is contained in:
parent
81e4daacd5
commit
38de673847
@ -39,7 +39,7 @@ switch (env) {
|
|||||||
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
|
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
|
||||||
}
|
}
|
||||||
|
|
||||||
const ossUrl = ''
|
const ossUrl = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public'
|
||||||
// httpApi=''
|
// httpApi=''
|
||||||
|
|
||||||
// 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
|
// 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net
|
||||||
|
@ -32,11 +32,28 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr"
|
<view class="home_bg">
|
||||||
|
<image class="image" mode="aspectFill" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_bg.webp"></image>
|
||||||
|
<view class="card">
|
||||||
|
<image class="title" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_title.webp"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr"
|
||||||
@change="dchange">
|
@change="dchange">
|
||||||
</zbpSwiper>
|
</zbpSwiper> -->
|
||||||
|
|
||||||
<view class="list">
|
<view class="home_list">
|
||||||
|
<image class="left" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_yuncang.webp"></image>
|
||||||
|
<view class="right">
|
||||||
|
<image class="top" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_shichang.webp"></image>
|
||||||
|
<image class="bottom" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_my.webp"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="home_recommend">
|
||||||
|
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/home_img/home_tuijian.webp"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="list">
|
||||||
<navigator hover-class="none"
|
<navigator hover-class="none"
|
||||||
:url="`/pages/nongKe/supply_chain/supplierB?type_id=10,17&street_id=${street_id}&townName=${town}`">
|
:url="`/pages/nongKe/supply_chain/supplierB?type_id=10,17&street_id=${street_id}&townName=${town}`">
|
||||||
<view class="list-m">
|
<view class="list-m">
|
||||||
@ -84,25 +101,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="list-con">
|
<!-- <view class="list-con">
|
||||||
<view class="list-con-center" @tap="navgo('/pages/nongKe/specialty/index?type_code=PersonalStore&street_id='+street_id)">
|
<view class="list-con-center" @tap="navgo('/pages/nongKe/specialty/index?type_code=PersonalStore&street_id='+street_id)">
|
||||||
<image src="@/static/images/f8.png" mode="widthFix"></image>
|
<image src="@/static/images/f8.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="list-con-left" @tap="navgo('/pages/nongKe/specialty/index?type_code=PersonalStore&street_id='+street_id)">
|
|
||||||
<image src="@/static/images/f5.png" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
<view class="list-con-right">
|
|
||||||
<view class="con-right"
|
|
||||||
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')">
|
|
||||||
<image src="@/static/images/f7.png" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
<view class="con-right" @click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')">
|
|
||||||
<image src="@/static/images/f2.png" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
|
||||||
<!-- <view class="list-bon" info="中秋团圆节">
|
<!-- <view class="list-bon" info="中秋团圆节">
|
||||||
<image src="@/static/images/f4.png" mode="aspectFit"></image>
|
<image src="@/static/images/f4.png" mode="aspectFit"></image>
|
||||||
</view> -->
|
</view> -->
|
||||||
@ -144,7 +149,7 @@
|
|||||||
<activityCard @close="closeActivityCard"></activityCard>
|
<activityCard @close="closeActivityCard"></activityCard>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
<activityHome :showClose="false" @click="navgo(`/pages/newActivity/towPrice/towPrice?street_id=${street_id}&townName=${street}`)"></activityHome>
|
<!-- <activityHome :showClose="false" @click="navgo(`/pages/newActivity/towPrice/towPrice?street_id=${street_id}&townName=${street}`)"></activityHome> -->
|
||||||
<!-- <m-tabbar native>
|
<!-- <m-tabbar native>
|
||||||
<template v-slot:tabbar_index_2>
|
<template v-slot:tabbar_index_2>
|
||||||
<view class="custom_style">
|
<view class="custom_style">
|
||||||
@ -762,7 +767,8 @@ import activityCard from "@/components/activityCard.vue"
|
|||||||
}
|
}
|
||||||
|
|
||||||
page {
|
page {
|
||||||
background: #f4f7fe;
|
background: #fff7e6;
|
||||||
|
// background: #f4f7fe;
|
||||||
|
|
||||||
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
// background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
|
||||||
}
|
}
|
||||||
@ -1259,4 +1265,62 @@ import activityCard from "@/components/activityCard.vue"
|
|||||||
.rotate-box:active {
|
.rotate-box:active {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
|
.home_bg{
|
||||||
|
width: 750rpx;
|
||||||
|
height: 900rpx;
|
||||||
|
position: relative;
|
||||||
|
.image{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.card{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
background-color: #fff7e6;
|
||||||
|
border-radius: 60rpx 60rpx 0 0;
|
||||||
|
.title{
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: 50%;
|
||||||
|
|
||||||
|
transform: translate(-50%);
|
||||||
|
width: 642rpx;
|
||||||
|
height: 139rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.home_list{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 10rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
padding-top: 0;
|
||||||
|
.left{
|
||||||
|
height: 491rpx;
|
||||||
|
width: 340rpx;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.top{
|
||||||
|
width: 390rpx;
|
||||||
|
height: 244rpx;
|
||||||
|
}
|
||||||
|
.bottom{
|
||||||
|
width: 390rpx;
|
||||||
|
height: 244rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.home_recommend{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
image{
|
||||||
|
width: 618rpx;
|
||||||
|
height: 113rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -85,7 +85,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="packet_card">
|
<view class="packet_card">
|
||||||
<view class="p_d_item" @click="authTo('/pages/users/user_money/index')">
|
<view class="p_d_item" @click="authTo('/pages/users/user_money/money')">
|
||||||
<view class="p_d_count">
|
<view class="p_d_count">
|
||||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
|
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e41f4202401201745498894.png"></image>
|
||||||
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
<view>¥{{userInfo.now_money||"0.00"}}</view>
|
||||||
|
@ -59,8 +59,10 @@
|
|||||||
<text>{{total}}</text>元
|
<text>{{total}}</text>元
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="primary_btn">确认充值</view>
|
<view class="primary_btn" @click="$u.throttle(submitSub, 1500)">确认充值</view>
|
||||||
</view>
|
</view>
|
||||||
|
<payment :payMode="payMode" :order_id="rechar_id" :pay_close="pay_close" :is-call="true" @onChangeFun="onChangeFun"
|
||||||
|
:totalPrice="totalPrice"></payment>
|
||||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -72,12 +74,16 @@
|
|||||||
mapGetters
|
mapGetters
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
import {
|
import {
|
||||||
getUserInfo
|
getUserInfo,
|
||||||
|
spreadInfo,
|
||||||
|
rechargeWechat
|
||||||
} from '@/api/user.js';
|
} from '@/api/user.js';
|
||||||
import authorize from '@/components/Authorize';
|
import authorize from '@/components/Authorize';
|
||||||
|
import payment from '@/components/payment';
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
authorize
|
authorize,
|
||||||
|
payment
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -99,7 +105,38 @@
|
|||||||
page: 1,
|
page: 1,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
type: 2
|
type: 2
|
||||||
|
},
|
||||||
|
otherValue: '其他',
|
||||||
|
now_money: 0,
|
||||||
|
navRecharge: ['账户充值', '佣金转入'],
|
||||||
|
active: 0,
|
||||||
|
number: '',
|
||||||
|
from: '',
|
||||||
|
placeholder: "0.00",
|
||||||
|
picList: [],
|
||||||
|
activePic: 0,
|
||||||
|
money: "",
|
||||||
|
numberPic: '',
|
||||||
|
rechar_id: '0',
|
||||||
|
rechargeAttention: [],
|
||||||
|
pay_close: false,
|
||||||
|
totalPrice: '0',
|
||||||
|
payMode: [{
|
||||||
|
name: '微信支付',
|
||||||
|
icon: 'icon-weixinzhifu',
|
||||||
|
// #ifdef H5
|
||||||
|
value: 'h5',
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
value: 'routine',
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
value: 'weixin',
|
||||||
|
// #endif
|
||||||
|
title: '微信快捷支付',
|
||||||
|
payStatus: true
|
||||||
}
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -122,15 +159,6 @@
|
|||||||
this.getCommissionInfo();
|
this.getCommissionInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onLoadFun: function() {
|
|
||||||
this.isShowAuth = false;
|
|
||||||
this.getUserInfo();
|
|
||||||
},
|
|
||||||
getUserInfo() {
|
|
||||||
getUserInfo().then(res=>{
|
|
||||||
this.userInfo = res.data;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clickTab1(e) {
|
clickTab1(e) {
|
||||||
this.curNow = e.index;
|
this.curNow = e.index;
|
||||||
if (e.index == 1) {
|
if (e.index == 1) {
|
||||||
@ -163,8 +191,379 @@
|
|||||||
if(res.data.list.length>=15) this.where.page++;
|
if(res.data.list.length>=15) this.where.page++;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选择金额
|
||||||
|
*/
|
||||||
|
picCharge(idx, item) {
|
||||||
|
this.activePic = idx;
|
||||||
|
if (item === undefined) {
|
||||||
|
this.rechar_id = '0';
|
||||||
|
this.numberPic = "";
|
||||||
|
this.otherValue = ''
|
||||||
|
} else {
|
||||||
|
this.otherValue = '其他'
|
||||||
|
this.total = "";
|
||||||
|
this.rechar_id = item.id.toString();
|
||||||
|
this.numberPic = item.data.price;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 充值额度选择
|
||||||
|
*/
|
||||||
|
getRecharge() {
|
||||||
|
getRechargeApi()
|
||||||
|
.then(res => {
|
||||||
|
this.picList = res.data.recharge_quota;
|
||||||
|
if (this.picList[0]) {
|
||||||
|
this.rechar_id = this.picList[0].id.toString();
|
||||||
|
this.numberPic = this.picList[0].data.price;
|
||||||
|
}
|
||||||
|
this.rechargeAttention = res.data.recharge_attention || [];
|
||||||
|
})
|
||||||
|
.catch(res => {
|
||||||
|
this.$dialog.toast({
|
||||||
|
mes: res
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoadFun: function() {
|
||||||
|
this.isShowAuth = false;
|
||||||
|
this.getUserInfo();
|
||||||
|
this.getRecharge();
|
||||||
|
},
|
||||||
|
// 授权关闭
|
||||||
|
authColse: function(e) {
|
||||||
|
this.isShowAuth = e
|
||||||
|
},
|
||||||
|
navRecharges: function(index) {
|
||||||
|
this.active = index;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取用户信息
|
||||||
|
*/
|
||||||
|
getUserInfo: function() {
|
||||||
|
let that = this;
|
||||||
|
spreadInfo().then(res => {
|
||||||
|
that.$set(that, 'userInfo', res.data);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
payClose: function() {
|
||||||
|
this.pay_close = false;
|
||||||
|
},
|
||||||
|
payCheck: function(type) {
|
||||||
|
this.createOrder(type);
|
||||||
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 用户充值
|
||||||
|
*/
|
||||||
|
submitSub: function(e) {
|
||||||
|
let that = this
|
||||||
|
let value = this.total;
|
||||||
|
// 转入余额
|
||||||
|
if (that.active) {
|
||||||
|
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '请输入金额'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
uni.showModal({
|
||||||
|
title: '转入余额',
|
||||||
|
content: '转入余额后无法再次转出,确认是否转入余额',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
rechargeBrokerage({
|
||||||
|
brokerage: parseFloat(value),
|
||||||
|
}).then(res => {
|
||||||
|
// that.$set(that, 'userInfo.now_money', that.$util.$h.Add(value, that.userInfo.now_money))
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '转入成功',
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: '/pages/users/user_money/index'
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: err
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '已取消'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if (this.rechar_id == 0) {
|
||||||
|
if (parseFloat(that.total)=== 0) {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '充值金额金额不能为0!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!that.total) {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '请填写充值金额!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!Number(that.total)) {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '请填写正确的金额!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.pay_close = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
createOrder(type) {
|
||||||
|
let that = this;
|
||||||
|
let query = {
|
||||||
|
price: that.rechar_id == 0 ? that.total : that.numberPic,
|
||||||
|
recharge_id: that.rechar_id,
|
||||||
|
type: type,
|
||||||
|
// #ifdef H5
|
||||||
|
return_url: location.port ? location.protocol + '//' + location.hostname + ':' + location.port +
|
||||||
|
'/pages/users/user_money/money' : location.protocol + '//' + location.hostname +
|
||||||
|
'/pages/users/user_money/money'
|
||||||
|
// #endif
|
||||||
|
};
|
||||||
|
// #ifdef MP
|
||||||
|
// openPaySubscribe().then(() => {
|
||||||
|
rechargeWechat(query).then(res => {
|
||||||
|
that.callPay(res);
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// });
|
||||||
|
// #endif
|
||||||
|
// #ifndef MP
|
||||||
|
rechargeWechat(query).then(res => {
|
||||||
|
console.log('res', res);
|
||||||
|
that.callPay(res);
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('err', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
// 调用支付
|
||||||
|
callPay(res) {
|
||||||
|
let that = this, status = res.data.type,
|
||||||
|
orderId = res.data.recharge_id,
|
||||||
|
callback_key = res.data.pay_key,
|
||||||
|
jsConfig = res.data.config,
|
||||||
|
goPages = '/pages/users/user_money/money';
|
||||||
|
switch (status) {
|
||||||
|
case 'ORDER_EXIST':
|
||||||
|
case 'EXTEND_ORDER':
|
||||||
|
case 'PAY_ERROR':
|
||||||
|
case 'error':
|
||||||
|
uni.hideLoading();
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: res.message
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'success':
|
||||||
|
uni.hideLoading();
|
||||||
|
if (that.seckillId)
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 4,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'alipay':
|
||||||
|
case "alipayQr":
|
||||||
|
uni.hideLoading();
|
||||||
|
that.$emit('onChangeFun', {
|
||||||
|
action: 'payClose'
|
||||||
|
});
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig+'&type=10'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
// #ifndef MP
|
||||||
|
case "wechat":
|
||||||
|
case "weixin":
|
||||||
|
case "weixinApp":
|
||||||
|
jsConfig.timeStamp = jsConfig.timestamp;
|
||||||
|
// #ifndef APP-PLUS
|
||||||
|
that.$wechat.pay(jsConfig).then(res => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 4,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
}).catch(res => {
|
||||||
|
if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
|
||||||
|
title: '取消支付'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
let mp_pay_name=''
|
||||||
|
if(uni.requestOrderPayment){
|
||||||
|
mp_pay_name='requestOrderPayment'
|
||||||
|
}else{
|
||||||
|
mp_pay_name='requestPayment'
|
||||||
|
}
|
||||||
|
uni[mp_pay_name]({
|
||||||
|
provider: 'wxpay',
|
||||||
|
orderInfo: jsConfig,
|
||||||
|
success: (e) => {
|
||||||
|
let url = '/pages/users/user_money/money';
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '支付成功',
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 4,
|
||||||
|
url: url
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
console.log(e);
|
||||||
|
uni.showModal({
|
||||||
|
content: "支付失败",
|
||||||
|
showCancel: false,
|
||||||
|
success: function(res) {
|
||||||
|
let url = '/pages/users/user_money/money';
|
||||||
|
uni.redirectTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
uni.hideLoading();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
break;
|
||||||
|
// #endif
|
||||||
|
// #ifdef MP
|
||||||
|
case "routine":
|
||||||
|
jsConfig.timeStamp = jsConfig.timestamp;
|
||||||
|
let mp_pay_name=''
|
||||||
|
if(uni.requestOrderPayment){
|
||||||
|
mp_pay_name='requestOrderPayment'
|
||||||
|
}else{
|
||||||
|
mp_pay_name='requestPayment'
|
||||||
|
}
|
||||||
|
uni[mp_pay_name]({
|
||||||
|
...jsConfig,
|
||||||
|
success: function(res) {
|
||||||
|
uni.hideLoading();
|
||||||
|
that.getUserInfo();
|
||||||
|
that.getRecharge();
|
||||||
|
// console.log('12323424')
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '支付成功',
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function(e) {
|
||||||
|
uni.hideLoading();
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '取消支付'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
},
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
// #endif
|
||||||
|
case "balance":
|
||||||
|
uni.hideLoading();
|
||||||
|
//余额不足
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: res.msg
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
// #ifdef H5
|
||||||
|
case 'h5':
|
||||||
|
let host = window.location.protocol + "//" + window.location.host;
|
||||||
|
let url = `${host}/pages/users/user_money/money`
|
||||||
|
let eUrl = encodeURIComponent(url)
|
||||||
|
let jsurl = jsConfig.mweb_url || jsConfig.h5_url
|
||||||
|
let locations = `${jsurl}&redirect_url=${eUrl}`
|
||||||
|
setTimeout(() => {
|
||||||
|
location.href = locations;
|
||||||
|
}, 100);
|
||||||
|
break;
|
||||||
|
// #endif
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
case 'alipayApp':
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'alipay',
|
||||||
|
orderInfo: jsConfig,
|
||||||
|
success: (e) => {
|
||||||
|
return that.$util.Tips({
|
||||||
|
title: '支付成功',
|
||||||
|
icon: 'success'
|
||||||
|
}, {
|
||||||
|
tab: 5,
|
||||||
|
url: goPages
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
uni.showModal({
|
||||||
|
content: "支付失败",
|
||||||
|
showCancel: false,
|
||||||
|
success: function(res) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: goPages
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
uni.hideLoading();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onChangeFun: function(e) {
|
||||||
|
let opt = e;
|
||||||
|
let action = opt.action || null;
|
||||||
|
let value = opt.value != undefined ? opt.value : null;
|
||||||
|
action && this[action] && this[action](value);
|
||||||
|
},
|
||||||
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user