fanfan 9 months ago
commit 274ba3c10b
  1. 2
      src/layouts/BasicLayout.vue
  2. 2
      src/permission.js
  3. 3
      src/store/modules/permission.js
  4. 4
      src/views/goods/Index.vue
  5. 4
      src/views/goods/Update.vue
  6. 4
      src/views/manage/role/Index.vue
  7. 4
      src/views/manage/role/modules/EditForm.vue
  8. 4
      src/views/order/Index.vue
  9. 28
      src/views/shop/Index.vue

@ -135,7 +135,7 @@ export default {
Api.info().then(result => { Api.info().then(result => {
const { data: { storeInfo } } = result const { data: { storeInfo } } = result
this.storeInfo = storeInfo this.storeInfo = storeInfo
window.storeInfo = storeInfo window.localStorage.setItem('storeInfo', JSON.stringify(storeInfo))
}) })
}, },

@ -44,7 +44,7 @@ router.beforeEach((to, from, next) => {
store store
.dispatch('GetInfo') .dispatch('GetInfo')
.then(({ roles, modules }) => { .then(({ roles, modules }) => {
window.roles = roles window.localStorage.setItem('roles', JSON.stringify(roles));
// 根据roles权限生成可访问的路由表 // 根据roles权限生成可访问的路由表
store.dispatch('GenerateRoutes', { roles, modules }) store.dispatch('GenerateRoutes', { roles, modules })
.then(routers => { .then(routers => {

@ -79,7 +79,6 @@ function filterModulesRouter (routerMap, modules) {
if (route.children && route.children.length) { if (route.children && route.children.length) {
route.children = filterModulesRouter(route.children, modules) route.children = filterModulesRouter(route.children, modules)
} }
console.log(route, route.moduleKey || '', modules)
return checkModuleKey(route, modules) && checkModules(route, modules) return checkModuleKey(route, modules) && checkModules(route, modules)
}) })
return moduleRouters return moduleRouters
@ -152,7 +151,7 @@ function setPrimaryMenuRedirect (routerMap) {
* 设置默认的首页 * 设置默认的首页
* @param {*} routerMap * @param {*} routerMap
*/ */
function setIndexRedirect (routerMap) { function setIndexRedirect(routerMap) {
const root = routerMap[0] const root = routerMap[0]
if (root.children && root.children.length) { if (root.children && root.children.length) {
const item = root.children[0] const item = root.children[0]

@ -364,10 +364,10 @@ export default {
} }
}, },
isSuper() { isSuper() {
return window.roles ? window.roles.isSuper : 0 return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0
}, },
storeVersion() { storeVersion() {
return window.storeInfo ? window.storeInfo.store_version : 0 return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
} }
}, },
methods: { methods: {

@ -597,10 +597,10 @@ export default {
}, },
computed: { computed: {
isSuper() { isSuper() {
return window.roles ? window.roles.isSuper : 0 return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0
}, },
storeVersion() { storeVersion() {
return window.storeInfo ? window.storeInfo.store_version : 0 return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
} }
}, },
watch: { watch: {

@ -84,10 +84,10 @@ export default {
}, },
computed: { computed: {
isSuper() { isSuper() {
return window.roles ? window.roles.isSuper : 0 return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0
}, },
storeVersion() { storeVersion() {
return window.storeInfo ? window.storeInfo.store_version : 0 return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
} }
}, },
created () { created () {

@ -102,10 +102,10 @@ export default {
}, },
computed: { computed: {
isSuper() { isSuper() {
return window.roles ? window.roles.isSuper : 0 return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0
}, },
storeVersion() { storeVersion() {
return window.storeInfo ? window.storeInfo.store_version : 0 return window.localStorage.getItem('storeInfo') ? JSON.stringify(window.localStorage.getItem('storeInfo')).store_version : 0
} }
}, },
methods: { methods: {

@ -360,10 +360,10 @@ export default {
}, },
computed: { computed: {
isSuper() { isSuper() {
return window.roles ? window.roles.isSuper : 0 return window.localStorage.getItem('roles') ? JSON.parse(window.localStorage.getItem('roles')).isSuper : 0
}, },
storeVersion() { storeVersion() {
return window.storeInfo ? window.storeInfo.store_version : 0 return window.localStorage.getItem('storeInfo') ? JSON.parse(window.localStorage.getItem('storeInfo')).store_version : 0
} }
}, },
watch: { watch: {

@ -33,12 +33,22 @@
:columns="columns" :columns="columns"
:data="loadData" :data="loadData"
:pagination="pagination" :pagination="pagination"
:scroll="{ x: 1450 }"
> >
<span slot="logoImage" slot-scope="text, item"> <span slot="logoImage" slot-scope="text, item">
<a v-if="item.logoImage" title="点击查看原图" :href="item.logoImage.external_url" target="_blank"> <a v-if="item.logoImage" title="点击查看原图" :href="item.logoImage.external_url" target="_blank">
<img width="50" height="50" :src="item.logoImage.external_url" alt="商户logo" /> <img width="50" height="50" :src="item.logoImage.external_url" alt="商户logo" />
</a> </a>
</span> </span>
<span slot="shop_name" slot-scope="text, item" style="white-space: pre-line;">
{{ item.shop_name }}
</span>
<span slot="shop_label" slot-scope="text, item" style="white-space: pre-line;">
{{ item.shop_label }}
</span>
<span slot="company_name" slot-scope="text, item" style="white-space: pre-line;">
{{ item.company_name }}
</span>
<span slot="is_select_mechant" slot-scope="text, item"> <span slot="is_select_mechant" slot-scope="text, item">
{{ item.is_select_mechant ? '是' : '否' }} {{ item.is_select_mechant ? '是' : '否' }}
</span> </span>
@ -90,11 +100,15 @@ export default {
}, },
{ {
title: '商户名称', title: '商户名称',
dataIndex: 'shop_name' width: '150px',
dataIndex: 'shop_name',
scopedSlots: { customRender: 'shop_name' }
}, },
{ {
title: '商户标签', title: '商户标签',
dataIndex: 'shop_label' width: '150px',
dataIndex: 'shop_label',
scopedSlots: { customRender: 'shop_label' }
}, },
{ {
title: '账号名称', title: '账号名称',
@ -111,7 +125,9 @@ export default {
}, },
{ {
title: '公司名称', title: '公司名称',
dataIndex: 'company_name' width: '150px',
dataIndex: 'company_name',
scopedSlots: { customRender: 'company_name' }
}, },
{ {
title: '法人名字', title: '法人名字',
@ -119,7 +135,8 @@ export default {
}, },
{ {
title: '手机号', title: '手机号',
dataIndex: 'phone' dataIndex: 'phone',
width: '120px'
}, },
{ {
title: '是否展示营业执照', title: '是否展示营业执照',
@ -136,12 +153,13 @@ export default {
}, },
{ {
title: '添加时间', title: '添加时间',
width: '150px',
dataIndex: 'create_time' dataIndex: 'create_time'
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
width: '180px', width: '120px',
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
] ]

Loading…
Cancel
Save