invitationCode.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. pathToBase64,
  53. base64ToPath
  54. } from '@/common/pdf.js'
  55. import QR from "@/common/wxqrcode.js"
  56. import {
  57. mapState,
  58. mapMutations
  59. } from "vuex"
  60. export default {
  61. data() {
  62. return {
  63. recommendImg: "", //邀请码
  64. grade: "", //等级
  65. }
  66. },
  67. onShow() {
  68. },
  69. computed: {
  70. ...mapState(['userInfo', "userCheckInfo"]),
  71. },
  72. onLoad(options) {
  73. if (options) {
  74. this.grade = options.grade;
  75. }
  76. console.log(options);
  77. this.recommendCode();
  78. },
  79. methods: {
  80. //去升级
  81. upgrade() {
  82. uni.navigateTo({
  83. url: '/pages/institutional/applicationResult'
  84. })
  85. },
  86. //邀请二维码生成
  87. recommendCode() {
  88. // this.recommendImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" +
  89. // this
  90. // .deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  91. // size: parseInt(200) //二维码大小
  92. // })
  93. this.recommendImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applypartner?grade=" +
  94. this
  95. .grade, {
  96. size: parseInt(200) //二维码大小
  97. })
  98. },
  99. back() {
  100. uni.navigateBack({
  101. delta: 1, // 返回的页面数,如果是1表示返回上一页
  102. success: function() {}
  103. });
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .headers {
  110. position: fixed;
  111. top: 0;
  112. left: 0;
  113. height: auto;
  114. width: 100%;
  115. z-index: 999999;
  116. padding: 30rpx;
  117. padding-top: 50px;
  118. text {
  119. font-size: 36rpx;
  120. font-weight: bold;
  121. color: #000;
  122. }
  123. .headers-activeTab {
  124. width: 80%;
  125. }
  126. .right {
  127. position: absolute;
  128. right: 30rpx;
  129. image {
  130. width: 28rpx;
  131. height: 28rpx;
  132. margin-right: 4rpx;
  133. }
  134. text {
  135. font-weight: 400;
  136. color: #000;
  137. font-size: 24rpx;
  138. }
  139. }
  140. }
  141. //头部背景
  142. .homeBackground {
  143. width: 100%;
  144. height: 176rpx;
  145. background: linear-gradient(180deg, #D1EFFE 0%, #FFFFFF 100%);
  146. }
  147. .bgimg {
  148. width: 100%;
  149. background-image: url("/static/bgimg.png");
  150. background-size: 100% 100%;
  151. padding: 40rpx;
  152. box-sizing: border-box;
  153. background-color: #FFFFFF;
  154. .header {
  155. image {
  156. width: 90rpx;
  157. height: 90rpx;
  158. }
  159. .ml-2 {
  160. text:first-child {
  161. font-size: 32rpx;
  162. color: #333;
  163. font-weight: bold;
  164. }
  165. text:last-child {
  166. font-size: 28rpx;
  167. color: #999;
  168. }
  169. }
  170. }
  171. .panelcanvas {
  172. position: relative;
  173. image {
  174. width: 340rpx;
  175. height: 340rpx;
  176. }
  177. }
  178. .operation {
  179. image {
  180. width: 88rpx;
  181. height: 88rpx;
  182. }
  183. text {
  184. font-size: 24rpx;
  185. color: #333;
  186. }
  187. }
  188. }
  189. .tag {
  190. background: #FFFFFF;
  191. border-radius: 10rpx 10rpx 10rpx 10rpx;
  192. padding: 30rpx;
  193. box-sizing: border-box;
  194. .entryPoint {
  195. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  196. border-radius: 4rpx 4rpx 4rpx 4rpx;
  197. padding: 1rpx 17rpx;
  198. box-sizing: border-box;
  199. font-size: 24rpx;
  200. color: #FFFFFF;
  201. }
  202. text:first-child {
  203. font-size: 30rpx;
  204. color: #333;
  205. font-weight: bold;
  206. }
  207. text:last-child {
  208. font-size: 24rpx;
  209. color: #666;
  210. }
  211. }
  212. </style>