auth.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!-- 这个是商户端微信认证所需的h5页面,三个端只有用户端有h5,故把商户端的微信认证h5页面放在此处一起打包 -->
  2. <template>
  3. <view>
  4. <u-mask :show="show" >
  5. <view class="warp" style="margin-top: -50rpx;">
  6. <image :show-menu-by-longpress="true" @error="error" style="width: 70%;" :src="src" mode="widthFix">
  7. </image>
  8. <view class="text-white text-sm margin-top-20">
  9. <text>长按二维码关注公众号认证信息</text>
  10. </view>
  11. </view>
  12. </u-mask>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. name: '',
  18. data() {
  19. return {
  20. show: true,
  21. src: ''
  22. };
  23. },
  24. onLoad(options) {
  25. this.src = options.src
  26. if (this.$isEmpty(this.src)) {
  27. this.$dialog.showModalAndBack('二维码获取失败')
  28. return
  29. }
  30. },
  31. methods: {
  32. error() {
  33. this.$dialog.showModalAndBack('二维码加载失败')
  34. },
  35. async saveImg() {
  36. let res = await this.$mpi.downloadFile(this.src)
  37. this.$mpi.saveImg(res)
  38. }
  39. }
  40. };
  41. </script>
  42. <style lang="scss" scoped>
  43. .warp {
  44. display: flex;
  45. align-items: center;
  46. justify-content: center;
  47. flex-direction: column;
  48. height: 100%;
  49. }
  50. </style>