index.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <template>
  2. <view class="notify">
  3. <view class="promotion-center">
  4. <list-cell icon="iconfenlei" :iconColor="themeColor.color" navigateType="" title="公文管理"></list-cell>
  5. <!-- 业务中心 -->
  6. <view class="category-list">
  7. <view class="category" v-for="(item, index) in worksList" :key="index" @tap.stop="navTo(item.url)">
  8. <view>
  9. <view class="img">
  10. <text class="iconfont" :class="[item.icon, 'text-'+themeColor.name]"></text>
  11. </view>
  12. <view class="text">{{ item.title }}</view>
  13. </view>
  14. </view>
  15. </view>
  16. <!-- 日常管理 -->
  17. <!-- <list-cell icon="iconyingyong" :iconColor="themeColor.color" navigateType="" title="通知管理" ></list-cell>
  18. <view class="category-list">
  19. <view class="category" v-for="(item, index) in manageSectionList" :key="index" @tap.stop="navTo(item.url)">
  20. <view >
  21. <view class="img">
  22. <text class="iconfont" :class="[item.icon, 'text-'+themeColor.name]"></text>
  23. </view>
  24. <view class="text">{{ item.title }}</view>
  25. </view>
  26. </view>
  27. </view> -->
  28. <!-- 其他应用 -->
  29. <list-cell icon="iconyingyong" :iconColor="themeColor.color" navigateType="" title="信息管理"></list-cell>
  30. <view class="category-list">
  31. <view class="category" v-for="(item, index) in otherSectionList" :key="index"
  32. @tap.stop="navTo(item.url)">
  33. <view>
  34. <view class="img">
  35. <text class="iconfont" :class="[item.icon, 'text-'+themeColor.name]"></text>
  36. </view>
  37. <view class="text">{{ item.title }}</view>
  38. </view>
  39. </view>
  40. </view>
  41. <!--
  42. <list-cell icon="iconyingyong" :iconColor="themeColor.color" navigateType="" title="信息管理"></list-cell>
  43. <view class="category-list">
  44. <view class="category" v-for="(item, index) in otherSectionList" :key="index"
  45. @tap.stop="navTo(item.url)">
  46. <view>
  47. <view class="img">
  48. <text class="iconfont" :class="[item.icon, 'text-'+themeColor.name]"></text>
  49. </view>
  50. <view class="text">{{ item.title }}</view>
  51. </view>
  52. </view>
  53. </view>
  54. -->
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. // import {memberInfo} from '@/api/userInfo';
  60. import moment from '@/common/moment';
  61. import mConstDataConfig from '@/config/constData.config';
  62. import listCell from '@/components/oa-list-cell';
  63. import {
  64. mapMutations
  65. } from 'vuex';
  66. export default {
  67. components: {
  68. listCell,
  69. },
  70. data() {
  71. return {
  72. hasLogin: false,
  73. worksList: this.$mConstDataConfig.worksList,
  74. manageSectionList: this.$mConstDataConfig.manageSectionList,
  75. otherSectionList: this.$mConstDataConfig.otherSectionList,
  76. };
  77. },
  78. filters: {},
  79. onShow() {
  80. this.initData();
  81. },
  82. computed: {
  83. bottom() {
  84. let bottom = 0;
  85. /* #ifdef H5 */
  86. bottom = 90;
  87. /* #endif */
  88. return bottom;
  89. }
  90. },
  91. methods: {
  92. // 数据初始化
  93. initData() {
  94. this.hasLogin = this.$mStore.getters.hasLogin;
  95. if (!this.hasLogin) {
  96. this.loading = false;
  97. if (type === 'refresh') uni.stopPullDownRefresh();
  98. uni.reLaunch({
  99. url: '../public/login'
  100. })
  101. return;
  102. }
  103. uni.setNavigationBarColor({
  104. frontColor: '#ffffff',
  105. backgroundColor: this.themeColor.color,
  106. animation: {
  107. duration: 400,
  108. timingFunc: 'easeIn'
  109. }
  110. })
  111. },
  112. // 统一跳转接口,拦截未登录路由
  113. navTo(route) {
  114. if (!route) return;
  115. if (!this.hasLogin) {
  116. uni.removeStorageSync('backToPage');
  117. this.$mRouter.push({
  118. route: '/pages/public/login'
  119. });
  120. } else {
  121. this.$mRouter.push({
  122. route
  123. });
  124. }
  125. },
  126. }
  127. };
  128. </script>
  129. <style lang="scss">
  130. page {
  131. background-color: $page-color-base;
  132. }
  133. .notify {
  134. .works-empty {
  135. position: fixed;
  136. left: 0;
  137. top: 0;
  138. width: 100%;
  139. height: 100vh;
  140. padding-bottom: 100upx;
  141. display: flex;
  142. justify-content: center;
  143. flex-direction: column;
  144. align-items: center;
  145. background: #fff;
  146. .iconfont {
  147. font-size: $font-lg + 100upx;
  148. }
  149. .empty-tips {
  150. display: flex;
  151. font-size: $font-sm + 2upx;
  152. color: $font-color-disabled;
  153. .navigator {
  154. margin-left: 16upx;
  155. }
  156. }
  157. }
  158. .promotion-center {
  159. background: #fff;
  160. margin-bottom: 20upx;
  161. /*分类列表*/
  162. .category-list {
  163. width: 100%;
  164. padding: 0 0 30upx 0;
  165. border-bottom: solid 2upx #f6f6f6;
  166. display: flex;
  167. flex-wrap: wrap;
  168. .category {
  169. width: 25%;
  170. margin-top: 50upx;
  171. display: flex;
  172. justify-content: center;
  173. flex-wrap: wrap;
  174. .img {
  175. width: 100%;
  176. display: flex;
  177. justify-content: center;
  178. .iconfont {
  179. font-size: $font-lg + 50upx;
  180. }
  181. }
  182. .text {
  183. width: 100%;
  184. display: flex;
  185. justify-content: center;
  186. font-size: 24upx;
  187. color: #3c3c3c;
  188. }
  189. .share-btn {
  190. height: 142upx;
  191. text-align: left;
  192. background: none;
  193. padding: 0;
  194. margin: 0;
  195. }
  196. .share-btn:after {
  197. border: none;
  198. border-radius: none;
  199. }
  200. }
  201. }
  202. }
  203. .header {
  204. width: 100%;
  205. padding-left: $font-lg;
  206. height: 100upx;
  207. display: flex;
  208. align-items: center;
  209. position: fixed;
  210. top: 0;
  211. z-index: 10;
  212. background-color: #fff;
  213. /* #ifdef APP-PLUS */
  214. top: var(--status-bar-height);
  215. /* #endif */
  216. .title {
  217. font-size: 36upx;
  218. }
  219. }
  220. .place {
  221. background-color: #ffffff;
  222. height: 100upx;
  223. /* #ifdef APP-PLUS */
  224. margin-top: var(--status-bar-height);
  225. /* #endif */
  226. }
  227. .notify-list {
  228. .read {
  229. text-align: right;
  230. margin-right: $spacing-base;
  231. margin-top: $spacing-base;
  232. margin-bottom: $spacing-sm;
  233. text {
  234. margin-left: $spacing-base;
  235. }
  236. }
  237. .row {
  238. width: calc(94%);
  239. height: calc(22vw + 40upx);
  240. margin: 0 auto $spacing-base;
  241. border-radius: 15upx;
  242. box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.1);
  243. display: flex;
  244. align-items: center;
  245. position: relative;
  246. overflow: hidden;
  247. z-index: 4;
  248. border: 0;
  249. .menu {
  250. .iconfont {
  251. color: #fff;
  252. font-size: 60upx;
  253. }
  254. position: absolute;
  255. width: 29%;
  256. height: 100%;
  257. right: 0;
  258. display: flex;
  259. justify-content: center;
  260. align-items: center;
  261. color: #fff;
  262. z-index: 2;
  263. }
  264. .carrier {
  265. @keyframes showMenu {
  266. 0% {
  267. transform: translateX(0);
  268. }
  269. 100% {
  270. transform: translateX(-30%);
  271. }
  272. }
  273. @keyframes closeMenu {
  274. 0% {
  275. transform: translateX(-30%);
  276. }
  277. 100% {
  278. transform: translateX(0);
  279. }
  280. }
  281. &.open {
  282. animation: showMenu 0.25s linear both;
  283. }
  284. &.close {
  285. animation: closeMenu 0.15s linear both;
  286. }
  287. background-color: #fff;
  288. position: absolute;
  289. width: 100%;
  290. padding: 0 0;
  291. height: 100%;
  292. z-index: 3;
  293. display: flex;
  294. align-items: center;
  295. }
  296. }
  297. .notify-wrapper {
  298. background-color: $color-white;
  299. width: 100%;
  300. padding: $spacing-base $spacing-lg $spacing-base 80upx;
  301. margin: $spacing-base 0 0;
  302. border-radius: 15upx;
  303. position: relative;
  304. .title {
  305. font-size: $font-lg;
  306. color: $font-color-dark;
  307. font-weight: 500;
  308. margin: 0 0 $spacing-sm;
  309. }
  310. .content {
  311. font-size: $font-sm;
  312. color: $font-color-base;
  313. height: 75upx;
  314. line-height: 36upx;
  315. }
  316. .time {
  317. font-size: $font-base;
  318. color: $font-color-light;
  319. }
  320. .type {
  321. position: absolute;
  322. top: 26upx;
  323. left: -10upx;
  324. border: none;
  325. font-size: $font-sm;
  326. opacity: 0.8;
  327. }
  328. .un-read {
  329. display: inline-block;
  330. width: 12upx;
  331. height: 12upx;
  332. border-radius: 50%;
  333. position: absolute;
  334. top: 32upx;
  335. right: 30upx;
  336. }
  337. }
  338. }
  339. .notify-empty {
  340. position: fixed;
  341. left: 0;
  342. top: 0;
  343. width: 100%;
  344. height: 100vh;
  345. padding-bottom: 100upx;
  346. display: flex;
  347. justify-content: center;
  348. flex-direction: column;
  349. align-items: center;
  350. background: #fff;
  351. .iconfont {
  352. font-size: $font-lg + 100upx;
  353. }
  354. .empty-tips {
  355. display: flex;
  356. font-size: $font-sm + 2upx;
  357. color: $font-color-disabled;
  358. .navigator {
  359. margin-left: 16upx;
  360. }
  361. }
  362. }
  363. }
  364. </style>