feat(admin): complete integration of auth, delivery, and system infrastructure modules
This commit is contained in:
@@ -8,17 +8,17 @@
|
||||
<view class="config-form">
|
||||
<view class="form-item">
|
||||
<text class="label">APPID:</text>
|
||||
<input class="form-input" value="wx277a269f3d736d67" />
|
||||
<input class="form-input" v-model="formData.appid" placeholder="微信开放平台申请移动应用后给予的APPID" />
|
||||
<text class="tip">微信开放平台申请移动应用后给予的APPID</text>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="label">AppSecret:</text>
|
||||
<input class="form-input" value="bd08741a055c2ecac5826ff1c048464b" />
|
||||
<input class="form-input" v-model="formData.appsecret" placeholder="微信开放平台申请移动应用后给予的AppSecret" />
|
||||
<text class="tip">微信开放平台申请移动应用后给予的AppSecret</text>
|
||||
</view>
|
||||
|
||||
<view class="form-btns">
|
||||
<button class="btn primary">提交</button>
|
||||
<button class="btn primary" @click="handleSubmit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -26,7 +26,40 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
// APP配置逻辑
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { getSystemConfig, saveSystemConfig } from "@/services/admin/systemConfigService.uts"
|
||||
|
||||
const formData = reactive({
|
||||
appid: '',
|
||||
appsecret: ''
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
loadConfig()
|
||||
})
|
||||
|
||||
async function loadConfig() {
|
||||
const res = await getSystemConfig('mobile_app_config')
|
||||
if (res != null) {
|
||||
Object.assign(formData, res as any)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleSubmit() {
|
||||
uni.showLoading({ title: '正在保存...' })
|
||||
try {
|
||||
const ok = await saveSystemConfig('mobile_app_config', formData as UTSJSONObject, '移动应用(APP)配置')
|
||||
if (ok) {
|
||||
uni.showToast({ title: '保存成功', icon: 'success' })
|
||||
} else {
|
||||
uni.showToast({ title: '保存失败', icon: 'none' })
|
||||
}
|
||||
} catch (e) {
|
||||
uni.showToast({ title: '系统错误', icon: 'none' })
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user