wike-modal-qrcode.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view>
  3. <u-popup :show="showconcern" mode="center" :round="10" @close="tuexchange" :closeOnClickOverlay="false">
  4. <view class="carmimodal">
  5. <view class="carmiclose" @click="tuexchange"><u-icon name="close-circle-fill" color="#fff" size="22"></u-icon></view>
  6. <view class="carmititle">长按识别二维码关注</view>
  7. <view v-if="qrcode" class="kf_qrcode tn-flex justify-center">
  8. <u--image :showLoading="true" radius="10" showMenuByLongpress :src="qrcode" width="280px" height="280px" @click="clickuimage(qrcode)"></u--image>
  9. </view>
  10. <view @click="exchange" class="carmiexchange">我已关注·不再提醒</view>
  11. </view>
  12. </u-popup>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. name:"wike-modal-qrcode",
  18. props:{
  19. showconcern: {
  20. type: Boolean,
  21. default:false
  22. },
  23. qrcode: {
  24. type: String,
  25. default:''
  26. }
  27. },
  28. data() {
  29. return {
  30. };
  31. },
  32. methods:{
  33. exchange(){
  34. uni.setStorageSync('focuson', true);
  35. this.$emit('concernclose');
  36. },
  37. tuexchange(){
  38. this.$emit('concernclose');
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. .carmimodal {
  45. width: 600rpx;
  46. border-radius: 20rpx;
  47. position: relative;
  48. .carmiclose {
  49. position: absolute;
  50. right: 15rpx;
  51. top: 15rpx;
  52. }
  53. .carmititle {
  54. background: linear-gradient(to right, #00ca88, #00BCD4);
  55. color: #fff;
  56. height: 120rpx;
  57. line-height: 120rpx;
  58. font-size: 38rpx;
  59. font-weight: bold;
  60. text-align: center;
  61. border-radius: 20rpx 20rpx 0 0;
  62. // margin-bottom: 60rpx;
  63. }
  64. .carmiinput {
  65. margin: 30rpx;
  66. }
  67. .carmiexchange {
  68. margin: 40rpx 30rpx;
  69. background: linear-gradient(to right, #00ca88, #00BCD4);
  70. color: #fff;
  71. border-radius: 60rpx;
  72. height: 90rpx;
  73. line-height: 90rpx;
  74. text-align: center;
  75. font-size: 32rpx;
  76. }
  77. .kf_qrcode{
  78. // margin-left: 200rpx;
  79. margin: 30rpx;
  80. }
  81. }
  82. </style>