|
@@ -1,252 +1,114 @@
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
- <view class="nav-bar">
|
|
|
- <u-navbar leftIconColor="#fff"
|
|
|
- titleStyle="color:#fff;fontSize:36rpx;"
|
|
|
- :autoBack="true"
|
|
|
- bgColor="#2C6FF3"
|
|
|
- :placeholder="true"
|
|
|
- title="商户运营"></u-navbar>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view v-for="(item,index) in mqtt_cmd_templet_task"
|
|
|
- :key="item.value">
|
|
|
- {{item.label}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="container">
|
|
|
+ <view class="banner">
|
|
|
+ <u-swiper :list="list1"></u-swiper>
|
|
|
+ </view>
|
|
|
+ <view class="content" v-if="list&&list.length>0">
|
|
|
+ <block v-for="item in list" :key="item.id">
|
|
|
+ <view class="menu-list">
|
|
|
+ <view class="menu-list-title">
|
|
|
+ {{item.meta.title}}
|
|
|
+ </view>
|
|
|
+ <view class="menu-list-content flex flex-wrap justify-start">
|
|
|
+ <block v-for="item1 in item.children" :key="item1.id">
|
|
|
+ <view class="menu-item flex flex-direction align-center">
|
|
|
+ <view class="menu-img"><u-icon :name="item1.meta.icon"></u-icon></view>
|
|
|
+ <view class="menu-name">
|
|
|
+ {{item1.meta.title}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+ <view class="empty" v-else>
|
|
|
+ <u-empty></u-empty>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {
|
|
|
- onMounted,
|
|
|
- getCurrentInstance
|
|
|
-} from "vue";
|
|
|
-import {
|
|
|
- onShow,
|
|
|
- onLoad
|
|
|
-} from '@dcloudio/uni-app'
|
|
|
-const { proxy } = getCurrentInstance();
|
|
|
-const { mqtt_cmd_templet_task } = proxy.$useDict("mqtt_cmd_templet_task");
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- console.log('商户运营', mqtt_cmd_templet_task)
|
|
|
-
|
|
|
-})
|
|
|
-
|
|
|
+ import {
|
|
|
+ onMounted,
|
|
|
+ watch,
|
|
|
+ watchEffect,
|
|
|
+ getCurrentInstance,
|
|
|
+ ref,
|
|
|
+ computed
|
|
|
+ } from "vue";
|
|
|
+ import usePermissionStore from '@/stores/permission.js'
|
|
|
+ const {
|
|
|
+ proxy
|
|
|
+ } = getCurrentInstance();
|
|
|
+ const {
|
|
|
+ mqtt_cmd_templet_task
|
|
|
+ } = proxy.$useDict("mqtt_cmd_templet_task");
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ console.log('商户运营', mqtt_cmd_templet_task)
|
|
|
+ })
|
|
|
+
|
|
|
+ const list1 = ref([
|
|
|
+ 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
|
|
|
+ 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
|
|
+ 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
|
|
+ ])
|
|
|
+
|
|
|
+ const menu = ref(usePermissionStore().permissions_menu)
|
|
|
+
|
|
|
+ const list = computed(() => {
|
|
|
+ let tempList = []
|
|
|
+ if (menu.value.find(i => i.meta.title == '商户运营')) {
|
|
|
+ tempList = menu.value.find(i => i.meta.title == '商户运营').children
|
|
|
+ }
|
|
|
+ return tempList
|
|
|
+ })
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.container {
|
|
|
- padding-bottom: 100rpx;
|
|
|
-
|
|
|
- // 个人信息
|
|
|
- .user {
|
|
|
- background: #2c6ff3
|
|
|
- url("https://cdn.ossfile.mxrvending.com/assets/xy_merc_mini/images/globalPages/user-bg.png")
|
|
|
- no-repeat left top;
|
|
|
- background-size: 100%;
|
|
|
- padding-bottom: 145rpx;
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
-
|
|
|
- .user-content {
|
|
|
- margin-top: 34rpx;
|
|
|
- width: 100%;
|
|
|
-
|
|
|
- .head-img {
|
|
|
- width: 100rpx;
|
|
|
- height: 100rpx;
|
|
|
- border-radius: 100rpx;
|
|
|
- margin-left: 26rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .user-name {
|
|
|
- font-size: 28rpx;
|
|
|
- color: #fff;
|
|
|
- margin-left: 33rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .share {
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- position: relative;
|
|
|
- margin-left: 20rpx;
|
|
|
-
|
|
|
- .share-image {
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
-
|
|
|
- > image {
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- button {
|
|
|
- width: 40rpx;
|
|
|
- height: 40rpx;
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
- opacity: 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .login-out {
|
|
|
- width: 140rpx;
|
|
|
- line-height: 52rpx;
|
|
|
- height: 52rpx;
|
|
|
- text-align: center;
|
|
|
- font-size: 24rpx;
|
|
|
- color: #2c6ff3;
|
|
|
- background-color: #fff;
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- top: 185rpx;
|
|
|
- z-index: 99;
|
|
|
- border-top-left-radius: 52rpx;
|
|
|
- border-bottom-left-radius: 52rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 常用菜单
|
|
|
- .menu {
|
|
|
- width: 724rpx;
|
|
|
- margin-left: 14rpx;
|
|
|
- background: #ffffff;
|
|
|
- box-shadow: 0px 0px 10rpx 0px rgba(174, 201, 255, 0.2);
|
|
|
- border-radius: 14rpx;
|
|
|
- margin-top: 24rpx;
|
|
|
- position: relative;
|
|
|
- padding: 20rpx 36rpx 42rpx;
|
|
|
-
|
|
|
- &.menu-userinfo {
|
|
|
- padding: 36rpx;
|
|
|
- margin-top: -102rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .menu-title {
|
|
|
- font-size: 30rpx;
|
|
|
- font-weight: 800;
|
|
|
- color: #000000;
|
|
|
- position: absolute;
|
|
|
- left: 28rpx;
|
|
|
- top: 28rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .u-content {
|
|
|
- display: flex;
|
|
|
- flex-flow: row nowrap;
|
|
|
- justify-content: space-around;
|
|
|
- text-align: center;
|
|
|
-
|
|
|
- .u-item {
|
|
|
- line-height: 50rpx;
|
|
|
-
|
|
|
- .u-name {
|
|
|
- font-weight: bold;
|
|
|
- font-size: 30rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .u-val {
|
|
|
- font-size: 28rpx;
|
|
|
- color: #666;
|
|
|
- position: relative;
|
|
|
- padding-left: 30rpx;
|
|
|
- display: inline-block;
|
|
|
-
|
|
|
- > image {
|
|
|
- width: 21rpx;
|
|
|
- height: 21rpx;
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .cu-btn {
|
|
|
- padding: 0 12rpx;
|
|
|
- font-size: 22rpx;
|
|
|
- height: 40rpx;
|
|
|
- line-height: 40rpx;
|
|
|
- background-color: #2c6ff3;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
-
|
|
|
- .edit {
|
|
|
- position: absolute;
|
|
|
- right: 28rpx;
|
|
|
- top: 28rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .s-content {
|
|
|
- .s-item {
|
|
|
- line-height: 50rpx;
|
|
|
-
|
|
|
- > text {
|
|
|
- color: red;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .menu-item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- width: 25%;
|
|
|
-
|
|
|
- > .image {
|
|
|
- width: 74rpx;
|
|
|
- height: 74rpx;
|
|
|
- }
|
|
|
-
|
|
|
- > view {
|
|
|
- color: #333333;
|
|
|
- font-size: 26rpx;
|
|
|
- line-height: 26rpx;
|
|
|
- margin-top: 16rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .qrcode-content {
|
|
|
- padding: 24rpx;
|
|
|
-
|
|
|
- .qrcode-img {
|
|
|
- width: 400rpx;
|
|
|
- height: 400rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .save-qrcode {
|
|
|
- margin-top: 24rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .chang-password {
|
|
|
- text-align: center;
|
|
|
- line-height: 60rpx;
|
|
|
- color: #2c6ff3;
|
|
|
- text-decoration: underline;
|
|
|
- }
|
|
|
-
|
|
|
- .pwd-popup-content {
|
|
|
- padding: 24rpx;
|
|
|
-
|
|
|
- > view:nth-child(1) {
|
|
|
- width: 160rpx;
|
|
|
- }
|
|
|
-
|
|
|
- > view:nth-child(2) {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ .container {
|
|
|
+ .content {
|
|
|
+ .menu-list {
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+ width: 726rpx;
|
|
|
+ margin-left: 12rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 8rpx;
|
|
|
+
|
|
|
+ .menu-list-title {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 80rpx;
|
|
|
+ padding: 0 24rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-list-content {
|
|
|
+ width: 100%;
|
|
|
+ padding: 12rpx 0;
|
|
|
+
|
|
|
+ .menu-item {
|
|
|
+ width: 25%;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+
|
|
|
+ .menu-img {
|
|
|
+ width: 80rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ margin-bottom: 18rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-name{
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .empty {
|
|
|
+ margin-top: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|