Browse Source

1.商家列表添加域名设置业务 2.新增域名设置编辑弹框

master
dy-hu 6 months ago
parent
commit
8be0521dda
  1. 2
      package.json
  2. 9
      src/api/business.js
  3. 150
      src/components/DomainSetting/index.vue
  4. 55
      src/views/business/businessList/index.vue

2
package.json

@ -4,7 +4,7 @@
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"scripts": {
"dev": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
"dev": "vue-cli-service serve",
"build:prod": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build",
"build:stage": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",

9
src/api/business.js

@ -145,3 +145,12 @@ export function wordDelete(data) {
data
})
}
// 商家域名修改
export function businessDomainUpdate(data) {
return request({
url: '/business/updateDomain',
method: 'post',
data
})
}

150
src/components/DomainSetting/index.vue

@ -0,0 +1,150 @@
<template>
<div class="comment_manage_page">
<!-- ******************************************************弹框开始***************************************************************** -->
<!-- 新增或者编辑评论弹框 -->
<el-dialog
title="商家域名设置"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
:before-close="handleClose"
width="500px"
center
>
<div>
<el-form :model="addForm" label-width="120px">
<el-form-item label="PC端商城域名">
<template slot-scope="scope">
<el-input v-model="addForm.pcDomain" />
</template>
</el-form-item>
<el-form-item label="移动端商城域名">
<template slot-scope="scope">
<el-input v-model="addForm.mobileDomain" />
</template>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="addForm_enter('ruleForm')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
businessDomainUpdate
} from '@/api/business'
export default {
name: 'DomainSettingDialog',
data() {
return {
dialogVisible: false,
addForm:{
businessId:0,
pcDomain:"",
mobileDomain:"",
}
}
},
computed : {
},
created() {
},
mounted() {
},
methods: {
showSetting(businessId, pcDomain, mobileDomain){
this.addForm.businessId = businessId
this.addForm.pcDomain = pcDomain
this.addForm.mobileDomain = mobileDomain
this.dialogVisible = true
},
addForm_enter() {
businessDomainUpdate({
businessId: this.addForm.businessId,
pcDomain: this.addForm.pcDomain,
mobileDomain: this.addForm.mobileDomain
}).then(res => {
if (res.code === '') {
this.$message.success('设置成功')
this.$emit('onFinishSetDomain')
this.dialogVisible = false
}
})
},
handleClose() {
this.dialogVisible = false
}
}
}
</script>
<style lang='scss' scoped>
@import url("../../styles/elDialog.scss");
.comment_manage_page {
padding: 20px;
background: #FFFFFF;
border-radius: 10px;
text-align:center;
}
.pinStyle {
.comment {
margin-bottom: 20px;
display: flex;
align-items: center;
.com_left {
font-size: 20px;
color: #333333;
margin-right: 20px;
}
.com_right {
font-size: 18px;
color: #333333;
}
}
.comment_imgList {
display: flex;
margin-bottom: 20px;
align-items: center;
.img_left {
font-size: 20px;
color: #333333;
margin-right: 20px;
width: 60px;
}
.imgList {
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
.el-image {
width: 200px;
height: 134px;
border-radius: 4px;
margin-right: 20px;
margin-bottom: 20px;
}
}
}
.line {
width: 890px;
height: 1px;
background: #e0e5eb;
margin: 0 auto;
margin-bottom: 33px;
}
.addComment {
font-size: 20px;
color: #ff7911;
margin-bottom: 20px;
}
}
</style>

55
src/views/business/businessList/index.vue

@ -130,7 +130,11 @@
<el-button
type="text"
@click="setShareSetting(scope.row)"
>设置分配比例</el-button>
>设置分账</el-button>
<el-button
type="text"
@click="setDomainSetting(scope.row)"
>设置域名</el-button>
</div>
</template>
</el-table-column>
@ -158,7 +162,7 @@
: '查看商家'
"
:visible.sync="dialogVisible"
width="30%"
width="40%"
center
:close-on-click-modal="false"
>
@ -299,6 +303,28 @@
</el-radio-group>
</el-form-item>
<el-form-item
label="PC端商城域名"
prop="pcDomain"
>
<el-input
ref="addressCls"
v-model="ruleForm.pcDomain"
maxlength="60"
:disabled="disabled"
/>
</el-form-item>
<el-form-item
label="移动端商城域名"
prop="mobileDomain"
>
<el-input
ref="addressCls"
v-model="ruleForm.mobileDomain"
maxlength="60"
:disabled="disabled"
/>
</el-form-item>
<!-- <el-form-item
label="直播间审核"
prop="auditLive"
>
@ -331,7 +357,7 @@
>关闭
</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item>-->
</el-form>
</el-tab-pane>
<el-tab-pane
@ -395,8 +421,11 @@
> </el-button>
</span>
</el-dialog>
<SharesettingDialog
<SharesettingDialog
ref="shareSettingDialog"/>
<DomainSettingDialog
ref="domainSettingDialog"
@onFinishSetDomain="onFinishSetDomain"/>
</div>
</div>
</template>
@ -413,8 +442,9 @@ import {
delBusinessById
} from '@/api/business'
import SharesettingDialog from '../../../components/Sharesetting';
import DomainSettingDialog from '../../../components/DomainSetting';
export default {
components: {SharesettingDialog},
components: {SharesettingDialog, DomainSettingDialog},
data () {
//
return {
@ -441,7 +471,9 @@ export default {
auditLive: 1,
auditLiveProduct: 1,
businessPhone: '', //
businessPassword: '' //
businessPassword: '', //
pcDomain: '', //PC
mobileDomain: '' //
},
showPhone: false,
showAddress: false,
@ -543,6 +575,11 @@ export default {
setShareSetting(row) {
this.$refs.shareSettingDialog.showSetting(2, row.businessId)
},
setDomainSetting(row) {
this.$refs.domainSettingDialog.showSetting(row.businessId, row.pcDomain, row.mobileDomain)
},
focusbusinessPhoneInput () {
this.businessPhoneShow = false
this.ruleForm.businessPhone = ''
@ -686,7 +723,7 @@ export default {
const res = await businessListGetById({ businessId: row.businessId })
console.log(res)
if (res.code === '') {
this.userState = 3
this.disabled = true
this.ruleForm = res.data
@ -788,6 +825,10 @@ export default {
this.$refs.userPhoneCls.focus()
})
},
onFinishSetDomain() {
this.onSubmit()
},
//
hidden (str, frontLen, endLen) {
let endLenData = 0

Loading…
Cancel
Save