Commit 3b49c3ba authored by Smile's avatar Smile Committed by wux

设置点击版本,没有关闭按钮

parent 402b611a
...@@ -197,6 +197,9 @@ ...@@ -197,6 +197,9 @@
<view v-if="!forceUpdate" class="ad-btn" @click="closeAd"> <view v-if="!forceUpdate" class="ad-btn" @click="closeAd">
<view>{{ $lang.lang.notices.close }}</view> <view>{{ $lang.lang.notices.close }}</view>
</view> </view>
<view class="ad-btn" v-if="forceUpdate" @click="toCloseApp">
<view>{{ $lang.lang.notices.closeApp }}</view>
</view>
</view> </view>
<view class="progress" v-if="showdownLine"> <view class="progress" v-if="showdownLine">
<progress :percent="downloadNum" show-info stroke-width="3" /> <progress :percent="downloadNum" show-info stroke-width="3" />
...@@ -287,6 +290,15 @@ export default { ...@@ -287,6 +290,15 @@ export default {
}, 500) }, 500)
}, },
methods: { methods: {
toCloseApp() {
let platform = uni.getSystemInfoSync().platform.toLocaleLowerCase()
if (platform == 'ios') {
//ios使用原来的quit()方法失效
plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
}else {
plus.runtime.quit();
}
},
showLangView() { showLangView() {
const lang=uni.getStorageSync('locale')||'zh'; const lang=uni.getStorageSync('locale')||'zh';
this.index=this.languages.findIndex(item => item.value === lang); this.index=this.languages.findIndex(item => item.value === lang);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment