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