Commit 208b2164 authored by Davve's avatar Davve

完成前端样式编写

parent f461dd33
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "chenwei"
# Date: 2018/11/20
from utils.base import APIView
from gm_upload.utils.qiniu_tool import QiniuTool
qiniu_video = {
'domain': 'video-static.igengmei.com',
'bucket': 'video',
}
class QiniuToken(APIView):
def get(self, request):
token = QiniuTool.get_token(qiniu_video['bucket'])
return {
'token': token
}
\ No newline at end of file
......@@ -16,9 +16,10 @@ class FileUpload(APIView):
}
def post(self, request):
image_type = self.args_post.get('uploadType')
image = request.FILES.get('file')
data = image.read()
full_image_url = upload(data, img_type=int(self.args_post.get('type'))) + '-w'
full_image_url = upload(data, img_type=int(image_type)) + '-w'
return {
'file_url': full_image_url
}
......@@ -16,6 +16,7 @@ from .account import *
from .search import *
from .tag import *
from .upload import *
from .token import *
urlpatterns = [
# 登陆,注销相关
......@@ -68,6 +69,7 @@ search_urlpatterns = [
common_urlpatterns = [
url(r"^file/upload$", FileUpload.as_view()),
url(r"^get_token/$", QiniuToken.as_view()),
]
urlpatterns += search_urlpatterns
......
......@@ -8,7 +8,9 @@
<title>更美社区后台</title>
</head>
<body>
<script src=<%= BASE_URL %>/tinymce4.7.5/tinymce.min.js></script>
<script src="/static/tinymce4.7.5/tinymce.min.js"></script>
<script src="/static/jquery.min.js"></script>
<script src="/static/webuploader.min.js"></script>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
......
......@@ -47,6 +47,8 @@
"js-cookie": "2.2.0",
"jsonlint": "1.6.3",
"jszip": "3.1.5",
"less": "^3.8.1",
"less-loader": "^4.1.0",
"linq": "^3.1.1",
"mockjs": "1.0.1-beta3",
"normalize.css": "7.0.0",
......@@ -56,6 +58,7 @@
"showdown": "1.8.6",
"simplemde": "1.11.2",
"sortablejs": "1.7.0",
"video.js": "^7.3.0",
"vue": "2.5.17",
"vue-count-to": "1.0.13",
"vue-i18n": "7.3.2",
......@@ -63,6 +66,7 @@
"vue-splitpane": "1.0.2",
"vuedraggable": "^2.16.0",
"vuex": "3.0.1",
"webuploader": "^0.1.8",
"xlsx": "^0.11.16"
},
"devDependencies": {
......
......@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function getToken() {
return request({
url: '/qiniu/upload/token', // 假地址 自行替换
url: '/api/get_token',
method: 'get'
})
}
......@@ -16,3 +16,20 @@ export function OffLineOrOnLine(data) {
data
})
}
export function createRemark(data) {
return request({
url: '/api/topic/create_remark',
method: 'post',
data
})
}
export function fetchTopic(id) {
return request({
url: '/api/topic/detail',
method: 'get',
params: { id }
})
}
import request from '@/utils/request'
export function postVideo(data, headers) {
return request({
url: 'http://upload.qiniu.com/',
method: 'post',
data,
headers
})
}
export function getVideo(url) {
return request({
url: url,
method: 'get',
})
}
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>删除</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="18" height="18"></rect>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="弹框-copy" transform="translate(-521.000000, -270.000000)">
<g id="删除" transform="translate(520.000000, 269.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Mask"></g>
<g id="Group-3" mask="url(#mask-2)">
<g transform="translate(1.000000, 1.000000)">
<polyline id="Fill-3" stroke="#FFFFFF" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round" points="6 11 6 11 6 7"></polyline>
<polyline id="Fill-3" stroke="#FFFFFF" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round" points="10 11 10 11 10 7"></polyline>
<path d="M2.5214615,5.84631348 L2.5214615,13.121582 C2.5214615,14.4267608 3.48236509,15.505352 4.65167236,15.505352 L11.3637043,15.505352 C12.5330943,15.505352 13.4940186,14.4267608 13.4940186,13.121582 L13.4940186,5.84631348" id="Fill-4" stroke="#FFFFFF" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M3.51092529,3.5 L3.51092529,2.375 C3.51092529,1.33946609 4.38148272,0.5 5.45536974,0.5 L10.5583632,0.5 C11.6322502,0.5 12.5028076,1.33946609 12.5028076,2.375 L12.5028076,3.5" id="Rectangle" stroke="#FFFFFF" stroke-width="1" fill="none"></path>
<rect id="Rectangle-36" stroke="none" fill="#FFFFFF" fill-rule="evenodd" x="0" y="3" width="16" height="1" rx="0.5"></rect>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="23px" height="23px" viewBox="0 0 23 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>Group</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="26" height="26"></rect>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="添加" transform="translate(-2.000000, -2.000000)">
<g id="Group">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Mask"></g>
<path d="M14.4967157,13.4289999 L21.4368686,6.48884702 C21.7317102,6.19400543 21.7317102,5.71597277 21.4368686,5.42113119 L21.4368686,5.42113119 L21.4368686,5.42113119 C21.142027,5.1262896 20.6639944,5.1262896 20.3691528,5.42113119 L20.3691528,5.42113119 L13.4289999,12.3612841 L6.48884702,5.42113119 L6.48884702,5.42113119 C6.19400543,5.1262896 5.71597277,5.1262896 5.42113119,5.42113119 L5.42113119,5.42113119 L5.42113119,5.42113119 C5.1262896,5.71597277 5.1262896,6.19400543 5.42113119,6.48884702 L12.3612841,13.4289999 L5.42113119,20.3691528 C5.1262896,20.6639944 5.1262896,21.142027 5.42113119,21.4368686 C5.71597277,21.7317102 6.19400543,21.7317102 6.48884702,21.4368686 L13.4289999,14.4967157 L20.3691528,21.4368686 C20.6639944,21.7317102 21.142027,21.7317102 21.4368686,21.4368686 C21.7317102,21.142027 21.7317102,20.6639944 21.4368686,20.3691528 L14.4967157,13.4289999 Z" id="Combined-Shape" fill="#A5B1C1" mask="url(#mask-2)" transform="translate(13.429000, 13.429000) rotate(45.000000) translate(-13.429000, -13.429000) "></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>选中</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="36.2133947%" y1="-16.6025794%" x2="91.7698264%" y2="81.7196433%" id="linearGradient-1">
<stop stop-color="#95D7F0" offset="0%"></stop>
<stop stop-color="#5CAEDC" offset="100%"></stop>
</linearGradient>
<path d="M35,34 L35,3 C14.3333333,3 4,3 4,3 L35,34 Z" id="path-2"></path>
<filter x="-19.4%" y="-12.9%" width="132.3%" height="132.3%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="-1" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.355476291 0 0 0 0 0.66116085 0 0 0 0 0.832642432 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="选中">
<g id="Path-2">
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
<use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
</g>
<g id="对号" transform="translate(20.000000, 8.000000)" fill="#FFFFFF">
<path d="M10.8930372,0 C7.49174419,2.10902571 5.02393478,4.770471 3.91521514,6.10555167 L1.19942677,3.95367313 L0,4.93184492 L4.69265285,9.75880649 C5.50059331,7.66649763 8.05790819,3.57693195 11.1807923,0.671571043 L10.8936441,0 L10.8930372,0 Z" id="Fill-1"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="37px" height="37px" viewBox="0 0 37 37" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>Group 21</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="36.2133947%" y1="-16.6025794%" x2="91.7698264%" y2="81.7196433%" id="linearGradient-1">
<stop stop-color="#95D7F0" offset="0%"></stop>
<stop stop-color="#5CAEDC" offset="100%"></stop>
</linearGradient>
<path d="M30.9633789,30.7334117 L30.9633789,0 C10.3211263,0 0,0 0,0 L30.9633789,30.7334117 Z" id="path-2"></path>
<filter x="-19.4%" y="-13.0%" width="132.3%" height="132.5%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="-1" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.355476291 0 0 0 0 0.66116085 0 0 0 0 0.832642432 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="机构资料-基础-copy-2" transform="translate(-748.000000, -808.000000)">
<g id="Group-21" transform="translate(752.000000, 810.000000)">
<g id="Path-2">
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
<use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
</g>
<path d="M25.4977343,5.89578638 L25.2812961,5.67933737 C25.0421796,5.44022088 24.6548111,5.44022088 24.4156514,5.67933737 L21.5618624,8.5330831 L18.7768217,5.7477938 C18.5352515,5.50651541 18.144251,5.50651541 17.9028105,5.7477938 L17.6846428,5.96625337 C17.4431158,6.20753175 17.4431158,6.59873761 17.6846428,6.83992952 L20.4696834,9.62522963 L17.66965,12.4253495 C17.4305335,12.664466 17.4305335,13.0520399 17.66965,13.290951 L17.8861314,13.5074324 C18.1251615,13.7465057 18.5126164,13.7465057 18.7516573,13.5074324 L21.5517339,10.7072693 L24.4937282,13.6493069 C24.735039,13.8905744 25.1261584,13.8905744 25.3673071,13.6493069 L25.5858207,13.4309662 C25.8270883,13.1896121 25.8270883,12.7983955 25.5858207,12.5569549 L22.6438264,9.61522005 L25.4976154,6.76134461 C25.7368183,6.52218488 25.7368183,6.13481639 25.4976154,5.8956999 L25.4977343,5.89578638 Z" id="Fill-1" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="30px" viewBox="0 0 48 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>添加视频</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="47" height="28.2"></rect>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="添加视频">
<g id="添加视频解析" transform="translate(0.000000, 1.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Mask"></g>
<g mask="url(#mask-2)" fill="#A5B1C1">
<g transform="translate(2.350000, 1.175000)">
<path d="M1.2613152,16.7601892 L1.2613152,23.9878537 C1.2613152,25.8528508 2.93132664,27.3290397 4.94275673,27.3290397 L30.4711967,27.3290397 C32.482644,27.3290397 34.1526382,25.8528852 34.1526382,23.9878537 L34.1526383,4.54010211 C34.1526383,2.67506614 32.4826373,1.19886723 30.4711968,1.19886723 L18.0999512,1.1988672 C17.6857376,1.1988672 17.3499512,1.53465363 17.3499512,1.9488672 C17.3499512,2.36308076 17.6857376,2.6988672 18.0999512,2.6988672 L30.4711968,2.69886723 C31.6925808,2.69886723 32.6526383,3.54751093 32.6526383,4.54010211 L32.6526382,23.9878537 C32.6526382,24.9804306 31.6925949,25.8290397 30.4711967,25.8290397 L4.94275673,25.8290397 C3.72137942,25.8290397 2.7613152,24.9804011 2.7613152,23.9878537 L2.7613152,16.7601892 C2.7613152,16.3459756 2.42552876,16.0101892 2.0113152,16.0101892 C1.59710164,16.0101892 1.2613152,16.3459756 1.2613152,16.7601892 Z" id="Shape" fill-rule="nonzero"></path>
<path d="M33.7085287,10.8649403 L40.4946226,8.66538756 C40.765893,8.57747954 41.022321,8.61837558 41.218234,8.77025709 C41.4247843,8.93037269 41.55,9.20269408 41.55,9.53078895 L41.55,18.0133967 C41.55,18.3414872 41.4247888,18.613794 41.2182868,18.7738552 C41.0905191,18.8728972 40.9380801,18.9244022 40.771837,18.9244186 C40.6823541,18.9244186 40.5892028,18.9094369 40.494628,18.8787774 L33.6777624,16.6692509 L33.2152608,18.096168 L40.0320901,20.3056827 C40.2747548,20.3843504 40.5238862,20.4244186 40.771911,20.4244186 C41.2688575,20.4243696 41.744916,20.2635224 42.1372479,19.9593975 C42.7216204,19.5064461 43.05,18.7922928 43.05,18.0133967 L43.05,9.53078895 C43.05,8.75190598 42.7216311,8.0377634 42.1372541,7.5847606 C41.5423768,7.12358199 40.7678337,7.00005512 40.0321636,7.23845669 L33.2460271,9.43802326 L33.7085287,10.8649403 Z" id="Shape" fill-rule="nonzero"></path>
<path d="M1.06107178,4.75212402 L11.4385132,4.75212402 L11.4385132,4.75212402 C11.8420411,4.75212402 12.169165,5.079248 12.169165,5.48277588 L12.169165,5.48277588 L12.169165,5.48277588 C12.169165,5.88630376 11.8420411,6.21342773 11.4385132,6.21342773 L1.06107178,6.21342773 L1.06107178,6.21342773 C0.6575439,6.21342773 0.330419922,5.88630376 0.330419922,5.48277588 L0.330419922,5.48277588 L0.330419922,5.48277588 C0.330419922,5.079248 0.6575439,4.75212402 1.06107178,4.75212402 Z" id="Rectangle" fill-rule="evenodd"></path>
<path d="M1.11038818,5.22838135 L11.4878296,5.22838135 L11.4878296,5.22838135 C11.8913575,5.22838135 12.2184814,5.55550533 12.2184814,5.9590332 L12.2184814,5.9590332 L12.2184814,5.9590332 C12.2184814,6.36256108 11.8913575,6.68968506 11.4878296,6.68968506 L1.11038818,6.68968506 L1.11038818,6.68968506 C0.706860306,6.68968506 0.379736328,6.36256108 0.379736328,5.9590332 L0.379736328,5.9590332 L0.379736328,5.9590332 C0.379736328,5.55550533 0.706860306,5.22838135 1.11038818,5.22838135 Z" id="Rectangle" fill-rule="evenodd" transform="translate(6.299109, 5.959033) rotate(-270.000000) translate(-6.299109, -5.959033) "></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>播放</title>
<desc>Created with Sketch.</desc>
<defs>
<circle id="path-1" cx="19" cy="19" r="19"></circle>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="播放">
<g id="Group-4">
<g id="Oval">
<use fill-opacity="0.133095562" fill="#000000" fill-rule="evenodd" xlink:href="#path-1"></use>
<circle stroke-opacity="0.681867074" stroke="#FFFFFF" stroke-width="2" cx="19" cy="19" r="18"></circle>
</g>
<path d="M26.3020122,21.5225192 L17.2520725,26.761958 L17.2520725,26.761958 C16.2961491,27.3153874 15.0725768,26.9891015 14.5191474,26.033178 C14.3428402,25.7286473 14.25,25.3829906 14.25,25.0311054 L14.25,14.5522279 L14.25,14.5522279 C14.25,13.4476584 15.1454305,12.5522279 16.25,12.5522279 C16.6018852,12.5522279 16.9475419,12.6450681 17.2520725,12.8213753 L26.3020122,18.0608141 L26.3020122,18.0608141 C27.2579357,18.6142435 27.5842216,19.8378157 27.0307923,20.7937392 C26.8557052,21.0961622 26.6044353,21.3474322 26.3020122,21.5225192 Z" id="Triangle" fill="#FFFFFF"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
......@@ -35,11 +35,11 @@ export default {
},
thumbnailHeight: {
type: Number,
default: 200
default: 100
},
thumbnailWidth: {
type: Number,
default: 200
default: 100
},
showRemoveLink: {
type: Boolean,
......@@ -53,6 +53,10 @@ export default {
type: Number,
default: 3
},
type: {
type: Number,
default: 99
},
autoProcessQueue: {
type: Boolean,
default: true
......@@ -91,6 +95,7 @@ export default {
const element = document.getElementById(this.id)
const vm = this
this.dropzone = new Dropzone(element, {
type: this.type,
clickable: this.clickable,
thumbnailWidth: this.thumbnailWidth,
thumbnailHeight: this.thumbnailHeight,
......
......@@ -119,7 +119,7 @@ export default {
// 域,上传文件name,触发事件会带上(如果一个页面多个图片上传控件,可以做区分
field: {
type: String,
'default': 'avatar'
'default': 'file'
},
// 原名key,类似于id,触发事件会带上(如果一个页面多个图片上传控件,可以做区分
ki: {
......@@ -805,8 +805,9 @@ export default {
createImgUrl,
withCredentials
} = this,
fmData = new FormData()
fmData = new FormData()
fmData.append(field, data2blob(createImgUrl, mime), field + '.' + imgFormat)
console.log(fmData.get('file'), '00------------------')
// 添加其他参数
if (typeof params === 'object' && params) {
Object.keys(params).forEach((k) => {
......
<template>
<div
class="vc-model"
:class="{show: show}"
@click="click">
<div class="model-box">
<span class="box-close icon-delete-22" v-if="hasClose" @click="close"></span>
<div class="box-title" v-if="title">{{title}}</div>
<div class="box-content">
<slot></slot>
</div>
<div class="box-btn" v-if="hasBtns">
<button class="btn" @click="ok">确定</button>
<button class="btn" @click="cancel">取消</button>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
show: {
type: Boolean,
default: false
},
hasClose: {
type: Boolean,
default: false
},
title: {
type: String,
default: ''
},
hasBtns: {
type: Boolean,
default: false
},
onClick: {
type: Function,
default: () => {}
}
},
beforeDestroy () {
document.body.style.overflow = 'visible'
},
watch: {
show (newValue) {
if (document && document.body) {
if (newValue) {
document.body.style.overflow = 'hidden'
} else {
document.body.style.overflow = 'visible'
}
}
}
},
methods: {
click () {
this.$emit('click')
},
cancel () {
this.$emit('cancel')
},
ok () {
this.$emit('ok')
},
close () {
this.$emit('close')
}
}
}
</script>
<style lang="less">
.vc-model {
display: none;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 10;
background-color: #333;
background-color: rgba(51, 51, 51, .7);
&.show {
display: block;
}
.model-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
padding: 24px 30px;
background-color: #fff;
}
.box-title {
margin-bottom: 40px;
font-size: 20px;
color: #333;
text-align: center;
}
.box-close {
position: absolute;
top: 24px;
right: 30px;
font-size: 22px;
cursor: pointer;
}
.box-btn {
margin-top: 32px;
text-align: right;
.btn {
height: 38px;
padding: 0 21px;
margin-left: 16px;
background: #5CAEDC;
font-size: 14px;
color: #fff;
cursor: pointer;
border-radius: 4px;
}
}
}
</style>
<template lang="html">
<div class="upload-image-wrap" ref="uploadImage">
<div v-if="multiple">
<ul class="upload-image-items" v-if="currImages.length">
<li class="upload-image-item" v-for="(item, inx) in currImages" :disabled="disabled">
<div class="image-inner" v-resize="item"></div>
<div class="image-after" @click.stop="deleteImage(inx)"></div>
</li>
<li class="upload-image-item upload-icon">
<upload-img class="multiple" @upload-img="onUpload" @uploaded="onUploaded" @error="onUploadError">
<slot></slot>
</upload-img>
</li>
</ul>
<div class="upload-icon" v-else>
<upload-img class="multiple" @upload-img="onUpload" @uploaded="onUploaded" @error="onUploadError">
<slot></slot>
</upload-img>
</div>
</div>
<div v-else>
<div class="upload-icon single-upload">
<div class="single-upload-icon" v-resize="currImages">
<span v-if="currImages">修改图片</span>
</div>
<div :class="{ hide: currImages != false }" class="single-upload-body">
<upload-img class="multiple" @upload-img="onSingleUpload" @uploaded="onUploaded" @error="onUploadError">
<slot v-if="currImages == false"></slot>
</upload-img>
</div>
</div>
</div>
</div>
</template>
<script>
// import './webuploader'
import Resize from '@/components/Upload/utils/resizeImage'
import UploadImg from '@/components/Upload/UploadImgBox'
export default {
data () {
return {
inputValue: this.value
}
},
directives: {
Resize
},
props: {
value: {
type: [Array, String]
},
limit: {
type: Number
},
disabled: Boolean,
multiple: Boolean
},
watch: {
value (newVal) {
this.inputValue = newVal
}
},
computed: {
currImages () {
if (this.multiple && Array.isArray(this.inputValue)) {
let images = [...this.inputValue]
return images.length ? images : []
} else {
return this.inputValue || ''
}
}
},
methods: {
// 上传中...
onUpload (res) {
if (!res.data.file_url) return
console.log(this.inputValue)
let content = this.inputValue.length
let limit = Number(this.limit)
if (limit && content >= limit) {
this.$emit('limit', content)
} else {
this.inputValue.push(res.data.file_url)
this.$emit('input', this.inputValue)
}
},
onSingleUpload (res) {
if (!res.data.file_url) return
this.inputValue = res.data.file_url
this.$emit('input', res.data.file_url)
},
// 上传完成
onUploaded (res) {
},
onUploadError (error) {
console.log(error)
},
deleteImage (inx) {
this.inputValue.splice(inx, 1)
this.$emit('input', this.inputValue)
}
},
components: {
UploadImg
}
}
</script>
<style lang="less">
.upload-image-wrap {
display: inline-block;
font-size: 0;
vertical-align: top;
margin-top: -16px;
.upload-image-items {
li {
display: inline-block;
position: relative;
width: 110px;
height: 110px;
border-radius: 3px;
margin-top: 16px;
margin-right: 16px;
vertical-align: top;
&:hover {
.image-after {
display: block;
}
}
.image-inner {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center center;
background-color: #F5FBFF;
border-radius: 4px;
&:after {
content: '';
position: absolute;
top: 0px;
right: 0;
width: 30px;
height: 30px;
background: url('../../assets/image/svg/uploadSuccess.svg') 50% 50% no-repeat;
border-top-right-radius: 4px;
}
}
.image-after {
display: none;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, .5);
border-radius: 4px;
cursor: pointer;
&:after {
content: '';
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 18px;
height: 18px;
background: url('../../assets/image/svg/uploadDelete.svg') 50% 50% no-repeat;
}
}
&[disabled]::before {
position: absolute;
width: 100%;
height: 100%;
content: '';
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(255, 255, 255, 0.5);
z-index: 1;
}
}
}
.upload-icon {
display: inline-block;
width: 110px;
height: 110px;
position: relative;
margin-top: 16px;
}
}
.single-upload-icon {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
overflow: hidden;
span {
display: inline-block;
position: absolute;
left: 0;
bottom: 0;
right: 0;
width: 100%;
line-height: 25px;
color: #fff;
font-size: 14px;
text-align: center;
background-color: rgba(0, 0, 0, .4);
border-radius: 0 0 4px 4px;
}
}
.single-upload-body {
position: relative;
}
.webuploader-container.multiple {
display: inline-block;
overflow: hidden;
font-size: 0;
.webuploader-pick {
width: 110px;
height: 110px ;
padding: 0;
border-radius: 0;
font-size: 12px;
border-radius: 4px;
background-color: #F5FBFF;
border: 1px dashed #E5E5E5;
&:after {
content: '';
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 26px;
height: 26px;
background: url('../../assets/image/svg/uploadIcon.svg') 50% 50% no-repeat;
}
}
.webuploader-pick-hover {
border: 1px dashed #5CAEDC;
}
}
.hide {
.webuploader-pick {
opacity: 0;
}
.webuploader-pick-hover {
border: none;
}
}
</style>
<template>
<div><slot></slot></div>
</template>
<script>
// import '/static/webuploader.min'
import Cookie from 'js-cookie'
// http://git.gengmei.cc/backend/gm-upload/blob/master/gm_upload/consts.py
const UPLOAD_TYPE = '26'
export default {
props: {
uploadType: {
type: String,
default: UPLOAD_TYPE
},
size: {
type: Number,
default: 1 * 1024 * 1024
}
},
mounted () {
let uploader = WebUploader.create({
pick: {
multiple: false,
id: this.$el
},
swf: '/static/Uploader.swf',
server: '/api/file/upload',
accept: {
title: 'Images',
extensions: 'gif,jpg,jpeg,png',
mimeTypes: 'image/gif,image/jpg,image/jpeg,image/png'
},
auto: true,
fileSizeLimit: this.size,
formData: {
'uploadType': this.uploadType,
'csrfmiddlewaretoken': Cookie.get('csrftoken') || ''
}
})
uploader.on('uploadSuccess', (file, res) => {
uploader.reset()
if (res.error === 0) {
this.$emit('upload-img', res)
this.$emit('uploaded', res.data, file)
} else {
this.$emit('error', {type: 'SERVER_ERROR', reason: res.message})
}
})
uploader.on('error', (type) => {
if (type === 'Q_EXCEED_SIZE_LIMIT') {
this.$emit('error', {type: 'EXCEED_SIZE_LIMIT', reason: '图片过大'})
}
})
uploader.on('uploadError', (file, reason) => {
this.$emit('error', {type: 'UP_ERROR', reason})
})
}
}
</script>
......@@ -40,7 +40,7 @@ export default {
type: String,
default: ''
},
type: {
uploadType: {
type: Number,
default: ''
}
......@@ -48,7 +48,7 @@ export default {
data() {
return {
tempUrl: '',
dataObj: { type: this.type }
dataObj: { uploadType: this.uploadType }
}
},
computed: {
......
This diff is collapsed.
import Vue from 'vue'
import { defaultImage } from '@/components/Upload/utils/default'
const getImageSize = function (src) {
return new Promise((resolve, reject) => {
const img = new window.Image()
if (img.complete) {
resolve(img)
}
img.onload = function () {
resolve(img)
}
img.src = src
img.crossOrigin = '*'
img.onerror = function (e) {
reject(e)
}
})
}
const image = {
bind (el, binding) {
},
inserted (el, binding) {
Vue.nextTick(() => {
let style = el.getBoundingClientRect()
let outRatio = style.width / style.height
getImageSize(binding.value).then(res => {
let width = res.width
let height = res.height
let inRatio = width / height > outRatio ? 'height' : 'width'
if (binding.value) {
el.style.backgroundImage = `url(${binding.value})`
}
if (inRatio === 'height') {
el.style.backgroundSize = '100% auto'
} else {
el.style.backgroundSize = 'auto 100%'
}
}).catch(() => {
el.style.backgroundImage = `url(${defaultImage})`
el.style.backgroundSize = '100%'
})
})
},
update (el, binding) {
Vue.nextTick(() => {
let style = el.getBoundingClientRect()
let outRatio = style.width / style.height
getImageSize(binding.value).then(res => {
let width = res.width
let height = res.height
let inRatio = width / height > outRatio ? 'height' : 'width'
if (binding.value) {
el.style.backgroundImage = `url(${binding.value})`
}
if (inRatio === 'height') {
el.style.backgroundSize = '100% auto'
} else {
el.style.backgroundSize = 'auto 100%'
}
}).catch(() => {
el.style.backgroundImage = `url(${defaultImage})`
el.style.backgroundSize = '100%'
})
})
}
}
export default image
<template>
<div class="video-player vjs-custom-skin">
<video class="video-js"></video>
</div>
</template>
<script>
// ref
import videojs from 'video.js'
import 'video.js/dist/video-js.css'
export default {
name: 'video-player',
props: {
options: {
type: Object,
required: true
},
start: {
type: Number,
default: 0
},
playsinline: {
type: Boolean,
default: false
},
customEventName: {
type: String,
default: 'statechanged'
}
},
mounted() {
if (!this.player) {
this.initialize()
}
},
beforeDestroy() {
if (this.player) {
this.dispose()
}
},
methods: {
initialize() {
// init
var self = this
this.player = null
// videojs options
var videoOptions = Object.assign({
autoplay: false,
controls: true,
preload: 'auto',
fluid: false,
muted: false,
width: '100%',
height: '360',
language: 'en',
controlBar: {
remainingTimeDisplay: false,
playToggle: {},
progressControl: {},
fullscreenToggle: {},
volumeMenuButton: {
inline: false,
vertical: true
}
},
techOrder: ['html5'],
plugins: {}
}, this.options)
// check sources
/*
if (!videoOptions.sources || !videoOptions.sources.length) {
console.warn('Missing required option: "sources".')
return false
}
*/
// ios fullscreen
var playsinline = this.playsinline
if (playsinline) {
this.$el.children[0].setAttribute('playsinline', playsinline)
this.$el.children[0].setAttribute('webkit-playsinline', playsinline)
}
// emit event
var emitPlayerState = function(event, value) {
if (event) {
self.$emit(event, self.player)
}
if (value) {
var values = {}
values[event] = value
self.$emit(self.customEventName, values)
}
}
// videoOptions
// console.log(videoOptions)
// avoid error "VIDEOJS: ERROR: Unable to find plugin: __ob__"
if (videoOptions.plugins) {
delete videoOptions.plugins.__ob__
}
this.player = videojs(this.$el.children[0], videoOptions, function() {
// player readied
var _this = this
self.$emit('ready', self.player)
// events
var events = ['loadeddata',
'canplay',
'canplaythrough',
'play',
'pause',
'waiting',
'playing',
'ended',
'error'
]
for (var i = 0; i < events.length; i++) {
(function(event) {
_this.on(event, function() {
emitPlayerState(event, true)
})
})(events[i])
}
this.on('timeupdate', function() {
emitPlayerState('timeupdate', this.currentTime())
})
})
},
dispose() {
if (this.player && videojs) {
if (this.player.techName_ !== 'Flash') {
this.player.pause && this.player.pause()
}
videojs(this.$el.children[0]).dispose()
if (!this.$el.children.length) {
var video = document.createElement('video')
video.className = 'video-js'
this.$el.appendChild(video)
}
this.player = null
}
}
},
watch: {
options: {
deep: true,
handler: function(options, oldOptions) {
this.dispose()
if (options && options.sources && options.sources.length) {
this.initialize()
}
}
}
}
}
</script>
<style lang="less">
.vjs-custom-skin > .video-js {
width: 100%;
font-family: "PingFang SC","Helvetica Neue","Hiragino Sans GB","Segoe UI","Microsoft YaHei","微软雅黑",sans-serif;
}
.video-js.vjs-no-flex .vjs-menu-button-inline,
.vjs-custom-skin > .video-js .vjs-menu-button-inline.vjs-slider-active,
.vjs-custom-skin > .video-js .vjs-menu-button-inline:focus,
.vjs-custom-skin > .video-js .vjs-menu-button-inline:hover {
width: 10em;
}
.vjs-custom-skin > .video-js .vjs-controls-disabled .vjs-big-play-button {
display: none!important;
}
.vjs-custom-skin > .video-js .vjs-control {
width: 3em;
}
.vjs-custom-skin > .video-js .vjs-control.vjs-live-control {
width: auto;
padding-left: 0.5em;
letter-spacing: 0.1em;
}
.vjs-custom-skin > .video-js .vjs-menu-button-inline:before {
width: 1.5em;
}
.vjs-menu-button-inline .vjs-menu {
left: 3em;
}
.video-js.vjs-ended .vjs-big-play-button,
.video-js.vjs-paused .vjs-big-play-button,
.vjs-paused.vjs-has-started.vjs-custom-skin > .video-js .vjs-big-play-button {
display: block;
}
.vjs-custom-skin > .video-js .vjs-load-progress div,
.vjs-seeking .vjs-big-play-button,
.vjs-waiting .vjs-big-play-button {
display: none!important;
}
.vjs-custom-skin > .video-js .vjs-mouse-display:after,
.vjs-custom-skin > .video-js .vjs-play-progress:after {
padding: 0 0.4em 0.3em;
}
.video-js.vjs-ended .vjs-loading-spinner {
display: none;
}
.video-js.vjs-ended .vjs-big-play-button {
display: block !important;
}
.video-js.vjs-ended .vjs-big-play-button,
.video-js.vjs-paused .vjs-big-play-button,
.vjs-paused.vjs-has-started.vjs-custom-skin > .video-js .vjs-big-play-button {
display: block;
}
.vjs-custom-skin > .video-js .vjs-big-play-button {
top: 50%;
left: 50%;
margin-left: -1.5em;
margin-top: -1em;
}
.vjs-custom-skin > .video-js .vjs-big-play-button {
background-color: rgba(0,0,0,0.45);
font-size: 3.5em;
border-radius: 50%;
height: 3em !important;
line-height: 3em !important;
margin-top: -1.5em !important;
}
.video-js:hover .vjs-big-play-button,
.vjs-custom-skin > .video-js .vjs-big-play-button:active,
.vjs-custom-skin > .video-js .vjs-big-play-button:focus {
background-color: rgba(36,131,213,0.9);
}
.vjs-custom-skin > .video-js .vjs-loading-spinner {
border-color: rgba(36,131,213,0.8);
}
.vjs-custom-skin > .video-js .vjs-control-bar2 {
background-color: #000000;
}
.vjs-custom-skin > .video-js .vjs-control-bar {
/*background-color: rgba(0,0,0,0.3) !important;*/
color: #ffffff;
font-size: 14px;
}
.vjs-custom-skin > .video-js .vjs-play-progress,
.vjs-custom-skin > .video-js .vjs-volume-level {
background-color: #2483d5;
}
.vjs-custom-skin > .video-js .vjs-play-progress:before {
top: -0.3em;
}
.vjs-custom-skin > .video-js .vjs-progress-control:hover .vjs-progress-holder {
font-size: 1.3em;
}
.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu {
left: 0;
}
.vjs-custom-skin > .video-js .vjs-menu li {
padding: 0;
line-height: 2em;
font-size: 1.1em;
font-family: "PingFang SC","Helvetica Neue","Hiragino Sans GB","Segoe UI","Microsoft YaHei","微软雅黑",sans-serif;
}
.vjs-custom-skin > .video-js .vjs-mouse-display:after,
.vjs-custom-skin > .video-js .vjs-play-progress:after,
.vjs-custom-skin > .video-js .vjs-time-tooltip {
border-radius: 0;
font-size: 1em;
padding: 0;
width: 3em;
height: 1.5em;
line-height: 1.5em;
top: -3em;
}
.vjs-custom-skin > .video-js .vjs-menu-button-popup .vjs-menu {
width: 5em;
left: -1em;
}
.vjs-custom-skin > .video-js .vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu {
left: 0;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-resolution-button .vjs-menu {
/*order: 4;*/
}
/*排序顺序*/
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-play-control {
order: 0;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-time-control {
min-width: 1em;
padding: 0;
margin: 0 0.1em;
text-align: center;
display: block;
order: 1;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-playback-rate .vjs-playback-rate-value {
font-size: 1.2em;
line-height: 2.4;
}
.vjs-custom-skin > .video-js .vjs-progress-control.vjs-control {
order: 2;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-volume-menu-button {
order: 3;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-resolution-button {
order: 4;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-resolution-button .vjs-resolution-button-label {
display: block;
line-height: 3em;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-playback-rate {
order: 5;
}
.vjs-custom-skin > .video-js .vjs-control-bar .vjs-fullscreen-control {
order: 6;
}
</style>
......@@ -6,17 +6,17 @@
<el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">发布
</el-button>
</sticky>
<div class="createPost-main-container">
<el-row :gutter="20">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>小组相关</span>
</div>
<div >
<el-row>
<el-col :span="24">
<el-form-item style="margin-bottom: 20px;" prop="title">
<el-form-item style="margin-bottom: 20px;" prop="name">
<MDinput v-model="postForm.name" :maxlength="100" name="name" required>
小组名称
</MDinput>
......@@ -41,33 +41,41 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="组员数量:" prop="desc">
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="组员数量:" prop="user_nums">
<el-input v-model="postForm.user_nums" type="number" placeholder="请输入内容" style="width: 230px;" readonly/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-col>
</div>
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="下线小组:">
<el-row>
<el-col :span="8">
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="下线小组:">
<el-radio-group v-model="postForm.is_online">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="推荐小组:">
</el-col>
<el-col :span="8">
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="推荐小组:">
<el-radio-group v-model="postForm.is_recommend">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="小组简介:">
<el-input :rows="1" v-model="postForm.description" type="textarea" class="article-textarea" autosize
placeholder="请输入内容"/>
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span>
</el-form-item>
</el-card>
</el-row>
......@@ -89,34 +97,34 @@
<el-table :data="list" border fit highlight-current-row style="width: 100%"
ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="76" align="center"></el-table-column>
<el-table-column align="center" label="用户ID " width="80">
<el-table-column align="center" label="用户ID " >
<template slot-scope="scope">
<router-link :to="'/push/edit/'+scope.row.id" class="link-type">
<span>{{ scope.row.id }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column width="190px" align="center" label="用户名">
<el-table-column align="center" label="用户名">
<template slot-scope="scope">
<span>{{ scope.row.username }}</span>
</template>
</el-table-column>
<el-table-column width="300px" align="center" label="联系电话">
<el-table-column align="center" label="联系电话">
<template slot-scope="scope">
<span>{{ scope.phone }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="发布帖子数">
<el-table-column align="center" label="发布帖子数">
<template slot-scope="scope">
<span>{{ scope.row.topic_nums }}</span>
</template>
</el-table-column>
<el-table-column width="180px" align="center" label="用户身份">
<el-table-column align="center" label="用户身份">
<template slot-scope="scope">
<span>{{ scope.row.user_identity }}</span>
</template>
</el-table-column>
<el-table-column width="180px" align="center" label="组内身份">
<el-table-column align="center" label="组内身份">
<template slot-scope="scope">
<span>{{ scope.row.internal_identity }}</span>
</template>
......
......@@ -11,8 +11,8 @@
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleOfflineOrOnline('online')">上线</el-button>
</div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column align="center" label="小组ID " width="80">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column align="center" label="小组ID ">
<template slot-scope="scope">
<router-link :to="'/group/edit/'+scope.row.id" class="link-type">
<span>{{ scope.row.id }}</span>
......@@ -20,26 +20,26 @@
</template>
</el-table-column>
<el-table-column width="190px" align="center" label="小组名称">
<el-table-column align="center" label="小组名称">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column width="300px" align="center" label="小组简介">
<el-table-column align="center" label="小组简介">
<template slot-scope="scope">
<span>{{ scope.row.desc }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="明星数">
<el-table-column align="center" label="明星数">
<template slot-scope="scope">
<span>{{ scope.row.star_nums }}</span>
</template>
</el-table-column>
<el-table-column width="80px" align="center" label="用户数">
<el-table-column align="center" label="用户数">
<template slot-scope="scope">
<router-link :to="'/user/edit/'+scope.row.id" class="link-type">
<span>{{ scope.row.user_nums }}</span>
......@@ -47,7 +47,7 @@
</template>
</el-table-column>
<el-table-column width="80px" align="center" label="帖子数">
<el-table-column align="center" label="帖子数">
<template slot-scope="scope">
<router-link :to="'/topic/list/'+scope.row.id" class="link-type">
<span>{{ scope.row.topic_nums }}</span>
......@@ -55,19 +55,19 @@
</template>
</el-table-column>
<el-table-column width="80px" align="center" label="组长">
<el-table-column align="center" label="组长">
<template slot-scope="scope">
<span>{{ scope.row.creator.name }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="下线">
<el-table-column align="center" label="下线">
<template slot-scope="scope">
<el-tag :type="scope.row.is_online | isOnlineFilter">{{ scope.row.is_online==1 ? '是' : '否' }}</el-tag>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="下线">
<el-table-column align="center" label="推荐">
<template slot-scope="scope">
<el-tag :type="scope.row.is_recommend | isOnlineFilter">{{ scope.row.is_recommend==1 ? '是' : '否' }}</el-tag>
</template>
......
......@@ -14,7 +14,7 @@
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleOfflineOrOnline('online')">上线</el-button>
</div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column align="center" label="pickID" width="80">
<template slot-scope="scope">
<router-link :to="'/pick/edit/'+scope.row.id" class="link-type">
......@@ -23,49 +23,49 @@
</template>
</el-table-column>
<el-table-column width="180px" align="center" label="pick名称">
<el-table-column align="center" label="pick名称">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column width="280px" align="center" label="pick简介">
<el-table-column align="center" label="pick简介">
<template slot-scope="scope">
<span>{{ scope.row.desc }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="pick用户">
<el-table-column align="center" label="pick用户">
<template slot-scope="scope">
<span>{{ scope.row.user_nums }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="pick小组数">
<el-table-column align="center" label="pick小组数">
<template slot-scope="scope">
<span>{{ scope.row.pick_group_nums }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="pick属性">
<el-table-column align="center" label="pick属性">
<template slot-scope="scope">
<span>{{ scope.row.pick_type }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="性别">
<el-table-column align="center" label="性别">
<template slot-scope="scope">
<el-tag :type="scope.row.gender | genderFilter">{{scope.row.gender}}</el-tag>
</template>
</el-table-column>
<el-table-column width="130px" align="center" label="地区">
<el-table-column align="center" label="地区">
<template slot-scope="scope">
<span>{{ scope.row.region }}</span>
</template>
</el-table-column>
<el-table-column width="120px" align="center" label="下线">
<el-table-column align="center" label="下线">
<template slot-scope="scope">
<el-tag :type="scope.row.is_online | isOnlineFilter">{{ scope.row.is_online==1 ? '是' : '否' }}</el-tag>
</template>
......
......@@ -73,8 +73,8 @@
<div style="margin-bottom: 20px;">
<el-form-item style="margin-bottom: 40px;" label-width="75px" label="推送头像:" prop="icon">
<span v-model="type"></span>
<Upload v-model="postForm.icon" :type="type"/>
<span v-model="uploadType"></span>
<Upload v-model="postForm.icon" :uploadType="uploadType"/>
</el-form-item>
</div>
</div>
......@@ -138,8 +138,7 @@ export default {
push_time: [{ validator: validateRequire, trigger: 'blur'}],
},
tempRoute: {},
dataObj: { token: 'fahsdfiwqehfkajsdhfjkasdhfkj', key: 'fasdhfkasdhfkjashdfkjhasdfads' },
type: 1 // 图片类型
uploadType: 1 // 图片类型
}
},
computed: {
......
......@@ -9,7 +9,7 @@
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleCreate">创建</el-button>
</div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column align="center" label="推送ID" width="80">
<el-table-column align="center" label="推送ID" >
<template slot-scope="scope">
<router-link :to="'/push/edit/'+scope.row.id" class="link-type">
<span>{{ scope.row.id }}</span>
......@@ -17,31 +17,31 @@
</template>
</el-table-column>
<el-table-column width="240px" align="center" label="推送标题">
<el-table-column align="center" label="推送标题">
<template slot-scope="scope">
<span>{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column width="240px" align="center" label="推送内容">
<el-table-column align="center" label="推送内容">
<template slot-scope="scope">
<span>{{ scope.row.content }}</span>
</template>
</el-table-column>
<el-table-column width="180px" align="center" label="推送时间">
<el-table-column align="center" label="推送时间">
<template slot-scope="scope">
<span>{{ scope.row.push_time }}</span>
</template>
</el-table-column>
<el-table-column width="180px" align="center" label="创建时间">
<el-table-column align="center" label="创建时间">
<template slot-scope="scope">
<span>{{ scope.row.create_time }}</span>
</template>
</el-table-column>
<el-table-column width="139px" align="center" label="创建用户">
<el-table-column align="center" label="创建用户">
<template slot-scope="scope">
<span>{{ scope.row.user.name }}</span>
</template>
......
This diff is collapsed.
......@@ -17,7 +17,7 @@
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleOfflineOrOnline('online')">上线</el-button>
</div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="100" align="center"></el-table-column>
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column align="center" label="明星ID" width="80">
<template slot-scope="scope">
<router-link :to="'/pick/edit/'+scope.row.id" class="link-type">
......@@ -26,25 +26,25 @@
</template>
</el-table-column>
<el-table-column width="240px" align="center" label="明星名称">
<el-table-column align="center" label="明星名称">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column width="150px" align="center" label="性别">
<el-table-column align="center" label="性别">
<template slot-scope="scope">
<el-tag :type="scope.row.gender | genderFilter">{{ scope.row.gender==0 ? '男' : '女' }}</el-tag>
</template>
</el-table-column>
<el-table-column width="200px" align="center" label="地区">
<el-table-column align="center" label="地区">
<template slot-scope="scope">
<span>{{ scope.row.region }}</span>
</template>
</el-table-column>
<el-table-column width="150px" align="center" label="小组数量">
<el-table-column align="center" label="小组数量">
<template slot-scope="scope">
<router-link :to="'/pick/edit/'+scope.row.id" class="link-type">
<span>{{ scope.row.group_counts }}</span>
......@@ -52,7 +52,7 @@
</template>
</el-table-column>
<el-table-column width="140px" align="center" label="下线">
<el-table-column align="center" label="下线">
<template slot-scope="scope">
<el-tag :type="scope.row.is_online | isOnlineFilter">{{ scope.row.is_online==1 ? '是' : '否' }}</el-tag>
</template>
......
......@@ -14,7 +14,7 @@
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleOfflineOrOnline('online')">上线</el-button>
</div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column align="center" label="标签ID" >
<template slot-scope="scope">
<router-link :to="'/tag/edit/'+scope.row.id" class="link-type">
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment