Commit 5f848e35 authored by Joe's avatar Joe

ads type

parent 3391b881
...@@ -50,6 +50,13 @@ ...@@ -50,6 +50,13 @@
<el-input v-model="dynamicValidateForm.clkurl" :disabled="true"></el-input> <el-input v-model="dynamicValidateForm.clkurl" :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="位置">
<template>
<el-radio v-model="radio" label="1">首页</el-radio>
<el-radio v-model="radio" label="2">底部</el-radio>
</template>
</el-form-item>
<el-form-item label="是否立即启用"> <el-form-item label="是否立即启用">
<el-checkbox v-model="dynamicValidateForm.status"></el-checkbox> <el-checkbox v-model="dynamicValidateForm.status"></el-checkbox>
</el-form-item> </el-form-item>
...@@ -81,7 +88,7 @@ ...@@ -81,7 +88,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item prop="max" label="达标场次" > <el-form-item prop="max" label="达标场次">
<el-input v-model="firstWinForm.max" placeholder=""></el-input> <el-input v-model="firstWinForm.max" placeholder=""></el-input>
</el-form-item> </el-form-item>
...@@ -213,11 +220,11 @@ ...@@ -213,11 +220,11 @@
return { return {
rules2: { rules2: {
max: [ max: [
{ validator: checkMax, trigger: 'blur' ,required: true} { validator: checkMax, trigger: 'blur', required: true }
] ]
}, },
ad_switch: true, ad_switch: true,
radio: "x", radio: "1",
loading: true, loading: true,
onValue: true, onValue: true,
offValue: false, offValue: false,
...@@ -404,6 +411,7 @@ ...@@ -404,6 +411,7 @@
this.needRender = false this.needRender = false
this.dialogFormVisible = true; this.dialogFormVisible = true;
this.radio = row.type || "1";
}, },
selectChange: function (val) { selectChange: function (val) {
this.type = val this.type = val
...@@ -544,7 +552,8 @@ ...@@ -544,7 +552,8 @@
clkref: this.dynamicValidateForm.clkref, clkref: this.dynamicValidateForm.clkref,
implurl: this.dynamicValidateForm.implurl, implurl: this.dynamicValidateForm.implurl,
clkurl: this.dynamicValidateForm.clkurl, clkurl: this.dynamicValidateForm.clkurl,
status: this.dynamicValidateForm.status status: this.dynamicValidateForm.status,
type: this.radio
} }
var _this = this; var _this = this;
......
...@@ -136,12 +136,16 @@ ...@@ -136,12 +136,16 @@
</div> </div>
</div> </div>
<Footads></Footads>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Footads from './Footads'
import tb_language from './tb_lang.js' import tb_language from './tb_lang.js'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
...@@ -172,6 +176,9 @@ ...@@ -172,6 +176,9 @@
var deckTable; var deckTable;
export default { export default {
components: {
Footads
},
created: function () { created: function () {
var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220)/i; var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220)/i;
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<el-button type="primary" @click="onSubmit">确认</el-button> <el-button type="primary" @click="onSubmit">确认</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<Footads></Footads>
</div> </div>
</div> </div>
...@@ -67,8 +68,12 @@ ...@@ -67,8 +68,12 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from 'moment' import moment from 'moment'
import tb_language from './tb_lang.js' import tb_language from './tb_lang.js'
import Footads from './Footads'
export default { export default {
components: {
Footads
},
data() { data() {
return { return {
fileList3: [], fileList3: [],
......
<template>
<div class="other">
<footer @click="adClick">
<div class="row" v-bind:style="{ backgroundImage: 'url(' + adObj.src + ')' }">
<div class="col-md-4 col-sm-6 footer-navigation">
<h3><a href="#">{{ adObj.name }} </a></h3>
<p class="links"><a href="#"> {{ adObj.desctext }} </a></p>
<!--<p class="company-name">mycard © 2016 </p>-->
</div>
</div>
</footer>
</div>
</template>
<script>
import img from "../assets/img/image3.png"
import API from '../api'
export default {
data() {
return {
isMobile: false,
msg: 'other!',
img: img,
adObj: {},
}
},
created: function () {
var clientWidth = document.body.clientWidth;
if (clientWidth < 753) {
this.isMobile = true
}
var self = this;
window.onresize = function () {
var clientWidth = document.body.clientWidth;
if (clientWidth < 753) {
self.isMobile = true;
} else {
self.isMobile = false;
}
}
},
mounted: function () {
var _this = this
if (this.isMobile) {
this.width = "100%"
}
API.getAd({ type: 2 }).then((res) => {
if (res.data.data && res.data.data !== "null") {
_this.adObj = res.data.data
if (_this.isMobile) {
_this.adObj.src = _this.adObj.imgm_url
} else {
_this.adObj.src = _this.adObj.imgp_url
}
_this.adImpl()
}
}, (res) => {
console.log(res)
});
},
methods: {
gogo: function (url) {
// window.open(url)
window.location.href = url
},
adClick: function () {
API.adClick({ id: this.adObj.id }).then((res) => {
}, (res) => {
console.log(res)
});
window.open(this.adObj.click_ref, "_blank");
},
adImpl: function () {
API.adImpl({ id: this.adObj.id }).then((res) => {
}, (res) => {
console.log(res)
});
}
},
}
</script>
\ No newline at end of file
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
if (this.isMobile) { if (this.isMobile) {
this.width="100%" this.width="100%"
} }
API.getAd({}).then((res) => { API.getAd({type:1}).then((res) => {
if (res.data.data && res.data.data !== "null") { if (res.data.data && res.data.data !== "null") {
_this.adObj = res.data.data _this.adObj = res.data.data
if (_this.isMobile) { if (_this.isMobile) {
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
} else { } else {
_this.adObj.src = _this.adObj.imgp_url _this.adObj.src = _this.adObj.imgp_url
} }
_this.adImpl();
} }
}, (res) => { }, (res) => {
console.log(res) console.log(res)
......
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
var time = 5000 var time = 5000
var _this = this var _this = this
API.getAd({}).then((res) => { API.getAd({type:1}).then((res) => {
if (res.data.auto_close_ad && res.data.auto_close_ad === "true") { if (res.data.auto_close_ad && res.data.auto_close_ad === "true") {
_this.autoClose = true _this.autoClose = true
} }
......
...@@ -28,18 +28,26 @@ ...@@ -28,18 +28,26 @@
<button type="submit" id="search" class="form-control btn btn-primary">{{lang.search}}</button> <button type="submit" id="search" class="form-control btn btn-primary">{{lang.search}}</button>
</div> </div>
<Footads></Footads>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Footads from './Footads'
import tb_language from './tb_lang.js' import tb_language from './tb_lang.js'
import API from '../api'; import API from '../api';
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
var expTable, ptTable var expTable, ptTable
export default { export default {
components: {
Footads
},
created: function () { created: function () {
var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220)/i; var regex_match = /(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220)/i;
...@@ -178,7 +186,7 @@ ...@@ -178,7 +186,7 @@
"columnDefs": [ "columnDefs": [
{ {
"render": function (data, type, row) { "render": function (data, type, row) {
return "<a href='#/userinfo?username=" + encodeURIComponent(data) + "'>" + data + "</a>"; return "<a href='#/userinfo?username=" + encodeURIComponent(data) + "'>" + data + "</a>";
}, },
"targets": 1 "targets": 1
}, },
......
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
</el-form-item> </el-form-item>
<el-form-item label="一队队员" :label-width="formLabelWidth"> <el-form-item label="一队队员" :label-width="formLabelWidth">
<el-input v-model="form.member1" placeholder="请输入一队队员, 成员请用空格分开" auto-complete="off" width="10px"></el-input> <el-input v-model="form.member1" placeholder="成员请用空格分开" auto-complete="off" width="10px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="二队队员" :label-width="formLabelWidth"> <el-form-item label="二队队员" :label-width="formLabelWidth">
<el-input v-model="form.member2" placeholder="请输入二队队员, 成员请用空格分开" auto-complete="off" width="10px"></el-input> <el-input v-model="form.member2" placeholder="成员请用空格分开" auto-complete="off" width="10px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="比赛日期" :label-width="formLabelWidth"> <el-form-item label="比赛日期" :label-width="formLabelWidth">
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">排表</el-button> <el-button type="primary" @click="onSubmit">排表</el-button>
<el-button type="primary" @click="copy">复制</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -44,17 +45,17 @@ ...@@ -44,17 +45,17 @@
<hr> <hr>
<div style="margin-left: 20%;margin-right: 20%; "> <div ref="print" id="print" style="margin-left: 20%;margin-right: 20%; ">
<!--<p>【胜】VS【负】 </p>--> <!--<p>【胜】VS【负】 </p>-->
<span class="xx"> 比赛: {{form.name1}} VS {{form.name2}}</span> <p class="xx"> 比赛: {{form.name1}} VS {{form.name2}}</p>
<span class="xx"> 时间: {{getDate()}}</span> <p class="xx"> 时间: {{getDate()}}</p>
<span class="xx"> 规则: {{form.rule}}</span> <p class="xx"> 规则: {{form.rule}}</p>
<span class="xx"> 地点: {{form.location}}</span> <p class="xx"> 地点: {{form.location}}</p>
<span class="xx"> ------------第一轮------------</span> <p class="xx"> ------------第一轮------------</p>
<span class="xx" v-for="x in list"> <div class="xx" v-for="x in list" style="width:52%">
{{x.a}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{x.b}} {{x.a}}<span v-for="q in getSpan(x)"> &nbsp;</span> 0:0 <span v-for="q in 3"> &nbsp; </span> {{x.b}}
</span> </div>
<span class="xx"> ------------第二轮------------</span> <p class="xx"> ------------第二轮------------</p>
</div> </div>
<br> <br>
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
<br> <br>
<br> <br>
<Footads></Footads>
</div> </div>
</div> </div>
...@@ -77,7 +79,12 @@ ...@@ -77,7 +79,12 @@
import moment from 'moment' import moment from 'moment'
import tb_language from './tb_lang.js' import tb_language from './tb_lang.js'
import Footads from './Footads'
export default { export default {
components: {
Footads
},
data() { data() {
return { return {
fileList3: [], fileList3: [],
...@@ -128,10 +135,67 @@ ...@@ -128,10 +135,67 @@
lang: 'getLang', lang: 'getLang',
user: 'getUser' user: 'getUser'
}), }),
maxlength() {
var maxlength = 0;
for (var i = 0; i < this.list.length; i++) {
var x = this.list[i];
var l1 = x.a.length;
var l2 = x.b.length;
if (l1 > maxlength) {
maxlength = l1;
}
if (l2 > maxlength) {
maxlength = l2;
}
}
return maxlength;
}
}, },
methods: { methods: {
getSpan(x) {
return this.maxlength - x.a.length + 3;
},
copy() {
var copytext = "比赛: " + this.form.name1 + " VS " + this.form.name2 + "\r\n";
copytext += "时间: " + this.getDate() + "\r\n";
copytext += "规则: " + this.form.rule + "\r\n";
copytext += "地点: " + this.form.location + "\r\n";
copytext += "------------第一轮------------" + "\r\n";
var maxlength = this.maxlength;
for (var i = 0; i < this.list.length; i++) {
var x = this.list[i];
copytext += x.a;
var diff = (maxlength - x.a.length) * 3
for (var j = 0; j < diff + 6; j++) {
copytext += " "
}
copytext += "0:0";
for (var j = 0; j < 6; j++) {
copytext += " "
}
copytext += x.b + "\r\n"
}
copytext += "------------第二轮------------" + "\r\n";
var _this = this;
this.$copyText(copytext).then(function (e) {
_this.$notify({
message: '复制成功!',
type: 'success'
})
}, function (e) {
console.log(e)
})
},
getDate() { getDate() {
if (!this.form.date) { if (!this.form.date) {
return ""; return "";
...@@ -208,11 +272,9 @@ ...@@ -208,11 +272,9 @@
</script> </script>
<style scoped> <style scoped>
.xx {
.xx { margin-top: 0px;
margin-top: 0px; margin-bottom: 0px;
margin-bottom: 0px; display: block;
display: block; }
}
</style> </style>
\ No newline at end of file
...@@ -8,6 +8,10 @@ import store from './store' ...@@ -8,6 +8,10 @@ import store from './store'
import Element from 'element-ui' import Element from 'element-ui'
import 'element-ui/lib/theme-default/index.css' import 'element-ui/lib/theme-default/index.css'
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
Vue.use(Element) Vue.use(Element)
Vue.use(VueX) Vue.use(VueX)
......
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