user-myqrcode.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>我的二维码-创业帮</title>
  6. <meta name="keywords" content="我的二维码-创业帮">
  7. <meta name="description" content="我的二维码-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="我的二维码-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="bgc-back ovh">
  18. <div class="iphonetitle"> </div>
  19. <div id="app">
  20. <van-nav-bar class="camp_title f16" title="我的二维码" v-if="toptitleisshow" @click-left="goback" right-text="保存" @click-right="rightbtn" left-arrow v-cloak>
  21. <template #left>
  22. <van-icon name="arrow-left" color="#333" size="20"></van-icon>
  23. </template>
  24. </van-nav-bar>
  25. <div class="myqrcode" v-cloak>
  26. <div class="bgcfff tc shadow03">
  27. <div class="myqrcode-img rel">
  28. <div class="abs" id="qrcode"> <img :src="invitedcode" alt="" style="width:100%;"></div>
  29. </div>
  30. <div class="myqrcode-info df pt16 pb16" v-cloak>
  31. <div class="user-info cm flex1">
  32. <div class="tl">
  33. <div class="f14 c333"><span class="vm">{{name}} {{number}} </span></div>
  34. <div class="f12 c333 op7">扫我加入创业帮</div>
  35. </div>
  36. </div>
  37. <div class="user-img">
  38. <van-image width="100%" :src="HeadPhoto" fit="cover" lazy-load round>
  39. <template v-slot:loading><img src="./static/images/user-img@3x.png" alt="" width="100%"></template>
  40. </van-image>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <script src="./static/js/klm-vv.min.js"></script>
  47. <script src="./static/js/appfunc.min.js"></script>
  48. <script src="./static/js/klm-axios-config.js"></script>
  49. <script src="./static/js/publicfn.js"></script>
  50. <script>
  51. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  52. // 可以通过下面的方式手动注册
  53. Vue.use(vant.Lazyload);
  54. //--- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
  55. // 在 #app 标签下渲染一个按钮组件
  56. let app = new Vue({
  57. el: '#app',
  58. data() {
  59. return {
  60. toptitleisshow:true,
  61. active: 0,
  62. HeadPhoto: '',
  63. isShow: true,
  64. name:'',
  65. number:'',
  66. invitedcode:'',
  67. };
  68. },
  69. created() {
  70. //- 二维码图片连接由后端发送
  71. //- this.badgeisshow = true
  72. //- setTimeout(()=>{
  73. //- new QRCode('qrcode', {
  74. //- text: this.qrcode,
  75. //- width: 200,
  76. //- height: 200,
  77. //- colorDark : '#000',
  78. //- colorLight : '#fff',
  79. //- correctLevel : QRCode.CorrectLevel.H
  80. //- });
  81. //- })
  82. this.getuserinfo();
  83. },
  84. methods: {
  85. async getuserinfo(){
  86. PublicLib.ShowLoading({Message:''});
  87. const Id = PublicLib.getCookieInfo('userId');
  88. const res = await getRequest('api/v1/users/mycard?t='+Math.random(6),JSON.stringify({Id}));
  89. if(res.status !== '1')return tips('获取个人信息失败!请刷新重试');
  90. PublicLib.HideLoading();
  91. //- 个人信息
  92. this.name = res.data.RealName;
  93. this.number = res.data.MakerCode;
  94. this.invitedcode = res.data.InvitePhoto;
  95. this.HeadPhoto = res.data.HeadPhoto;
  96. },
  97. goback(){
  98. PublicLib.GoBack({Level:1});
  99. },
  100. //- 点击保存
  101. rightbtn:undebounce(function(){
  102. PublicLib.SaveToSd({PicPath:this.invitedcode});
  103. }),
  104. }
  105. });
  106. </script>
  107. </body>
  108. </html>