You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

571 lines
12 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <view class="app">
  3. <!-- <view class="nav-view">
  4. <text class="nav-title">轻未来</text>
  5. </view> -->
  6. <view>
  7. <view class="date-item">
  8. <text class="triangle-bottomright"></text>
  9. <text class="date-title">时间</text>
  10. <text class="triangle-topleft"></text>
  11. <text class="date-txt">2021</text>
  12. </view>
  13. <view @click="toAchievement">
  14. <view class="service-item">
  15. <text class="service-number">100.00</text>
  16. <text class="service-unit"></text>
  17. </view>
  18. <text class="service-title">服务业绩()</text>
  19. <view class="charge-item">
  20. <text class="charge-item-money">充值业绩10.00</text>
  21. <text class="charge-item-money">本月营业额8000</text>
  22. </view>
  23. </view>
  24. <view class="service-item">
  25. <text class="service-number">1000</text>
  26. </view>
  27. <text class="service-title">服务人数 ()</text>
  28. <view class="charge-item">
  29. <text class="charge-item-money">分公司数量800 ()</text>
  30. <text class="charge-item-money">合伙人900 ()</text>
  31. </view>
  32. <view class="separator-section"></view>
  33. <view class="rank-list">
  34. <view class="rank-title">
  35. <image class="rank-img" src="/static/home/rank.png"></image>
  36. <text class="rank-title-txt">4月业绩代理排名</text>
  37. </view>
  38. <view class="rank-item">
  39. <view class="rank-top">
  40. <image class="rank-user-img" src="https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3832721317,312397218&fm=26&gp=0.jpg"></image>
  41. <view class="rank-des">
  42. <view class="rank-des-name">
  43. <text class="rank-des-name-txt">张三</text>
  44. <text class="rank-des-nick-name">zhangsan</text>
  45. </view>
  46. <text class="rank-des-nick-name rank-des-company">分公司</text>
  47. </view>
  48. <image class="rank-rate-img" src="/static/home/firstRank.png"></image>
  49. </view>
  50. <view class="rank-bottom">
  51. <view class="rank-bottom-item">
  52. <view class="rank-bottom-item-des">
  53. <text class="rank-bottom-item-des-number">100.00</text>
  54. <text class="rank-bottom-item-des-unit"> </text>
  55. </view>
  56. <text class="rank-bottom-item-name">服务业绩</text>
  57. </view>
  58. <view class="rank-bottom-item">
  59. <view class="rank-bottom-item-des">
  60. <text class="rank-bottom-item-des-number">10.00</text>
  61. <text class="rank-bottom-item-des-unit"> </text>
  62. </view>
  63. <text class="rank-bottom-item-name">充值业绩</text>
  64. </view>
  65. <view class="rank-bottom-item">
  66. <view class="rank-bottom-item-des">
  67. <text class="rank-bottom-item-des-number">10000</text>
  68. <text class="rank-bottom-item-des-unit"> </text>
  69. </view>
  70. <text class="rank-bottom-item-name">服务人数</text>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="rank-item">
  75. <view class="rank-top">
  76. <image class="rank-user-img" src="https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3832721317,312397218&fm=26&gp=0.jpg"></image>
  77. <view class="rank-des">
  78. <view class="rank-des-name">
  79. <text class="rank-des-name-txt">张三</text>
  80. <text class="rank-des-nick-name">zhangsan</text>
  81. </view>
  82. <text class="rank-des-nick-name rank-des-company">分公司</text>
  83. </view>
  84. <image class="rank-rate-img" src="/static/home/firstRank.png"></image>
  85. </view>
  86. <view class="rank-bottom">
  87. <view class="rank-bottom-item">
  88. <view class="rank-bottom-item-des">
  89. <text class="rank-bottom-item-des-number">100.00</text>
  90. <text class="rank-bottom-item-des-unit"> </text>
  91. </view>
  92. <text class="rank-bottom-item-name">服务业绩</text>
  93. </view>
  94. <view class="rank-bottom-item">
  95. <view class="rank-bottom-item-des">
  96. <text class="rank-bottom-item-des-number">10.00</text>
  97. <text class="rank-bottom-item-des-unit"> </text>
  98. </view>
  99. <text class="rank-bottom-item-name">充值业绩</text>
  100. </view>
  101. <view class="rank-bottom-item">
  102. <view class="rank-bottom-item-des">
  103. <text class="rank-bottom-item-des-number">10000</text>
  104. <text class="rank-bottom-item-des-unit"> </text>
  105. </view>
  106. <text class="rank-bottom-item-name">服务人数</text>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="rank-item">
  111. <view class="rank-top">
  112. <image class="rank-user-img" src="https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3832721317,312397218&fm=26&gp=0.jpg"></image>
  113. <view class="rank-des">
  114. <view class="rank-des-name">
  115. <text class="rank-des-name-txt">张三</text>
  116. <text class="rank-des-nick-name">zhangsan</text>
  117. </view>
  118. <text class="rank-des-nick-name rank-des-company">分公司</text>
  119. </view>
  120. <image class="rank-rate-img" src="/static/home/firstRank.png"></image>
  121. </view>
  122. <view class="rank-bottom">
  123. <view class="rank-bottom-item">
  124. <view class="rank-bottom-item-des">
  125. <text class="rank-bottom-item-des-number">100.00</text>
  126. <text class="rank-bottom-item-des-unit"> </text>
  127. </view>
  128. <text class="rank-bottom-item-name">服务业绩</text>
  129. </view>
  130. <view class="rank-bottom-item">
  131. <view class="rank-bottom-item-des">
  132. <text class="rank-bottom-item-des-number">10.00</text>
  133. <text class="rank-bottom-item-des-unit"> </text>
  134. </view>
  135. <text class="rank-bottom-item-name">充值业绩</text>
  136. </view>
  137. <view class="rank-bottom-item">
  138. <view class="rank-bottom-item-des">
  139. <text class="rank-bottom-item-des-number">10000</text>
  140. <text class="rank-bottom-item-des-unit"> </text>
  141. </view>
  142. <text class="rank-bottom-item-name">服务人数</text>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. </template>
  150. <script>
  151. import tabbarMixin from './mixin/tabbar'
  152. import homeMixin from './mixin/home'
  153. import pageHeader from './components/page-header.vue'
  154. import banner from './components/banner.vue'
  155. import productList from '@/pages/product/components/product-list.vue'
  156. import homeAdvertModal from './components/home-advert-modal.vue'
  157. export default {
  158. components: {
  159. pageHeader,
  160. banner,
  161. productList,
  162. homeAdvertModal
  163. },
  164. mixins: [homeMixin, tabbarMixin],
  165. data() {
  166. return {
  167. navList: [],//导航列表
  168. advertList: [],//广告列表
  169. hotList: [],//热门推荐
  170. }
  171. },
  172. computed: {
  173. midAdvert(){
  174. if(this.advertList.length === 0) return {};
  175. const res = this.advertList.filter(item=> item.advert_type === 'middle');
  176. return res.length > 0 ? res[0]: {};
  177. },
  178. carousel(){
  179. return this.advertList.filter(item=> item.advert_type === 'carousel');
  180. }
  181. },
  182. onLoad() {
  183. this.loadAdvert();
  184. this.loadNavList();
  185. setTimeout(()=>{
  186. //this.navTo('/pages/address/list')
  187. }, 1000)
  188. },
  189. methods: {
  190. toAchievement(){
  191. this.navTo('/pages/qHome/achievement')
  192. },
  193. //加载广告 缓存10分钟
  194. async loadAdvert(){
  195. const res = await this.$request('advert', 'getAdvertList', {}, {
  196. cache: 10*60
  197. });
  198. this.advertList = res.data;
  199. this.log(res);
  200. },
  201. //加载导航 缓存1小时
  202. async loadNavList(){
  203. const res = await this.$request('advert', 'getNavList', {}, {
  204. cache: 60*60*0,
  205. });
  206. this.navList = res.data;
  207. },
  208. }
  209. }
  210. </script>
  211. <style>
  212. page{
  213. background-color: white;
  214. }
  215. </style>
  216. <style scoped lang="scss">
  217. /* 分类 */
  218. .nav-view{
  219. height: 64rpx;
  220. border-bottom: 1rpx solid #E6E6E6;
  221. }
  222. .nav-title{
  223. display: block;
  224. font-size: 20px;
  225. color:#333333 ;
  226. text-align: center;
  227. line-height: 64rpx;
  228. }
  229. .date-item{
  230. margin: 25rpx 0rpx 30rpx;
  231. }
  232. .date-title{
  233. background-color:#EDAF8B ;
  234. color: white;
  235. margin: 10rpx 10rpx 0rpx 20rpx;
  236. font-size: 13px;
  237. }
  238. .date-txt{
  239. font-size: 15px;
  240. color: #333333;
  241. }
  242. .triangle-topleft {
  243. position: relative;
  244. top: 42rpx;
  245. left: -12rpx;
  246. width: 0;
  247. height: 0;
  248. border-top: 36rpx solid #EDAF8B;
  249. border-right: 36rpx solid transparent;
  250. }
  251. .triangle-bottomright {
  252. position: relative;
  253. top: -38rpx;
  254. left: 20rpx;
  255. width: 0;
  256. height: 0;
  257. border-bottom: 36rpx solid #EDAF8B;
  258. border-left: 36rpx solid transparent;
  259. }
  260. .service-item{
  261. margin: 35rpx 10rpx 0rpx 30rpx;
  262. }
  263. .service-number{
  264. color: #EDAF8B;
  265. font-size: 36px;
  266. margin: 0rpx 5rpx 0rpx 0rpx;
  267. }
  268. .service-unit{
  269. color: #EDAF8B;
  270. font-size: 18px;
  271. margin: 0rpx 0rpx 20rpx 0rpx;
  272. }
  273. .service-title{
  274. font-size: 15px;
  275. color: #999999;
  276. margin: 0rpx 0rpx 10rpx 30rpx;
  277. }
  278. .charge-item{
  279. margin: 34rpx 20rpx 50rpx 30rpx;
  280. padding:15rpx 20rpx;
  281. background-color:#F5F5F5 ;
  282. display: flex;
  283. justify-content: space-between;
  284. align-items: center;
  285. }
  286. .charge-item-money{
  287. color: #999999;
  288. font-size: 13px;
  289. }
  290. .separator-section{
  291. height: 20rpx;
  292. background: #F5F5F5;
  293. }
  294. .rank-list{
  295. padding: 10rpx 60rpx;
  296. }
  297. .rank-title{
  298. border-bottom: 1rpx solid $separatorColor;
  299. display: flex;
  300. flex-direction: row;
  301. justify-content: flex-start;
  302. align-items: center;
  303. }
  304. .rank-img{
  305. display: inline-block;
  306. width: 44rpx;
  307. height: 44rpx;
  308. margin: 0rpx 28rpx 0rpx -10rpx;
  309. }
  310. .rank-title-txt{
  311. color: #333333;
  312. font-size: 16px;
  313. font-weight: bold;
  314. height: 110rpx;
  315. line-height: 110rpx;
  316. }
  317. .rank-item{
  318. border-bottom: 1rpx solid $separatorColor;
  319. }
  320. .rank-top{
  321. margin: 20rpx 0rpx;
  322. position: relative;
  323. display: flex;
  324. flex-direction: row;
  325. justify-content: flex-start;
  326. align-items: center;
  327. // vertical-align: middle;
  328. }
  329. .rank-user-img{
  330. width: 130rpx;
  331. height: 130rpx;
  332. border-radius: 50%;
  333. display: inline-block;
  334. margin-right: 28rpx;
  335. }
  336. .rank-des{
  337. display: inline-block;
  338. }
  339. .rank-des-name{
  340. font-size: 15px;
  341. font-weight: bold;
  342. }
  343. .rank-des-name-txt{
  344. font-size: 15px;
  345. font-weight: bold;
  346. color: #333333;
  347. margin:0rpx 10rpx 0rpx 0rpx
  348. }
  349. .rank-des-nick-name{
  350. font-size: 13px;
  351. font-weight: 500;
  352. color: #999999;
  353. }
  354. .rank-des-company{
  355. position: relative;
  356. top: -0rpx;
  357. }
  358. .rank-bottom{
  359. display: flex;
  360. flex-direction: row;
  361. justify-content: space-between;
  362. align-items: center;
  363. margin: 20rpx 0rpx;
  364. }
  365. .rank-bottom-item{
  366. text-align: center;
  367. }
  368. .rank-bottom-item-des{
  369. }
  370. .rank-bottom-item-des-number{
  371. font-size: 18px;
  372. font-weight: bold;
  373. color: #333333;
  374. }
  375. .rank-bottom-item-des-unit{
  376. font-size: 13px;
  377. font-weight: 500;
  378. color: #333333;
  379. margin: 0rpx 4rpx;
  380. }
  381. .rank-bottom-item-name{
  382. position: relative;
  383. top: -4rpx;
  384. font-size: 13px;
  385. font-weight: 500;
  386. color: #999999;
  387. }
  388. .rank-rate-img{
  389. position: absolute;
  390. // top: 18rpx;
  391. right: 0rpx;
  392. width: 50rpx;
  393. height: 50rpx;
  394. border-radius: 50%;
  395. }
  396. .cate-section {
  397. display: flex;
  398. align-items: center;
  399. flex-wrap:wrap;
  400. padding: 10rpx 16rpx;
  401. background: #fff;
  402. .item {
  403. display: flex;
  404. flex-direction: column;
  405. align-items: center;
  406. width: 20%;
  407. padding: 20rpx 0;
  408. font-size: 24rpx;
  409. color: #333;
  410. }
  411. .icon {
  412. width: 84rpx;
  413. height: 84rpx;
  414. margin-bottom: 14rpx;
  415. border-radius: 50%;
  416. }
  417. }
  418. .mid-ad{
  419. width: 100%;
  420. height: 208rpx;
  421. padding: 0 20rpx 20rpx;
  422. background: #fff;
  423. image{
  424. width:100%;
  425. height: 100%;
  426. }
  427. }
  428. .floor-header{
  429. padding: 6rpx 30rpx 8rpx 24rpx;
  430. font-size: 24rpx;
  431. color: #999;
  432. background-color: #fff;
  433. .icon{
  434. flex-shrink: 0;
  435. width: 80rpx;
  436. height: 80rpx;
  437. margin-right: 20rpx;
  438. }
  439. .tit-box{
  440. flex: 1;
  441. display: flex;
  442. flex-direction: column;
  443. }
  444. .tit{
  445. margin-bottom: 10rpx;
  446. font-size: 32rpx;
  447. color: #333;
  448. font-weight: 700;
  449. }
  450. .icon-you{
  451. font-size: 28rpx;
  452. color: #999;
  453. }
  454. }
  455. .hot-wrap{
  456. padding-top: 20rpx;
  457. background: linear-gradient(to bottom, #fff 10rpx, #f7f7f7);
  458. opacity: 0;
  459. transition: opacity .2s;
  460. &.show{
  461. opacity: 1;
  462. }
  463. .floor-header{
  464. padding-bottom: 30rpx;
  465. }
  466. /deep/ .list-item{
  467. box-shadow: 4rpx 0 10rpx rgba(0,0,0,.06);
  468. }
  469. }
  470. </style>