Commit d144b900 authored by 琉璃丶c's avatar 琉璃丶c

1.添加版本号显示

parent dd0f14cc
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<img class='subImg' :src="sphImage"/> <img class='subImg' :src="sphImage"/>
<div class="subTitle">上药移动APP</div> <div class="subTitle">上药移动APP</div>
<van-button @click="versionUpdateHttpAction('41')" round type="info" class="bottom-button">iOS版下载</van-button> <van-button @click="versionUpdateHttpAction('42')" round type="info" class="bottom-button">iOS版下载({{this.iosInfo.title}})</van-button>
<van-button @click="versionUpdateHttpAction('40')" round type="info" style="margin-top: 10px" class="bottom-button">Android下载</van-button> <van-button @click="versionUpdateHttpAction('43')" round type="info" style="margin-top: 10px" class="bottom-button">Android下载({{this.androidInfo.title}})</van-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -39,6 +39,8 @@ export default { ...@@ -39,6 +39,8 @@ export default {
activeTab: '', activeTab: '',
isFirst: false, isFirst: false,
isShowNoticeBar: false, isShowNoticeBar: false,
androidInfo: {},
iosInfo: {},
guideImage: require('@/assets/img/guide.png'), guideImage: require('@/assets/img/guide.png'),
sphImage: require('@/assets/img/icon_sph.png'), sphImage: require('@/assets/img/icon_sph.png'),
bagImage: require('@/assets/img/bagImage.png') bagImage: require('@/assets/img/bagImage.png')
...@@ -82,6 +84,8 @@ export default { ...@@ -82,6 +84,8 @@ export default {
// this.moreSearchShow = true // this.moreSearchShow = true
this.getJudgeBrowserAction() this.getJudgeBrowserAction()
// this.tabsTitleData() // this.tabsTitleData()
this.versionUpdateHttpAction('42',true) // ios
this.versionUpdateHttpAction('43',true) // android
}, },
destroyed() { destroyed() {
}, },
...@@ -127,7 +131,7 @@ export default { ...@@ -127,7 +131,7 @@ export default {
if (browser.versions.Safari) { if (browser.versions.Safari) {
this.activeTab = this.activeTab + '/Safari' this.activeTab = this.activeTab + '/Safari'
// window.location.href = 'https://www.baidu.com/' // window.location.href = 'https://www.baidu.com/'
this.versionUpdateHttpAction('41') this.versionUpdateHttpAction('42')
} }
} }
if (browser.versions.android) { if (browser.versions.android) {
...@@ -136,17 +140,16 @@ export default { ...@@ -136,17 +140,16 @@ export default {
this.isShowNoticeBar = true this.isShowNoticeBar = true
} else { } else {
this.activeTab = this.activeTab + '/android' this.activeTab = this.activeTab + '/android'
this.versionUpdateHttpAction('40') this.versionUpdateHttpAction('43')
} }
} }
} }
} else if (browser.versions.weixin) { } else if (browser.versions.weixin) {
this.activeTab = 'weixin' this.activeTab = 'weixin'
} }
} },
, // 版本更新接口
// 版本更新接口 versionUpdateHttpAction(type,isFirst) {
versionUpdateHttpAction(type) {
let _this = this let _this = this
let dict = { let dict = {
'attr': {'empid': ''}, 'attr': {'empid': ''},
...@@ -161,7 +164,16 @@ export default { ...@@ -161,7 +164,16 @@ export default {
} }
activityQueryDocList(dict).then(rt => { activityQueryDocList(dict).then(rt => {
if (rt) { if (rt) {
window.location.href = rt.list[0].comments // ios
if (type === '42') {
this.iosInfo = rt.list[0]
// android
} else if (type === '43') {
this.androidInfo = rt.list[0]
}
if(!isFirst) {
window.location.href = rt.list[0].comments
}
// _this.$toast(rt.list[0].comments) // _this.$toast(rt.list[0].comments)
} else { } else {
_this.$toast(rt.message) _this.$toast(rt.message)
...@@ -169,33 +181,28 @@ export default { ...@@ -169,33 +181,28 @@ export default {
}).catch(e => { }).catch(e => {
this.$toast('获取信息失败!') this.$toast('获取信息失败!')
}) })
} },
,
postDataListAction(item) { postDataListAction(item) {
const removeItem = item const removeItem = item
removeItem.cellId = item.id + item.erp_user removeItem.cellId = item.id + item.erp_user
return item return item
} },
,
openPager(path) { openPager(path) {
this.$router.push({ this.$router.push({
path: path, path: path,
query: this.$store.state.linkInfo query: this.$store.state.linkInfo
}) })
} },
,
onBrowserBack() { onBrowserBack() {
if (this.moreSearchShow) { if (this.moreSearchShow) {
this.moreSearchShow = false this.moreSearchShow = false
return return
} }
this.$router.go(-1) this.$router.go(-1)
} },
,
onSearch() { onSearch() {
} },
,
closeAppPage() { closeAppPage() {
console.log('关闭页面') console.log('关闭页面')
bridge.closeWindow_c() bridge.closeWindow_c()
......
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