import Vue from 'vue'
import App from './App'
// import './assets/style/border.css'
// import './assets/style/main.css'
import http from './common/axios.js'  

import store from './store'//状态管理

import { 
    getTimeOut,
    timestampToTime,//10位时间戳 转年月日时分秒
    getUrlParam,//获取url上的指定参数
    geeurlcodeObj,//获取url上面的参数 返回对象
    rmspace,//字符串去除所有空格 去除首尾中间的空格
    changefwb,//处理富文本
    setString,//字符串截取指定长度 然后...
    codeobj,//对象合并
    isWeiXin,//判断当前浏览器是不是微信浏览器 返回布尔值
    jiequletft,//截取字符串 往左边截取
    newdate,//获取当前时间戳
    removeByValue,//删除数组中指定的值 指定的元素
    roundFloat,//将小数精确到指定位数
    arrayUnique,//数组去重
    checkCardNo,//验证身份证方法 返回布尔值
    randomString,//生成随机字符串 可以指定长度
    getRandomColor,//生成随机颜色
    checkPwd,//检测密码强度
	checkPhone,
 } from "@/utils/yicode";


//表单组件引入
import textView from './components/textView.vue';
import itemList from './components/itemList.vue';
Vue.component('textView', textView);
Vue.component('itemList', itemList);

/* 全局注册QS-inputs-split组件 */
import QSInput from './components/QS-inputs-split/elements/QS-input/index.vue';
import QSRadio from './components/QS-inputs-split/elements/QS-radio/index.vue';
import QSCheckbox from './components/QS-inputs-split/elements/QS-checkbox/index.vue';
import QSTextarea from './components/QS-inputs-split/elements/QS-textarea/index.vue';
import QSPickerDate from './components/QS-inputs-split/elements/QS-picker-date/index.vue';
import QSPickerCity from './components/QS-inputs-split/elements/QS-picker-city/index.vue';
import QSPickerCustom from './components/QS-inputs-split/elements/QS-picker-custom/index.vue';
import QSPickerCustom2 from './components/QS-inputs-split/elements/QS-picker-custom2/index.vue';
import QSPics from './components/QS-inputs-split/elements/QS-pics/index.vue';
import QSInfinitePics from './components/QS-inputs-split/elements/QS-infinitePics/index.vue';
import QSwitch from './components/QS-inputs-split/elements/QS-switch/index.vue';
Vue.component('QSInput',QSInput);
Vue.component('QSRadio',QSRadio);
Vue.component('QSCheckbox',QSCheckbox);
Vue.component('QSTextarea',QSTextarea);
Vue.component('QSPickerDate',QSPickerDate);
Vue.component('QSPickerCity',QSPickerCity);
Vue.component('QSPickerCustom',QSPickerCustom);
Vue.component('QSPickerCustom2',QSPickerCustom2);
Vue.component('QSPics',QSPics);
Vue.component('QSInfinitePics',QSInfinitePics);
Vue.component('QSwitch',QSwitch);
/*  结束 */
//表单组件引入 end



Vue.config.productionTip = false

App.mpType = 'app' 
//统一提示方便全局修改
const msg = (title,  icon='none',duration=2000, mask=false)=>{
	if(Boolean(title) === false){
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	});
} 
Vue.prototype.$api = {msg, json:{}, http};  

Vue.prototype.$fire = new Vue();//
Vue.prototype.$store = store;//

Vue.prototype.$yicode ={checkPhone,rmspace};

const app = new Vue({
    ...App
})
app.$mount()

