|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <template>
- <view class="page" id="more">
-
- <!-- 分块显示功能区 -->
- <template v-for="(group, title) in listitem">
- <view :key="title" class="margin-bottom">
- <!-- 区块标题 -->
- <l-title>{{ group.FTName }}</l-title>
- <!-- 按钮组 -->
- <view class="function-list cu-list grid no-border col-4">
- <view v-for="(item, index) in group.PermFunction" :key="index"
- class="cu-item text-center flex flex-wrap justify-center align-center">
- <view @click="funcListClick(item)" style="backgroundColor:#62bbff;"
- class="app-item align-center flex flex-wrap justify-center align-center">
- <l-icon type="calendar" color="white" class="text-sl" />
- </view>
- <text>{{ item && item.FName }}</text>
- </view>
- </view>
- </view>
- </template>
- </view>
- </template>
-
- <script>
- import without from 'lodash/without'
- import concat from 'lodash/concat'
- import keyBy from 'lodash/keyBy'
- import mapKeys from 'lodash/mapKeys'
- import mapValues from 'lodash/mapValues'
- import groupBy from 'lodash/groupBy'
-
- export default {
- data() {
- return {
- allList: [],
- myList: [],
- editList: [],
- searchText: '',
- listitem: [],
- focus: false,
- edit: false
- }
- },
-
- async onLoad() {
- await this.init()
- },
-
- methods: {
- // 页面初始化
- async init() {
- this.LOADING('加载菜单中…')
- this.HTTP_GET(
- 'quanjiang/sso/list'
- ).then(res => {
- this.listitem = res
- this.HIDE_LOADING()
- })
- },
-
- // 点击按钮
- funcListClick(item) {
- if(item.FInterfaceUrl.indexOf('http')!=-1){
- let option = {
- FInterfaceUrl:item.FInterfaceUrl,
- FName:item.FName
- }
- uni.navigateTo({
- url:`/pages/SSO/MyApp/listview?data=`+ encodeURIComponent(JSON.stringify(option))
- })
- }else{
- console.log(item.FInterfaceUrl)
- let FInterfaceUrldata = item.FInterfaceUrl
- if(FInterfaceUrldata.indexOf('sysid')!=-1 && FInterfaceUrldata.indexOf('openid')!=-1 ){
- let sysid = item.FInterfaceUrl.slice(item.FInterfaceUrl.indexOf('sysid')+6,item.FInterfaceUrl.indexOf('openid')-1)
- let openid = item.FInterfaceUrl.slice(item.FInterfaceUrl.lastIndexOf ('openid')+7)
- let FName = item.FName
- let dataitem = {
- sysid,openid,FName
- }
- console.log(dataitem)
- uni.navigateTo({
- url:`/pages/SSO/MyApp/attestation?item=${JSON.stringify(dataitem)}`
- })
- }
- }
- },
-
-
- }
- }
- </script>
-
- <style lang="less" scoped>
- .function-list {
- padding-bottom: 0;
-
- .cu-item {
- .app-item {
- border-radius: 50%;
- height: 45px;
- width: 45px;
- }
- }
- }
- </style>
-
- <style lang="less">
- #more {
- .function-list .cu-item text[class*='cuIcon'] {
- margin-top: 0 !important;
- }
- }
-
- page {
- // padding-top: 100rpx;
- }
- </style>
|