Browse Source

YT-2291pc端增加版本号

intex_zhaoxuebing^2
王宇飞 5 days ago
parent
commit
d14649c862
  1. 6
      .env
  2. 11
      src/utils/systemParam.ts
  3. 8
      src/views/login/components/QRCodePDA.vue
  4. 6
      src/views/profile/index.vue

6
.env

@ -15,3 +15,9 @@ VITE_APP_CAPTCHA_ENABLE=true
# 百度统计 # 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
# 应用版本号
VITE_VERSION = V1.0
# 更新版本号时间
VITE_VERSION_TIME = 2025-03-31 09:00:00

11
src/utils/systemParam.ts

@ -8,7 +8,8 @@ const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT)
const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL) const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL)
const needCode = ref(import.meta.env.VITE_NEED_CODE) const needCode = ref(import.meta.env.VITE_NEED_CODE)
const pdaUrl = ref(import.meta.env.VITE_PDA_URL) const pdaUrl = ref(import.meta.env.VITE_PDA_URL)
const version = ref(import.meta.env.VITE_VERSION)
const versionTime = ref(import.meta.env.VITE_VERSION_TIME)
const mode = ref(import.meta.env.MODE) const mode = ref(import.meta.env.MODE)
// 获取baseUrl // 获取baseUrl
export const getBaseUrl = () => { export const getBaseUrl = () => {
@ -95,4 +96,12 @@ export const getPDAUrl = () => {
} }
} }
//获取版本号
export const getVersion = () => {
return version.value
}
//获取版本号更新时间
export const getVersionTime = () => {
return versionTime.value
}

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

@ -5,12 +5,16 @@
<!-- <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 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> <vue-qr :text="apkUrl" :size="200" ></vue-qr>
</div> </div>
<el-button type="primary" v-if="pdaUrl" link @click="handleClose">PDA安装程序下载链接</el-button> <div style="display: flex; flex-direction: row; justify-content: space-between;width: 100%;">
<span style="margin-left:50px;color:#909399;font-size: 14px;" v-if="version">版本号 {{version}}</span>
<el-button type="primary" v-if="pdaUrl" link @click="handleClose">PDA安装程序下载链接</el-button>
</div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { downloadApk } from "@/api/login"; import { downloadApk } from "@/api/login";
import { getPDAUrl,getNeedCode } from '@/utils/systemParam' import { getPDAUrl,getNeedCode,getVersion } from '@/utils/systemParam'
const version = ref(getVersion())
// import logoImg from '@/assets/imgs/logo_white_blue.png' // import logoImg from '@/assets/imgs/logo_white_blue.png'

6
src/views/profile/index.vue

@ -29,12 +29,18 @@
</div> </div>
</el-card> </el-card>
</div> </div>
<span style="position:absolute;bottom:20px;right:20px;color:#909399;font-size: 14px;" v-if="version">版本号 {{ version }}&nbsp;&nbsp;&nbsp;更新时间{{versionTime}}</span>
</template> </template>
<script setup lang="ts" name="Profile"> <script setup lang="ts" name="Profile">
import { BasicInfo, ProfileUser, ResetPwd, UserSocial } from './components/' import { BasicInfo, ProfileUser, ResetPwd, UserSocial } from './components/'
import { getPDAUrl,getNeedCode,getVersion,getVersionTime } from '@/utils/systemParam'
const { t } = useI18n() const { t } = useI18n()
const activeName = ref('basicInfo') const activeName = ref('basicInfo')
const version = ref(getVersion())
const versionTime = ref(getVersionTime())
</script> </script>
<style scoped> <style scoped>
.user { .user {

Loading…
Cancel
Save