From 32c141b7f81c46a61be9bc2bd78067726316364b Mon Sep 17 00:00:00 2001 From: rainbro <33367671@qq.com> Date: Thu, 10 Jul 2025 13:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=9F=9F=E5=90=8D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/tip_blue.svg | 1 + src/views/agent/siteBaseSetting.vue | 171 ++++++++++++++++++++---------------- 2 files changed, 94 insertions(+), 78 deletions(-) create mode 100644 src/assets/tip_blue.svg diff --git a/src/assets/tip_blue.svg b/src/assets/tip_blue.svg new file mode 100644 index 0000000..8ad1cd9 --- /dev/null +++ b/src/assets/tip_blue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/agent/siteBaseSetting.vue b/src/views/agent/siteBaseSetting.vue index 24200c0..7daaff9 100644 --- a/src/views/agent/siteBaseSetting.vue +++ b/src/views/agent/siteBaseSetting.vue @@ -31,63 +31,41 @@
-

站点信息

- +

域名设置

+

当前站点域名:{{ siteInfo.domain }}

+
- - - +

域名来源

+
+ +
- + + + + + + + + + + .{{ siteInfo.plat_domain }} - --> - -
- - -
{{ - siteForm1.domainSuffix }}
-
- - - - - -
+ +
- +
@@ -418,6 +396,7 @@ import CustomDropdown from '@/components/CustomDropdown.vue'; import GuipButton from '@/components/GuipButton.vue'; import GroupFormBtns from '@/components/GroupFormBtns.vue'; import addPay from '@/components/pay/addPay.vue'; +import domainBind from '@/components/domainBind.vue'; // import {setHighActive} from '@/utils/common'; // 收款方式 @@ -440,6 +419,7 @@ export default { GuipButton, GroupFormBtns, addPay, + domainBind, }, data() { return { @@ -493,34 +473,12 @@ export default { // 京东授权url jdAuthUrl: '', - domainOptions: [ - { - value: '.chachongz.com', - label: '.chachongz.com' - }, - { - value: '.turnitin.org.cn', - label: '.turnitin.org.cn' - }, - { - value: '.jishu.chachongz.com', - label: '.jishu.chachongz.com' - }, - ], - siteForm1: { - domain_set: '', - domainSuffix:'.chachongz.com', - domain_source: '平台免费域名', - }, - siteFormrules1: { - domain_source: [ - { required: true, message: '请输入站点简称', trigger: 'blur' } - ] - }, - domain_source: [ - { label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" }, - { label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" }, - ], + // 是否使用私有域名 + domainType: 0, + domainTypes: [], + domainPrefix: '', + siteDomain: '', + options_weixin_null: {}, select_placeholder_weixin: '暂无收款账号,稍后配置', } @@ -653,6 +611,10 @@ export default { }).then(response => { this.$nextTick(() => { that.siteInfo = response.data + this.domainType = String(that.siteInfo.domain_type); + this.domainTypes = that.siteInfo.domain_types; + this.siteDomain = response.data.domain; + if ( response.data && response.data.site_pays && @@ -785,8 +747,10 @@ export default { this.selectedItem = { ...item }; }, // 销售渠道 - domain_radioChange(type) { - console.log(type, '--'); + domainTypeChange(type) { + this.domainType = String(type); + console.log(this.domainType, 'this.domainType'); + console.log(typeof this.domainType, 'domainTypeChange'); }, onSwitchChange(data) { console.log(data, '---'); @@ -839,6 +803,42 @@ export default { handleEvent(data) { console.log(data, 'handleEvent'); this.isShowAddPay = data + }, + handleEvent2(data) { + console.log(data, 'handleEvent2'); + this.siteDomain = data.prefix + data.domain; + }, + handleClear(value) { + console.log(value, 'value===qinghcu'); + this.domainPrefix = ''; + }, + updateSiteDomain() { + var domain = this.siteInfo.domain; + if (this.domainType == '1') { + domain = this.domainPrefix + '.' + this.siteInfo.plat_domain; + } else if (this.domainType == '2') { + domain = this.siteDomain; + } + + this.$http('POST', '/agentnew/ajax_update_site_domain', { + uid: this.$route.query.uid, + domain: domain, + }, { + headers: { + 'Auth': this.token + } + }).then(response => { + this.$nextTick(() => { + if (response.status) { + this.$Message.success(response.info); + this.getSiteInfo(); + } else { + this.$Message.error(response.info); + } + }) + }).catch(error => { + console.error(error, 'error') + }) } } @@ -926,6 +926,21 @@ export default { .site-setting-wrap { width: 100%; + + .siteMessage5_desc { + border-radius: 4px; + /* middle/middle_blue_1 */ + background: #F2F7FF; + /* middle/middle_blue_3 */ + border: 1px solid #BFDAFF; + padding: 8px 13px; + margin-bottom: 32px; + + img { + margin-right: 8px; + } + + } } #siteMessage2 {