index.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. <template>
  2. <block>
  3. <view class="topBack" :style="'top: ' + menuButton.top + 'px'">
  4. <!-- <text class="ico-moon icon-leftarrow" wx:if="{{pages > 1}}" bindtap="toPage" data-mold="back"></text> -->
  5. <image v-if="pages > 1" @tap="toback"
  6. src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/f566738e424f33a415dea22dc4e11eec.png"
  7. class="ico-moon"></image>
  8. <image mode="heightFix" :style="'height: ' + menuButton.height * 2 + 'rpx'" @tap="toPage"
  9. data-url="/pages/tabbar/index/index" class="h-backBtn" v-else
  10. src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/2847/41c5f36528b8f4204130c4977c1ec2c5.png">
  11. </image>
  12. <view class="userName">钱包</view>
  13. </view>
  14. <view class="tpBg"></view>
  15. <view class="content">
  16. <view class="box">
  17. <view class="totalAllTitle">可提现金额(元)</view>
  18. <view class="total">
  19. <view class="totalNum">{{ info.money }}</view>
  20. </view>
  21. <view class="datas">
  22. <view class="dataItem">
  23. <view>冻结金额(元)</view>
  24. <view>{{ info.rozenAmount }}</view>
  25. <image
  26. src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/0a57e6af52d6001a69c585478c71f8b6.png"
  27. mode="widthFix" class="iicon"></image>
  28. </view>
  29. <view class="dataItem">
  30. <view>累计提现(元)</view>
  31. <view>{{ info.cumulativembodiment }}</view>
  32. </view>
  33. <view class="dataItem">
  34. <view>累计收益(元)</view>
  35. <view>{{ info.cumulativencome }}</view>
  36. </view>
  37. </view>
  38. <view class="btns">
  39. <view class="totalJump btn1" @tap="toPage" data-url="/pages/wallet/cashlist" :data-type="type">
  40. <view>提现记录</view>
  41. </view>
  42. <view class="totalJump" @tap="toPage" data-url="/pages/Withdrawal/index" :data-type="type">
  43. <view>申请提现</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="box1">
  48. <view class="iItem" @tap="toPage" :data-url="item.url" :data-name="item.name"
  49. v-for="(item, index) in list" :key="index">
  50. <view class="iLeft">
  51. <image :src="item.icon" mode="widthFix"></image>
  52. <view>{{ item.name }}</view>
  53. </view>
  54. <view class="rWrap">
  55. <view class="intergal" v-if="item.name=='我的积分'">
  56. {{info.score}}
  57. </view>
  58. <image
  59. src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/9badd173c236af20edc6f800111d24c3.png"
  60. mode="widthFix" class="iRight"></image>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="box1">
  65. <view class="iItem" @tap="toPage" :data-url="item.url" v-for="(item, index) in list2" :key="index">
  66. <view class="iLeft">
  67. <image :src="item.icon" mode="widthFix"></image>
  68. <view>{{ item.name }}</view>
  69. </view>
  70. <image
  71. src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/9badd173c236af20edc6f800111d24c3.png"
  72. mode="widthFix" class="iRight"></image>
  73. </view>
  74. </view>
  75. </view>
  76. </block>
  77. </template>
  78. <script module="parse" lang="wxs">
  79. module.exports = {
  80. filterTime: function(time) {
  81. console.log(time)
  82. var nowDate = getDate(time * 1000);
  83. var year = nowDate.getFullYear();
  84. var month = nowDate.getMonth() + 1;
  85. var date = nowDate.getDate();
  86. var hours = nowDate.getHours();
  87. var minutes = nowDate.getMinutes();
  88. var seconds = nowDate.getSeconds();
  89. month = month > 9 ? month : '0' + month;
  90. date = date > 9 ? date : '0' + date;
  91. hours = hours > 9 ? hours : '0' + hours;
  92. minutes = minutes > 9 ? minutes : '0' + minutes;
  93. seconds = seconds > 9 ? seconds : '0' + seconds;
  94. return year + '-' + month + '-' + date + " " + hours + ":" + minutes + ":" + seconds;
  95. }
  96. }
  97. </script>
  98. <script>
  99. // pages/backstage/index/index.js
  100. var app = getApp();
  101. export default {
  102. data() {
  103. return {
  104. list: [
  105. // {
  106. // name: '我的积分',
  107. // icon: 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/89582b899d26a1e1a17afcfca97dc74b.png',
  108. // url: '/pages/wallet/integral'
  109. // },
  110. {
  111. name: '账单明细',
  112. icon: 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/6018ceee3ac59c3908e093b84046a61b.png',
  113. url: '/pages/wallet/paylist'
  114. },
  115. {
  116. name: '银行卡列表',
  117. icon: 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/89582b899d26a1e1a17afcfca97dc74b.png',
  118. url: '/pages/Withdrawal/banklist'
  119. },
  120. ],
  121. list2: [{
  122. name: '我的团队',
  123. icon: 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/612dcfbf599a0be79cab31e7e9ceb651.png',
  124. url: '/pages/term/index'
  125. },
  126. {
  127. name: '我的海报',
  128. icon: 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/62a474930ae8d8dcfee4636acfc7c00a.png',
  129. url: '/pages/poster/index'
  130. }
  131. ],
  132. info: {
  133. },
  134. pages: '',
  135. menuButton: {
  136. top: '',
  137. height: 0
  138. },
  139. Page: 0
  140. };
  141. }
  142. /**
  143. * 生命周期函数--监听页面加载
  144. */
  145. ,
  146. onLoad: function(options) {
  147. let page = getCurrentPages();
  148. var menuButton = uni.getMenuButtonBoundingClientRect();
  149. console.log(menuButton);
  150. this.pages = page.length,
  151. this.menuButton = menuButton,
  152. this.getinfo();
  153. },
  154. /**
  155. * 生命周期函数--监听页面初次渲染完成
  156. */
  157. onReady: function() {},
  158. /**
  159. * 生命周期函数--监听页面显示
  160. */
  161. onShow: function() {},
  162. /**
  163. * 生命周期函数--监听页面隐藏
  164. */
  165. onHide: function() {},
  166. /**
  167. * 生命周期函数--监听页面卸载
  168. */
  169. onUnload: function() {},
  170. /**
  171. * 页面相关事件处理函数--监听用户下拉动作
  172. */
  173. onPullDownRefresh: function() {
  174. },
  175. /**
  176. * 页面上拉触底事件的处理函数
  177. */
  178. onReachBottom: function() {
  179. },
  180. /**
  181. * 用户点击右上角分享
  182. */
  183. onShareAppMessage: function() {},
  184. methods: {
  185. async getinfo() {
  186. let data = await this.$api.request('/wallet/index');
  187. console.log(data)
  188. this.info = data;
  189. },
  190. toPage(e) {
  191. app.globalData.toPage(e);
  192. },
  193. toback() {
  194. uni.navigateBack({
  195. delta: 1
  196. });
  197. },
  198. }
  199. };
  200. </script>
  201. <style>
  202. page {
  203. background: #F4F5F9;
  204. }
  205. .topBack {
  206. position: absolute;
  207. top: 0;
  208. left: 0;
  209. z-index: 1;
  210. margin-top: 2rpx;
  211. display: flex;
  212. align-items: center;
  213. }
  214. .topBack .ico-moon {
  215. padding: 0 0rpx 0 30rpx;
  216. width: 70rpx;
  217. height: 40rpx;
  218. }
  219. .h-backBtn {
  220. margin-left: 30rpx;
  221. }
  222. .homeImg {
  223. height: 40rpx;
  224. width: 40rpx;
  225. margin-right: 10rpx;
  226. }
  227. .userName {
  228. font-size: 28rpx;
  229. color: #fff;
  230. margin-left: 20rpx;
  231. font-size: 36rpx;
  232. }
  233. .tpBg {
  234. background: #FE5879;
  235. background-size: 100% 100%;
  236. width: 100%;
  237. height: 380rpx;
  238. }
  239. .content {
  240. margin: -180rpx 30rpx 25rpx;
  241. }
  242. .box {
  243. border-radius: 12rpx;
  244. background: #fff;
  245. padding: 50rpx 20rpx 40rpx;
  246. margin-bottom: 25rpx;
  247. }
  248. .totalAllTitle {
  249. color: #9194A6;
  250. margin-bottom: 28rpx;
  251. text-align: center;
  252. }
  253. .total {
  254. display: flex;
  255. align-items: center;
  256. justify-content: center;
  257. padding-bottom: 20rpx;
  258. }
  259. .totalNum {
  260. font-size: 50rpx;
  261. }
  262. .totalJump {
  263. display: flex;
  264. align-items: center;
  265. width: 220rpx;
  266. height: 70rpx;
  267. justify-content: center;
  268. background: #FB4C6F;
  269. border-radius: 12rpx;
  270. border-radius: 12rpx;
  271. }
  272. .totalJump>view {
  273. font-size: 28rpx;
  274. color: #fff;
  275. }
  276. .totalJump>image {
  277. width: 14rpx;
  278. margin-left: 14rpx;
  279. margin-top: 5rpx;
  280. }
  281. .tip {
  282. font-size: 30rpx;
  283. padding-bottom: 10rpx;
  284. }
  285. .iItem {
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-between;
  289. padding: 32rpx 0;
  290. border-bottom: 1px solid #E4E5EE;
  291. }
  292. .iItem:last-child {
  293. border-bottom: none;
  294. padding-bottom: 0;
  295. }
  296. .iLeft {
  297. display: flex;
  298. align-items: center;
  299. }
  300. .iLeft>image {
  301. width: 40rpx;
  302. }
  303. .iLeft>view {
  304. font-size: 28rpx;
  305. margin-left: 32rpx;
  306. }
  307. .iRight {
  308. width: 12rpx;
  309. }
  310. .datas {
  311. padding-top: 50rpx;
  312. display: flex;
  313. align-items: center;
  314. justify-content: space-between;
  315. padding-bottom: 36rpx;
  316. border-bottom: 1px solid #E4E5EE;
  317. margin-bottom: 30rpx;
  318. }
  319. .dataItem {
  320. display: flex;
  321. flex-direction: column;
  322. align-items: center;
  323. position: relative;
  324. }
  325. .dataItem>view:nth-child(1) {
  326. color: #9194A6;
  327. }
  328. .dataItem>view:nth-child(2) {
  329. margin-top: 15rpx;
  330. font-size: 30rpx;
  331. }
  332. .iicon {
  333. width: 28rpx;
  334. position: absolute;
  335. top: 4rpx;
  336. right: -38rpx;
  337. }
  338. .btns {
  339. display: flex;
  340. align-items: center;
  341. justify-content: space-around;
  342. }
  343. .btn1 {
  344. background: #fff;
  345. border: 1px solid #9194A6;
  346. color: #011B33 !important;
  347. }
  348. .btn1>view {
  349. color: #011B33 !important;
  350. }
  351. .box1 {
  352. border-radius: 12rpx;
  353. background: #fff;
  354. padding: 50rpx;
  355. margin-bottom: 25rpx;
  356. padding-top: 0;
  357. }
  358. .iItem {
  359. display: flex;
  360. align-items: center;
  361. justify-content: space-between;
  362. padding: 32rpx 0;
  363. border-bottom: 1px solid #e4e5ee;
  364. }
  365. .iItem:last-child {
  366. border-bottom: none;
  367. padding-bottom: 0;
  368. }
  369. .iLeft {
  370. display: flex;
  371. align-items: center;
  372. }
  373. .iLeft>image {
  374. width: 40rpx;
  375. }
  376. .iLeft>view {
  377. font-size: 28rpx;
  378. margin-left: 32rpx;
  379. }
  380. .iRight {
  381. width: 12rpx;
  382. }
  383. view {
  384. font-size: 24rpx;
  385. }
  386. .rWrap {
  387. display: flex;
  388. align-items: center;
  389. }
  390. .intergal {
  391. color: #000000;
  392. font-size: 30rpx;
  393. margin-right: 12rpx;
  394. }
  395. </style>