awardSq.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view>
  3. <view class="app-bg">
  4. <image src="/static/img/new_award_bg.png"></image>
  5. </view>
  6. <view class="app-h">
  7. <uni-nav-bar color="#fff" :border="false" statusBar backgroundColor="transparent" left-icon="left" @clickLeft="utils.navigateBack()" fixed title="申请新人奖"></uni-nav-bar>
  8. </view>
  9. <view class="app-body">
  10. <view class="pannel">
  11. <view class="top-inner fx-h fx-bc fx-ac">
  12. <view class="bg">
  13. <image src="/static/img/team-top-title.png"></image>
  14. <view class="text">新人奖</view>
  15. </view>
  16. </view>
  17. <view class="body fx-h fx-bc fx-ac">
  18. <image class="avatar" mode="aspectFill" :src=" data.avatar || '/static/img/user-avatar1.png' "></image>
  19. <view class="nickname">{{ data.nickname || "" }}</view>
  20. <view class="iid">ID:{{ data.uid }}</view>
  21. <view class="content">
  22. 累计收益到达¥{{ data.new_award_money || 0 }},即可申请新人奖<text>¥{{ data.award_gain_money || 0 }}元。</text>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="fx-h fx-bc fx-ac"><view class="sbtn ihover" @tap="tapSubmit">提交申请</view></view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import {mapState,mapMutations } from 'vuex';
  32. export default {
  33. computed: mapState(['user']),
  34. data() {
  35. return {
  36. uid : 0,
  37. data : {}
  38. }
  39. },
  40. onLoad(options) {
  41. this.uid = options.uid || 0;
  42. this.initView();
  43. },
  44. methods: {
  45. ...mapMutations(['checkUserLogin']),
  46. /**
  47. * 加载基础配置
  48. */
  49. initView:function(){
  50. uni.showLoading({ title: '获取数据中..' });
  51. var post = {
  52. uid : this.uid
  53. };
  54. this
  55. .request
  56. .post("sqAwardInit",post)
  57. .then(res => {
  58. uni.hideLoading();
  59. if(res.code == 200) {
  60. this.data = res.data;
  61. } else {
  62. this.utils.showModal(res.msg,()=>{
  63. uni.navigateBack();
  64. });
  65. }
  66. })
  67. .catch(res=>{
  68. console.log(res);
  69. uni.hideLoading();
  70. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  71. });
  72. },
  73. /**
  74. * 提交新人奖
  75. */
  76. tapSubmit:function(){
  77. uni.showLoading({ title: '提交新人奖..' });
  78. var post = {
  79. uid : this.uid
  80. };
  81. this
  82. .request
  83. .post("sqAward",post)
  84. .then(res => {
  85. uni.hideLoading();
  86. if(res.code == 200) {
  87. uni.redirectTo({
  88. url:"awardSqOk?orderId=" + res.data.order_id
  89. })
  90. } else {
  91. this.utils.Tip(res.msg);
  92. }
  93. })
  94. .catch(res=>{
  95. console.log(res);
  96. uni.hideLoading();
  97. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  98. });
  99. }
  100. },
  101. }
  102. </script>
  103. <style lang="scss">
  104. .app-bg{
  105. position: absolute;
  106. image{width: 100vw;height: 83vw;}
  107. }
  108. .app-h{
  109. height: 83vw;
  110. }
  111. .app-body{
  112. padding: 0px 30rpx;
  113. .pannel{
  114. position: relative;
  115. top: -120rpx;
  116. background: #fff;
  117. box-shadow: 0px 0px 20px 0px rgba(50,50,52,0.06);
  118. border-radius: 20rpx;
  119. .top-inner{
  120. .bg{
  121. position: relative;
  122. image{width: 240rpx;height: 67rpx;}
  123. .text{position: absolute;color: #fff;font-size: 24rpx;top: 0px;text-align: center;width: 240rpx;line-height: 67rpx;}
  124. }
  125. }
  126. .body{
  127. padding: 60rpx 20vw;
  128. .avatar{width: 85rpx;height: 85rpx;border-radius: 50%;}
  129. .nickname{font-size: 16px;color: #333;margin-top: 6px;font-weight: bold;}
  130. .iid{font-size: 16px;color: #787878;margin-top: 6px;font-weight: bold;}
  131. .content{
  132. font-weight: bold;
  133. font-size: 32rpx;
  134. color: #0C1732;
  135. text{
  136. color: #FF4C4C;
  137. }
  138. }
  139. }
  140. }
  141. .sbtn{
  142. background: linear-gradient(143.2747deg, #FF6A00, #EE0979);
  143. border-radius: 40rpx;
  144. width: 80vw;
  145. height: 80rpx;
  146. text-align: center;
  147. line-height: 80rpx;
  148. font-weight: bold;
  149. font-size: 32rpx;
  150. color: #FFFFFF;
  151. position: relative;
  152. top: -30px;
  153. }
  154. }
  155. </style>