Compare commits
16 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
|
7fa30e50c9 |
add logic for tid1509
|
3 months ago |
|
2297e706e6 |
add logic for tid1509
|
3 months ago |
|
cc96211b29 |
add logic for tid1509
|
3 months ago |
|
a9ee443d69 |
add logic for tid1509
|
3 months ago |
|
82c04031fc |
add logic for tid1509
|
3 months ago |
|
5954fa0e5c |
add logic for tid1509
|
3 months ago |
|
c2c555b9be |
fixed merge dev conflict
|
3 months ago |
|
486eb95c7c |
add tid1509 style
|
1 year ago |
|
8740efe23f |
Merge branch 'dev' into tid1509
|
1 year ago |
|
da70b5d10c |
add tid1509 style
|
1 year ago |
|
f7238bd605 |
add tid1509 style
|
1 year ago |
|
4a62446bf2 |
Merge branch 'dev' into tid1509
|
1 year ago |
|
22bcae35f8 |
add tid1509 style
|
1 year ago |
|
5e21f6c0f3 |
Merge branch 'dev' into tid1509
|
1 year ago |
|
c11333f9b7 |
add tid1509 style
|
1 year ago |
|
52c02191e4 |
add tid1509 style
|
1 year ago |
-
59src/pages.json
-
36src/subpackage/account/components/fixed_button.vue
-
68src/subpackage/account/components/fixed_modal.vue
-
40src/subpackage/account/components/info_container.vue
-
38src/subpackage/account/components/info_title.vue
-
54src/subpackage/account/components/jurisdiction_item.vue
-
32src/subpackage/account/components/modal_button.vue
-
37src/subpackage/account/components/permission_item.vue
-
54src/subpackage/account/components/select_container.vue
-
38src/subpackage/account/components/trigger_icon.vue
-
90src/subpackage/account/components/user_info.vue
-
10src/subpackage/account/js/api.js
-
48src/subpackage/account/js/handle.js
-
10src/subpackage/account/js/server.js
-
118src/subpackage/account/pages/list/index.vue
-
49src/subpackage/account/pages/list/modules/check_status_bar.vue
-
43src/subpackage/account/pages/list/modules/input_bar.vue
-
71src/subpackage/account/pages/list/modules/item.vue
-
44src/subpackage/account/pages/manage/add.vue
-
55src/subpackage/account/pages/manage/apply.vue
-
129src/subpackage/account/pages/manage/check.vue
-
76src/subpackage/account/pages/manage/methods.vue
-
58src/subpackage/account/pages/manage/modules/account_form.vue
-
45src/subpackage/account/pages/manage/modules/apply/info_modal.vue
-
85src/subpackage/account/pages/manage/modules/apply/success_modal.vue
-
42src/subpackage/account/pages/manage/modules/apply/tip_modal.vue
-
58src/subpackage/account/pages/manage/modules/check/not_pass_modal.vue
-
90src/subpackage/account/pages/manage/modules/check/pass_modal.vue
-
80src/subpackage/account/pages/manage/modules/input_bar.vue
-
63src/subpackage/account/pages/manage/modules/methods/method_bar.vue
-
29src/subpackage/account/pages/manage/modules/stadium_info.vue
-
43src/subpackage/account/pages/message/edit.vue
-
134src/subpackage/account/pages/message/info.vue
-
53src/subpackage/account/pages/message/modules/edit/subscribe_function.vue
-
46src/subpackage/account/pages/message/modules/edit/subscribe_stadium.vue
-
71src/subpackage/account/pages/message/modules/info/bind_modal.vue
-
90src/subpackage/account/pages/permission/edit.vue
-
204src/subpackage/account/pages/permission/info.vue
-
130src/subpackage/account/pages/permission/modules/edit/admin_jurisdiction.vue
-
50src/subpackage/account/pages/permission/modules/edit/cashier_jurisdiction.vue
-
82src/subpackage/account/pages/permission/modules/edit/min_jurisdiction.vue
-
88src/subpackage/account/pages/permission/modules/edit/stadium_jurisdiction.vue
-
49src/subpackage/account/pages/permission/modules/info/admin_permission.vue
-
43src/subpackage/account/pages/permission/modules/info/cashier_permission.vue
-
93src/subpackage/account/pages/permission/modules/info/edit_account.vue
-
89src/subpackage/account/pages/permission/modules/info/edit_password.vue
-
93src/subpackage/account/pages/permission/modules/info/min_permission.vue
-
57src/subpackage/account/pages/permission/modules/info/stadium_permission.vue
-
BINsrc/subpackage/account/static/images/arrow.png
-
BINsrc/subpackage/account/static/images/choose.png
-
BINsrc/subpackage/account/static/images/delete.png
-
BINsrc/subpackage/account/static/images/edit.png
-
BINsrc/subpackage/account/static/images/error.png
-
BINsrc/subpackage/account/static/images/invite.png
-
BINsrc/subpackage/account/static/images/scan.png
-
BINsrc/subpackage/account/static/images/search.png
-
BINsrc/subpackage/account/static/images/selected.png
-
BINsrc/subpackage/account/static/images/selected_corner.png
-
BINsrc/subpackage/account/static/images/success.png
-
BINsrc/subpackage/account/static/images/wx.png
-
BINsrc/subpackage/account/static/images/x_close.png
-
2src/utils/util.js
@ -0,0 +1,36 @@ |
|||
<template> |
|||
<view class="fixed-button"> |
|||
<view class="fb-box"> |
|||
<view class="bottom-btn" @click="$emit('click')"> |
|||
<slot>确认</slot> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.fixed-button{ |
|||
@include isPd(132upx); |
|||
} |
|||
.fb-box{ |
|||
position: fixed; |
|||
bottom: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
padding: 10upx 24upx; |
|||
@include isPd(10upx); |
|||
.bottom-btn{ |
|||
height: 112upx; |
|||
border-radius: 10upx; |
|||
background: $mColor; |
|||
text-align: center; |
|||
@include flcw(32upx, 112upx, #fff, 500); |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,68 @@ |
|||
<template> |
|||
<view class="fixed-mask" v-show="show"> |
|||
<view class="fm-content"> |
|||
<image |
|||
v-if="close" |
|||
class="fc-close" |
|||
@click="$emit('click:close')" |
|||
mode="aspect" |
|||
src="/subpackage/account/static/images/x_close.png" |
|||
></image> |
|||
<view v-if="title" class="fc-title">{{ title }}</view> |
|||
<slot></slot> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
close: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
title: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
show: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.fixed-mask{ |
|||
position: fixed; |
|||
left: 0; |
|||
top: 0; |
|||
bottom: 0; |
|||
right: 0; |
|||
background: rgba($color: #000000, $alpha: .5); |
|||
z-index: 10; |
|||
.fm-content{ |
|||
position: absolute; |
|||
left: 50%; |
|||
top: 50%; |
|||
transform: translate(-50%, -50%); |
|||
padding-top: 80upx; |
|||
padding-bottom: 60upx; |
|||
width: 620upx; |
|||
border-radius: 10upx; |
|||
background: #fff; |
|||
.fc-close{ |
|||
position: absolute; |
|||
right: 30upx; |
|||
top: 30upx; |
|||
width: 34upx; |
|||
height: 34upx; |
|||
} |
|||
.fc-title{ |
|||
text-align: center; |
|||
@include flcw(32upx, 44upx, #1A1A1A, 500); |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,40 @@ |
|||
<template> |
|||
<view class="info-container"> |
|||
<view class="ic-box"> |
|||
<info-title :title="title"><slot name="title-right"></slot></info-title> |
|||
<view class="ib-content"> |
|||
<slot name="content"></slot> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoTitle from "./info_title.vue"; |
|||
export default { |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: 'title' |
|||
} |
|||
}, |
|||
components: { |
|||
'info-title': infoTitle |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.info-container{ |
|||
padding-top: 24upx; |
|||
.ic-box{ |
|||
border-radius: 10upx; |
|||
overflow: hidden; |
|||
background-color: #fff; |
|||
} |
|||
.ib-content{ |
|||
padding-top: 40upx; |
|||
padding-bottom: 40upx; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,38 @@ |
|||
<template> |
|||
<view class="info-title"> |
|||
<view class="it-name">{{ title }}</view> |
|||
<view class="it-right"> |
|||
<slot></slot> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.info-title{ |
|||
padding: 10upx 20upx 0upx; |
|||
height: 116upx; |
|||
border-bottom: 2upx solid #D8D8D8; |
|||
overflow: hidden; |
|||
@include ctf; |
|||
.it-name{ |
|||
flex-shrink: 0; |
|||
margin-right: 14upx; |
|||
@include flcw(32upx, 44upx, #1A1A1A); |
|||
} |
|||
.it-right{ |
|||
flex-grow: 1; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,54 @@ |
|||
<template> |
|||
<view class="jurisdiction-item" :class="{ active, centre }" @click="$emit('click')"> |
|||
<view class="ji-txt"><slot></slot></view> |
|||
<image v-if="active" class="ji-tag" mode="aspectFit" src="/subpackage/account/static/images/selected_corner.png" ></image> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
centre: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
active: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.jurisdiction-item{ |
|||
position: relative; |
|||
padding: 0 10upx; |
|||
height: 92upx; |
|||
border: 1px solid #CDCDCD; |
|||
border-radius: 10upx; |
|||
overflow: hidden; |
|||
@include ctf; |
|||
.ji-txt{ |
|||
@include flcw(28upx, 40upx, #9C9C9F); |
|||
@include tHide; |
|||
} |
|||
.ji-tag{ |
|||
position: absolute; |
|||
right: 0; |
|||
bottom: 0; |
|||
width: 30upx; |
|||
height: 30upx; |
|||
} |
|||
&.centre{ |
|||
@include ctf(center); |
|||
} |
|||
&.active{ |
|||
background: #E0F6F0; |
|||
border-color: #E0F6F0; |
|||
.ji-txt{ |
|||
color: #1A1A1A; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,32 @@ |
|||
<template> |
|||
<view class="modal-button" :class="{ 'green': green }" @click="$emit('click')"> |
|||
<slot>确定</slot> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
green: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.modal-button{ |
|||
margin: 0 auto; |
|||
width: 240upx; |
|||
height: 88upx; |
|||
border: 2upx solid $mColor; |
|||
border-radius: 10upx; |
|||
text-align: center; |
|||
@include flcw($color: $mColor, $height: 84upx); |
|||
&.green{ |
|||
background: $mColor; |
|||
color: #fff; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,37 @@ |
|||
<template> |
|||
<view class="permission-item"> |
|||
<image v-if="active" class="pi-icon" mode="aspectFit" src="/subpackage/account/static/images/selected.png" ></image> |
|||
<text class="pi-txt" :class="{ 'pi-active': active }"> |
|||
<slot></slot> |
|||
</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
active: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.permission-item{ |
|||
@include tHide; |
|||
.pi-icon{ |
|||
margin-right: 14upx; |
|||
width: 26upx; |
|||
height: 26upx; |
|||
} |
|||
.pi-txt{ |
|||
@include flcw(28upx, 40upx, #9C9C9F, 500); |
|||
&.pi-active{ |
|||
color: #1A1A1A; |
|||
} |
|||
} |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,54 @@ |
|||
<template> |
|||
<info-container :title="title"> |
|||
<template v-slot:title-right> |
|||
<view class="sc-title-right"> |
|||
<view class="str-txt" @click="$emit('click:all')">全选</view> |
|||
<image class="str-img" @click="$emit('click:all')" v-if="isAll" mode="aspectFit" src="/subpackage/account/static/images/choose.png"></image> |
|||
<view class="str-icon" @click="$emit('click:all')" v-else></view> |
|||
</view> |
|||
</template> |
|||
<template v-slot:content> |
|||
<slot></slot> |
|||
</template> |
|||
</info-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from './info_container.vue'; |
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: 'title' |
|||
}, |
|||
isAll: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.sc-title-right{ |
|||
@include ctf(flex-end); |
|||
.str-txt{ |
|||
flex-shrink: 0; |
|||
@include flcw(24upx, 34upx, #1A1A1A); |
|||
} |
|||
.str-img, .str-icon{ |
|||
margin-left: 18upx; |
|||
flex-shrink: 0; |
|||
width: 32upx; |
|||
height: 32upx; |
|||
|
|||
} |
|||
.str-icon{ |
|||
border-radius: 50%; |
|||
border: 2upx solid #B2B2B2; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,38 @@ |
|||
<template> |
|||
<view class="trigger-icon" @click="$emit('click')"> |
|||
<image |
|||
class="ti-selected" |
|||
src="/subpackage/account/static/images/choose.png" |
|||
v-if="selected" |
|||
></image> |
|||
<view class="ti-not" v-else></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
selected: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.trigger-icon{ |
|||
width: 40upx; |
|||
height: 40upx; |
|||
.ti-selected{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
.ti-not{ |
|||
border-radius: 50%; |
|||
width: 100%; |
|||
height: 100%; |
|||
border: 2upx solid #D8D8D8; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,90 @@ |
|||
<template> |
|||
<view class="info-user"> |
|||
<view class="iu-top"> |
|||
<view class="it-left"> |
|||
<view class="il-name">{{ name || "-" }}</view> |
|||
<image @click="$emit('click:edit')" class="il-edit" v-if="edit" mode="aspectFit" src="/subpackage/account/static/images/edit.png"></image> |
|||
</view> |
|||
<image @click="$emit('click:delete')" class="it-delete" v-if="edit" mode="aspectFit" src="/subpackage/account/static/images/delete.png"></image> |
|||
</view> |
|||
<view class="iu-box"> |
|||
<view class="iu-line"> |
|||
<text class="il-txt">登录账号:</text> {{ account || "-" }} |
|||
</view> |
|||
<block v-if="edit"> |
|||
<view class="iu-line"> |
|||
<text class="il-txt">密码:</text> <text class="il-link" @click="$emit('click:changePSW')">修改密码</text> |
|||
</view> |
|||
<view class="iu-line"> |
|||
<text class="il-txt">创建时间:</text> {{ time || "-" }} |
|||
</view> |
|||
</block> |
|||
|
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
edit: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
name: { |
|||
default: '' |
|||
}, |
|||
account: { |
|||
default: '' |
|||
}, |
|||
time: { |
|||
default: '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.info-user{ |
|||
padding: 20upx 20upx 30upx; |
|||
border-radius: 10upx; |
|||
background-color: #fff; |
|||
.iu-top{ |
|||
@include ctf(space-between); |
|||
.it-left{ |
|||
@include ctf; |
|||
.il-name{ |
|||
@include flcw(44upx, 60upx, #1A1A1A); |
|||
@include tHide; |
|||
} |
|||
.il-edit{ |
|||
flex-shrink: 0; |
|||
margin-left: 20upx; |
|||
width: 36upx; |
|||
height: 36upx; |
|||
} |
|||
} |
|||
.it-delete{ |
|||
flex-shrink: 0; |
|||
margin-left: 20upx; |
|||
width: 36upx; |
|||
height: 36upx; |
|||
} |
|||
} |
|||
.iu-box{ |
|||
margin-top: 20upx; |
|||
} |
|||
.iu-line{ |
|||
@include flcw($color: #1A1A1A); |
|||
@include tHide; |
|||
.il-txt{ |
|||
color: #9C9C9F; |
|||
} |
|||
.il-link{ |
|||
color: $mColor; |
|||
text-decoration: underline; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,10 @@ |
|||
import { ORIGIN } from '@/js/api'; |
|||
|
|||
export const ACCOUNT_API = { |
|||
userRest:`${ORIGIN}/admin/user/rest`, // 权限管理-获取管理员
|
|||
userDelete:`${ORIGIN}/admin/user/delete`, // 权限管理-删除权限组
|
|||
userGet:`${ORIGIN}/admin/user/get`, // B会员管理-小程序用户管理-用户信息列表-用户信息详情
|
|||
userEdit:`${ORIGIN}/admin/user/edit`, // 权限管理-编辑管理员信息
|
|||
stadiumList:`${ORIGIN}/admin/stadium/list`, // A店铺管理-店铺列表-店铺列表/A首页公告-店铺列表
|
|||
getAllGroup:`${ORIGIN}/admin/permission/getAllGroup`, // 权限管理-获取所有权限组
|
|||
} |
@ -0,0 +1,48 @@ |
|||
import { ACCOUNT_API } from "./api.js"; |
|||
import server from "./server.js"; |
|||
import { showModal, showLoad, hideLoad } from "@/utils/util.js"; |
|||
|
|||
// 权限管理-删除权限组
|
|||
export function userDelete({ id }){ |
|||
return server.post({ |
|||
url: ACCOUNT_API.userDelete, |
|||
data: { id }, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res => { |
|||
let _data = res?.data || {}; |
|||
if(_data.code === 0){ |
|||
return 'success'; |
|||
}else{ |
|||
return Promise.reject(_data); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
showModal({ content: err.message || '操作失败!' }); |
|||
console.warn('subpackage account js handle userDelete err --->', err); |
|||
// return Promise.reject(err);
|
|||
}) |
|||
} |
|||
|
|||
// B会员管理-小程序用户管理-用户信息列表-用户信息详情
|
|||
export function getStadiumList({ brand_id }){ |
|||
return server.get({ |
|||
url: ACCOUNT_API.stadiumList, |
|||
data: { brand_id }, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res => { |
|||
let _data = res?.data || {}; |
|||
if(_data.code === 0){ |
|||
console.log('subpackage account js handle stadiumList res --->', _data); |
|||
return _data?.data ?? {}; |
|||
}else{ |
|||
return Promise.reject(_data); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
showModal({ content: err.message || '加载店铺列表失败!' }); |
|||
console.warn('subpackage account js handle stadiumList err --->', err); |
|||
// return Promise.reject(err);
|
|||
}) |
|||
} |
@ -0,0 +1,10 @@ |
|||
import { Server } from '@/js/server'; |
|||
|
|||
class AccountServer extends Server { |
|||
constructor(props){ |
|||
super(props) |
|||
} |
|||
} |
|||
|
|||
|
|||
export default new AccountServer(); |
@ -0,0 +1,118 @@ |
|||
<template> |
|||
<view class="list-index"> |
|||
<view class="li-header"> |
|||
<input-bar></input-bar> |
|||
<check-status-bar @click="accountCheck"></check-status-bar> |
|||
</view> |
|||
<view class="li-list"> |
|||
<block v-for="(e, i) in userLs" :key="i"> |
|||
<list-item |
|||
:name="e.actual_name" |
|||
:account="e.username" |
|||
:time="e.created_at" |
|||
@click:message="messageSubscription" |
|||
@click:account="accountAuthority(e)" |
|||
@click:delete="itemDeleteBtn(e, i)" |
|||
></list-item> |
|||
<view style="height: 24rpx;"></view> |
|||
</block> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import inputBar from './modules/input_bar.vue'; |
|||
import checkStatusBar from './modules/check_status_bar.vue'; |
|||
import listItem from './modules/item.vue'; |
|||
import { routeTo, showModal, showLoad, hideLoad, showNone } from "@/utils/util.js"; |
|||
import { ACCOUNT_API } from "../../js/api.js"; |
|||
import server from "../../js/server.js"; |
|||
import { userDelete } from "../../js/handle.js"; |
|||
|
|||
export default { |
|||
components: { |
|||
'input-bar': inputBar, |
|||
'check-status-bar': checkStatusBar, |
|||
'list-item': listItem |
|||
}, |
|||
data(){ |
|||
return { |
|||
brand_id: '', |
|||
userLs: [], |
|||
page: 1 |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
let _bid = options?.brand_id ?? ''; |
|||
this.getUserLs({ brand_id: _bid }); |
|||
this.brand_id = _bid; |
|||
}, |
|||
onReachBottom(){ |
|||
this.getUserLs({ brand_id: this.brand_id, page: this.page + 1 }); |
|||
}, |
|||
methods: { |
|||
messageSubscription(){ |
|||
routeTo(`/subpackage/account/pages/message/info?brand_id=${this.brand_id}`, 'nT'); |
|||
}, |
|||
accountAuthority(e){ |
|||
routeTo(`/subpackage/account/pages/permission/info?brand_id=${this.brand_id}&id=${e.id}`, 'nT'); |
|||
}, |
|||
accountCheck(){ |
|||
routeTo(`/subpackage/account/pages/manage/check?brand_id=${this.brand_id}`, 'nT'); |
|||
}, |
|||
itemDeleteBtn(e, idx){ |
|||
showModal({ |
|||
content: '是否删除该账号?', |
|||
showCancel: true, |
|||
success: async res => { |
|||
if(res.confirm){ |
|||
showLoad(); |
|||
let _delRes = await userDelete({ id: e?.id ?? '' }); |
|||
hideLoad(); |
|||
if(_delRes === 'success'){ |
|||
showNone('操作成功!'); |
|||
this.userLs.splice(idx, 1); |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
// 权限管理-获取管理员 |
|||
getUserLs({ brand_id, page = 1, limit = 10 }){ |
|||
showLoad(); |
|||
return server.get({ |
|||
url: ACCOUNT_API.userRest, |
|||
data: { brand_id, 'filter[role]': `ADMIN-BRAND-${brand_id}`, page, limit }, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res => { |
|||
hideLoad(); |
|||
let _data = res?.data || {}; |
|||
if(_data.code === 0){ |
|||
let _ls = _data?.data?.data ?? []; |
|||
if(page === 1)return this.userLs = _ls; |
|||
if(_ls.length <= 0)return showNone('暂无更多!'); |
|||
this.page = page; |
|||
return this.userLs = [ ...this.userLs, ..._ls ]; |
|||
}else{ |
|||
return Promise.reject(_data); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
showModal({ |
|||
title: '提示', |
|||
content: err.message || '加载用户失败!' |
|||
}) |
|||
console.warn('subpackage account pages list index getUserLs err --->', err); |
|||
// return Promise.reject(err); |
|||
}) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.li-list{ |
|||
padding: 24upx; |
|||
} |
|||
</style> |
@ -0,0 +1,49 @@ |
|||
<template> |
|||
<view class="check-status-bar" @click="$emit('click')"> |
|||
<view class="csb-left">待审核账号</view> |
|||
<view class="csb-right"> |
|||
<view class="cr-num">99</view> |
|||
<image |
|||
class="cr-icon" |
|||
mode="aspectFit" |
|||
src="/subpackage/account/static/images/arrow.png" |
|||
></image> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.check-status-bar{ |
|||
border-top: 2upx solid #f2f2f7; |
|||
padding: 44upx; |
|||
background: #fff; |
|||
@include ctf(space-between); |
|||
.csb-left{ |
|||
@include flcw($size: 32upx); |
|||
} |
|||
.csb-right{ |
|||
@include ctf(flex-end); |
|||
.cr-num{ |
|||
width: 40upx; |
|||
height: 40upx; |
|||
text-align: center; |
|||
border-radius: 50%; |
|||
background: #EA5061; |
|||
@include flcw(24upx, 40upx, #fff, 600); |
|||
@include tHide; |
|||
} |
|||
.cr-icon{ |
|||
margin-left: 20upx; |
|||
flex-shrink: 0; |
|||
width: 28upx; |
|||
height: 28upx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,43 @@ |
|||
<template> |
|||
<view class="input-bar"> |
|||
<view class="ib-frame"> |
|||
<image |
|||
class="if-icon" |
|||
mode="aspectFit" |
|||
src="/subpackage/account/static/images/search.png" |
|||
></image> |
|||
<input type="text" class="if-ipt" placeholder="输入账号/姓名查找"> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.input-bar{ |
|||
padding: 26upx 24upx; |
|||
background-color: #fff; |
|||
.ib-frame{ |
|||
padding: 0 20upx; |
|||
height: 92upx; |
|||
border-radius: 10upx; |
|||
background: #F2F2F7; |
|||
@include ctf; |
|||
.if-icon{ |
|||
margin-right: 20upx; |
|||
flex-shrink: 0; |
|||
width: 40upx; |
|||
height: 40upx; |
|||
} |
|||
.if-ipt{ |
|||
flex: 1; |
|||
height: 100%; |
|||
@include flcw($size: 32upx); |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,71 @@ |
|||
<template> |
|||
<view class="list-item"> |
|||
<view class="li-line">姓名:{{ name || '' }}</view> |
|||
<view class="li-line">登录账号:{{ account || '' }}</view> |
|||
<view class="li-line">创建时间:{{ time || '' }}</view> |
|||
<view class="li-btns"> |
|||
<view class="lb-btn" @click="$emit('click:message')">消息订阅</view> |
|||
<view class="lb-btn" @click="$emit('click:account')">账号权限</view> |
|||
</view> |
|||
<image |
|||
class="li-close" |
|||
mode="aspectFit" |
|||
src="/subpackage/account/static/images/delete.png" |
|||
@click="$emit('click:delete')" |
|||
></image> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
name: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
account: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
time: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.list-item{ |
|||
position: relative; |
|||
padding: 30upx; |
|||
border-radius: 10upx; |
|||
background: #fff; |
|||
.li-line{ |
|||
@include flcw(32upx, 56upx, #1A1A1A); |
|||
@include tHide; |
|||
} |
|||
.li-btns{ |
|||
margin-top: 34upx; |
|||
@include ctf(flex-end); |
|||
.lb-btn{ |
|||
width: 156upx; |
|||
height: 76upx; |
|||
text-align: center; |
|||
border-radius: 10upx; |
|||
background: $mColor; |
|||
@include flcw(24upx, 76upx, #fff); |
|||
&+.lb-btn{ |
|||
margin-left: 40upx; |
|||
} |
|||
} |
|||
} |
|||
.li-close{ |
|||
position: absolute; |
|||
right: 20upx; |
|||
top: 20upx; |
|||
width: 36upx; |
|||
height: 36upx; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,44 @@ |
|||
<template> |
|||
<view class="manage-add"> |
|||
<account-form></account-form> |
|||
<fixed-button>提交</fixed-button> |
|||
<success-modal title="提交成功" tip="请耐心等待管理员审核" ></success-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import account_form from "./modules/account_form.vue"; |
|||
import fixedButton from "../../components/fixed_button.vue"; |
|||
import success_modal from "./modules/apply/success_modal.vue"; |
|||
export default { |
|||
components: { |
|||
'account-form': account_form, |
|||
'success-modal': success_modal, |
|||
fixedButton, |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page{ |
|||
background: #fff; |
|||
} |
|||
.manage-add{ |
|||
padding-top: 20upx; |
|||
} |
|||
.from-input{ |
|||
padding: 0 56upx; |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,55 @@ |
|||
<template> |
|||
<view class="manage-apply"> |
|||
<stadium-info></stadium-info> |
|||
<view class="ma-border"></view> |
|||
<account-form></account-form> |
|||
<fixed-button>提交</fixed-button> |
|||
|
|||
<!-- <success-modal></success-modal> --> |
|||
<!-- <tip-modal></tip-modal> --> |
|||
<info-modal></info-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import stadium_info from "./modules/stadium_info.vue"; |
|||
import account_form from "./modules/account_form.vue"; |
|||
import fixedButton from "../../components/fixed_button.vue"; |
|||
import success_modal from "./modules/apply/success_modal.vue"; |
|||
import tip_modal from "./modules/apply/tip_modal.vue"; |
|||
import info_modal from "./modules/apply/info_modal.vue"; |
|||
export default { |
|||
components: { |
|||
'stadium-info': stadium_info, |
|||
'account-form': account_form, |
|||
'fixed-button': fixedButton, |
|||
'success-modal': success_modal, |
|||
'tip-modal': tip_modal, |
|||
'info-modal': info_modal |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page{ |
|||
background: #fff; |
|||
} |
|||
.manage-apply{ |
|||
.ma-border{ |
|||
margin-bottom: 16upx; |
|||
height: 24upx; |
|||
background: #f2f2f7; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,129 @@ |
|||
<template> |
|||
<view class="manage-check"> |
|||
<view class="mc-num-bar"> |
|||
<view class="mc-txt">审核 3 人</view> |
|||
</view> |
|||
<view class="mc-list"> |
|||
<view class="ml-item" v-for="i in 10" :key="i"> |
|||
<view class="mi-icon"> |
|||
<trigger-icon :selected="isSelect" @click="isSelect = !isSelect"></trigger-icon> |
|||
</view> |
|||
<view class="mi-content"> |
|||
<view class="mc-line">姓名:周小雨</view> |
|||
<view class="mc-line">登录账号:yaigigi</view> |
|||
<view class="mc-line">手机号码:18316362586</view> |
|||
<view class="mc-line">申请时间:2024-12-09 11:21:40</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="mc-fixed"> |
|||
<view class="mf-selector"> |
|||
<view class="ms-icon"> |
|||
<trigger-icon :selected="isSelect"></trigger-icon> |
|||
</view> |
|||
<view class="ms-view">全选</view> |
|||
</view> |
|||
<view class="mf-btn green" @click="passBtn">审核通过</view> |
|||
<view class="mf-btn" @click="unPassBtn">不通过</view> |
|||
</view> |
|||
<not-pass-modal ref="notPassModal"></not-pass-modal> |
|||
<pass-modal ref="passModal"></pass-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import not_pass_modal from "./modules/check/not_pass_modal.vue"; |
|||
import pass_modal from "./modules/check/pass_modal.vue"; |
|||
import trigger_icon from "../../components/trigger_icon.vue"; |
|||
export default { |
|||
components: { |
|||
'not-pass-modal': not_pass_modal, |
|||
'pass-modal': pass_modal, |
|||
'trigger-icon': trigger_icon |
|||
}, |
|||
data(){ |
|||
return { |
|||
isSelect: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
passBtn(){ |
|||
this.$refs.passModal.show(); |
|||
}, |
|||
unPassBtn(){ |
|||
this.$refs.notPassModal.show(); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page{ |
|||
background: #fff; |
|||
} |
|||
.manage-check{ |
|||
@include isPd(384upx); |
|||
.mc-num-bar{ |
|||
padding: 44upx 26upx; |
|||
border-bottom: 1px solid #E1E1E1; |
|||
.mc-txt{ |
|||
@include flcw(32upx, 44upx, #1A1A1A); |
|||
@include tHide; |
|||
} |
|||
} |
|||
.mc-list{ |
|||
padding: 0 24upx; |
|||
.ml-item{ |
|||
display: flex; |
|||
padding: 30upx 0upx; |
|||
border-bottom: 1upx solid #D8D8D8; |
|||
.mi-icon{ |
|||
flex-shrink: 0; |
|||
margin-right: 36upx; |
|||
} |
|||
.mi-content{ |
|||
.mc-line{ |
|||
@include flcw(28upx, 52upx, #333333); |
|||
@include tHide; |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
.mc-fixed{ |
|||
position: fixed; |
|||
left: 0; |
|||
bottom: 0; |
|||
width: 100%; |
|||
padding: 10upx 24upx; |
|||
@include isPd(10upx); |
|||
background: #fff; |
|||
.mf-selector{ |
|||
@include ctf; |
|||
.ms-icon{ |
|||
margin-right: 20upx; |
|||
flex-shrink: 0; |
|||
} |
|||
.ms-view{ |
|||
@include flcw(28upx, 40upx, #9C9C9F); |
|||
} |
|||
} |
|||
.mf-btn{ |
|||
margin-top: 40upx; |
|||
height: 112upx; |
|||
text-align: center; |
|||
border: 2upx solid $mColor; |
|||
border-radius: 10upx; |
|||
background: #fff; |
|||
@include flcw(32upx, 108upx, $mColor, 500); |
|||
&.green{ |
|||
background: $mColor; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,76 @@ |
|||
<template> |
|||
<view class="manage-methods"> |
|||
<view class="mm-box"> |
|||
<stadium-info></stadium-info> |
|||
</view> |
|||
<view class="mm-box"> |
|||
<method-bar icon="scan" title="扫描二维码申请加入" >申请后,需管理员审核通过才可使用账号</method-bar> |
|||
<view class="mm-code"> |
|||
<image class="mc-img"></image> |
|||
<view class="mc-txt">欧轩智能商家助手</view> |
|||
</view> |
|||
</view> |
|||
<view class="mm-box"> |
|||
<method-bar icon="wx" title="邀请微信朋友申请加入" isArrow>申请后,需管理员审核通过才可使用账号</method-bar> |
|||
</view> |
|||
<view class="mm-box"> |
|||
<method-bar icon="invite" title="手动添加账号" isArrow>添加账号后,凭账号密码可登录绑定商家助手</method-bar> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import stadium_info from "./modules/stadium_info.vue"; |
|||
import method_bar from "./modules/methods/method_bar.vue"; |
|||
export default { |
|||
components: { |
|||
'stadium-info': stadium_info, |
|||
'method-bar': method_bar |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page{ |
|||
background: $mColor; |
|||
} |
|||
.manage-methods{ |
|||
padding: 24upx; |
|||
} |
|||
.mm-box{ |
|||
border-radius: 10upx; |
|||
overflow: hidden; |
|||
background: #fff; |
|||
&+.mm-box{ |
|||
margin-top: 24upx; |
|||
} |
|||
} |
|||
|
|||
.mm-code{ |
|||
padding-bottom: 44upx; |
|||
.mc-img{ |
|||
display: block; |
|||
margin: 0 auto; |
|||
width: 296upx; |
|||
height: 296upx; |
|||
background: skyblue; |
|||
} |
|||
.mc-txt{ |
|||
margin-top: 20upx; |
|||
text-align: center; |
|||
@include flcw(24upx, 34upx, #9C9C9F); |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,58 @@ |
|||
<template> |
|||
<view class="account-form"> |
|||
<input-bar |
|||
star |
|||
label="登录账号" |
|||
placeholder="请输入登录账号" |
|||
tip="建议手机号,账号需唯一,提交后不可修改" |
|||
></input-bar> |
|||
<input-bar |
|||
star |
|||
label="密码" |
|||
type="password" |
|||
placeholder="请输入密码" |
|||
></input-bar> |
|||
<input-bar |
|||
star |
|||
label="确认密码" |
|||
type="password" |
|||
placeholder="请确认密码" |
|||
></input-bar> |
|||
<input-bar |
|||
star |
|||
label="姓名" |
|||
placeholder="请输入姓名" |
|||
></input-bar> |
|||
<input-bar |
|||
label="手机号码" |
|||
type="number" |
|||
placeholder="请输入手机号码" |
|||
></input-bar> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import input_bar from "./input_bar.vue"; |
|||
export default { |
|||
components: { |
|||
'input-bar': input_bar |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.account-form{ |
|||
padding: 0 56upx; |
|||
} |
|||
</style> |
@ -0,0 +1,45 @@ |
|||
<template> |
|||
<fixed-modal close title="申请详情"> |
|||
<view class="info-modal"> |
|||
<view class="im-line">状态:<text class="il-txt">待审核</text></view> |
|||
<view class="im-line">账号:yaiogjl</view> |
|||
<view class="im-line">密码:******</view> |
|||
<view class="im-line">姓名:张晓钰</view> |
|||
<view class="im-line">手机号码:15816542312</view> |
|||
</view> |
|||
</fixed-modal> |
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.info-modal{ |
|||
padding: 42upx 66upx 0; |
|||
.im-line{ |
|||
@include flcw(28upx, 58upx, #1A1A1A); |
|||
.il-txt{ |
|||
color: #EA5061; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,85 @@ |
|||
<template> |
|||
<fixed-modal :show="isShow"> |
|||
<view class="success-modal"> |
|||
<image class="sm-icon" mode="aspectFit" src="/subpackage/account/static/images/success.png"></image> |
|||
<view class="sm-txt" v-if="title"> |
|||
<slot name="title">{{ title }}</slot> |
|||
</view> |
|||
<view class="sm-btn" v-if="isButton"> |
|||
<modal-button green @click="$emit('click:button')"> |
|||
<slot name="button">{{ buttonTxt }}</slot> |
|||
</modal-button> |
|||
</view> |
|||
<view class="sm-tip" v-if="tip">{{ tip }}</view> |
|||
</view> |
|||
</fixed-modal> |
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
export default { |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
tip: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
buttonTxt: { |
|||
type: String, |
|||
default: '确认' |
|||
}, |
|||
isButton: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
isShow: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
show(){ |
|||
this.isShow = true |
|||
}, |
|||
hide(){ |
|||
this.isShow = false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.success-modal{ |
|||
.sm-icon{ |
|||
display: block; |
|||
margin: 0 auto; |
|||
width: 100upx; |
|||
height: 100upx; |
|||
} |
|||
.sm-txt{ |
|||
margin-top: 32upx; |
|||
text-align: center; |
|||
@include flcw(36upx, 50upx, #1A1A1A); |
|||
} |
|||
.sm-btn{ |
|||
margin-top: 96upx; |
|||
} |
|||
.sm-tip{ |
|||
margin-top: 38upx; |
|||
text-align: center; |
|||
@include flcw(28upx, 42upx, #9A9A9D); |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,42 @@ |
|||
<template> |
|||
<fixed-modal> |
|||
<view class="tip-modal"> |
|||
<view class="tm-txt">您已绑定账号,无需重复绑定</view> |
|||
<view class="tm-btn"> |
|||
<modal-button green>知道了</modal-button> |
|||
</view> |
|||
</view> |
|||
</fixed-modal> |
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.tm-txt{ |
|||
text-align: center; |
|||
@include flcw(28upx, 58upx, #1A1A1A); |
|||
} |
|||
.tm-btn{ |
|||
margin-top: 60upx; |
|||
} |
|||
</style> |
@ -0,0 +1,58 @@ |
|||
<template> |
|||
<fixed-modal :show="isShow"> |
|||
<view class="not-pass-modal"> |
|||
<image class="sm-icon" src="/subpackage/account/static/images/error.png"></image> |
|||
<view class="sm-txt">不通过</view> |
|||
<modal-button green @click="hide">返回</modal-button> |
|||
</view> |
|||
</fixed-modal> |
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
isShow: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
show(){ |
|||
this.isShow = true |
|||
}, |
|||
hide(){ |
|||
this.isShow = false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.not-pass-modal{ |
|||
.sm-icon{ |
|||
display: block; |
|||
margin: 0 auto; |
|||
width: 100upx; |
|||
height: 100upx; |
|||
} |
|||
.sm-txt{ |
|||
margin-top: 32upx; |
|||
margin-bottom: 68upx; |
|||
text-align: center; |
|||
@include flcw(36upx, 50upx, #1A1A1A); |
|||
} |
|||
.sm-tip{ |
|||
margin-top: 38upx; |
|||
text-align: center; |
|||
@include flcw(28upx, 42upx, #9A9A9D); |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,90 @@ |
|||
<template> |
|||
<fixed-modal close :show="isShow" @click:close="hide"> |
|||
<view class="pass-modal"> |
|||
<!-- <view class="pm-list" v-if="num <= 3"> |
|||
<view class="pl-item" v-for="i in num" :key="i"> |
|||
<view class="pi-content"> |
|||
<view class="pc-txt">姓名:刘星</view> |
|||
<view class="pc-txt">登录账号:yaigigi</view> |
|||
</view> |
|||
<view class="pi-btn">去配置权限</view> |
|||
</view> |
|||
</view> --> |
|||
<!-- <scroll-view class="pm-scroll-list" scroll-y v-else> --> |
|||
<scroll-view class="pm-scroll-list" scroll-y> |
|||
<view class="pl-item" v-for="i in num" :key="i"> |
|||
<view class="pi-content"> |
|||
<view class="pc-txt">姓名:刘星</view> |
|||
<view class="pc-txt">登录账号:yaigigi</view> |
|||
</view> |
|||
<view class="pi-btn" @click="toConfigPermission">去配置权限</view> |
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
</fixed-modal> |
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import { routeTo } from "@/utils/util"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
}, |
|||
data(){ |
|||
return { |
|||
num: 4, |
|||
isShow: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
show(){ |
|||
this.isShow = true |
|||
}, |
|||
hide(){ |
|||
this.isShow = false |
|||
}, |
|||
toConfigPermission(){ |
|||
routeTo(`/subpackage/account/pages/permission/edit`, 'nT'); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.pass-modal{ |
|||
padding: 40upx 20upx 0upx; |
|||
.pm-scroll-list{ |
|||
height: 500upx; |
|||
} |
|||
.pl-item{ |
|||
padding: 20upx; |
|||
border-radius: 10upx; |
|||
background: #F2F2F7; |
|||
@include ctf; |
|||
&+.pl-item{ |
|||
margin-top: 20upx; |
|||
} |
|||
.pi-content{ |
|||
flex-grow: 1; |
|||
.pc-txt{ |
|||
@include flcw(28upx, 52upx, #1A1A1A); |
|||
@include tHide; |
|||
} |
|||
} |
|||
.pi-btn{ |
|||
flex-shrink: 0; |
|||
margin-left: 12upx; |
|||
width: 160upx; |
|||
text-align: center; |
|||
border-radius: 10upx; |
|||
background: $mColor; |
|||
@include flcw(24upx, 64upx, #fff); |
|||
} |
|||
} |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,80 @@ |
|||
<template> |
|||
<view class="input-bar"> |
|||
<view class="ib-line"> |
|||
<view class="il-label"> |
|||
<text class="il-star" v-if="star">*</text>{{ label }} |
|||
</view> |
|||
<input |
|||
class="il-input" |
|||
:type="type" |
|||
:placeholder="placeholder" |
|||
@input="$emit('input', $event.target.value)" |
|||
:value="value" |
|||
/> |
|||
</view> |
|||
<view class="il-tip" v-if="tip">{{ tip }}</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props:{ |
|||
star: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
label: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: 'text' |
|||
}, |
|||
placeholder: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
tip: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
value: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.input-bar{ |
|||
padding: 20upx 0; |
|||
.ib-line{ |
|||
@include ctf(space-between); |
|||
.il-label{ |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
.il-star{ |
|||
color: #EA5061 |
|||
} |
|||
} |
|||
.il-input{ |
|||
box-sizing: border-box; |
|||
flex-shrink: 0; |
|||
width: 478upx; |
|||
height: 92upx; |
|||
padding: 0 24upx; |
|||
border-radius: 10upx; |
|||
background: #F2F2F7; |
|||
@include flcw(28upx, 40upx, #1a1a1a); |
|||
} |
|||
} |
|||
.il-tip{ |
|||
margin-top: 20upx; |
|||
margin-left: auto; |
|||
margin-right: 0; |
|||
width: 478upx; |
|||
@include flcw(24upx, 34upx, #EA5061); |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,63 @@ |
|||
<template> |
|||
<view class="method-bar"> |
|||
<image v-if="icon" class="mb-icon" mode="aspectFit" :src="'/subpackage/account/static/images/' + icon + '.png'"></image> |
|||
<view class="mb-content"> |
|||
<view class="mc-desc">{{ title }}</view> |
|||
<view class="mc-tip"> |
|||
<slot></slot> |
|||
</view> |
|||
</view> |
|||
<image v-if="isArrow" class="mb-arrow" mode="aspectFit" src="/subpackage/account/static/images/arrow.png"></image> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
icon: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
title: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isArrow: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.method-bar{ |
|||
padding: 38upx 24upx; |
|||
@include ctf(space-between); |
|||
.mb-icon{ |
|||
align-self: flex-start; |
|||
flex-shrink: 0; |
|||
margin-right: 20upx; |
|||
width: 52upx; |
|||
height: 52upx; |
|||
} |
|||
.mb-content{ |
|||
flex-grow: 1; |
|||
.mc-desc{ |
|||
@include flcw(32upx, 44upx, #1A1A1A); |
|||
@include tHide; |
|||
} |
|||
.mc-tip{ |
|||
margin-top: 8upx; |
|||
@include flcw(24upx, 34upx, #9C9C9F); |
|||
@include tHide; |
|||
} |
|||
} |
|||
.mb-arrow{ |
|||
flex-shrink: 0; |
|||
margin-left: 20upx; |
|||
width: 28upx; |
|||
height: 28upx; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<view class="stadium-info"> |
|||
<view class="si-line"> |
|||
<text class="sl-label">品牌名称:</text>欧轩智能场馆SaaS系统 |
|||
</view> |
|||
<view class="si-line"> |
|||
<text class="sl-label">品牌ID:</text>45 |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.stadium-info{ |
|||
padding: 34upx 32upx; |
|||
.si-line{ |
|||
@include flcw(32upx, 40upx, #1A1A1A, 500); |
|||
@include tHide; |
|||
.sl-label{ |
|||
@include flcw(28upx, 40upx, #1A1A1A, 400); |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,43 @@ |
|||
<template> |
|||
<view class="message-edit"> |
|||
<user-info></user-info> |
|||
<subscribe-function></subscribe-function> |
|||
<subscribe-stadium></subscribe-stadium> |
|||
<fixed-button @click="saveBtn">保存</fixed-button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import user_info from "../../components/user_info.vue"; |
|||
import fixedButton from "../../components/fixed_button.vue"; |
|||
import subscribe_function from "./modules/edit/subscribe_function.vue" |
|||
import subscribe_stadium from "./modules/edit/subscribe_stadium.vue" |
|||
import { showModal } from "@/utils/util.js"; |
|||
export default { |
|||
components: { |
|||
'user-info': user_info, |
|||
'fixed-button': fixedButton, |
|||
'subscribe-function': subscribe_function, |
|||
'subscribe-stadium': subscribe_stadium |
|||
}, |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
saveBtn(){ |
|||
showModal({ content: '是否保存修改?', }); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.message-edit{ |
|||
padding: 24upx; |
|||
} |
|||
</style> |
@ -0,0 +1,134 @@ |
|||
<template> |
|||
<view class="message-info"> |
|||
<user-info></user-info> |
|||
<info-container title="消息订阅"> |
|||
<template v-slot:title-right> |
|||
<view class="title-right"> |
|||
<view class="tr-left"> |
|||
<view class="tl-txt" v-if="false">已绑定(微信用户)</view> |
|||
<view class="tl-tag">未绑定</view> |
|||
</view> |
|||
<view class="tr-status" v-if="isBind">解绑</view> |
|||
<view class="tr-status bind-active" v-else @click="bindBtn">去绑定</view> |
|||
</view> |
|||
</template> |
|||
<template v-slot:content> |
|||
<view class="mi-content"> |
|||
<view class="mc-item"> |
|||
<view class="mi-tit">订阅模块</view> |
|||
<view class="mi-ls"> |
|||
<view class="ml-item" v-for="i in 5" :key="i"> |
|||
<permission-item active></permission-item> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="mc-item"> |
|||
<view class="mi-tit">订阅门店</view> |
|||
<view class="mi-ls-2"> |
|||
<view class="ml2-item" v-for="i in 3" :key="i"> |
|||
<permission-item active></permission-item> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
</info-container> |
|||
<fixed-button @click="changeMessageSubscriptions">修改消息订阅</fixed-button> |
|||
|
|||
<bind-modal ref="bindModal"></bind-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from '../../components/info_container.vue'; |
|||
import user_info from "../../components/user_info.vue"; |
|||
import fixedButton from "../../components/fixed_button.vue"; |
|||
import permission_item from '../../components/permission_item.vue'; |
|||
import bind_modal from "./modules/info/bind_modal.vue"; |
|||
import { routeTo } from "@/utils/util"; |
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer, |
|||
'user-info': user_info, |
|||
'fixed-button': fixedButton, |
|||
'permission-item': permission_item, |
|||
'bind-modal': bind_modal |
|||
}, |
|||
data(){ |
|||
return { |
|||
isBind: false, |
|||
brand_id: '' |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
this.brand_id = options?.brand_id || ''; |
|||
}, |
|||
methods: { |
|||
bindBtn(){ |
|||
this.$refs?.bindModal?.show?.(); |
|||
}, |
|||
changeMessageSubscriptions(){ |
|||
routeTo(`/subpackage/account/pages/message/edit?brand_id=${this.brand_id}`, 'nT') |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.title-right{ |
|||
@include ctf(space-between); |
|||
.tr-left{ |
|||
flex-grow: 1; |
|||
.tl-txt{ |
|||
@include flcw(24upx, 34upx, #9C9C9F); |
|||
@include tHide; |
|||
} |
|||
.tl-tag{ |
|||
display: inline-block; |
|||
padding: 0 8upx; |
|||
background: #EA5061; |
|||
border-radius: 6upx; |
|||
@include flcw(22upx, 32upx, #fff); |
|||
} |
|||
} |
|||
.tr-status{ |
|||
flex-shrink: 0; |
|||
margin-left: 10upx; |
|||
@include flcw(24upx, 34upx, #EA5061); |
|||
&.bind-active{ |
|||
color: $mColor; |
|||
} |
|||
} |
|||
} |
|||
.mi-content{ |
|||
padding: 0 20upx; |
|||
.mc-item + .mc-item{ |
|||
margin-top: 30upx; |
|||
} |
|||
.mi-tit{ |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
} |
|||
.mi-ls{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
padding-top: 30upx; |
|||
padding-bottom: 30upx; |
|||
border-bottom: 2upx solid #D8D8D8; |
|||
.ml-item{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 50%; |
|||
&:nth-child(n + 3){ |
|||
margin-top: 30upx; |
|||
} |
|||
} |
|||
} |
|||
.mi-ls-2{ |
|||
padding-top: 30upx; |
|||
.ml2-item + .ml2-item{ |
|||
margin-top: 30upx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,53 @@ |
|||
<template> |
|||
<select-container title="订阅模块" :is-all="isAll" @click:all="isAll = !isAll"> |
|||
<view class="jurisdiction-content"> |
|||
<view class="mjc-item" v-for="i in 3" :key="i"> |
|||
<jurisdiction-item |
|||
centre |
|||
:active='i%2 === 0' |
|||
></jurisdiction-item> |
|||
</view> |
|||
</view> |
|||
|
|||
</select-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import select_container from '../../../../components/select_container.vue'; |
|||
import jurisdiction_item from '../../../../components/jurisdiction_item.vue'; |
|||
export default { |
|||
components: { |
|||
'select-container': select_container, |
|||
'jurisdiction-item': jurisdiction_item |
|||
}, |
|||
data(){ |
|||
return { |
|||
isAll: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.jurisdiction-content{ |
|||
padding: 0 20upx; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: space-between; |
|||
.mjc-item{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 322upx; |
|||
&:nth-child(n + 3){ |
|||
margin-top: 20upx; |
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,46 @@ |
|||
<template> |
|||
<select-container title="订阅门店" :is-all="isAll" @click:all="isAll = !isAll"> |
|||
<view class="jurisdiction-content"> |
|||
<view class="mjc-item" v-for="i in 3" :key="i"> |
|||
<jurisdiction-item |
|||
:active='i%2 === 0' |
|||
></jurisdiction-item> |
|||
</view> |
|||
</view> |
|||
|
|||
</select-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import select_container from '../../../../components/select_container.vue'; |
|||
import jurisdiction_item from '../../../../components/jurisdiction_item.vue'; |
|||
export default { |
|||
components: { |
|||
'select-container': select_container, |
|||
'jurisdiction-item': jurisdiction_item |
|||
}, |
|||
data(){ |
|||
return { |
|||
isAll: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.jurisdiction-content{ |
|||
padding: 0 20upx; |
|||
.mjc-item{ |
|||
&:nth-child(n + 2){ |
|||
margin-top: 8upx; |
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,71 @@ |
|||
<template> |
|||
<fixed-modal title="绑定" :show="isShow" close @click:close="hide"> |
|||
<view class="bind-modal"> |
|||
<image class="bm-code-img"></image> |
|||
<view class="bm-tip">截图转发/点击放大图片后长按识别绑定账号,并关注“欧轩智能场馆”公众号接收消息</view> |
|||
<view class="bm-btn-frame"> |
|||
<view class="bbf-tip">本人微信号绑定的可点击按钮去绑定</view> |
|||
<modal-button green>去绑定</modal-button> |
|||
</view> |
|||
</view> |
|||
</fixed-modal> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
isShow: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
show(){ |
|||
this.isShow = true; |
|||
}, |
|||
hide(){ |
|||
this.isShow = false; |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.bind-modal{ |
|||
.bm-code-img{ |
|||
display: block; |
|||
margin: 40upx auto 0upx; |
|||
width: 296upx; |
|||
height: 296upx; |
|||
background: skyblue; |
|||
} |
|||
.bm-tip{ |
|||
margin-top: 12upx; |
|||
padding: 0 68upx; |
|||
text-align: center; |
|||
@include flcw(24upx, 40upx, #1A1A1A); |
|||
} |
|||
.bm-btn-frame{ |
|||
margin: 72upx auto 0upx; |
|||
padding-top: 44upx; |
|||
width: 518upx; |
|||
height: 272upx; |
|||
border-radius: 10upx; |
|||
background: #F2F2F7; |
|||
.bbf-tip{ |
|||
margin-bottom: 40upx; |
|||
text-align: center; |
|||
@include flcw(28upx, 42upx, #1A1A1A, 500); |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,90 @@ |
|||
<template> |
|||
<view class="permission-edit"> |
|||
<user-info |
|||
:name="userInfo.name" |
|||
:account="userInfo.account" |
|||
></user-info> |
|||
<admin-jurisdiction ref="adminJurisdiction" v-model="admin_permission_id"></admin-jurisdiction> |
|||
<min-jurisdiction v-model="miniPermissionLs"></min-jurisdiction> |
|||
<cashier-jurisdiction></cashier-jurisdiction> |
|||
<stadium-jurisdiction ref="stadiumJurisdiction" v-model="stadiumPermissionLs"></stadium-jurisdiction> |
|||
<fixed-button @click="saveBtn">保存</fixed-button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import user_info from "../../components/user_info.vue"; |
|||
import admin_jurisdiction from "./modules/edit/admin_jurisdiction.vue"; |
|||
import min_jurisdiction from "./modules/edit/min_jurisdiction.vue"; |
|||
import cashier_jurisdiction from "./modules/edit/cashier_jurisdiction.vue"; |
|||
import stadium_jurisdiction from "./modules/edit/stadium_jurisdiction.vue"; |
|||
import fixedButton from "../../components/fixed_button.vue"; |
|||
import { showModal, debounce, jsonPar } from "@/utils/util.js"; |
|||
export default { |
|||
components: { |
|||
'user-info': user_info, |
|||
'admin-jurisdiction': admin_jurisdiction, |
|||
'min-jurisdiction': min_jurisdiction, |
|||
'cashier-jurisdiction': cashier_jurisdiction, |
|||
'stadium-jurisdiction': stadium_jurisdiction, |
|||
'fixed-button': fixedButton |
|||
}, |
|||
computed: { |
|||
userInfo(){ |
|||
return this.optionsQuery?.userInfo ?? {}; |
|||
}, |
|||
}, |
|||
data(){ |
|||
return { |
|||
brand_id: '', |
|||
optionsQuery: { |
|||
/** |
|||
* @param {Array} miniPermissionLs 商家助手小程序权限列表 |
|||
* @param {Array} stadiumPermissionLs 门店权限列表 |
|||
* @param {Number} admin_permission_id 后台权限 |
|||
* @param {Object} userInfo 用户信息 |
|||
* @param {Number} userInfo.id |
|||
* @param {String} userInfo.account |
|||
* @param {String} userInfo.name |
|||
*/ |
|||
}, |
|||
// 小程序权限列表 |
|||
miniPermissionLs: [], |
|||
// 店铺权限列表 |
|||
stadiumPermissionLs: [], |
|||
// |
|||
admin_permission_id: -1, |
|||
} |
|||
}, |
|||
onReady(){ |
|||
let { brand_id } = this; |
|||
this.$refs.stadiumJurisdiction?.getStadiumLs?.(brand_id); |
|||
this.$refs.adminJurisdiction?.getAllGroup?.({ brand_id }); |
|||
}, |
|||
onLoad(options){ |
|||
let { brand_id, query_json } = options; |
|||
let optQuery = jsonPar(query_json ?? '{}'); |
|||
console.warn('edit options =>', optQuery); |
|||
this.brand_id = brand_id ?? ''; |
|||
this.optionsQuery = optQuery; |
|||
this.miniPermissionLs = optQuery?.miniPermissionLs ?? []; |
|||
this.stadiumPermissionLs = optQuery?.stadiumPermissionLs ?? []; |
|||
this.admin_permission_id = optQuery?.admin_permission_id ?? -1; |
|||
}, |
|||
methods: { |
|||
saveBtn: debounce(function(){ |
|||
let { miniPermissionLs, stadiumPermissionLs, admin_permission_id } = this; |
|||
showModal({ content: '是否保存该账号权限?', }); |
|||
console.warn('miniPermissionLs =>', miniPermissionLs); |
|||
console.warn('stadiumPermissionLs =>', stadiumPermissionLs); |
|||
console.warn('admin_permission_id =>', admin_permission_id); |
|||
}, 300, true), |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.permission-edit{ |
|||
padding: 24upx; |
|||
} |
|||
</style> |
@ -0,0 +1,204 @@ |
|||
<template> |
|||
<view class="permission-info"> |
|||
<user-info |
|||
:name="userInfo.actual_name" |
|||
:account="userInfo.username" |
|||
:time="userInfo.created_at" |
|||
edit |
|||
@click:edit="userInfoEdit" |
|||
@click:delete="userDelete" |
|||
@click:changePSW="changePassword" |
|||
></user-info> |
|||
<admin-permission |
|||
:permission-name="permission.permission_name || ''" |
|||
:is-admin="!!permission.id" |
|||
></admin-permission> |
|||
<min-permission |
|||
@click:unbind="unbindWXAccount" |
|||
:obtained-permission-arr="miniPermissionLs" |
|||
:is-bind-wx="userInfo.status === 1" |
|||
:nick-name="userInfo.nickname" |
|||
></min-permission> |
|||
<cashier-permission></cashier-permission> |
|||
<stadium-permission |
|||
ref="stadiumPermisson" |
|||
:permission-list="stadiumPermissionLs" |
|||
></stadium-permission> |
|||
<fixed-button @click="editAuthority">修改权限</fixed-button> |
|||
|
|||
<edit-password ref="editPassword"></edit-password> |
|||
<edit-account ref="editAccount"></edit-account> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import user_info from "../../components/user_info.vue"; |
|||
import adminPermission from "./modules/info/admin_permission.vue"; |
|||
import minPermission from "./modules/info/min_permission.vue"; |
|||
import cashierPermission from "./modules/info/cashier_permission.vue"; |
|||
import stadiumPermission from "./modules/info/stadium_permission.vue"; |
|||
import fixedButton from "../../components/fixed_button.vue"; |
|||
import editPassword from "./modules/info/edit_password.vue"; |
|||
import edit_account from "./modules/info/edit_account.vue"; |
|||
|
|||
import { routeTo, showModal, showLoad, hideLoad, showNone, jsonStr } from "@/utils/util.js"; |
|||
import { ACCOUNT_API } from "../../js/api.js"; |
|||
import server from "../../js/server.js"; |
|||
import { userDelete } from "../../js/handle.js"; |
|||
export default { |
|||
components: { |
|||
'admin-permission': adminPermission, |
|||
'min-permission': minPermission, |
|||
'cashier-permission': cashierPermission, |
|||
'stadium-permission': stadiumPermission, |
|||
'fixed-button': fixedButton, |
|||
'edit-password': editPassword, |
|||
'edit-account': edit_account, |
|||
'user-info': user_info |
|||
}, |
|||
computed: { |
|||
// 后台权限信息 |
|||
permission(){ |
|||
return this.userInfo?.extension?.permission ?? {}; |
|||
}, |
|||
// 商家助手小程序权限 |
|||
miniPermissionLs(){ |
|||
return this.userInfo?.extension?.assistant_permission?.menu ?? []; |
|||
}, |
|||
// 门店权限 |
|||
stadiumPermissionLs(){ |
|||
return this.userInfo?.extension?.assistant_permission?.tags ?? []; |
|||
} |
|||
}, |
|||
data(){ |
|||
return { |
|||
brand_id: '', |
|||
userInfo: {}, |
|||
} |
|||
}, |
|||
async onLoad(options){ |
|||
this.brand_id = options?.brand_id || ''; |
|||
await this.userGet({ id: options?.id }); |
|||
this.$refs.stadiumPermisson?.getStadiumLs?.(options?.brand_id); |
|||
}, |
|||
methods: { |
|||
userInfoEdit(){ |
|||
let { userInfo, brand_id } = this; |
|||
if(!userInfo?.id)return showNone('用户信息有误!'); |
|||
this.$refs?.editAccount?.show(); |
|||
}, |
|||
changePassword(){ |
|||
let { userInfo, brand_id } = this; |
|||
if(!userInfo?.id)return showNone('用户信息有误!'); |
|||
this.$refs?.editPassword?.show({ |
|||
success: async pRes =>{ |
|||
console.log('pRes', pRes); |
|||
this.userEdit({ |
|||
id: userInfo?.id ?? '', |
|||
brand_id: brand_id ?? '', |
|||
password: pRes.new, |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
userDelete(){ |
|||
let { userInfo } = this; |
|||
if(!userInfo?.id)return showNone('用户信息有误!'); |
|||
showModal({ |
|||
content: '是否删除该账号?', |
|||
success: async res => { |
|||
if(res.confirm){ |
|||
showLoad(); |
|||
let _delRes = await userDelete({ id: userInfo?.id ?? '' }); |
|||
hideLoad(); |
|||
if(_delRes === 'success'){ |
|||
showNone('操作成功!'); |
|||
setTimeout(routeTo, 1000); |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
editAuthority(){ |
|||
let { brand_id, userInfo, miniPermissionLs, stadiumPermissionLs } = this; |
|||
if(!userInfo?.id)return showNone('用户信息有误!'); |
|||
let _query = { |
|||
userInfo: { |
|||
id: userInfo?.id ?? '', |
|||
name: userInfo?.actual_name ?? '', |
|||
account: userInfo?.username ?? '', |
|||
}, |
|||
miniPermissionLs, |
|||
stadiumPermissionLs, |
|||
admin_permission_id: userInfo?.extension?.permission?.id ?? '', |
|||
} |
|||
routeTo(`/subpackage/account/pages/permission/edit?brand_id=${brand_id}&query_json=${jsonStr(_query)}`, 'nT'); |
|||
}, |
|||
unbindWXAccount(){ |
|||
showModal({ content: '是否解绑该账号?', }); |
|||
}, |
|||
// B会员管理-小程序用户管理-用户信息列表-用户信息详情 |
|||
userGet({ id, scene = "商家助手成员" }){ |
|||
showLoad(); |
|||
return server.post({ |
|||
url: ACCOUNT_API.userGet + `/${id}`, |
|||
data: { scene }, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res => { |
|||
hideLoad(); |
|||
let _data = res?.data || {}; |
|||
if(_data.code === 0){ |
|||
console.log('subpackage account pages permission info userGet res --->', _data?.data); |
|||
return this.userInfo = _data?.data ?? {}; |
|||
}else{ |
|||
return Promise.reject(_data); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
showModal({ |
|||
title: '提示', |
|||
content: err.message || '加载失败!' |
|||
}) |
|||
console.warn('subpackage account pages permission info userGet err --->', err); |
|||
// return Promise.reject(err); |
|||
}) |
|||
}, |
|||
// 权限管理-编辑管理员信息 |
|||
userEdit({ id, brand_id, ...res }){ |
|||
showLoad(); |
|||
return server.post({ |
|||
url: ACCOUNT_API.userEdit, |
|||
data: { id, brand_id, ...res }, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res => { |
|||
hideLoad(); |
|||
let _data = res?.data || {}; |
|||
if(_data.code === 0){ |
|||
console.log('subpackage account pages permission info userEdit res --->', _data); |
|||
showModal({ content: _data.message || '操作成功!' }); |
|||
return _data; |
|||
}else{ |
|||
return Promise.reject(_data); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
showModal({ |
|||
title: '提示', |
|||
content: err.message || '加载失败!' |
|||
}) |
|||
console.warn('subpackage account pages permission info userEdit err --->', err); |
|||
// return Promise.reject(err); |
|||
}) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.permission-info{ |
|||
padding: 24upx; |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,130 @@ |
|||
<template> |
|||
<info-container title="后台权限"> |
|||
<template v-slot:title-right> |
|||
<view class="aj-title-right"> |
|||
<switch color="#009874" style="transform:scale(0.7)" :checked="switchChecked"></switch> |
|||
</view> |
|||
</template> |
|||
<template v-slot:content> |
|||
<view class="aj-content"> |
|||
<picker :range="permissionList" range-key="permission_name" :value="curPickerIdx" @change="pickerChange"> |
|||
<view class="ac-frame"> |
|||
<input class="af-ipt" disabled type="text" :value="curPermissionInfo.permission_name || ''" /> |
|||
<image class="af-icon" mode="aspectFit" src="/subpackage/account/static/images/arrow.png"></image> |
|||
</view> |
|||
</picker> |
|||
</view> |
|||
</template> |
|||
</info-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from '../../../../components/info_container.vue'; |
|||
|
|||
import { routeTo, showModal, showLoad, hideLoad, showNone, jsonStr } from "@/utils/util.js"; |
|||
import { ACCOUNT_API } from "../../../../js/api.js"; |
|||
import server from "../../../../js/server.js"; |
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer |
|||
}, |
|||
props: { |
|||
value: { |
|||
default: -1, |
|||
} |
|||
}, |
|||
computed: { |
|||
adminId: { |
|||
get(){ |
|||
return +this.value; |
|||
}, |
|||
set(val){ |
|||
this.$emit('input', val); |
|||
} |
|||
}, |
|||
curPermissionInfo(){ |
|||
let { adminId, permissionList } = this; |
|||
return permissionList.find(ele => +ele.id === +adminId) || {}; |
|||
}, |
|||
curPickerIdx(){ |
|||
let { permissionList, adminId } = this; |
|||
return permissionList.findIndex(ele => +ele.id === +adminId); |
|||
} |
|||
}, |
|||
data(){ |
|||
return { |
|||
permissionList: [], |
|||
switchChecked: false |
|||
} |
|||
}, |
|||
methods: { |
|||
pickerChange(e){ |
|||
let { permissionList } = this; |
|||
let { value } = e.detail; |
|||
let _curInfo = permissionList?.[value] || {}; |
|||
if(!_curInfo.id)return; |
|||
this.adminId = _curInfo.id; |
|||
}, |
|||
// 权限管理-获取所有权限组 |
|||
getAllGroup({ brand_id }){ |
|||
showLoad(); |
|||
return server.post({ |
|||
url: ACCOUNT_API.getAllGroup, |
|||
data: { role_id: `ADMIN-BRAND-${brand_id}`, brand_id }, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res => { |
|||
hideLoad(); |
|||
let _data = res?.data || {}; |
|||
if(_data.code === 0){ |
|||
let _ls = _data?.data ?? []; |
|||
if(_ls?.length)this.echoData(_ls); |
|||
return this.permissionList = _ls; |
|||
}else{ |
|||
return Promise.reject(_data); |
|||
} |
|||
}) |
|||
.catch(err => { |
|||
showModal({ |
|||
title: '提示', |
|||
content: err.message || '加载失败!' |
|||
}) |
|||
console.warn('subpackage account pages permission modules info admin_permission err --->', err); |
|||
// return Promise.reject(err); |
|||
}) |
|||
}, |
|||
echoData(list){ |
|||
let { adminId } = this; |
|||
this.switchChecked = list.some(ele=> ele.id === +adminId) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.aj-title-right{ |
|||
@include ctf(flex-end); |
|||
} |
|||
.aj-content{ |
|||
padding: 0 20upx; |
|||
.ac-frame{ |
|||
padding: 0 20upx; |
|||
height: 92upx; |
|||
border-radius: 10upx; |
|||
background: #F2F2F7; |
|||
@include ctf(space-between); |
|||
.af-ipt{ |
|||
flex: 1; |
|||
height: 100%; |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
} |
|||
.af-icon{ |
|||
margin-left: 10upx; |
|||
flex-shrink: 0; |
|||
width: 28upx; |
|||
height: 28upx; |
|||
transform: rotate(90deg); |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,50 @@ |
|||
<template> |
|||
<select-container title="收银系统权限" :is-all="isAll" @click:all="isAll = !isAll"> |
|||
<view class="jurisdiction-content"> |
|||
<view class="mjc-item" v-for="i in 3" :key="i"> |
|||
<jurisdiction-item |
|||
centre |
|||
:active='i%2 === 0' |
|||
></jurisdiction-item> |
|||
</view> |
|||
</view> |
|||
|
|||
</select-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import select_container from '../../../../components/select_container.vue'; |
|||
import jurisdiction_item from '../../../../components/jurisdiction_item.vue'; |
|||
export default { |
|||
components: { |
|||
'select-container': select_container, |
|||
'jurisdiction-item': jurisdiction_item |
|||
}, |
|||
data(){ |
|||
return { |
|||
isAll: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.jurisdiction-content{ |
|||
padding: 0 14upx; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
.mjc-item{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 216upx; |
|||
margin: 0 4upx 8upx; |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,82 @@ |
|||
<template> |
|||
<select-container title="商家助手小程序权限" :is-all="isAll" @click:all="allSelectedBtn"> |
|||
<view class="jurisdiction-content"> |
|||
<view class="mjc-item" v-for="(e, i) in permissionArr" :key="i"> |
|||
<jurisdiction-item |
|||
centre |
|||
:active='selectedIds.includes(+e.key)' |
|||
@click="itemClick(e)" |
|||
>{{ e.name || '' }}</jurisdiction-item> |
|||
</view> |
|||
</view> |
|||
|
|||
</select-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import select_container from '../../../../components/select_container.vue'; |
|||
import jurisdiction_item from '../../../../components/jurisdiction_item.vue'; |
|||
import { mapGetters } from "vuex"; |
|||
export default { |
|||
components: { |
|||
'select-container': select_container, |
|||
'jurisdiction-item': jurisdiction_item |
|||
}, |
|||
props: { |
|||
value: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters(['permissionArr']), |
|||
selectedIds: { |
|||
get(){ |
|||
return this.value?.map?.(item=>+item); |
|||
}, |
|||
set(val){ |
|||
this.$emit('input', val); |
|||
} |
|||
}, |
|||
isAll(){ |
|||
let { permissionArr, selectedIds } = this; |
|||
return permissionArr.every(item=>selectedIds.includes(+item.key)); |
|||
} |
|||
}, |
|||
methods: { |
|||
itemClick(e){ |
|||
let { selectedIds } = this; |
|||
if(selectedIds.includes(+e.key)){ |
|||
this.selectedIds = selectedIds.filter(item=>item !== +e.key); |
|||
}else{ |
|||
this.selectedIds = selectedIds.concat(+e.key); |
|||
} |
|||
}, |
|||
// 全选 |
|||
allSelectedBtn(){ |
|||
let { permissionArr, selectedIds, isAll } = this; |
|||
let _pIds = permissionArr.map(item => +item.key); |
|||
if(isAll){ |
|||
this.selectedIds = selectedIds.filter(item => !_pIds.includes(item)); |
|||
}else{ |
|||
this.selectedIds = [ ...new Set([...selectedIds, ..._pIds]) ]; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.jurisdiction-content{ |
|||
padding: 0 14upx; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
.mjc-item{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 216upx; |
|||
margin: 0upx 4upx 8upx; |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,88 @@ |
|||
<template> |
|||
<select-container title="门店权限" :is-all="isAll" @click:all="allSelectedBtn"> |
|||
<view class="jurisdiction-content"> |
|||
<view class="mjc-item" v-for="(e, i) in stadiumLs" :key="i"> |
|||
<jurisdiction-item |
|||
:active='selectedIds.includes(+e.id)' |
|||
@click="itemClick(e)" |
|||
>{{ e.name || '-' }}</jurisdiction-item> |
|||
</view> |
|||
</view> |
|||
|
|||
</select-container> |
|||
</template> |
|||
|
|||
<script> |
|||
import select_container from '../../../../components/select_container.vue'; |
|||
import jurisdiction_item from '../../../../components/jurisdiction_item.vue'; |
|||
import { getStadiumList } from "../../../../js/handle"; |
|||
export default { |
|||
components: { |
|||
'select-container': select_container, |
|||
'jurisdiction-item': jurisdiction_item |
|||
}, |
|||
data(){ |
|||
return { |
|||
stadiumLs: [], |
|||
} |
|||
}, |
|||
props: { |
|||
value: { |
|||
type: Array, |
|||
default: [] |
|||
} |
|||
}, |
|||
computed: { |
|||
selectedIds: { |
|||
get(){ |
|||
return this.value?.map?.(item=>+item); |
|||
}, |
|||
set(val){ |
|||
this.$emit('input', val); |
|||
} |
|||
}, |
|||
isAll(){ |
|||
let { stadiumLs, selectedIds } = this; |
|||
return stadiumLs.every(item=>selectedIds.includes(+item.id)); |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
async getStadiumLs(bid){ |
|||
let _res = await getStadiumList({ brand_id: bid }); |
|||
let _ls = _res?.list ?? []; |
|||
this.stadiumLs = _ls; |
|||
}, |
|||
itemClick(e){ |
|||
let { selectedIds } = this; |
|||
if(selectedIds.includes(+e.id)){ |
|||
this.selectedIds = selectedIds.filter(item=>item !== +e.id); |
|||
}else{ |
|||
this.selectedIds = selectedIds.concat(+e.id); |
|||
} |
|||
}, |
|||
// 全选 |
|||
allSelectedBtn(){ |
|||
let { stadiumLs, selectedIds, isAll } = this; |
|||
let _pIds = stadiumLs.map(item => +item.id); |
|||
if(isAll){ |
|||
this.selectedIds = selectedIds.filter(item => !_pIds.includes(item)); |
|||
}else{ |
|||
this.selectedIds = [ ...new Set([...selectedIds, ..._pIds]) ]; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.jurisdiction-content{ |
|||
padding: 0 20upx; |
|||
.mjc-item + .mjc-item{ |
|||
margin-top: 8upx; |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,49 @@ |
|||
<template> |
|||
<view class="admin-permission"> |
|||
<info-container title="后台权限"> |
|||
<template v-slot:title-right> |
|||
<view class="ap-title-right"> |
|||
<view class="atr-name">修改需前往后台定义权限组</view> |
|||
<switch disabled color="#009874" style="transform:scale(0.7)" :checked="isAdmin"></switch> |
|||
</view> |
|||
</template> |
|||
<template v-slot:content> |
|||
<view class="ap-content" v-if="permissionName">权限级别名称:{{ permissionName }}</view> |
|||
</template> |
|||
</info-container> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from '../../../../components/info_container.vue'; |
|||
|
|||
|
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer |
|||
}, |
|||
props: { |
|||
isAdmin: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
permissionName: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.ap-title-right{ |
|||
@include ctf(space-between); |
|||
.atr-name{ |
|||
@include flcw(24upx, 34upx, #9C9C9F); |
|||
} |
|||
} |
|||
.ap-content{ |
|||
padding: 0upx 20upx; |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
} |
|||
</style> |
@ -0,0 +1,43 @@ |
|||
<template> |
|||
<view class="min-permission"> |
|||
<info-container title="收银系统权限"> |
|||
<template v-slot:content> |
|||
<view class="mp-content"> |
|||
<view class="mc-item" v-for="i in 3" :key="i"> |
|||
<permission-item :active="i%3 === 0"></permission-item> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
</info-container> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from '../../../../components/info_container.vue'; |
|||
import permissionItem from '../../../../components/permission_item.vue'; |
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer, |
|||
'permission-item': permissionItem |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.min-permission{ |
|||
.mp-content{ |
|||
padding: 0 20upx; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: space-between; |
|||
.mc-item{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 188upx; |
|||
&:nth-child(n + 4){ |
|||
margin-top: 20upx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,93 @@ |
|||
<template> |
|||
<fixed-modal title="修改账号信息" :show="isShow" close @click:close="hide"> |
|||
<view class="edit-account"> |
|||
<view class="ea-num">登录账号:liuhuo2524</view> |
|||
<view class="ea-tip">账号具有唯一性,不支持更改。</view> |
|||
<view class="edit-ipt"> |
|||
<view class="ep-item"> |
|||
<view class="ei-label"><text class="el-star">*</text>姓名</view> |
|||
<input class="ei-input" type="password" placeholder="请输入" /> |
|||
</view> |
|||
<view class="ep-item"> |
|||
<view class="ei-label">手机号码</view> |
|||
<input class="ei-input" type="password" placeholder="请输入手机号码" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<modal-button green>确认修改</modal-button> |
|||
</fixed-modal> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
isShow: false |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
show(){ |
|||
this.isShow = true; |
|||
}, |
|||
hide(){ |
|||
this.isShow = false; |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.edit-account{ |
|||
padding-top: 56upx; |
|||
padding-bottom: 60upx; |
|||
.ea-num{ |
|||
padding: 0 40upx; |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
@include tHide; |
|||
} |
|||
.ea-tip{ |
|||
padding: 0 40upx; |
|||
margin-top: 20upx; |
|||
@include flcw(24upx, 40upx, #EA5061); |
|||
} |
|||
.edit-ipt{ |
|||
margin-top: 46upx; |
|||
} |
|||
.ep-item{ |
|||
padding: 0 40upx; |
|||
@include ctf(space-between); |
|||
.ei-label{ |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
.el-star{ |
|||
margin-right: 10upx; |
|||
color: #EA5061; |
|||
} |
|||
} |
|||
.ei-input{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 406upx; |
|||
box-sizing: border-box; |
|||
margin-top: 20upx; |
|||
padding: 0 20upx; |
|||
height: 88upx; |
|||
border-radius: 10upx; |
|||
border: 2upx solid #D8D8D8; |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
} |
|||
& + .ep-item{ |
|||
margin-top: 20upx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,89 @@ |
|||
<template> |
|||
<fixed-modal title="修改密码" :show="isShow" close @click:close="hide"> |
|||
<view class="edit-password"> |
|||
<view class="ep-item"> |
|||
<view class="ei-label"><text class="el-star">*</text>新密码</view> |
|||
<input class="ei-input" type="password" placeholder="请输入新密码" v-model="password.new" /> |
|||
</view> |
|||
<view class="ep-item"> |
|||
<view class="ei-label"><text class="el-star">*</text>确认新密码</view> |
|||
<input class="ei-input" type="password" placeholder="请确认新密码" v-model="password.confirm" /> |
|||
</view> |
|||
</view> |
|||
<modal-button green @click="confirmModify">确认修改</modal-button> |
|||
</fixed-modal> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import fixedModal from "../../../../components/fixed_modal.vue"; |
|||
import modalButton from "../../../../components/modal_button.vue"; |
|||
import { showNone, showModal } from "@/utils/util"; |
|||
export default { |
|||
components: { |
|||
'fixed-modal': fixedModal, |
|||
'modal-button': modalButton |
|||
}, |
|||
data(){ |
|||
return { |
|||
isShow: false, |
|||
initData: {}, |
|||
password: { |
|||
new: '', |
|||
confirm: '' |
|||
} |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
show(data){ |
|||
this.isShow = true; |
|||
this.initData = data ?? {}; |
|||
this.password = {new: '', confirm: ''}; |
|||
}, |
|||
hide(){ |
|||
this.isShow = false; |
|||
}, |
|||
confirmModify(){ |
|||
let { initData, password } = this; |
|||
let { new: nPsw, confirm: cPsw } = password; |
|||
if(!nPsw)return showNone('请输入新密码!'); |
|||
if(nPsw?.length < 6)return showNone('新密码不能小于6位!'); |
|||
if(nPsw !== cPsw)return showNone('密码不一致!'); |
|||
this.hide(); |
|||
initData?.success?.(password); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.edit-password{ |
|||
padding-top: 56upx; |
|||
padding-bottom: 60upx; |
|||
.ep-item{ |
|||
padding: 0 40upx; |
|||
.ei-label{ |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
.el-star{ |
|||
margin-right: 10upx; |
|||
color: #EA5061; |
|||
} |
|||
} |
|||
.ei-input{ |
|||
display: block; |
|||
margin-top: 20upx; |
|||
padding: 0 20upx; |
|||
height: 88upx; |
|||
border-radius: 10upx; |
|||
border: 2upx solid #D8D8D8; |
|||
@include flcw(28upx, 40upx, #1A1A1A); |
|||
} |
|||
& + .ep-item{ |
|||
margin-top: 30upx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,93 @@ |
|||
<template> |
|||
<view class="min-permission"> |
|||
<info-container title="商家助手小程序权限"> |
|||
<template v-slot:title-right> |
|||
<view class="mp-tr-content"> |
|||
<block v-if="isBindWx"> |
|||
<view class="mtc-name">已绑定({{ nickName || '-' }})</view> |
|||
<view class="mtc-status" @click="$emit('click:unbind')">解绑</view> |
|||
</block> |
|||
<block v-else> |
|||
<view class="mtc-name"> </view> |
|||
<view class="mtc-status green">去绑定</view> |
|||
</block> |
|||
|
|||
</view> |
|||
</template> |
|||
<template v-slot:content> |
|||
<view class="mp-content"> |
|||
<view class="mc-item" v-for="(e, i) in permissionArr" :key="i"> |
|||
<permission-item :active="obtainedPermissionArr.includes(+e.key)">{{ e.name || '' }}</permission-item> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
</info-container> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from '../../../../components/info_container.vue'; |
|||
import permissionItem from '../../../../components/permission_item.vue'; |
|||
import { mapGetters } from "vuex"; |
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer, |
|||
'permission-item': permissionItem |
|||
}, |
|||
computed: { |
|||
...mapGetters(['permissionArr']) |
|||
}, |
|||
props: { |
|||
obtainedPermissionArr: { |
|||
type: Array, |
|||
default: () => [] |
|||
}, |
|||
isBindWx: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
nickName: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.min-permission{ |
|||
.mp-tr-content{ |
|||
@include ctf(space-between); |
|||
.mtc-name{ |
|||
flex-grow: 1; |
|||
@include flcw(24upx, 34upx, #9C9C9F); |
|||
@include tHide; |
|||
} |
|||
.mtc-status{ |
|||
margin-left: 10upx; |
|||
flex-shrink: 0; |
|||
@include flcw(24upx, 34upx, #EA5061); |
|||
&.green{ |
|||
color: $mColor; |
|||
} |
|||
} |
|||
} |
|||
.mp-content{ |
|||
padding: 0 20upx; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: space-between; |
|||
.mc-item{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
width: 188upx; |
|||
&:nth-child(n + 4){ |
|||
margin-top: 20upx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,57 @@ |
|||
<template> |
|||
<view class="stadium-permission"> |
|||
<info-container title="门店权限"> |
|||
<template v-slot:content> |
|||
<view class="sp-content"> |
|||
<view class="sp-item" v-for="(e, i) in stadiumLs" :key="i"> |
|||
<permission-item :active="permissionList.includes(e.id + '')">{{ e.name || '-' }}</permission-item> |
|||
</view> |
|||
</view> |
|||
|
|||
</template> |
|||
</info-container> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import infoContainer from '../../../../components/info_container.vue'; |
|||
import permissionItem from '../../../../components/permission_item.vue'; |
|||
import { getStadiumList } from "../../../../js/handle"; |
|||
import { showLoad, hideLoad } from "@/utils/util.js"; |
|||
export default { |
|||
components: { |
|||
'info-container': infoContainer, |
|||
'permission-item': permissionItem |
|||
}, |
|||
props: { |
|||
permissionList: { |
|||
type: Array, |
|||
default: () => [] |
|||
} |
|||
}, |
|||
data(){ |
|||
return { |
|||
stadiumLs: [], |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
async getStadiumLs(bid){ |
|||
showLoad(); |
|||
let _res = await getStadiumList({ brand_id: bid }); |
|||
hideLoad(); |
|||
let _ls = _res?.list ?? []; |
|||
this.stadiumLs = _ls; |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.sp-content{ |
|||
padding: 0 20upx; |
|||
.sp-item + .sp-item{ |
|||
margin-top: 20upx; |
|||
} |
|||
} |
|||
</style> |
After Width: 34 | Height: 34 | Size: 244 B |
After Width: 36 | Height: 36 | Size: 392 B |
After Width: 36 | Height: 36 | Size: 365 B |
After Width: 18 | Height: 18 | Size: 317 B |
After Width: 100 | Height: 100 | Size: 825 B |
After Width: 52 | Height: 52 | Size: 533 B |
After Width: 52 | Height: 52 | Size: 498 B |
After Width: 40 | Height: 40 | Size: 372 B |
After Width: 13 | Height: 13 | Size: 173 B |
After Width: 15 | Height: 15 | Size: 249 B |
After Width: 100 | Height: 100 | Size: 1.2 KiB |
After Width: 52 | Height: 52 | Size: 674 B |
After Width: 34 | Height: 34 | Size: 233 B |