推送功能修复
This commit is contained in:
parent
7f23c975c5
commit
eac42fd42c
70
App.vue
70
App.vue
@ -1,51 +1,55 @@
|
||||
<script>
|
||||
//#ifdef APP-PLUS
|
||||
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
import Updater from '@/uni_modules/guyue-updater/index';
|
||||
import Updater from '@/uni_modules/guyue-updater/index';
|
||||
// #endif
|
||||
export default {
|
||||
onLaunch: async function() {
|
||||
// let noticeArr = []
|
||||
// jpushModule.addNotificationListener(res => {
|
||||
// if (!noticeArr.includes(res.messageID)) {
|
||||
// const audioContext = uni.createInnerAudioContext()
|
||||
// // 设置音频文件地址
|
||||
// audioContext.src = `/static/audio/order.mp3`;
|
||||
// // console.log(res.messageID)
|
||||
// audioContext.play()
|
||||
// noticeArr.push(res.messageID)
|
||||
// console.log("app的监听")
|
||||
// }
|
||||
// })
|
||||
console.log('App Launch')
|
||||
this.$store.dispatch('initConfig');
|
||||
try {
|
||||
if (!this.$store.state.app.token) uni.reLaunch({
|
||||
url: '/pages/oaLogin/oaLogin'
|
||||
})
|
||||
} catch (e) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/oaLogin/oaLogin'
|
||||
})
|
||||
}
|
||||
this.$store.dispatch('initConfig');
|
||||
try {
|
||||
if (!this.$store.state.app.token) uni.reLaunch({
|
||||
url: '/pages/oaLogin/oaLogin'
|
||||
})
|
||||
} catch (e) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/oaLogin/oaLogin'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
const audioContext = uni.createInnerAudioContext()
|
||||
// 设置音频文件地址
|
||||
audioContext.src = './static/mp3/order.mp3'
|
||||
let noticeArr = []
|
||||
audioContext.src = '/static/mp3/order.mp3'
|
||||
// 播放音频
|
||||
//#ifdef APP-PLUS
|
||||
jpushModule.addNotificationListener(res => {
|
||||
if (!noticeArr.includes(res.messageID)) {
|
||||
console.log(res.messageID)
|
||||
audioContext.play()
|
||||
noticeArr.push(res.messageID)
|
||||
console.log("app的")
|
||||
uni.vibrateLong({
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (res.notificationEventType == 'notificationOpened') return
|
||||
audioContext.play()
|
||||
uni.vibrateLong();
|
||||
console.log("app的监听")
|
||||
})
|
||||
// 版本更新
|
||||
// Updater.update({
|
||||
// title: '发现新版本',
|
||||
// content: '1. 我们更新了新的UI设计\n2. 我们更新了新的UI设计\n3. 我们更新了新的UI设计\n4. 我们更新了新的UI设计\n',
|
||||
// versionName: '1.3.6',
|
||||
// downUrl: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/__UNI__B5B1EDD__20230816174515.apk',
|
||||
// force: false, // 是否强制更新
|
||||
// quiet: false // 是否静默更新
|
||||
// })
|
||||
// 版本更新
|
||||
// Updater.update({
|
||||
// title: '发现新版本',
|
||||
// content: '1. 我们更新了新的UI设计\n2. 我们更新了新的UI设计\n3. 我们更新了新的UI设计\n4. 我们更新了新的UI设计\n',
|
||||
// versionName: '1.3.6',
|
||||
// downUrl: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/__UNI__B5B1EDD__20230816174515.apk',
|
||||
// force: false, // 是否强制更新
|
||||
// quiet: false // 是否静默更新
|
||||
// })
|
||||
// #endif
|
||||
console.log('App Show')
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -63,7 +63,7 @@
|
||||
<view class="btns">
|
||||
<u-button type="primary" @click="showPop=true" style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32"
|
||||
text="申请驳回"></u-button>
|
||||
<u-button type="primary" text="生成合同" color="#0122C7"></u-button>
|
||||
<u-button type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button>
|
||||
</view>
|
||||
<view class="">
|
||||
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
|
||||
@ -86,6 +86,9 @@
|
||||
contractApi,
|
||||
overruleApi
|
||||
} from "@/api/property.js"
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -98,7 +101,15 @@
|
||||
methods: {
|
||||
confirm() {
|
||||
console.log(this.overruleValue)
|
||||
this.showPop = false
|
||||
overruleApi().then(res => {
|
||||
Toast("操作成功")
|
||||
this.showPop = false
|
||||
})
|
||||
},
|
||||
contractFn() {
|
||||
contractApi().then(res => {
|
||||
Toast("操作成功")
|
||||
})
|
||||
},
|
||||
navTo(url) {
|
||||
uni.navigateTo({
|
||||
@ -113,11 +124,9 @@
|
||||
<style lang="scss" scoped>
|
||||
.date {
|
||||
padding: 10rpx 28rpx 0;
|
||||
|
||||
}
|
||||
|
||||
.cards {
|
||||
|
||||
margin: 28rpx;
|
||||
width: 694rpx;
|
||||
background: #ffffff;
|
||||
|
@ -201,7 +201,7 @@
|
||||
data() {
|
||||
return {
|
||||
applicationList: [1, 1],
|
||||
isNewCheck: true,
|
||||
// isNewCheck: true,
|
||||
showPop: false,
|
||||
dataList: [1, 2, 3],
|
||||
tabLists: [{
|
||||
@ -241,7 +241,8 @@
|
||||
if (!this.newCarNum) return
|
||||
// leaseApi().then(res=>{})
|
||||
this.showPop = false
|
||||
this.isNewCheck = true
|
||||
Toast("操作成功")
|
||||
// this.isNewCheck = true
|
||||
|
||||
|
||||
},
|
||||
|
@ -22,7 +22,7 @@
|
||||
<view class="personnel_list" @click="toDetail('/subpkg/property/vehicle')">
|
||||
<view class="cards">
|
||||
<view class="cards_head">
|
||||
<text><!-- <!-- {{datas.}} --> --></text>
|
||||
<text><!-- <!-- {{datas.}} --></text>
|
||||
</view>
|
||||
<view class="cards_content">
|
||||
<view class="right">
|
||||
|
Loading…
x
Reference in New Issue
Block a user