yongjin.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <view class="dikou">
  3. <view class="dikou-header u-flex u-row-between u-col-top">
  4. <image src="static/images/yjbg.png" class="header-img" mode=""></image>
  5. <view class="header-item u-flex-1 u-flex-col">
  6. <view class="item-top u-flex">
  7. <text>佣金余额</text>
  8. <image style="margin-left: 10rpx;" src="static/images/dikou-tips.png" mode=""></image>
  9. </view>
  10. <view class="item-price u-flex">
  11. {{sum || '0.00'}}
  12. <image style="margin-left: 20rpx;" @click="totixian" src="static/images/dikou-tixian.png"
  13. class="item-tixian" mode=""></image>
  14. </view>
  15. <view class="u-flex">
  16. <view class="left">
  17. <text class="top">订单佣金</text>
  18. <view class="bottom">
  19. {{order || '0.00'}}
  20. </view>
  21. </view>
  22. <view class="right">
  23. <text class="top">邀请佣金</text>
  24. <view class="bottom">
  25. {{invite || '0.00'}}
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="header-item u-flex-1 u-flex-col " style="justify-content: center;">
  31. <view class="box">
  32. <view class="u-flex top1" style="">
  33. <text class="fontm" style="margin-right: 8rpx;min-width: 100rpx;"
  34. @click.stop="mingxi">佣金明细</text>
  35. <u-icon name="play-right-fill" style="transform: rotate(90deg);" color="#fff"
  36. size="12"></u-icon>
  37. </view>
  38. <view class="u-flex bottom1" style="">
  39. <text class="fontm" style="margin-right: 8rpx;min-width: 100rpx;" @click="tobank">银行卡</text>
  40. <u-icon name="play-right-fill" color="#fff" size="12"></u-icon>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="dikou-list">
  46. <view class="list-header u-flex u-row-between">
  47. <view class="header-title u-flex-col">
  48. <text>收支明细</text>
  49. <text></text>
  50. </view>
  51. <view class="list-time u-flex" @click="showtime = true">
  52. <text class="text1">{{date || '选择时间'}}</text>
  53. <u-icon name="arrow-down-fill" size="9"></u-icon>
  54. </view>
  55. </view>
  56. <view class="list-item u-flex u-row-between" v-for="(item,index) in list" :key="index">
  57. <view class="u-flex-col">
  58. <text class="text1">{{item.remark}}</text>
  59. <text class="text2">{{item.createtime}}</text>
  60. </view>
  61. <text class="text3" style="color: #E02020;" v-if="item.amount < 0">{{item.amount}}</text>
  62. <text class="text3" v-else style="color: #35AA1F;">{{item.amount}}</text>
  63. </view>
  64. <view style="height: 70vh;justify-content: center;" class="u-flex" v-if="list.length == 0">
  65. <u-empty text="暂无数据" mode="list"></u-empty>
  66. </view>
  67. </view>
  68. <u-datetime-picker :show="showtime" mode="year-month" @confirm="changetime"
  69. @cancel="close()"></u-datetime-picker>
  70. </view>
  71. </template>
  72. <script>
  73. import {
  74. getBank,
  75. commission_list,
  76. index,
  77. commission_data
  78. } from "@/units/inquire.js"
  79. export default {
  80. data() {
  81. return {
  82. order: '0.00',
  83. sum: '0.00',
  84. invite: '0.00',
  85. page: 1,
  86. list: [],
  87. total: 0,
  88. date: '',
  89. showtime: false,
  90. bankdata: {},
  91. }
  92. },
  93. onShow() {
  94. this.getuser()
  95. this.page = 1
  96. this.total = 0
  97. this.list = []
  98. this.getlist()
  99. this.getdata()
  100. this.getBank()
  101. },
  102. onReachBottom() {
  103. if (this.total != this.list.length) {
  104. this.page++
  105. this.getlist()
  106. }
  107. },
  108. methods: {
  109. mingxi() {
  110. uni.navigateTo({
  111. url: "/pagesD/mingxi"
  112. })
  113. },
  114. close() {
  115. this.showtime = false
  116. },
  117. getBank() {
  118. getBank().then(res => {
  119. this.bankdata = res.data || {}
  120. console.log(res);
  121. })
  122. },
  123. async changetime(e) {
  124. const timeFormat = uni.$u.timeFormat;
  125. let timeValue = await timeFormat(e.value, 'yyyy-mm');
  126. this.date = timeValue;
  127. this.page = 1
  128. this.total = 0
  129. this.list = []
  130. this.getlist()
  131. this.showtime = false
  132. },
  133. getdata() {
  134. commission_data().then(res => {
  135. if (res.code == 1) {
  136. this.invite = res.data.invite //邀请
  137. this.order = res.data.order //订单
  138. this.sum = res.data.sum //余额
  139. } else {
  140. this.$u.toast(res.msg)
  141. }
  142. })
  143. },
  144. getlist() {
  145. commission_list({
  146. begin_time: "",
  147. end_time: "",
  148. }).then(res => {
  149. this.list = this.list.concat(res.data.data)
  150. this.total = res.data.total
  151. })
  152. },
  153. getuser() {
  154. index().then(res => {
  155. this.money = res.data.money
  156. })
  157. },
  158. tobank() {
  159. uni.navigateTo({
  160. url: "/pagesD/bank-card"
  161. })
  162. },
  163. totixian() {
  164. uni.navigateTo({
  165. url: "/pagesD/tixian1"
  166. })
  167. }
  168. }
  169. }
  170. </script>
  171. <style lang="scss">
  172. .box {
  173. width: 172rpx;
  174. height: 188rpx;
  175. background: rgba(161, 208, 255, 0.2);
  176. border-radius: 16rpx;
  177. backdrop-filter: blur(3px);
  178. padding: 42rpx 28rpx;
  179. text-align: center;
  180. box-sizing: border-box;
  181. margin-left: 66rpx;
  182. margin-top: 30rpx;
  183. }
  184. .fontm {
  185. font-size: 24rpx;
  186. font-family: PingFangSC-Regular, PingFang SC;
  187. font-weight: 400;
  188. color: #FFFFFF;
  189. }
  190. .top1 {
  191. margin-bottom: 20rpx;
  192. }
  193. .bottom1 {
  194. border-top: 1rpx solid #FFFFFF;
  195. padding-top: 20rpx;
  196. }
  197. .dikou {
  198. .dikou-list {
  199. width: 686rpx;
  200. background: #FFFFFF;
  201. border-radius: 20rpx;
  202. margin: 20rpx auto;
  203. padding: 0 28rpx;
  204. .list-item {
  205. padding: 30rpx 0;
  206. border-bottom: 2rpx solid #F0F0F0;
  207. .text3 {
  208. font-size: 32rpx;
  209. font-family: JDZhengHT-Regular, JDZhengHT;
  210. font-weight: 400;
  211. }
  212. .text1 {
  213. font-size: 30rpx;
  214. font-family: PingFangSC-Regular, PingFang SC;
  215. font-weight: 400;
  216. color: #333333;
  217. margin-bottom: 12rpx;
  218. }
  219. .text2 {
  220. font-size: 24rpx;
  221. font-family: SFPro-Regular, SFPro;
  222. font-weight: 400;
  223. color: #222222;
  224. }
  225. }
  226. .list-header {
  227. padding: 28rpx 0 20rpx 0;
  228. .list-time {
  229. .text1 {
  230. font-size: 32rpx;
  231. font-family: SFPro-Regular, SFPro;
  232. font-weight: 400;
  233. color: #222222;
  234. margin-right: 8rpx;
  235. }
  236. }
  237. .header-title {
  238. text:first-child {
  239. font-size: 32rpx;
  240. font-family: PingFangSC-Medium, PingFang SC;
  241. font-weight: 500;
  242. position: relative;
  243. z-index: 1;
  244. }
  245. text:last-child {
  246. width: 120rpx;
  247. height: 8rpx;
  248. background: linear-gradient(270deg, #0C66C2 0%, #FFFFFF 100%);
  249. border-radius: 6rpx;
  250. margin-top: -14rpx;
  251. margin-right: -20rpx;
  252. }
  253. }
  254. }
  255. }
  256. .dikou-header {
  257. margin: 20rpx auto;
  258. width: 686rpx;
  259. height: 264rpx;
  260. position: relative;
  261. z-index: 1;
  262. padding: 32rpx 0 0 0;
  263. .header-item {
  264. padding: 0 0 0 32rpx;
  265. .left {
  266. .top {
  267. font-size: 20rpx;
  268. font-family: PingFangSC-Light, PingFang SC;
  269. font-weight: 300;
  270. color: #FFFFFF;
  271. }
  272. .bottom {
  273. font-size: 28rpx;
  274. font-family: JDZhengHT-Regular, JDZhengHT;
  275. font-weight: 400;
  276. color: #FFFFFF;
  277. }
  278. }
  279. .right {
  280. margin-left: 72rpx;
  281. .top {
  282. font-size: 20rpx;
  283. font-family: PingFangSC-Light, PingFang SC;
  284. font-weight: 300;
  285. color: #FFFFFF;
  286. }
  287. .bottom {
  288. font-size: 28rpx;
  289. font-family: JDZhengHT-Regular, JDZhengHT;
  290. font-weight: 400;
  291. color: #FFFFFF;
  292. }
  293. }
  294. .item-tixian {
  295. width: 108rpx;
  296. height: 48rpx;
  297. }
  298. .item-price {
  299. font-size: 52rpx;
  300. font-family: JDZhengHT-Regular, JDZhengHT;
  301. font-weight: 400;
  302. color: #FFFFFF;
  303. margin-bottom: 20rpx;
  304. }
  305. .item-top {
  306. margin-bottom: 20rpx;
  307. text {
  308. font-size: 26rpx;
  309. font-family: PingFangSC-Regular, PingFang SC;
  310. font-weight: 400;
  311. color: #FFFFFF;
  312. margin-right: 8rpx;
  313. }
  314. image {
  315. width: 28rpx;
  316. height: 28rpx;
  317. }
  318. }
  319. }
  320. .header-img {
  321. width: 686rpx;
  322. height: 264rpx;
  323. position: absolute;
  324. top: 0;
  325. left: 0;
  326. z-index: -1;
  327. }
  328. }
  329. }
  330. page {
  331. background-color: #F3F3F3;
  332. }
  333. </style>