This commit is contained in:
weipengfei 2023-09-01 11:11:26 +08:00
parent e5827a36ed
commit 49ada1a678
2 changed files with 11 additions and 11 deletions

View File

@ -46,14 +46,17 @@ const actions = {
async initConfig({ state, commit }, data = false) { async initConfig({ state, commit }, data = false) {
let res = await getConfig(); let res = await getConfig();
commit('SET_CONFIG', res.data); commit('SET_CONFIG', res.data);
console.log(compareVersions(res.data.version, '1.0.0')==1&&compareVersions(res.data.version, Cache.get('wgt_version'))==1); // console.log(compareVersions(res.data.version, '1.0.0')==1&&compareVersions(res.data.version, Cache.get('wgt_version'))==1);
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync(); let os = uni.getSystemInfoSync();
// uni.showModal({
// title: `当前:${os.appVersion},WGT:${Cache.get('wgt_version')},返回:${res.data.version}`
// })
// #ifdef APP-PLUS
if(data) uni.showLoading({ if(data) uni.showLoading({
title: '检查更新中' title: '检查更新中'
}) })
// 版本更新 // 版本更新
if(compareVersions(res.data.version, os.appVersion)==1&&compareVersions(res.data.version, Cache.get('wgt_version')||'1.0.0')==1){ if(compareVersions(res.data.version, os.appVersion||Cache.get('wgt_version')||'1.0.0')==1&&compareVersions(res.data.version, Cache.get('wgt_version')||'1.0.0')==1){
try{ try{
let info = res.data.version_info||{}; let info = res.data.version_info||{};
let version = { let version = {
@ -65,11 +68,7 @@ const actions = {
quiet: info.quiet==1?true:false // 是否静默更新 quiet: info.quiet==1?true:false // 是否静默更新
} }
Updater.update(version); Updater.update(version);
let suffix = ".wgt"; Cache.set('wgt_version', info.version);
if(info.dow_url.substring(info.dow_url.length - suffix.length, info.dow_url.length)==suffix){
console.log('wgt update');
Cache.set('wgt_version', info.version);
}
}catch(e){ }catch(e){
console.log(e); console.log(e);
} }

View File

@ -4,7 +4,8 @@
<view>账户入股金额</view> <view>账户入股金额</view>
<view><text class="money">{{shareholder.shareholder_money}}</text></view> <view><text class="money">{{shareholder.shareholder_money}}</text></view>
</view> </view>
<view class="card" v-if="shareholder.is_contract"> <view v-if="!is_village" style="text-align: center;color: #aaa;">暂无村公司</view>
<view class="card" v-else-if="shareholder.is_contract">
<view class="contract"> <view class="contract">
<view class="left"> <view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image> <image class="contract_img" src="../../static/img/contract/pdf.png"></image>
@ -107,9 +108,9 @@
</view> --> </view> -->
<view class="button"> <view class="button">
<view class="retreat" @click="retreat">退股</view> <view class="retreat" @click="retreat">退股</view>
<view class="hand" :class="{'disable': !shareholder.is_amount_turned}" @click="hand">上交</view> <view class="hand" :class="{'disable': !shareholder.is_amount_turned||!shareholder.is_village}" @click="hand">上交</view>
</view> </view>
<u-modal :show="modelShow" title="提醒" :content="modelType==1?'请检查信息无误后再生成合同':'请检查合同无误后再发送'" closeOnClickOverlay showCancelButton cancel-text="我再看看" confirm-text="确认无误" close="modelShow=false" @cancel="modelShow=false" @confirm="modelType==1?createContract():addContract();modelShow=false"></u-modal> <u-modal :show="modelShow" title="提醒" :content="modelType==1?'确定要生成合同吗':'请确认合同无误后再发送'" closeOnClickOverlay showCancelButton cancel-text="取消" confirm-text="确认" close="modelShow=false" @cancel="modelShow=false" @confirm="modelType==1?createContract():addContract();modelShow=false"></u-modal>
</view> </view>
</template> </template>