popup.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view>
  3. <!-- 弹窗 -->
  4. <view class="bgbox" @click="getClose" v-if="type"></view>
  5. <!-- 健康码 -->
  6. <view v-if="type=='code'" class="codebox">
  7. <view class="tit mb18">健康码</view>
  8. <image :src="hicoa" class="code"></image>
  9. <view class="codebtns flexcc">
  10. <image :src="downimg"></image>
  11. 保存健康码至手机
  12. </view>
  13. <image :src="closeimg" class="closeimg" @click="getClose"></image>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import config from '@/config'
  19. const baseUrl = config.baseUrl
  20. import { getToken } from '@/utils/auth'
  21. import {uploadmore} from '@/utils/common.js'
  22. export default{
  23. components:{},
  24. props:{
  25. type: {
  26. type: String,
  27. default () {
  28. return ''
  29. }
  30. },
  31. finshtype:{
  32. type: [String,Number],
  33. default () {
  34. return ''
  35. }
  36. }
  37. },
  38. data(){
  39. return{
  40. baseUrl:config.baseUrl,
  41. closeimg:require("@/static/images/close.png"),
  42. downimg:require("@/health/static/health/down.png"),
  43. hicoa:require("@/health/static/health/hicoa.png"),
  44. }
  45. },
  46. mounted() {
  47. this.baseUrl=baseUrl
  48. },
  49. watch:{
  50. type(val){
  51. // this.filelist=[];
  52. // this.shtext='';
  53. // this.isty='2';
  54. // this.phofile=[];
  55. }
  56. },
  57. methods:{
  58. bindDateChange(){
  59. var val=e.detail.value;
  60. },
  61. getClose(){
  62. this.$emit('getClose')
  63. },
  64. getSure(){
  65. this.$emit('getSure')
  66. },
  67. getChose(val){
  68. this.peoval=val
  69. },
  70. getPreviewImage(arr,idx){
  71. var newArr=[];
  72. arr.forEach(ite=>{
  73. var ds=this.baseUrl+ite
  74. newArr.push(ds)
  75. })
  76. uni.previewImage({
  77. urls: newArr,
  78. current:idx,
  79. success: function(data) {
  80. },
  81. fail: function(err) {
  82. }
  83. });
  84. },
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. // 指派
  90. .codebox{width: 470rpx;height: 620rpx;background: #FFFFFF;border-radius: 20rpx;padding: 30rpx 36rpx 44rpx;position: fixed;left:140rpx;top: 40%;transform: translateY(-235rpx);z-index: 10;box-sizing: border-box;
  91. .tit{font-weight: bold;font-size: 30rpx;color: #272727;text-align: center;}
  92. .code{width: 334rpx;height:334rpx;margin: 0 auto 56rpx;}
  93. .codebtns{height: 78rpx;background: #318E6B;border-radius: 20rpx;font-weight: 500;
  94. font-size: 26rpx;
  95. color: #FFFFFF;
  96. image{width: 22rpx;height: 22rpx;margin-right: 14rpx;}
  97. }
  98. }
  99. .closeimg{width: 32rpx;height: 32rpx;position: absolute;bottom: -72rpx;left: 50%;margin-left: -16rpx;}
  100. </style>