index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <template>
  2. <view>
  3. <view class="tui-mybg-box">
  4. <view class="tui-header-center">
  5. <image :src="partnerinfo.touxiang || '/static/images/my/mine_def_touxiang_3x.png'" class="tui-avatar"
  6. @tap="navigateTo('/pagesA/my/userInfo/userInfo')"></image>
  7. <view class="tui-info">
  8. <view class="tui-nickname">
  9. {{partnerinfo.title}}
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="tui-content-box">
  15. <view class="tui-box tui-assets-box">
  16. <tui-list-cell padding="0" unlined :hover="false">
  17. <view class="tui-cell-header">
  18. <view class="tui-cell-title">我的分红</view>
  19. </view>
  20. </tui-list-cell>
  21. <view class="tui-order-list tui-assets-list">
  22. <view class="tui-order-item">
  23. <view class="tui-assets-num"><text>{{partnerinfo.total_income}}</text></view>
  24. <view class="tui-assets-text">总收入</view>
  25. </view>
  26. <view class="tui-order-item">
  27. <view class="tui-assets-num">
  28. <text>{{partnerinfo.income}}</text>
  29. </view>
  30. <view class="tui-assets-text">本月收入</view>
  31. </view>
  32. <view class="tui-order-item">
  33. <view class="tui-assets-num">
  34. <text>{{partnerinfo.income}}</text>
  35. </view>
  36. <view class="tui-assets-text">可提现</view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="tui-box tui-tool-box">
  41. <view class="tui-order-list tui-flex-wrap">
  42. <view class="tui-tool-item" @tap="navigateTo('/pagesA/my/partner/commisionlog')">
  43. <view class="tui-icon-box">
  44. <image src="/static/images/mall/my/icon_ticket_3x.png" class="tui-tool-icon"></image>
  45. </view>
  46. <view class="tui-tool-text">分红明细</view>
  47. </view>
  48. <view class="tui-tool-item" @tap="navigateTo('/pagesA/my/partner/teamOrder')">
  49. <view class="tui-icon-box">
  50. <image src="/static/images/mall/my/icon_kaipiao_3x.png" class="tui-tool-icon"></image>
  51. </view>
  52. <view class="tui-tool-text">分红订单</view>
  53. </view>
  54. <view class="tui-tool-item" @tap="navigateTo('/pagesA/my/withdraw/withdrawlog?mo=partner')">
  55. <view class="tui-icon-box">
  56. <image src="/static/images/mall/my/icon_zhihuan_3x.png" class="tui-tool-icon"></image>
  57. </view>
  58. <view class="tui-tool-text">提现记录</view>
  59. </view>
  60. <view v-if="partnerinfo.is_submitaudit!=1" class="tui-tool-item" @tap="navigateTo('/pagesA/my/withdraw/withdraw?mo=partner')">
  61. <view class="tui-icon-box">
  62. <image src="/static/images/mall/my/icon_fanxian_3x.png" class="tui-tool-icon"></image>
  63. </view>
  64. <view class="tui-tool-text">提现</view>
  65. </view>
  66. <view v-if="partnerinfo.is_submitaudit!=1" class="tui-tool-item" @tap="navigateTo('/pagesA/my/memberbankcard/memberbankcard')">
  67. <view class="tui-icon-box">
  68. <image src="/static/images/mall/my/myCoupon.png" class="tui-tool-icon"></image>
  69. </view>
  70. <view class="tui-tool-text">提现帐号</view>
  71. </view>
  72. </view>
  73. </view>
  74. <!--为你推荐-->
  75. <block v-if="recommendgoods.length>0">
  76. <tui-divider :size="28" :bold="true" color="#333" width="50%">猜你喜欢</tui-divider>
  77. <view class="tui-product-list">
  78. <view class="tui-product-container">
  79. <block v-for="(item, index) in recommendgoods" :key="index">
  80. <!--商品列表-->
  81. <view class="tui-pro-item" hover-class="hover" :hover-start-time="150"
  82. @tap="navigateTo('/pages/goodsDetail/goodsDetail?id='+item.id)">
  83. <image :src="item.pic" class="tui-pro-img" mode="widthFix" />
  84. <view class="tui-pro-content">
  85. <view class="tui-pro-tit">{{ item.name }}</view>
  86. <view>
  87. <view class="tui-pro-price">
  88. <text v-if="item.is_points_goods==1" class="tui-sale-price">{{lang.points}}:{{ item.pay_points }}</text>
  89. <text v-if="item.is_points_goods!=1" class="tui-sale-price">¥{{ item.price }}</text>
  90. <text v-if="item.costs>0" class="tui-factory-price">¥{{ item.costs }}</text>
  91. </view>
  92. <view class="tui-pro-pay">{{ item.sale_count }}人付款</view>
  93. </view>
  94. </view>
  95. </view>
  96. </block>
  97. </view>
  98. </view>
  99. </block>
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. export default {
  105. data() {
  106. return {
  107. lang:{},
  108. top: 0, //标题图标距离顶部距离
  109. opacity: 0,
  110. scrollTop: 0.5,
  111. partnerinfo: [],
  112. recommendgoods: []
  113. };
  114. },
  115. onLoad: function(options) {
  116. let _this = this;
  117. let obj = {};
  118. // #ifdef MP-WEIXIN
  119. obj = wx.getMenuButtonBoundingClientRect();
  120. // #endif
  121. // #ifdef MP-BAIDU
  122. obj = swan.getMenuButtonBoundingClientRect();
  123. // #endif
  124. // #ifdef MP-ALIPAY
  125. my.hideAddToDesktopMenu();
  126. // #endif
  127. uni.getSystemInfo({
  128. success: res => {
  129. this.width = obj.left || res.windowWidth;
  130. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
  131. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
  132. this.scrollH = res.windowWidth * 0.6;
  133. }
  134. });
  135. _this.$request.get('Lang.getlang').then(res => {
  136. if (res.errno == 0) {
  137. _this.lang = res.data;
  138. }
  139. });
  140. _this.$request.get('Goods.recommend').then(res => {
  141. if (res.errno == 0) {
  142. _this.recommendgoods = res.data;
  143. }
  144. });
  145. },
  146. onShow() {
  147. let _this = this;
  148. _this.$request.get('partner.check', {
  149. samkey: (new Date()).valueOf()
  150. }).then(res => {
  151. if (res.errno == 0) {
  152. if(!res.data.id){
  153. uni.showModal({
  154. title: '提示',
  155. content: res.msg,
  156. showCancel: false,
  157. //是否显示取消按钮
  158. success: function (res) {
  159. if (res.cancel) {//点击取消,默认隐藏弹框
  160. } else {
  161. _this.sam.navigateTo("/pages/login/reg?ptype=partner");
  162. }
  163. }
  164. });
  165. }else{
  166. _this.partnerinfo = res.data;
  167. }
  168. }
  169. });
  170. },
  171. methods: {
  172. navigateTo(url) {
  173. uni.navigateTo({
  174. url: url
  175. });
  176. },
  177. initNavigation(e) {
  178. this.opacity = e.opacity;
  179. this.top = e.top;
  180. },
  181. opacityChange(e) {
  182. this.opacity = e.opacity;
  183. }
  184. },
  185. onPageScroll(e) {
  186. this.scrollTop = e.scrollTop;
  187. },
  188. onPullDownRefresh() {
  189. setTimeout(() => {
  190. uni.stopPullDownRefresh();
  191. }, 200);
  192. },
  193. onReachBottom: function() {
  194. }
  195. };
  196. </script>
  197. <style>
  198. .tui-set-box {
  199. display: flex;
  200. align-items: center;
  201. justify-content: space-between;
  202. }
  203. .tui-icon-box {
  204. position: relative;
  205. }
  206. .tui-icon-setup {
  207. margin-left: 8rpx;
  208. }
  209. .tui-badge {
  210. position: absolute;
  211. font-size: 24rpx;
  212. height: 32rpx;
  213. min-width: 20rpx;
  214. padding: 0 6rpx;
  215. border-radius: 40rpx;
  216. right: 10rpx;
  217. top: -5rpx;
  218. transform: scale(0.8) translateX(60%);
  219. transform-origin: center center;
  220. display: flex;
  221. align-items: center;
  222. justify-content: center;
  223. z-index: 10;
  224. }
  225. .tui-badge-red {
  226. background: #f74d54;
  227. color: #fff;
  228. }
  229. .tui-badge-white {
  230. background: #fff;
  231. color: #f74d54;
  232. }
  233. .tui-badge-dot {
  234. position: absolute;
  235. height: 12rpx;
  236. width: 12rpx;
  237. border-radius: 50%;
  238. right: -12rpx;
  239. top: 0;
  240. background: #f74d54;
  241. }
  242. .tui-mybg-box {
  243. width: 100%;
  244. height: 264rpx;
  245. position: relative;
  246. background-color: #e41f19;
  247. }
  248. .tui-my-bg {
  249. width: 100%;
  250. height: 464rpx;
  251. display: block;
  252. }
  253. .tui-header-center {
  254. position: absolute;
  255. width: 100%;
  256. height: 128rpx;
  257. left: 0;
  258. top: 18rpx;
  259. padding: 0 30rpx;
  260. box-sizing: border-box;
  261. display: flex;
  262. align-items: center;
  263. }
  264. .tui-avatar {
  265. flex-shrink: 0;
  266. width: 128rpx;
  267. height: 128rpx;
  268. border-radius: 50%;
  269. display: block;
  270. }
  271. .tui-info {
  272. width: 60%;
  273. padding-left: 30rpx;
  274. }
  275. .tui-nickname {
  276. font-size: 30rpx;
  277. font-weight: 500;
  278. color: #fff;
  279. display: flex;
  280. align-items: center;
  281. }
  282. .tui-img-vip {
  283. width: 56rpx;
  284. height: 24rpx;
  285. margin-left: 18rpx;
  286. }
  287. .tui-explain {
  288. width: 80%;
  289. font-size: 24rpx;
  290. font-weight: 400;
  291. color: #fff;
  292. opacity: 0.75;
  293. padding-top: 8rpx;
  294. white-space: nowrap;
  295. overflow: hidden;
  296. text-overflow: ellipsis;
  297. }
  298. .tui-btn-edit {
  299. flex-shrink: 0;
  300. padding-right: 22rpx;
  301. }
  302. .tui-header-btm {
  303. width: 100%;
  304. padding: 0 30rpx;
  305. box-sizing: border-box;
  306. position: absolute;
  307. left: 0;
  308. top: 280rpx;
  309. display: flex;
  310. align-items: center;
  311. justify-content: space-between;
  312. color: #fff;
  313. }
  314. .tui-btm-item {
  315. flex: 1;
  316. display: flex;
  317. flex-direction: column;
  318. align-items: center;
  319. justify-content: center;
  320. }
  321. .tui-btm-num {
  322. font-size: 32rpx;
  323. font-weight: 600;
  324. position: relative;
  325. }
  326. .tui-btm-text {
  327. font-size: 24rpx;
  328. opacity: 0.85;
  329. padding-top: 4rpx;
  330. }
  331. .tui-content-box {
  332. width: 100%;
  333. padding: 0 30rpx;
  334. box-sizing: border-box;
  335. position: relative;
  336. top: -100rpx;
  337. z-index: 10;
  338. }
  339. .tui-box {
  340. width: 100%;
  341. background: #fff;
  342. box-shadow: 0 3rpx 20rpx rgba(183, 183, 183, 0.1);
  343. border-radius: 30rpx;
  344. overflow: hidden;
  345. }
  346. .tui-order-box {
  347. height: 208rpx;
  348. }
  349. .tui-cell-header {
  350. width: 100%;
  351. height: 74rpx;
  352. padding: 0 26rpx;
  353. box-sizing: border-box;
  354. display: flex;
  355. align-items: center;
  356. justify-content: space-between;
  357. }
  358. .tui-cell-title {
  359. font-size: 30rpx;
  360. line-height: 30rpx;
  361. font-weight: 600;
  362. color: #333;
  363. }
  364. .tui-cell-sub {
  365. font-size: 26rpx;
  366. font-weight: 400;
  367. color: #999;
  368. padding-right: 28rpx;
  369. }
  370. .tui-order-list {
  371. width: 100%;
  372. height: 134rpx;
  373. padding: 0 30rpx;
  374. box-sizing: border-box;
  375. display: flex;
  376. align-items: center;
  377. }
  378. .tui-order-item {
  379. flex: 1;
  380. display: flex;
  381. flex-direction: column;
  382. align-items: center;
  383. }
  384. .tui-order-text,
  385. .tui-tool-text {
  386. font-size: 26rpx;
  387. font-weight: 400;
  388. color: #666;
  389. padding-top: 4rpx;
  390. }
  391. .tui-tool-text {
  392. font-size: 24rpx;
  393. }
  394. .tui-order-icon {
  395. width: 56rpx;
  396. height: 56rpx;
  397. display: block;
  398. }
  399. .tui-assets-box {
  400. height: 178rpx;
  401. margin-top: 20rpx;
  402. }
  403. .tui-assets-list {
  404. height: 84rpx;
  405. }
  406. .tui-assets-num {
  407. font-size: 38rpx;
  408. font-weight: 500;
  409. color: #333;
  410. font-weight: bold;
  411. position: relative;
  412. }
  413. .tui-assets-text {
  414. font-size: 24rpx;
  415. font-weight: 400;
  416. color: #666;
  417. padding-top: 6rpx;
  418. }
  419. .tui-tool-box {
  420. margin-top: 20rpx;
  421. }
  422. .tui-flex-wrap {
  423. flex-wrap: wrap;
  424. height: auto;
  425. padding-bottom: 30rpx;
  426. }
  427. .tui-tool-item {
  428. width: 33%;
  429. display: flex;
  430. align-items: center;
  431. justify-content: center;
  432. flex-direction: column;
  433. padding-top: 30rpx;
  434. }
  435. .tui-tool-icon {
  436. width: 64rpx;
  437. height: 64rpx;
  438. display: block;
  439. }
  440. .tui-badge-icon {
  441. width: 66rpx;
  442. height: 30rpx;
  443. position: absolute;
  444. right: 0;
  445. transform: translateX(88%);
  446. top: -15rpx;
  447. }
  448. /*为你推荐*/
  449. .tui-product-list {
  450. display: flex;
  451. justify-content: space-between;
  452. flex-direction: row;
  453. flex-wrap: wrap;
  454. box-sizing: border-box;
  455. }
  456. .tui-product-container {
  457. width: 100%;
  458. display: flex;
  459. flex-direction: row;
  460. flex-wrap: wrap;
  461. }
  462. .tui-pro-item {
  463. background: #fff;
  464. box-sizing: border-box;
  465. overflow: hidden;
  466. border-radius: 12rpx;
  467. width: 48%;
  468. margin-left: 1%;
  469. margin-right: 1%;
  470. margin-bottom: 2%;
  471. }
  472. .tui-pro-img {
  473. width: 100%;
  474. display: block;
  475. }
  476. .tui-pro-content {
  477. display: flex;
  478. flex-direction: column;
  479. justify-content: space-between;
  480. box-sizing: border-box;
  481. padding: 20rpx;
  482. }
  483. .tui-pro-tit {
  484. color: #2e2e2e;
  485. font-size: 26rpx;
  486. word-break: break-all;
  487. overflow: hidden;
  488. text-overflow: ellipsis;
  489. display: -webkit-box;
  490. -webkit-box-orient: vertical;
  491. -webkit-line-clamp: 2;
  492. }
  493. .tui-pro-price {
  494. padding-top: 18rpx;
  495. }
  496. .tui-sale-price {
  497. font-size: 34rpx;
  498. font-weight: 500;
  499. color: #e41f19;
  500. }
  501. .tui-factory-price {
  502. font-size: 24rpx;
  503. color: #a0a0a0;
  504. text-decoration: line-through;
  505. padding-left: 12rpx;
  506. }
  507. .tui-pro-pay {
  508. padding-top: 10rpx;
  509. font-size: 24rpx;
  510. color: #656565;
  511. }
  512. </style>