浏览代码

保存代码

xgwangman 4 年之前
父节点
当前提交
c16b6df0b3

+ 1 - 1
babel.config.js

@@ -8,6 +8,6 @@ module.exports = {
   ],
   plugins: [
     // 产品发布时候移除
-    ...prodPlugins
+    // ...prodPlugins
   ]
 }

文件差异内容过多而无法显示
+ 0 - 0
qmx_page/css/app.113583d0.css


文件差异内容过多而无法显示
+ 0 - 0
qmx_page/css/app.62553a10.css


+ 1 - 1
qmx_page/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>管理后台</title><link href=/css/app.62553a10.css rel=preload as=style><link href=/css/chunk-vendors.784fa8c1.css rel=preload as=style><link href=/js/app.4098fd74.js rel=preload as=script><link href=/js/chunk-vendors.c098ed88.js rel=preload as=script><link href=/css/chunk-vendors.784fa8c1.css rel=stylesheet><link href=/css/app.62553a10.css rel=stylesheet></head><body><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=loading><div class=spinner><div class=rect1></div><div class=rect2></div><div class=rect3></div><div class=rect4></div><div class=rect5></div></div></div><div id=app></div><script src=/js/chunk-vendors.c098ed88.js></script><script src=/js/app.4098fd74.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>管理后台</title><link href=/css/app.113583d0.css rel=preload as=style><link href=/css/chunk-vendors.784fa8c1.css rel=preload as=style><link href=/js/app.427addc0.js rel=preload as=script><link href=/js/chunk-vendors.c098ed88.js rel=preload as=script><link href=/css/chunk-vendors.784fa8c1.css rel=stylesheet><link href=/css/app.113583d0.css rel=stylesheet></head><body><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=loading><div class=spinner><div class=rect1></div><div class=rect2></div><div class=rect3></div><div class=rect4></div><div class=rect5></div></div></div><div id=app></div><script src=/js/chunk-vendors.c098ed88.js></script><script src=/js/app.427addc0.js></script></body></html>

文件差异内容过多而无法显示
+ 0 - 0
qmx_page/js/app.4098fd74.js


文件差异内容过多而无法显示
+ 0 - 0
qmx_page/js/app.427addc0.js


文件差异内容过多而无法显示
+ 0 - 0
qmx_page/js/chunk-vendors.c098ed88.js


+ 12 - 0
src/assets/css/common.css

@@ -676,4 +676,16 @@ textarea:-ms-input-placeholder {
 .distr-logs .ivu-modal-body textarea:focus {
   outline: none !important;
   border-color: #eee;
+}
+.er-modal .ivu-table .ivu-table-body tr td {
+  height: 48px!important;
+}
+.er-modal .ivu-table .ivu-table-body tr td .ivu-btn {
+  font-size: 22px;
+}
+.er-modal .ivu-table .ivu-table-body tr td .ivu-btn-text:focus {
+  box-shadow: none;
+}
+.er-modal .ivu-table .ivu-table-body tr td .ivu-btn-text:hover {
+  background: none;
 }

二进制
src/assets/images/123.jpg


二进制
src/assets/images/code.png


+ 1 - 1
src/helper.js

@@ -20,7 +20,7 @@ export const config = function (key) {
 
 export const token = function () {
     // return localStorage.getItem(config('ADMIN_TOKEN_NAME'))
-    return 'f994fd9ce7a470680eebaa18ddda74e3'
+    return 'e1d48410b9a24e9dea770d65edcb3c21'
 }
 
 export const serverUrl = function (data = {}) {

+ 5 - 0
src/router.js

@@ -32,6 +32,11 @@ const routes = [
         alias: '/sales/settleList/settleDetail',
         component: () => import('./views/sales/withdrawDetail.vue')
     },
+    {
+        path: '/sales/distribution/poster',
+        name: 'poster',
+        component: () => import('./views/sales/codePoster.vue')
+    },
     {
         path: '/order/orderList/orderDetail',
         name: 'orderDetail',

+ 371 - 0
src/views/sales/codePoster.vue

@@ -0,0 +1,371 @@
+<template>
+  <div class="er-poster">
+    <Card>
+      <div class="er-url">
+        <div class="img-side">
+          <img :src="'data:image/jpg;base64,' + comData.qrLink" alt="">
+        </div>
+        <div class="r-cont">
+          <p>超级订阅产品链接</p>
+          <div class="copy-ipt">
+            <input id="txts"v-model="copyIpt" readonly>
+            <Button slot="append" @click="copy">复制</Button>
+          </div>
+          <Button @click="codeDown">下载二维码</Button>
+        </div>
+      </div>
+    </Card>
+    <Card style="margin-top: 20px">
+      <Tabs value="name1" :animated="false">
+        <TabPane label="海报" name="name1">
+          <div class="conts">
+            <div class="l-bg">
+              <div class="poster-tit">
+                <div class="t-bg">
+                  <h3>海报背景</h3>
+                  <div class="btns">
+                    <Button size="small" icon="ios-arrow-back" @click="moved(1)" :disabled="lDis"></Button>
+                    <Button size="small" icon="ios-arrow-forward" @click="moved(2)" :disabled="rDis" style="margin-left:10px"></Button>
+                  </div>
+                </div>
+                <div class="up-bg">
+                  <div class="l-ben">
+                    <Upload
+                      action="/filemanage/upload"
+                      :on-success="handleSuccess"
+                      :on-exceeded-size="handleExceeded"
+                      :on-error="handleError"
+                      :show-upload-list="false"
+                      :accept="accepted"
+                      :format="formated"
+                      :on-format-error="formatError"
+                      name="transferAccounts"
+                      :data="uploadData"
+                      :max-size="10240"
+                      class="pay-load"
+                    >
+                      <div class="upload-ben">
+                        <Icon type="md-add" size="24"/>
+                        <p>本地上传</p>
+                        <p style="margin-top:20px;color:#ccc">推荐尺寸</p>
+                        <p style="color: #ccc">750*1250px</p>
+                      </div>
+                    </Upload>
+                  </div>
+                  <div class="s-div" v-show="String(imgsData)">
+                    <ul id="slider">
+                      <li v-for="(item, index) in imgsData" :key="index">
+                        <img :src="item" @click="masked(index, item)">
+                        <div class="masks" :class="{'actions':boolIndex == index}"><Icon type="md-checkmark-circle" /></div>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="r-bg">
+              <div class="bg-img" :style="{backgroundImage:'url(' + urls + ')'}">
+                <div class="img-code">
+                  <img :src="'data:image/jpg;base64,' + comData.posterQrLink" alt="">
+                </div>
+              </div>
+              <Button>保存并下载二维码海报</Button>
+            </div>
+          </div>
+        </TabPane>
+      </Tabs>
+    </Card>
+    <!-- 下载二维码弹窗 -->
+    <Modal title="下载二维码" v-model="erShow" class-name="er-modal" :footer-hide="true" :mask-closable="false">
+      <Table border :columns="columns1" :data="logoSize">
+        <template slot-scope="row" slot="action">
+            <Button type="text" icon="ios-cloud-download-outline" @click="downed(row)"></Button>
+        </template>
+      </Table>
+    </Modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      copyIpt: '',
+      urls: '',
+      logoSize: [
+        {id: '1', size: '150*150', scene: '常规尺寸'},
+        {id: '2', size: '256*256', scene: '适合插入文档使用'},
+        {id: '3', size: '512*512', scene: '适合插入PPT使用'},
+        {id: '4', size: '1024*1024', scene: '适合印刷出版物使用'}
+      ],
+      lDis: false,
+      rDis: false,
+      boolIndex: 0,
+      accepted: '.jpg,.png,.jpeg',
+      formated: ['jpg','png','jpeg'],
+      uploadData: {
+        type: 'transferAccounts'
+      },
+      imgsData: [],
+      columns1: [
+        {
+          title: '尺寸',
+          key: 'size',
+          align: 'center'
+        },
+        {
+          title: '使用场景',
+          key: 'scene',
+          width: '170',
+          align: 'center'
+        },
+        {
+          title: '下载',
+          slot: 'action',
+          align: 'center'
+        }
+      ],
+      comData: [],
+      speed: 0,
+      erShow: false
+    }
+  },
+  created() {
+    this.commodity()
+  },
+  methods: {
+    commodity() {
+      this.$request('/sales/partnerList/commodityDetails').data({
+        id: this.$route.query.id
+      }).success((res) => {
+          this.comData = res.data.data
+          this.copyIpt = res.data.data.link
+          this.imgsData = res.data.data.imgUrl.split(',')
+          this.urls = this.imgsData[0]
+      }).post()
+    },
+    masked(index, url) {
+      this.boolIndex = index
+      this.urls = url
+    },
+    handleSuccess(res, file) {// 文件上传成功
+        // this.$Notice.success({title: '上传成功'})
+        this.imgsData.unshift(file.response.url)
+        const arr = []
+        arr.push(file.response.url)
+        this.$request('/sales/partnerList/imgUpload').data({
+          id: this.$route.query.id,
+          imgUrl: String(arr)
+        }).success(() => {
+            this.commodity()
+        }).post()
+    },
+    handleError() {// 文件上传失败
+        this.$Notice.error({title: '上传失败'})
+    },
+    handleExceeded() {// 文件超出指定大小限制
+        this.$Notice.warning({title: '上传文件内存应小于10M'})
+    },
+    formatError() {// 文件格式验证失败
+      this.$Notice.warning({
+        title: '上传文件格式错误',
+        desc: '格式支持',
+        render: h => {
+          return h('span', [
+            '格式仅支持:',
+            h('p', this.accepted)
+          ])
+        }
+      })
+    },
+    moved(num) {
+      const move = document.getElementById('slider')
+      if (num == 1) {
+        this.speed = this.speed - 110
+        move.style.left = this.speed + 'px'
+        if(-move.offsetLeft + 110 >= 330){
+          this.lDis = true
+          this.rDis = false
+        } else {
+          this.lDis = false
+          this.rDis = false
+        }
+      } else {
+        this.speed = this.speed + 110
+        if (move.offsetLeft >= 0) {
+          this.rDis = true
+          this.lDis = false
+        } else {
+          this.rDis = false
+          this.lDis = false
+          move.style.left = this.speed + 'px'
+        }
+      }
+    },
+    copy () {
+      let text = document.getElementById('txts')
+      text.select()
+      document.execCommand('Copy')
+      this.$Message.success({content: '已复制'})
+    },
+    codeDown() {
+      this.erShow = true
+    },
+    downed(row) {
+      location.href = ''
+    }
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.er-poster {
+  /deep/ .ivu-tabs {
+    .ivu-tabs-tab {
+      font-size: 16px;
+    }
+  }
+  .er-url {
+    display: flex;
+    flex-direction: inherit;
+    .img-side {
+      width: 162px;
+      height: 162px;
+      border: 1px solid #eee;
+      img {
+        width: 160px;
+      }
+    }
+    .r-cont {
+      margin-left: 20px;
+      padding-top: 10px;
+      .copy-ipt {
+        input {
+          width: 300px;
+          height: 32px;
+          border: none;
+          border: 1px solid #dcdee2;
+          border-radius: 4px;
+          padding-left: 10px;
+          margin: 20px 10px 20px 0;
+          &:focus {
+              outline: none !important;
+              border-color: #dcdee2;
+          }
+        }
+      }
+    }
+  }
+  .conts {
+    display: flex;
+    margin-top: 35px;
+  }
+  .l-bg {
+    width: 630px;
+    .poster-tit {
+      display: flex;
+      flex-direction: column;
+      .t-bg {
+        display: flex;
+        flex-direction: initial;
+        justify-content: space-between;
+        margin-bottom: 10px;
+        h3 {
+          font-size: 16px;
+          font-weight: 700;
+        }
+      }
+      .up-bg {
+        overflow: hidden;
+        .l-ben {
+          float: left;
+        }
+        .upload-ben {
+          position: relative;
+          width: 100px;
+          height: 160px;
+          border: 1px solid #ededed;
+          background: #eee;
+          padding-top: 24px;
+          text-align: center;
+          margin-right: 10px;
+          cursor: pointer;
+          z-index: 2;
+        }
+        .s-div {
+          overflow: hidden;
+          float: left;
+          position: relative;
+          width: 520px;
+          height: 160px;
+          z-index: 1;
+        }
+        ul {
+          position: absolute;
+          left: 0;
+          display: flex;
+          li {
+            position: relative;
+            margin-right: 10px;
+            img {
+              width: 100px;
+              height: 160px;
+              cursor: pointer;
+            }
+            .masks {
+              display: none;
+              position: absolute;
+              left: 0;
+              top: 0;
+              width: 100%;
+              height: 100%;
+              background: rgba(255,255,255,.3);
+              z-index: 2;
+              /deep/ .ivu-icon {
+                font-size: 24px;
+                position: absolute;
+                left: 50%;
+                top: 50%;
+                margin-left: -12px;
+                margin-top: -12px;
+                z-index: 3;
+              }
+            }
+            .actions {
+              display: block;
+            }
+          }
+        }
+      }
+    }
+  }
+  .r-bg {
+    width: 360px;
+    margin-left: 5%;
+    .bg-img {
+      position: relative;
+      width: 100%;
+      height: 460px;
+      background-repeat: no-repeat;
+      background-size: contain;
+      .img-code {
+        width: 100px;
+        height: 100px;
+        background: #fff;
+        position: absolute;
+        left: 50%;
+        bottom: 50px;
+        margin-left: -40px;
+        img {
+          width: 100px;
+        }
+      }
+    }
+    .ivu-btn {
+      width: 100%;
+      margin-top: 20px;
+      margin-bottom: 30px;
+    }
+  }
+}
+</style>

+ 5 - 0
src/views/sales/commissionList.vue

@@ -155,6 +155,11 @@ export default {
                     key: 'product_name',
                     align: 'center'
                 },
+                {
+                    title: '销售渠道',
+                    key: 'shareType',
+                    align: 'center'
+                },
                 {
                     title: '销售金额',
                     key: 'sale_money',

+ 5 - 2
src/views/sales/distribution.vue

@@ -26,8 +26,8 @@
           >
             <template slot-scope="{ row }" slot="op">
                 <Button size="small" @click.stop="copyLink(row)">复制链接</Button>
-                <Button size="small" @click.stop="copyLink(row)" style="margin:0 20px">二维码</Button>
-                <Button size="small" @click.stop="copyLink(row)">海报</Button>
+                <Button size="small" @click.stop="erCode(row)" style="margin:0 20px">二维码</Button>
+                <Button size="small" @click.stop="poster(row)">海报</Button>
             </template>
           </Table>
           <template slot="options">
@@ -73,6 +73,9 @@
           this.$Message.success({content: '已复制'})
           this.modal1 = false
         }, 700)
+      },
+      erCode(row) {
+        window.open('/sales/distribution/poster?id=' + row.id, '_blank')
       }
     },
     data() {

部分文件因为文件数量过多而无法显示