Przeglądaj źródła

1. 添加保存作品成功跳转;2. 技能培训、咨询服务支付后跳回提示;3. 技能培训详情页样式优化;4. 新建技能培训页面样式优化;5. 咨询服务详情页预览,默认展开页面;6. seo 文案优化;

huan-jie 4 lat temu
rodzic
commit
af7c5ea3d7

+ 13 - 1
assets/css/skill/create.scss

@@ -29,6 +29,9 @@
             font-family: PingFangSC, PingFangSC-Medium;
             font-weight: 500;
             color: #19222e;
+            .required {
+                color: #ff0000;
+            }
         }
         .skill-field {
             position: relative;
@@ -53,7 +56,7 @@
                     // height: 44px;
                     margin-top: 5px;
                 }
-                span {
+                .yuan {
                     position: absolute;
                     right: 18px;
                     bottom: 14px;
@@ -99,6 +102,15 @@
                 white-space: pre-line;
             }
         }
+        .is-error {
+            input {
+                border-color: #f56c6c;
+            }
+            .quill-editor {
+                border-top: 1px solid #f56c6c!important;
+                border-color: #f56c6c !important;
+            }
+        }
     }
     .progress-wrapper {
         position: relative;

BIN
assets/img/skill/example-img1@2x.png


assets/img/skill/example-img@2x.png → assets/img/skill/example-img2@2x.png


BIN
assets/img/skill/example-img3@2x.png


+ 14 - 6
components/consult/dealSeoDetail.js

@@ -18,6 +18,7 @@ export default class DealSeoData {
         } = this.app.context.route
         const uid = params.id || ''
         const saleId = query.saleId || ''
+        const act = query.act || ''
 
         // 重定向
         if (path.indexOf('/frontend/consult/user') > -1) {
@@ -31,7 +32,8 @@ export default class DealSeoData {
             uid,
             consultDetail,
             mobile: this.app.$deviceType.isMobile(),
-            head: this.dealThisMeta()
+            head: this.dealThisMeta(),
+            act
         }
     }
 
@@ -56,6 +58,11 @@ export default class DealSeoData {
                 }
                 // 可预约的时间数组
                 item.orderTime = []
+                if (sale_id) {
+                    // 预览某一条咨询服务时,不显示展开,默认展开状态
+                    item.expand = true
+                    item.showExpand = false
+                }
             })
             let zxRating = consultDetail.user.zx_rating || ''
             let zxRatingText = ''
@@ -84,12 +91,13 @@ export default class DealSeoData {
         this.consultDetail.sale_list.forEach((item, index) => {
             if (index === 0) {
                 title = item.title
+                description = item.content
             }
-            if (index !== this.consultDetail.sale_list.length - 1) {
-                description += `${item.title}、`
-            } else {
-                description += item.title
-            }
+            // if (index !== this.consultDetail.sale_list.length - 1) {
+            //     description += `${item.title}、`
+            // } else {
+            //     description += item.title
+            // }
         })
 
         if (description.length > 60) {

+ 3 - 1
components/skill/dealSeoDetail.js

@@ -11,6 +11,7 @@ export default class DealSeoData {
     async dealData() {
         let {
             name,
+            query: { act },
             path,
             params,
             fullPath
@@ -34,7 +35,8 @@ export default class DealSeoData {
             sale_id,
             skillDetail,
             mobile: this.app.$deviceType.isMobile(),
-            head: this.dealThisMeta()
+            head: this.dealThisMeta(),
+            act
         }
     }
 

+ 6 - 12
components/works/editor.vue

@@ -278,12 +278,9 @@
             }
             if (res.status === 1) {
               this.$message.success("编辑作品成功!");
-              // setTimeout(() => {
-              //   self.$router.push({
-              //     path: '/sign/new',
-              //     query: { from: 'works' }
-              //   })
-              // }, 1200);
+              setTimeout(() => {
+                window.location.href = `/wo/${self.$store.state.userinfo.uid}/works`;
+              }, 800);
               // window.location.href = res.data.work_url;
             } else {
               this.$message.error("编辑作品失败,请重试");
@@ -299,12 +296,9 @@
             if (res.status === 1) {
               this.$message.success("添加作品成功!");
               this.wid = res.data.wid || ''
-              // setTimeout(() => {
-              //   self.$router.push({
-              //     path: '/sign/new',
-              //     query: { from: 'works' }
-              //   })
-              // }, 1200);
+              setTimeout(() => {
+                window.location.href = `/wo/${self.$store.state.userinfo.uid}/works`;
+              }, 800);
             } else {
               this.$message.error("添加作品失败,请重试");
             }

+ 8 - 1
pages/frontend/consult/user/_id.vue

@@ -199,8 +199,15 @@ export default {
         }
     },
     mounted () {
+        const self = this
         this.baseUrl = this.$store.state.domainConfig.siteUrl
         this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1
+
+        if (this.act === 'pay') {
+            setTimeout(() => {
+                self.$message.success('购买成功,请等待对方接单')
+            }, 800)
+        }
     },
     methods: {
         /**
@@ -303,7 +310,7 @@ export default {
                 product_type: 503,
                 product_id: this.actionSaleId,
                 obj: this.selectedOrderTime,
-                next: location.href
+                next: location.href + '?act=pay'
             }
             if (!this.userinfo || !this.userinfo.nickname) {
                 location.href = this.baseUrl + "/?loginbox=show&next=" + encodeURIComponent(location.href)

+ 67 - 13
pages/frontend/skill/create.vue

@@ -13,9 +13,10 @@
             <!-- 第一步 -->
             <div v-show="currentStep === 1">
                 <div class="skill-field">
-                    <div class="field-name">技能标题</div>
+                    <div class="field-name"><span class="required">*</span> 技能标题</div>
                     <el-input
                         class="skill-title-input"
+                        :class="{ 'is-error': titleError }"
                         v-model="title"
                         placeholder="请输入"></el-input>
                 </div>
@@ -24,18 +25,20 @@
             <div v-show="currentStep === 2">
                 <div class="price-field">
                     <div class="price-wrapper">
-                        <div class="field-name">技能价格</div>
+                        <div class="field-name"><span class="required">*</span> 技能价格</div>
                         <el-input
                             class="price-input"
+                            :class="{ 'is-error': priceError }"
                             type="number"
                             placeholder="请输入价格"
                             v-model="price"></el-input>
-                        <span>元</span>
+                        <span class="yuan">元</span>
                     </div>
                     <div class="cate-wrapper">
-                        <div class="field-name">技能类别</div>
+                        <div class="field-name"><span class="required">*</span> 技能类别</div>
                         <el-cascader
                             class="cate-cascader"
+                            :class="{ 'is-error': cateError }"
                             v-model="selectedSkillCate"
                             :options="skillCate"
                             :props="{ expandTrigger: 'hover' }"
@@ -43,9 +46,10 @@
                     </div>
                 </div>
                 <div class="content-field">
-                    <div class="field-name">技能描述</div>
+                    <div class="field-name"><span class="required">*</span> 技能描述</div>
                     <div class="content-editor">
                         <editor
+                            :class="{ 'is-error': contentError }"
                             :hideImage="false"
                             :content="content"
                             @change="handleChange"
@@ -56,7 +60,7 @@
             <!-- 第三步 -->
             <div v-show="currentStep === 3">
                 <div class="image-field">
-                    <div class="field-name">技能介绍图</div>
+                    <div class="field-name"><span class="required">*</span> 技能介绍图</div>
                     <multi-uploader
                         class="skill-image-uploader"
                         :showTips="false"
@@ -76,7 +80,7 @@
                 </div>
                 <div class="example-text">{{ exampleText }}</div>
             </div>
-            <img class="example-img" src="@/assets/img/skill/example-img@2x.png" alt="example-img">
+            <img class="example-img" :src="exampleImage" alt="example-img">
         </div>
         <div class="actions-wrapper">
             <div class="actions-left">
@@ -107,6 +111,9 @@
 import { mapState } from "vuex";
 import editor from "@/components/editor";
 import multiUploader from '@/components/multi-uploader';
+import ExampleImage1 from '@/assets/img/skill/example-img1@2x.png'
+import ExampleImage2 from '@/assets/img/skill/example-img2@2x.png'
+import ExampleImage3 from '@/assets/img/skill/example-img3@2x.png'
 
 export default {
   // async asyncData({ $axios, params }) {
@@ -122,6 +129,9 @@ export default {
     },
     data() {
         return {
+            ExampleImage1,
+            ExampleImage2,
+            ExampleImage3,
             currentStep: 1, // 当前的步骤:1、2、3
             sale_id: '', // 编辑时的 id
             title: '', // 技能标题
@@ -132,7 +142,11 @@ export default {
             defaultContent: '<p>技能服务包括的内容</p><ol><li><br></li><li><br></li></ol><p>优势</p><ol><li><br></li><li><br></li></ol><p>其他</p><p>支持免费修改3次......</p>', // 默认的技能描述
             imageList: [], // 图片列表
             publishIsLoading: false, // 是否在提交审核
-            pcreateIsLoading: false // 是否在存草稿中
+            pcreateIsLoading: false, // 是否在存草稿中
+            priceError: false,
+            titleError: false,
+            cateError: false,
+            contentError: false,
         }
     },
     computed: {
@@ -140,15 +154,44 @@ export default {
         exampleText () {
             let text = ''
             if (this.currentStep === 1) {
-                text = `合作伙伴必须为企业法人单位,并且已通过程序客栈企业认证,同时企业还需满足以下条件:
-                1、企业规模:注册资金不低于20万,年营业额不低于50万,团队规模不低于10人;
-                2、业务范围:主营业务涉及人力外包业务,包括网站建设、移动开发、软件开发、产品/UI、测试/运维、数据服务、域名/云服务、物联网、应用集成、智能制造、计算机视觉、咨询服务等领域;
-                3、技术服务能力:招聘团队规模2人以上,驻场管理人员1人以上,主要从事人力外包业务;
-                4、诚信要求:无不良从业记录,具有良好的行业口碑;`
+                text = `最好是一个细分类目下具体有场景的服务内容!
+                如:
+                1、我可以2小时内完成一个VUE公共组件编写
+                2、我可以完成小程序、公众号页面(100%)还原
+                3、我可以完成网站https证书安装部署,提高网站安全性和用户信任`
+            } else if (this.currentStep === 2) {
+                text = `服务内容需要把边界和风险描述清楚!
+                如:
+                服务包含的内容:
+                1、介绍你的服务包含哪些内容
+                2、明确好服务边界,需要由具体的量词描述
+                服务优势:
+                1、你有过哪些相关经验
+                2、你比其他人在哪些方面有优势
+                需客户提供的信息:
+                1、你的工作开展前需要客户提供哪些资料
+                其他:
+                1、将服务风险前置,如修改次数以及超出服务部分如何收费的规则等`
+            } else if (this.currentStep === 3) {
+                text = `您可以上传工作的最终交付物截图,增加技能的吸引力,让您的技能区别于其他人才,提高曝光率和成单率`
             }
 
             return text
         },
+        // 在示例中展示的图片
+        exampleImage () {
+            let image = null
+
+            if (this.currentStep === 1) {
+                image = this.ExampleImage1
+            } else if (this.currentStep === 2) {
+                image = this.ExampleImage2
+            } else if (this.currentStep === 3) {
+                image = this.ExampleImage3
+            }
+
+            return image
+        },
         // 新建/编辑技能的进度:0-100
         percent () {
             let val = 0
@@ -289,18 +332,25 @@ export default {
         },
         /** 点击下一步 */
         handleNext () {
+            this.titleError = false
+            this.priceError = false
+            this.cateError = false
+            this.contentError = false
             // 在每一步做数据校验
             if (this.currentStep === 1) {
                 if (this.title === '') {
                     this.$message.error('请输入技能培训名称')
+                    this.titleError = true
                     return
                 }
                 if (this.title.length < 5) {
                     this.$message.error('技能培训名称不可少于5字符')
+                    this.titleError = true
                     return
                 }
                 if (this.title.length > 50) {
                     this.$message.error('技能培训名称不可超过50字符,请删减')
+                    this.titleError = true
                     return
                 }
                 this.currentStep++
@@ -308,19 +358,23 @@ export default {
             } else if (this.currentStep === 2) {
                 if (this.price <= 0) {
                     this.$message.error('请输入大于0的技能价格')
+                    this.priceError = true
                     return
                 }
                 if (String(this.price).indexOf('.') > -1 &&
                     String(this.price).length - String(this.price).indexOf('.') - 1 > 2) {
+                    this.priceError = true
                     this.$message.error('技能价格最多保留两位小数')
                     return
                 }
                 if (this.selectedSkillCate.length !== 2 ||
                     (!this.selectedSkillCate[0] || !this.selectedSkillCate[1])) {
+                    this.cateError = true
                     this.$message.error('请选择技能类别')
                     return
                 }
                 if (!this.content) {
+                    this.contentError = true
                     this.$message.error('请输入技能描述')
                     return
                 }

+ 9 - 1
pages/frontend/skill/detail/_id.vue

@@ -17,6 +17,7 @@
                             class="btn-1"
                             @click="handleBuySkill">立即购买</el-button>
                         <el-button
+                            v-if="Number(skillDetail.is_buy) > 0"
                             class="btn-2"
                             @click="handleConsultSkill">
                             <div class="btn-content">
@@ -194,8 +195,15 @@ export default {
         }
     },
     mounted () {
+        const self = this
         this.baseUrl = this.$store.state.domainConfig.siteUrl
         this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1
+
+        if (this.act === 'pay') {
+            setTimeout(() => {
+                self.$message.success('购买成功,请等待对方接单')
+            }, 800)
+        }
     },
     methods: {
         /** 点击购买时 */
@@ -204,7 +212,7 @@ export default {
             const query = {
                 product_type: 502,
                 product_id: this.sale_id,
-                next: location.href
+                next: location.href + '?act=pay'
             }
             if (!this.userinfo || !this.userinfo.nickname) {
                 // 未登录时 => 去登录