Browse Source

HL-5241在长春和成都的登录页面各放一个PDA端APK程序下载的二维码

hella_online_20240911
yufei_wang 3 months ago
parent
commit
6352401bbf
  1. 4
      .env.prod
  2. 4
      .env.test
  3. 3
      .env.test-scp
  4. 10
      src/utils/systemParam.ts
  5. 6
      src/views/login/components/QRCodePDA.vue

4
.env.prod

@ -48,3 +48,7 @@ VITE_SYSTERM_UPDATE_URL = 'https://scptest.faway-hella.com/'
# 是否需要验证码
VITE_NEED_CODE = true
# 是否需要下载PDA链接
VITE_PDA_URL = false

4
.env.test

@ -44,3 +44,7 @@ VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = true
# 是否需要下载PDA链接
VITE_PDA_URL = true

3
.env.test-scp

@ -45,3 +45,6 @@ VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'
# 是否需要验证码
VITE_NEED_CODE = false
# 是否需要下载PDA链接
VITE_PDA_URL = false

10
src/utils/systemParam.ts

@ -7,6 +7,7 @@ const tenant = ref(import.meta.env.VITE_TENANT)
const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT)
const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL)
const needCode = ref(import.meta.env.VITE_NEED_CODE)
const pdaUrl = ref(import.meta.env.VITE_PDA_URL)
const mode = ref(import.meta.env.MODE)
// 获取baseUrl
@ -85,4 +86,13 @@ export const getNeedCode = () => {
}
}
//是否需要PDA下载链接
export const getPDAUrl = () => {
if(mode.value === 'prod') {
return systemConfig.pdaUrl
} else {
return pdaUrl.value
}
}

6
src/views/login/components/QRCodePDA.vue

@ -5,14 +5,18 @@
<!-- <vue-qr bgSrc='https://img2.baidu.com/it/u=1188690822,3145215011&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1038' logoSrc="https://img1.baidu.com/it/u=605875105,1314303687&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500" text="Hello world!" :size="200"></vue-qr> -->
<vue-qr :text="apkUrl" :size="200" ></vue-qr>
</div>
<el-button type="primary" link @click="handleClose">PDA安装程序下载链接</el-button>
<el-button type="primary" v-if="pdaUrl" link @click="handleClose">PDA安装程序下载链接</el-button>
</div>
</template>
<script setup lang="ts">
import { downloadApk } from "@/api/login";
import { getPDAUrl,getNeedCode } from '@/utils/systemParam'
// import logoImg from '@/assets/imgs/logo_white_blue.png'
import vueQr from 'vue-qr/src/packages/vue-qr.vue'
const pdaUrl = ref(getPDAUrl()==true||getPDAUrl()=='true')
const apkUrl = ref('')
const showCode = ref(false)
const handleClose = async ()=>{

Loading…
Cancel
Save