liu 6 роки тому
батько
коміт
fef1bc20ca

Різницю між файлами не показано, бо вона завелика
+ 4728 - 1
assets/css/user/mui.min.css


+ 41 - 29
pages/user/collect_article/_id.vue

@@ -100,11 +100,7 @@
         </div>
 
         <div class="videoList">
-          <div class="cell"
-            v-for="video in list"
-            :data-vid="video.video_id"
-            @click="openVideo(video)"
-          >
+          <div class="cell" v-for="video in list" :data-vid="video.video_id" @click="openVideo(video)">
             <div class="videoImg">
               <img class="img" :src="video.cover_url" alt="">
               <div class="time">{{dealDuration(video.duration)}}</div>
@@ -112,7 +108,7 @@
             </div>
             <div class="videoDetail" v-if="!mobile">
               <div class="companyInfo">
-                <img class="img" :src="info.company_info ? info.company_info.logo:''"/>
+                <img class="img" :src="info.company_info ? info.company_info.logo:''" />
                 <div class="name">{{info.company_info && info.company_info.name}}</div>
               </div>
               <div class="videoTitle">{{video.title}}</div>
@@ -126,7 +122,7 @@
               <div class="videoTitle">{{video.title}}</div>
               <div class="videoBottom">
                 <div class="companyInfo">
-                  <img class="img" :src="info.company_info ? info.company_info.logo:''"/>
+                  <img class="img" :src="info.company_info ? info.company_info.logo:''" />
                   <div class="name">{{info.company_info && info.company_info.name}}</div>
                 </div>
                 <div class="videoInfo">
@@ -143,8 +139,8 @@
         正在加载
       </div>
       <div class="loading" v-if="noMore">已加载全部内容</div>
-      <el-pagination v-if="$store.state.isPC" background layout="prev, pager, next" :total="listCount"
-        :page-size="10" :current-page="currentPage" @current-change="changePagination"></el-pagination>
+      <el-pagination v-if="$store.state.isPC" background layout="prev, pager, next" :total="listCount" :page-size="10"
+        :current-page="currentPage" @current-change="changePagination"></el-pagination>
     </div>
   </div>
 </template>
@@ -157,7 +153,12 @@
 
   export default {
     layout: "opacity_header",
-    async asyncData({ $axios, params, req, app }) {
+    async asyncData({
+      $axios,
+      params,
+      req,
+      app
+    }) {
       let id = params.id;
       let headers = req && req.headers;
       return {
@@ -167,16 +168,16 @@
     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 ],
+    mixins: [WxMixin],
     data() {
       return {
         collect_title: '方案名称',
@@ -208,7 +209,9 @@
     },
     mounted() {
       container = this.$refs.container;
-      const { type } = this.$route.query || {}
+      const {
+        type
+      } = this.$route.query || {}
       if (type === 'video') {
         this.item = type
       }
@@ -222,8 +225,8 @@
           cancelButtonText: '取消',
           inputErrorMessage: '签名错误,需要在10-150字之间'
         }).then(({
-                   value
-                 }) => {
+          value
+        }) => {
           this.$axios.$post(
             '/api/jishuquan/update_desc', {
               description: value
@@ -250,15 +253,16 @@
       addCollect() {
         Toast('请前往程序员客栈添加解决方案');
       },
-      addNowContent(type='article') {
+      addNowContent(type = 'article') {
+        var that = this
         if (!this.mobile) {
           this.$message.warning("请前往程序员客栈APP添加");
           return
         }
         if (type === 'video') {
-          location.href = "/user/add_video_collect/"+id
+          location.href = "/user/add_video_collect/" + that.id
         } else {
-          location.href = "/user/add_article_collect/"+id
+          location.href = "/user/add_article_collect/" + that.id
         }
       },
       changeitem(x) {
@@ -271,7 +275,9 @@
       async getDetail() {
         let that = this
         let res = await this.$axios.$post(
-          `/api/kaifawu/get_provider`, { id: that.id }
+          `/api/kaifawu/get_provider`, {
+            id: that.id
+          }
         );
         if (res.data) {
           document.title = `${res.data.title}的技术圈主页-程序员客栈`;
@@ -338,7 +344,7 @@
       configWx() {
         try {
           let conf = this.$store.state.wxConfig;
-          wx.ready(function () {
+          wx.ready(function() {
             //需在用户可能点击分享按钮前就先调用
             wx.config({
               debug: true,
@@ -353,10 +359,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));
               }
             });
@@ -365,13 +371,13 @@
               desc: "通过平台审核、认证,将获得更多接单机会", // 分享描述
               link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
               imgUrl: "https://stacdn.proginn.com/favicon.ico", // 分享图标
-              success: function () {
+              success: function() {
                 // 设置成功
                 alert("微信图标设置成功");
               }
             });
           });
-        } catch ( error ) {
+        } catch (error) {
           // alert(error);
         }
       },
@@ -405,7 +411,11 @@
       },
       //打开视频
       openVideo(item) {
-        const { width, height, video_id } = item
+        const {
+          width,
+          height,
+          video_id
+        } = item
         if (this.mobile) {
           location.href = `proginn://community/video?id=${video_id}`
         } else {
@@ -418,7 +428,9 @@
       },
       /** 跳转到企业主页 **/
       jumpToCompany() {
-        const { uid } = this.info.company_info || {}
+        const {
+          uid
+        } = this.info.company_info || {}
         if (this.$deviceType.app) {
           location.href = `proginn://resume?uid=${uid}&company=1`
         } else {
@@ -441,7 +453,7 @@
           } else {
             return moment().format("YYYY-MM-DD HH:mm")
           }
-        } catch ( e ) {
+        } catch (e) {
           console.log(e)
           return ""
         }

+ 9 - 4
pages/user/new_video_upload.vue

@@ -136,12 +136,17 @@ export default {
         forbidClick: true,
         loadingType: "spinner"
       });
-      this.$axios
-        .$post("/api/jishuquan/create_video", {
+      var pdata = {
           video_id: that.vid,
-          cover_url: that.fileList[0] ? that.fileList[0].url : "",
           title: that.message
-        })
+        }
+      if(that.fileList[0]){
+        pdata.cover_url = that.fileList[0].url
+      }
+      
+       
+      this.$axios
+        .$post("/api/jishuquan/create_video", pdata)
         .then(res => {
           Toast.setDefaultOptions({
             onClose: function() {