Skip to content

Commit 8a5914e

Browse files
author
myxingke
committed
商户用户增删改查
1 parent ba0c635 commit 8a5914e

File tree

13 files changed

+574
-116
lines changed

13 files changed

+574
-116
lines changed

src/libs/methodMap.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ const methodMap = {
119119
MerchantUserDetail: {url: '/merchants/user/detail', method: 'get'},
120120
/** 商户用户个人资料修改 notice:未添加到节点**/
121121
MerchantUserEdit: {url: '/merchants/user/edit', method: 'post'},
122+
/** 商户用户列表(但不包括主帐号)**/
123+
MerchantUserList: {url: '/merchants/user/list', method: 'get'},
124+
/** 商户用户添加 **/
125+
MerchantAddUser: {url: '/merchants/user/add_user', method: 'post'},
126+
/** 商户用户修改 **/
127+
MerchantEditUser: {url: '/merchants/user/edit_user', method: 'post'},
128+
/** 商户用户密码重置 **/
129+
MerchantRestUserPassword: {url: '/merchants/user/rest_password', method: 'post'},
130+
/** 商户用户删除 **/
131+
MerchantDeleteUser: {url: '/merchants/user/delete_user', method: 'post'},
122132
/** 商户用户角色 **/
123133
MerchantAuthRole: {url: '/merchants/user/role', method: 'get'},
124134
/** 商户添加用户角色 **/

src/module/manage/pages/editor_material/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Col span="18" class="search">
55
<Form :model="formSearch" :label-width="80" inline label-position="right">
66
<Form-item label="素材名称:">
7-
<Input v-model="formSearch.keywords" placeholder="请输入角色名称关键词"></Input>
7+
<Input v-model="formSearch.keywords" placeholder="请输入素材名称关键词"></Input>
88
</Form-item>
99
<Form-item label="素材分类:">
1010
<Select v-model="formSearch.c_id" placeholder="请选择" style="width:90px">

src/module/manage/pages/user/index.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</Select>
1414
</Form-item>
1515
<Form-item label="关键词:">
16-
<Input v-model="formSearch.keywords" placeholder="请输入角色名称关键词"></Input>
16+
<Input v-model="formSearch.keywords" placeholder="帐号/手机号/姓名/邮箱"></Input>
1717
</Form-item>
1818
<Form-item label="所属角色">
1919
<Select v-model="formSearch.role_id" placeholder="请选择" style="width:100px">
@@ -535,9 +535,6 @@
535535
}
536536
})
537537
},
538-
authGo(id) {
539-
this.$router.push({ path: '/admin/authorize/' + id, params: { id: id }})
540-
},
541538
//头像
542539
handleView (name) {
543540
this.imgName = name;

src/module/manage/pages/wechat/public.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Select>
1515
</Form-item>
1616
<Form-item label="关键词:">
17-
<Input v-model="formSearch.keywords" placeholder="请输入角色名称关键词"></Input>
17+
<Input v-model="formSearch.keywords" placeholder="请输入公众号名称"></Input>
1818
</Form-item>
1919
<Form-item label="所属角色">
2020
<Select v-model="formSearch.role_id" placeholder="请选择" style="width:100px">

src/module/merchant/merchant.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
import Vue from 'vue'
2-
import App from './App'
3-
import Router from './router.js' //路由地址
4-
import Store from './vuex/store/index'
5-
import IView from 'iview' //Iview
6-
import 'iview/dist/styles/iview.css' // 使用 IVIEW CSS
7-
import './assets/style/common/customize.less' // 定制公共 less
8-
import Toast from '../../libs/toast/' // 定制吐司
9-
import Util from '../../libs/util' // 工具
10-
import Http from '../../libs/http' //请求工具
11-
import Plugin from '../../libs/plugin/formatDate' //插件
12-
import '../../libs/filter' //过滤器
13-
import Api from '../../libs/api'
14-
window.Api = Api
1+
import Vue from 'vue';
2+
import App from './App';
3+
import Router from './router.js'; //路由地址
4+
import Store from './vuex/store/index';
5+
import IView from 'iview'; //Iview
6+
import 'iview/dist/styles/iview.css'; // 使用 IVIEW CSS
7+
import './assets/style/common/customize.less'; // 定制公共 less
8+
import Toast from '../../libs/toast/'; // 定制吐司
9+
import Util from '../../libs/util'; // 工具
10+
import Http from '../../libs/http'; //请求工具
11+
import Plugin from '../../libs/plugin/formatDate'; //插件
12+
import '../../libs/filter'; //过滤器;
13+
import Api from '../../libs/api';
14+
window.Api = Api;
1515

16-
Vue.use(Plugin)
17-
Vue.use(Toast)
18-
Vue.use(Http)
19-
Vue.use(IView)
16+
Vue.use(Plugin);
17+
Vue.use(Toast);
18+
Vue.use(Http);
19+
Vue.use(IView);
2020

21-
Vue.config.productionTip = false
21+
Vue.config.productionTip = false;
2222

2323
Router.beforeEach(({meta, path}, from, next) => {
24-
Util.title(meta.title)
25-
let auth = meta.routeAuth == false ? false : true
26-
//获取用户是否登陆
24+
Util.title(meta.title);
25+
let auth = meta.routeAuth == false ? false : true;
26+
//获取用户是否登陆;
2727
let user = window.localStorage.getItem('merchantUser');
2828
let info = window.localStorage.getItem('merchantInfo');
2929
let token = window.localStorage.getItem('merchantToken');
3030
if (auth && !token && !user && !info && path != '/login') {
31-
next({path: '/login'})
31+
next({path: '/login'});
3232
} else if (path == '/login' && token) {
33-
next({path: '/'})
34-
}
35-
next()
36-
})
33+
next({path: '/'});
34+
};
35+
next();
36+
});
3737

3838
new Vue({
3939
el: '#app',
4040
router: Router,
4141
store: Store,
4242
template: '<App/>',
4343
components: {App}
44-
})
44+
});

src/module/merchant/pages/public/bind.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
setTimeout(() => {
8686
this.modalLoading = false;
8787
this.modal = false;
88-
this.$router.push({path: '/public/list'})
88+
this.$router.push({path: '/public/list'});
8989
}, 1000);
9090
}
9191
},

src/module/merchant/pages/public/list.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</div>
55
</template>
66
<script>
7-
import tableRow from './list-table.vue'
7+
import tableRow from './list-table.vue';
88
export default {
99
data () {
1010
return {
@@ -69,8 +69,8 @@
6969
align: 'center',
7070
render: (h, params) => {
7171
const row = params.row;
72-
const color = row.status == 1 ? 'green' : row.status == 0 ? 'yellow' : 'red'
73-
const text = row.status == 1 ? '正常' : row.status == 0 ? '锁定' : '删除'
72+
const color = row.status == 1 ? 'green' : row.status == 0 ? 'yellow' : 'red';
73+
const text = row.status == 1 ? '正常' : row.status == 0 ? '锁定' : '删除';
7474
return h('Tag', {
7575
props: {
7676
type: 'dot',
@@ -105,7 +105,7 @@
105105
},
106106
on: {
107107
click: () => {
108-
this.show(params.index, params.row.id)
108+
this.show(params.index, params.row.id);
109109
}
110110
}
111111
}, '管理'),
@@ -117,7 +117,7 @@
117117
on: {
118118
click: () => {
119119
//todo 切换过去的时候先保存一份public_signal号在vuex数据里面后面的操作全在里面
120-
this.$router.push({ path: '/wechat/' + params.row.id })
120+
this.$router.push({ path: '/wechat/' + params.row.id });
121121
}
122122
}
123123
}, '接口')
@@ -164,7 +164,7 @@
164164
mounted() {
165165
//服务端获取数据
166166
this.getData();
167-
console.log(this.$route)
167+
//console.log(this.$route);
168168
}
169169
}
170170
</script>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--粉丝专用表格-->
2+
<style scoped>
3+
.expand-row{
4+
margin-bottom: 16px;
5+
}
6+
</style>
7+
<template>
8+
<div>
9+
<Row class="expand-row">
10+
<Col span="8">
11+
<span class="expand-key">手机号:</span>
12+
<span class="expand-value">{{ row.mobile }}</span>
13+
</Col>
14+
<Col span="8">
15+
<span class="expand-key">电子邮箱:</span>
16+
<span class="expand-value">{{ row.email }}</span>
17+
</Col>
18+
<Col span="8">
19+
<span class="expand-key">最后登陆IP:</span>
20+
<span class="expand-value">{{ row.last_login_ip }}</span>
21+
</Col>
22+
</Row>
23+
<Row>
24+
</Row>
25+
</div>
26+
</template>
27+
<script>
28+
export default {
29+
props: {
30+
row: Object
31+
}
32+
};
33+
</script>

0 commit comments

Comments
 (0)