|
@@ -16,7 +16,6 @@
|
|
|
<van-field
|
|
|
readonly
|
|
|
label=" "
|
|
|
-
|
|
|
placeholder="请输入充值金额( 元 )"
|
|
|
label-width="10px"
|
|
|
clickable
|
|
@@ -429,53 +428,70 @@ export default {
|
|
|
async pay(money, topPayType, payType, channelId) {
|
|
|
if(money.toString().indexOf(".")<1){
|
|
|
money = money + ".00"
|
|
|
- }
|
|
|
- axios.get("dxtop/staff/one",{
|
|
|
- params:{
|
|
|
- id:localStorage.getItem("user_wt")
|
|
|
- }
|
|
|
- }).then(res =>{
|
|
|
- if(res.data?.data?.sid){
|
|
|
- //("erp返回支付宝app支付链接 公众号返回微信支付链接")
|
|
|
- if(localStorage.getItem("classify")){
|
|
|
- let type = localStorage.getItem("classify")
|
|
|
- let channelName =undefined
|
|
|
- if(type == "1"){
|
|
|
- channelName = "外包人员充值"
|
|
|
- }
|
|
|
- axios.post('/dxtop/order/topScanPayApi', {
|
|
|
- "money": money,
|
|
|
- "topPayType": topPayType,
|
|
|
- "payType": payType,
|
|
|
- "channelName":channelName,
|
|
|
- "scene": 6,
|
|
|
- "userId": res.data.data.sid
|
|
|
- }).then(res => {
|
|
|
- this.loading = false;
|
|
|
- if(res.data.status == "ERROR"){
|
|
|
- Toast(res.data.msg)
|
|
|
- }else{
|
|
|
- window.location.href = res.data.data
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ if(localStorage.getItem("type")){
|
|
|
+ axios.post('/dxtop/order/topScanPayApi', {
|
|
|
+ "money": money,
|
|
|
+ "topPayType": topPayType,
|
|
|
+ "payType": payType,
|
|
|
+ "channelId": channelId,
|
|
|
+ "scene": 2,
|
|
|
+ }).then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ if(res.data.status == "ERROR"){
|
|
|
+ Toast(res.data.msg)
|
|
|
}else{
|
|
|
- axios.post('/dxtop/order/topScanPayApi', {
|
|
|
- "money": money,
|
|
|
- "topPayType": topPayType,
|
|
|
- "payType": payType,
|
|
|
- "channelId": channelId,
|
|
|
- "scene": 2,
|
|
|
- }).then(res => {
|
|
|
- this.loading = false;
|
|
|
- if(res.data.status == "ERROR"){
|
|
|
- Toast(res.data.msg)
|
|
|
- }else{
|
|
|
- window.location.href = res.data.data
|
|
|
+ window.location.href = res.data.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ axios.get("dxtop/staff/one",{
|
|
|
+ params:{
|
|
|
+ id:localStorage.getItem("user_wt")
|
|
|
+ }
|
|
|
+ }).then(res =>{
|
|
|
+ if(res.data?.data?.sid){
|
|
|
+ //("erp返回支付宝app支付链接 公众号返回微信支付链接")
|
|
|
+ if(localStorage.getItem("classify")){
|
|
|
+ let type = localStorage.getItem("classify")
|
|
|
+ let channelName =undefined
|
|
|
+ if(type == "1"){
|
|
|
+ channelName = "外包人员充值"
|
|
|
}
|
|
|
- })
|
|
|
+ axios.post('/dxtop/order/topScanPayApi', {
|
|
|
+ "money": money,
|
|
|
+ "topPayType": topPayType,
|
|
|
+ "payType": payType,
|
|
|
+ "channelName":channelName,
|
|
|
+ "scene": 6,
|
|
|
+ "userId": res.data.data.sid
|
|
|
+ }).then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ if(res.data.status == "ERROR"){
|
|
|
+ Toast(res.data.msg)
|
|
|
+ }else{
|
|
|
+ window.location.href = res.data.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ axios.post('/dxtop/order/topScanPayApi', {
|
|
|
+ "money": money,
|
|
|
+ "topPayType": topPayType,
|
|
|
+ "payType": payType,
|
|
|
+ "channelId": channelId,
|
|
|
+ "scene": 2,
|
|
|
+ }).then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ if(res.data.status == "ERROR"){
|
|
|
+ Toast(res.data.msg)
|
|
|
+ }else{
|
|
|
+ window.location.href = res.data.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
},
|
|
|
jumpMode() {
|
|
|
if (this.money) {
|
|
@@ -541,7 +557,6 @@ export default {
|
|
|
this.isWeixinOrAlipay();
|
|
|
this.jumpMode();
|
|
|
if(this.env == "WeiXin" || this.env == "Alipay"){
|
|
|
-
|
|
|
}else{
|
|
|
this.$router.push({
|
|
|
path: "/recharge",
|