Jelajahi Sumber

代码提交

zhuxinbo 5 tahun lalu
induk
melakukan
22a9cb288b

+ 76 - 10
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -44,6 +44,7 @@
                 <a-select-option value="2">暂停</a-select-option>
                 <a-select-option value="3">删除</a-select-option>
                 <a-select-option value="4">修改</a-select-option>
+                <a-select-option value="5">复制</a-select-option>
               </a-select>
               <a-button @click="editStatus" style="margin:0 0 15px 15px" type="primary">确认</a-button>
             </div>
@@ -130,7 +131,22 @@
         </div>
       </div>
     </a-modal>
-
+    <a-modal title="批量复制" v-model="visibleBatch" :width="900">
+      <div style="width:100%;display:flex;margin-bottom:30px">
+        <span style="width:100px">广告计划名称:</span>
+        <a-select style="width:100%" v-model="campaignId" optionFilterProp="children" showSearch
+          :filterOption="filterOption">
+          <a-select-option v-for="item in campaignList" :key="item.value" :value="item.value+''">{{
+            item.label
+          }}</a-select-option>
+        </a-select>
+      </div>
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="handleSubmitBatch" :loading='loading'>
+          确定
+        </a-button>
+      </template>
+    </a-modal>
     <a-modal title="拷贝" v-model="visibleCopy" :width="900">
 
       <div style="width:100%;">
@@ -461,6 +477,7 @@
         visible: false,
         visibleData: null,
         visibleEditAll: false,
+        visibleBatch: false,
         campaignType: '2',
         campaignId: localStorage.getItem('advertisingGroupKey'),
         campaignList: [],
@@ -674,12 +691,15 @@
         }
       },
       checkGroup(e, index) {
-        getAction('/kuaishou/batch/checkUnitName', {
-          campaignId: localStorage.getItem('advertisingGroupKey'),
-          unitName: e.target.value
-        }).then(res => {
-          this.allForm.group[index].unitNameCheck = !res.result
-        })
+        if (e.target.value != '') {
+          getAction('/kuaishou/batch/checkUnitName', {
+            campaignId: localStorage.getItem('advertisingGroupKey'),
+            unitName: e.target.value
+          }).then(res => {
+            this.allForm.group[index].unitNameCheck = !res.result
+          })
+        }
+
       },
       remove(targetKey) {
         let activeKey = this.titleKey
@@ -712,8 +732,21 @@
       },
       copyDetail(item) {
         this.visibleCopy = true
-        this.copyData = item
+
         this.getCampaignList()
+        var params = {}
+        params.accountId = item.accountId
+        params.unitId = item.unitId
+        getAction('/kuaishou/batch/getUnitDetail', params).then(res => {
+          if (res.success) {
+            this.copyData = {
+              ...res.result.baseInfo,
+              ...res.result.appInfo,
+              ...res.result.target
+            }
+          }
+
+        })
         getAction('/kuaishou/batch/getIsActivate', {
           accountId: localStorage.getItem('accountId')
         }).then(res => {
@@ -817,6 +850,9 @@
       editStatus() {
         if (this.allType == '4') {
           this.visibleEditAll = true
+        } else if (this.allType == '5') {
+          this.getCampaignList()
+          this.visibleBatch = true
         } else {
           var params = {}
           params.accountId = localStorage.getItem('accountId')
@@ -959,6 +995,7 @@
       onTabChange(key) {
         this.ipagination.current = 1
         this.titleKey = key
+        this.selectedRowKeys = []
         localStorage.setItem('advertisingGroupKey', key)
         this.getDataList(key)
       },
@@ -997,8 +1034,36 @@
           })
         }
       },
+      handleSubmitBatch(e) {
+        this.loading = true
+        var params = {}
+        params.campaignId = localStorage.getItem('advertisingGroupKey')
+        params.unitIds = this.selectedRowKeysValue
+        params.accountId = localStorage.getItem('accountId')
+        params.copyToCampaignId = this.campaignId
+        postAction('/kuaishou/batch/batchCopyUnit', params).then(res => {
+          console.log(res)
+          if (res.success) {
+            if (res.result.failInfo.length > 0) {
+            //   for (let i = 0; i < res.result.failInfo.length; i++) {
+                this.$message.error("复制广告组出错")
+            //   }
+
+            } else {
+              this.loading = false
+              this.visibleBatch = false
+              this.selectedRowKeys = []
+              this.getDataList(localStorage.getItem('advertisingGroupKey'))
+            }
+          }else{
+             this.$message.error(res.message) 
+          }
+
+        })
+      },
       handleSubmitCopy(e) {
         this.loading = true
+
         var groupArr = this.allForm.group.map(item => {
           return {
             ...item,
@@ -1009,18 +1074,19 @@
             bidType: item.bidType == '1' ? '2' : '6'
           }
         })
-        var params = {                            
+        var params = {
           ...this.copyData,
           groupArr: groupArr,
           type: 'copy',
           copyUnitId: this.copyData.unitId,
-          copyToCampaignId:this.campaignId
+          copyToCampaignId: this.campaignId
         }
         postAction('/kuaishou/batch/createUnit', params).then(res => {
           if (res.success) {
             this.loading = false
             this.visibleCopy = false
             this.getDataList(localStorage.getItem('advertisingGroupKey'))
+            this.campaignId = localStorage.getItem('advertisingGroupKey')
             this.allForm.group = []
           }
         })

File diff ditekan karena terlalu besar
+ 577 - 659
src/views/modules/kuaishouapp/account/copyGroup.vue


+ 13 - 10
src/views/modules/kuaishouapp/account/editGroup.vue

@@ -204,14 +204,14 @@
         :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
       >
         <!-- v-decorator="['speed', { initialValue: '1' }]" -->
-        <a-radio-group buttonStyle="solid" v-decorator="['showMode', { initialValue: '2' }]">
-          <a-radio-button value="2">智能优选</a-radio-button>
-          <a-radio-button value="1">随机轮播</a-radio-button>
+        <a-radio-group buttonStyle="solid" v-decorator="['showMode', { initialValue: 2 }]">
+          <a-radio-button :value="2">智能优选</a-radio-button>
+          <a-radio-button :value="1">随机轮播</a-radio-button>
         </a-radio-group>
         <br />
         <span>
           {{
-            getData('showMode') == '1'
+            getData('showMode') == 1
               ? '广告组包含的广告创意将随机展现'
               : '每一次展现的时候,系统会进行CTR预估,预估CTR高的会得到展现机会'
           }}
@@ -498,12 +498,15 @@ export default {
       }
     },
     checkGroup(e, index) {
-      getAction('/kuaishou/batch/checkUnitName', {
-        campaignId: localStorage.getItem('advertisingGroupKey'),
-        unitName: e.target.value
-      }).then(res => {
-        this.allForm.group[index].unitNameCheck = !res.result
-      })
+        if(e.target.value !=''){
+					getAction('/kuaishou/batch/checkUnitName', {
+						campaignId: localStorage.getItem('advertisingGroupKey'),
+						unitName: e.target.value
+					}).then(res => {
+						this.allForm.group[index].unitNameCheck = !res.result
+					})
+        }
+
     },
     showTip(index) {
       if (this.allForm.group[index].bidType == '1') {

File diff ditekan karena terlalu besar
+ 701 - 749
src/views/modules/kuaishouapp/account/stepForm/Step2.vue


+ 18 - 12
src/views/modules/kuaishouapp/account/stepForm/stepModule/selectRegion.vue

@@ -174,6 +174,7 @@
     mounted() {
       this.$nextTick(() => {
         this.getData().then(() => {
+          console.log(2)
           if (this.dataValue.length > 0) {
             this.checkData = this.dataValue
             this.checkMatched = this.dataValue.map(item => {
@@ -192,18 +193,23 @@
       dataValue: {
         immediate: true, // immediate选项可以开启首次赋值监听
         handler(n, o) {
-          this.getData().then(() => {
-            if (n.length > 0) {
-              this.checkData = n
-              this.checkMatched = n.map(item => {
-                return item.value
-              })
-              this.checkMatchedCity = n.map(item => {
-                return item.value
-              })
-              this.$emit('update:checkData', this.checkData)
-            }
-          })
+            console.log(n)
+          if (n.length > 0) {
+            // this.getData().then(() => {
+            //   console.log(1)
+            //   if (n.length > 0) {
+                this.checkData = n
+                this.checkMatched = n.map(item => {
+                  return item.value
+                })
+                this.checkMatchedCity = n.map(item => {
+                  return item.value
+                })
+                this.$emit('update:checkData', this.checkData)
+            //   }
+            // })
+
+          }
 
         }
       }

+ 7 - 6
src/views/modules/material/scriptMaterial.vue

@@ -283,11 +283,12 @@ a {
           </a-select>
         </a-form-item>
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="演员">
-          <a-select mode="multiple" v-decorator="['actorId', { rules: [{ required: true, message: '请选择演员' }] }]">
+          <!-- <a-select mode="multiple" v-decorator="['actorId', { rules: [{ required: true, message: '请选择演员' }] }]">
             <a-select-option v-for="(item, index) of actorList" :key="index" :value="item.id + ''">{{
               item.name
             }}</a-select-option>
-          </a-select>
+          </a-select> -->
+          <a-input v-decorator="['actorId']" />
         </a-form-item>
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="卖点">
           <a-input v-decorator="['usp', { rules: [{ required: true, message: '请输入卖点' }] }]" />
@@ -567,8 +568,8 @@ a {
         </a-row>
         <a-row v-if="inforDetail.actorId">
           <a-col :span="24"
-            >演员:<span style="margin-right:15px" v-for="item of inforDetail.actorId.split(',')" :key="item">
-              {{ actorName(item) }}
+            >演员:<span style="margin-right:15px">
+              {{ inforDetail.actorId }}
             </span>
           </a-col>
         </a-row>
@@ -1082,7 +1083,7 @@ export default {
       this.id = item.id
       this.$nextTick(() => {
         this.form.setFieldsValue({
-          actorId: item.actorId.split(','),
+          actorId: item.actorId,
           actorRemark: item.actorRemark,
           category: item.category,
           clipRemark: item.clipRemark,
@@ -1106,7 +1107,7 @@ export default {
         } else {
           var params = { ...values }
           params.tag = this.tags.join()
-          params.actorId = params.actorId.join()
+        //   params.actorId = params.actorId.join()
           if (this.add) {
             postAction('/ctop/dramaInfo/add', params).then(res => {
               if (res.success) {

+ 396 - 312
src/views/modules/onlineTraining/onlineTrainingList.vue

@@ -1,28 +1,24 @@
 <style lang="scss" scoped>
-.search-box p {
-  display: inline-block;
-  border: 1px solid #f2f2f2;
-  border-radius: 5px;
-  margin-right: 10px;
-  padding: 5px 10px;
-  cursor: pointer;
-}
-#office-iframe {
-  height: 800px;
-}
+  .search-box p {
+    display: inline-block;
+    border: 1px solid #f2f2f2;
+    border-radius: 5px;
+    margin-right: 10px;
+    padding: 5px 10px;
+    cursor: pointer;
+  }
+
+  #office-iframe {
+    height: 800px;
+  }
 </style>
 <template>
   <a-row :gutter="10">
-      
+
     <a-col :sm="6" style="margin-bottom: 20px;z-index: 10">
       <a-card class="search-box" style="min-height:500px">
-        <a-directory-tree
-          defaultExpandAll
-          @select="onSelect"
-          @expand="onExpand"
-          :loadData="onLoadData"
-          :treeData="treeData"
-        >
+        <a-directory-tree defaultExpandAll @select="onSelect" @expand="onExpand" :loadData="onLoadData"
+          :treeData="treeData">
         </a-directory-tree>
       </a-card>
     </a-col>
@@ -36,6 +32,10 @@
             <a-breadcrumb-item>{{ course.topic }}</a-breadcrumb-item>
           </a-breadcrumb>
           <h3 style="text-align:center">{{ course.name }}</h3>
+          <p v-if="!startList">请使用谷歌浏览器进行视频播放,并开启flash(开启方法:浏览器右上角三个小点-设置-网站设置-flash-每次进行询问勾选打开即可)</p>
+          <br>
+          <p v-if="!startList">flash下载链接:https://www.flash.cn/cdm/latest/flashplayerpp_install_cn.exe</p>
+          <br>
           <p style="text-align:center" v-if="course.creator">作者:{{ course.creator }}</p>
           <br />
           <p>{{ course.intro }}</p>
@@ -48,339 +48,423 @@
 </template>
 
 <script>
-import { getAction } from '@/api/manage'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import moment from 'moment'
-import $ from 'jquery'
-import qs from 'qs'
-// document.write(textDes('https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-20/20网服-1584693978588.mp4'))
-// document.write('<br>' + desDecrypt('s4HMPbmUfZ0=', 'ckplayerDesKey'))
-function textDes(str) {
-  var keyCode = 'ckplayerDesKey'
-  var newText = encodeURI(desEncrypt(str, keyCode))
-  newText = (keyCode == 'ckplayerDesKey' ? 'CK:' : 'CE:') + newText
-  return newText
-}
-function desEncrypt(word, keyCode) {
-  var key = CryptoJS.enc.Utf8.parse(keyCode)
-  var iv = CryptoJS.enc.Utf8.parse(keyCode)
-  var srcs = CryptoJS.enc.Utf8.parse(word)
-  var encrypted = CryptoJS.DES.encrypt(srcs, key, {
-    iv: iv,
-    mode: CryptoJS.mode.ECB
-  })
-  return encrypted.toString()
-}
-function desDecrypt(word, keyCode) {
-  var key = CryptoJS.enc.Utf8.parse(keyCode)
-  var iv = CryptoJS.enc.Utf8.parse(keyCode)
-  var decrypt = CryptoJS.DES.decrypt(word, key, {
-    iv: iv,
-    mode: CryptoJS.mode.ECB
-  })
-  return CryptoJS.enc.Utf8.stringify(decrypt).toString()
-}
+  import {
+    getAction
+  } from '@/api/manage'
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import moment from 'moment'
+  import $ from 'jquery'
+  import qs from 'qs'
+  // document.write(textDes('https://ctop-media.oss-cn-beijing.aliyuncs.com/video/2020-03-20/20网服-1584693978588.mp4'))
+  // document.write('<br>' + desDecrypt('s4HMPbmUfZ0=', 'ckplayerDesKey'))
+  function textDes(str) {
+    var keyCode = 'ckplayerDesKey'
+    var newText = encodeURI(desEncrypt(str, keyCode))
+    newText = (keyCode == 'ckplayerDesKey' ? 'CK:' : 'CE:') + newText
+    return newText
+  }
 
-export default {
-  name: 'online-training-list',
-  mixins: [JeecgListMixin],
-  data() {
-    return {
-      visibleDetail: false,
-      srcList: '',
-      timeList: [
-        { label: '分类1', value: 1, show: true },
-        { label: '分类2', value: 2, show: true },
-        { label: '分类3', value: 3, show: true },
-        { label: '分类4', value: 4, show: true },
-        { label: '分类5', value: 5, show: true },
-        { label: '分类6', value: 6, show: true },
-        { label: '分类7', value: 7, show: true },
-        { label: '分类8', value: 8, show: true }
-      ],
-      treeData: [
-        { title: '巨量引擎', key: '巨量引擎' },
-        { title: '快手大学', key: '快手大学' },
-        { title: '系统操作', key: '系统操作' }
-      ],
-      videoObject: {
-        width: '20%', // 宽度,也可以支持百分比(不过父元素宽度要有)
-        height: 180, // 高度,也可以支持百分比
-        container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
-        variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
-        autoplay: false, //自动播放
-        flashplayer: true, //强制使用flashplayer
-        live: false,
-        debug: true,
-        loadNext: 10,
-        usehardwareeecoder: true, //硬件加速
-        video: textDes() //视频地址(必填)
-      },
-      videoObjectNot: {
-        container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
-        variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
-        autoplay: false,
-        html5m3u8: true,
-        debug: true,
-        video: "" //视频地址
-      },
-      active: 1,
-      data: [
-        {
-          title: '素材库-脚本库视频'
+  function desEncrypt(word, keyCode) {
+    var key = CryptoJS.enc.Utf8.parse(keyCode)
+    var iv = CryptoJS.enc.Utf8.parse(keyCode)
+    var srcs = CryptoJS.enc.Utf8.parse(word)
+    var encrypted = CryptoJS.DES.encrypt(srcs, key, {
+      iv: iv,
+      mode: CryptoJS.mode.ECB
+    })
+    return encrypted.toString()
+  }
+
+  function desDecrypt(word, keyCode) {
+    var key = CryptoJS.enc.Utf8.parse(keyCode)
+    var iv = CryptoJS.enc.Utf8.parse(keyCode)
+    var decrypt = CryptoJS.DES.decrypt(word, key, {
+      iv: iv,
+      mode: CryptoJS.mode.ECB
+    })
+    return CryptoJS.enc.Utf8.stringify(decrypt).toString()
+  }
+
+  export default {
+    name: 'online-training-list',
+    mixins: [JeecgListMixin],
+    data() {
+      return {
+        visibleDetail: false,
+        srcList: '',
+        timeList: [{
+            label: '分类1',
+            value: 1,
+            show: true
+          },
+          {
+            label: '分类2',
+            value: 2,
+            show: true
+          },
+          {
+            label: '分类3',
+            value: 3,
+            show: true
+          },
+          {
+            label: '分类4',
+            value: 4,
+            show: true
+          },
+          {
+            label: '分类5',
+            value: 5,
+            show: true
+          },
+          {
+            label: '分类6',
+            value: 6,
+            show: true
+          },
+          {
+            label: '分类7',
+            value: 7,
+            show: true
+          },
+          {
+            label: '分类8',
+            value: 8,
+            show: true
+          }
+        ],
+        treeData: [{
+            title: '巨量引擎',
+            key: '巨量引擎'
+          },
+          {
+            title: '快手大学',
+            key: '快手大学'
+          },
+          {
+            title: '汇创视频培训',
+            key: '汇创视频培训'
+          }
+        ],
+        videoObject: {
+          width: '20%', // 宽度,也可以支持百分比(不过父元素宽度要有)
+          height: 180, // 高度,也可以支持百分比
+          container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
+          variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
+          autoplay: false, //自动播放
+          flashplayer: true, //强制使用flashplayer
+          live: false,
+          debug: true,
+          loadNext: 10,
+          usehardwareeecoder: true, //硬件加速
+          video: textDes() //视频地址(必填)
         },
-        {
-          title: '素材库-脚本库文档'
+        videoObjectNot: {
+          container: '#videoPlay', //“#”代表容器的ID,“.”或“”代表容器的class
+          variable: 'player', //该属性必需设置,值等于下面的new chplayer()的对象
+          autoplay: false,
+          html5m3u8: true,
+          debug: true,
+          video: "" //视频地址
         },
-        {
-          title: '素材库-视频库操作视频'
+        active: 1,
+        data: [{
+            title: '素材库-脚本库视频'
+          },
+          {
+            title: '素材库-脚本库文档'
+          },
+          {
+            title: '素材库-视频库操作视频'
+          },
+          {
+            title: '素材库-视频库操作文档'
+          }
+        ],
+        url: {
+          list: '/ctop/materialInfo/list'
         },
-        {
-          title: '素材库-视频库操作文档'
-        }
-      ],
-      url: {
-        list: '/ctop/materialInfo/list'
-      },
-      startList: true,
-      simpleMode: false,
-      course: null
-    }
-  },
-  components: {},
-  methods: {
-    onLoadData(treeNode) {
-      console.log(treeNode)
-      return new Promise(resolve => {
-        if (treeNode.eventKey == '巨量引擎') {
-          getAction('/ctop/edu/ocean/lesson').then(res => {
-            if (res.success) {
-              treeNode.dataRef.children = res.result.map(item => {
-                if (item) {
-                  return { title: item, key: item + '@juliang' }
-                }
-              })
-              resolve()
-              this.treeData = [...this.treeData]
-            }
-          })
-        } else if (treeNode.eventKey == '快手大学') {
-          getAction('/ctop/edu/kuaishou/lesson').then(res => {
-            if (res.success) {
-              treeNode.dataRef.children = res.result.map(item => {
-                if (item) {
-                  return { title: item, key: item + '@kuaishou' }
-                }
-              })
-              resolve()
-              this.treeData = [...this.treeData]
-            }
-          })
-        } else if (treeNode.eventKey == '系统操作') {
-           getAction('/ctop/edu/system/lesson').then(res => {
-            if (res.success) {
-              treeNode.dataRef.children = res.result.map(item => {
-                if (item) {
-                  return { title: item, key: item + '@system' }
-                }
-              })
-              resolve()
-              this.treeData = [...this.treeData]
-            }
-          })
-          return
-        } else if (treeNode.eventKey.split('@').length == 2) {
-          var data = treeNode.eventKey.split('@')
-          if (data[1] == 'juliang') {
-            getAction('/ctop/edu/ocean/topic', { title: data[0] }).then(res => {
+        startList: true,
+        simpleMode: false,
+        course: null
+      }
+    },
+    components: {},
+    methods: {
+      onLoadData(treeNode) {
+        console.log(treeNode)
+        return new Promise(resolve => {
+          if (treeNode.eventKey == '巨量引擎') {
+            getAction('/ctop/edu/ocean/lesson').then(res => {
               if (res.success) {
                 treeNode.dataRef.children = res.result.map(item => {
-                  return { title: item, key: item + '@juliang@' + data[0] }
+                  if (item) {
+                    return {
+                      title: item,
+                      key: item + '@juliang'
+                    }
+                  }
                 })
                 resolve()
                 this.treeData = [...this.treeData]
               }
             })
-          } else if(data[1] == 'kuaishou'){
-            getAction('/ctop/edu/kuaishou/topic', { title: data[0] }).then(res => {
+          } else if (treeNode.eventKey == '快手大学') {
+            getAction('/ctop/edu/kuaishou/lesson').then(res => {
               if (res.success) {
                 treeNode.dataRef.children = res.result.map(item => {
-                  return { title: item, key: item + '@kuaishou@' + data[0] }
+                  if (item) {
+                    return {
+                      title: item,
+                      key: item + '@kuaishou'
+                    }
+                  }
                 })
                 resolve()
                 this.treeData = [...this.treeData]
               }
             })
-          }else if(data[1] == 'system'){
-            getAction('/ctop/edu/system/topic', { title: data[0] }).then(res => {
+          } else if (treeNode.eventKey == '汇创视频培训') {
+            getAction('/ctop/edu/system/lesson').then(res => {
               if (res.success) {
                 treeNode.dataRef.children = res.result.map(item => {
-                  return { title: item, key: item + '@system@' + data[0] }
+                  if (item) {
+                    return {
+                      title: item,
+                      key: item + '@system'
+                    }
+                  }
+                })
+                resolve()
+                this.treeData = [...this.treeData]
+              }
+            })
+            return
+          } else if (treeNode.eventKey.split('@').length == 2) {
+            var data = treeNode.eventKey.split('@')
+            if (data[1] == 'juliang') {
+              getAction('/ctop/edu/ocean/topic', {
+                title: data[0]
+              }).then(res => {
+                if (res.success) {
+                  treeNode.dataRef.children = res.result.map(item => {
+                    return {
+                      title: item,
+                      key: item + '@juliang@' + data[0]
+                    }
+                  })
+                  resolve()
+                  this.treeData = [...this.treeData]
+                }
+              })
+            } else if (data[1] == 'kuaishou') {
+              getAction('/ctop/edu/kuaishou/topic', {
+                title: data[0]
+              }).then(res => {
+                if (res.success) {
+                  treeNode.dataRef.children = res.result.map(item => {
+                    return {
+                      title: item,
+                      key: item + '@kuaishou@' + data[0]
+                    }
+                  })
+                  resolve()
+                  this.treeData = [...this.treeData]
+                }
+              })
+            } else if (data[1] == 'system') {
+              getAction('/ctop/edu/system/topic', {
+                title: data[0]
+              }).then(res => {
+                if (res.success) {
+                  treeNode.dataRef.children = res.result.map(item => {
+                    return {
+                      title: item,
+                      key: item + '@system@' + data[0]
+                    }
+                  })
+                  resolve()
+                  this.treeData = [...this.treeData]
+                }
+              })
+            }
+          } else if (treeNode.eventKey.split('@').length == 3) {
+            var data = treeNode.eventKey.split('@')
+            getAction('/ctop/edu/lesson/list', {
+              media: data[1] == 'juliang' ? '巨量引擎' : data[1] == 'kuaishou' ? '快手大学' : '汇创视频培训',
+              title: data[2],
+              topic: data[0]
+            }).then(res => {
+              console.log(res)
+              if (res.success) {
+                treeNode.dataRef.children = res.result.map(item => {
+                  return {
+                    title: item.name,
+                    key: item.id,
+                    isLeaf: true
+                  }
                 })
                 resolve()
                 this.treeData = [...this.treeData]
               }
             })
           }
-        } else if (treeNode.eventKey.split('@').length == 3) {
-          var data = treeNode.eventKey.split('@')
-          getAction('/ctop/edu/lesson/list', {
-            media: data[1] == 'juliang' ? '巨量引擎' :data[1] == 'kuaishou'? '快手大学':'系统操作',
-            title: data[2],
-            topic: data[0]
+        })
+      },
+      onSelect(keys, event) {
+        console.log(keys)
+        if (event.node.isLeaf) {
+          getAction('/ctop/edu/detail', {
+            id: keys[0]
           }).then(res => {
             console.log(res)
             if (res.success) {
-              treeNode.dataRef.children = res.result.map(item => {
-                return { title: item.name, key: item.id, isLeaf: true }
-              })
-              resolve()
-              this.treeData = [...this.treeData]
-            }
-          })
-        }
-      })
-    },
-    onSelect(keys, event) {
-      console.log(keys)
-      if (event.node.isLeaf) {
-        getAction('/ctop/edu/detail', { id: keys[0] }).then(res => {
-          console.log(res)
-          if (res.success) {
-            this.course = res.result
-            if (res.result.fileType == 1) {
-              this.startList = false
-            //   var videoObject = null
-            //   var isChrome = window.navigator.userAgent.indexOf('Chrome') !== -1 //不同的浏览器显示方式不一样, 不是chrome的浏览器需要使用hls.js这个文件
-            //   if (isChrome) {
-            //     videoObject = this.videoObject
-            //   } else {
-            //     videoObject = this.videoObjectNot
-            //   }
-              if (res.result.fileId) {
-                this.videoObject.video = textDes('https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res.result.fileId + '&line=0') 
-                  
-                
+              this.course = res.result
+              if (res.result.fileType == 1) {
+                this.startList = false
+                //   var videoObject = null
+                //   var isChrome = window.navigator.userAgent.indexOf('Chrome') !== -1 //不同的浏览器显示方式不一样, 不是chrome的浏览器需要使用hls.js这个文件
+                //   if (isChrome) {
+                //     videoObject = this.videoObject
+                //   } else {
+                //     videoObject = this.videoObjectNot
+                //   }
+                if (res.result.fileId) {
+                  this.videoObject.video = textDes('https://aweme.snssdk.com/aweme/v1/playwm/?video_id=' + res
+                    .result.fileId + '&line=0')
+
+
+                } else {
+                  this.videoObject.video = textDes(res.result.fileUrl)
+                }
+                console.log(this.videoObject.video)
+
+                let player = new ckplayer(this.videoObject)
+                console.log(player)
               } else {
-                this.videoObject.video = textDes(res.result.fileUrl)
+                this.startList = true
+                getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
+                  fileUrl: decodeURI(res.result.ossFileUrl)
+                }).then(resF => {
+                  console.log(resF)
+                  let r = resF.data
+                  sessionStorage.wpsUrl = r.wpsUrl
+                  sessionStorage.token = r.token
+                  this.openWps(r.wpsUrl, r.token, res.result.fileType)
+                })
               }
-              console.log(this.videoObject.video)
-              
-              let player = new ckplayer(this.videoObject)
-              console.log(player)
-            } else {
-              this.startList = true
-              getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
-                fileUrl: decodeURI(res.result.ossFileUrl)
-              }).then(resF => {
-                console.log(resF)
-                let r = resF.data
-                sessionStorage.wpsUrl = r.wpsUrl
-                sessionStorage.token = r.token
-                this.openWps(r.wpsUrl, r.token, res.result.fileType)
-              })
             }
+          })
+        } else {
+          return
+        }
+      },
+      openWps(url, token, type) {
+        let _this = this
+        console.log(url)
+        const wps = WebOfficeSDK.config({
+          mode: _this.simpleMode ? 'simple' : 'normal',
+          mount: document.querySelector('#iframeData'),
+          wpsUrl: url,
+          commonOptions: {
+            isShowTopArea: false // 隐藏顶部区域(头部和工具栏)
           }
         })
-      } else {
-        return
-      }
-    },
-    openWps(url, token, type) {
-      let _this = this
-      console.log(url)
-      const wps = WebOfficeSDK.config({
-        mode: _this.simpleMode ? 'simple' : 'normal',
-        mount: document.querySelector('#iframeData'),
-        wpsUrl: url,
-        commonOptions: {
-          isShowTopArea: false // 隐藏顶部区域(头部和工具栏)
+        //   2:pdf
+        //   3:ppt
+        wps.setToken({
+          token: token
+        })
+        if (type == 2) {
+          wps.PPTApplication
+        } else if (type == 3) {
+          wps.PDFApplication
+        } else {
+          wps.Application
         }
-      })
-      //   2:pdf
-      //   3:ppt
-      wps.setToken({ token: token })
-      if (type == 2) {
-        wps.PPTApplication
-      } else if (type == 3) {
-        wps.PDFApplication
-      } else {
-        wps.Application
-      }
 
-      wps.iframe.height = '800px'
-    },
-    onExpand() {
-      console.log('Trigger Expand')
-    },
-    getDataSource(page, pageSize) {
-      this.ipagination.current = page
-      this.loadData()
-    },
-    getAdd(checked) {
-      this.active = checked
-      if (checked == 5) {
-        this.data = []
-      } else {
-        this.data = [
-          {
-            title: 'Title 1'
-          },
-          {
-            title: 'Title 2'
-          },
-          {
-            title: 'Title 3'
-          },
-          {
-            title: 'Title 4'
+        wps.iframe.height = '800px'
+      },
+      onExpand() {
+        console.log('Trigger Expand')
+      },
+      getDataSource(page, pageSize) {
+        this.ipagination.current = page
+        this.loadData()
+      },
+      getAdd(checked) {
+        this.active = checked
+        if (checked == 5) {
+          this.data = []
+        } else {
+          this.data = [{
+              title: 'Title 1'
+            },
+            {
+              title: 'Title 2'
+            },
+            {
+              title: 'Title 3'
+            },
+            {
+              title: 'Title 4'
+            }
+          ]
+        }
+      },
+      lookDetail(item) {
+        this.visibleDetail = true
+      },
+      openFile() {
+        getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
+          fileUrl: 'https://ctop-media.oss-cn-beijing.aliyuncs.com/zixingche.docx'
+        }).then(res => {
+          console.log(res.data.wpsUrl)
+          window.open(res.data.wpsUrl, '_blank')
+        })
+      },
+      getDirectory() {
+        getAction('/ctop/edu/kuaishou/lesson').then(res => {
+          console.log(res)
+        })
+        getAction('/ctop/edu/kuaishou/topic', {
+          title: '新代理入门培训'
+        }).then(res => {
+          console.log(res)
+        })
+        getAction('/ctop/edu/ocean/lesson').then(res => {
+          console.log(res)
+        })
+        getAction('/ctop/edu/ocean/topic', {
+          title: '初级认证I类课程'
+        }).then(res => {
+          console.log(res)
+        })
+
+        getAction('/ctop/edu/lesson/list', {
+          media: '快手大学',
+          title: '新代理入门培训',
+          topic: '入门培训'
+        }).then(
+          res => {
+            console.log(res)
           }
-        ]
+        )
       }
     },
-    lookDetail(item) {
-      this.visibleDetail = true
-    },
-    openFile() {
-      getAction('http://www.ljserver.cn:8088/v1/api/file/getViewUrlWebPath', {
-        fileUrl: 'https://ctop-media.oss-cn-beijing.aliyuncs.com/zixingche.docx'
-      }).then(res => {
-        console.log(res.data.wpsUrl)
-        window.open(res.data.wpsUrl, '_blank')
+    mounted() {
+      this.$nextTick(() => {
+        this.videoObject.video = " CK:2OoC8kA6lhNFqCi2uVquDPpnuq9VcRji9nGXe5nqadA6Jey7YFFEP8pE99j58UBbLyb7YN7cpkw="
+
+        let player = new ckplayer(this.videoObject)
+
       })
     },
-    getDirectory() {
-      getAction('/ctop/edu/kuaishou/lesson').then(res => {
-        console.log(res)
-      })
-      getAction('/ctop/edu/kuaishou/topic', { title: '新代理入门培训' }).then(res => {
-        console.log(res)
-      })
-      getAction('/ctop/edu/ocean/lesson').then(res => {
-        console.log(res)
-      })
-      getAction('/ctop/edu/ocean/topic', { title: '初级认证I类课程' }).then(res => {
-        console.log(res)
-      })
-
-      getAction('/ctop/edu/lesson/list', { media: '快手大学', title: '新代理入门培训', topic: '入门培训' }).then(
-        res => {
-          console.log(res)
-        }
-      )
+    created() {
+      // console.log(player)
+      //   /modules/onlineTraining/onlineTrainingList
     }
-  },
-  mounted() {
-    this.$nextTick(() => {
-        this.videoObject.video = " CK:2OoC8kA6lhNFqCi2uVquDPpnuq9VcRji9nGXe5nqadA6Jey7YFFEP8pE99j58UBbLyb7YN7cpkw="
-              
-              let player = new ckplayer(this.videoObject)
-       
-    })
-  },
-  created() {
-    // console.log(player)
-    //   /modules/onlineTraining/onlineTrainingList
   }
-}
-</script>
+</script>

+ 2 - 2
vue.config.js

@@ -65,8 +65,8 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
-        target: 'http://192.168.1.13:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.1.13:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云