infoDetail.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <view class="center">
  3. <view class="box">
  4. <view class="discounts">
  5. <view class="title">{{$t('hea.yz')}}:</view>
  6. <view class="money">
  7. <text>{{ item.money * 2 || 0}}</text>
  8. </view>
  9. </view>
  10. <view class="main-box">
  11. <view class="main-title">
  12. <view class="main-title-image"><image class="image" src="../../static/icon/title.png" mode=""></image></view>
  13. <view class="main-title-font">{{item.name}}</view>
  14. </view>
  15. <view class="main">
  16. <view class="main-item" v-for="(ls, index) in revenueList">
  17. <view class="main-image"><image :src="image[index]" mode=""></image></view>
  18. <view class="main-font">
  19. <view class="textDetail-title">{{ index < 2 ? index + 1 + $t('hea.dsy') : index + 1 + $t('hea.dsy') + '(' + $t('hea.vipzs')+ ')' }}</view>
  20. <view class="textDetail-content">{{ ls }}</view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- <view class="earnings-box">
  26. <image src="../../static/img/index/vip.png" mode="" class="earnings"></image>
  27. <view class="text-box">
  28. <view class="textDetail" v-for="(ls, index) in revenueList">
  29. <view class="textDetail-title">{{ index < 2 ? index + 1 + '度受益' : index + 1 + '度收益(黑钻VIP义工专属)' }}</view>
  30. <view class="textDetail-content">{{ ls }}</view>
  31. </view>
  32. </view>
  33. </view> -->
  34. <!-- <view class="zhushi">
  35. <text v-if="status == '1'">说明:当前等级援助者,升级成援助组长需要援助{{ item.v2_limit * 1 }},当前援助金额{{ item.income }}</text>
  36. <text v-if="status == '2'">说明:当前等级援助组长已是最高收益</text>
  37. </view> -->
  38. </view>
  39. <view class="baodan" @click="baodan(id)" v-if="status == '0'">{{$t('hea.wyyz')}}</view>
  40. <view class="baodan1" @click="baodan(id)" v-if="status == '1'&&item.income*1<item.v2_limit*1 && item.v2_layer != 0" >{{$t('hea.lksj')}}</view>
  41. <view class="baodan" @click="baodan(id)" v-if="status == '1'&&item.income*1>=item.v2_limit*1 && item.v2_layer != 0">{{$t('hea.ljsj')}}</view>
  42. <view class="baodan" v-if="status == '2'||(status == '1' && item.v2_layer == 0)" style="background: #020202;">{{$t('hea.ywc')}}</view>
  43. </view>
  44. </template>
  45. <script>
  46. import { mapState, mapMutations } from 'vuex';
  47. import { activitys } from '@/api/active.js';
  48. export default {
  49. data() {
  50. return {
  51. id: '',
  52. revenueList: [],
  53. item: '',
  54. status: '',
  55. image:['../../static/icon/1.png','../../static/icon/2.png','../../static/icon/3.png','../../static/icon/4.png','../../static/icon/5.png','../../static/icon/6.png','../../static/icon/7.png']
  56. };
  57. },
  58. computed: {
  59. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  60. },
  61. onLoad(option) {
  62. uni.setNavigationBarTitle({
  63. title:this.$t('foo.xq')
  64. })
  65. this.id = option.id;
  66. this.loadData();
  67. },
  68. methods: {
  69. loadData() {
  70. const obj = this;
  71. activitys({}, this.id).then(e => {
  72. console.log(e);
  73. obj.item = e.data;
  74. if (e.data.my_join) {
  75. obj.status = e.data.my_join.status;
  76. } else {
  77. obj.status = '0';
  78. obj.isU = false;
  79. }
  80. let i = e.data.v1_layer + e.data.v2_layer
  81. if (e.data.v2_layer&&(obj.status == '0'||(obj.status == '1'&&e.data.income*1<e.data.v2_limit*1))){
  82. i = e.data.v1_layer
  83. }
  84. let money = e.data.money * 1;
  85. let money1 = e.data.money * 1;
  86. let people = 1
  87. for (let j=0;j < i; j++){
  88. people = people * 5;
  89. money = money * 1 * 5;
  90. obj.revenueList[j] = people +'人x' + money1 + '元=' + this.unit(money);
  91. }
  92. });
  93. },
  94. unit(num) {
  95. let i = 0;
  96. if (num / 10000 >= 1) {
  97. i = num / 10000 + '万元';
  98. if (num / 100000000 >= 1) {
  99. i = num / 100000000 + '亿元';
  100. }
  101. } else {
  102. i = num + '元';
  103. }
  104. return i;
  105. },
  106. baodan(id) {
  107. console.log(this.userInfo, '11111');
  108. if (!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit && this.userInfo.bank_card_no == '' && this.userInfo.bank_of_deposit == '') {
  109. uni.showModal({
  110. title: this.$t('foo.ts'),
  111. content: this.$t('foo.ndqwtxskxx'),
  112. success: function(res) {
  113. if (res.confirm) {
  114. uni.navigateTo({
  115. url: '/pages/set/userinfo'
  116. });
  117. } else if (res.cancel) {
  118. console.log('用户点击取消');
  119. }
  120. }
  121. });
  122. } else {
  123. if (this.status == '1' && this.item.income < this.item.v2_limit * 1) {
  124. this.$api.msg('当前援助额度不足以升级黑钻VIP义工');
  125. return;
  126. }
  127. uni.navigateTo({
  128. url: '/pages/index/info?id=' + id
  129. });
  130. }
  131. }
  132. }
  133. };
  134. </script>
  135. <style lang="scss">
  136. .center {
  137. padding-bottom: 50rpx;
  138. }
  139. .box {
  140. .discounts {
  141. margin: 0 30rpx;
  142. position: relative;
  143. padding: 20rpx;
  144. background-color: #1f2020;
  145. border-radius: 10rpx;
  146. .title {
  147. width: 100%;
  148. text-align: left;
  149. color: #e6c3a1;
  150. }
  151. .money {
  152. margin-top: 30rpx;
  153. padding-bottom: 30rpx;
  154. font-size: 32rpx;
  155. font-family: Source Han Sans CN;
  156. font-weight: bold;
  157. color: #c63535;
  158. width: 100%;
  159. text-align: center;
  160. text {
  161. font-size: 116rpx;
  162. font-family: Source Han Sans CN;
  163. font-weight: 800;
  164. color: #c63535;
  165. line-height: 115rpx;
  166. }
  167. }
  168. }
  169. .zhushi {
  170. color: #e6c3a1;
  171. padding: 20rpx 40rpx;
  172. }
  173. }
  174. .baodan {
  175. width: 452rpx;
  176. height: 80rpx;
  177. margin: 50rpx auto 0;
  178. text-align: center;
  179. line-height: 80rpx;
  180. color: #ffffff;
  181. background: #4e2c0e;
  182. font-size: 40rpx;
  183. border-radius: 10rpx;
  184. }
  185. .baodan1 {
  186. width: 452rpx;
  187. height: 80rpx;
  188. margin: 50rpx auto 0;
  189. text-align: center;
  190. line-height: 80rpx;
  191. color: #ffffff;
  192. background: #9f9f9f;
  193. font-size: 40rpx;
  194. border-radius: 10rpx;
  195. }
  196. .main-box {
  197. margin: 80rpx 30rpx 0;
  198. position: relative;
  199. padding: 20rpx;
  200. background-color: #1f2020;
  201. border-radius: 10rpx;
  202. .main-title {
  203. width: 400rpx;
  204. height: 80rpx;
  205. margin: -60rpx auto 0;
  206. border-radius: 50rpx;
  207. position: relative;
  208. .main-title-image {
  209. position: absolute;
  210. left: 0;
  211. top: 0;
  212. width: 400rpx;
  213. height: 80rpx;
  214. .image {
  215. width: 100%;
  216. height: 100%;
  217. border-radius: 50rpx;
  218. }
  219. }
  220. .main-title-font {
  221. position: relative;
  222. z-index: 100;
  223. text-align: center;
  224. line-height: 80rpx;
  225. font-size: 46rpx;
  226. font-weight: bold;
  227. color: #54300f;
  228. }
  229. }
  230. .main {
  231. padding: 40rpx 0;
  232. .main-item {
  233. margin-top: 20rpx;
  234. width: 100%;
  235. padding: 14rpx;
  236. background: #e6c3a1;
  237. position: relative;
  238. border-radius: 20rpx;
  239. .main-image {
  240. position: absolute;
  241. top: -2rpx;
  242. left: -2rpx;
  243. width: 110rpx;
  244. height: 110rpx;
  245. image {
  246. width: 100%;
  247. height: 100%;
  248. }
  249. }
  250. .main-font {
  251. font-size: 28rpx;
  252. padding-left: 80rpx;
  253. }
  254. }
  255. }
  256. }
  257. </style>