|
@@ -5,11 +5,11 @@
|
|
|
<image src="/static/login/logo.png" mode="" class="logo"></image>
|
|
|
</view>
|
|
|
<view class="btn-row">
|
|
|
- <button class="btn" @click="downLoad(1)">
|
|
|
+ <button class="btn" @click="downLoad(0)">
|
|
|
<image src="/static/login/android.png" mode="" class="logo"></image>
|
|
|
安卓下载
|
|
|
</button>
|
|
|
- <button class="btn" @click="downLoad(2)">
|
|
|
+ <button class="btn" @click="downLoad(1)">
|
|
|
<image src="/static/login/ios.png" mode="" class="logo"></image>
|
|
|
IOS下载
|
|
|
</button>
|
|
@@ -35,18 +35,23 @@
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- this.getData();
|
|
|
+ // this.getData();
|
|
|
},
|
|
|
methods: {
|
|
|
- getData() {
|
|
|
- this.$http.get("/app/config/info").then((res) => {
|
|
|
- if (res && res.code == 200) {
|
|
|
- this.appInfo = res.data;
|
|
|
+ getData(type) {
|
|
|
+ this.$http.get("/app/version/newest", {
|
|
|
+ type: type
|
|
|
+ }).then((res) => {
|
|
|
+ if (res && res.data && res.code == 200) {
|
|
|
+ window.location.href = res.data.downloadLink
|
|
|
+ } else {
|
|
|
+ this.$mUtil.toast("暂无下载地址")
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
downLoad(type) {
|
|
|
- window.location.href = type == 1 ? this.appInfo.android_link : this.appInfo.ios_link;
|
|
|
+ this.getData(type)
|
|
|
+ // window.location.href = type == 1 ? this.appInfo.android_link : this.appInfo.ios_link;
|
|
|
},
|
|
|
},
|
|
|
};
|