Commit 53c3dab6 by tangjiale

初始化项目

parents
/node_modules/
.nuxt/
dist/
\ No newline at end of file
<!--
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-01-11 09:17:27
* @LastEditors: tangjiale
* @LastEditTime: 2022-01-11 09:24:22
-->
<template>
<div>
<van-nav-bar :title="title" v-if="!isWechat" :fixed="fixed" left-arrow @click-left="onClickLeft"/>
</div>
</template>
<script>
export default {
name:'t-head',
props:{
title:String,
fixed:{
type:Boolean,
default:true
}
},
methods:{
onClickLeft(){
this.$router.back()
},
},
computed:{
isWechat() {
return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1;
}
}
}
</script>
<style>
</style>
\ No newline at end of file
{
"env": "dev",
"baseUrl": "https://test.xiaobentiyu.cn"
}
{
"env": "pro",
"baseUrl": "https://mobileapi.xiaobentiyu.cn"
}
import Vue from 'vue';
// import supplierService from "../service/supplier";
export default function ({redirect, route, store}) {
if (!store.state.myUserInfo) { // 处理没登录的情况
// let cache = localStorage.getItem('supplierUserInfo');
// if (cache) {
// let myUserInfo = JSON.parse(cache);
// store.commit('updateUserInfo', myUserInfo);
// return Promise.resolve();
// } else {
// if (route.name === 'home')
// return redirect('/login/');
// }
}
}
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-01-10 15:06:45
* @LastEditors: tangjiale
* @LastEditTime: 2022-08-01 17:10:07
*/
const envMap = {
'dev': {
NODE_ENV: 'development',
ENV_CONFIG: 'dev'
},
'pro': {
NODE_ENV: 'production',
ENV_CONFIG: 'pro'
}
}
const envValue = process.env.ENV_CONFIG;
const env = envMap[envValue]
const Timestamp = new Date().getTime() //随机时间戳
module.exports = {
mode: 'spa',
head: {
meta: [{charset: 'utf-8'},
{
name: 'viewport',
content: 'width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'
},
{name: 'applicable-device', content: 'mobile'},
],
script: [ {src: 'https://res.wx.qq.com/open/js/jweixin-1.6.0.js'}]
},
router: {
base: '',
middleware: ['auth']
},
plugins: [
'~/plugins/framework-install'
],
css: [
'@/static/css/icon-font.css',
'~/plugins/index.less',
],
loadingIndicator: {
name: 'chasing-dots',
color: '#FF9B4D'
},
server: {
host: '0.0.0.0'
},
build: {
babel: {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-proposal-class-properties',
[
'@babel/plugin-transform-runtime',
{
'helpers': false,
'regenerator': true
}
],
['@babel/syntax-dynamic-import']
]
},
postcss: [
require('postcss-px2rem')({
remUnit: 37.5
}),
require('autoprefixer')
],
transpile: [/.+/],
extend (config, ctx) {
config.output.filename = `js/[name].${Timestamp}.js` // 每次构建打包时给文件名加上时间戳,保证版本更新时与上版本文件名不一样
config.output.chunkFilename = `js/[name].${Timestamp}.js`
}
},
generate: {
routes: null,
fallback: false
},
env: {
...env
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "pinbar-h5",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "cross-env ENV_CONFIG=dev nuxt -o --profile",
"dev-prod": "cross-env ENV_CONFIG=pro nuxt -o --profile",
"build": "nuxt build",
"generate": "cross-env ENV_CONFIG=dev nuxt generate",
"generate-prod": "cross-env ENV_CONFIG=pro nuxt generate",
"start": "nuxt start"
},
"repository": {
"type": "git",
"url": "https://e.coding.net/huizi/pinba/pinbar-h5.git"
},
"author": "liangdonghui",
"license": "ISC",
"dependencies": {
"@vant/area-data": "^1.2.1",
"autoprefixer": "9.8.5",
"cross-env": "^5.2.0",
"axios": "0.21.1",
"less": "4.1.1",
"less-loader": "6.1.1",
"lib-flexible": "0.3.2",
"nuxt": "2.15.7",
"postcss-loader": "3.0.0",
"postcss-px2rem": "0.3.0",
"vant": "2.12.24"
}
}
<!--
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-08-01 17:06:37
* @LastEditors: tangjiale
* @LastEditTime: 2022-08-02 09:13:55
-->
<template>
<!-- 常见问题 -->
<div class="page-bg">
<van-tabs v-model="active" sticky line-width="43" line-height="5">
<van-tab title="用户身份">
<div class="content-text">
<div class="text-q">1.注册的时候,提示已存在妈妈/爸爸身份怎么处理?</div>
<div class="text-a">请先确定之前是否已使用其他手机号码注册,如果没有,客服后台解绑(删除)账号后,重新注册即可</div>
<div class="text-q">2. 学生、教师注册提示“当前信息与学校系统内信息不符”?</div>
<div class="text-a">请确定家长、教师注册填写信息是否与人人通系统同步信息一致;学生校验信息包括学校名称、班级名称、姓名、性别;教师校验信息包括学校名称、姓名、性别。如果不一致,请联系老师在长沙市中小学人人通云平台进行修改,修改完成后,智慧体育平台自动实现同步更新。</div>
<div class="text-q">3.我有多个孩子,如何添加多个孩子家长身份?/添加多个身份后,怎么切换身份打卡?</div>
<div class="text-a">若您已注册一个孩子家长身份,其他孩子身份可于“我的—添加/切换身份”—“添加身份”进行其他孩子家长身份添加。如需切换,可“我的—添加/切换身份”—在身份列表点击需要切换的身份即可</div>
<div class="text-q">4. 注册/添加身份时提示“您选择的家长关系与已绑定其他孩子家长关系不一致”?</div>
<div class="text-a">若您有多个孩子,所有注册的家长身份必须保持一致,如您已注册孩子家长身份选择为妈妈,其他新添加孩子也需注册为妈妈身份。</div>
<div class="text-q">5. 孩子是新转入这所学校或已经从小学升为初中,登录成功后显示原来学校,新学校学生身份如何添加?</div>
<div class="text-a">若新学校已添加学生身份,家长可自行于“我的—添加/切换身份”—“添加身份”进行新学校学生身份添加;原有学校学生信息家长也可自行选择左滑删除即可。</div>
<div class="text-q">6. 我已注册成功,但是孩子的信息与实际不一致要如何修改?</div>
<div class="text-a">点击“我的”—查看个人资料,核对孩子的学校和班级信息是否与实际就读学校一致,如果不一致,可点击“我的—添加/切换身份”—“添加身份”进行新的身份添加,原来的身份信息家长可自行选择左滑删除即可。</div>
<div class="text-q">7. 我是家长,同时又在学校任教/教育局任职,或者我也想参加每日的运动打卡,与孩子一起锻炼,增进亲子交流,怎么添加多个身份?</div>
<div class="text-a">如在教育局任职,可点击“我的—添加/切换身份”—“添加身份”,搜索任职的机构,输入姓名、性别通过验证即可完成身份添加;同一个账号支持多个身份的添加,即你可以添加多个孩子身份;同时你也是家长身份,可以参与每日的运动锻炼,与孩子进行家庭亲子PK;也可添加教师身份和机构职员身份或俱乐部身份(教育局身份和俱乐部身份不可同时添加),如需切换不同的身份打卡,点击“我的—添加/切换身份”—点击需要切换的身份即可。</div>
<div class="text-a">如需添加游客身份,可点击“我的—添加/切换身份”—“添加身份”,选择“游客”身份进行添加。</div>
</div>
</van-tab>
<van-tab title="运动打卡">
<div class="content-text">
<div class="text-q">1.学生已打卡,为什么显示未完成?</div>
<div class="text-a">请先核对学生是否注册成功,核对方法:小程序-【运动】页顶部是否显示孩子就读学校,【我的】页中个人资料是否显示孩子就读学校和班级,如果均与孩子就读学校班级不一致,请重新添加身份:点击“我的—添加/切换身份”—“添加身份”进行新的身份添加,原来的身份信息家长可自行选择左滑删除即可。
如果注册成功,仍显示未完成,请核对是否完成每日运动要求,比如每日跳绳3分钟,需每日跳绳3分钟才视为完成。</div>
<div class="text-q">2.如何查询学生打卡记录、怎么统计每个班级的记录?</div>
<div class="text-a">家长/学生用户,小奔运动小程序端,【运动】页,可点击相关活动进入查看完成情况,也可点击每项运动的累计记录查看每日完成情况</div>
<div class="text-q">3. 如果我参加多个活动,需要每次都单独进入不同的活动点击参与吗?每天的运动数据怎么记入活动数据?</div>
<div class="text-a">若参加A活动的任务是每日完成跳绳1分钟/组*3组,同时参加B活动的任务是每日完成跳绳1分钟/组*3组,仰卧起坐1分钟/组*3组,跳绳打卡时只需要点击【运动】页“跳绳”或点击任意活动的打卡入口,完成跳绳打卡即可,训练数据会同步至所有参加的活动,自动计算是否完成任务。如今日完成跳绳1分钟/组*3组,则A活动视为已完成,B活动的跳绳任务也是已完成。</div>
<div class="text-q">4.跳绳只能用你们的智能跳绳打卡吗?</div>
<div class="text-a">小程序跳绳打卡支持普通跳绳和智能跳绳2种方式,如果您家里已有普通跳绳,点击【运动】-“跳绳”,选择“普通跳绳模式”-自由跳/计时跳,训练完成后输入跳绳训练成绩即可。如果需要购买智能跳绳,请关注“小奔运动”公众号,点击底部菜单“购买跳绳”即可购买。智能跳绳个人龙虎榜仅支持使用智能跳绳参与。</div>
</div>
</van-tab>
<van-tab title="智能跳绳">
<div class="content-text">
<div class="text-q">1.智能跳绳产品类型</div>
<div class="text-a">
<img class="shop-img" src="https://cdn.xiaobentiyu.cn/sport_minapp_img/mine/znts.png" alt="">
</div>
<div class="text-q">2.打卡必须使用智能跳绳吗?</div>
<div class="text-a">打卡支持普通跳绳和智能跳绳,智能跳绳可以根据需求自愿购买</div>
<div class="text-q">3.蓝牙连接不上?</div>
<div class="text-a">
<div>正确操作:</div>
<div>① 安卓手机打开手机蓝牙+定位;苹果手机打开手机蓝牙</div>
<div>② 一代跳绳长按智能跳绳电源键3秒,待白色指示灯亮起闪烁;二代跳绳长按智能跳绳电源键2秒,待屏幕亮起即可。</div>
<div>③ 打开小程序,点击“智能跳绳”,选择跳绳模式,点击连接;连接成功后页面显示“跳绳已连接”,点击“开始”即可开始跳绳锻炼;</div>
<div>④ 若按以上操作未连接成功,长按3秒关闭智能跳绳,关闭小程序,再重复至第2、3步操作再次依次进行连接;</div>
<div>⑤ 如果还是连接不上,请在小程序列表左滑删除小程序,重新搜索进入</div>
</div>
<div class="text-a">
<div>问题排查:</div>
<div>安卓手机,如提示请打开手机蓝牙,需检查蓝牙是否打开;如提示未搜索到设备,请检查蓝牙和定位是否打开;如仍无法搜索,请重复上述2-3步操作;</div>
<div>苹果手机,如提示请打开手机蓝牙,请检查蓝牙是否开启,同时检查手机【设置】—微信—蓝牙是否开启;如提示未搜索到设备,请重复上述2-3步操作。</div>
</div>
<div class="text-q">4.一代智能跳绳怎么充电?</div>
<div class="text-a">一代智能跳绳有主手柄和副手柄,底部开关图标的为主手柄,从底部缺口处揭开即可使用配套的数据线进行充电,充电时指示灯长亮,屏幕中4个0代表充电进度,电池充满后,进度条熄灭,指示灯(红灯)长亮。(收到货请充电后再使用)</div>
<div class="text-q">5.二代智能跳绳怎么安装电池</div>
<div class="text-a">二代智能跳绳有主手柄和副手柄,握住带屏幕的主手柄,企鹅头朝下,顺时针拧开后盖,取出弹簧,将两节7号电池正极朝下放入手柄内;再将弹簧压住负极,逆时针拧紧后盖即可。</div>
<div class="text-q">6.跳绳打结怎么解决?</div>
<div class="text-a">① 检查绳子的长度是都合适,因为过长会导致绳子的运行速度和跳绳频率不一致,出现打结的情况。</div>
<div class="text-a">② 检查跳绳的把手位置,是否跳绳在把手处打结位置不能顺畅旋转,影响跳绳随动的效果,导致绳子打结。</div>
<div class="text-a">③ 绳子与地面的接触过多导致,如果跳绳的时候,让绳子和地面结果多,速度不够快的话,会导致绳子慢慢的开始打卷。</div>
<div class="text-a">④ 跳绳的方法不对,起跳的频率过慢,而跳绳的跟随频率不一致,也会导致跳绳打结。</div>
</div>
</van-tab>
</van-tabs>
<!-- <img class="kf_image" src="https://cdn.xiaobentiyu.cn/sport_minapp_img/index/service.png" alt=""> -->
</div>
</template>
<script>
export default {
head(){
return{
title:'常见问题'
}
},
data(){
return{
active:0
}
}
}
</script>
<style lang="less" scoped>
.page-bg{
min-height: 100vh;
width: 100%;
background-color: #f5f5f5;
}
/deep/ .van-tab--active{
font-size: 16px !important;
font-weight: bold !important;
}
/deep/ .van-tabs__line{
background-color: #FF9B4D !important;
border-radius: 12px !important;
}
.content-text{
margin-top: 10px;
border-radius: 12px 12px 0px 0px;
padding: 20px 15px 20px 15px;
padding-bottom: 20px;
background-color: #fff;
.text-q{
font-size: 17px;
color: #353535;
text-align: left;
font-weight: 600;
margin-bottom: 10px;
}
.text-a{
margin-bottom: 15px;
font-size: 15px;
color: #888888;
margin-top: 20rpx;
text-align: justify;
}
.shop-img{
width: 100%;
height: 188px;
}
}
.kf_image{
position: fixed;
right: 10px;
bottom: 40px;
z-index: 9999;
width: 127px;
height: 64px;
}
</style>
\ No newline at end of file
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-01-10 15:05:17
* @LastEditors: tangjiale
* @LastEditTime: 2022-08-01 16:57:04
*/
import Vue from 'vue';
import framework from './framework';
import 'lib-flexible/flexible';
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);
let config = require(`@/config/${process.env.ENV_CONFIG||'pro'}.config.json`);
Vue.prototype.$config = config
// 注册组件
import tHead from '@/components/common/t-head.vue'
Vue.component(tHead.name, tHead)
export default ({store, route, redirect}) => {
Vue.use(framework, {
config: {
baseUrl: config.baseUrl
},
hooks: {
resolveHttpSuccess: (res, options) => {
if(res.code == 200){
return res.data && res.data.data || res.data;
}else if(res.code === 401){ //登录失效
}else {
return Promise.reject(res)
}
},
catchHttpError: err => {
return Promise.reject(err);
},
beforeHttp: options => {
let userInfo = store.state.myUserInfo;
if (userInfo) {
options.headers = {
...options.headers || {},
'x-client-appid': 1,
'x-client-ticket': userInfo.ticket || ''
};
}
return options;
},
showLoading: text => {
window._loading = Vue.prototype.$toast.loading({
message: text,duration:0,
forbidClick: true,
});
},
hideLoading: () => {
window._loading && window._loading.close();
},
toastError: text => {
Vue.prototype.$toast(text);
}
}
});
}
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-02-10 15:24:49
* @LastEditors: tangjiale
* @LastEditTime: 2022-02-16 12:13:34
*/
const BEANS = {}; // 存放所有的bean
export default class Bean {
constructor ($ctx) {
this.$ctx = $ctx;
}
injectClass (o, pageCtx) { // 注入service类
const services = o.services || [];
const service = {};
services.forEach(v => {
service[ v ] = this.makeBean(v);
});
pageCtx && services.length && (pageCtx.$service = service);
return service;
}
makeBean (v) {
let service = BEANS[ v ];
if (!service) {
let serviceClass = require(`@/services/${v}`).default;
service = new serviceClass(this.$ctx);
BEANS[ v ] = service;
service.init && service.init();
}
return service;
}
}
class Context {
constructor() {}
}
const context = new Context()
export default context
class EventBus {
constructor () {
this.listeners = {};
}
$on (type, callback, scope) {
let args = [];
let numOfArgs = arguments.length;
for (let i = 0; i < numOfArgs; i++) {
args.push(arguments[ i ]);
}
args = args.length > 3 ? args.splice(3, args.length - 1) : [];
if (typeof this.listeners[ type ] != 'undefined') {
this.listeners[ type ].push({scope: scope, callback: callback, args: args});
} else {
this.listeners[ type ] = [ {scope: scope, callback: callback, args: args} ];
}
}
$un (type, callback, scope) {
if (typeof this.listeners[ type ] != 'undefined') {
let numOfCallbacks = this.listeners[ type ].length;
let newArray = [];
for (let i = 0; i < numOfCallbacks; i++) {
let listener = this.listeners[ type ][ i ];
if (listener.scope === scope && listener.callback === callback) {
} else {
newArray.push(listener);
}
}
this.listeners[ type ] = newArray;
}
}
$fire (type, target) {
let event = {
type: type,
target: target
};
let args = [];
let numOfArgs = arguments.length;
for (let i = 0; i < numOfArgs; i++) {
args.push(arguments[ i ]);
}
args = args.length > 2 ? args.splice(2, args.length - 1) : [];
args = [ event ].concat(args);
if (typeof this.listeners[ type ] != 'undefined') {
let listeners = this.listeners[ type ].slice();
let numOfCallbacks = listeners.length;
for (let i = 0; i < numOfCallbacks; i++) {
let listener = listeners[ i ];
if (listener && listener.callback) {
let concatArgs = args.concat(listener.args);
if (concatArgs[ 0 ]) {
concatArgs[ 0 ] = concatArgs[ 0 ].target;
}
listener.callback.apply(listener.scope, concatArgs);
}
}
}
}
}
const event = new EventBus();
export default event;
\ No newline at end of file
const flatHooks = function(configHooks, hooks, parentName) {
for (const key in configHooks) {
const subHook = configHooks[ key ];
const name = parentName ? `${parentName}:${key}` : key;
if (typeof subHook === 'object' && subHook !== null) {
flatHooks(subHook, hooks, name);
} else {
hooks[ name ] = subHook;
}
}
return hooks;
};
const serial = function(tasks, fn) {
return tasks.reduce(function(promise, task) {
return promise.then(function(previous) {
return fn(task, previous);
});
}, Promise.resolve(null));
};
class Hook {
constructor () {
this._hooks = {};
}
ready () {
this.on = this.on.bind(this);
this.callHook = this.callHook.bind(this);
}
on (name, fn) {
if (!name || typeof fn !== 'function') {
return;
}
this._hooks[ name ] = this._hooks[ name ] || [];
this._hooks[ name ].push(fn);
}
addHooks (configHooks) {
const hooks = flatHooks(configHooks);
for (const key in hooks) {
this.on(key, hooks[ key ]);
}
}
callHook (name, ...args) {
if (!this._hooks[ name ]) {
return;
}
return serial(this._hooks[ name ], (fn) => fn(...args)).catch((err) => {
if (name !== 'error') {
this.callHook('error', err);
}
});
}
clearHook (name) {
if (name) {
delete this._hooks[ name ];
}
}
clearHooks () {
this._hooks = {};
}
}
const hook = new Hook();
export default hook;
\ No newline at end of file
import axios from 'axios';
import util from '@/plugins/framework/utils/tools'
const DATASOURCE_CACHE = new Map();
const LOCK_PROMISE = {};
const CONTENT_TYPE_MAP = {
'json': 'application/json',
'form': 'application/x-www-form-urlencoded'
};
export default class Service {
constructor ($ctx) {
this.$ctx = $ctx;
}
/**
* 请求之前的处理
*/
sendBefore (options) {
if(options.data){
//过滤对象null/undefined/''/[]/{}的属性值
options.data = util.clearDeep(options.data)
}
if (LOCK_PROMISE[ options.lock ]) {
return LOCK_PROMISE[ options.lock ];
}
/**
* 支持内存缓存
*/
if (!options.hasUpdateCache && options.cacheKey && DATASOURCE_CACHE.has(options.cacheKey)) {
return Promise.resolve(DATASOURCE_CACHE.get(options.cacheKey));
}
}
// 真正的发送请求
sendTo (options) {
options.loadingText && this.$ctx.showLoading && this.$ctx.showLoading(options.loadingText);
options.contentType = options.contentType || 'json';
if (!this.instance) {
this.instance = axios.create({
baseURL: this.$ctx.$config.baseUrl
});
}
let o = {
url: options.url,
method: options.method,
timeout: options.timeout || 5000,
headers: {
...options.headers || {},
'content-type': CONTENT_TYPE_MAP[ options.contentType || 'json'.toLowerCase() ]
}
};
if (options.downloadFile || options.playAudio) { // 下载文件
o.responseType = 'blob';
}
if(options.uuid){
Object.assign(options.data,{
uuid:util.getClientID()
})
}
if (options.method === 'get') {
o.params = options.data;
} else {
if (options.contentType === 'form') {
let form = new FormData();
let keys = Object.keys(options.data);
keys.forEach(key => {
form.append(key, options.data[ key ]);
});
o.data = form;
} else {
o.data = options.data;
}
}
if (options.uploadFiles) { // 上传文件
let form = new FormData();
options.uploadFiles.forEach(v => {
form.append(v.name, v.file);
});
o.data = form;
o.headers[ 'content-type' ] = 'multipart/form-data';
}
if (this.$ctx.beforeHttp) {
o = this.$ctx.beforeHttp(o);
}
return this.instance(o).then(res => {
options.loadingText && this.$ctx.hideLoading && this.$ctx.hideLoading();
return this.$ctx.resolveHttpSuccess(res.data, options, o);
}).catch(err => {
options.loadingText && this.$ctx.hideLoading && this.$ctx.hideLoading();
let defaultCatch = e => {
if (options.isToastError !== false) { // 除非明确指出不需要弹toast,否则接口失败默认弹出toast
if (e.message && e.message.includes('timeout')) {
e.message = '网络请求超时';
}
this.$ctx.toastError(e.message || e.Message || '网络请求失败');
}
return Promise.reject(err);
};
if (this.$ctx.catchHttpError) {
return this.$ctx.catchHttpError(err).catch(e => {
return defaultCatch(e);
});
} else {
return defaultCatch(err);
}
});
}
/**
* 处理结果
*/
handlerRes (res, options) {
if (options.cacheKey && !DATASOURCE_CACHE.has(options.cacheKey)) {
DATASOURCE_CACHE.set(options.cacheKey, res);
}
options.lock && delete LOCK_PROMISE[ options.lock ];
return res;
}
/**
* 处理请求Error
*/
handlerError (error, options) {
options.cacheKey && DATASOURCE_CACHE.delete(options.cacheKey);
options.lock && delete LOCK_PROMISE[ options.lock ];
return Promise.reject(error);
}
/**
* 请求之后处理
*/
sendAfter (options) {
const _sendTo = options => {
let promise = this.sendTo(options);
if (options.lock) {
LOCK_PROMISE[ options.lock ] = promise;
}
return promise;
};
return _sendTo(options);
}
get (options) {
options.method = 'get';
return this.send(options);
}
post (options) {
options.method = 'post';
return this.send(options);
}
put (options) {
options.method = 'put';
return this.send(options);
}
delete (options) {
options.method = 'delete';
return this.send(options);
}
/**
* 请求
*/
send (options) {
let result = this.sendBefore(options);
if (!result) {
return this.sendAfter(options).then(res => {
return this.handlerRes(res, options);
}).catch(error => {
return this.handlerError(error, options);
});
}
return result;
}
}
import Context from './core/context'; // 应用上下文,在vue文件和service对象内可通过this.$ctx获取所有功能
import bean from './core/bean'; // bean管理器
import Service from './core/service'; // 用于发送请求和处理model层逻辑
import * as Utils from './utils'; // 工具类
import Event from './core/event'; // 事件通知
import Hook from './core/hook'; // 钩子
const Bean = new bean(Context);
const proto = {
$utils: Utils,
$bean: Bean,
$em: Event,
$hook: Hook
};
Object.assign(Context, proto); // 把各种功能赋予context实例
export default {
install: function(vue, options) {
Context.showLoading = options.showLoading;
Context.hideLoading = options.hideLoading;
Context.toastError = options.toastError;
Context.beforeHttp = options.beforeHttp;
Context.$config = options.config;
Context.resolveHttpSuccess = options.resolveHttpSuccess;
Context.catchHttpError = options.catchHttpError;
Object.assign(vue.prototype, proto); // 把各种功能赋予vue实例
Context.doInit = function() { // context初始化,暂时没啥做的
if (!Context._initPromise) {
Context._initPromise = Promise.resolve();
}
return Context._initPromise;
};
vue.prototype.$ctx = Context;
vue.mixin(require('./mixins/event').default);
vue.mixin(require('./mixins/create').default);
vue.mixin(require('./mixins/user-info').default);
}
};
export {
Context,
Utils,
Bean,
Service,
Event
};
Object.assign(window, {
Context,
Utils,
Bean,
Service,
Event
});
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-02-10 15:24:49
* @LastEditors: tangjiale
* @LastEditTime: 2022-02-16 12:13:36
*/
import {
Bean
} from '../';
export default {
beforeCreate () {
Bean.injectClass(this.$options, this); // 注入service
}
};
import {
Context
} from '../';
export default {
mounted () {
let {
events
} = this.$options;
if (events) {
Object.keys(events).forEach(v => {
Context.$em.$on(v, this[ events[ v ] ]);
});
}
},
destroyed () {
let {
events
} = this.$options;
if (events) {
Object.keys(events).forEach(v => {
Context.$em.$un(v, this[ events[ v ] ]);
});
}
}
};
export default {
computed: {
myUserInfo() {
return this.$store.state.myUserInfo
},
historyRoute() {
return this.$store.state.historyRoute
}
}
}
const hasOwn = Object.prototype.hasOwnProperty;
const getProto = Object.getPrototypeOf;
const toString = Object.prototype.toString;
const nativeIsArray = Array.isArray;
const fnToString = hasOwn.toString;
const ObjectFunctionString = fnToString.call(Object);
const isPlainObject = (obj) => {
var proto, Ctor;
if (!obj || toString.call(obj) !== "[object Object]") {
return false;
}
proto = getProto(obj);
if (!proto) {
return true;
}
Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
}
const isArray = nativeIsArray || function(obj) {
return toString.call(obj) === '[object Array]'
}
const isObject = function(obj) {
var type = typeof obj
return type === 'function' || type === 'object' && !!obj;
}
const isBoolean = function(obj) {
return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
}
const isEmptyObject = function(obj) {
for (const name in obj) {
return false;
}
return true;
}
const isEmptyValue = function(obj) {
if (isEmpty(obj)) return true;
for (const name in obj) {
if (obj[name] !== undefined) return false;
}
return true;
}
const isEmpty = function(obj) {
if (isObject(obj)) return isEmptyObject(obj);
return obj === undefined || obj === null || obj === '';
}
const apply = (o, c) => {
if (o && c && typeof c == 'object') {
for (var p in c) {
var v = c[p];
if (hasOwn.call(o, p) || v !== undefined) {
o[p] = v;
}
}
}
return o;
}
const applyVal = (o, c) => {
if (o && c && typeof c == 'object') {
for (var p in o) {
var v = o[p];
if (!v) {
o[p] = c[p];
}
}
}
return o;
}
const applyAll = (o, c) => {
if (o && c && typeof c == 'object') {
for (var p in c) {
var v = c[p];
if (isObject(v)) {
if (isObject(o[p])) {
applyAll(o[p], v);
} else {
o[p] = v;
}
} else if (o.hasOwnProperty(p) || v !== undefined) {
o[p] = v;
}
}
}
return o;
}
const applyIf = function(o, c) {
if (o && c) {
for (var p in c) {
if (o[p] === undefined && c[p] !== undefined) {
o[p] = c[p];
}
}
}
return o;
}
const copy = function() {
let args = Array.prototype.slice.call(arguments)
let obj = {};
args.forEach(v => {
obj = apply(obj, v || {})
})
return obj
}
const copyValid = function() {
let args = Array.prototype.slice.call(arguments)
let obj = {};
args.forEach(v => {
obj = _copySingleValid(obj, v || {})
})
return obj
}
const _copySingleValid = (t, s) => {
if (isObject(s)) {
for (var f in s) {
let firstChar = f.charAt(0);
if (/^[a-zA-Z]+$/.test(firstChar)) {
t[f] = s[f]
}
}
}
return t;
}
const _is = {};
['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'].forEach(v => {
_is['is' + v] = function(obj) {
let s = toString.call(obj);
let t = '[object ' + v + ']'
if (v === 'Function') {
return s === t || s === '[object AsyncFunction]'
}
return s === t;
}
})
const pathJoin = function() {
let args = Array.prototype.slice.call(arguments);
let path = '';
if (args.length) {
path = args[0];
function hasChar(str, index) {
var indexChar = str.charAt(index);
return indexChar == "/";
}
for (var i = 1; i < args.length; i++) {
let v = args[i];
if (v && typeof v === 'string') {
let lastIndex = v.length - 1;
v = hasChar(v, lastIndex) ? v.substring(0, lastIndex - 1) : v;
path += hasChar(v, 0) ? v : '/' + v;
}
}
}
return path
}
const toParams = (params) => {
let param = ""
for (const name in params) {
if (typeof params[name] != 'function') {
param += "&" + name + "=" + encodeURI(params[name])
}
}
return param.substring(1)
}
/**
*
* 转成Array
*
* @param str
* @param split
* @returns {Array}
*/
const toArray = (str, split) => {
return _is.isString(str) ?
isJson(str) ? JSON.parse(str) : str.split(split || /,|\\*|;|#/) :
isArray(str) ? str : [];
}
const toField = (str, data, thiv) => {
return str.replace(/(?:\$\{([^{}]+)\})/gi,
function(f) {
f = f.replace(/\$|\{|\}/gi, '');
return toValue(data, f, thiv);
});
}
const toValue = (d, f, thiv) => {
d = d || {};
var sf = f.split(":");
var s = sf[0].split(".");
var p = s[0];
var v = d[p];
if (v && isObject(v)) {
for (var j = 1; j < s.length; ++j) {
v = v[s[j]];
}
}
return v != undefined ? v : "";
}
const result = function(e, t) {
if (null == e) return null;
var r = _is.isFunction(t) ? t.call(e, e) : e[t];
return _is.isFunction(r) ? r.call(e) : r;
}
const isJson = function(str) {
return typeof str === 'string' && /(?:^\{|^\[)/gi.test(str);
}
const getClassName = function(o) {
if (o && o.constructor) {
let s = o.toString();
let arrs = s.match(/class\s*(\w+)/);
if (arrs && arrs.length == 2) {
return arrs[1];
}
}
return undefined;
}
const isEqual = function(t, s) {
return t == s || isObject(t) && isObject(s) ? JSON.stringify(t) === JSON.stringify(s) : t === s;
}
function assignKey(to, from, key) {
const val = from[key];
const hasKey = hasOwn.call(to, key);
if (hasKey) {
return;
}
if (!hasKey || !isObject(val)) {
to[key] = val;
} else {
to[key] = assign(Object(to[key]), from[key]);
}
}
function assign(to, from) {
for (const key in from) {
if (hasOwn.call(from, key)) {
assignKey(to, from, key);
}
}
return to;
}
function copyKey(to, from, key) {
const val = from[key];
if (isObject(val) || isArray(val)) {
to[key] = deepCloneAll(val)
} else {
to[key] = val;
}
}
function deepCloneAll(obj) {
let to = {};
if (isArray(obj)) {
return obj.map(item => deepCloneAll(item));
} else if (isObject(obj)) {
for (const key in obj) {
copyKey(to, obj, key);
}
}
return to;
}
function deepClone(obj) {
if (Array.isArray(obj)) {
return obj.map(item => deepClone(item));
} else if (typeof obj === 'object') {
return assign({}, obj);
}
return obj;
}
function formatterValue(option, fn, field, joinChar) {
if (isArray(option)) {
return option.map(v => formatterValue(v, fn, field));
}
if (_is.isFunction(fn)) {
return fn(option)
}
return isObject(option) && field in option ? option[field] : option
}
function applyPromise(fn, target, agrs, defaultValues) {
let _defaultRes;
if (_is.isFunction(fn)) {
_defaultRes = fn.apply(target, agrs)
if (_defaultRes && _defaultRes instanceof Promise) {
return _defaultRes.then(res => {
return res;
})
}
}
return Promise.resolve(_defaultRes || defaultValues);
}
module.exports = apply({
hasOwn: hasOwn,
applyPromise: applyPromise,
getClassName: getClassName,
result: result,
isPlainObject: isPlainObject,
toValue: toValue,
toField: toField,
toArray: toArray,
toParams: toParams,
formatterValue: formatterValue,
isJson: isJson,
isEqual: isEqual,
isArray: isArray,
isObject: isObject,
isBoolean: isBoolean,
isEmptyObject: isEmptyObject,
isEmptyValue: isEmptyValue,
isEmpty: isEmpty,
apply: apply,
copy: copy,
deepClone: deepClone,
deepCloneAll: deepCloneAll,
pathJoin: pathJoin,
copyValid: copyValid,
applyVal: applyVal,
applyIf: applyIf,
applyAll: applyAll
}, _is);
import _ from './_.js';
const DAY_SECONDS = 86400000;
const HOUR_SECONDS = 3600000;
const MINUTE_SECONDS = 60000;
const MS_SECONDS = 1000;
const WEEKS = ['日', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']
const STR_INTERVALS = ['s', 'n', 'h', 'd', 'w', 'q', 'm', 'y'];
const GAPS = [{
s: "年",
l: 365 * DAY_SECONDS
},
{
s: "个月",
l: 30 * DAY_SECONDS
},
{
s: "天",
l: DAY_SECONDS
},
{
s: "时",
l: HOUR_SECONDS
},
{
s: "分",
l: MINUTE_SECONDS
},
{
s: "秒",
l: MS_SECONDS
}
]
const _dataFormat = function(d, f) {
if (!d) return ''
//d = toDate(d);
d = _.isDate(d) ? d : toDate(d);
f = f || 'yyyy-MM-dd hh:mm:ss';
let w = '星期',
r = {
yyyy: d.getFullYear(),
MM: d.getMonth() + 1,
dd: d.getDate(),
hh: d.getHours(),
mm: d.getMinutes(),
ss: d.getSeconds(),
ww: w + WEEKS[d.getDay()],
SSS: d.getMilliseconds()
}
for (let k in r) {
let v = r[k]
if (k != 'yyyy' && v < 10) r[k] = '0' + v
}
return f.replace(/(?!\\)(yyyy|MM|dd|SSS|hh|mm|ss|ww)/gi, function(f) {
return r[f]
})
}
function toDate(v) {
if (_.isDate(v)) {
return v;
}
let t;
if (typeof v == "string") {
if (v.indexOf('+') != -1 || v.indexOf("T") != -1) {
t = new Date(v);
}
if (!t && v.indexOf('-') != -1) {
t = new Date(Date.parse(v.replace(/-/g, '/')))
}
}
if (!t && !isNaN(v)) {
t = new Date(Number(v))
}
if (!t && v) {
t = new Date(v);
}
return t
}
function toUp(dtTmp, strInterval, num) {
switch (strInterval) {
case 's':
return new Date(Date.parse(dtTmp) + (MS_SECONDS * num));
case 'n':
return new Date(Date.parse(dtTmp) + (MINUTE_SECONDS * num));
case 'h':
return new Date(Date.parse(dtTmp) + (HOUR_SECONDS * num));
case 'd':
return new Date(Date.parse(dtTmp) + (DAY_SECONDS * num));
case 'w':
return new Date(Date.parse(dtTmp) + ((DAY_SECONDS * 7) * num));
case 'q':
return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + num * 3, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(),
dtTmp.getSeconds());
case 'm':
return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + num, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(),
dtTmp.getSeconds());
case 'y':
return new Date((dtTmp.getFullYear() + num), dtTmp.getMonth(), dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(),
dtTmp.getSeconds());
}
return dtTmp;
}
function toDown(dtTmp, strInterval, num) {
switch (strInterval) {
case 's':
return new Date(Date.parse(dtTmp) - (MS_SECONDS * num));
case 'n':
return new Date(Date.parse(dtTmp) - (MINUTE_SECONDS * num));
case 'h':
return new Date(Date.parse(dtTmp) - (HOUR_SECONDS * num));
case 'd':
return new Date(Date.parse(dtTmp) - (DAY_SECONDS * num));
case 'w':
return new Date(Date.parse(dtTmp) - ((DAY_SECONDS * 7) * num));
case 'q':
return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) - num * 3, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(),
dtTmp.getSeconds());
case 'm':
return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) - num, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(),
dtTmp.getSeconds());
case 'y':
return new Date((dtTmp.getFullYear() - num), dtTmp.getMonth(), dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(),
dtTmp.getSeconds());
}
return dtTmp;
}
function getUpTime(expires, date) {
let len = expires.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var v = expires.charAt(i).toLowerCase();
var index = STR_INTERVALS.indexOf(v);
if (index != -1) {
var n = expires.substring(0, i);
var s = STR_INTERVALS[index];
date = toUp(date || new Date(), s, Number(n));
let _expires = expires.substring(i + 1);
if (_expires) {
return getUpTime(_expires, date);
}
}
}
}
return date;
}
function getGapTimes(t, s, c = 2) {
t = toDate(t), s = toDate(s);
let gap = Math.abs(t.getTime() - s.getTime());
let results = []
let count = 0
function calc(remain) {
for (let i = 0; i < GAPS.length; i++) {
let v = GAPS[i]
let val = Math.floor(remain / v.l);
if (val > 0) {
results.push(val, v.s)
count += 1
if (count >= c) {
return
} else {
calc(remain - val * v.l)
break;
}
}
}
}
calc(gap)
return results
}
function setCountDownInterval(s, e, layer = 4, callback, clearTimer = 0) {
let count = Math.abs(toDate(s).getTime() - toDate(e).getTime());
let sleep = 1000;
let joinChar = ":"
let countDownTimer = clearTimer;
function countDown(tatal) {
if (tatal > 0) {
let gaps = GAPS.slice(GAPS.length - layer)
let results = [];
while (gaps.length) {
let v = gaps.shift();
if (results.length) {
let s = results[results.length - 1];
s.value && (tatal = tatal - s.value * s.v.l)
}
let value = Math.floor(tatal / v.l);
if (value) {
results.push({
value,
v
})
} else {
if (results.length) {
results.push({
value: 0,
v
})
}
}
}
return results.map(s => {
return {
value: s.value < 10 ? '0' + s.value : s.value,
label: s.v.s
}
});
}
countDownTimer && window.clearInterval(countDownTimer)
return []
}
function resHandler(res) {
let values = res.map(v => v.value).join(joinChar);
let labels = res.map(v => v.value + v.label).join('');
return [res, values, labels];
}
function run() {
let res = countDown(count);
count = count - sleep;
callback && callback.apply(null, resHandler(res))
}
countDownTimer && window.clearInterval(countDownTimer);
return run(), (countDownTimer = window.setInterval(run, sleep)), countDownTimer;
}
const date = {
toUp,
toDown,
toDate,
toFormat: _dataFormat,
getUpTime,
getGapTimes,
setCountDownInterval,
format: function(v, f) {
let d = toDate(v)
return _dataFormat(d, f)
},
splitFormat(v, f, splitStr) {
let vals = [];
if (v) {
let _values = [];
if (splitStr && _.isString(v)) {
_values = v.split(splitStr)
}
if (_values.length == 0) {
if (v instanceof Date) {
_values.push(v)
} else if (_.isNumber(v)) {
_values.push(new Date(v).getTime())
} else if (_.isString(v)) {
_values.push(new Date(v).getTime())
}
}
_values.forEach(v => {
vals.push(_dataFormat(toDate(v), f))
})
}
return vals
},
now: function(f) {
return _dataFormat(new Date(), f || 'yyyy-MM-dd hh:mm:ss.SSS')
},
toTime: function(n) {
function a(v) {
return (v >= 10 ? v : "0" + v);
}
if (n < 60) {
return "00:" + a(n);
} else {
var ss = n % 60;
var mm = Math.floor(n / 60);
if (mm < 60) {
return a(mm) + ":" + a(ss);
} else {
mm = mm % 60;
var hh = Math.floor(mm / 60);
return a(hh) + ":" + a(mm) + ":" + a(ss);
}
}
return "00:00";
},
gapTime: function(t, s) {
t = toDate(t), s = toDate(s);
let v = Math.abs(t.getTime() - s.getTime());
function gapTo(i) {
let d = GAPS[i]
let val = Math.floor(v / d.l);
if (val > 0) {
return val + d.s;
}
return i < 5 ? gapTo(i + 1) : "刚刚";
}
return gapTo(0)
},
// 详细的时间间隔
detailGapTime: function(t, s, c = 2) {
return getGapTimes(t, s, c).join('')
},
gapTimeInterval: function(option) {
let begin = option.begin
let end = option.end
let up = option.up
if (begin && up) {
end = getUpTime(up, toDate(begin))
}
if (!end) {
return
}
let intervalId = setInterval(() => {
let now = new Date()
option.counter && option.counter(this.detailGapTime(now, end))
if (now.getTime() >= end.getTime()) {
option.finish && option.finish()
clearInterval(intervalId)
}
}, 1000)
}
}
export default date
export {
default as _
}
from './_'
export {
default as date
}
from './date'
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-02-10 15:24:49
* @LastEditors: tangjiale
* @LastEditTime: 2022-02-17 09:40:52
*/
const MYCP_CLIENT_ID = 'MYCP-CLIENT-ID-NEW';
const newUUID = (nonce) => {
let d = new Date().getTime();
let tpl = nonce ? 'xxxxxxxxxxxxxyxxxxyxxxxxxxxxxxxx' : 'xxxxxxx-xxxx-5xxx-yxxx-xxxxxxxxx';
let uuid = tpl.replace(/[xy]/g,
function (c) {
let r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
});
return uuid;
};
const getClientID = () => {
let _clientID = window.localStorage.getItem(MYCP_CLIENT_ID)
if (!_clientID) {
_clientID = newUUID();
window.localStorage.setItem(MYCP_CLIENT_ID, _clientID)
}
return _clientID;
};
const randomInt = (min, max) => {
return Math.floor(Math.random() * (max - min + 1) + min);
};
const getPageRoute = page => {
let route = page.route;
let index = route.indexOf('?');
let key = index == -1 ? route : route.substring(0, index);
return key.startsWith("/") ? key.substring(1) : key;
}
const getCurrentPage = () => {
let pages = getCurrentPages() //获取加载的页面
return pages[pages.length - 1]
}
const getPrePage = () => {
let pages = getCurrentPages() //获取加载的页面
if (pages.length >= 2) {
return pages[pages.length - 2]
}
}
//过滤对象中为null/undefined/''/[]/{}的属性值
const clearDeep = (obj) => {
if (!obj || !typeof obj === 'object') return obj
const keys = Object.keys(obj)
if(!keys) return {}
for (var key of keys) {
const val = obj[key]
if (
typeof val === 'undefined' ||
((typeof val === 'object' || typeof val === 'string') && !val)
) {
// 如属性值为null或undefined或'',则将该属性删除
delete obj[key]
} else if (typeof val === 'object') {
// 属性值为对象,递归调用
clearDeep(obj[key])
if (Object.keys(obj[key]).length === 0) {
// 如某属性的值为不包含任何属性的独享,则将该属性删除
delete obj[key]
}
}
}
return obj
}
export default {
newUUID,
getClientID,
randomInt,
getCurrentPage: getCurrentPage,
getPrePage: getPrePage,
getPageRoute: getPageRoute,
clearDeep
}
// 公共样式文件
body{
font-family: PingFangSC-Medium, PingFang SC !important;
font-size: 14px !important;
}
body::-webkit-scrollbar{
display: none !important;
}
\ No newline at end of file
/*
* @Author: tangjiale
* @eMail: 932055106@qq.com
* @Date: 2022-08-01 16:48:56
* @LastEditors: tangjiale
* @LastEditTime: 2022-08-01 17:05:39
*/
export default class IndexService extends Service {
getUserAllSchList(schName){
}
}
\ No newline at end of file
@font-face {
font-family: "iconfont"; /* Project id 3137133 */
src:
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAASwAAsAAAAACQgAAARkAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDDAqFNIR0ATYCJAMQCwoABCAFhGcHVxv7B1GULUqb7KOwbe0cUxCK9v9fwpuvKTOh46F+DX37/96FUQGRy/gS6aoIWbJVqbNVvlPJRtzw72kZlMzIpGpENTEHZu1LCqYZdEJyBooDvwD9ca9qxsIfsPkAPHNMDX6w2AQK2JijA6TgvQpTH+AZLkzgIwL9DhSzv5PUtECe9zitg0I5EmoDuzjulSQOud51MoYaepVt2oUpvmkoX8s1POi/H/8dhStFUwnbPHovlkOnfuWvtn7pvlB/UGsEHFzQoGKnZYZ4FW97wsGM7XDQH2ZztEaVKfjVdp2KS167/+VRFUG0BNkgEk/ilV8p82x5gxoF5S0KRlyW6oJeDOAfcU5QLZazSdGePBbvFukT5xHp7+7Ra7UyZqSMsVBY28SxVvmmzEuSA6FLotYOWBq2Ut8AZhYEbUw8GL8+efGq4F3hq0LmPzdhBzMnxp5kj4851oudzdhrNxazigjTYkbGtFq6I6ytpHU+u3Ws7oR1bIEStmDJmAo+gbHiMLPFzmnsVsSL3Qz5spndamc31gp7MmYov1gQJL16yxApC4aZTWM2O9OM2NnYtVbBKlkAN1ETvuoaFc9H2PqyT1yBLTObYSbwgNUatdJmQ9iA/RaLJhunCAkpy9zdGI8Ns+xvSqUbhFc2CmfMFG24Ito4Y8ZG0RWJrbEt9vOHbOD9m1Tb9GPy4tro0hjR236jUBLs6vLiaTa85sv0N89/cx48w4eAuLTqfvRaybXSa8XXocuP4auWjlVrRUCA8ZubeZjgCrOZzdl87Cq/ld/imwyKDPHP1624Grckbv6NySmkiWkNDWQKxWa+C6knUy9MhR4c/3oKvMxeAk+hV4zXA28sBvN+wC0t5Qo5ZQrFzO3K+e/TGgPsp/kAn1XmR7T6rPYm0uZRWkVdedjQwios3f+UB6clqrwwsbG2PHRoUVWr74KPHlUH2/VH45Y4bPpznlYmiU9yGzlXxI+pzWdqqTghd61QEFszNKmwcq03iAHeasZHke3xTN3j1QkZQOiW1McOQ3T6zbrDISKxqD5zaDt1Bjl7+BSM8Cr85oosvrqfU9U88nSLlCaULh/Sq5Cad6LI36VEza+fzDCRLDj5bB843yMF/WKQjuAa96QMxwTItoTeOx+h6LEAVa8lbBK3oDHgCFq9bqHfNvHyARMMHET2Yc14gDBqMxTDvkM16iI2iTZoTHsBrVH/oN+LGNpswFrIhBTAaSBH27pRpUyvIyQlrXfaBMh2DU4FhTFAmZQYRPkcnjcpBTpAFTHF1EEKaJpACUqvRSXX44BGo0cNlF4FZDRHQdOGfC6XCPsWjkyvhYQoAI4GyKHadEMpyejpECo67f57TQBSOw0clRKLWSgm5lLnKD4OXgqsVKZLVbUl3U06kARoNIKHESh6WijJ1wJoxJgeyhDeTwWQoXEockQM8nEJjUgr49Sv0C7eNugn9MooUSOj0T/muSNopUmhRKxcE8ApmcL3mi5X6kg5rntm4V3tOggC') format('woff2'),
url('//at.alicdn.com/t/font_3137133_p6xg24q9awq.woff?t=1643092656477') format('woff'),
url('//at.alicdn.com/t/font_3137133_p6xg24q9awq.ttf?t=1643092656477') format('truetype'),
url('//at.alicdn.com/t/font_3137133_p6xg24q9awq.svg?t=1643092656477#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-icon_tishi:before {
content: "\e606";
}
.icon-icon_search:before {
content: "\e605";
}
.icon-icon_dingdanchaxun:before {
content: "\e604";
}
export default {
state: () => ({
myUserInfo: null,
}),
mutations: {
updateUserInfo(state, userInfo) {
state.myUserInfo = userInfo;
},
logout(state) {
state.myUserInfo = null;
}
}
};
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