소스 검색

1、1.6 联系包年、包季前端处理;2、1.8 导航栏优化;

huan-jie 5 년 전
부모
커밋
96e09a430c

BIN
assets/img/header/new/kaifain2@2x.png


BIN
assets/img/header/new/yesdev@2x.png


BIN
assets/img/vip/tips_icon@2x.png


BIN
assets/img/vip/vip_buy_icon@2x.png


+ 8 - 5
components/header.vue

@@ -41,6 +41,7 @@
                   class="smallCell"
                   v-for="(small, smallIndex) in big.list"
                   :href="small.href"
+                  :target="small.blank ? '_blank' : ''"
                 >
                   <div class="cellLeftIcon">
                     <img :src="small.icon" alt="" />
@@ -432,7 +433,7 @@ export default {
         display: flex;
         box-sizing: content-box;
         width: 830px;
-        height: 440px;
+        height: 550px;
         background: #ffffff;
         border-radius: 6px;
         box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.06);
@@ -490,23 +491,25 @@ export default {
           background: #fff;
           height: 100%;
           box-sizing: border-box;
-          padding: 15px 34px 14px 23px;
+          padding: 0 34px 0 23px;
 
           .rightBigCell {
             display: flex;
             justify-content: space-between;
             width: 594px;
-            height: 137px;
+            height: auto;
             box-shadow: 0px -1px 0px 0px #e2e8ee inset;
-            padding: 14px 0;
+            padding-bottom: 14px;
             box-sizing: border-box;
+            flex-wrap: wrap;
 
             &:last-child {
               box-shadow: none;
             }
 
             .smallCell {
-              height: 100%;
+              height: 110px;
+              margin-top: 14px;
               display: flex;
               justify-content: flex-start;
               align-items: center;

+ 30 - 26
components/headers/dropDownData.js

@@ -3,51 +3,55 @@ const DropDownData = (domainConfig) => {
   const { siteUrl, jishuinUrl, kaifainUrl, jobUrl,} = domainConfig
   return [
     {
-      title: "技术人力",
-      titleEn: "Technical manpower",
+      title: "服务",
+      titleEn: "Solutions by Scenari",
       list: [{
         icon: require('../../assets/img/header/new/job@2x.png'),
         title: "自由工作",
         desc: "远程工作、驻场工作",
         href: siteUrl+'/cloud?from=top_nav'
       }, {
+        icon: require('../../assets/img/header/new/kaifain@2x.png'),
+        title: "项目开发",
+        desc: "全行业立体化解决方案平台",
+        href: siteUrl+'/type/service?from=index'
+      }, {
+        icon: require('../../assets/img/header/new/project@2x.png'),
+        title: "人力外包",
+        desc: "一站式软件开发",
+        href: siteUrl+'/outsource/sitePublicity?from=top_nav'
+      }, {
         icon: require('../../assets/img/header/new/cloud@2x.png'),
-        title: "飞码招聘",
+        title: "任务大厅",
         desc: "专注程序员技术招聘",
         href: jobUrl+'/?from=top_nav'
       }], 
     },
     {
-      title: "开发",
-      titleEn: "Industry Solutions",
+      title: "更多",
+      titleEn: "More",
       list: [{
-        icon: require('../../assets/img/header/new/project@2x.png'),
-        title: "项目开发",
-        desc: "一站式软件开发",
-        href: siteUrl+'/type/service?from=index'
-      }, {
-        icon: require('../../assets/img/header/new/kaifain@2x.png'),
+        icon: require('../../assets/img/header/new/kaifain2@2x.png'),
         title: "开发屋",
-        desc: "全行业立体化解决方案平台",
+        desc: "数据API交易平台",
         href: kaifainUrl
-      } ],
-    },
-    {
-      title: "更多",
-      titleEn: "More",
-      list: [
-      //   {
-      //   icon: require('../../assets/img/header/new/jinzhi@2x.png'),
-      //   title: "进制数据",
-      //   desc: "数据API交易平台",
-      //   href: "http://www.binstd.com/?from=proginn"
-      // },
-        {
+      }, {
         icon: require('../../assets/img/header/new/jishuin@2x.png'),
         title: "技术圈",
         desc: "最新行业动态",
         href: jishuinUrl
-      } ],
+      }, {
+        icon: require('../../assets/img/header/new/yesdev@2x.png'),
+        title: "YesDev",
+        desc: "专注软件开发过程中的每一个环节",
+        href: 'https://www.yesdev.cn/'
+      }, {
+        icon: 'https://uni-cdn.oss-cn-hangzhou.aliyuncs.com/public/img/unisms-icon.png',
+        title: "UniSMS (合一短信)",
+        desc: "高可用聚合短信平台",
+        href: 'https://unisms.apistd.com/?source=pi.pc.nav',
+        blank: true
+      }],
     },
   ]
 }

+ 260 - 0
components/type/vip/buy-dev-dialog.vue

@@ -0,0 +1,260 @@
+<template>
+    <el-dialog class="buy-dev-wrapper" :visible.sync="showDialog" :before-close="handleClose">
+        <div slot="title" class="dialog-title">
+            <img src="~@/assets/img/vip/vip_buy_icon@2x.png" alt="vip_icon" />
+            <span>购买开发者会员</span>
+        </div>
+        <div slot="footer" class="dialog-footer">
+            <el-button class="buy-btn" type="primary" @click="handleClickBuy">
+                {{vipDetail.user_info && vipDetail.user_info.vip_type >0 ? "续费" : "开通"}}
+            </el-button>
+        </div>
+        <div class="buy-dev-box">
+            <div class="buy-dev-content">
+                <!-- 4.27 todo: 包年、包季与后端联调 -->
+                <div
+                    class="buy-dev-item"
+                    :class="{'active': number == '12+'}"
+                    v-if="item['can_buy_yearly'] === '0'"
+                    @click="clickNumber('12+')">
+                    <div class="name">连续包年</div>
+                    <div class="price">¥{{ Number(item['yearly_real_price']).toFixed(2) }}</div>
+                    <div class="price-per-month">¥{{ (Number(item['yearly_real_price']) / 12).toFixed(2) }}/月</div>
+                </div>
+                <div
+                    class="buy-dev-item"
+                    :class="{'active': number == '3+'}"
+                    v-if="item['can_buy_yearly'] === '0'"
+                    @click="clickNumber('3+')">
+                    <div class="name">连续包季</div>
+                    <div class="price">¥{{ Number(item['yearly_real_price']).toFixed(2) }}</div>
+                    <div class="price-per-month">¥{{ (Number(item['yearly_real_price']) / 12).toFixed(2) }}/月</div>
+                </div>
+                <div
+                    class="buy-dev-item"
+                    :class="{'active': number == '12'}"
+                    v-if="item['can_buy_yearly'] === '0'"
+                    @click="clickNumber('12')">
+                    <div class="name">12个月</div>
+                    <div class="price">¥{{ Number(item['yearly_real_price']).toFixed(2) }}</div>
+                    <div class="price-per-month">¥{{ (Number(item['yearly_real_price']) / 12).toFixed(2) }}/月</div>
+                </div>
+                <div
+                    class="buy-dev-item"
+                    :class="{'active': number == '6'}"
+                    v-if="item['can_buy_half_yearly'] === '1'"
+                    @click="clickNumber('6')">
+                    <div class="name">6个月</div>
+                    <div class="price">¥{{ Number(item['half_yearly_real_price']).toFixed(2) }}</div>
+                    <div class="price-per-month">¥{{ (Number(item['half_yearly_real_price']) / 12).toFixed(2) }}/月</div>
+                </div>
+                <div
+                    class="buy-dev-item"
+                    :class="{'active': number == '3'}"
+                    v-if="item['can_buy_quarterly'] === '0'"
+                    @click="clickNumber('3')">
+                    <div class="name">3个月</div>
+                    <div class="price">¥{{ Number(item['quarterly_real_price']).toFixed(2) }}</div>
+                    <div class="price-per-month">¥{{ (Number(item['quarterly_real_price']) / 12).toFixed(2) }}/月</div>
+                </div>
+            </div>
+            <!-- 选择连续包年时展示 -->
+            <div v-if="number == '12+'" class="buy-dev-tips">
+                <span>到期按{{ Number(item['yearly_real_price']).toFixed(2) }}元每年自动续约,可随时取消</span>
+                <el-tooltip placement="bottom-end">
+                    <div slot="content" class="">
+                        <p>自动续费说明</p>
+                        <p>1. 会员权益到期前一天,为您自动续费;</p>
+                        <p>2. 扣款前消息通知,完全透明;</p>
+                        <p>3. 可随时取消服务,取消后不再自动续费。</p>
+                    </div>
+                    <img src="~@/assets/img/vip/tips_icon@2x.png" class="tips-img" >
+                </el-tooltip>
+            </div>
+            <!-- 选择连续包季时展示 -->
+            <div v-if="number == '3+'" class="buy-dev-tips">
+                <span>到期按{{ Number(item['yearly_real_price']).toFixed(2) }}元每季自动续约,可随时取消</span>
+                <el-tooltip placement="bottom-end">
+                    <div slot="content" class="">
+                        <p>自动续费说明</p>
+                        <p>1. 会员权益到期前一天,为您自动续费;</p>
+                        <p>2. 扣款前消息通知,完全透明;</p>
+                        <p>3. 可随时取消服务,取消后不再自动续费。</p>
+                    </div>
+                    <img src="~@/assets/img/vip/tips_icon@2x.png" class="tips-img" >
+                </el-tooltip>
+            </div>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+export default {
+    name: 'BuyDevDialog',
+    props: {
+        showDialog: {
+            type: Boolean,
+            default: false
+        },
+        // 购买开发者会员的配置信息
+        item: Object,
+        handleClose: Function,
+        vipDetail: Object
+    },
+    data () {
+        return {
+            number: '12+'
+        }
+    },
+    methods: {
+        /**
+         * 切换选择会员时间
+         */
+        clickNumber (number) {
+            this.number = number;
+        },
+        /**
+         * 点击开通/续费时
+         */
+        handleClickBuy () {
+            if (this.number == '12+') {
+                this.$message('连续包年')
+            } else if (this.number == '3+') {
+                this.$message('连续包季')
+            } else if (this.number == '12') {
+                this.$message('购买12个月')
+            } else if (this.number == '6') {
+                this.$message('购买6个月')
+            } else if (this.number == '3') {
+                this.$message('购买3个月')
+            }
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+.buy-dev-wrapper {
+    .el-dialog {
+        width: 669px;
+    }
+    .el-dialog__headerbtn {
+        top: 32px;
+        right: 30px;
+    }
+    .el-dialog__header {
+        padding: 30px 30px 10px;
+    }
+    .el-dialog__footer {
+        padding: 0 30px 30px;
+    }
+}
+</style>
+<style lang="scss" scoped>
+.buy-dev-box {
+    width: 594px;
+    margin: 0 auto;
+    display: flex;
+    flex-direction: column;
+    .buy-dev-content {
+        width: 100%;
+        display: flex;
+        flex-wrap: wrap;
+        .buy-dev-item {
+            width: 190px;
+            height: 120px;
+            margin: 0 12px 14px 0;
+            background: #ffffff;
+            border: 1px solid rgba(0,0,0,0.05);
+            border-radius: 7px;
+            box-shadow: 0px 3px 12px 0px rgba(8,27,50,0.05);
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: center;
+            cursor: pointer;
+            &:nth-of-type(3n) {
+                margin-right: 0;
+            }
+            &.active {
+                border: 2px solid #308eff;
+            }
+            .name {
+                font-size: 18px;
+                font-family: PingFangSC, PingFangSC-Semibold;
+                font-weight: 600;
+                text-align: center;
+                color: #308eff;
+                line-height: 25px;
+            }
+            .price {
+                margin-top: 10px;
+                font-size: 16px;
+                font-family: PingFangSC, PingFangSC-Semibold;
+                font-weight: 600;
+                text-align: center;
+                color: #222222;
+                line-height: 22px;
+            }
+            .price-per-month {
+                font-size: 12px;
+                font-family: PingFangSC, PingFangSC-Regular;
+                font-weight: 400;
+                text-align: center;
+                color: #999999;
+                line-height: 17px;
+            }
+        }
+    }
+    .buy-dev-tips {
+        font-size: 14px;
+        font-family: PingFangSC, PingFangSC-Regular;
+        font-weight: 400;
+        color: #999999;
+        line-height: 20px;
+        display: flex;
+        align-items: center;
+        .tips-img {
+            margin-left: 2px;
+            width: 14px;
+            height: 14px;
+            cursor: pointer;
+        }
+    }
+}
+.dialog-title {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    img {
+        width: 31px;
+        height: 25px;
+        margin-right: 8px;
+    }
+    span {
+        font-size: 23px;
+        font-family: PingFangSC, PingFangSC-Semibold;
+        font-weight: 600;
+        color: #222222;
+    }
+}
+.dialog-footer {
+    width: 100%;
+    display: flex;
+    justify-content: center;
+    .buy-btn {
+        width: 290px;
+        height: 48px;
+        background: #e1a83f;
+        border: none;
+        border-radius: 10px;
+        font-size: 16px;
+        font-family: PingFangSC, PingFangSC-Semibold;
+        font-weight: 600;
+        text-align: center;
+        color: #222222;
+        line-height: 22px;
+    }
+}
+</style>

+ 36 - 2
components/type/vip/mobile.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="wrapper" v-if="detail">
+  <div class="wrapper" :class="{'dev-wrapper': active == 0}" v-if="detail">
     <!--顶部tab-->
     <div class="switch-bar" :class="active===0?'switch-bar-brown':current===0?'switch-bar-blue':'switch-bar-green'">
       <div class="switch-item" :class="{'switch-item-active':active===0}" @click="handleSwitchClick(0)">
@@ -25,7 +25,7 @@
           <div
             class="renew-btn"
             :class="vipColor"
-            @click="clickPay('dev')"
+            @click="handleClickBuyDev"
           >{{ vipType === 2 ? '续费' : '开通' }}
           </div>
         </div>
@@ -195,6 +195,10 @@
         </div>
       </div>
     </div>
+    <!-- 底部浮动立即开通/续费按钮 -->
+    <div class="buy-dev-btn" v-if="active===0" @click="handleClickBuyDev">
+      {{ vipType === 2 ? '立即续费' : '立即开通' }}
+    </div>
     <buy-dialog
       :handleClose="handleClose"
       :buyDialog="buyDialog"
@@ -408,6 +412,12 @@ export default {
         this.vipInfo = res.data;
       }
     },
+    /**
+     * 点击开通/续费开发者会员
+     */
+    handleClickBuyDev () {
+      this.$message('开通/续费开发者会员,跳转端原生页面')
+    }
   },
 };
 </script>
@@ -698,4 +708,28 @@ export default {
 .blue {
   background-color: #308eff;
 }
+
+.dev-wrapper {
+  margin: 0;
+  padding-bottom: 84px;
+}
+
+.buy-dev-btn {
+  position: fixed;
+  z-index: 11;
+  width: calc(100% - 20px);
+  height: 40px;
+  line-height: 40px;
+  left: 10px;
+  bottom: 32px;
+  opacity: 1;
+  background: #e1a83f;
+  border-radius: 6px;
+  font-size: 15px;
+  font-family: PingFangSC, PingFangSC-Medium;
+  font-weight: 500;
+  text-align: center;
+  color: #ffffff;
+  cursor: pointer;
+}
 </style>

+ 12 - 7
pages/type/vip/developer.vue

@@ -59,7 +59,7 @@
         <p> 3.如有任何问题,欢迎咨询在线客服,或拨打热线:0571-28120931 转1</p>
       </div>
     </div>
-    <buy-dialog
+    <!-- <buy-dialog
       :handleClose="handleClose"
       :buyDialog="buyDialog"
       :gotoPay="gotoPay"
@@ -67,18 +67,23 @@
       :item="item"
       :vipDetail="vipDetail"
       :pricePrefix="pricePrefix"
-    ></buy-dialog>
+    ></buy-dialog> -->
+    <BuyDevDialog
+      :handleClose="handleClose"
+      :showDialog="showDialog"
+      :item="item"
+      :vipDetail="vipDetail"></BuyDevDialog>
   </div>
 
 </template>
 
 <script>
-    import buyDialog from "@/components/type/vip/buy-dialog";
+    import BuyDevDialog from "@/components/type/vip/buy-dev-dialog";
 
     export default {
         data() {
             return {
-                buyDialog: false,
+                showDialog: false,
                 pricePrefix: "",
                 type: "dev", // com: 企业会员, dev: 开发者会员
                 vipList: [],
@@ -91,7 +96,7 @@
             await this.getVipDetail();
         },
         components: {
-            buyDialog
+            BuyDevDialog
         },
         computed: {},
         methods: {
@@ -109,10 +114,10 @@
             clickPay(type) {
                 this.type = type;
                 this.item = this.vipList[1];
-                this.buyDialog = true;
+                this.showDialog = true;
             },
             handleClose() {
-                this.buyDialog = false;
+                this.showDialog = false;
             },
             gotoPay(number) {
                 const item = this.item;