初步效果
This commit is contained in:
@@ -78,7 +78,8 @@
|
|||||||
],
|
],
|
||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||||
"minSdkVersion" : 21,
|
"minSdkVersion" : 21,
|
||||||
"targetSdkVersion" : 30
|
"targetSdkVersion" : 30,
|
||||||
|
"schemes" : "nuttyreading"
|
||||||
},
|
},
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"ad" : {},
|
"ad" : {},
|
||||||
@@ -114,7 +115,9 @@
|
|||||||
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
|
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idfa" : false
|
"idfa" : false,
|
||||||
|
"urltypes" : "nuttyreading",
|
||||||
|
"urlschemewhitelist" : "everhealth"
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
|
|||||||
@@ -58,6 +58,10 @@
|
|||||||
<view class="nav_list" @click="switchTab('../bookShop/orderList')">
|
<view class="nav_list" @click="switchTab('../bookShop/orderList')">
|
||||||
<text>我的订单</text>
|
<text>我的订单</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="nav_list" @click="appJump()" v-if="this.osName !== null">
|
||||||
|
<text>打开一路健康</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- <view class="nav_list" @click="onPageJump('../clock/clockList')">
|
<!-- <view class="nav_list" @click="onPageJump('../clock/clockList')">
|
||||||
<text>我的打卡</text>
|
<text>我的打卡</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
@@ -123,7 +127,8 @@
|
|||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
||||||
import {
|
import {
|
||||||
mapState,mapMutations
|
mapState,
|
||||||
|
mapMutations
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -135,6 +140,7 @@
|
|||||||
playData: {},
|
playData: {},
|
||||||
isAndorid: true,
|
isAndorid: true,
|
||||||
platform: null, // 设备系统
|
platform: null, // 设备系统
|
||||||
|
osName: null, // 系统名称
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
@@ -144,6 +150,7 @@
|
|||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.getOS()
|
this.getOS()
|
||||||
this.platform = uni.getSystemInfoSync().platform
|
this.platform = uni.getSystemInfoSync().platform
|
||||||
|
this.osName = plus.os.name
|
||||||
// console.log('操纵系统',this.platform)
|
// console.log('操纵系统',this.platform)
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
@@ -155,6 +162,7 @@
|
|||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
musicPlay
|
musicPlay
|
||||||
@@ -162,6 +170,48 @@
|
|||||||
//方法
|
//方法
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setUserInfo']),
|
...mapMutations(['setUserInfo']),
|
||||||
|
|
||||||
|
// app 跳转
|
||||||
|
appJump() {
|
||||||
|
// console.log(plus.os.name,'系统名称')
|
||||||
|
if (this.osName == "Android") { //安卓
|
||||||
|
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
|
||||||
|
pname: 'cn.com.everhealth', //B款app云打包的包名
|
||||||
|
})) { //安装了app
|
||||||
|
plus.runtime.launchApplication({ //打开app
|
||||||
|
pname: "cn.com.everhealth", //B款app云打包的包名
|
||||||
|
extra: {
|
||||||
|
url: "everhealth://cn.com.everhealth" //B款app配置的schemes+云打包的包名
|
||||||
|
},
|
||||||
|
function(e) {
|
||||||
|
console.log("Open system default browser failed: " + e.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else { //未安装app
|
||||||
|
plus.runtime.openURL('https://a.app.qq.com/o/simple.jsp?pkgname=cn.com.everhealth', function(res) {
|
||||||
|
//进入后台小哥哥给我的应用宝下载链接,让你们后台给你
|
||||||
|
//这链接会判断你手机是ios还是Android,Android进入应用宝下载app
|
||||||
|
//跟下面的是一个链接
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (this.osName == "iOS") { //苹果
|
||||||
|
//因为ios查不到B款app在ios系统手机里面,其实下载了,也是检测不到,所以就不检测了
|
||||||
|
//直接打开B款app,B款app没有的话,会进入回调报错,我们在回调去打开下载链接
|
||||||
|
plus.runtime.launchApplication({
|
||||||
|
action: "everhealth://"
|
||||||
|
}, function(e) {
|
||||||
|
plus.runtime.openURL('https://a.app.qq.com/o/simple.jsp?pkgname=cn.com.everhealth',
|
||||||
|
function(res) {
|
||||||
|
//进入后台小哥哥给我的appStore下载app链接,,让你们后台给你
|
||||||
|
//这链接会判断你手机是ios还是Android,ios进入应用宝下载app
|
||||||
|
//跟上面的是一个链接
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
// 获得操作系统
|
// 获得操作系统
|
||||||
getOS() {
|
getOS() {
|
||||||
let oprateOs = ''
|
let oprateOs = ''
|
||||||
@@ -280,7 +330,9 @@
|
|||||||
// 退出登录
|
// 退出登录
|
||||||
signOut() {
|
signOut() {
|
||||||
this.signShow = false
|
this.signShow = false
|
||||||
this.setUserInfo({'token': null})
|
this.setUserInfo({
|
||||||
|
'token': null
|
||||||
|
})
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '../user/login'
|
url: '../user/login'
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user