home.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <u-navbar bgColor="transparent">
  4. <view class="u-nav-slot" slot="left" style="display: flex;background-color: transparent;">
  5. <image :src="imgBase+'home_logo.png'" style="width: 200rpx;height: 54rpx;margin-left: 12rpx;"></image>
  6. </view>
  7. </u-navbar>
  8. <div class="lunbo">
  9. <u-swiper
  10. :list="bannarList"
  11. @change="e => current = e.current"
  12. :autoplay="false"
  13. height="368rpx"
  14. >
  15. <template #indicator>
  16. <view class="indicator adf">
  17. <view class="indicator__dot" v-for="(item, index) in bannarList" :key="index"
  18. :class="[index === current && 'indicator__dot--active']">
  19. </view>
  20. </view>
  21. </template>
  22. </u-swiper>
  23. </div>
  24. <div class="preill adfacjb">
  25. <div class="preill-box">
  26. <div class="preill-box-title">我的PREILL评估</div>
  27. <div class="preill-box-num">{{3}}</div>
  28. <div class="preill-box-state adfacjb">
  29. <div class="preill-box-state-pre adfac grey">已完成:<span>{{2}}</span></div>
  30. <div class="preill-box-state-pre adfac yellow">待完成:<span>{{1}}</span></div>
  31. </div>
  32. <div class="preill-box-progress">
  33. <div class="preill-box-progress-current pbp-yellow" :style="{'width':(2/(2+1)*100)+'%'}"></div>
  34. </div>
  35. </div>
  36. <div class="preill-box">
  37. <div class="preill-box-title">我的PREILL报告</div>
  38. <div class="preill-box-num">{{3}}</div>
  39. <div class="preill-box-state adfacjb">
  40. <div class="preill-box-state-pre adfac green">我收到:<span>{{2}}</span></div>
  41. <div class="preill-box-state-pre adfac grey">我发送:<span>{{1}}</span></div>
  42. </div>
  43. <div class="preill-box-progress">
  44. <div class="preill-box-progress-current pbp-green" :style="{'width':(2/(2+1)*100)+'%'}"></div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="boxs adfacjb">
  49. <div class="boxs-pre bp1">
  50. <div class="boxs-pre-title">AI督导对话</div>
  51. <div class="boxs-pre-tip">全球顶尖团队教练</div>
  52. </div>
  53. <div class="boxs-pre bp2">
  54. <div class="boxs-pre-title">人工报告解读</div>
  55. <div class="boxs-pre-tip">团队诊断和提升</div>
  56. </div>
  57. </div>
  58. <div class="common">
  59. <div class="common-title">常用功能</div>
  60. <div class="common-menu adf">
  61. <div class="common-menu-pre adffcac">
  62. <image :src="imgBase+'home_img_pinggu.png'"></image>
  63. <text>PREILL评估</text>
  64. </div>
  65. <div class="common-menu-pre adffcac">
  66. <image :src="imgBase+'home_img_baogao.png'"></image>
  67. <text>PREILL报告</text>
  68. </div>
  69. <div class="common-menu-pre adffcac">
  70. <image :src="imgBase+'home_img_guanli.png'"></image>
  71. <text>问卷管理</text>
  72. </div>
  73. </div>
  74. </div>
  75. <Tabbar :tabbarIndex="0"></Tabbar>
  76. </view>
  77. </template>
  78. <script>
  79. import Tabbar from '@/components/CusTabbar/index.vue'
  80. export default {
  81. components:{ Tabbar },
  82. data(){
  83. return {
  84. current:0,
  85. bannarList:[
  86. this.$imgBase+'home_lb.png',
  87. this.$imgBase+'home_lb.png',
  88. this.$imgBase+'home_lb.png'
  89. ]
  90. }
  91. },
  92. onLoad(options) {
  93. if(options.q){
  94. try{
  95. const decodedUrl = decodeURIComponent(options.q);
  96. const codeMatch = decodedUrl.match(/type=([^&]+)/);
  97. const stationCode = codeMatch ? codeMatch[1] : null;
  98. if(stationCode) uni.setStorageSync('channelType',stationCode)
  99. }catch(e){
  100. console.log(e,'e');
  101. }
  102. }
  103. if(uni.getStorageSync('token')){
  104. this.getWjList();
  105. this.getReportList();
  106. }
  107. },
  108. methods:{
  109. toTurn(url){
  110. if(!url) return
  111. if(url!=='/pages/dialog'&&!this.isLogin()) return
  112. uni.navigateTo({
  113. url
  114. })
  115. },
  116. getWjList(){
  117. this.$api.get('/core/teammember/que/listByUser').then(res=>{
  118. if(res.data.code!==0) return
  119. this.wjDwc = res.data.data.filter(d=>d.status===0).length;
  120. this.wjYwc = res.data.data.filter(d=>d.status===1).length;
  121. })
  122. },
  123. getReportList(){
  124. this.$api.get('/core/report/member/personalReportList').then(res=>{
  125. if(res.data.code!==0) return
  126. this.reportCount = res.data.data.length;
  127. })
  128. }
  129. }
  130. }
  131. </script>
  132. <style scoped lang="scss">
  133. ::v-deep .indicator__dot{
  134. width: 12rpx;
  135. height: 12rpx;
  136. background: transparent;
  137. border: 2rpx solid #FFFFFF;
  138. border-radius: 6rpx;
  139. margin: 0 8rpx;
  140. }
  141. ::v-deep .indicator__dot--active{
  142. width: 12rpx;
  143. height: 12rpx;
  144. background: #FFFFFF;
  145. }
  146. .tabPage{
  147. background-image: linear-gradient(to bottom,#EAE7FC 500rpx,#F6F4FF 744rpx,#F7F7F7 100%);
  148. .topbg{
  149. width: 100%;
  150. height: 720rpx;
  151. position: fixed;
  152. top: 0;
  153. left: 0;
  154. }
  155. .lunbo{
  156. width: 100%;
  157. height: 368rpx;
  158. margin-top: 30rpx;
  159. position: relative;
  160. }
  161. .preill{
  162. margin-top: 30rpx;
  163. position: relative;
  164. &-box{
  165. width: calc(50% - 11rpx);
  166. background: #FFFFFF;
  167. border-radius: 24rpx;
  168. padding: 36rpx 24rpx 26rpx;
  169. box-sizing: border-box;
  170. &-title{
  171. font-family: PingFang-SC, PingFang-SC;
  172. font-weight: bold;
  173. font-size: 28rpx;
  174. color: #002846;
  175. line-height: 28rpx;
  176. }
  177. &-num{
  178. font-family: PingFang-SC, PingFang-SC;
  179. font-weight: 800;
  180. font-size: 40rpx;
  181. color: #002846;
  182. line-height: 40rpx;
  183. margin-top: 24rpx;
  184. }
  185. &-state{
  186. margin-top: 30rpx;
  187. &-pre{
  188. padding-left: 16rpx;
  189. position: relative;
  190. font-family: PingFangSC, PingFang SC;
  191. font-weight: 400;
  192. font-size: 24rpx;
  193. color: #657588;
  194. line-height: 20rpx;
  195. span{
  196. color: #1D2129;
  197. }
  198. &::before{
  199. content: '';
  200. width: 10rpx;
  201. height: 10rpx;
  202. border-radius: 5rpx;
  203. position: absolute;
  204. left: 0;
  205. top: 50%;
  206. margin-top: -5rpx;
  207. }
  208. &.grey{
  209. &::before{
  210. background: #DDE0E6;
  211. }
  212. }
  213. &.yellow{
  214. &::before{
  215. background: #FFD750;
  216. }
  217. }
  218. &.green{
  219. &::before{
  220. background: #31D1D6;
  221. }
  222. }
  223. }
  224. }
  225. &-progress{
  226. margin-top: 20rpx;
  227. width: 100%;
  228. height: 10rpx;
  229. background: #DFE5EE;
  230. border-radius: 5rpx;
  231. position: relative;
  232. &-current{
  233. height: 10rpx;
  234. border-radius: 4rpx;
  235. position: absolute;
  236. left: 0;
  237. top: 0;
  238. }
  239. .pbp-yellow{
  240. background: #FFD750;
  241. }
  242. .pbp-green{
  243. background: #31D1D6;
  244. }
  245. }
  246. }
  247. }
  248. .boxs{
  249. margin-top: 20rpx;
  250. &-pre{
  251. width: calc(50% -11rpx);
  252. padding: 36rpx 124rpx 36rpx 24rpx;
  253. box-sizing: border-box;
  254. height: 184rpx;
  255. &-title{
  256. font-family: PingFang-SC, PingFang-SC;
  257. font-weight: bold;
  258. font-size: 32rpx;
  259. color: #002846;
  260. line-height: 45rpx;
  261. }
  262. &-tip{
  263. font-family: PingFangSC, PingFang SC;
  264. font-weight: 400;
  265. font-size: 24rpx;
  266. color: #657588;
  267. line-height: 33rpx;
  268. margin-top: 20rpx;
  269. }
  270. &.bp1{
  271. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg1.png') no-repeat;
  272. background-size: 100% 100%;
  273. }
  274. &.bp2{
  275. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/home_box_bg2.png') no-repeat;
  276. background-size: 100% 100%;
  277. }
  278. }
  279. }
  280. .common{
  281. margin-top: 20rpx;
  282. background: #FFFFFF;
  283. border-radius: 24rpx;
  284. padding: 40rpx 24rpx 48rpx;
  285. &-title{
  286. font-family: PingFang-SC, PingFang-SC;
  287. font-weight: bold;
  288. font-size: 34rpx;
  289. color: #002846;
  290. line-height: 48rpx;
  291. }
  292. &-menu{
  293. margin-top: 45rpx;
  294. &-pre{
  295. width: calc(100% / 3);
  296. image{
  297. width: 62rpx;
  298. height: 62rpx;
  299. }
  300. text{
  301. font-family: PingFangSC, PingFang SC;
  302. font-weight: 400;
  303. font-size: 26rpx;
  304. color: #193D59;
  305. line-height: 26rpx;
  306. text-align: center;
  307. margin-top: 27rpx;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. </style>