更新:1.苹果培训班报名可设置支付方式;2.修改应用市场上架第三方SDK调用的隐私政策问题;
This commit is contained in:
97
App.vue
97
App.vue
@@ -33,52 +33,57 @@ export default {
|
||||
store.commit("setCacheData");
|
||||
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
jpushModule.initJPushService();
|
||||
jpushModule.setLoggerEnable(true);
|
||||
plus.screen.lockOrientation("portrait-primary");
|
||||
// 设置别名
|
||||
jpushModule.setAlias({
|
||||
'alias': this.lxzl.getUserInfo().userId + '',
|
||||
'sequence': 1
|
||||
})
|
||||
//监听 极光推送连接状态
|
||||
this.getNotificationEnabled();
|
||||
jpushModule.addConnectEventListener(result => {
|
||||
let connectEnable = result.connectEnable
|
||||
uni.$emit('connectStatusChange', connectEnable)
|
||||
});
|
||||
jpushModule.addNotificationListener(result => { //极光推送的消息通知回调
|
||||
jpushModule.setBadge(0);
|
||||
plus.runtime.setBadgeNumber(0);
|
||||
let notificationEventType = result.notificationEventType
|
||||
let woopId = result.extras && result.extras.dataType === 'woop' && result.extras.value;
|
||||
console.log("通知", result, notificationEventType)
|
||||
// 点击事件
|
||||
if (notificationEventType == 'notificationOpened') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/taskDetail/taskDetail?' + 'woopId=' + woopId
|
||||
});
|
||||
}
|
||||
});
|
||||
uni.$on('connectStatusChange', (connectStatus) => {
|
||||
var connectStr = ''
|
||||
if (connectStatus == true) {
|
||||
connectStr = '已连接'
|
||||
// this.getRegistrationID()
|
||||
} else {
|
||||
connectStr = '未连接'
|
||||
}
|
||||
console.log('监听到了连接状态变化 --- ', connectStr)
|
||||
this.connectStatus = connectStr
|
||||
})
|
||||
jpushModule.isPushStopped(res => {
|
||||
// code 0已停止推送 1未停止推送
|
||||
const { code } = res
|
||||
console.log(res, '安卓连接状态');
|
||||
})
|
||||
//#endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
const agreed = uni.getStorageSync('privacy_agreed') || (store.state.userInfo && store.state.userInfo.id);
|
||||
console.log('检测用户是否同意隐私协议', agreed)
|
||||
if (agreed) {
|
||||
console.log('同意隐私协议,开始调用极光推送', agreed)
|
||||
jpushModule.initJPushService();
|
||||
jpushModule.setLoggerEnable(true);
|
||||
plus.screen.lockOrientation("portrait-primary");
|
||||
// 设置别名
|
||||
jpushModule.setAlias({
|
||||
'alias': this.lxzl.getUserInfo().userId + '',
|
||||
'sequence': 1
|
||||
})
|
||||
//监听 极光推送连接状态
|
||||
this.getNotificationEnabled();
|
||||
jpushModule.addConnectEventListener(result => {
|
||||
let connectEnable = result.connectEnable
|
||||
uni.$emit('connectStatusChange', connectEnable)
|
||||
});
|
||||
jpushModule.addNotificationListener(result => { //极光推送的消息通知回调
|
||||
jpushModule.setBadge(0);
|
||||
plus.runtime.setBadgeNumber(0);
|
||||
let notificationEventType = result.notificationEventType
|
||||
let woopId = result.extras && result.extras.dataType === 'woop' && result.extras.value;
|
||||
console.log("通知", result, notificationEventType)
|
||||
// 点击事件
|
||||
if (notificationEventType == 'notificationOpened') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/taskDetail/taskDetail?' + 'woopId=' + woopId
|
||||
});
|
||||
}
|
||||
});
|
||||
uni.$on('connectStatusChange', (connectStatus) => {
|
||||
var connectStr = ''
|
||||
if (connectStatus == true) {
|
||||
connectStr = '已连接'
|
||||
// this.getRegistrationID()
|
||||
} else {
|
||||
connectStr = '未连接'
|
||||
}
|
||||
console.log('监听到了连接状态变化 --- ', connectStr)
|
||||
this.connectStatus = connectStr
|
||||
})
|
||||
jpushModule.isPushStopped(res => {
|
||||
// code 0已停止推送 1未停止推送
|
||||
const { code } = res
|
||||
console.log(res, '安卓连接状态');
|
||||
})
|
||||
}
|
||||
//#endif
|
||||
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
Vue.prototype.winWidth = res.screenWidth;
|
||||
|
||||
Reference in New Issue
Block a user