invitationCode.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="page">
  3. <public-module></public-module>
  4. <view class="headers dis a-c j-start">
  5. <u-icon name="arrow-left" color="#333" size="38" @tap="back"></u-icon>
  6. <text style="margin: auto;">邀请码</text>
  7. </view>
  8. <view class="homeBackground"></view>
  9. <view class="p-2">
  10. <!-- 二维码 -->
  11. <view class="bgimg dis f-c ">
  12. <view class="header dis a-c mb-3">
  13. <image src="/static/image/my/wuxingb.png" mode=""></image>
  14. <view class="dis f-c ml-2">
  15. <text>姓名</text>
  16. <text>所在机构名称</text>
  17. </view>
  18. </view>
  19. <view class="dis f-c a-c ">
  20. <view class="panelcanvas " id="panelcanvas">
  21. <image :src="recommendImg" mode="widthFix" lazy-load></image>
  22. </view>
  23. <view class="operation mt-4 dis a-c ">
  24. <view class="dis f-c a-c" style="margin-right: 136rpx;">
  25. <image src="/static/share.png" mode=""></image>
  26. <text class="mt-1">保存图片</text>
  27. </view>
  28. <view class="dis f-c a-c">
  29. <image src="/static/save.png" mode=""></image>
  30. <text class="mt-1">链接分享</text>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 标签 -->
  36. <view class="tag mt-2 dis f-c ">
  37. <view class="dis a-c j-s">
  38. <text>我的身份:合伙人</text>
  39. <view class="entryPoint">去升级</view>
  40. </view>
  41. <text class="mt-1">再邀请6个工作室,即可升级成为管理人,赚取更多收益</text>
  42. </view>
  43. <view class="tag mt-2 dis f-c a-start">
  44. <text>我的佣金权益:0.2%</text>
  45. <text class="mt-1">再邀请3-5个工作室,佣金可达0.5%</text>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import {
  52. mapState
  53. } from "vuex"
  54. import {
  55. pathToBase64,
  56. base64ToPath
  57. } from '@/common/pdf.js'
  58. import QR from "@/common/wxqrcode.js"
  59. export default {
  60. data() {
  61. return {
  62. recommendImg: "", //邀请码
  63. }
  64. },
  65. onShow() {
  66. },
  67. onLoad() {
  68. this.recommendCode();
  69. },
  70. methods: {
  71. //二维码生成
  72. recommendCode() {
  73. this.recommendImg = QR.createQrCodeImg("/#/pages/register/register?id=", {
  74. size: parseInt(300) //二维码大小
  75. })
  76. // this.recommendUrl = this.$base.h5BaseUrl + "/#/pages/register/register?id=" ;
  77. },
  78. back() {
  79. uni.navigateBack({
  80. delta: 1, // 返回的页面数,如果是1表示返回上一页
  81. success: function() {}
  82. });
  83. },
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .headers {
  89. position: fixed;
  90. top: 0;
  91. left: 0;
  92. height: auto;
  93. width: 100%;
  94. z-index: 999999;
  95. padding: 30rpx;
  96. padding-top: 50px;
  97. text {
  98. font-size: 36rpx;
  99. font-weight: bold;
  100. color: #000;
  101. }
  102. .headers-activeTab {
  103. width: 80%;
  104. }
  105. .right {
  106. position: absolute;
  107. right: 30rpx;
  108. image {
  109. width: 28rpx;
  110. height: 28rpx;
  111. margin-right: 4rpx;
  112. }
  113. text {
  114. font-weight: 400;
  115. color: #000;
  116. font-size: 24rpx;
  117. }
  118. }
  119. }
  120. //头部背景
  121. .homeBackground {
  122. width: 100%;
  123. height: 176rpx;
  124. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  125. }
  126. .bgimg {
  127. width: 100%;
  128. background-image: url("/static/bgimg.png");
  129. background-size: 100% 100%;
  130. padding: 40rpx;
  131. box-sizing: border-box;
  132. background-color: #FFFFFF;
  133. .header {
  134. image {
  135. width: 90rpx;
  136. height: 90rpx;
  137. }
  138. .ml-2 {
  139. text:first-child {
  140. font-size: 32rpx;
  141. color: #333;
  142. font-weight: bold;
  143. }
  144. text:last-child {
  145. font-size: 28rpx;
  146. color: #999;
  147. }
  148. }
  149. }
  150. .panelcanvas {
  151. position: relative;
  152. image {
  153. width: 340rpx;
  154. height: 340rpx;
  155. }
  156. }
  157. .operation {
  158. image {
  159. width: 88rpx;
  160. height: 88rpx;
  161. }
  162. text {
  163. font-size: 24rpx;
  164. color: #333;
  165. }
  166. }
  167. }
  168. .tag {
  169. background: #FFFFFF;
  170. border-radius: 10rpx 10rpx 10rpx 10rpx;
  171. padding: 30rpx;
  172. box-sizing: border-box;
  173. .entryPoint {
  174. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  175. border-radius: 4rpx 4rpx 4rpx 4rpx;
  176. padding: 1rpx 17rpx;
  177. box-sizing: border-box;
  178. font-size: 24rpx;
  179. color: #FFFFFF;
  180. }
  181. text:first-child {
  182. font-size: 30rpx;
  183. color: #333;
  184. font-weight: bold;
  185. }
  186. text:last-child {
  187. font-size: 24rpx;
  188. color: #666;
  189. }
  190. }
  191. </style>