index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="qrcode-page">
  3. <image class="top-bg" src="../../static/top-bg.png" mode=""></image>
  4. <view class="container">
  5. <!-- 二维码 -->
  6. <uqrcode ref="uqrcode" type="2d" canvas-id="qrcode" value="12343245" :loading="loading" :options="{ margin: 20 }">
  7. <template v-slot:loading>
  8. <text style="color: black;">拼命加载中...</text>
  9. </template>
  10. </uqrcode>
  11. <view class="notice">
  12. 出示二维码给商家扫码验证
  13. </view>
  14. <button class="save-btn" type="default" @click="save">我已验证</button>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. loading: false
  23. }
  24. },
  25. methods: {
  26. save() {
  27. uni.navigateBack({
  28. fail() {
  29. this.$router.go(-1)
  30. }
  31. })
  32. }
  33. },
  34. onLoad() {
  35. // setTimeout(()=>{
  36. // this.loading = false
  37. // },5000)
  38. }
  39. }
  40. </script>
  41. <style lang="scss" >
  42. .qrcode-page{
  43. background: #F9F9F9;
  44. .top-bg{
  45. width: 750rpx;
  46. height: 406rpx;
  47. }
  48. .container{
  49. margin: 0 30rpx;
  50. padding: 120rpx 0;
  51. background: #fff;
  52. border-radius: 32rpx;
  53. position: relative;
  54. top: -200rpx;
  55. .uqrcode{
  56. margin: 100rpx auto 0;
  57. }
  58. .notice{
  59. text-align: center;
  60. font-size: 32rpx;
  61. margin-top: 60rpx;
  62. }
  63. .save-btn{
  64. width: 560rpx;
  65. height: 96rpx;
  66. line-height: 96rpx;
  67. background: $uni-color-primary;
  68. color: #fff;
  69. box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255,255,255,0.16);
  70. border-radius: 46rpx;
  71. margin-top: 80rpx;
  72. }
  73. }
  74. }
  75. </style>