index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="main">
  3. <!--轮播图-->
  4. <view class="banner">
  5. <u-swiper circular :radius="5" :indicator="true" keyName="image" :list="bannerList" :height="150" class="uni-swiper" @click="click"></u-swiper>
  6. </view>
  7. <!--通知公告-->
  8. <view class="notice">
  9. <u-notice-bar color="#848484" :text="noticeList" :step="true" direction="column" mode="link" bgColor="white" speed="300" url="/pages/notice/index"></u-notice-bar>
  10. </view>
  11. <view class="flow">
  12. <view class="title">操作流程</view>
  13. <!--实名认证-->
  14. <view class="item" @click="go('/pages/authentication/index')">
  15. <view class="icon tb">&#xe600;</view>
  16. <view class="con">
  17. <view class="bt">实名认证</view>
  18. <view class="bor" style="background: linear-gradient(to right, rgb(198 187 250), rgb(251 251 251))"></view>
  19. <view class="zt">{{ !user.isAuthentication || user.isAuthentication == 0 ? '尚未提交资料' : '已提交资料' }}</view>
  20. </view>
  21. <view class="state" v-if="user.isAuthentication === 1">
  22. <text class="zt">已认证</text>
  23. <text class="icon">&#xe62b;</text>
  24. </view>
  25. <view class="state" v-else>
  26. <view class="go">去认证</view>
  27. </view>
  28. </view>
  29. <!--关联企业-->
  30. <view class="item" @click="go('/pages/company/index')">
  31. <view class="icon tb">&#xe623;</view>
  32. <view class="con">
  33. <view class="bt">关联企业</view>
  34. <view class="bor" style="background: linear-gradient(to right, #eecce0, rgb(253 253 253))"></view>
  35. <view class="zt">{{ !user.isCompany || user.isCompany == 0 ? '尚未关联企业' : '已完成' }}</view>
  36. </view>
  37. <view class="state" v-if="user.isCompany > 0">
  38. <text class="zt">{{ user.isCompany }}家</text>
  39. <text class="icon">&#xe62b;</text>
  40. </view>
  41. <view class="state" v-else>
  42. <view class="go">去关联</view>
  43. </view>
  44. </view>
  45. <!--开始接包-->
  46. <view class="item">
  47. <view class="icon tb">&#xe604;</view>
  48. <view class="con">
  49. <view class="bt">开始接包</view>
  50. <view class="bor" style="background: linear-gradient(to right, #c9f1d4, rgb(250 255 252))"></view>
  51. <view class="zt">未实名</view>
  52. </view>
  53. <view class="state">
  54. <text class="zt">已认证</text>
  55. <text class="icon">&#xe62b;</text>
  56. </view>
  57. </view>
  58. <!--电子签约-->
  59. <view class="item">
  60. <view class="icon tb">&#xe6ed;</view>
  61. <view class="con">
  62. <view class="bt">电子签约</view>
  63. <view class="bor" style="background: linear-gradient(to right, #f6f6bf, rgb(246 246 246))"></view>
  64. <view class="zt">未实名</view>
  65. </view>
  66. <view class="state">
  67. <text class="zt">已认证</text>
  68. <text class="icon">&#xe62b;</text>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. export default {
  76. data() {
  77. return {
  78. ip: this.http.ip,
  79. user: {},
  80. bannerList: [{ image: '../../static/index.jpg' }],
  81. noticeList: ['承揽时代小程序上线了', '个人接包时代来临,动动手指就赚钱']
  82. };
  83. },
  84. onShow() {
  85. if (this.hasLogin()) {
  86. this.getUser();
  87. }
  88. },
  89. onLoad() {
  90. //this.getData();
  91. },
  92. methods: {
  93. getUser() {
  94. this.http.request({
  95. url: '/app/user/info',
  96. success: (res) => {
  97. this.user = res.data.data;
  98. }
  99. });
  100. },
  101. getData() {
  102. this.http.request({
  103. url: this.http.urls.home_list,
  104. success: (res) => {
  105. res.data.data.forEach((item) => {
  106. this.noticeList.push(item.title);
  107. });
  108. }
  109. });
  110. },
  111. go(url) {
  112. if (this.hasLogin()) {
  113. uni.navigateTo({ url: url });
  114. } else {
  115. uni.navigateTo({ url: '/pages/user/login' });
  116. }
  117. }
  118. }
  119. };
  120. </script>
  121. <style lang="scss">
  122. .main {
  123. padding: 5px 15px 15px 15px;
  124. }
  125. .banner {
  126. }
  127. .notice {
  128. margin-top: 10px;
  129. }
  130. .flow {
  131. padding-top: 20px;
  132. .title {
  133. font-size: 15px;
  134. }
  135. .item {
  136. background-color: white;
  137. border-radius: 10px;
  138. padding: 18px;
  139. overflow: hidden;
  140. margin-top: 12px;
  141. .tb {
  142. float: left;
  143. padding: 13px;
  144. border: 1px solid $main-color;
  145. color: $main-color;
  146. border-radius: 50%;
  147. font-size: 23px;
  148. }
  149. .con {
  150. float: left;
  151. padding-left: 20px;
  152. .bt {
  153. font-size: 18px;
  154. }
  155. .bor {
  156. background-color: red;
  157. border-radius: 20px;
  158. height: 9px;
  159. margin-top: -9px;
  160. width: 105px;
  161. margin-left: -5px;
  162. }
  163. .zt {
  164. font-size: 13px;
  165. padding-top: 3px;
  166. color: #909090;
  167. }
  168. }
  169. .state {
  170. float: right;
  171. padding-top: 11px;
  172. .zt {
  173. font-size: 13px;
  174. color: $main-color;
  175. }
  176. .icon {
  177. color: #909090;
  178. }
  179. .go {
  180. padding: 5px 12px;
  181. font-size: 14px;
  182. background-color: #5a7afc;
  183. color: white;
  184. border-radius: 20px;
  185. }
  186. }
  187. }
  188. }
  189. </style>