瀏覽代碼

接口:角色列表,菜单列表,账号列表;页面:关联菜单权限弹窗和角色编辑

ltx529596 4 年之前
父節點
當前提交
cfbb796e89

+ 1 - 3
src/App.vue

@@ -73,7 +73,5 @@ export default {
 @import './static/css/reset.scss';
 @import './static/css/uni.scss';
 
-  .myChecked .uni-checkbox-input {
-    border-radius: 50% !important;
-  }
+
 </style>

+ 2 - 1
src/pages.json

@@ -52,7 +52,8 @@
       "style":{
         "navigationBarTitleText": "用户管理",
         "navigationBarBackgroundColor":"#ffffff",
-        "navigationBarTextStyle": "black"
+        "navigationBarTextStyle": "black",
+        "enablePullDownRefresh": true
       }
     },
     {

+ 86 - 54
src/pages/components/mask.vue

@@ -16,15 +16,29 @@
           <view class="message">
             <view class="radiolist">
 
-              <view class="uni-list">
-                <checkbox-group @change="checkboxChange">
-                  <label class="uni-list-cell uni-list-cell-pd checked-bar" v-for="item in items" :key="item.value">
+              <view class="uni-list father-list">
+                <checkbox-group @change="fatherChange">
+                  <label class="uni-list-cell uni-list-cell-pd checked-bar" v-for="fatheritem in list" :key="fatheritem.menuId">
                     <view class="main-checked-list">
-                      <checkbox :value="item.value" :checked="item.checked" />
-                      <view class="title">{{ item.name }}</view>
+                      <checkbox :value="fatheritem.value" :checked="item.checked"/>
+                      <view class="title">{{ fatheritem.name }}</view>
                     </view>
-                    <image v-if="!item.checked" class="moreicon" src="../../static/images/moreicon.png"></image>
-                    <image v-if="item.checked" class="downicon"  src="../../static/images/downmoreicon.png"></image>
+                    <!-- 子权限 -->
+                    <view class="childemenu">
+                      <view class="uni-list son-list">
+                        <checkbox-group @change="sonChange" class="son-checked-warp">
+                          <label class="uni-list-cell uni-list-cell-pd son-bar" v-for="sonitem in fatheritem.children" :key="sonitem.value">
+                            <view class="son-checked-list">
+                              <checkbox style="transform:scale(0.7)" :value="sonitem.value" :checked="item.checked"/>
+                              <view class="son-title">{{sonitem.name}}</view>
+                            </view>
+                          </label>
+                        </checkbox-group>
+                      </view>
+                    </view>
+
+                    <image v-if="!item.checked && item.children" class="moreicon" src="../../static/images/moreicon.png"></image>
+                    <image v-if="item.checked && item.children" class="downicon"  src="../../static/images/downmoreicon.png"></image>
                   </label>
                 </checkbox-group>
               </view>
@@ -41,59 +55,27 @@
 </template>
 
 <script>
+import editclassifyVue from '../goods/editclassify.vue';
 export default {
   name: 'mask',
   props: {
-    txt: {
-      type: String,
-      default: '该订单已核销',
+    list:{
+      type:Array,
+      default: [],
     },
-    iconShow: {
-      type: Boolean,
-      default: false
+    hasList: {
+      type:Array,
+      default: []
     }
   },
   data () {
     //这里存放数据
     return {
-      checkedIndex: false,
-      checkedSetting: false,
-      checkedBasics: false,
-      checkedVip: false,
-      checkedGoods: false,
-      checkedShop: false,
-
-      items: [{
-        value: 'index',
-        name: '首页管理'
-      },
-      {
-        value: 'setting',
-        name: '系统管理',
-        checked: 'true'
-      },
-      {
-        value: 'bascis',
-        name: '基础管理'
-      },
-      {
-        value: 'Vip',
-        name: '会员管理'
-      },
-      {
-        value: 'goods',
-        name: '商家管理'
-      },
-      {
-        value: 'shop',
-        name: '商品管理'
-      }
-      ]
+      roleArray: []
     }
   },
   //方法集合
   methods: {
-    // 确认后
     sureconver () {
       this.$emit('isSureConver', true)
     },
@@ -101,9 +83,31 @@ export default {
       this.$emit('isSureConver', false)
     },
 
-    checkboxChange: function (e) {
+    // 显示已经拥有权限
+
+
+    // 父级权限选择
+    fatherChange (e) {
+      console.log(this.hasList);
+
       console.log(e);
-      let items = this.items,
+      let items = this.list
+      values = e.detail.value; // 选中的集合
+      for (let i = 0; i < items.length; ++i) {
+        const element = items[i]
+        if (values.includes(element.value)) {
+          this.$set(element, 'checked', true)
+        } else {
+          this.$set(element, 'checked', false)
+        }
+      }
+      console.log(this.list);
+    },
+
+    // 子集权限选择
+    sonChange (e) {
+      console.log(e);
+      let items = this.list,
       values = e.detail.value; // 选中的集合
       for (let i = 0; i < items.length; ++i) {
         const element = items[i]
@@ -114,8 +118,7 @@ export default {
         }
       }
     }
-  },
-  onLoad () { },
+  }
 };
 </script>
 <style lang='scss' scoped>
@@ -177,16 +180,20 @@ export default {
       border-bottom-left-radius: 20upx;
       border-bottom-right-radius: 20upx;
       .message {
-        padding: 50upx 60upx 0;
+        padding: 10upx 60upx 0;
         overflow-y: scroll;
         height: 670upx;
         .radiolist {
-          .uni-list {
+          .father-list {
             .checked-bar {
               display: flex;
+              flex-direction: column;
+              justify-content: flex-end;
+              padding-top: 45upx;
               .main-checked-list{
-                flex: 1;
                 display: flex;
+                width: 100%;
+                // flex: 1;
                 .title {
                   margin-left: 30upx;
                   color: #666666;
@@ -201,6 +208,31 @@ export default {
                 width: 27upx;
                 height: 19upx;
               }
+              .childemenu {
+                width: 100%;
+                .son-checked-warp {
+                  display: flex;
+                  flex-wrap: wrap;
+                  padding-left: 40upx;
+                  box-sizing: border-box;
+                  .son-bar {
+                    width: 45%;
+                    display: flex;
+                    align-items: center;
+                    box-sizing: border-box;
+                    &:nth-child(odd){
+                      margin-right: 35upx;
+                    }
+                    .son-checked-list {
+                      display: flex;
+                    }
+                  }
+                }
+                .son-title {
+                  margin-left: 15upx;
+                  color: #666666;
+                }
+              }
             }
           }
         }

+ 1 - 0
src/pages/goods/goods.vue

@@ -342,6 +342,7 @@ export default {
       await this.$http.get('/getUserInfo').then(async (res) => {
         if (res.data) {
           uni.setStorageSync('scenicId', res.data.id);
+
           this.params.mid = res.data.id;
           this.getTicketShopList();
         }

+ 13 - 5
src/pages/index/index.vue

@@ -284,14 +284,14 @@
 
       <tabBar :currentIndex="typeNum"></tabBar>
 		</view>
-    <mask :txt="masktxt" :iconShow="iconShow" v-if="isShowMask" @isSureConver="isSureConver"></mask>
+    <!-- <mask :txt="masktxt" :iconShow="iconShow" v-if="isShowMask" @isSureConver="isSureConver"></mask> -->
 		<rf-loading v-if="loading"></rf-loading>
 	</view>
 </template>
 <script>
 import uCharts from '../../js_sdk/u-charts/u-charts/u-charts';
 import moment from '@/common/moment';
-import mask from '../components/mask';
+// import mask from '../components/mask';
 
 let _self;
 let canvaLineA = null;
@@ -301,9 +301,9 @@ let shopMoneyLine = null;
 let getDataBuyTime = null;
 export default {
   name: 'Header',
-  components: {
-    mask,
-  },
+  // components: {
+  //   mask,
+  // },
   data() {
     return {
       // tabbar
@@ -403,6 +403,14 @@ export default {
       value: null,
     },
   },
+  onReady(){
+    // 商家信息
+    this.$http.get('/getUserInfo').then(async (res) => {
+      if (res.data) {
+        this.$mStore.commit('setScenic',res.data)
+      }
+    });
+  },
   onLoad () {
   },
   onShow() {

+ 0 - 1
src/pages/index/setting/setting.vue

@@ -58,7 +58,6 @@ export default {
 	onLoad() {},
 	methods: {
 		topage(url) {
-			console.log(url);
 			this.$mRouter.push({ route: url });
 		},
 

+ 46 - 10
src/pages/index/userinfo/adduser.vue

@@ -4,18 +4,18 @@
     <view class="warp">
       <view class="item">
         <view class="title">账号</view>
-        <input class="msg" type="text" placeholder="请输入账号" placeholder-style="color:#e8e8e8" />
+        <input class="msg" type="text" v-model="userInfo.account" placeholder="请输入账号" placeholder-style="color:#e8e8e8" />
       </view>
       <view class="item">
-        <view class="title">真实姓名</view>
-        <input class="msg" type="text" placeholder="请输入真实姓名" placeholder-style="color:#e8e8e8"/>
+        <view class="title">用户昵称</view>
+        <input class="msg" type="text" v-model="userInfo.name" placeholder="请输入真实姓名" placeholder-style="color:#e8e8e8"/>
       </view>
       <view class="item">
         <view class="title">角色</view>
         <view class="uni-list-cell">
           <view class="uni-list-cell-db">
             <picker @change="bindPickerChange" :value="userIndex" :range="userArray" range-key="name" class="uni-upd">
-              <view class="uni-input">{{ userArray[userIndex].name }}</view>
+              <view class="uni-input" :class=" userIndex === 0 ? '' : 'txtcolor'">{{ userArray[userIndex].name }}</view>
             </picker>
             <view class="icon-warp">
               <image
@@ -28,15 +28,15 @@
       </view>
       <view class="item">
         <view class="title">手机号</view>
-        <input class="msg" type="text" placeholder="请输入手机号" placeholder-style="color:#e8e8e8"/>
+        <input class="msg" type="text" v-model="userInfo.phone" placeholder="请输入手机号" placeholder-style="color:#e8e8e8"/>
       </view>
       <view class="item">
         <view class="title">密码</view>
-        <input class="msg" type="text" placeholder="请输入密码" placeholder-style="color:#e8e8e8"/>
+        <input class="msg"  v-model="passwordone" type="text" placeholder="请输入密码" placeholder-style="color:#e8e8e8"/>
       </view>
       <view class="item">
         <view class="title">确认密码</view>
-        <input class="msg" type="text" placeholder="再次输入密码" placeholder-style="color:#e8e8e8"/>
+        <input class="msg" v-model="passwordtwo" type="text" placeholder="再次输入密码" placeholder-style="color:#e8e8e8"/>
       </view>
       
     </view>
@@ -55,16 +55,49 @@ export default {
     //这里存放数据
     return {
       userArray: [{ name: '请选择角色', id: '' }],
-      userIndex: 0
+      userIndex: 0,
+      mid: uni.getStorageSync('scenicId'),
+      roleList:[],
+
+      // 用户信息
+      userInfo: {
+        id: '',
+        name: '',
+        account: '',
+        password: '',
+        phone: '',
+        roleId: '',
+        status: ''
+      }
     };
   },
-  //监控data中的数据变化
-  watch: {},
+  onShow () {
+    this.getRoleList()
+  },
   //方法集合
   methods: {
+    // 角色选择
     bindPickerChange(e) {
       console.log(e.detail.value);
+      this.userIndex = e.detail.value
+      this.userInfo.roleId = this.userArray[this.userIndex].id
+    },
+    // 角色列表
+    async getRoleList () {
+      await this.$http.get('/mrole/getList',{
+        mid:this.mid
+      }).then( res=>{
+        if (res.code === 200 && res.msg==='OK') {
+          res.data.forEach(element => {
+            if (element.name) {
+              this.roleList.push({name: element.name,id: element.id})
+              this.userArray = this.userArray.concat(this.roleList)
+            }
+          });
+        }
+      })
     }
+
   }
 }
 </script>
@@ -103,6 +136,9 @@ export default {
       .uni-input {
         color: #e8e8e8;
       }
+      .txtcolor {
+        color: #000;
+      }
       .icon-warp {
         width: 19upx;
         .iconRight {

+ 55 - 54
src/pages/index/userinfo/roleedit.vue

@@ -5,44 +5,23 @@
       <view class="bar">
         <view class="item">
           <view class="title">角色标识</view>
-          <input class="msg" type="text" placeholder="..." placeholder-style="color:#bdbdbd" />
+          <input class="msg"  v-model="roledata.name" type="text" placeholder="..." placeholder-style="color:#bdbdbd" />
         </view>
       </view>
 
       <view class="bar">
         <view class="item">
           <view class="title">角色名称</view>
-          <view class="uni-list-cell">
-            <view class="uni-list-cell-db">
-              <picker @change="roleChange" :value="roleIndex" :range="userArray" range-key="name" class="uni-upd">
-                <view class="uni-input">{{ roleArray[roleIndex].name }}</view>
-              </picker>
-              <view class="icon-warp">
-                <image
-                  src="../../../static/images/moreicon.png"
-                  class="iconRight"
-                ></image>
-              </view>
-            </view>
-          </view>
+          <input type="text" v-model="roledata.description" placeholder="..." placeholder-style="color:#bdbdbd">
         </view>
       </view>
 
       <view class="bar">
         <view class="item">
           <view class="title">菜单权限</view>
-          <view class="uni-list-cell">
-            <view class="uni-list-cell-db">
-              <picker @change="bindPickerChange" :value="userIndex" :range="userArray" range-key="name" class="uni-upd">
-                <view class="uni-input">{{ userArray[userIndex].name }}</view>
-              </picker>
-              <view class="icon-warp">
-                <image
-                  src="../../../static/images/moreicon.png"
-                  class="iconRight"
-                ></image>
-              </view>
-            </view>
+          <view class="icon-warp" @tap='showRoleList'>
+            <text class="txt">请选择</text>
+            <image src="../../../static/images/moreicon.png" class="iconRight"></image>
           </view>
         </view>
       </view>
@@ -52,7 +31,7 @@
       <view class="sure">确认</view>
     </view>
 
-    <Maskre :txt='txt' v-if="isShowMask"></Maskre>
+    <Maskre :list='menulist' :hasList="hasRoleList" v-if="isShowMask" @isSureConver='watchmask'></Maskre>
   </view>
 </template>
 
@@ -67,25 +46,52 @@ export default {
     //这里存放数据
     return {
       isShowMask: true,
-      txt: '菜单权限',
+      roledata: {},
+      menulist:[],
 
-      roleArray:[{name:'请选择',id: ''}],
-      roleIndex: 0,
-      userArray: [{name:'请选择',id: ''}],
-      userIndex: 0
+      hasRoleList: []
     };
   },
-  //监控data中的数据变化
-  watch: {},
+  onLoad (option) {
+    this.roledata = JSON.parse(option.roledata)
+  },
+  onShow () {
+
+    this.getMenuList()
+    this.getRoleBuyId ()
+   
+  },
   //方法集合
   methods: {
-    // 角色选择
-    roleChange (e) {
-      console.log(e);
+    // 监听遮罩层事件
+    watchmask(e) {
+      this.isShowMask = false
+    },
+    // 打开遮罩层
+    showRoleList() {
+      this.isShowMask = true
+
+    },
+    // 菜单列表
+    async getMenuList () {
+      await this.$http.get('/mrole/permissionList').then( res=>{
+        if (res.code === 200 && res.msg === 'OK') {
+          this.menulist = res.data
+          this.$mStore.commit('setMenuRole',res.data)
+        }
+      })
     },
-    // 菜单选择
-    bindPickerChange(e) {
-      console.log(e);
+
+    // 根据id获取角色权限
+    async getRoleBuyId() {
+      await this.$http.get('/mrole/findMenuIdsByRoleId',{
+        roleId: this.roledata.id
+      }).then( res=>{
+        if (res.code === 200 && res.msg ==='OK') {
+          this.hasRoleList = res.data
+          this.$mStore.commit('setHasRoleList',res.data)
+        }
+      })
     }
   }
 }
@@ -137,25 +143,20 @@ export default {
         font-size: 32upx;
       }
     }
-    .uni-list-cell {
-      flex: 1;
-    }
-    .uni-list-cell-db {
+    .icon-warp {
       display: flex;
       justify-content: space-between;
-    }
-    .uni-upd {
-      width: 100%;
-    }
-    .uni-input {
-      color: #bdbdbd;
-    }
-    .icon-warp {
-      width: 19upx;
-      .iconRight {
+      align-items: center;
+      flex: 1;
+      .txt {
+        flex: 1;
+        color: #bdbdbd;
+      }
+      .iconRight{
         width: 19upx;
         height: 27upx;
       }
     }
+    
   }
 </style>

+ 24 - 8
src/pages/index/userinfo/rolemenage.vue

@@ -2,19 +2,20 @@
 <template>
   <view class="rolemenage">
     <view class="content">
-      <view class="item">
+
+      <view class="item" v-for="(item,index) in roleList" :key="index">
         <view class="top">
           <view class="expression">
-            <text class="title">标识:</text><text class="msg">admin</text>
+            <text class="title">标识:</text><text class="msg">{{ item.name }}</text>
           </view>
           <view class="expression name">
-            <text class="title">名称:</text><text class="msg">超级管理员</text>
+            <text class="title">名称:</text><text class="msg">{{ item.description }}</text>
           </view>
         </view>
         <view class="bottom">
           <view class="btns">
-            <view class="btn edit" @tap="edit">编辑</view>
-            <view class="btn dele">删除</view>
+            <view class="btn edit" @tap="edit(item)">编辑</view>
+            <view class="btn dele" @tap="dele(itemid)">删除</view>
           </view>
         </view>
       </view>
@@ -30,13 +31,28 @@ export default {
   data () {
     //这里存放数据
     return {
-
+      roleList:[],
+      mid:uni.getStorageSync('scenicId')
     };
   },
+  onShow () {
+    this.getRoleList()
+  },
   //方法集合
   methods: {
-    edit() {
-      this.$mRouter.push({route: '/pages/index/userinfo/roleedit'})
+    // 跳转编辑
+    edit(data) {
+      this.$mRouter.push({route: '/pages/index/userinfo/roleedit', query: {roledata:JSON.stringify(data)}})
+    },
+    // 角色列表
+    async getRoleList () {
+      await this.$http.get('/mrole/getList',{
+        mid:this.mid
+      }).then( res=>{
+        if (res.code === 200 && res.msg==='OK') {
+          this.roleList = res.data
+        }
+      })
     }
   }
 }

+ 79 - 11
src/pages/index/userinfo/usermenage.vue

@@ -2,6 +2,7 @@
 <template>
   <view class="user-warp">
     <view class="user-header">
+
       <view class="header">
         <view class="inputnameorphone">
           <view class="more" >
@@ -22,25 +23,25 @@
           <image class="ref" src="../../../static/images/reficon.png"></image>
         </view>
       </view>
+
     </view>
     <view style="height: 110upx"></view>
     <view class="usermenage">
       <view class="content">
-        <view class="item">
+        <view class="item" v-for="(item,index) in list" :key="index">
           <view class="top">
             <view class="expression">
-              <text class="title">账号</text>:<text class="msg">admin</text>
+              <text class="title">账号</text>:<text class="msg">{{ item.account }}</text>
             </view>
             <view class="expression">
-              <text class="title">实际姓名</text>:<text class="msg">admin</text>
+              <text class="title">用户昵称</text>:<text class="msg">{{ item.name }}</text>
             </view>
             <view class="expression">
-              <text class="title">手机</text>:<text class="msg">admin</text>
+              <text class="title">手机</text>:<text class="msg">{{ item.phone }}</text>
             </view>
             <view class="expression">
-              <text class="title">状态</text>:<text class="msg status"
-                >启用</text
-              >
+              <text class="title">状态</text>:
+              <text class="msg" :class="item.status === '0' ? 'green' : 'red'">{{ item.status === '0' ? '启用' : '禁用' }}</text>
             </view>
           </view>
           <view class="bottom">
@@ -60,15 +61,18 @@
           </view>
         </view>
       </view>
+
+      <uni-load-more :status="more"> </uni-load-more>
     </view>
   </view>
 </template>
 
 <script>
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 
 export default {
   name: 'rolemenage',
-  components: {},
+  components: {uniLoadMore},
   data () {
     //这里存放数据
     return {
@@ -80,9 +84,31 @@ export default {
         {name: '真实姓名', code:3},
         {name: '手机号', code:4}
       ],
-      index: 0
+      index: 0,
+
+      more: 'loading',
+      params:{
+        pageNum: 1,
+        pageSize: 4,
+        mid: uni.getStorageSync('scenicId')
+      },
+
+      list:[]  // 状态 0启用 1禁用
     };
   },
+  onShow () {
+    this.getUserList()
+  },
+  // 下拉刷新
+  onPullDownRefresh () {
+    this.more = 'loading'
+    this.params.pageNum = 1
+    this.getUserList()
+  },
+  // 上拉加载
+  onReachBottom() {
+    this.getMoreUserList()
+  },
   //方法集合
   methods: {
     // 打开条件选择
@@ -100,7 +126,41 @@ export default {
     // 跳转新增
     add () {
       this.$mRouter.push({route:'/pages/index/userinfo/adduser'})
+    },
+    // 账户列表
+    async getUserList () {
+      await this.$http.get('/user/userList',this.params).then(res=>{
+        console.log(res);
+        if (res.code === 200 && res.msg==='OK') {
+          if (res.data.list.length > 0) {
+            this.list = res.data.list
+            if (res.data.nextPage === 0) {
+              this.more = 'noMore'
+            }
+          } else {
+            this.more = 'noMore'
+          }
+          uni.stopPullDownRefresh();
+        }
+      })
+    },
+
+    // 上拉加载
+    async getMoreUserList () {
+      this.params.pageNum ++
+      await this.$http.get('/user/userList',this.params).then( res=> {
+        if (res.data.list.length > 0) {
+          this.list = this.list.concat(res.data.list)
+          if (res.data.nextPage === 0) {
+            this.more = 'noMore'
+          }
+        } else {
+          this.more = 'noMore'
+        }
+      })
     }
+
+
   }
 }
 </script>
@@ -154,7 +214,8 @@ export default {
           padding: 30upx 0;
           text-align: center;
           color: #333;
-        }
+         
+        } 
       }
       .txt {
         color: #8f8f8f;
@@ -198,6 +259,10 @@ export default {
       padding: 24upx 24upx 0;
       background-color: #fbfbfb;
       border-radius: 8upx;
+      margin-bottom: 35upx;
+      &:last-child {
+        margin-bottom: 0;
+      }
       .top {
         border-bottom: 1px solid #e7e7e7;
         padding: 15upx 9upx 30upx;
@@ -220,9 +285,12 @@ export default {
             margin-left: 15upx;
             color: #202020;
           }
-          .status {
+          .green {
             color: #06d161;
           }
+          .red {
+            color: #ff6a5e;
+          }
         }
       }
       .bottom {

+ 11 - 2
src/static/css/colorui/main.css

@@ -155,13 +155,16 @@ checkbox .uni-checkbox-input {
 	margin: 0;
 	width: 24px;
 	height: 24px;
+	border-radius: 50% !important;
 }
 
 checkbox.round .wx-checkbox-input,
 checkbox.round .uni-checkbox-input {
 	border-radius: 100upx;
+	/* border-radius: 50% !important; */
 }
 
+
 /* #endif */
 
 switch[checked]::before {
@@ -218,6 +221,7 @@ switch.radius .uni-switch-input::after,
 switch.radius .uni-switch-input,
 switch.radius .uni-switch-input::before {
 	border-radius: 10upx;
+	/* border-radius: 50%; */
 }
 
 switch .wx-switch-input::before,
@@ -319,6 +323,7 @@ radio.olive.checked .uni-radio-input {
 	color: #ffffff !important;
 }
 
+/* 微信小程序多选框默认颜色更改 */
 switch.green[checked] .wx-switch-input,
 switch[checked] .wx-switch-input,
 checkbox.green[checked] .wx-checkbox-input,
@@ -331,10 +336,14 @@ checkbox.green.checked .uni-checkbox-input,
 checkbox.checked .uni-checkbox-input,
 radio.green.checked .uni-radio-input,
 radio.checked .uni-radio-input {
-	background-color: #39b54a !important;
+	background-color: #8064f7 !important;
+	border-color: #8064f7 !important;
+	color: #8064f7 !important;
+	border-color: #8064f7 !important;
+	/* background-color: #39b54a !important;
 	border-color: #39b54a !important;
 	color: #ffffff !important;
-	border-color: #39B54A !important;
+	border-color: #39B54A !important; */
 }
 
 switch.cyan[checked] .wx-switch-input,

+ 15 - 2
src/static/css/uni.scss

@@ -123,10 +123,22 @@
   background-color: #eee;
 }
 
+.uni-list-cell {
+  align-items: flex-start;
+}
 .uni-list-cell-pd {
-  padding: 22upx 30upx;
+  // padding: 22upx 0upx;
+  padding-top: 22upx;
 }
 
+.uni-checkbox-input-checked {
+  color: red;
+}
+
+// .uni-checkbox-wrapper .uni-checkbox-input {
+//   border-radius: 50% !important;
+// }
+
 .uni-list-cell-left {
   font-size: 28upx;
   padding: 0 30upx;
@@ -562,7 +574,8 @@
   .image-wrapper {
     width: 100%;
     height: 320upx;
-    border-radius: 6upx;
+    // border-radius: 6upx;
+    border-radius: 50%;
     overflow: hidden;
     position: relative;
 

+ 20 - 0
src/store/index.js

@@ -16,6 +16,13 @@ const ROLE = uni.getStorageSync('role')
 const store = new Vuex.Store({
     // 数据存放
     state: {
+        // 景区信息
+        scenic: {},
+        // 菜单权限
+        menuRole:[],
+        // 角色拥有的权限
+        hasRoleList: [],
+
         //用户token
         accessToken: ACCESSTOKEN,
         // 用户权限
@@ -59,6 +66,19 @@ const store = new Vuex.Store({
     },
     // 方法函数,一般用于计算state中的数据
     mutations: {
+        // 菜单
+        setMenuRole (state, data) {
+            state.menuRole = data
+        },
+        // 角色拥有的权限
+        setHasRoleList (state,data) {
+            state.hasRoleList = data
+        },
+        // 保存景区Id
+        setScenic (state,data) {
+            state.scenic = data
+            uni.setStorageSync('scenicId',data.id)
+        },
         login(state, provider) {
            
 			// state.accessToken=provider.access_token;