tremble 4 years ago
parent
commit
9aba1be246

+ 14 - 5
src/assets/font/iconfont.css

@@ -1,10 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 961134 */
-  src: url('//at.alicdn.com/t/font_961134_t0kzqzzwvuq.eot');
-  src: url('//at.alicdn.com/t/font_961134_t0kzqzzwvuq.eot?#iefix') format('embedded-opentype'),
-  url('//at.alicdn.com/t/font_961134_t0kzqzzwvuq.woff') format('woff'),
-  url('//at.alicdn.com/t/font_961134_t0kzqzzwvuq.ttf') format('truetype'),
-  url('//at.alicdn.com/t/font_961134_t0kzqzzwvuq.svg#iconfont') format('svg');
+  src: url('//at.alicdn.com/t/font_961134_16afefeun84.eot');
+  src: url('//at.alicdn.com/t/font_961134_16afefeun84.eot?#iefix') format('embedded-opentype'),
+  url('//at.alicdn.com/t/font_961134_16afefeun84.woff2') format('woff2'),
+  url('//at.alicdn.com/t/font_961134_16afefeun84.woff') format('woff'),
+  url('//at.alicdn.com/t/font_961134_16afefeun84.ttf') format('truetype'),
+  url('//at.alicdn.com/t/font_961134_16afefeun84.svg#iconfont') format('svg');
 }
 
 .iconfont {
@@ -29,3 +30,11 @@
 .icon-download:before { content: "\e613"; }
 
 .icon-chongzhi:before { content: "\e609"; font-size: 32px; }
+
+.icon-close:before { content: "\e61a"; }
+
+.icon-correct:before { content: "\e687"; }
+
+.icon-plus:before { content: "\e648"; }
+
+.icon-music:before { content: "\e653"; }

BIN
src/assets/images/icon_mp3.png


+ 161 - 0
src/pages/download/index.vue

@@ -0,0 +1,161 @@
+<!--  -->
+<template>
+<div class='con' v-loading.fullscreen.lock="loading">
+  <div class="h-body">
+     <div class="h-header">
+          <span>场景码:</span>
+          <el-input style="margin-right:10px;" v-model="inpuKey" placeholder="请输入场景码"></el-input>
+          <el-button type="primary" @click="save">下载</el-button>
+    </div>
+  </div>
+</div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+import vcenter from '@/components/vcenter'
+
+export default {
+  // import引入的组件需要注入到对象中才能使用
+  components: {
+    vcenter
+  },
+  data () {
+    // 这里存放数据
+    return {
+      inpuKey: '',
+      loading: false
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {
+    token () {
+      return window.localStorage.getItem('zfb_token')
+    }
+  },
+  // 监控data中的数据变化
+  watch: {
+    activeTagId () {
+      this.refresh()
+    }
+  },
+  // 方法集合
+  methods: {
+
+    save () {
+      if (!this.inpuKey) {
+        return this.$notify.error({
+          title: '错误',
+          message: '请输入场景码'
+        })
+        // https://admin.zhifangbao.com/scene/downloadSceneData?sceneNum=zhZGWVrnO4
+      }
+      this.loading = true
+      this.$http({
+        method: 'get',
+        url: `/scene/downloadSceneData?sceneNum=${this.inpuKey}`,
+        headers: {
+          token: this.token
+        }
+      }).then(res => {
+        this.loading = false
+        if (res.code === 200) {
+          window.open(`/${res.message}`, '_blank')
+        } else {
+          return this.$alert(res.message, '提示', {
+            confirmButtonText: '确定'
+          })
+        }
+      })
+    }
+  }
+
+}
+</script>
+
+<style lang="scss" scoped>
+.con {
+  .d-l {
+    display: inline-block;
+    width: 100%;
+    .zfb-upload {
+      width: 180px;
+      height: 130px;
+      line-height: 130px;
+      overflow: hidden;
+
+      img {
+        width: 178px;
+        height: 128px;
+        border-radius: 6px;
+      }
+
+      &:hover{
+          border-color: #409eff;
+          .v-mask{
+            display: inline-block;
+            width: 178px;
+            height: 128px;
+            border-radius: 6px;
+            background: rgba(0,0,0,0.5);
+          }
+      }
+
+      .el-icon-plus {
+        position: relative;
+        top: -15px;
+        font-size: 20px;
+      }
+    }
+  }
+
+  .h-body {
+    width: 100%;
+    padding: 20px;
+    box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1);
+    border-radius: 3px;
+    background-color: #fff;
+    .h-header{
+      width: 50%;
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      >span{
+        display: inline-block;
+        min-width: 70px;
+      }
+    }
+    .span-tag {
+      display: inline-block;
+      padding-right: 8px;
+      font-size: 18px;
+
+      .t-span {
+        cursor: pointer;
+        padding-right: 3px;
+      }
+
+      .t-active {
+        font-weight: bold;
+      }
+    }
+
+    .c-table {
+      overflow: auto;
+      height: 670px;
+      margin-top: 60px;
+      .o-span {
+        color: #0175dc;
+        cursor: pointer;
+      }
+
+      .p-con {
+        width: 100%;
+        text-align: right;
+        padding: 25px 20px 30px;
+      }
+    }
+  }
+}
+</style>

+ 0 - 0
src/pages/download/style.scss


File diff suppressed because it is too large
+ 747 - 240
src/pages/home/index.vue


+ 7 - 0
src/pages/layout/aside.vue

@@ -78,6 +78,12 @@ const aside = [{
     id: '3-2',
     url: '/recommended'
   }]
+}, {
+  name: '场景下载',
+  id: '4',
+  icon: 'icon-xinxifabu',
+  url: '/download',
+  isShow: false
 }]
 export default {
 
@@ -114,6 +120,7 @@ export default {
     clickNav (item) {
       if (item.id) {
         this.activeIdx = item.id
+        item.url && this.$router.push(item.url)
       } else {
         item.isShow = !item.isShow
       }

+ 0 - 2
src/pages/rental-info/index.vue

@@ -333,7 +333,6 @@ export default {
     token () {
       return window.localStorage.getItem('zfb_token')
     }
-
   },
   // 监控data中的数据变化
   watch: {
@@ -367,7 +366,6 @@ export default {
     },
     upload_success (data) {
       console.log('上传成功')
-
       this.homepic = data.message
     },
     upload_fail (data) {

+ 7 - 1
src/router/index.js

@@ -10,7 +10,7 @@ const router = new Router({
       children: [
         {
           path: '/',
-          name: '首页',
+          name: '企业账号',
           component: () => import('@/pages/home'),
           meta: {index: '1-1'}
         },
@@ -49,6 +49,12 @@ const router = new Router({
           name: '推荐位',
           component: () => import('@/pages/recommended'),
           meta: {index: '3-2'}
+        },
+        {
+          path: '/download',
+          name: '场景下载',
+          component: () => import('@/pages/download'),
+          meta: {index: '4'}
         }
       ]
     },

+ 2 - 1
src/utils/base.js

@@ -149,7 +149,8 @@ const base = {
     email: /^([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/
   },
   defaultTxt: {
-    upload_tips: '支持jpg/png格式,<5M </br>推荐分辨率800*800px'
+    upload_tips: '支持jpg/png格式,<5M <br/>推荐分辨率800*800px',
+    upload_bg_tips: '支持mp3、wmv、<br/>wma格式,<5M '
   }
 }
 export { base }

+ 2 - 2
src/utils/http.js

@@ -3,9 +3,9 @@ import Vue from 'vue'
 import router from '../router'
 
 var isProduction = process.env.NODE_ENV === 'production'
-const serverName = isProduction ? '' : 'https://test.4dage.com/'
+// const serverName = isProduction ? '' : 'http://192.168.0.207:7081/'
 
-// const serverName = isProduction ? '' : 'https://admin.zhifangbao.com/'
+const serverName = isProduction ? '' : 'https://admin.zhifangbao.com/'
 
 const vue = new Vue()