index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <app-layout>
  3. <view class="container">
  4. <view class="header">
  5. <view class="bg"></view>
  6. <view class="info main-left cross-center">
  7. <view class="head-img">
  8. <u-image
  9. width="150"
  10. height="150"
  11. src="https://xiansin.oss-cn-shenzhen.aliyuncs.com/sange-bridge/images/sample.jpg"
  12. shape="circle"></u-image>
  13. </view>
  14. <view class="share-box dir-top-wrap">
  15. <view class="nickname">会员昵称</view>
  16. <view class="recommend">推荐人:大虎</view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="item-group dir-left-wrap">
  21. <view class="item-box dir-top-wrap cross-center main-center"
  22. v-for="(item,index) in shareTool"
  23. @click="handleItemClick(index)"
  24. >
  25. <view class="icon">
  26. <u-image
  27. width="90"
  28. height="90"
  29. mode="aspectFit"
  30. :src="item.icon"></u-image>
  31. </view>
  32. <view class="title">{{item.title}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="qrcode-modal" :class="{show:qrCodeModal.show}">
  37. <view class="content">
  38. <view class="qrcode-modal-content dir-top-wrap cross-center">
  39. <view class="head-img">
  40. <u-image
  41. width="150"
  42. height="150"
  43. src="https://xiansin.oss-cn-shenzhen.aliyuncs.com/sange-bridge/images/sample.jpg"
  44. shape="circle"></u-image>
  45. </view>
  46. <view class="nickname">小星星</view>
  47. <u-line class="u-line" border-style="dashed" length="90%"></u-line>
  48. <view class="qrcode">
  49. <u-image
  50. width="350"
  51. height="350"
  52. src="https://xiansin.oss-cn-shenzhen.aliyuncs.com/sange-bridge/images/sample.jpg"
  53. ></u-image>
  54. </view>
  55. </view>
  56. <u-button shape="circle"
  57. @click="qrCodeModal.show = false"
  58. hover-class="none"
  59. :custom-style="{
  60. background:'linear-gradient(90deg, rgba(4,153,140,1) 0%, rgba(4,153,128,1) 100%, rgba(14,175,160,.5) 100%)',
  61. boxShadow: '0 0 20rpx rgba(13,239,250,.3)',
  62. borderColor:'none',
  63. color: '#ffffff',
  64. marginTop: '50rpx'}">确定</u-button>
  65. </view>
  66. </view>
  67. </app-layout>
  68. </template>
  69. <script>
  70. import appLayout from "@/components/app-layout"
  71. export default {
  72. components:{
  73. appLayout,
  74. },
  75. data() {
  76. return {
  77. shareTool: [
  78. {icon:'/static/images/price.png',title:'佣金',url:'/pages/price/index'},
  79. {icon:'/static/images/withdraw.png',title:'佣金提现明细',url:'/pages/withdraw/index'},
  80. {icon:'/static/images/list.png',title:'推广列表',url:'/pages/share/list'},
  81. {icon:'/static/images/income.png',title:'收益列表',url:'/pages/income/index'},
  82. {icon:'/static/images/share.png',title:'推广分享',method: this.handleShare},
  83. {icon:'/static/images/qrcode.png',title:'推广二维码',url:'',method: this.handleQrCode},
  84. ],
  85. qrCodeModal:{
  86. show: false
  87. }
  88. }
  89. },
  90. methods: {
  91. handleItemClick(index){
  92. let item = this.shareTool[index];
  93. if(typeof item.method === "function"){
  94. item.method();
  95. }else{
  96. this.$jump({url:item.url,type:'to'});
  97. }
  98. },
  99. handleQrCode(){
  100. this.qrCodeModal.show = true
  101. },
  102. handleShare(){
  103. this.$u.toast('推广分享')
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .container{
  110. padding: 0;
  111. .header{
  112. position: relative;
  113. padding: 0 30rpx;
  114. .bg{
  115. position: absolute;
  116. background: url("@/static/images/share-bg.png") no-repeat top;
  117. background-size: 100% 120%;
  118. background-position: 0 -10rpx;
  119. height: 240rpx;
  120. left: 0;
  121. top: 0;
  122. width: 750rpx;
  123. z-index: 0;
  124. }
  125. .info{
  126. height: 240rpx;
  127. position: relative;
  128. color: #ffffff;
  129. z-index: 1;
  130. }
  131. .share-box{
  132. padding: 0 30rpx;
  133. .nickname{
  134. font-size: 36rpx;
  135. padding: 6rpx 0;
  136. }
  137. }
  138. }
  139. .item-group{
  140. margin: 30rpx 0;
  141. .item-box{
  142. width: 330rpx;
  143. background: #ffffff;
  144. border-radius: 16rpx;
  145. margin-bottom: 30rpx;
  146. margin-left: 30rpx;
  147. height: 260rpx;
  148. .title{
  149. color: #455150;
  150. font-size: 28rpx;
  151. font-weight: bold;
  152. padding: 16rpx 0;
  153. }
  154. }
  155. }
  156. }
  157. .qrcode-modal{
  158. position: fixed;
  159. top: 0;
  160. left: 0;
  161. width: 750rpx;
  162. height: 100vh;
  163. background: rgba(0,0,0,.35);
  164. z-index: 999;
  165. display: none;
  166. animation: show-modal linear .5s;
  167. &.show{
  168. display: block;
  169. }
  170. .content{
  171. position: absolute;
  172. width: 600rpx;
  173. top: 50%;
  174. left: 50%;
  175. transform: translate(-50%,-50%);
  176. .qrcode-modal-content{
  177. position: relative;
  178. width: 100%;
  179. height: 50vh;
  180. background: url("@/static/images/share-qrcode-bg.png") no-repeat center;
  181. background-size: 100% 100%;
  182. .head-img{
  183. position: absolute;
  184. top: -75rpx;
  185. }
  186. .nickname{
  187. position: absolute;
  188. color: #ffffff;
  189. top: 11%;
  190. font-size: 36rpx;
  191. }
  192. .u-line{
  193. position: absolute;
  194. top: 28.55%;
  195. }
  196. .qrcode{
  197. position: absolute;
  198. top: 35%;
  199. }
  200. }
  201. }
  202. }
  203. @keyframes show-modal {
  204. 0%{opacity: 0;}
  205. 100%{opacity: 1;}
  206. }
  207. </style>