33
This commit is contained in:
@@ -198,7 +198,24 @@
|
||||
<view>
|
||||
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
|
||||
</view>
|
||||
|
||||
<view class="appJump ">
|
||||
<view class="everhealth item flexbox" @click="appjumpfun('nuttyreading')">
|
||||
<view class="img">
|
||||
<image src="@/static/f40x40.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>疯子读书</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zmzm item flexbox" @click="appjumpfun('zmzm')">
|
||||
<view class="img">
|
||||
<image src="@/static/40x40.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>众妙之门</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-navigation></z-navigation>
|
||||
@@ -586,7 +603,58 @@
|
||||
url: '../bookShop/bookShopType?type=' + e
|
||||
});
|
||||
},
|
||||
|
||||
appjumpfun(name){
|
||||
let bagName = ''
|
||||
let schemes = ''
|
||||
if(name == 'zmzm'){
|
||||
bagName = 'com.cn.zmzm'
|
||||
schemes = 'zmzm'
|
||||
}
|
||||
if(name == 'nuttyreading'){
|
||||
bagName = 'com.cn.nuttyreading'
|
||||
schemes = 'nuttyreading'
|
||||
}
|
||||
// if(name == 'everhealth'){
|
||||
if (plus.os.name == "Android") { //安卓
|
||||
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
|
||||
pname: bagName, //B款app云打包的包名
|
||||
})) { //安装了app
|
||||
plus.runtime.launchApplication({ //打开app
|
||||
pname: bagName, //B款app云打包的包名
|
||||
extra: {
|
||||
url: `${schemes}://${bagName}` //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=${bagName}`, function(res) {
|
||||
//进入后台小哥哥给我的应用宝下载链接,让你们后台给你
|
||||
//这链接会判断你手机是ios还是Android,Android进入应用宝下载app
|
||||
//跟下面的是一个链接
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
} else if (plus.os.name == "iOS") { //苹果
|
||||
//因为ios查不到B款app在ios系统手机里面,其实下载了,也是检测不到,所以就不检测了
|
||||
//直接打开B款app,B款app没有的话,会进入回调报错,我们在回调去打开下载链接
|
||||
plus.runtime.launchApplication({
|
||||
action: "${schemes}://"
|
||||
}, function(e) {
|
||||
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
|
||||
//进入后台小哥哥给我的appStore下载app链接,,让你们后台给你
|
||||
//这链接会判断你手机是ios还是Android,ios进入应用宝下载app
|
||||
//跟上面的是一个链接
|
||||
console.log(res);
|
||||
});
|
||||
});
|
||||
// }
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 三个列表跳页
|
||||
onBookMore(e) {
|
||||
uni.navigateTo({
|
||||
@@ -602,6 +670,19 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
.appJump{position: fixed; right: 0; top: 8%; z-index: 1;
|
||||
.item{background: rgba(255, 255, 255, .6); margin-bottom: 20rpx; border: 1px solid #fff;
|
||||
align-items: center; padding-right: 10rpx;
|
||||
overflow: hidden; border-radius: 50rpx 0 0 50rpx;
|
||||
text{font-size: 20rpx;}
|
||||
.img{
|
||||
// width: 60rpx; height: 60rpx;
|
||||
padding: 6rpx; overflow: hidden;
|
||||
image{width: 36rpx; height: 36rpx; border-radius: 100%;}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.newsBox {
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user