detail.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <view class="container">
  3. <u-navbar title="明细" leftIconColor="#ffffff" titleStyle="color:#fff" :autoBack="true" placeholder></u-navbar>
  4. <view class="head">
  5. <view class="head_money">
  6. <view class="head_money_lab">可提现金额</view>
  7. <view class="head_money_val">¥ <text>{{promotionInfo.moneyAble.split('.')[0]}}</text>.{{promotionInfo.moneyAble.split('.')[1]}} </view>
  8. </view>
  9. </view>
  10. <view class="box">
  11. <view>
  12. <view class="tabs" v-if="type==0">
  13. <view class="tabs_l active" style="background-image:url('https://guess-shop.oss-cn-beijing.aliyuncs.com/static/online/img3.png')">提现记录</view>
  14. <view class="tabs_r" @click="switchType(1)">获得分佣明细</view>
  15. </view>
  16. <view class="tabs1" v-if="type==1">
  17. <view class="tabs_l " @click="switchType(0)">提现记录</view>
  18. <view class="tabs_r r active" style="background-image:url('https://guess-shop.oss-cn-beijing.aliyuncs.com/static/online/img8.png')">获得分佣明细</view>
  19. </view>
  20. <view class="list" v-if="type==0">
  21. <view class="list_item" v-for="(v,i) in list" :key="i">
  22. <view class="list_item_l">{{v.taskStatus==1?'提现成功':v.taskStatus==2?'提现失败':'等待提现'}}</view>
  23. <view class="list_item_c">{{v.createTime.substr(0,10)}}</view>
  24. <view class="list_item_r">¥{{v.amount}}</view>
  25. </view>
  26. <empty marginTop="50" v-if="(!list||list.length<=0)&&status!='loading'"></empty>
  27. <u-loadmore v-else :status="status" />
  28. </view>
  29. <view class="list1" v-if="type==1">
  30. <view class="list1_item" v-for="(v,i) in list" :key="i">
  31. <view class="list1_item_l">
  32. <image v-if="v.headPhoto" :src="v.headPhoto" mode="" />
  33. <image v-else src="@/static/default-head-photo.png" mode="" />
  34. <view>
  35. <view class="list1_item_l_name">{{v.orderUserName}}</view>
  36. <view class="list1_item_l_time">{{v.createTime?v.createTime.substr(0,10):''}}</view>
  37. </view>
  38. </view>
  39. <view class="list1_item_r">
  40. <view class="list1_item_r_t">¥{{v.actualAmount}}</view>
  41. <view class="list1_item_r_b">{{v.distributionStatus==1?'已入账':'待入账'}}</view>
  42. </view>
  43. </view>
  44. <empty marginTop="50" v-if="(!list||list.length<=0)&&status!='loading'"></empty>
  45. <u-loadmore v-else :status="status" />
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import { promotionInfo, withdrawalPage, orderPage } from "@/api/user.js"
  53. export default {
  54. data () {
  55. return {
  56. type: 0,
  57. list: [],
  58. status: 'loadmore',//加载前值为loadmore,加载中为loading,没有数据为nomore
  59. params: {
  60. pageNum: 1,
  61. pageSize: 10,
  62. distributionStatus: 1
  63. },
  64. promotionInfo: {
  65. moneyAble: 0.00
  66. }
  67. }
  68. },
  69. onLoad () {
  70. this.getList();
  71. this.getPromotionInfo();
  72. },
  73. onPullDownRefresh () {
  74. this.params.pageNum = 1;
  75. this.getList()
  76. },
  77. onReachBottom () {
  78. if (this.status == "loadmore") {
  79. this.params.pageNum++;
  80. this.getList()
  81. }
  82. },
  83. methods: {
  84. getList () {
  85. let apiFun = withdrawalPage
  86. if (this.type == 1) apiFun = orderPage
  87. this.status = 'loading';
  88. apiFun(this.params).then(res => {
  89. if (this.params.pageNum == 1) {
  90. this.list = res.rows
  91. } else {
  92. this.list.push(...res.rows);
  93. }
  94. if (this.list.length < res.total) {
  95. this.status = 'loadmore';
  96. } else {
  97. this.status = 'nomore';
  98. }
  99. }).finally(()=>{
  100. uni.stopPullDownRefresh();
  101. })
  102. },
  103. switchType (index) {
  104. this.type = index;
  105. this.params.pageNum = 1;
  106. this.getList()
  107. },
  108. getPromotionInfo () {
  109. promotionInfo().then(res => {
  110. this.promotionInfo = res.data
  111. })
  112. },
  113. },
  114. }
  115. </script>
  116. <style lang='scss' scoped>
  117. ::v-deep .u-navbar__content,
  118. ::v-deep .u-status-bar {
  119. background-color: #c90700 !important;
  120. }
  121. .container {
  122. background: #c90700;
  123. .head {
  124. padding: 0 30rpx;
  125. .head_money {
  126. background: linear-gradient(180deg, #ff6056, #fe8e66);
  127. border-radius: 40rpx 40rpx 0rpx 0rpx;
  128. background-size: 100% 490rpx;
  129. padding: 40rpx 0 50rpx;
  130. .head_money_lab {
  131. font-size: 28rpx;
  132. color: #ffffff;
  133. text-align: center;
  134. }
  135. .head_money_val {
  136. font-size: 30rpx;
  137. color: #ffffff;
  138. font-family: FZCuYuan-M03;
  139. text-align: center;
  140. margin-top: 15rpx;
  141. > text {
  142. font-size: 60rpx;
  143. font-family: FZCuYuan-M03;
  144. }
  145. }
  146. }
  147. }
  148. .box {
  149. background: #f6f6f6;
  150. border-radius: 40rpx 40rpx 0rpx 0rpx;
  151. overflow: hidden;
  152. > view {
  153. background: #ffffff;
  154. min-height: 70vh;
  155. .tabs {
  156. display: flex;
  157. background: #fff5f3;
  158. > view {
  159. height: 85rpx;
  160. line-height: 85rpx;
  161. text-align: center;
  162. font-size: 30rpx;
  163. color: #333333;
  164. }
  165. .tabs_l {
  166. width: 445rpx;
  167. background-size: 100% 99rpx;
  168. position: relative;
  169. z-index: 10;
  170. background-position-y: -7rpx;
  171. padding-right: 45rpx;
  172. box-sizing: border-box;
  173. }
  174. .tabs_r {
  175. flex-grow: 1;
  176. background-size: 100% 85rpx;
  177. position: relative;
  178. z-index: 9;
  179. left: -20rpx;
  180. text-align: left;
  181. padding-left: 40rpx;
  182. }
  183. > .active {
  184. font-size: 30rpx;
  185. color: #ff0000;
  186. font-family: FZCuYuan-M03;
  187. }
  188. }
  189. .tabs1 {
  190. display: flex;
  191. // background: #ffffff;
  192. background: #fff5f3;
  193. > view {
  194. height: 85rpx;
  195. line-height: 85rpx;
  196. text-align: center;
  197. font-size: 30rpx;
  198. color: #333333;
  199. }
  200. .tabs_r {
  201. width: 445rpx;
  202. background-size: 100% 99rpx;
  203. position: relative;
  204. z-index: 10;
  205. background-position-y: -7rpx;
  206. padding-left: 45rpx;
  207. box-sizing: border-box;
  208. }
  209. .tabs_l {
  210. flex-grow: 1;
  211. background-size: 100% 85rpx;
  212. position: relative;
  213. z-index: 9;
  214. text-align: right;
  215. padding-right: 40rpx;
  216. }
  217. > .active {
  218. font-size: 30rpx;
  219. color: #ff0000;
  220. font-family: FZCuYuan-M03;
  221. }
  222. .r {
  223. background-position-y: 0rpx;
  224. }
  225. }
  226. .list {
  227. padding: 40rpx 0;
  228. .list_item {
  229. display: flex;
  230. justify-content: space-between;
  231. padding: 0 50rpx;
  232. margin-bottom: 36rpx;
  233. .list_item_l {
  234. font-size: 28rpx;
  235. color: #1a1a1a;
  236. }
  237. .list_item_c {
  238. font-size: 24rpx;
  239. color: #808080;
  240. }
  241. .list_item_r {
  242. font-size: 32rpx;
  243. color: #fb0b03;
  244. font-family: FZCuYuan-M03;
  245. }
  246. }
  247. }
  248. .list1 {
  249. padding: 40rpx 0;
  250. .list1_item {
  251. display: flex;
  252. justify-content: space-between;
  253. padding: 0 50rpx;
  254. margin-bottom: 30rpx;
  255. .list1_item_l {
  256. display: flex;
  257. align-items: center;
  258. image {
  259. width: 100rpx;
  260. height: 100rpx;
  261. border-radius: 50%;
  262. }
  263. view {
  264. font-size: 28rpx;
  265. color: #1a1a1a;
  266. margin-left: 26rpx;
  267. }
  268. .list1_item_l_time {
  269. font-size: 24rpx;
  270. margin-top: 10rpx;
  271. color: #808080;
  272. }
  273. }
  274. .list1_item_r {
  275. .list1_item_r_t {
  276. font-size: 32rpx;
  277. color: #fb0b03;
  278. font-family: FZCuYuan-M03;
  279. text-align: center;
  280. }
  281. .list1_item_r_b {
  282. font-size: 26rpx;
  283. color: #808080;
  284. text-align: center;
  285. }
  286. }
  287. }
  288. }
  289. }
  290. }
  291. }
  292. </style>