Browse Source

服务添加初始化

pull/105/head
pengda 3 weeks ago
parent
commit
a7d04ea89d
  1. 69
      src/components/site/addSiteStep/step1.vue
  2. 65
      src/components/site/addSiteStep/step2.vue
  3. 22
      src/components/site/addSiteStep/step3.vue
  4. 5
      src/views/agent/home.vue
  5. 11
      src/views/agent/payList.vue
  6. 56
      src/views/agent/siteAdd.vue
  7. 4
      src/views/agent/siteServiceAdd.vue

69
src/components/site/addSiteStep/step1.vue

@ -1,7 +1,7 @@
<template>
<div>
<el-form :model="formData" :rules="formRules" ref="formRef">
<div class="step1-wrap min-flex pb90">
<div class="step1-wrap min-flex">
<div class="flex-common">
<h3>站点信息</h3>
<div class="flex-wrap">
@ -76,8 +76,20 @@
</div>
</div>
<!-- 顶部提示语 -->
<div class="register-top" v-if="showAlert && skip">
<div class="min-flex flex-between">
<div class="register-top-left">
<img src="@/assets/register/register-top-left.svg" alt="">
<span>设置完这些信息就可以正式售卖啦也可以选择跳过先进入后台看看哦 </span>
</div>
<div class="register-top-right">
<img src="@/assets/register/register-top-close.svg" alt="" @click="hideAlert">
</div>
</div>
</div>
<div class="register-btns">
<GuipButton v-if="skip" type="ignore" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">去首页</GuipButton>
<GuipButton v-if="skip" type="ignore" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">跳过</GuipButton>
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="saveConfirm">下一步</GuipButton>
</div>
</el-form>
@ -111,6 +123,7 @@ export default {
},
data(){
return {
showAlert: false,
formData: {
short_name: '',
sale_channel: '',
@ -177,10 +190,14 @@ export default {
return true;
}
console.log(this.siteInfo)
if(this.skip && !localStorage.getItem('showAlert')) this.showAlert = true
this.getAddInfo()
},
methods:{
hideAlert(){
this.showAlert = false
localStorage.setItem('showAlert', false)
},
async getSiteTplSet(){
const siteTplInfo = JSON.parse(localStorage.getItem('site_tpl_info'))
if(siteTplInfo){
@ -325,14 +342,11 @@ export default {
.w540{
width: 540px;
}
.pb90{
padding-bottom: 90px;
}
.mt20{
margin-top: 20px;
}
.step1-wrap{
padding-bottom: 90px;
padding-bottom: 12px;
}
.tem-home {
@ -387,4 +401,45 @@ export default {
line-height: 16px;
}
}
.register-btns {
position: sticky;
left: 0;
bottom: 0;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
z-index: 999;
box-sizing: border-box;
button:nth-child(1) {
margin-right: 56px;
}
}
.register-top {
position: sticky;
left: 0;
bottom: 78px;
width: 100%;
align-items: center;
padding: 20px 0;
background: linear-gradient(270deg, #F6EEF7 3%, #EDE9FB 97%);
color: #23242B;
letter-spacing: 0.08em;
line-height: 32px;
z-index: 999;
box-sizing: border-box;
.register-top-left {
display: flex;
align-items: center;
gap: 10px;
}
}
</style>

65
src/components/site/addSiteStep/step2.vue

@ -275,8 +275,20 @@
</div>
</div>
<!-- 顶部提示语 -->
<div class="register-top" v-if="showAlert && skip">
<div class="min-flex flex-between">
<div class="register-top-left">
<img src="@/assets/register/register-top-left.svg" alt="">
<span>设置完这些信息就可以正式售卖啦也可以选择跳过先进入后台看看哦 </span>
</div>
<div class="register-top-right">
<img src="@/assets/register/register-top-close.svg" alt="" @click="hideAlert">
</div>
</div>
</div>
<div class="register-btns">
<GuipButton type="system" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">去首页</GuipButton>
<GuipButton type="system" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">跳过</GuipButton>
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="nextStep">下一步</GuipButton>
</div>
</div>
@ -306,6 +318,10 @@ export default {
type: Boolean,
default: false
},
skip: {
type: Boolean,
required: false
}
},
components: {
CustomDropdown, GuipFormItem,
@ -315,6 +331,7 @@ export default {
},
data(){
return {
showAlert: false,
//
payTypeTaoBao: PAY_TYPE_TAOBAO,
payTypeWeixin: PAY_TYPE_WEIXIN,
@ -367,11 +384,16 @@ export default {
return false;
}
if(this.skip && !localStorage.getItem('showAlert')) this.showAlert = true
this.getSitePayIndex()
this.getPayList()
this.getAddablePays()
},
methods:{
hideAlert(){
this.showAlert = false
localStorage.setItem('showAlert', false)
},
//
getSitePayIndex() {
this.$http('POST', '/agentnew/ajax_get_site_pay_index', {
@ -627,4 +649,45 @@ export default {
}
}
}
.register-btns {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
z-index: 999;
box-sizing: border-box;
button:nth-child(1) {
margin-right: 56px;
}
}
.register-top {
position: fixed;
left: 0;
bottom: 78px;
width: 100%;
align-items: center;
padding: 20px 0;
background: linear-gradient(270deg, #F6EEF7 3%, #EDE9FB 97%);
color: #23242B;
letter-spacing: 0.08em;
line-height: 32px;
z-index: 999;
box-sizing: border-box;
.register-top-left {
display: flex;
align-items: center;
gap: 10px;
}
}
</style>

22
src/components/site/addSiteStep/step3.vue

@ -135,6 +135,18 @@
</div>
</div>
<!-- 顶部提示语 -->
<div class="register-top" v-if="showAlert && skip">
<div class="min-flex flex-between">
<div class="register-top-left">
<img src="@/assets/register/register-top-left.svg" alt="">
<span>设置完这些信息就可以正式售卖啦也可以选择跳过先进入后台看看哦 </span>
</div>
<div class="register-top-right">
<img src="@/assets/register/register-top-close.svg" alt="" @click="hideAlert">
</div>
</div>
</div>
<div class="register-btns" v-if="!tableLoading">
<GuipButton v-if="serviceList.length===0" type="system" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">跳过</GuipButton>
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="nextStep">完成</GuipButton>
@ -165,6 +177,10 @@ export default {
siteInfo: {
type: Object,
required: true
},
skip: {
type: Boolean,
required: false
}
},
components: {
@ -174,6 +190,7 @@ export default {
},
data(){
return {
showAlert: false,
addProd: {},
serviceList:[],
tableLoading:false,
@ -205,9 +222,14 @@ export default {
return false;
}
if(this.skip && !localStorage.getItem('showAlert')) this.showAlert = true
this.getSiteServiceList()
},
methods:{
hideAlert(){
this.showAlert = false
localStorage.setItem('showAlert', false)
},
random() {
return Math.random();
},

5
src/views/agent/home.vue

@ -295,10 +295,9 @@ export default {
},
lookTaoBaoExpire() {
//
location.href = '/agent/payList'
this.$router.push({ path: '/agent/payList', hash: '#section-taobao' })
},
lookSslExpire() {
//
location.href = '/agent/domainList'
},
lookTaoBaoNum1() {
@ -726,6 +725,7 @@ a {
background: linear-gradient(271deg, #F8DCDC 0%, #FCEEEE 60%);
/* main/main_erro */
border: 1px solid #FF4D4F;
box-shadow: 0px 4px 16px 0px rgba(143, 17, 17, 0.12);
}
div {
@ -750,6 +750,7 @@ a {
background: linear-gradient(256deg, #FBE7D7 1%, #FEF7EC 53%);
/* main/main_erro */
border: 1px solid #FB832D;
box-shadow: 0px 4px 16px 0px rgba(143, 17, 17, 0.12);
}
div {

11
src/views/agent/payList.vue

@ -120,7 +120,7 @@
</div>
</div>
<!-- 淘宝 -->
<div class="register-wrap" v-if="addablePays && addablePays[payTypeTaoBao]">
<div id="section-taobao" class="register-wrap" v-if="addablePays && addablePays[payTypeTaoBao]">
<div class="step3-wrap">
<div class="step3-top flex-common">
<h3 class="flex gap8">
@ -491,6 +491,15 @@ export default {
this.getAddablePays()
this.getPayList()
this.getPayBindSites()
if (this.$route.hash) {
setTimeout(() => {
const el = document.querySelector(this.$route.hash)
if (el) {
el.scrollIntoView({ behavior: 'smooth', block: 'start' })
}
}, 1000)
}
},
methods: {
//

56
src/views/agent/siteAdd.vue

@ -1,15 +1,5 @@
<template>
<div class="register-wrap min-width">
<!-- 顶部提示语 -->
<div class="register-top" v-if="showAlert">
<div class="register-top-left">
<img src="../../assets/register/register-top-left.svg" alt="">
<span>设置完这些信息就可以正式售卖啦也可以选择跳过先进入后台看看哦 </span>
</div>
<div class="register-top-right">
<img src="../../assets/register/register-top-close.svg" alt="" @click="hideAlert">
</div>
</div>
<!-- 步骤条 -->
<div class="sticky">
@ -72,7 +62,6 @@ export default {
data() {
return {
siteInfo:{},
showAlert:false,
canSkip: false,
stepKey: Date.now(),
activeStep: '1',//
@ -101,7 +90,6 @@ export default {
mounted() {
//
if(this.$route.query.isFirst) {
this.showAlert = true
this.canSkip = true
}
this.getNotFinishedSite()
@ -145,9 +133,6 @@ export default {
console.error(error, 'error')
})
},
hideAlert(){
this.showAlert = false
},
goCurActiveStep(step) {
if (step < this.activeStep) {
this.activeStep = step
@ -172,25 +157,7 @@ export default {
}
}
</script>
<style lang="scss">
.register-btns {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
z-index: 999;
button:nth-child(1) {
margin-right: 56px;
}
}
<style scoped lang="scss">
.register-wrap {
display: flex;
flex-direction: column;
@ -201,27 +168,6 @@ export default {
height: 24px;
}
.register-top {
display: flex;
justify-content: space-between;
// height: 72px;
align-items: center;
padding: 20px 40px 20px 110px;
background: linear-gradient(270deg, #F6EEF7 3%, #EDE9FB 97%);
color: #23242B;
letter-spacing: 0.08em;
line-height: 32px;
.register-top-left {
display: flex;
align-items: center;
.register-top-left img {
margin-right: 12px;
}
}
}
.pageDesc {
/* 自动布局 */
display: flex;

4
src/views/agent/siteServiceAdd.vue

@ -457,10 +457,8 @@ export default {
b_unit_price: that.serviceInfo.base_unit_price,
}).then(response => {
if (response.status) {
if (that.service_status === false) {
that.service_status = true
that.setMenuList(that.type, true)
}
that.$message.success('保存成功');
return true;
}
@ -495,10 +493,8 @@ export default {
b_unit_piece: that.serviceInfo.base_unit_piece,
}).then(response => {
if (response.status) {
if (that.service_status === false) {
that.service_status = true
that.setMenuList(that.type, true)
}
that.$message.success('保存成功');
return true;
}

Loading…
Cancel
Save