用户协议优化
This commit is contained in:
13
App.vue
13
App.vue
@@ -10,6 +10,7 @@ export default {
|
||||
console.log(window)
|
||||
// this.connect()
|
||||
console.log('App Launch')
|
||||
|
||||
let devCode = uni.getStorageSync('devCode')
|
||||
if (!devCode) {
|
||||
uni.getSystemInfo({
|
||||
@@ -18,18 +19,6 @@ export default {
|
||||
},
|
||||
})
|
||||
}
|
||||
if (!uni.getStorageSync(this.$cacheKey.access_token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/user/login',
|
||||
})
|
||||
}
|
||||
let userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
if (!userInfo) return
|
||||
// 查询字典
|
||||
queryDictDataCache().then((res) => {
|
||||
uni.setStorageSync(this.$cacheKey.dictData, res.data)
|
||||
})
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
console.log('App Hide')
|
||||
|
||||
@@ -1,3 +1,38 @@
|
||||
{
|
||||
"prompt" : "none"
|
||||
"version": "2",
|
||||
"prompt": "template",
|
||||
"title": "服务协议和隐私政策",
|
||||
"message": " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||
"buttonAccept": "同意并接受",
|
||||
"buttonRefuse": "暂不同意",
|
||||
"hrefLoader": "system|default",
|
||||
"backToExit":"false",
|
||||
"second": {
|
||||
"title": "确认提示",
|
||||
"message": " 进入应用前,你需先同意<a href=\"\">《用户协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。",
|
||||
"buttonAccept": "同意并继续",
|
||||
"buttonRefuse": "退出应用"
|
||||
},
|
||||
"disagreeMode":{
|
||||
"support": false,
|
||||
"loadNativePlugins": false,
|
||||
"visitorEntry": false,
|
||||
"showAlways": false
|
||||
},
|
||||
"styles": {
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderRadius":"5px",
|
||||
"title": {
|
||||
"color": "#111"
|
||||
},
|
||||
"buttonAccept": {
|
||||
"color": "#111"
|
||||
},
|
||||
"buttonRefuse": {
|
||||
"color": "#111"
|
||||
},
|
||||
"buttonVisitor": {
|
||||
"color": "#111"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import {getImageUrl} from '@/common/api/basic'
|
||||
import { apiUpdatePush } from '@/common/api/user'
|
||||
import { queryDictDataCache } from '../api/dictionary.js'
|
||||
import cacheKey from './cacheKey.js'
|
||||
import config from "@/common/js/config";
|
||||
import config from '@/common/js/config'
|
||||
import jsrsasign from 'jsrsasign'
|
||||
|
||||
const toast = (title, duration = 1500, call, mask = false, icon = 'none') => {
|
||||
@@ -268,10 +268,20 @@ const decodeToken = (token) => {
|
||||
}
|
||||
|
||||
const getDictData = (key) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let dictData = uni.getStorageSync(cacheKey.dictData)
|
||||
if (dictData) {
|
||||
return dictData.filter((item) => item.code === key)[0]?.children || []
|
||||
resolve(dictData.filter((item) => item.code === key)[0]?.children || [])
|
||||
} else {
|
||||
// 查询字典
|
||||
queryDictDataCache().then((res) => {
|
||||
uni.setStorageSync(cacheKey.dictData, res.data)
|
||||
resolve(res.data.filter((item) => item.code === key)[0]?.children || [])
|
||||
}).catch(err=>{
|
||||
reject(err)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
@@ -285,5 +295,5 @@ export default {
|
||||
prePage,
|
||||
loginSuccess,
|
||||
refreshPrePage,
|
||||
getDictData
|
||||
getDictData,
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"appid" : "__UNI__88BC25B",
|
||||
"description" : "",
|
||||
"versionName" : "1.2.8",
|
||||
"versionCode" : 128,
|
||||
"versionCode" : 127,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@@ -106,6 +106,9 @@
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -131,7 +134,7 @@
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"https" : true,
|
||||
"target" : "http://192.168.1.115:10215",
|
||||
"target" : "https://pqmcn.com:8092/api",
|
||||
"changOrigin" : true,
|
||||
"pathRewrite" : {
|
||||
"/api" : ""
|
||||
|
||||
@@ -488,7 +488,8 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
this.topolodyData = this.$util.getDictData('Line_Position').map((item) => {
|
||||
this.$util.getDictData('Line_Position').then((res) => {
|
||||
this.topolodyData = res.map((item) => {
|
||||
switch (item.name) {
|
||||
case '电网侧':
|
||||
item.showKey = ['Apf_ThdA_Sys(%)']
|
||||
@@ -514,6 +515,7 @@ export default {
|
||||
value: [],
|
||||
}
|
||||
})
|
||||
})
|
||||
this.init()
|
||||
},
|
||||
}
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
<text style="font-size: 32rpx; font-weight: 500">灿能物联</text>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx">{{
|
||||
select.engineeringName || emptyEngineeringName
|
||||
}}
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx"
|
||||
>{{ select.engineeringName || emptyEngineeringName }}
|
||||
</text>
|
||||
<uni-icons type="bottom" size="16" color="#111" v-if="select.engineeringName"></uni-icons>
|
||||
</template>
|
||||
@@ -71,7 +70,7 @@ export default {
|
||||
engineeringId: '',
|
||||
},
|
||||
engineeringList: [],
|
||||
navTabHeight: 0
|
||||
navTabHeight: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -83,7 +82,7 @@ export default {
|
||||
} else {
|
||||
return '创建工程'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
selectEngineering() {
|
||||
@@ -153,19 +152,27 @@ export default {
|
||||
item.runStatus = 1
|
||||
})
|
||||
this.devCount.engineeringListLength = this.engineeringList.length
|
||||
console.log(this.devCount);
|
||||
console.log(this.devCount)
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
if (!uni.getStorageSync(this.$cacheKey.access_token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/user/login',
|
||||
})
|
||||
}
|
||||
this.store = this.DataSource('/cs-device-boot/EquipmentDelivery/queryEquipmentByProject')
|
||||
// #ifdef APP-PLUS
|
||||
setTimeout(() => {
|
||||
// 获取nav高度
|
||||
uni.createSelectorQuery().select('.uni-navbar').boundingClientRect((rect) => {
|
||||
uni.createSelectorQuery()
|
||||
.select('.uni-navbar')
|
||||
.boundingClientRect((rect) => {
|
||||
this.navTabHeight = rect.height
|
||||
console.log('calc(100vh - ' + this.navTabHeight + ')')
|
||||
}).exec()
|
||||
})
|
||||
.exec()
|
||||
}, 1000)
|
||||
// #endif
|
||||
},
|
||||
@@ -174,7 +181,7 @@ export default {
|
||||
let access_token = uni.getStorageSync(this.$cacheKey.access_token)
|
||||
if (!access_token) {
|
||||
uni.reLaunch({
|
||||
url: `/pages/user/login`
|
||||
url: `/pages/user/login`,
|
||||
})
|
||||
} else {
|
||||
if (
|
||||
@@ -189,7 +196,6 @@ export default {
|
||||
}
|
||||
this.init()
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -26,8 +26,8 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 3
|
||||
|
||||
@@ -26,8 +26,8 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 2
|
||||
|
||||
@@ -1,17 +1,60 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-02-03" clickable @click="jump" />
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-02-02" clickable @click="jump" />
|
||||
<uni-list-item show-badge badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-02-01" clickable @click="jump" />
|
||||
<uni-list-item badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-01-31" clickable @click="jump" />
|
||||
<uni-list-item badgeType="error" isDot badge-text="未读" title="发生稳态越限监测点10个" note="2023-01-30" clickable @click="jump" />
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-03"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-02"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-01"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-01-31"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-01-30"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
</uni-list>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import list from "@/common/js/list";
|
||||
import list from '@/common/js/list'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
@@ -24,14 +67,14 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 1
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach(item => {
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||
this.store.data.forEach((item) => {
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
@@ -42,7 +85,7 @@ export default {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -51,7 +94,6 @@ export default {
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-card :title="item.title" :extra="item.status === '1'?'':'未读'" :sub-title="item.startTime"
|
||||
<uni-card
|
||||
:title="item.title"
|
||||
:extra="item.status === '1' ? '' : '未读'"
|
||||
:sub-title="item.startTime"
|
||||
@click="jump(item)"
|
||||
v-for="(item,index) in store.data" :key="index">
|
||||
v-for="(item, index) in store.data"
|
||||
:key="index"
|
||||
>
|
||||
<view class="term-list-bottom">
|
||||
<view class="term-list-bottom-item">
|
||||
{{ item.engineeringName + '' + item.projectName }}
|
||||
@@ -17,11 +22,10 @@
|
||||
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||
</view>
|
||||
</Cn-page>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from "@/common/js/list";
|
||||
import list from '@/common/js/list'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
@@ -34,14 +38,14 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let dictData = this.$util.getDictData('app_event')
|
||||
async init() {
|
||||
let dictData = await this.$util.getDictData('app_event')
|
||||
console.log(dictData)
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 0
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach(item => {
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||
this.store.data.forEach((item) => {
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
@@ -52,7 +56,7 @@ export default {
|
||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||
uni.navigateTo({ url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,11 +21,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
let dictData = uni.getStorageSync(this.$cacheKey.dictData)
|
||||
dictData.forEach((item) => {
|
||||
if (item.code === 'appInformationType') {
|
||||
item.children.forEach((item2) => {
|
||||
async onLoad() {
|
||||
let dictData = await this.$util.getDictData('appInformationType')
|
||||
dictData.forEach((item2) => {
|
||||
if (item2.code === 'User_Agreement') {
|
||||
queryAppInfoByType(item2.id).then((res) => {
|
||||
this.value = res.data.content
|
||||
@@ -33,8 +31,6 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -21,11 +21,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
let dictData = uni.getStorageSync(this.$cacheKey.dictData)
|
||||
dictData.forEach((item) => {
|
||||
if (item.code === 'appInformationType') {
|
||||
item.children.forEach((item2) => {
|
||||
async onLoad() {
|
||||
let dictData = await this.$util.getDictData('appInformationType')
|
||||
dictData.forEach((item2) => {
|
||||
if (item2.code === 'Personal_Infor_Protect') {
|
||||
queryAppInfoByType(item2.id).then((res) => {
|
||||
this.value = res.data.content
|
||||
@@ -33,8 +31,6 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user