|
@@ -6,9 +6,12 @@
|
|
|
</van-row>
|
|
|
<van-row class="contentBox">
|
|
|
<van-row>
|
|
|
+ <!-- <van-col @click="openApp({app:'weixin://dl/scan',downA:'https://dldir1.qq.com/weixin/android/weixin8011android1980_arm64.apk',downI:'https://itunes.apple.com/cn/app/wei/id414478124',})"></van-col> -->
|
|
|
<van-col @click="openApp({app:'weixin://scanqrcode',downA:'https://dldir1.qq.com/weixin/android/weixin8011android1980_arm64.apk',downI:'https://itunes.apple.com/cn/app/wei/id414478124',})"></van-col>
|
|
|
- <van-col @click="openApp({app:'alipayqr://platformapi/startapp?saId=10000007',downA:'https://t.alipayobjects.com/L1/71/100/and/alipay_wap_main.apk',downI:'https://itunes.apple.com/cn/app/id333206289?mt=8',})"></van-col>
|
|
|
- <van-col @click="openApp({app:'ysf',downA:'',downI:'',})"></van-col>
|
|
|
+ <van-col @click="openApp({app:'alipayqr',downA:'https://t.alipayobjects.com/L1/71/100/and/alipay_wap_main.apk',downI:'https://itunes.apple.com/cn/app/id333206289?mt=8',})"></van-col>
|
|
|
+ <!-- <van-col @click="openApp({app:'alipayqr://platformapi/startapp?saId=20000067&url=https://blog.csdn.net/sun5769675/article/details/89634633',downA:'https://t.alipayobjects.com/L1/71/100/and/alipay_wap_main.apk',downI:'https://itunes.apple.com/cn/app/id333206289?mt=8',})"></van-col> -->
|
|
|
+ <!-- <van-col @click="openApp({app:'ysf',downA:'https://youhui.95516.com/app/app/software/unionpay-wallet-v2.apk',downI:'https://dl.95862788.com/52/77785',})"></van-col> -->
|
|
|
+ <van-col @click="openApp({app:'ysf',downA:'https://youhui.95516.com/app/app/software/unionpay-wallet-v2.apk',downI:'https://youhui.95516.com/hybrid_v4/html/help/download.html?code=ctoc00000000022',})"></van-col>
|
|
|
</van-row>
|
|
|
<van-row>
|
|
|
请选择微信、支付宝或云闪付进行充值。
|
|
@@ -16,7 +19,6 @@
|
|
|
</van-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import { Dialog, Notify } from "vant";
|
|
|
export default {
|
|
@@ -27,6 +29,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
iosApp: "",
|
|
|
+ token:'',
|
|
|
+ url:''
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -41,18 +45,36 @@ export default {
|
|
|
isWeixin() {
|
|
|
return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
|
|
|
},
|
|
|
- openApp(url = "") {
|
|
|
+ async openApp(url = "") {
|
|
|
+ console.log(url.app)
|
|
|
if (!url) return;
|
|
|
- if (url.app === 'ysf') return Notify({ type: 'primary', message: '暂不可用' });
|
|
|
- if (this.iosApp) return Notify({ type: 'primary', message: '请使用浏览器打开' });
|
|
|
- // 非微信浏览器
|
|
|
+ //if (url.app === 'ysf') return Notify({ type: 'primary', message: '暂不可用' });
|
|
|
+ //if (this.iosApp) return Notify({ type: 'primary', message: '请使用浏览器打开' });
|
|
|
+ //非微信浏览器
|
|
|
+
|
|
|
window.navigator.userAgent.toLowerCase();
|
|
|
if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
|
|
|
- window.location.href = url.app;
|
|
|
+ if (url.app === 'alipayqr'){
|
|
|
+ let res1 = await this.$axios.post('http://172.16.120.104:8085/login' ,{"username":"admin","password":"admin123"}).then(res=>{
|
|
|
+ this.token = res.data.token
|
|
|
+ console.log(res1)
|
|
|
+ }).then(()=>{
|
|
|
+ let res2 = this.$axios.post('http://172.16.120.104:8085/dxtop/order/callUnifiedPay' , { "money":'10',"topPayType":"A01","payType":'3'}
|
|
|
+ ,{
|
|
|
+ headers: {
|
|
|
+ "Authorization":this.token //token换成从缓存获取
|
|
|
+ }
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res2)
|
|
|
+ window.location.href = res.data.msg
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
const loadDateTime = +new Date();
|
|
|
window.setTimeout( ()=> {
|
|
|
const timeOutDateTime = +new Date();
|
|
|
- if (timeOutDateTime - loadDateTime > 5000) {
|
|
|
+ if (timeOutDateTime - loadDateTime > 2000) {
|
|
|
window.location.href = url.downI;
|
|
|
} else {
|
|
|
window.close();
|
|
@@ -65,10 +87,27 @@ export default {
|
|
|
console.log(e)
|
|
|
});
|
|
|
}
|
|
|
- }, 2000);
|
|
|
+ }, 3000);
|
|
|
} else if (navigator.userAgent.match(/android/i)) {
|
|
|
try {
|
|
|
- window.location.href = url.app;
|
|
|
+ if (url.app === 'alipayqr'){
|
|
|
+ let res1 = await this.$axios.post('http://172.16.120.104:8085/login' ,{"username":"admin","password":"admin123"}).then(res=>{
|
|
|
+ this.token = res.data.token
|
|
|
+ console.log(res1)
|
|
|
+ }).then(()=>{
|
|
|
+ let res2 = this.$axios.post('http://172.16.120.104:8085/dxtop/order/callUnifiedPay' , { "money":'10',"topPayType":"A01","payType":'3'}
|
|
|
+ ,{
|
|
|
+ headers: {
|
|
|
+ "Authorization":this.token //token换成从缓存获取
|
|
|
+ }
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res2)
|
|
|
+ window.location.href = res.data.msg
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ window.location.href = this.url;
|
|
|
setTimeout(function () {
|
|
|
window.location.href = url.downA;
|
|
|
}, 500);
|