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 }}
-
-
-
-
-
-
添加新域名
-
域名需要在阿里云完成ICP备案并解析到平台服务器
-
如果暂时未准备好,可先选用平台免费域名,随时支持域名修改。
-
-
- 前往绑定
-
-
-
-
-
-
-
+
+
-
+
@@ -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 {