yongjin.vue 7.8 KB

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