Commit cc3d052d authored by Smile's avatar Smile Committed by wux

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

parent 423fd5fb
......@@ -197,6 +197,9 @@
<view v-if="!forceUpdate" class="ad-btn" @click="closeAd">
<view>{{ $lang.lang.notices.close }}</view>
</view>
<view class="ad-btn" v-if="forceUpdate" @click="toCloseApp">
<view>{{ $lang.lang.notices.closeApp }}</view>
</view>
</view>
<view class="progress" v-if="showdownLine">
<progress :percent="downloadNum" show-info stroke-width="3" />
......@@ -287,6 +290,15 @@ export default {
}, 500)
},
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() {
const lang=uni.getStorageSync('locale')||'zh';
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