12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import Vue from 'vue'
- import App from './App'
- import store from './store.js'
- import ajax from './common/js/ajax.js'
- import common from './common/js/common.js'
- Vue.prototype.$noMultipleClicks = common.noMultipleClicks;
- Vue.prototype.$store = store
- Vue.prototype.$ajax = ajax(store)
- Vue.prototype.$verified = function() {
- return store.state.userServerInfo.token ? true : false
- }
- Vue.prototype.$scrollViewHeight = function (className) {
- this.$nextTick(() => {
- const query = uni.createSelectorQuery().in(this)
- query.select(className).boundingClientRect()
- query.exec(res => this.scrollViewHeight = res[0].height)
- })
- }
- Vue.prototype.$hideLoading = function() {
- this.$nextTick(() => {
- uni.hideLoading()
- })
- }
- Vue.prototype.$drawHonour = function(ctx, infoArr) {
- ctx.setTextAlign('center')
- ctx.setFontSize(infoArr[0][0])
- ctx.fillText(infoArr[0][1], infoArr[0][2], infoArr[0][3])
- ctx.setFontSize(infoArr[1][0])
- ctx.fillText(infoArr[1][1], infoArr[1][2], infoArr[1][3])
- ctx.setFontSize(infoArr[2][0])
- ctx.fillText(infoArr[2][1], infoArr[2][2], infoArr[2][3])
- ctx.draw()
- }
- import nav from './components/custom-nav.vue'
- import toast from './components/custom-toast.vue'
- import counter from './components/custom-counter.vue'
- import reachBot from './components/custom-reach-bottom.vue'
- import pageToast from './components/toast.vue'
- Vue.component('custom-nav', nav)
- Vue.component('custom-toast', toast)
- Vue.component('custom-counter', counter)
- Vue.component('custom-reach-bottom', reachBot)
- Vue.component('page-toast', pageToast)
- import ToastConfirm from "@/components/toast-confirm.vue"
- Vue.component('toast-confirm', ToastConfirm)
- import * as filters from './common/js/filters.js'
- Object.keys(filters).forEach(e => {
- Vue.filter(e, filters[e])
- })
- Vue.config.productionTip = false
- ;( new Vue( { ...App } ) ).$mount()
|