初始化
parent
f4bbf03b3d
commit
47aad76274
|
@ -4,7 +4,7 @@ import request from '@/utils/request'
|
|||
export function pay(query) {
|
||||
return request({
|
||||
url: '/pay/alipay/pay',
|
||||
method: 'post',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<el-col :span="8" v-for="customer in apitypeList" v-if="apitypeList.length != 0&&activeNameL=='全部类型'||customer.sysLeixingpick==activeNameL">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-image :src="customer.sysTypes" @click="goToPaySuccess(customer)">
|
||||
<el-image :src="customer.sysTypes" @click="gotoMaintained(customer)">
|
||||
<div slot="placeholder" class="image-slot">
|
||||
加载中<span class="dot">...</span>
|
||||
</div>
|
||||
|
@ -145,18 +145,22 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
pay:{
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
async goToPaySuccess(customer){
|
||||
//在这里我选择了window.open(url,'_self')形式,也就是不跳转新的页面,在本页面直接跳转
|
||||
window.open("http://10.0.2.1:80/alipay/pay?subject="+customer.sysIntro+"&traceNo="+Math.floor(Math.random() * 900000) + 100000+"&totalAmount="+customer.sysNumber,'_self')
|
||||
gotoMaintained(customer){
|
||||
this.pay.subject=customer.sysIntro
|
||||
this.pay.traceNo=Math.floor(Math.random() * 900000) + 100000
|
||||
this.pay.totalAmount=customer.sysNumber
|
||||
const url = `http://47.116.173.119:80/alipay/pay?subject=${this.pay.subject}&traceNo=${this.pay.traceNo}&totalAmount=${this.pay.totalAmount}`;
|
||||
window.open(url, '_self'); // 如果您想在当前页面加载新 URL,这样是正确的
|
||||
},
|
||||
|
||||
getType(activeNameL){
|
||||
this.activeNameL=activeNameL
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue