初步效果
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,18 +127,20 @@
|
|||||||
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() {
|
||||||
return {
|
return {
|
||||||
showEbook:false, // 显示电子书相关
|
showEbook: false, // 显示电子书相关
|
||||||
userMes: {},
|
userMes: {},
|
||||||
signShow: false,
|
signShow: false,
|
||||||
signContent: '是否要退出登录?',
|
signContent: '是否要退出登录?',
|
||||||
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,20 +170,62 @@
|
|||||||
//方法
|
//方法
|
||||||
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 = ''
|
||||||
oprateOs = uni.getSystemInfoSync().platform
|
oprateOs = uni.getSystemInfoSync().platform
|
||||||
// console.log(oprateOs)
|
// console.log(oprateOs)
|
||||||
if(oprateOs == 'android'){
|
if (oprateOs == 'android') {
|
||||||
this.isAndorid = true
|
this.isAndorid = true
|
||||||
}else{
|
} else {
|
||||||
this.isAndorid = false
|
this.isAndorid = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
haveSelected(data){
|
haveSelected(data) {
|
||||||
console.log(data,' 选择的是')
|
console.log(data, ' 选择的是')
|
||||||
if(data.index == 0){
|
if (data.index == 0) {
|
||||||
// 分享到好友
|
// 分享到好友
|
||||||
uni.share({
|
uni.share({
|
||||||
provider: "weixin",
|
provider: "weixin",
|
||||||
@@ -185,14 +235,14 @@
|
|||||||
title: "疯子读书",
|
title: "疯子读书",
|
||||||
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
||||||
imageUrl: "static/fengziIcon.jpg",
|
imageUrl: "static/fengziIcon.jpg",
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function(err) {
|
||||||
console.log("fail:" + JSON.stringify(err));
|
console.log("fail:" + JSON.stringify(err));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if(data.index == 1){
|
} else if (data.index == 1) {
|
||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
uni.share({
|
uni.share({
|
||||||
provider: "weixin",
|
provider: "weixin",
|
||||||
@@ -202,16 +252,16 @@
|
|||||||
title: "疯子读书",
|
title: "疯子读书",
|
||||||
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
||||||
imageUrl: "static/fengziIcon.jpg",
|
imageUrl: "static/fengziIcon.jpg",
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
console.log("success:" + JSON.stringify(res));
|
console.log("success:" + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
fail: function (err) {
|
fail: function(err) {
|
||||||
console.log("fail:" + JSON.stringify(err));
|
console.log("fail:" + JSON.stringify(err));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchTab(url){
|
switchTab(url) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
@@ -234,23 +284,23 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 新写分享
|
// 新写分享
|
||||||
newOnShare(){
|
newOnShare() {
|
||||||
this.$refs.share.open()
|
this.$refs.share.open()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 注销账户
|
// 注销账户
|
||||||
logout(){
|
logout() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要注销当前账户吗?',
|
content: '确定要注销当前账户吗?',
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
showCancel:false,
|
showCancel: false,
|
||||||
content: `注销申请已提交成功,请联系客服进行后续操作:022-24142321`,
|
content: `注销申请已提交成功,请联系客服进行后续操作:022-24142321`,
|
||||||
success: function (res1) {
|
success: function(res1) {
|
||||||
if (res1.confirm) {
|
if (res1.confirm) {
|
||||||
that.signOut()
|
that.signOut()
|
||||||
}
|
}
|
||||||
@@ -270,7 +320,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onPageJump(url) {
|
onPageJump(url) {
|
||||||
console.log(url,'url')
|
console.log(url, 'url')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
@@ -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