parent
4dcea9995b
commit
86b269ba76
|
|
@ -4,8 +4,7 @@
|
|||
<view class="title acea-row row-center-wrapper">
|
||||
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
|
||||
</view>
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode"
|
||||
:key="index">
|
||||
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)' v-for="(item,index) in payMode" :key="index" v-if="item.payStatus==1">
|
||||
<view class="left acea-row row-between-wrapper">
|
||||
<view class="iconfont" :class="item.icon"></view>
|
||||
<view class="text">
|
||||
|
|
@ -69,7 +68,7 @@
|
|||
};
|
||||
},
|
||||
mounted:function(){
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
close: function() {
|
||||
|
|
@ -101,7 +100,7 @@
|
|||
}else if(paytype == 'alipay'){
|
||||
// #ifndef MP
|
||||
type = 'alipay';
|
||||
// #endif
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
type = 'alipayQr';
|
||||
// #endif
|
||||
|
|
@ -115,7 +114,7 @@
|
|||
uni.showLoading({
|
||||
title: '支付中'
|
||||
});
|
||||
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay : orderPay
|
||||
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay : orderPay
|
||||
orderApi(that.order_id, {
|
||||
type: type,
|
||||
// #ifdef H5
|
||||
|
|
@ -127,7 +126,7 @@
|
|||
jsConfig = res.data.result.config,
|
||||
callback_key = res.data.result.pay_key,
|
||||
goPages = that.returnUrl ? that.returnUrl : '/pages/users/order_list/index';
|
||||
switch (status) {
|
||||
switch (status) {
|
||||
case 'ORDER_EXIST':
|
||||
case 'EXTEND_ORDER':
|
||||
case 'PAY_ERROR':
|
||||
|
|
@ -138,13 +137,13 @@
|
|||
});
|
||||
return that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'success':
|
||||
uni.hideLoading();
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
});
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
|
|
@ -158,19 +157,19 @@
|
|||
uni.hideLoading();
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
});
|
||||
});
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_pay_back/index?keyCode='+callback_key+'&url='+jsConfig,
|
||||
})
|
||||
return
|
||||
break;
|
||||
})
|
||||
return
|
||||
break;
|
||||
// #ifndef MP
|
||||
case "wechat":
|
||||
case "weixin":
|
||||
case "weixinApp":
|
||||
jsConfig.timeStamp = jsConfig.timestamp;
|
||||
// #ifndef APP-PLUS
|
||||
that.$wechat.pay(jsConfig).then(res => {
|
||||
that.$wechat.pay(jsConfig).then(res => {
|
||||
console.log('测试支付数据无效的success:'+res.data)
|
||||
this.$emit('onChangeFun', {
|
||||
action: 'payClose'
|
||||
|
|
@ -179,7 +178,7 @@
|
|||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
|
|
@ -193,12 +192,12 @@
|
|||
}else{
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=0'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
|
|
@ -218,7 +217,7 @@
|
|||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
|
|
@ -231,7 +230,7 @@
|
|||
}else{
|
||||
return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=0'
|
||||
});
|
||||
|
|
@ -265,15 +264,15 @@
|
|||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
|
||||
|
||||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + '?status=1'
|
||||
});
|
||||
|
|
@ -288,7 +287,7 @@
|
|||
});
|
||||
},
|
||||
complete: function(e) {
|
||||
uni.hideLoading();
|
||||
uni.hideLoading();
|
||||
//关闭当前页面跳转至订单状态
|
||||
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
|
||||
title: '取消支付'
|
||||
|
|
@ -321,8 +320,8 @@
|
|||
location.href = locations;
|
||||
}, 100);
|
||||
break;
|
||||
// #endif
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
case 'alipayApp':
|
||||
uni.requestPayment({
|
||||
|
|
@ -335,11 +334,11 @@
|
|||
return that.$util.Tips({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
}, {
|
||||
}, {
|
||||
tab: 5,
|
||||
url: goPages + 'status=1'
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
fail: (e) => {
|
||||
return that.$util.Tips({
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
|
|||
let openPlantGrass = '-openPlantGrass-'
|
||||
|
||||
// 网络接口修改此字符 小程序域名要求https
|
||||
// let httpApi = 'https://bt.test.cdlfjy.com/' // 开发
|
||||
let httpApi = 'https://mp.scwmbh.cn/' // 生产
|
||||
let httpApi = 'https://bt.test.cdlfjy.com/' // 开发
|
||||
// let httpApi = 'https://mp.scwmbh.cn/' // 生产
|
||||
|
||||
|
||||
// 聊天接口修改此字符 小程序聊天要求wss 例如:
|
||||
// let wsApi = 'wss://bt.test.cdlfjy.com'
|
||||
let wsApi = 'wss://mp.scwmbh.cn'
|
||||
let wsApi = 'wss://bt.test.cdlfjy.com'
|
||||
// let wsApi = 'wss://mp.scwmbh.cn'
|
||||
|
||||
|
||||
module.exports = {
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ export default {
|
|||
mer_images: {},
|
||||
},
|
||||
// 地区选择器
|
||||
area_value:[],
|
||||
area_status: false,
|
||||
address: '',
|
||||
// 商户相关
|
||||
|
|
@ -267,7 +268,8 @@ export default {
|
|||
this.isShowAuth = true
|
||||
}else{
|
||||
// 已登录 获取信息
|
||||
this.init();
|
||||
if(Number(this.apply_info_id) > 0) this.getApplyInfo();
|
||||
else this.init();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -284,7 +286,6 @@ export default {
|
|||
},
|
||||
// 授权成功 初始化
|
||||
init () {
|
||||
if(Number(this.apply_info_id) > 0) this.getApplyInfo();
|
||||
this.getInviteAgentInfo()
|
||||
this.generatePageTitle();
|
||||
this.getConfig();
|
||||
|
|
@ -395,8 +396,17 @@ export default {
|
|||
},
|
||||
// 商户相关 - 获取分类列表
|
||||
getMerClass() {
|
||||
let _this = this;
|
||||
merClassifly().then(res => {
|
||||
this.mer_cate_list = res.data
|
||||
_this.mer_cate_list = res.data
|
||||
if(Number(_this.apply_info_id) > 0){
|
||||
Object.values(res.data).forEach(function(item, index) {
|
||||
if (item.merchant_category_id == _this.apply_info.mer_class_id) {
|
||||
_this.mer_cate_index = index;
|
||||
_this.mer_class_name = item.category_name
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(res => {
|
||||
this.$util.Tips({
|
||||
title: res
|
||||
|
|
@ -405,8 +415,17 @@ export default {
|
|||
},
|
||||
// 商户相关 - 获取类型列表
|
||||
getMerType() {
|
||||
let _this = this;
|
||||
getStoreTypeApi().then(res => {
|
||||
this.mer_type_list = res.data
|
||||
_this.mer_type_list = res.data
|
||||
if(Number(_this.apply_info_id) > 0){
|
||||
Object.values(res.data).forEach(function(item, index) {
|
||||
if (item.mer_type_id == _this.apply_info.mer_type_id) {
|
||||
_this.mer_type_index = index;
|
||||
_this.mer_type_name = item.type_name
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(res => {
|
||||
this.$util.Tips({
|
||||
title: res
|
||||
|
|
@ -470,15 +489,13 @@ export default {
|
|||
// 提交申请
|
||||
submitAgentApplyInfo(applyInfo).then(res => {
|
||||
if (res.status == 200) {
|
||||
if(Number(_this.pay_money) > 0){
|
||||
if(Number(_this.pay_money) > 0 && Number(_this.apply_info_id) <= 0){
|
||||
let status = res.data.status,
|
||||
orderId = res.data.result.order_id,
|
||||
callback_key = res.data.result.pay_key,
|
||||
jsConfig = res.data.result.config;
|
||||
// let goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message;
|
||||
let goPages = '/pages/agent/invite/record';
|
||||
|
||||
|
||||
switch (status) {
|
||||
case 'ORDER_EXIST':
|
||||
case 'EXTEND_ORDER':
|
||||
|
|
@ -606,7 +623,8 @@ export default {
|
|||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: pages + '&status=0'
|
||||
// url: pages + '&status=0'
|
||||
url: pages
|
||||
});
|
||||
},
|
||||
})
|
||||
|
|
@ -679,14 +697,15 @@ export default {
|
|||
title: '取消支付'
|
||||
}, {
|
||||
tab: 5,
|
||||
url: pages + '&status=0'
|
||||
// url: pages + '&status=0'
|
||||
url: pages
|
||||
});
|
||||
}
|
||||
}else{
|
||||
_this.$util.Tips({
|
||||
title: '操作成功!',
|
||||
},{
|
||||
tab: 5,
|
||||
tab: 4,
|
||||
url: '/pages/agent/invite/record'
|
||||
});
|
||||
}
|
||||
|
|
@ -713,8 +732,9 @@ export default {
|
|||
let data = res.data || {};
|
||||
_this.apply_info = data || {};
|
||||
_this.agent_type = data.agent_type;
|
||||
_this.agent_id = data.pid
|
||||
_this.getInviteAgentInfo()
|
||||
_this.agent_id = data.pid;
|
||||
_this.areaChange({});
|
||||
_this.init();
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$util.Tips({title: err});
|
||||
|
|
|
|||
|
|
@ -3,25 +3,41 @@
|
|||
<view class="application-record" v-if="Object.values(list).length > 0">
|
||||
<view class="card-list" v-for="(item,index) in list" :key="index">
|
||||
<view class="card-top">
|
||||
<view class="title">
|
||||
{{item.contact_name}}({{agentType(item.agent_type)}})
|
||||
</view>
|
||||
<view class="title">{{item.contact_name}}({{agentType(item.agent_type)}})</view>
|
||||
<view class="time">提交时间:{{item.create_time}}</view>
|
||||
<view v-if="item.reason && item.status == 2" class="reason">原因:{{item.reason}}</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="card-bottom">
|
||||
<view class="card-status">
|
||||
<image class="status-icon" v-if="item.status === 0" src="@/static/images/pending.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 1" src="@/static/images/passed.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 2" src="@/static/images/not-pass.png" mode=""></image>
|
||||
<text class="status-text">{{statusText(item.status)}}</text>
|
||||
</view>
|
||||
<view class="status-btn" v-if="item.status == 2" @click="jump(item)">修改</view>
|
||||
<block v-if="item.orderInfo && Number(item.orderInfo.status) !== 3">
|
||||
<view class="card-status">
|
||||
<text class="status-text">{{statusText(item)}}</text>
|
||||
</view>
|
||||
<view class="status-btn" @click="goPay(item.orderInfo)">去支付</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="card-status">
|
||||
<image class="status-icon" v-if="item.status === 0" src="@/static/images/pending.png"></image>
|
||||
<image class="status-icon" v-else-if="item.status === 1" src="@/static/images/passed.png"></image>
|
||||
<image class="status-icon" v-else-if="item.status === 2" src="@/static/images/not-pass.png"></image>
|
||||
<text class="status-text">{{statusText(item)}}</text>
|
||||
</view>
|
||||
<view class="status-btn" v-if="item.status == 2" @click="jump(item)">修改</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<emptyPage v-else title="暂无记录~"></emptyPage>
|
||||
|
||||
<!-- 支付弹框 -->
|
||||
<payment
|
||||
:payMode='pay_list'
|
||||
:pay_close="pay_close"
|
||||
@onChangeFun='onChangeFun'
|
||||
:order_id="pay_order_id"
|
||||
:totalPrice='totalPrice'
|
||||
:returnUrl="'/pages/agent/invite/record'">
|
||||
</payment>
|
||||
<!-- 授权登录 -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
|
||||
</view>
|
||||
|
|
@ -32,11 +48,17 @@ import {mapGetters} from "vuex";
|
|||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import {agentApplyRecord} from "@/api/agent";
|
||||
import authorize from '@/components/Authorize';
|
||||
import payment from '@/components/payment';
|
||||
import {getUserInfo} from "@/api/user";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
authorize,
|
||||
emptyPage
|
||||
emptyPage,
|
||||
payment
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -45,11 +67,36 @@ export default {
|
|||
// 登录相关
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false,//是否隐藏授权
|
||||
// 支付相关
|
||||
pay_list: [
|
||||
{
|
||||
name: "微信支付",
|
||||
icon: "icon-weixinzhifu",
|
||||
value: 'wechat',
|
||||
title: '微信快捷支付',
|
||||
payStatus: 1
|
||||
},
|
||||
{
|
||||
name: "支付宝支付",
|
||||
icon: "icon-zhifubao",
|
||||
value: 'alipay',
|
||||
title: '支付宝支付',
|
||||
payStatus: this.$store.getters.globalData.alipay_open
|
||||
},
|
||||
{
|
||||
name: "余额支付",
|
||||
icon: "icon-yuezhifu",
|
||||
value: 'balance',
|
||||
title: '可用余额:',
|
||||
number: 0,
|
||||
payStatus: this.$store.getters.globalData.yue_pay_status
|
||||
}
|
||||
],
|
||||
pay_close: false,
|
||||
pay_order_id: '',
|
||||
totalPrice: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin', 'userInfo', 'viewColor'])
|
||||
},
|
||||
onLoad() {
|
||||
let _this = this;
|
||||
// 判断:是否登录
|
||||
|
|
@ -81,6 +128,9 @@ export default {
|
|||
// 授权成功 初始化
|
||||
init () {
|
||||
this.getRecordList();
|
||||
getUserInfo().then(res => {
|
||||
this.pay_list[2].number = res.data.now_money;
|
||||
});
|
||||
},
|
||||
// 记录
|
||||
getRecordList() {
|
||||
|
|
@ -99,13 +149,18 @@ export default {
|
|||
});
|
||||
},
|
||||
//状态判断
|
||||
statusText(number) {
|
||||
let statusData = {
|
||||
0: "审核中",
|
||||
1: "已通过",
|
||||
2: "已驳回"
|
||||
};
|
||||
return statusData[number]
|
||||
statusText(item) {
|
||||
let orderStatus = item.orderInfo ? item.orderInfo.status : 0;
|
||||
if(Number(orderStatus) != 3 && item.orderInfo){
|
||||
return '待支付:' + '¥' + item.orderInfo.pay_price;
|
||||
}else{
|
||||
let statusData = {
|
||||
0: "审核中",
|
||||
1: "已通过",
|
||||
2: "已驳回"
|
||||
};
|
||||
return statusData[Number(item.status)]
|
||||
}
|
||||
},
|
||||
//状态判断
|
||||
agentType(number) {
|
||||
|
|
@ -127,6 +182,26 @@ export default {
|
|||
url: `/pages/agent/invite/index?apply_id=${item.id}`
|
||||
})
|
||||
},
|
||||
// 支付 - 发起支付
|
||||
goPay(orderInfo) {
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.order_id = orderInfo.group_order_id;
|
||||
this.pay_order_id = orderInfo.group_order_id.toString()
|
||||
this.$set(this, 'totalPrice', orderInfo.pay_price);
|
||||
},
|
||||
// 支付 - 事件回调
|
||||
onChangeFun(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
// 支付 - 关闭弹框
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
<view>x{{goods.product_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -711,7 +711,7 @@
|
|||
// 关闭发票弹窗
|
||||
changeInvoiceClose: function(data) {
|
||||
if(data)this.getInvoiceData(data);
|
||||
this.$set(this.invoice, 'invoice', false);
|
||||
this.$set(this.invoice, 'invoice', false);
|
||||
},
|
||||
// 开票回调
|
||||
getInvoiceData(data) {
|
||||
|
|
@ -1022,7 +1022,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search {
|
||||
height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
|
@ -1031,7 +1031,7 @@
|
|||
background-color: #FFFFFF;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
|
||||
|
||||
.iconfont {
|
||||
margin-right: 10rpx;
|
||||
font-size: 23rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue