lixin-web
Version:
vue and bootstrap
114 lines (92 loc) • 3.64 kB
JavaScript
import Vue from 'vue'
import Will,{isDesktopScreen,hasWebP,getPath,async$VM} from './util/Will'
import {util} from './vuex'
import '../less/lottery/lottery.less'
import '../css/_gaga_temp/lottery_bg.css'
import '../css/_gaga_temp/lottery_logo_bg.css'
import 'animate.css/source/bouncing_entrances/bounceIn.css'
import 'animate.css/source/fading_exits/fadeOutRight.css'
import 'animate.css/source/fading_exits/fadeOut.css'
// import 'jquery.easing'
import 'bootstrap/js/tooltip'
import 'bootstrap/js/popover'
import store from '../store'
import {
CheckboxGroup,
Dropdown,DropdownMenu,DropdownItem,
} from 'element-ui'
Vue.use(CheckboxGroup)
Vue.use(Dropdown)
Vue.use(DropdownItem)
Vue.use(DropdownMenu)
// Vue.use(InputNumber)
// Vue.use(Slider)
import '../css/element-theme/dropdown.css'
import '../css/element-theme/dropdown-item.css'
import '../css/element-theme/dropdown-menu.css'
AppData.init()
// import '../css/element-theme/input-number.css'
// import '../css/element-theme/slider.css'
window.BootstrapDialog = require('../module/ref/bootstrap-dialog');
// import 'bootstrap-table/dist/bootstrap-table'
import '../module/ref/bootstrap-table'
import 'bootstrap-table/dist/locale/bootstrap-table-zh-CN'
// import 'x-editable/dist/bootstrap3-editable/js/bootstrap-editable'
import '../module/ref/bootstrap-editable'
// x-editable bootstrap-editable.css has extra bootstrap-datepicker
import '!style!css?minimize!postcss!../css/bootstrap-editable.css'
import 'bootstrap-table/src/extensions/editable/bootstrap-table-editable'
$.fn.editableform.buttons = '<button type="submit" class="btn btn-primary btn-sm editable-submit"><i class="fa fa-check"></i></button><button type="button" class="btn btn-default btn-sm editable-cancel"><i class="fa fa-remove"></i></button>'
import '../module/ref/bootstrap-daterangepicker'
import '!style!css?minimize!postcss!bootstrap-daterangepicker/daterangepicker.css'
// window.noUiSlider = require('./plugins/nouislider')
// import 'nouislider/src/nouislider.css'
//拉取最新公告
let latestNoticeID;
const noticeKey = $vmBar.username + '_latestNoticeID'
const getNotice = () => {
Will.ajax({}, '/api/system/list-notice?content=false')
// import('../module/modalNotice.json')
.done(function (data) {
if (latestNoticeID !== data[0].id && Number(localStorage[noticeKey]) !== data[0].id ){
latestNoticeID = data[0].id
Will.info(data[0].title,
[function () {
localStorage[noticeKey] = latestNoticeID
},false],
{
layout:'topRight',
animation: {
open : 'animated bounceInRight',
close : 'animated bounceOutRight'
},
closeWith:['button'],
})
}
})
setTimeout(getNotice,15000)
}
import LottoNav from '../component/lottery/lottoNav'
import OpenTime from '../component/lottery/OpenTime'
import BetBtns from '../component/lottery/BetBtns'
new Vue({el:'.lottery-nav',render: h => h(LottoNav),store})
new Vue({el:'.lottery-open-time',render: h => h(OpenTime)})
async$VM('lottery/Launch','.lottery-launch')
hasWebP()
.then(() => {
util.checkWebP = true
async$VM('lottery/Orientation','.lottery-orien',{store})
})
.catch(() => {
util.checkWebP = false
async$VM('lottery/Orientation','.lottery-orien',{store})
})
getNotice()
const buildBetBtns = () => {
new Vue({
el:'.lottery-bet-btns',
render: h => h(BetBtns),
store
})
}
window.buildBetBtns = buildBetBtns