From 4f4538356403d620b9bd510fd45729a251291942 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 03 七月 2026 18:27:36 +0800
Subject: [PATCH] 功能开发
---
admin/src/views/business/tiktokConfiguration.vue | 50 +++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 41 insertions(+), 9 deletions(-)
diff --git a/admin/src/views/business/tiktokConfiguration.vue b/admin/src/views/business/tiktokConfiguration.vue
index c0db693..db83ed7 100644
--- a/admin/src/views/business/tiktokConfiguration.vue
+++ b/admin/src/views/business/tiktokConfiguration.vue
@@ -31,7 +31,9 @@
</div>
<el-form ref="storeForm" :model="storeForm" label-width="100px" class="config-form">
<el-form-item label="闂ㄥ簵鍚嶇О">
- <el-input v-model="storeForm.storeName" placeholder="璇风偣鍑诲彸渚ф煡璇㈡寜閽幏鍙栨煡璇㈤棬搴椾俊鎭�" style="width: 400px;" readonly></el-input>
+ <el-select v-model="storeForm.poiId" placeholder="璇风偣鍑诲彸渚ф煡璇㈡寜閽幏鍙栭棬搴椾俊鎭�" style="width: 400px;">
+ <el-option v-for="item in storeList" :key="item" :label="item" :value="item"></el-option>
+ </el-select>
<el-button @click="queryStore" style="margin-left: 10px;">鏌ヨ闂ㄥ簵</el-button>
</el-form-item>
<el-form-item>
@@ -43,6 +45,8 @@
</template>
<script>
+import { getDouyinConfigDTO, updateDouyinAppConfigDTO, updateDouyinPoiIdDTO } from '@/api/business/dictData.js'
+import { poiList } from '@/api/business/douyinVerify.js'
export default {
name: 'TiktokConfiguration',
data () {
@@ -53,31 +57,59 @@
accountId: ''
},
storeForm: {
- storeName: ''
- }
- }
+ poiId: ''
+ },
+ storeList: []
+ }
+ },
+ created () {
+ this.loadConfig()
},
methods: {
+ loadConfig () {
+ getDouyinConfigDTO({}).then(res => {
+ if (res) {
+ this.form.appkey = res.clientKey || ''
+ this.form.secret = res.clientSecret || ''
+ this.form.accountId = res.accountId || ''
+ this.storeForm.poiId = res.poiId || ''
+ }
+ }).catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ },
saveStep1 () {
if (!this.form.appkey || !this.form.secret || !this.form.accountId) {
this.$message.warning('璇峰~鍐欏畬鏁翠俊鎭�')
return
}
- this.$message.success('淇濆瓨鎴愬姛')
+ updateDouyinAppConfigDTO({
+ accountId: this.form.accountId,
+ clientKey: this.form.appkey,
+ clientSecret: this.form.secret
+ }).then(() => {
+ this.$message.success('淇濆瓨鎴愬姛')
+ }).catch(e => {
+ this.$tip.apiFailed(e)
+ })
},
queryStore () {
if (!this.form.appkey || !this.form.secret || !this.form.accountId) {
this.$message.warning('璇峰厛瀹屾垚绗竴姝ュ弬鏁伴厤缃�')
return
}
- this.$message.info('鏌ヨ闂ㄥ簵涓�...')
+ poiList({}).then(res => {
+ this.storeList = res || []
+ })
},
saveStep2 () {
- if (!this.storeForm.storeName) {
- this.$message.warning('璇峰厛鏌ヨ闂ㄥ簵')
+ if (!this.storeForm.poiId) {
+ this.$message.warning('璇峰厛閫夋嫨闂ㄥ簵')
return
}
- this.$message.success('淇濆瓨鎴愬姛')
+ updateDouyinPoiIdDTO(this.storeForm.poiId).then(() => {
+ this.$message.success('淇濆瓨鎴愬姛')
+ })
}
}
}
--
Gitblit v1.9.3