Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72190b811d | ||
|
|
ecdc8a85ec | ||
|
|
f625109e2d | ||
|
|
d30d3553a1 | ||
|
|
4440d4facb |
32
App.vue
32
App.vue
@@ -17,11 +17,11 @@
|
|||||||
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
||||||
// #endif
|
// #endif
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
platform:null, // 系统
|
platform: null, // 系统
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLaunch: function(e) {
|
onLaunch: function(e) {
|
||||||
@@ -144,10 +144,10 @@
|
|||||||
}
|
}
|
||||||
// APPUpdate();
|
// APPUpdate();
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function(e) {
|
onShow: function(e) {
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
//获取二维码携带的参数
|
//获取二维码携带的参数
|
||||||
let scene = decodeURIComponent(e.query.scene);
|
let scene = decodeURIComponent(e.query.scene);
|
||||||
@@ -192,16 +192,28 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
setTimeout(function(){
|
||||||
|
var args = plus.runtime.arguments;
|
||||||
|
if (args) {
|
||||||
|
// 处理args参数,如直达到某新页面等
|
||||||
|
console.log(args)
|
||||||
|
}
|
||||||
|
},300)
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
onHide: function(){
|
||||||
|
plus.runtime.arguments = ''
|
||||||
|
console.log('清空')
|
||||||
},
|
},
|
||||||
onHide: function() {},
|
|
||||||
destroyed() {
|
destroyed() {
|
||||||
store.commit('setUserInfo', {
|
store.commit('setUserInfo', {
|
||||||
'playFlag': true
|
'playFlag': true
|
||||||
})
|
})
|
||||||
console.log('页面销毁')
|
console.log('页面销毁')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"prompt" : "template",
|
"prompt" : "template",
|
||||||
"template" : {
|
"template" : {
|
||||||
"title" : "用户协议和隐私政策",
|
"title" : "用户协议和隐私政策",
|
||||||
"message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://main.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
"message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href='https://www.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://www.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||||
"buttonAccept" : "同意",
|
"buttonAccept" : "同意",
|
||||||
"buttonRefuse" : "暂不同意"
|
"buttonRefuse" : "暂不同意"
|
||||||
}
|
}
|
||||||
@@ -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" : {
|
||||||
|
|||||||
16
pages.json
16
pages.json
@@ -561,13 +561,13 @@
|
|||||||
"text": "我"
|
"text": "我"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"condition": { //模式配置,仅开发期间生效
|
|
||||||
"current": 0, //当前激活的模式(list 的索引项)
|
|
||||||
"list": [{
|
|
||||||
"name": "", //模式名称
|
|
||||||
"path": "", //启动页面,必选
|
|
||||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
|
// "condition": { //模式配置,仅开发期间生效
|
||||||
|
// "current": 0, //当前激活的模式(list 的索引项)
|
||||||
|
// "list": [{
|
||||||
|
// "name": "", //模式名称
|
||||||
|
// "path": "", //启动页面,必选
|
||||||
|
// "query": "" //启动参数,在页面的onLoad函数里面得到
|
||||||
|
// }]
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,12 @@
|
|||||||
<view class="xiugai">
|
<view class="xiugai">
|
||||||
<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 != ''">
|
||||||
|
<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> -->
|
||||||
@@ -85,10 +90,10 @@
|
|||||||
<view class="nav_list" @click="onPageJump('../user/address')">
|
<view class="nav_list" @click="onPageJump('../user/address')">
|
||||||
<text>地址管理</text>
|
<text>地址管理</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="nav_list" @click="onGoing()">
|
<!-- <view class="nav_list" @click="onGoing()">
|
||||||
<text>帮助与反馈11111</text>
|
<text>帮助与反馈11111</text>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <view class="nav_list" @click="newOnShare" v-if="isAndorid"> -->
|
<!-- <view class="nav_list" @click="newOnShare" v-if="isAndorid"> -->
|
||||||
<view class="nav_list" @click="newOnShare">
|
<view class="nav_list" @click="newOnShare">
|
||||||
<text>分享App</text>
|
<text>分享App</text>
|
||||||
@@ -102,7 +107,7 @@
|
|||||||
<view class="nav_list" @click="logout">
|
<view class="nav_list" @click="logout">
|
||||||
<text>注销帐号</text>
|
<text>注销帐号</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow=false"
|
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow=false"
|
||||||
@@ -112,7 +117,7 @@
|
|||||||
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
||||||
<uni-popup-share @select="haveSelected"></uni-popup-share>
|
<uni-popup-share @select="haveSelected"></uni-popup-share>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
<music-play :playData="playData"></music-play>
|
<music-play :playData="playData"></music-play>
|
||||||
<z-navigation></z-navigation>
|
<z-navigation></z-navigation>
|
||||||
</view>
|
</view>
|
||||||
@@ -123,27 +128,30 @@
|
|||||||
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: '', // 系统名称
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//第一次加载
|
//第一次加载
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
// #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,27 +163,70 @@
|
|||||||
// 隐藏原生的tabbar
|
// 隐藏原生的tabbar
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
musicPlay
|
musicPlay
|
||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
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: {
|
||||||
|
key1: "我是三方app携带的参数激活99" //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 +236,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 +253,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
|
||||||
});
|
});
|
||||||
@@ -232,25 +283,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新写分享
|
// 新写分享
|
||||||
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 +321,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onPageJump(url) {
|
onPageJump(url) {
|
||||||
console.log(url,'url')
|
console.log(url, 'url')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
@@ -280,7 +331,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'
|
||||||
});
|
});
|
||||||
@@ -447,4 +500,4 @@
|
|||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Binary file not shown.
Reference in New Issue
Block a user