Selaa lähdekoodia

Merge branch 'web' of www.gitinn.com:proginn/proginn-frontend into web

xinfeng 6 vuotta sitten
vanhempi
commit
9221efc208

BIN
assets/css/user/fonts/mui-icons-extra.ttf


BIN
assets/css/user/fonts/mui.ttf


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 0
assets/css/user/mui.min.css


+ 51 - 40
pages/user/_id/_type.vue

@@ -2,7 +2,7 @@
   <div class="community-u" ref="container" @scroll="containerScroll">
     <div alt="back" class="background"></div>
     <div class="userinfo">
-      <img :src="info.icon_url" alt class="header-avatar"/>
+      <img :src="info.icon_url" alt class="header-avatar" />
       <div class="header-nickname">{{info.nickname}}
         <a :href='"//www.proginn.com/wo/"+uid'>
           <div class="tag">客栈主页</div>
@@ -204,30 +204,31 @@
           :current-page="currentPage" @current-change="changePagination"></el-pagination>
       </div>
     </div>
- <!--   <nav class="mui-bar mui-bar-tab">
-            <a class="mui-tab-item mui-active" href="#tabbar">
-            <span class="mui-icon ">
-              <img class="img-select " src="~@/assets/quan/icon/book.png">
-            </span>
-                <span class="mui-tab-label">文章</span>
-            </a>
-            <a class="mui-tab-item" href="/videos">
-            <span class="mui-icon ">
-              <img class="img-no" src="~@/assets/quan/icon/video.png">
-            </span>
-                <span class="mui-tab-label">视频</span>
-            </a>
-            <a class="mui-tab-item" href="">
-                <span class="mui-icon ">
-                    <img class="img-no" src="~@/assets/quan/icon/my.png">
-                </span>
-                <span class="mui-tab-label">我的</span>
-            </a>
-        </nav> -->
+    <nav class="mui-bar mui-bar-tab" v-if="!($store.state.isPC)">
+      <a class="mui-tab-item" href="/">
+        <span class="mui-icon ">
+          <img class="img-select " src="~@/assets/quan/icon/book.png">
+        </span>
+        <span class="mui-tab-label">文章</span>
+      </a>
+      <a class="mui-tab-item" href="/videos">
+        <span class="mui-icon ">
+          <img class="img-no" src="~@/assets/quan/icon/video.png">
+        </span>
+        <span class="mui-tab-label">视频</span>
+      </a>
+      <a class="mui-tab-item mui-active" href="#">
+        <span class="mui-icon ">
+          <img class="img-no" src="~@/assets/quan/icon/my_s.png">
+        </span>
+        <span class="mui-tab-label ">我的</span>
+      </a>
+    </nav>
   </div>
 </template>
 <script>
   import WxMixin from "@/mixins/wx";
+  import "@/assets/css/user/mui.min.css"
   import {
     Toast
   } from 'vant';
@@ -241,17 +242,21 @@
     head() {
       return {
         title: this.title,
-        script: [ {
-          src: "https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
-        },
+        script: [{
+            src: "https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
+          },
           {
             src: "https://hm.baidu.com/hm.js?18455f493c982100e5a82ec978a8d06e"
           }
         ]
       };
     },
-    mixins: [ WxMixin ],
-    async asyncData({ $axios, params, req }) {
+    mixins: [WxMixin],
+    async asyncData({
+      $axios,
+      params,
+      req
+    }) {
       console.log("*****")
       let id = params.id;
       let headers = req && req.headers;
@@ -308,8 +313,8 @@
           cancelButtonText: '取消',
           inputErrorMessage: '签名错误,需要在10-150字之间'
         }).then(({
-                   value
-                 }) => {
+          value
+        }) => {
           this.$axios.$post(
             '/api/jishuquan/update_desc', {
               description: value
@@ -388,7 +393,9 @@
             console.log("cancel");
           });
       },
-      clickLancer({ id }) {
+      clickLancer({
+        id
+      }) {
         this.$router.push(baseUrl + `/cert/type/${id}`);
       },
       btnDisabled(item) {
@@ -452,7 +459,7 @@
       configWx() {
         try {
           let conf = this.$store.state.wxConfig;
-          wx.ready(function () {
+          wx.ready(function() {
             //需在用户可能点击分享按钮前就先调用
             wx.config({
               debug: true,
@@ -467,10 +474,10 @@
                 "onMenuShareQQ", // 分享到QQ接口
                 "onMenuShareWeibo" // 分享到微博接口
               ],
-              success: function () {
+              success: function() {
                 alert("wx.config ok");
               },
-              error: function (d) {
+              error: function(d) {
                 alert("wx.config err:" + JSON.stringify(d));
               }
             });
@@ -479,13 +486,13 @@
               desc: "通过平台审核、认证,将获得更多接单机会", // 分享描述
               link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
               imgUrl: "https://stacdn.proginn.com/favicon.ico", // 分享图标
-              success: function () {
+              success: function() {
                 // 设置成功
                 alert("微信图标设置成功");
               }
             });
           });
-        } catch ( error ) {
+        } catch (error) {
           // alert(error);
         }
       },
@@ -497,8 +504,12 @@
         this.getList();
       },
       //打开视频
-      openVideo(item){
-        const {width, height, video_id} = item
+      openVideo(item) {
+        const {
+          width,
+          height,
+          video_id
+        } = item
         if (width < height) { //竖屏 跳转到播放页
           window.open(`/video/${video_id}`, "_black")
         } else {
@@ -563,7 +574,7 @@
         try {
           ts = moment(ts).toDate().getTime()
           let now = new Date().getTime()
-          let fromNow = Math.floor((now-ts)/1000)
+          let fromNow = Math.floor((now - ts) / 1000)
           if (fromNow < 5 * 60) {
             return "刚刚";
           } else if (fromNow < 60 * 60) {
@@ -585,13 +596,13 @@
         if (!second) {
           return "00:00"
         }
-        let fix = (s) =>  ("00" + s).slice(-2)
+        let fix = (s) => ("00" + s).slice(-2)
         if (second < 60) {
           return "00:" + fix(second)
         } else if (second >= 60 && second < 60 * 60) {
-          return fix(Math.floor(second/60)) + ":" + fix(Math.floor(second%60))
+          return fix(Math.floor(second / 60)) + ":" + fix(Math.floor(second % 60))
         } else {
-          return fix(Math.floor(second/60 / 60)) + ":" + fix(Math.floor(second/60) % 60)
+          return fix(Math.floor(second / 60 / 60)) + ":" + fix(Math.floor(second / 60) % 60)
         }
       }
     },