推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
2.0 KiB

2 months ago
  1. <template>
  2. <view class="commission">
  3. <image src="/static/image/center/10.png" mode=""></image>
  4. <view class="price">
  5. <view class="title">
  6. 总佣金
  7. </view>
  8. <view class="num">
  9. 7890.34
  10. </view>
  11. </view>
  12. <view class="font-menu"
  13. v-if="purse">
  14. <view @click="toRunningWater(index)"
  15. v-for="(item, index) in list"
  16. :key="index">{{ item.name }}</view>
  17. </view>
  18. <view class="btn"
  19. v-if="!purse"
  20. @click="toPurse">
  21. 提现
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. name: "userShopCommission",
  28. props : {
  29. purse : {
  30. default : false,
  31. },
  32. },
  33. data() {
  34. return {
  35. list : [
  36. {
  37. name : '余额记录',
  38. },
  39. {
  40. name : '提现记录',
  41. },
  42. {
  43. name : '佣金记录',
  44. },
  45. ],
  46. };
  47. },
  48. methods : {
  49. // 跳转到钱包提现
  50. toPurse(){
  51. uni.navigateTo({
  52. url:'/pages_order/mine/purse'
  53. })
  54. },
  55. // 跳转到记录页面
  56. toRunningWater(index){
  57. uni.navigateTo({
  58. url:'/pages_order/mine/runningWater?status=' + index
  59. })
  60. },
  61. }
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .commission {
  66. width: 700rpx;
  67. height: 300rpx;
  68. position: relative;
  69. margin: 20rpx auto;
  70. color: #fff;
  71. image {
  72. width: 700rpx;
  73. height: 300rpx;
  74. position: absolute;
  75. border-radius: 20rpx;
  76. }
  77. .price {
  78. position: absolute;
  79. left: 50rpx;
  80. top: 80rpx;
  81. font-weight: 900;
  82. .title {
  83. font-size: 32rpx;
  84. }
  85. .num {
  86. font-size: 44rpx;
  87. margin-top: 20rpx;
  88. }
  89. }
  90. .font-menu {
  91. font-size: 24rpx;
  92. font-family: PingFang SC, PingFang SC-Regular;
  93. font-weight: 500;
  94. text-align: center;
  95. color: #ffffff;
  96. line-height: 24rpx;
  97. width: 710rpx;
  98. position: absolute;
  99. left: 0;
  100. bottom: 25rpx;
  101. display: flex;
  102. view{
  103. width: 160rpx;
  104. }
  105. }
  106. .btn {
  107. position: absolute;
  108. right: 50rpx;
  109. bottom: 50rpx;
  110. background-color: #FDC440;
  111. width: 160rpx;
  112. height: 60rpx;
  113. display: flex;
  114. justify-content: center;
  115. align-items: center;
  116. border-radius: 30rpx;
  117. }
  118. }
  119. </style>