app-index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <template>
  2. <view>
  3. <view v-if="stock.index" class="app-stock-user" :style="{'background-image': `url(${stock.index})`}">
  4. <view @click="toAbout" class="about dir-left-nowrap cross-center">
  5. <text>升级说明</text>
  6. <image src="/static/image/icon/question.png"></image>
  7. </view>
  8. <view @click="toCash" class="cash-btn">提现</view>
  9. <view @click="toUpdate" class="dir-left-nowrap cross-center user-info">
  10. <image :src="detail.avatar"></image>
  11. <view>{{detail.level.name}}</view>
  12. <view v-if="detail.is_up == '1'" class="level-icon">可升级</view>
  13. </view>
  14. <view class="rate">当前{{setting.form.rate ? setting.form.rate : '分红比例'}}为{{detail.bonus_rate}}%</view>
  15. <view class="price">
  16. <view class="price-detail">{{detail.total_bonus}}</view>
  17. <view>{{setting.form.total_bonus ? setting.form.total_bonus : '可提现分红'}}(元)</view>
  18. </view>
  19. </view>
  20. <view class="app-stock-bonus main-between">
  21. <view class="bonus-item main-between cross-center">
  22. <view>{{setting.form.cash_bonus ? setting.form.cash_bonus : '已提现分红'}}(元)</view>
  23. <view class="bonus-price">{{detail.cash_bonus}}</view>
  24. </view>
  25. </view>
  26. <view class="app-stock-menu dir-left-wrap cross-center">
  27. <view @click="toBonus" class="menu-item dir-top-nowrap cross-center">
  28. <image class="menu-icon" :src="stock.stock"></image>
  29. <view>{{setting.form.stock ? setting.form.stock : '股东分红'}}</view>
  30. </view>
  31. <view @click="toDetail" class="menu-item dir-top-nowrap cross-center">
  32. <image class="menu-icon" :src="stock.cash"></image>
  33. <view>{{setting.form.cash_detail ? setting.form.cash_detail : '提现明细'}}</view>
  34. </view>
  35. <view @click="toBalance" class="menu-item dir-top-nowrap cross-center">
  36. <image class="menu-icon" :src="stock.detail"></image>
  37. <view>{{setting.form.balance_detail ? setting.form.balance_detail : '结算明细'}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import { mapState } from "vuex";
  44. export default {
  45. name: 'app-index',
  46. props: {
  47. detail: {
  48. type: Object
  49. },
  50. setting: {
  51. type: Object
  52. },
  53. },
  54. computed: {
  55. ...mapState({
  56. stock: state => state.mallConfig.__wxapp_img.stock,
  57. })
  58. },
  59. methods: {
  60. toUpdate() {
  61. uni.navigateTo({
  62. url: '/plugins/stock/update/update'
  63. });
  64. },
  65. toCash() {
  66. uni.navigateTo({
  67. url: '/plugins/stock/cash/cash'
  68. });
  69. },
  70. toBonus() {
  71. let name = this.setting.form.stock ? this.setting.form.stock : '';
  72. let cash_detail_name = this.setting.form.cash_detail ? this.setting.form.cash_detail : '';
  73. uni.navigateTo({
  74. url: '/plugins/stock/bonus/bonus?name=' + name + '&cash_detail=' + cash_detail_name
  75. });
  76. },
  77. toDetail() {
  78. let name = this.setting.form.cash_detail ? this.setting.form.cash_detail : '';
  79. uni.navigateTo({
  80. url: '/plugins/stock/cash-detail/cash-detail?name=' + name
  81. });
  82. },
  83. toBalance() {
  84. let name = this.setting.form.balance_detail ? this.setting.form.balance_detail : '';
  85. uni.navigateTo({
  86. url: '/plugins/stock/balance/balance?name=' + name
  87. });
  88. },
  89. toAbout() {
  90. uni.navigateTo({
  91. url: `/pages/rules/index?url=${encodeURIComponent(this.$api.stock.level)}&key=level_up_remark`,
  92. });
  93. }
  94. }
  95. }
  96. </script>
  97. <style scoped lang="scss">
  98. .app-stock-user {
  99. width: 100%;
  100. height: #{460rpx};
  101. padding: #{56rpx};
  102. background-size: 100% 100%;
  103. position: relative;
  104. font-size: #{26rpx};
  105. color: #ffe5be;
  106. .user-info {
  107. margin-bottom: #{20rpx};
  108. position: relative;
  109. width:fit-content;
  110. width:-webkit-fit-content;
  111. width:-moz-fit-content;
  112. height: #{60rpx};
  113. padding: 0 #{32rpx} 0 #{2rpx};
  114. font-size: #{28rpx};
  115. color: #ffe5be;
  116. background-color: rgba(0,0,0,.3);
  117. border-radius: #{30rpx};
  118. image {
  119. width: #{56rpx};
  120. border-radius: #{28rpx};
  121. height: #{56rpx};
  122. margin-right: #{16rpx};
  123. display: block;
  124. }
  125. .level-icon {
  126. padding: #{2rpx} #{10rpx};
  127. font-size: #{22rpx};
  128. color: #fff;
  129. background-color: #ff4544;
  130. border-radius: #{16rpx};
  131. border-bottom-left-radius: 0;
  132. position: absolute;
  133. right: #{-40rpx};
  134. top: #{-20rpx};
  135. }
  136. }
  137. .about {
  138. position: absolute;
  139. top: #{56rpx};
  140. right: #{56rpx};
  141. font-size: #{26rpx};
  142. height: #{60rpx};
  143. line-height: #{60rpx};
  144. color: rgba(255,255,255,.5);
  145. image {
  146. width: #{28rpx};
  147. height: #{28rpx};
  148. opacity: 0.5;
  149. margin-left: #{12rpx};
  150. }
  151. }
  152. .price {
  153. font-size: #{24rpx};
  154. color: #fff;
  155. margin-top: #{40rpx};
  156. .price-detail {
  157. font-size: #{64rpx};
  158. font-family: DIN;
  159. margin-bottom: #{6rpx};
  160. }
  161. }
  162. .cash-btn {
  163. padding: 0 #{42rpx};
  164. border-radius: #{32rpx};
  165. display: inline-block;
  166. height: #{64rpx};
  167. line-height: #{64rpx};
  168. font-size: #{28rpx};
  169. color: #fff;
  170. text-align: center;
  171. position: absolute;
  172. right: #{56rpx};
  173. top: #{232rpx};
  174. background: linear-gradient(to right, #d59635, #f8bb60);
  175. }
  176. }
  177. .app-stock-bonus {
  178. margin-top: #{-80rpx};
  179. padding: 0 #{24rpx};
  180. height: #{170rpx};
  181. .bonus-item {
  182. background-color: #fff;
  183. position: relative;
  184. z-index: 2;
  185. width: #{702rpx};
  186. height: #{124rpx};
  187. border-radius: #{16rpx};
  188. box-shadow: 0 0 #{10rpx} rgba(0,0,0,.05);
  189. padding: 0 #{32rpx};
  190. color: #999999;
  191. font-size: #{26rpx};
  192. .bonus-price {
  193. font-size: #{40rpx};
  194. font-family: DIN;
  195. color: #353535;
  196. margin-top: #{4rpx};
  197. }
  198. }
  199. }
  200. .app-stock-menu {
  201. margin: #{24rpx};
  202. margin-top: #{-20rpx};
  203. border-radius: #{16rpx};
  204. background-color: #fff;
  205. padding: #{48rpx} #{27rpx} #{50rpx};
  206. box-shadow: 0 0 #{10rpx} rgba(0,0,0,.05);
  207. .menu-item {
  208. width: #{216rpx};
  209. font-size: #{28rpx};
  210. color: #353535;
  211. .menu-icon {
  212. width: #{120rpx};
  213. height: #{120rpx};
  214. margin-bottom: #{20rpx};
  215. display: block;
  216. }
  217. }
  218. }
  219. </style>