ソースを参照

主要page模板移动到default

zweizhao 7 年 前
コミット
8d32617a12

+ 0 - 50
components/page.vue

@@ -1,50 +0,0 @@
-<template>
-  <section id="proginn-container">
-    <proginn-header v-if="isPC != -1 && isPC"/>
-    <wx-header v-if="isWeixin"></wx-header>
-    <slot name="menu"></slot>
-    <slot></slot>
-    <proginn-footer v-if="isPC != -1 && isPC"/>
-  </section>
-</template>
-
-<script>
-import ProginnHeader from '@/components/header'
-import ProginnFooter from '@/components/footer'
-import WxHeader from '@/components/wx_header'
-import { mapState, mapMutations } from 'vuex'
-
-export default {
-  components: {
-    ProginnHeader,
-    ProginnFooter,
-    WxHeader,
-  },
-  computed: {
-    ...mapState(['isPC', `isWeixin`]),
-  },
-  mounted() {
-    this.checkTerminal()
-    window.addEventListener('resize', this.checkInnerWidth)
-  },
-  methods: {
-    ...mapMutations(['updateIsPC', 'updateIsWeixin']),
-    checkTerminal() {
-      this.updateIsPC({
-        isPC: window.innerWidth > 960,
-      })
-      this.updateIsWeixin({
-        isWeixin: window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)
-      })
-    },
-  }
-}
-</script>
-
-<style>
-#proginn-container {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-}
-</style>

+ 4 - 6
components/ws/page.vue

@@ -1,11 +1,9 @@
 // 科技圈page模板
 <template>
-  <proginn-page>
-    <section class="tech-main">
-      <tech-menu v-bind="$attrs" v-on="$listeners"></tech-menu>
-      <slot></slot>
-    </section>
-  </proginn-page>
+  <section class="tech-main">
+    <tech-menu v-bind="$attrs" v-on="$listeners"></tech-menu>
+    <slot></slot>
+  </section>
 </template>
 
 <script>

+ 46 - 1
layouts/default.vue

@@ -1,7 +1,47 @@
 <template>
-  <nuxt/>
+  <div class="container">
+    <proginn-header v-if="isPC != -1 && isPC"/>
+    <wx-header v-if="isWeixin"></wx-header>
+    <slot name="menu"></slot>
+    <nuxt/>
+    <proginn-footer v-if="isPC != -1 && isPC"/>
+  </div>
 </template>
 
+<script>
+import ProginnHeader from '@/components/header'
+import ProginnFooter from '@/components/footer'
+import WxHeader from '@/components/wx_header'
+import { mapState, mapMutations } from 'vuex'
+
+export default {
+  components: {
+    ProginnHeader,
+    ProginnFooter,
+    WxHeader,
+  },
+  computed: {
+    ...mapState(['isPC', `isWeixin`]),
+  },
+  mounted() {
+    this.checkTerminal()
+    window.addEventListener('resize', this.checkInnerWidth)
+  },
+  methods: {
+    ...mapMutations(['updateIsPC', 'updateIsWeixin']),
+    checkTerminal() {
+      this.updateIsPC({
+        isPC: window.innerWidth > 960,
+      })
+      this.updateIsWeixin({
+        isWeixin: window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)
+      })
+    },
+  }
+}
+</script>
+
+
 <style>
 *,
 *:before,
@@ -9,4 +49,9 @@
   box-sizing: border-box;
   margin: 0;
 }
+.container {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
 </style>

+ 33 - 35
pages/cert/index.vue

@@ -1,41 +1,39 @@
 <template>
-  <proginn-page>
-    <section class="cert-index">
-      <h1>开发者资质认证</h1>
-      <ul class="cers">
-        <li class="cer" v-for="item of list" :key="item.id">
-          <section class="cer-box" :class="{'cer-check': canApply(item)}">
-            <img :src="item.img" alt="no-img" class="cer-img" @click="clickLancer(item)">
-            <section class="cer-info">
-              <h2 class="cer-title" @click="clickLancer(item)">{{item.name}}认证</h2>
-              <div class="cer-remind" @click="clickLancer(item)">{{item.introduction}}</div>
-              <section class="cer-price-info">
-                <span class="price">
-                  ¥{{item.real_price}}
-                  <sub class="sub">/次</sub>
-                </span>
-                <span v-if="item.is_discount" class="origin-price">原价¥{{item.origin_price}}</span>
-                <span class="vip-tag" v-if="item.is_vip_discount">会员¥{{item.vip_price}}</span>
-              </section>
-              <section class="cert-status">
-                <button
-                  class="cer-ctrl"
-                  :class="{disabled: btnDisabled(item)}"
-                  :disabled="btnDisabled(item)"
-                  @click="clickLancer(item)"
-                >{{item.btn_name}}</button>
-                <span class="userful-time" v-if="canApply(item)">
-                  有效期至{{item.end_date}}
-                  <nuxt-link class="link-check" :to="`/cert/no/${item.cert_no}`">查看证书</nuxt-link>
-                </span>
-              </section>
+  <section class="cert-index">
+    <h1>开发者资质认证</h1>
+    <ul class="cers">
+      <li class="cer" v-for="item of list" :key="item.id">
+        <section class="cer-box" :class="{'cer-check': canApply(item)}">
+          <img :src="item.img" alt="no-img" class="cer-img" @click="clickLancer(item)">
+          <section class="cer-info">
+            <h2 class="cer-title" @click="clickLancer(item)">{{item.name}}认证</h2>
+            <div class="cer-remind" @click="clickLancer(item)">{{item.introduction}}</div>
+            <section class="cer-price-info">
+              <span class="price">
+                ¥{{item.real_price}}
+                <sub class="sub">/次</sub>
+              </span>
+              <span v-if="item.is_discount" class="origin-price">原价¥{{item.origin_price}}</span>
+              <span class="vip-tag" v-if="item.is_vip_discount">会员¥{{item.vip_price}}</span>
+            </section>
+            <section class="cert-status">
+              <button
+                class="cer-ctrl"
+                :class="{disabled: btnDisabled(item)}"
+                :disabled="btnDisabled(item)"
+                @click="clickLancer(item)"
+              >{{item.btn_name}}</button>
+              <span class="userful-time" v-if="canApply(item)">
+                有效期至{{item.end_date}}
+                <nuxt-link class="link-check" :to="`/cert/no/${item.cert_no}`">查看证书</nuxt-link>
+              </span>
             </section>
           </section>
-          <div class="line"></div>
-        </li>
-      </ul>
-    </section>
-  </proginn-page>
+        </section>
+        <div class="line"></div>
+      </li>
+    </ul>
+  </section>
 </template>
 
 <script>

+ 16 - 18
pages/cert/no/_no.vue

@@ -1,23 +1,21 @@
 <template>
-  <proginn-page>
-    <section class="cert-id">
-      <section class="cert-id-box">
-        <template v-if="detail.name">
-          <h1>{{detail.name}}证书</h1>
-          <div class="hr"></div>
-          <canvas class="canvas" ref="canvas" width="850" height="520">对不起, 您的浏览器不支持绘图功能, 请更新浏览器.</canvas>
-          <img ref="img" class="img" src="~@/assets/img/cert/bg.png" alt="img">
-          <img ref="qrImg" class="img" :src="`/api/cert/certQrCode?uid=${detail.uid}`" alt="qrImg">
-          <section class="links">
-            <a class="link" :href="detail.seo_uri">开发者个人主页 ></a>
-            <br>
-            <nuxt-link class="link" :to="`/cert/type/${detail.cert_id}`">{{detail.name}}认证标准 ></nuxt-link>
-          </section>
-        </template>
-        <h1 v-else>未查询到证书</h1>
-      </section>
+  <section class="cert-id">
+    <section class="cert-id-box">
+      <template v-if="detail.name">
+        <h1>{{detail.name}}证书</h1>
+        <div class="hr"></div>
+        <canvas class="canvas" ref="canvas" width="850" height="520">对不起, 您的浏览器不支持绘图功能, 请更新浏览器.</canvas>
+        <img ref="img" class="img" src="~@/assets/img/cert/bg.png" alt="img">
+        <img ref="qrImg" class="img" :src="`/api/cert/certQrCode?uid=${detail.uid}`" alt="qrImg">
+        <section class="links">
+          <a class="link" :href="detail.seo_uri">开发者个人主页 ></a>
+          <br>
+          <nuxt-link class="link" :to="`/cert/type/${detail.cert_id}`">{{detail.name}}认证标准 ></nuxt-link>
+        </section>
+      </template>
+      <h1 v-else>未查询到证书</h1>
     </section>
-  </proginn-page>
+  </section>
 </template>
 
 <script>

+ 43 - 45
pages/cert/type/_id.vue

@@ -1,56 +1,54 @@
 
 <template>
-  <proginn-page>
-    <section class="apply">
-      <section class="apply-top">
-        <h1>{{detail.name}}认证</h1>
-        <section class="info" v-html="detail.description"/>
-        <section v-if="conditions.length" class="cert-quals">
-          <section class="cert-qual" v-for="(item, index) of conditions" :key="index">
-            <section class="qual-status" :class="{'qual-completed': item.is_completed}">
-              <div class="qual-point"></div>
-              <span class="qual-status-name">{{item.is_completed ? '已达标' : '未达标'}}</span>
-            </section>
-            <span
-              class="qual-info"
-            >{{`${item.text}`}}{{item.target ? `(${item.completed_num}/${item.target})` : ''}}</span>
+  <section class="apply">
+    <section class="apply-top">
+      <h1>{{detail.name}}认证</h1>
+      <section class="info" v-html="detail.description"/>
+      <section v-if="conditions.length" class="cert-quals">
+        <section class="cert-qual" v-for="(item, index) of conditions" :key="index">
+          <section class="qual-status" :class="{'qual-completed': item.is_completed}">
+            <div class="qual-point"></div>
+            <span class="qual-status-name">{{item.is_completed ? '已达标' : '未达标'}}</span>
           </section>
-        </section>
-        <section class="cer-price-info">
-          <span class="price">
-            ¥{{detail.real_price}}
-            <sub class="sub">/次</sub>
-          </span>
-          <span class="origin-price" v-if="detail.is_discount">原价¥{{detail.origin_price}}</span>
-          <span
-            class="vip-tag"
-            v-if="detail.is_vip_discount"
-            @click="clickVipPrice"
-          >{{`${detail.is_enjoy_vip_discount ? '会员' : '开通会员低至'}¥${detail.vip_price}`}}</span>
-        </section>
-        <section class="cert-status">
-          <button class="cer-ctrl death" v-if="isDeath">{{detail.btn_name}}</button>
-          <button class="cer-ctrl" @click="clickBtn" v-else>{{detail.btn_name}}</button>
           <span
-            class="userful-time"
-            v-if="detail.end_date && detail.is_cert_validate && detail.cert_no"
-          >
-            有效期至{{detail.end_date}}
-            <nuxt-link class="link-cert" :to="`/cert/no/${detail.cert_no}`">查看证书</nuxt-link>
-          </span>
+            class="qual-info"
+          >{{`${item.text}`}}{{item.target ? `(${item.completed_num}/${item.target})` : ''}}</span>
         </section>
       </section>
-      <section class="remind">
-        <p style="color: #333;">说明:</p>
-        <p>1、认证申请基本条件:已成为平台签约开发者,无纠纷降权记录;</p>
-        <p>2、认证申请将在3到5个工作日内完成审核;</p>
-        <p>3、认证申请为付费服务,若因申请者不达标而认证不通过,费用不予退回,3个月内可以免费申请3次;</p>
-        <p>4、认证通过后,资质有效期为一年,到期后需要重新提交认证;</p>
-        <p>5、认证通过后,如果违反平台相关规则,平台有权取消认证资质;</p>
-        <p>6、如有疑问,请联系在线客服,或拨打客服热线 0571-28120931</p>
+      <section class="cer-price-info">
+        <span class="price">
+          ¥{{detail.real_price}}
+          <sub class="sub">/次</sub>
+        </span>
+        <span class="origin-price" v-if="detail.is_discount">原价¥{{detail.origin_price}}</span>
+        <span
+          class="vip-tag"
+          v-if="detail.is_vip_discount"
+          @click="clickVipPrice"
+        >{{`${detail.is_enjoy_vip_discount ? '会员' : '开通会员低至'}¥${detail.vip_price}`}}</span>
       </section>
+      <section class="cert-status">
+        <button class="cer-ctrl death" v-if="isDeath">{{detail.btn_name}}</button>
+        <button class="cer-ctrl" @click="clickBtn" v-else>{{detail.btn_name}}</button>
+        <span
+          class="userful-time"
+          v-if="detail.end_date && detail.is_cert_validate && detail.cert_no"
+        >
+          有效期至{{detail.end_date}}
+          <nuxt-link class="link-cert" :to="`/cert/no/${detail.cert_no}`">查看证书</nuxt-link>
+        </span>
+      </section>
+    </section>
+    <section class="remind">
+      <p style="color: #333;">说明:</p>
+      <p>1、认证申请基本条件:已成为平台签约开发者,无纠纷降权记录;</p>
+      <p>2、认证申请将在3到5个工作日内完成审核;</p>
+      <p>3、认证申请为付费服务,若因申请者不达标而认证不通过,费用不予退回,3个月内可以免费申请3次;</p>
+      <p>4、认证通过后,资质有效期为一年,到期后需要重新提交认证;</p>
+      <p>5、认证通过后,如果违反平台相关规则,平台有权取消认证资质;</p>
+      <p>6、如有疑问,请联系在线客服,或拨打客服热线 0571-28120931</p>
     </section>
-  </proginn-page>
+  </section>
 </template>
 
 <script>

+ 1 - 6
pages/check/change_mobile.vue

@@ -1,9 +1,5 @@
 <template>
-  <proginn-page>
-    <div class="check">
-      cm
-    </div>
-  </proginn-page>
+  <div class="check">cm</div>
 </template>
 
 <script>
@@ -13,5 +9,4 @@ export default {
 </script>
 
 <style scoped>
-
 </style>

+ 1 - 6
pages/check/index.vue

@@ -1,9 +1,5 @@
 <template>
-  <proginn-page>
-    <div class="check">
-      check
-    </div>
-  </proginn-page>
+  <div class="check">check</div>
 </template>
 
 <script>
@@ -13,5 +9,4 @@ export default {
 </script>
 
 <style scoped>
-
 </style>

+ 1 - 3
pages/check/old_mobile.vue

@@ -1,7 +1,5 @@
 <template>
-  <proginn-page>
-    <div class="check">check</div>
-  </proginn-page>
+  <div class="check">check</div>
 </template>
 
 <script>

+ 1 - 6
pages/check/real_info.vue

@@ -1,9 +1,5 @@
 <template>
-  <proginn-page>
-    <div class="check">
-      ri
-    </div>
-  </proginn-page>
+  <div class="check">ri</div>
 </template>
 
 <script>
@@ -13,5 +9,4 @@ export default {
 </script>
 
 <style scoped>
-
 </style>

+ 0 - 1
pages/group/_detail/edit.vue

@@ -13,5 +13,4 @@ export default {
 </script>
 
 <style>
-
 </style>

+ 1 - 1
pages/group/_detail/index.vue

@@ -296,7 +296,7 @@ export default {
   margin-bottom: 4px;
 }
 .dynamic-red {
-  color: #FF5F00;
+  color: #ff5f00;
   font-size: 14px;
 }
 .dynamic-date {

+ 0 - 1
pages/group/create.vue

@@ -13,5 +13,4 @@ export default {
 </script>
 
 <style>
-
 </style>

+ 29 - 24
pages/group/index.vue

@@ -12,30 +12,35 @@
         </nuxt-link>
       </section>
       <section v-if="list" class="list">
-        <nuxt-link class="group-item" :to="`/group/${item.id}`" v-for="(item, index) of list" :key="index">
-            <section class="imgs" v-if="item.developers.length === 1">
-              <template v-for="(developer, idx) of item.developers">
-                <img class="img" :src="developer && developer.icon_url" alt="icon_url" :key="idx">
-              </template>
-            </section>
-            <section class="imgs" v-else-if="item.developers.length === 2">
-              <template v-for="(developer, idx) of item.developers">
-                <img class="img two" :src="developer && developer.icon_url" alt="icon_url" :key="idx">
-              </template>
-            </section>
-            <section class="imgs" v-else>
-              <template v-for="(developer, idx) of item.developers">
-                <img
-                  v-if="idx < 3"
-                  class="img three"
-                  :src="developer && developer.icon_url"
-                  alt="icon_url"
-                  :key="idx"
-                >
-              </template>
-            </section>
-            <p class="name">{{item.name}}</p>
-            <p class="count">{{item.member_num}}人</p>
+        <nuxt-link
+          class="group-item"
+          :to="`/group/${item.id}`"
+          v-for="(item, index) of list"
+          :key="index"
+        >
+          <section class="imgs" v-if="item.developers.length === 1">
+            <template v-for="(developer, idx) of item.developers">
+              <img class="img" :src="developer && developer.icon_url" alt="icon_url" :key="idx">
+            </template>
+          </section>
+          <section class="imgs" v-else-if="item.developers.length === 2">
+            <template v-for="(developer, idx) of item.developers">
+              <img class="img two" :src="developer && developer.icon_url" alt="icon_url" :key="idx">
+            </template>
+          </section>
+          <section class="imgs" v-else>
+            <template v-for="(developer, idx) of item.developers">
+              <img
+                v-if="idx < 3"
+                class="img three"
+                :src="developer && developer.icon_url"
+                alt="icon_url"
+                :key="idx"
+              >
+            </template>
+          </section>
+          <p class="name">{{item.name}}</p>
+          <p class="count">{{item.member_num}}人</p>
         </nuxt-link>
       </section>
       <el-pagination

+ 1 - 4
pages/index.vue

@@ -1,7 +1,5 @@
 <template>
-  <proginn-page>
-    目前SSR未有页面
-  </proginn-page>
+  <div>目前SSR未有页面</div>
 </template>
 
 <script>
@@ -10,5 +8,4 @@ export default {
 </script>
 
 <style>
-
 </style>

+ 1 - 3
pages/type/index.vue

@@ -1,7 +1,5 @@
 <template>
-  <proginn-page>
-    <section>type</section>
-  </proginn-page>
+  <section>type</section>
 </template>
 
 <script>

+ 1 - 3
pages/type/pay.vue

@@ -1,7 +1,5 @@
 <template>
-  <proginn-page>
-    <section class="pay">pay</section>
-  </proginn-page>
+  <section class="pay">pay</section>
 </template>
 
 <script>

+ 2 - 4
pages/type/vip.vue

@@ -1,8 +1,6 @@
 <template>
-  <proginn-page>
-    <pc v-if="isPC" :com="com" :dev="dev"></pc>
-    <mobile v-else :com="com" :dev="dev"></mobile>
-  </proginn-page>
+  <pc v-if="isPC" :com="com" :dev="dev"></pc>
+  <mobile v-else :com="com" :dev="dev"></mobile>
 </template>
 
 <script>

+ 0 - 2
plugins/common.js

@@ -1,6 +1,5 @@
 import Vue from 'vue'
 import http from '@/plugins/http'
-import ProginnPage from '@/components/page'
 
 // mixin
 Vue.mixin({
@@ -12,7 +11,6 @@ Vue.mixin({
     }
   },
   components: {
-    ProginnPage,
   },
   data() {
     return {