|
|
@@ -75,6 +75,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="login-follow-mp" @click="onFollowMp">关注服务号,接收审批通知</view>
|
|
|
+
|
|
|
<view class="login-divider">或</view>
|
|
|
|
|
|
<button
|
|
|
@@ -125,6 +127,20 @@
|
|
|
</text>
|
|
|
<text>。是否同意并继续登录?</text>
|
|
|
</ConfirmDialog>
|
|
|
+
|
|
|
+ <view v-if="showMpQrcode" class="login-mp-qrcode">
|
|
|
+ <view class="login-mp-qrcode__mask" @click="showMpQrcode = false" />
|
|
|
+ <view class="login-mp-qrcode__panel">
|
|
|
+ <image
|
|
|
+ class="login-mp-qrcode__img"
|
|
|
+ :src="mpQrcodeUrl"
|
|
|
+ mode="aspectFit"
|
|
|
+ show-menu-by-longpress
|
|
|
+ />
|
|
|
+ <text class="login-mp-qrcode__tip">长按识别关注</text>
|
|
|
+ <view class="login-mp-qrcode__close" @click="showMpQrcode = false">关闭</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -136,6 +152,7 @@
|
|
|
clearLegacyMockSessionIfNeeded
|
|
|
} from '../../utils/auth.js'
|
|
|
import { validateCredentials } from '../../utils/validate-credentials.js'
|
|
|
+ import { MP_GH_USERNAME, MP_QRCODE_URL } from '../../utils/config.js'
|
|
|
import ConfirmDialog from '../../components/ConfirmDialog.vue'
|
|
|
|
|
|
export default {
|
|
|
@@ -154,6 +171,8 @@
|
|
|
loading: false,
|
|
|
focusUser: false,
|
|
|
focusPwd: false,
|
|
|
+ showMpQrcode: false,
|
|
|
+ mpQrcodeUrl: MP_QRCODE_URL,
|
|
|
errors: {
|
|
|
username: '',
|
|
|
password: ''
|
|
|
@@ -212,6 +231,21 @@
|
|
|
openProtocol(type) {
|
|
|
uni.navigateTo({ url: `/pages/protocol/index?type=${type}` })
|
|
|
},
|
|
|
+ onFollowMp() {
|
|
|
+ const username = (MP_GH_USERNAME || '').trim()
|
|
|
+ const openProfile =
|
|
|
+ typeof wx !== 'undefined' && typeof wx.openOfficialAccountProfile === 'function'
|
|
|
+ if (openProfile && username) {
|
|
|
+ wx.openOfficialAccountProfile({
|
|
|
+ username,
|
|
|
+ fail: () => {
|
|
|
+ this.showMpQrcode = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.showMpQrcode = true
|
|
|
+ },
|
|
|
goHome() {
|
|
|
uni.reLaunch({ url: '/pages/index/index' })
|
|
|
},
|