更新
This commit is contained in:
parent
741d1e795b
commit
e54e3fbbd9
10
App.vue
10
App.vue
@ -1,7 +1,6 @@
|
||||
<script>
|
||||
//#ifdef APP-PLUS
|
||||
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
import Updater from '@/uni_modules/guyue-updater/index';
|
||||
// #endif
|
||||
export default {
|
||||
onLaunch: async function() {
|
||||
@ -41,15 +40,6 @@
|
||||
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 // 是否静默更新
|
||||
// })
|
||||
// #endif
|
||||
console.log('App Show')
|
||||
},
|
||||
|
@ -1,3 +1,27 @@
|
||||
{
|
||||
"prompt" : "template"
|
||||
"version" : "1.0.0",
|
||||
"prompt" : "template",
|
||||
"title" : "隐私政策和服务协议",
|
||||
"message" : "请你务必审慎阅读、充分理解\"服务协议\"和\"隐私政策\"各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。你可阅读<a href=\"https://worker-task.lihaink.cn/pc/policy/service\">《服务协议》</a>和<a href=\"https://worker-task.lihaink.cn/pc/policy/privacy\">《服务协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||
"buttonAccept" : "同意",
|
||||
"buttonRefuse" : "拒绝",
|
||||
"second" : {
|
||||
"title" : "确认提示",
|
||||
"message" : " 进入应用前,你需先同意<a href=\"https://worker-task.lihaink.cn/pc/policy/service\">《服务协议》</a>和<a href=\"https://worker-task.lihaink.cn/pc/policy/privacy\">《服务协议》</a>,否则将退出应用。",
|
||||
"buttonAccept" : "同意并接受",
|
||||
"buttonRefuse" : "退出应用"
|
||||
},
|
||||
"styles" : {
|
||||
"backgroundColor" : "#FFFFFF",
|
||||
"borderRadius" : "10px",
|
||||
"title" : {
|
||||
"color" : "#333333"
|
||||
},
|
||||
"buttonAccept" : {
|
||||
"color" : "#333333"
|
||||
},
|
||||
"buttonRefuse" : {
|
||||
"color" : "#9B9AB9"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name" : "供销综合平台",
|
||||
"name" : "里海社区",
|
||||
"appid" : "__UNI__B5B1EDD",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Cache from '@/utils/cache';
|
||||
import { getConfig } from "@/api/config.js";
|
||||
import Updater from '@/uni_modules/guyue-updater/index';
|
||||
|
||||
const state = {
|
||||
eyeType: Cache.get('eyeType') || true, // 小眼睛
|
||||
@ -26,6 +27,31 @@ const actions = {
|
||||
async initConfig({ state, commit }) {
|
||||
let res = await getConfig();
|
||||
commit('SET_CONFIG', res.data);
|
||||
// 版本更新
|
||||
if(res.data.newVersion){
|
||||
try{
|
||||
let info = res.data.versionInfo||{};
|
||||
// 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 // 是否静默更新
|
||||
// })
|
||||
info = {
|
||||
title: info.title||'发现新版本',
|
||||
content: info.content||'修复了部分BUG',
|
||||
versionName: info.versionName||'1.0.1',
|
||||
downUrl: info.downUrl||'https://lihai001.oss-cn-chengdu.aliyuncs.com/__UNI__B5B1EDD__20230816174515.apk',
|
||||
force: info.force||false, // 是否强制更新
|
||||
quiet: info.quiet||false // 是否静默更新
|
||||
}
|
||||
Updater.update(info)
|
||||
}catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -43,12 +43,12 @@
|
||||
|
||||
<view class="cards_head">
|
||||
<view class="cards_head_top">
|
||||
<text><u--image src="../../static/img/company/company.png" width="33.29rpx"
|
||||
height="33.29rpx" style="margin-right:20rpx"></u--image></text>
|
||||
<view><u--image src="../../static/img/company/company.png" width="33.29rpx"
|
||||
height="33.29rpx" style="margin-right:20rpx"></u--image></view>
|
||||
<text>{{item.company_name}}</text>
|
||||
</view>
|
||||
<text @click="navTo('/subpkg/companySign/companySign?id='+item.id)">详情 <uni-icons type="forward"
|
||||
style="margin-left: 10rpx;" color="white"></uni-icons></text>
|
||||
<view @click="navTo('/subpkg/companySign/companySign?id='+item.id)">详情 <uni-icons type="forward"
|
||||
style="margin-left: 10rpx;" color="white"></uni-icons></view>
|
||||
</view>
|
||||
<view class="cards_content">
|
||||
<view class="right">
|
||||
@ -59,7 +59,7 @@
|
||||
</view>
|
||||
<view>
|
||||
<text style="color: green;" v-if="item.is_contract">已签约</text>
|
||||
<text style="color: red;" v-else>未签约</text>
|
||||
<text style="color: #ff7c32;" v-else>签约中</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user