|
@@ -2,12 +2,9 @@
|
|
|
<view class="work-panel">
|
|
|
<view class="work-panel_header">
|
|
|
<image class="image" src="/static/c+unselected.svg" mode="widthFix" />
|
|
|
- <My_search placeholder="搜索全站关键字" :value="content.where.condition" @onSearch="onSearch">
|
|
|
- <view class="cancel" v-if="content.where.condition" hover-class="navigator-hover">
|
|
|
- 取消
|
|
|
- </view>
|
|
|
- <view v-else style="width: 5px;" />
|
|
|
- </My_search>
|
|
|
+ <view @click="onSearch" style="flex:1">
|
|
|
+ <My_search placeholder="搜索全站关键字" disabled></My_search>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- 用户信息 -->
|
|
|
<UserInfo :userInfoValue="userInfoValue"></UserInfo>
|
|
@@ -19,8 +16,8 @@
|
|
|
</navigator>
|
|
|
</view>
|
|
|
<view class="work-panel_applist">
|
|
|
- <template v-for="(item,index) in list" >
|
|
|
- <navigator class="app" url="#" :key="index" v-if="item.path">
|
|
|
+ <template v-for="(item,index) in list">
|
|
|
+ <navigator class="app" :url="item.path" :key="index" v-if="item.path">
|
|
|
<view class="bg" :style="item.color">
|
|
|
<image class="image" :src="`/static/workbench/${item.label}.svg`" mode="widthFix"></image>
|
|
|
</view>
|
|
@@ -30,17 +27,19 @@
|
|
|
|
|
|
</view>
|
|
|
<view class="work-panel_options">
|
|
|
- <navigator class="option" v-for="(item,index) in list2" :key="index" url="#" hover-class="navigator-hover" open-type="navigate">
|
|
|
- <view class="box">
|
|
|
- <text class="left">{{ item.label }}</text>
|
|
|
- <view class="right">
|
|
|
- <!-- <view class="tag">10</view> -->
|
|
|
-
|
|
|
- <u-icon name="arrow-right" color="#999999"></u-icon>
|
|
|
+ <template v-for="(item,index) in list2">
|
|
|
+ <navigator class="option" :key="index" url="#" hover-class="navigator-hover" open-type="navigate" v-if="path">
|
|
|
+ <view class="box">
|
|
|
+ <text class="left">{{ item.label }}</text>
|
|
|
+ <view class="right">
|
|
|
+ <!-- <view class="tag">10</view> -->
|
|
|
+
|
|
|
+ <u-icon name="arrow-right" color="#999999"></u-icon>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- </navigator>
|
|
|
+
|
|
|
+ </navigator>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -99,45 +98,42 @@ export default {
|
|
|
}],
|
|
|
list2: [{
|
|
|
label: "我的访问店铺",
|
|
|
- introduce: "电器 / 吊顶 / 墙面 / 木制品 \n渠道 / 工程",
|
|
|
- itemId: "cloud"
|
|
|
+ itemId: "cloud",
|
|
|
+ name:'1'
|
|
|
}, {
|
|
|
label: "我的预约",
|
|
|
- introduce: "总部直通车 千万大返利",
|
|
|
itemId: "index",
|
|
|
page: "活动",
|
|
|
+ name:'1',
|
|
|
}, {
|
|
|
label: "收货地址",
|
|
|
- introduce: "电器 / 厨卫 / 阳台 / 背景墙 /顶墙",
|
|
|
itemId: "index",
|
|
|
page: "案例",
|
|
|
- params: {
|
|
|
- active: '图库'
|
|
|
- }
|
|
|
+ name:'1',
|
|
|
}, {
|
|
|
label: "我的收藏",
|
|
|
- introduce: "总部精选 / 实景图 / 设计图",
|
|
|
itemId: "index",
|
|
|
page: "案例",
|
|
|
params: {
|
|
|
active: '实景案例'
|
|
|
- }
|
|
|
+ },
|
|
|
+ name:'1',
|
|
|
}, {
|
|
|
label: "通讯录",
|
|
|
- introduce: "单品 / 通知 / 介绍 / 画册 / 物料\n视频 / 说明书等",
|
|
|
itemId: "cloud",
|
|
|
+ name:'1',
|
|
|
}, {
|
|
|
label: "考试成绩",
|
|
|
- introduce: "产品 / 销售 / 管理 / 设计 / 考试等",
|
|
|
itemId: "cloud",
|
|
|
+ name:'1',
|
|
|
}, {
|
|
|
label: "问卷调查",
|
|
|
- introduce: "装修报价 / 老房改造 / 精装房焕新\n品质服务",
|
|
|
- path: "/packageA/advertising/unshareable?id=505"
|
|
|
+ path: "/packageA/advertising/unshareable?id=505",
|
|
|
+ name:'1',
|
|
|
}, {
|
|
|
label: "意见反馈",
|
|
|
- introduce: "装修报价 / 老房改造 / 精装房焕新\n品质服务",
|
|
|
- path: "/packageA/advertising/unshareable?id=505"
|
|
|
+ path: "/packageA/advertising/unshareable?id=505",
|
|
|
+ name:'1',
|
|
|
}],
|
|
|
colors: ['background: linear-gradient( 225deg, #81AEF3 0%, #6787E7 100%)',
|
|
|
"background: linear-gradient( 225deg, #F1AA68 0%, #EA895B 100%)",
|
|
@@ -178,25 +174,36 @@ export default {
|
|
|
},
|
|
|
//处理权限
|
|
|
handleAppRole () {
|
|
|
- let that = this
|
|
|
- uni.getStorage({
|
|
|
- key: 'authList',
|
|
|
- success: function (res) {
|
|
|
- let keys = Object.keys(res.data.工作台)
|
|
|
- for (let index = 0; index < that.list.length; index++) {
|
|
|
- for (let index2 = 0; index2 < keys.length; index2++) {
|
|
|
- if (res.data.工作台[keys[index2]] && res.data.工作台[keys[index2]].name == that.list[index].name) {
|
|
|
- that.list[index] = Object.assign({},that.list[index],res.data.工作台[keys[index2]])
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ this.roles = uni.getStorageSync("authList")
|
|
|
+ let keys = Object.keys(this.roles.工作台)
|
|
|
+ for (let index = 0; index < this.list.length; index++) {
|
|
|
+ for (let index2 = 0; index2 < keys.length; index2++) {
|
|
|
+ if (this.roles.工作台[keys[index2]] && this.roles.工作台[keys[index2]].name == this.list[index].name) {
|
|
|
+ this.list[index] = Object.assign({},this.list[index],this.roles.工作台[keys[index2]])
|
|
|
+ break;
|
|
|
}
|
|
|
- that.roles = res.data
|
|
|
- console.log(res.data,that.list,'权限');
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
+ for (let index = 0; index < this.list2.length; index++) {
|
|
|
+ for (let index2 = 0; index2 < keys.length; index2++) {
|
|
|
+ if (this.roles.工作台[keys[index2]] && this.roles.工作台[keys[index2]].name == this.list2[index].name) {
|
|
|
+ this.list2[index] = Object.assign({},this.list2[index],this.roles.工作台[keys[index2]])
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.roles,this.list,'权限');
|
|
|
|
|
|
},
|
|
|
+ onSearch () {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/cloud/globalSearch/index',
|
|
|
+ // fail: (fail) => {
|
|
|
+ // viewImage(item.attinfos[0].url)
|
|
|
+ // },
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
created () {
|
|
|
this.list = this.dye(this.list, this.colors, 1)
|