index.vue 16 KB

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