123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- import App from './App'
- import Vue from 'vue'
- import getOpenId from './apis/utils/init.js'
- //import './assets/font/font.css'
- // #ifdef MP-WEIXIN
-
- // #endif
- getOpenId.init()
- import mixin from './apis/utils/mixin.js'
- Vue.prototype.jphelp = mixin
- //import Vconsole from 'vconsole'
- //import uView from "uview-ui";
- import uView from '@/uni_modules/subpackage'
- Vue.use(uView);
- import {
- newDate,
-
- } from '@/apis/utils'
- Vue.mixin({
- updated: function() {
-
- },
- onReady() {
- },
- onLoad(option) {
- if (option.test == 'test') {
- //let vConsole = new Vconsole()
- }
- var sz=this.jphelp.getInterval()
- if(sz){
- console.log(sz)
-
- console.log("clearIntervalclearIntervalclearIntervalclearInterval")
- sz.forEach(item=>{
- clearInterval(item.id)
- })
- }
- this.jphelp.getIntervalClear()
-
- },
- onShow(){
-
- },
- onShareTimeline(){
- return {
- title: '智泊e家',
- path: '/pages/business/main' ,
- }
- },
- onShareAppMessage(res) {
- if (res.from === 'button') { // 来自页面内分享按钮
- //.log(res.target)
- }
- return {
- title: '智泊e家',
- path: '/pages/business/main'
- }
- },
-
- methods: {
- distanceN(distance){
- if(!distance){
- return ''
- }else if(distance*1000<50){
- return '小于50米'
- }else if(distance<1){
- return (distance*1000).toFixed(2)+'米'
- }else{
- return distance.toFixed(2)+'公里'
- }
- },
- gotoUrl(url,isLogin) {
-
- if(isLogin){
- if(!this.jphelp.getPersonInfo().id){
- uni.showToast({
- title: "当前用户未登录",
- icon: "none"
- })
- return
- }
- }
- // if(url.indexOf('pages/index/lockInfo')>-1){
- // uni.reLaunch({
- // url: "/" + url
- // })
-
- // }else{
-
- // }
- uni.navigateTo({
- url: "/" + url
- })
-
- }
- }
- })
- Vue.config.productionTip = false
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
|