1、提货点
2、客服(腾讯云智服)
3、接口权限控制
4、复制第三方商品可配置
4、优化附件上传配置
5、手机端核销订单
6、手机端订单统计、订单管理
7、短信优化
8、订阅消息全自动化
This commit is contained in:
张乐
2020-09-15 16:13:25 +08:00
parent aee9c1d692
commit db2c3b44a6
245 changed files with 19900 additions and 994 deletions

View File

@@ -1,6 +1,7 @@
import { asyncRoutes, constantRoutes } from '@/router'
import * as categoryApi from '@/api/categoryApi.js'
import * as roleApi from '@/api/roleApi.js'
import * as Auth from '@/libs/wechat';
/**
* Use meta.role to determine if the current user has permission
@@ -61,12 +62,13 @@ const actions = {
generateRoutes({ commit }, roleid) {
return new Promise(async resolve => {
let accessedRoutes = []
let menus= []
const { rules } = await roleApi.getRoleById(roleid)
// const menus = await categoryApi.categroyByIds({ ids: rules })
const menus = await roleApi.menuListApi()
const menusAll = await roleApi.menuListApi()
!Auth.isPhone() ? menus = menusAll.filter(item => item.url !== '/javaMobile') : menus = menusAll.filter(item => item.url === '/javaMobile')
const _routerResult = comRouter(menus, asyncRoutes)
accessedRoutes = filterAsyncRoutes(_routerResult, rules)
console.log(accessedRoutes)
// todo 这里控制是否过滤路由,经测试有些菜单不能予以设置,比如系统设置等等
commit('SET_ROUTES', menus)
// resolve(menus)

View File

@@ -3,6 +3,7 @@ import { getToken, setToken, removeToken } from '@/utils/auth'
import router, { resetRouter } from '@/router'
import { isLoginApi } from '@/api/sms'
import Cookies from 'js-cookie'
import { oAuth, getQueryString } from "@/libs/wechat";
const state = {
token: getToken(),
@@ -38,7 +39,7 @@ const mutations = {
const actions = {
// user login
login({ commit }, userInfo) {
const { account, pwd, key, code } = userInfo
const { account, pwd, key, code, wxCode } = userInfo
return new Promise((resolve, reject) => {
login( userInfo ).then(data => {
commit('SET_TOKEN', data.token)
@@ -100,7 +101,10 @@ const actions = {
commit('SET_ROLES', [])
removeToken()
resetRouter()
localStorage.clear();
Cookies.remove('storeStaffList')
Cookies.remove('JavaInfo')
sessionStorage.removeItem('token')
// reset visited views and cached views
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
dispatch('tagsView/delAllViews', null, { root: true })
@@ -121,6 +125,15 @@ const actions = {
resolve()
})
},
// 设置token
setToken({commit},state) {
return new Promise(resolve => {
commit('SET_TOKEN', state.token)
Cookies.set('JavaInfo', JSON.stringify(state))
setToken(data.token)
resolve()
})
},
// dynamically modify permissions
changeRoles({ commit, dispatch }, role) {