invitationCode.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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;" @click="">
  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" @click="upgrade">去升级</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. upgrade() {
  73. uni.navigateTo({
  74. url: '/pages/institutional/applicationResult'
  75. })
  76. },
  77. //二维码生成
  78. recommendCode() {
  79. this.recommendImg = QR.createQrCodeImg("/#/pages/register/register?id=", {
  80. size: parseInt(300) //二维码大小
  81. })
  82. // this.recommendUrl = this.$base.h5BaseUrl + "/#/pages/register/register?id=" ;
  83. },
  84. back() {
  85. uni.navigateBack({
  86. delta: 1, // 返回的页面数,如果是1表示返回上一页
  87. success: function() {}
  88. });
  89. },
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .headers {
  95. position: fixed;
  96. top: 0;
  97. left: 0;
  98. height: auto;
  99. width: 100%;
  100. z-index: 999999;
  101. padding: 30rpx;
  102. padding-top: 50px;
  103. text {
  104. font-size: 36rpx;
  105. font-weight: bold;
  106. color: #000;
  107. }
  108. .headers-activeTab {
  109. width: 80%;
  110. }
  111. .right {
  112. position: absolute;
  113. right: 30rpx;
  114. image {
  115. width: 28rpx;
  116. height: 28rpx;
  117. margin-right: 4rpx;
  118. }
  119. text {
  120. font-weight: 400;
  121. color: #000;
  122. font-size: 24rpx;
  123. }
  124. }
  125. }
  126. //头部背景
  127. .homeBackground {
  128. width: 100%;
  129. height: 176rpx;
  130. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  131. }
  132. .bgimg {
  133. width: 100%;
  134. background-image: url("/static/bgimg.png");
  135. background-size: 100% 100%;
  136. padding: 40rpx;
  137. box-sizing: border-box;
  138. background-color: #FFFFFF;
  139. .header {
  140. image {
  141. width: 90rpx;
  142. height: 90rpx;
  143. }
  144. .ml-2 {
  145. text:first-child {
  146. font-size: 32rpx;
  147. color: #333;
  148. font-weight: bold;
  149. }
  150. text:last-child {
  151. font-size: 28rpx;
  152. color: #999;
  153. }
  154. }
  155. }
  156. .panelcanvas {
  157. position: relative;
  158. image {
  159. width: 340rpx;
  160. height: 340rpx;
  161. }
  162. }
  163. .operation {
  164. image {
  165. width: 88rpx;
  166. height: 88rpx;
  167. }
  168. text {
  169. font-size: 24rpx;
  170. color: #333;
  171. }
  172. }
  173. }
  174. .tag {
  175. background: #FFFFFF;
  176. border-radius: 10rpx 10rpx 10rpx 10rpx;
  177. padding: 30rpx;
  178. box-sizing: border-box;
  179. .entryPoint {
  180. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  181. border-radius: 4rpx 4rpx 4rpx 4rpx;
  182. padding: 1rpx 17rpx;
  183. box-sizing: border-box;
  184. font-size: 24rpx;
  185. color: #FFFFFF;
  186. }
  187. text:first-child {
  188. font-size: 30rpx;
  189. color: #333;
  190. font-weight: bold;
  191. }
  192. text:last-child {
  193. font-size: 24rpx;
  194. color: #666;
  195. }
  196. }
  197. </style>