|
@@ -25,7 +25,12 @@
|
|
|
<navigator url="./forget">
|
|
|
<view class="forget">{{$t('login.b2')}}</view>
|
|
|
</navigator>
|
|
|
-
|
|
|
+ <!-- #ifdef H5 -->
|
|
|
+ <view class="flex">
|
|
|
+ <button class="uni-button loadapp" @click="domApp('apk')">APK下载</button>
|
|
|
+ <button class="uni-button loadapp" @click="domApp('ios')">IOS下载</button>
|
|
|
+ </view>
|
|
|
+ <!-- #endif -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -54,7 +59,11 @@
|
|
|
import {
|
|
|
loginWinxin
|
|
|
} from '@/utils/wxAuthorized';
|
|
|
+ import {
|
|
|
+ getAppVersion
|
|
|
+ } from '@/api/index.js'
|
|
|
// #endif
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -87,6 +96,34 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo', 'login']),
|
|
|
+ // #ifdef H5
|
|
|
+ domApp(type) {
|
|
|
+ console.log('111');
|
|
|
+ const bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
|
|
|
+ if (bool) {
|
|
|
+ uni.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ title: this.$t("enter.a7"),
|
|
|
+ // content: '无法在微信中下载,请用浏览器打开下载',
|
|
|
+ content: this.$t("login.c2"),
|
|
|
+ showCancel: false,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (type == 'apk') {
|
|
|
+ getAppVersion().then((res) => {
|
|
|
+ console.log(res, 'res');
|
|
|
+ window.open(res.data.apk);
|
|
|
+ }).catch((err) => {
|
|
|
+ console.log(err, 'err');
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(type=="ios"){
|
|
|
+ window.open("/index/dom/iosdom.mobileconfig");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // #endif
|
|
|
// 微信登录
|
|
|
wecahtLogin(type) {
|
|
|
let obj = this;
|