This commit is contained in:
parent
ea0e33ee5e
commit
3c81e81738
|
|
@ -15,6 +15,22 @@
|
|||
"autoApprove": [
|
||||
"execute_sql"
|
||||
]
|
||||
},
|
||||
"prod-api-sqlserver": {
|
||||
"command": "node",
|
||||
"args": [
|
||||
"C:/mcp/mssql-mcp-server/index.js"
|
||||
],
|
||||
"env": {
|
||||
"MSSQL_SERVER": "49.233.115.141",
|
||||
"MSSQL_PORT": "1433",
|
||||
"MSSQL_USER": "sa",
|
||||
"MSSQL_PASSWORD": "Dbt@com@123",
|
||||
"MSSQL_DATABASE": "OdtAdmin"
|
||||
},
|
||||
"autoApprove": [
|
||||
"execute_sql"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<view class="update-mask" v-if="visible" @click.stop>
|
||||
<view class="update-dialog" @click.stop>
|
||||
<!-- 非强更时显示关闭按钮 -->
|
||||
<text v-if="!forceUpdate" class="close-btn" @click="handleClose">✕</text>
|
||||
<image class="update-icon" src="/static/images/ic_update.png" mode="aspectFit" />
|
||||
<text class="update-title">有新版本请更新</text>
|
||||
<view class="update-btn" @click="handleUpdate">
|
||||
|
|
@ -13,9 +15,18 @@
|
|||
<script setup>
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
downloadUrl: { type: String, default: '' }
|
||||
downloadUrl: { type: String, default: '' },
|
||||
forceUpdate: { type: Boolean, default: false }
|
||||
})
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
|
||||
function handleClose() {
|
||||
if (!props.forceUpdate) {
|
||||
emit('close')
|
||||
}
|
||||
}
|
||||
|
||||
function handleUpdate() {
|
||||
if (!props.downloadUrl) return
|
||||
// #ifdef APP-PLUS
|
||||
|
|
@ -42,6 +53,7 @@ function handleUpdate() {
|
|||
}
|
||||
|
||||
.update-dialog {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
|
@ -51,6 +63,15 @@ function handleUpdate() {
|
|||
border-radius: 24rpx;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 28rpx;
|
||||
font-size: 36rpx;
|
||||
color: #999;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.update-icon {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "绥时录",
|
||||
"appid" : "__UNI__45FFD83",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"versionName" : "1.0.3",
|
||||
"versionCode" : "103",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 版本更新弹窗 -->
|
||||
<update-dialog :visible="showUpdate" :downloadUrl="updateUrl" />
|
||||
<update-dialog :visible="showUpdate" :downloadUrl="updateUrl" :forceUpdate="forceUpdate" @close="showUpdate = false" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -57,12 +57,14 @@ import { ref } from 'vue'
|
|||
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app'
|
||||
import store from '@/store'
|
||||
import { getCompanyList, getDictUnitType, getDictBusinessType, checkAppVersion } from '@/services/home'
|
||||
import { APP_VERSION } from '@/services/api'
|
||||
import updateDialog from '@/components/update-dialog.vue'
|
||||
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 0
|
||||
const companyList = ref([])
|
||||
const showUpdate = ref(false)
|
||||
const updateUrl = ref('')
|
||||
const forceUpdate = ref(false)
|
||||
|
||||
async function loadCompanyList() {
|
||||
const res = await getCompanyList()
|
||||
|
|
@ -85,9 +87,10 @@ async function loadDictData() {
|
|||
}
|
||||
|
||||
async function loadVersionCheck() {
|
||||
const res = await checkAppVersion()
|
||||
const res = await checkAppVersion(APP_VERSION)
|
||||
if (res.code === 200 && res.data && res.data.needUpdate) {
|
||||
updateUrl.value = res.data.downloadUrl || ''
|
||||
forceUpdate.value = !!res.data.forceUpdate
|
||||
showUpdate.value = true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import store from '@/store'
|
|||
// const BASE_URL = 'http://49.233.115.141:11082'
|
||||
// const BASE_URL = 'http://115.190.188.216:2861'
|
||||
export const BASE_URL = 'https://api.wux.shhmkjgs.cn'
|
||||
export const APP_VERSION = '1.0.3'
|
||||
// export const BASE_URL = 'http://127.0.0.1:8888'
|
||||
const TIMEOUT = 20000
|
||||
|
||||
|
|
|
|||
BIN
odf-uniapp/unpackage/release/apk/绥时录_1.0.3_test.apk
Normal file
BIN
odf-uniapp/unpackage/release/apk/绥时录_1.0.3_test.apk
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user