feat: 根据应用版本自动重置构建版本
This commit is contained in:
@@ -181,6 +181,6 @@ describe('ConfigView.vue', () => {
|
||||
|
||||
expect(wrapper.text()).toContain('应用版本号')
|
||||
expect(wrapper.text()).not.toContain('打包参数')
|
||||
expect(wrapper.findAll('input').length).toBe(2)
|
||||
expect(wrapper.findAll('input').length).toBe(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -273,11 +273,7 @@
|
||||
<input type="text" v-model="versions.app_ver" placeholder="2.180.0">
|
||||
<div style="font-size: 12px; color: #999; margin-top: 4px;">格式:主版本.次版本.修订号</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Build_Ver(构建版本)</label>
|
||||
<input type="text" v-model="versions.build_ver" placeholder="2.180.0.0">
|
||||
<div style="font-size: 12px; color: #999; margin-top: 4px;">格式:主版本.次版本.修订号.构建号(App_Store 打包时构建号自动 +1)</div>
|
||||
</div>
|
||||
<div style="font-size: 12px; color: #999; margin: -8px 0 16px;">保存后 Build_Ver 将自动重置为 App_Ver.0;App Store 打包时构建号自动 +1。</div>
|
||||
<button class="btn btn-primary" style="width: auto; padding: 10px 32px; margin-bottom: 24px;" @click="saveVersions">保存版本号</button>
|
||||
|
||||
<template v-if="isAdmin">
|
||||
@@ -1037,7 +1033,7 @@ const saveVersions = async () => {
|
||||
const res = await authFetch('/api/config/versions', {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(versions.value),
|
||||
body: JSON.stringify({ app_ver: versions.value.app_ver }),
|
||||
})
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
|
||||
Reference in New Issue
Block a user