index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <template>
  2. <view v-if="is_login==1">
  3. <view class="tui-mybg-box">
  4. <view class="tui-header-center">
  5. <view class="tui-info">
  6. <view class="tui-nickname">
  7. {{detail.title}}
  8. </view>
  9. <view class="tui-explain">一级代理</view>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="tui-content-box">
  14. <view class="tui-box tui-assets-box">
  15. <view class="tui-order-list tui-assets-list">
  16. <view class="tui-order-item">
  17. <view class="tui-assets-num"><text>{{detail.total_income}}</text></view>
  18. <view class="tui-assets-text">总收入</view>
  19. </view>
  20. <view class="tui-order-item">
  21. <view class="tui-assets-num">
  22. <text>{{detail.income}}</text>
  23. </view>
  24. <view class="tui-assets-text">本月收入</view>
  25. </view>
  26. <view class="tui-order-item">
  27. <view class="tui-assets-num">
  28. <text>{{detail.income}}</text>
  29. </view>
  30. <view class="tui-assets-text">可提现</view>
  31. </view>
  32. </view>
  33. </view>
  34. <view v-if="module==version3" class="tui-box tui-order-box" style="margin-top: 20rpx;">
  35. <tui-list-cell :arrow="true" padding="0" unlined :lineLeft="false"
  36. @click="navigateTo('/pagesA/my/adminoperatingcity/order?ptype=2')">
  37. <view class="tui-cell-header">
  38. <view class="tui-cell-title">订单管理</view>
  39. <view class="tui-cell-sub">全部订单</view>
  40. </view>
  41. </tui-list-cell>
  42. <view class="tui-order-list">
  43. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=2&ptype=2')">
  44. <view class="tui-icon-box">
  45. <tui-icon name="signin" :size="30" color="#666666"></tui-icon>
  46. </view>
  47. <view class="tui-order-text">待指派</view>
  48. </view>
  49. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=3&ptype=2')">
  50. <view class="tui-icon-box">
  51. <tui-icon name="feedback" :size="30" color="#666666"></tui-icon>
  52. </view>
  53. <view class="tui-order-text">服务中</view>
  54. </view>
  55. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=5&ptype=2')">
  56. <view class="tui-icon-box">
  57. <tui-icon name="square-fill" :size="30" color="#666666"></tui-icon>
  58. </view>
  59. <view class="tui-order-text">已完成</view>
  60. </view>
  61. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=6&ptype=2')">
  62. <view class="tui-icon-box">
  63. <tui-icon name="clock" :size="30" color="#666666"></tui-icon>
  64. </view>
  65. <view class="tui-order-text">售后单</view>
  66. </view>
  67. </view>
  68. </view>
  69. <view v-if="module==version2" class="tui-box tui-order-box" style="margin-top: 20rpx;">
  70. <tui-list-cell :arrow="true" padding="0" unlined :lineLeft="false"
  71. @click="navigateTo('/pagesA/my/adminoperatingcity/order?ptype=1')">
  72. <view class="tui-cell-header">
  73. <view class="tui-cell-title">订单管理</view>
  74. <view class="tui-cell-sub">全部订单</view>
  75. </view>
  76. </tui-list-cell>
  77. <view class="tui-order-list">
  78. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=2&ptype=1')">
  79. <view class="tui-icon-box">
  80. <tui-icon name="signin" :size="30" color="#666666"></tui-icon>
  81. </view>
  82. <view class="tui-order-text">待发货</view>
  83. </view>
  84. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=3&ptype=1')">
  85. <view class="tui-icon-box">
  86. <tui-icon name="feedback" :size="30" color="#666666"></tui-icon>
  87. </view>
  88. <view class="tui-order-text">已发货</view>
  89. </view>
  90. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=5&ptype=1')">
  91. <view class="tui-icon-box">
  92. <tui-icon name="square-fill" :size="30" color="#666666"></tui-icon>
  93. </view>
  94. <view class="tui-order-text">已完成</view>
  95. </view>
  96. <view class="tui-order-item" @tap="navigateTo('/pagesA/my/adminoperatingcity/order?currentTab=6&ptype=1')">
  97. <view class="tui-icon-box">
  98. <tui-icon name="clock" :size="30" color="#666666"></tui-icon>
  99. </view>
  100. <view class="tui-order-text">售后单</view>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="tui-box tui-tool-box">
  105. <tui-list-view>
  106. <tui-list-cell v-if="detail.is_submitaudit!=1" @tap="navigateTo('/pagesA/my/withdraw/withdraw?mo=operatingcity')"
  107. :arrow="true">
  108. <view class="tui-item-box">
  109. <tui-icon name="wealth-fill" :size="24" color="#5677fc"></tui-icon>
  110. <text class="tui-list-cell_name">申请提现</text>
  111. </view>
  112. </tui-list-cell>
  113. <tui-list-cell @tap="navigateTo('/pagesA/my/withdraw/withdrawlog?mo=operatingcity')" :arrow="true">
  114. <view class="tui-item-box">
  115. <tui-icon name="listview" :size="24" color="#5677fc"></tui-icon>
  116. <view class="tui-list-cell_name">提现记录</view>
  117. </view>
  118. </tui-list-cell>
  119. <tui-list-cell v-if="detail.is_submitaudit!=1"
  120. @tap="navigateTo('/pagesA/my/memberbankcard/memberbankcard')" :arrow="true">
  121. <view class="tui-item-box">
  122. <tui-icon name="bankcard-fill" :size="24" color="#5677fc"></tui-icon>
  123. <view class="tui-list-cell_name">提现帐号</view>
  124. </view>
  125. </tui-list-cell>
  126. <!-- #ifdef MP-WEIXIN -->
  127. <tui-list-cell @tap="scancode" :arrow="true">
  128. <view class="tui-item-box">
  129. <tui-icon name="sweep" :size="24" color="#5677fc"></tui-icon>
  130. <view class="tui-list-cell_name">扫码核销</view>
  131. </view>
  132. </tui-list-cell>
  133. <tui-list-cell @tap="navigateTo('/pagesA/my/userInfo/setmpopenid')" :arrow="true">
  134. <view class="tui-item-box">
  135. <tui-icon name="setup" :size="24" color="#5677fc"></tui-icon>
  136. <view class="tui-list-cell_name">绑定公众号通知</view>
  137. </view>
  138. </tui-list-cell>
  139. <!-- #endif -->
  140. <tui-list-cell @tap="navigateTo('/pagesA/my/adminoperatingcity/update')" :arrow="true">
  141. <view class="tui-item-box">
  142. <tui-icon name="setup" :size="24" color="#5677fc"></tui-icon>
  143. <view class="tui-list-cell_name">修改资料</view>
  144. </view>
  145. </tui-list-cell>
  146. <tui-list-cell @tap="navigateTo('/pages/login/logout?ptype=operatingcity')" :arrow="true">
  147. <view class="tui-item-box">
  148. <tui-icon name="setup" :size="24" color="#5677fc"></tui-icon>
  149. <view class="tui-list-cell_name">安全退出</view>
  150. </view>
  151. </tui-list-cell>
  152. </tui-list-view>
  153. </view>
  154. </view>
  155. </view>
  156. </template>
  157. <script>
  158. export default {
  159. data() {
  160. return {
  161. module: this.$module,
  162. version2: this.$version2,
  163. version3: this.$version3,
  164. isLogin: false,
  165. is_login:0,
  166. top: 0, //标题图标距离顶部距离
  167. opacity: 0,
  168. scrollTop: 0.5,
  169. detail: []
  170. };
  171. },
  172. onLoad: function(options) {
  173. let _this = this;
  174. let obj = {};
  175. // #ifdef MP-WEIXIN
  176. obj = wx.getMenuButtonBoundingClientRect();
  177. // #endif
  178. // #ifdef MP-BAIDU
  179. obj = swan.getMenuButtonBoundingClientRect();
  180. // #endif
  181. // #ifdef MP-ALIPAY
  182. my.hideAddToDesktopMenu();
  183. // #endif
  184. uni.getSystemInfo({
  185. success: res => {
  186. this.width = obj.left || res.windowWidth;
  187. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
  188. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
  189. this.scrollH = res.windowWidth * 0.6;
  190. }
  191. });
  192. },
  193. onShow() {
  194. let _this = this;
  195. _this.$request.get('adminoperatingcity.detail').then(res => {
  196. if (res.errno == 0 && res.is_login == 1) {
  197. _this.is_login = res.is_login;
  198. _this.detail = res.data;
  199. } else {
  200. uni.showModal({
  201. title: '提示',
  202. content: res.message || '请先登录!',
  203. showCancel: false,
  204. //是否显示取消按钮
  205. success: function(res) {
  206. if (res.cancel) { //点击取消,默认隐藏弹框
  207. } else {
  208. uni.reLaunch({
  209. url: "/pages/login/userlogin?ptype=operatingcity",
  210. })
  211. }
  212. }
  213. });
  214. }
  215. });
  216. },
  217. methods: {
  218. navigateTo(url) {
  219. uni.navigateTo({
  220. url: url
  221. });
  222. },
  223. initNavigation(e) {
  224. this.opacity = e.opacity;
  225. this.top = e.top;
  226. },
  227. opacityChange(e) {
  228. this.opacity = e.opacity;
  229. },
  230. scancode: function() {
  231. var _this = this;
  232. // 允许从相机和相册扫码
  233. uni.scanCode({
  234. success: function(res) {
  235. if (res.path) {
  236. uni.navigateTo({
  237. url: '/' + res.path
  238. });
  239. }
  240. //console.log('条码类型:' + res.scanType);
  241. //console.log('条码内容:' + res.path);
  242. }
  243. });
  244. },
  245. },
  246. onPageScroll(e) {
  247. this.scrollTop = e.scrollTop;
  248. },
  249. onPullDownRefresh() {
  250. setTimeout(() => {
  251. uni.stopPullDownRefresh();
  252. }, 200);
  253. },
  254. onReachBottom: function() {
  255. }
  256. };
  257. </script>
  258. <style>
  259. .tui-set-box {
  260. display: flex;
  261. align-items: center;
  262. justify-content: space-between;
  263. }
  264. .tui-icon-box {
  265. position: relative;
  266. }
  267. .tui-icon-setup {
  268. margin-left: 8rpx;
  269. }
  270. .tui-badge {
  271. position: absolute;
  272. font-size: 24rpx;
  273. height: 32rpx;
  274. min-width: 20rpx;
  275. padding: 0 6rpx;
  276. border-radius: 40rpx;
  277. right: 10rpx;
  278. top: -5rpx;
  279. transform: scale(0.8) translateX(60%);
  280. transform-origin: center center;
  281. display: flex;
  282. align-items: center;
  283. justify-content: center;
  284. z-index: 10;
  285. }
  286. .tui-badge-red {
  287. background: #f74d54;
  288. color: #fff;
  289. }
  290. .tui-badge-white {
  291. background: #fff;
  292. color: #f74d54;
  293. }
  294. .tui-badge-dot {
  295. position: absolute;
  296. height: 12rpx;
  297. width: 12rpx;
  298. border-radius: 50%;
  299. right: -12rpx;
  300. top: 0;
  301. background: #f74d54;
  302. }
  303. .tui-mybg-box {
  304. width: 100%;
  305. height: 264rpx;
  306. position: relative;
  307. background-color: #e41f19;
  308. }
  309. .tui-my-bg {
  310. width: 100%;
  311. height: 464rpx;
  312. display: block;
  313. }
  314. .tui-header-center {
  315. position: absolute;
  316. width: 100%;
  317. height: 128rpx;
  318. left: 0;
  319. top: 18rpx;
  320. padding: 0 30rpx;
  321. box-sizing: border-box;
  322. display: flex;
  323. align-items: center;
  324. }
  325. .tui-avatar {
  326. flex-shrink: 0;
  327. width: 128rpx;
  328. height: 128rpx;
  329. border-radius: 50%;
  330. display: block;
  331. }
  332. .tui-info {
  333. width: 60%;
  334. padding-left: 30rpx;
  335. }
  336. .tui-nickname {
  337. font-size: 30rpx;
  338. font-weight: 500;
  339. color: #fff;
  340. display: flex;
  341. align-items: center;
  342. }
  343. .tui-img-vip {
  344. width: 56rpx;
  345. height: 24rpx;
  346. margin-left: 18rpx;
  347. }
  348. .tui-explain {
  349. width: 80%;
  350. font-size: 24rpx;
  351. font-weight: 400;
  352. color: #fff;
  353. opacity: 0.75;
  354. padding-top: 8rpx;
  355. white-space: nowrap;
  356. overflow: hidden;
  357. text-overflow: ellipsis;
  358. }
  359. .tui-btn-edit {
  360. flex-shrink: 0;
  361. padding-right: 22rpx;
  362. }
  363. .tui-header-btm {
  364. width: 100%;
  365. padding: 0 30rpx;
  366. box-sizing: border-box;
  367. position: absolute;
  368. left: 0;
  369. top: 280rpx;
  370. display: flex;
  371. align-items: center;
  372. justify-content: space-between;
  373. color: #fff;
  374. }
  375. .tui-btm-item {
  376. flex: 1;
  377. display: flex;
  378. flex-direction: column;
  379. align-items: center;
  380. justify-content: center;
  381. }
  382. .tui-btm-num {
  383. font-size: 32rpx;
  384. font-weight: 600;
  385. position: relative;
  386. }
  387. .tui-btm-text {
  388. font-size: 24rpx;
  389. opacity: 0.85;
  390. padding-top: 4rpx;
  391. }
  392. .tui-content-box {
  393. width: 100%;
  394. padding: 0 30rpx;
  395. box-sizing: border-box;
  396. position: relative;
  397. top: -100rpx;
  398. z-index: 10;
  399. }
  400. .tui-box {
  401. width: 100%;
  402. background: #fff;
  403. box-shadow: 0 3rpx 20rpx rgba(183, 183, 183, 0.1);
  404. border-radius: 30rpx;
  405. overflow: hidden;
  406. }
  407. .tui-order-box {
  408. height: 208rpx;
  409. }
  410. .tui-cell-header {
  411. width: 100%;
  412. height: 74rpx;
  413. padding: 0 26rpx;
  414. box-sizing: border-box;
  415. display: flex;
  416. align-items: center;
  417. justify-content: space-between;
  418. }
  419. .tui-cell-title {
  420. font-size: 30rpx;
  421. line-height: 30rpx;
  422. font-weight: 600;
  423. color: #333;
  424. }
  425. .tui-cell-sub {
  426. font-size: 26rpx;
  427. font-weight: 400;
  428. color: #999;
  429. padding-right: 28rpx;
  430. }
  431. .tui-order-list {
  432. width: 100%;
  433. height: 134rpx;
  434. padding: 0 30rpx;
  435. box-sizing: border-box;
  436. display: flex;
  437. align-items: center;
  438. justify-content: space-between;
  439. }
  440. .tui-order-item {
  441. flex: 1;
  442. display: flex;
  443. flex-direction: column;
  444. align-items: center;
  445. }
  446. .tui-order-text,
  447. .tui-tool-text {
  448. font-size: 26rpx;
  449. font-weight: 400;
  450. color: #666;
  451. padding-top: 4rpx;
  452. }
  453. .tui-tool-text {
  454. font-size: 24rpx;
  455. }
  456. .tui-order-icon {
  457. width: 56rpx;
  458. height: 56rpx;
  459. display: block;
  460. }
  461. .tui-assets-box {
  462. height: 118rpx;
  463. margin-top: 20rpx;
  464. padding-top: 30rpx;
  465. }
  466. .tui-assets-list {
  467. height: 84rpx;
  468. }
  469. .tui-assets-num {
  470. font-size: 38rpx;
  471. font-weight: 500;
  472. color: #333;
  473. font-weight: bold;
  474. position: relative;
  475. }
  476. .tui-assets-text {
  477. font-size: 24rpx;
  478. font-weight: 400;
  479. color: #666;
  480. padding-top: 6rpx;
  481. }
  482. .tui-tool-box {
  483. margin-top: 20rpx;
  484. }
  485. .tui-flex-wrap {
  486. flex-wrap: wrap;
  487. height: auto;
  488. padding-bottom: 30rpx;
  489. }
  490. .tui-tool-item {
  491. width: 25%;
  492. display: flex;
  493. align-items: center;
  494. justify-content: center;
  495. flex-direction: column;
  496. padding-top: 30rpx;
  497. }
  498. .tui-tool-icon {
  499. width: 64rpx;
  500. height: 64rpx;
  501. display: block;
  502. }
  503. .tui-badge-icon {
  504. width: 66rpx;
  505. height: 30rpx;
  506. position: absolute;
  507. right: 0;
  508. transform: translateX(88%);
  509. top: -15rpx;
  510. }
  511. /*为你推荐*/
  512. .tui-product-list {
  513. display: flex;
  514. justify-content: space-between;
  515. flex-direction: row;
  516. flex-wrap: wrap;
  517. box-sizing: border-box;
  518. }
  519. .tui-product-container {
  520. width: 100%;
  521. display: flex;
  522. flex-direction: row;
  523. flex-wrap: wrap;
  524. }
  525. .tui-pro-item {
  526. background: #fff;
  527. box-sizing: border-box;
  528. overflow: hidden;
  529. border-radius: 12rpx;
  530. width: 48%;
  531. margin-left: 1%;
  532. margin-right: 1%;
  533. margin-bottom: 2%;
  534. }
  535. .tui-pro-img {
  536. width: 100%;
  537. display: block;
  538. }
  539. .tui-pro-content {
  540. display: flex;
  541. flex-direction: column;
  542. justify-content: space-between;
  543. box-sizing: border-box;
  544. padding: 20rpx;
  545. }
  546. .tui-pro-tit {
  547. color: #2e2e2e;
  548. font-size: 26rpx;
  549. word-break: break-all;
  550. overflow: hidden;
  551. text-overflow: ellipsis;
  552. display: -webkit-box;
  553. -webkit-box-orient: vertical;
  554. -webkit-line-clamp: 2;
  555. }
  556. .tui-pro-price {
  557. padding-top: 18rpx;
  558. }
  559. .tui-sale-price {
  560. font-size: 34rpx;
  561. font-weight: 500;
  562. color: #e41f19;
  563. }
  564. .tui-factory-price {
  565. font-size: 24rpx;
  566. color: #a0a0a0;
  567. text-decoration: line-through;
  568. padding-left: 12rpx;
  569. }
  570. .tui-pro-pay {
  571. padding-top: 10rpx;
  572. font-size: 24rpx;
  573. color: #656565;
  574. }
  575. .tui-item-box {
  576. width: 100%;
  577. display: flex;
  578. align-items: center;
  579. }
  580. .tui-list-cell_name {
  581. padding-left: 20rpx;
  582. display: flex;
  583. align-items: center;
  584. justify-content: center;
  585. }
  586. </style>