Commit 97c7d970 by sunchao

支付宝回调页面

parent e929885a
<template>
<view id="box" @click="func()">返回CFFP财富中心</view>
<view class="">
您已授权登录,请点击返回CFFP财富中心
</view>
</template>
<script>
export default{
data(){
return {
}
},
components:{},
onLoad(){
},
methods:{
func() {
console.log("点击触发99999");
// 判断是那种设备
let u = navigator.userAgent;
console.log(u);
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; // Android系统或者uc浏览器
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // iOS系统
// 如果为Android系统
if (isAndroid) {
window.location.href = "cffpUrlSdls://mdev.zuihuibi.cn/cffp/pages/withdrawal/withdrawal?auth_code=4d79e014a44841448415d715bdceIX16"; // 注意*** 这里需要修改为刚刚设置的urlscheme,auth_code需要后端拼接。auth_code只有后端才能拿到
window.setTimeout(function () {
window.location.href = "http://www.baidu.com"; // 3s后如果不能跳转到 App,则跳转到 App 的下载地址,一般是应用宝的对应的下载地址
}, 2000);
return;
}
// ios设备:原理:判断是否认识这个协议,认识则直接跳转,不认识就在这里下载appios();
if (isiOS) {
let startIndex = u.indexOf('iPhone OS') + 9;
let endIndex = u.indexOf('like Mac OS') - 1;
let num = +u.slice(startIndex, endIndex).split('_')[0]; // 计算版本号的前面数值
if (num < 9) {
window.location.href = "cffpUrlSdls://?auth_code=4d79e014a44841448415d715bdceIX16"; // 注意*** 这里需要修改为刚刚设置的urlscheme,auth_code需要后端拼接。auth_code只有后端才能拿到
} else {
window.location.href = " "; // universal link 链接
}
window.setTimeout(function () {
window.location.href = " "; // 3s后如果不能跳转到 App,则跳转到 AppStore 的下载地址
}, 3000);
return;
};
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -48,11 +48,13 @@
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"minSdkVersion" : 21
"minSdkVersion" : 21,
"schemes" : "cffpUrlSdls"
},
/* ios打包配置 */
"ios" : {
"dSYMs" : false
"dSYMs" : false,
"urltypes" : "cffpUrlSdls"
},
/* SDK配置 */
"sdkConfigs" : {
......
......@@ -437,6 +437,13 @@
"navigationBarTitleText": "申请加盟-结果",
"enablePullDownRefresh": false
}
},{
"path" : "components/redirect_uri/redirect_uri",
"style" :
{
"navigationBarTitleText": "第三方回调页面",
"enablePullDownRefresh": false
}
}
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment