popup.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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>健康码</view>
  8. <image :src="closeimg"></image>
  9. <view>
  10. <image :src="downimg"></image>
  11. 保存健康码至手机
  12. </view>
  13. <image :src="closeimg"></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/images/close.png"),
  43. syqxidx:'',
  44. datainfo:{
  45. iszc:""
  46. },
  47. sexs: [{
  48. text: '男',
  49. value: 0
  50. }, {
  51. text: '女',
  52. value: 1
  53. }],
  54. peoval:0,
  55. peolist:[{name:'王安安',val:"0",type:0},{name:'刘柠溪',val:"1",type:1},{name:'王合一',val:"2",type:0},]
  56. }
  57. },
  58. mounted() {
  59. this.baseUrl=baseUrl
  60. },
  61. watch:{
  62. type(val){
  63. // this.filelist=[];
  64. // this.shtext='';
  65. // this.isty='2';
  66. // this.phofile=[];
  67. }
  68. },
  69. methods:{
  70. bindDateChange(){
  71. var val=e.detail.value;
  72. },
  73. getClose(){
  74. this.$emit('getClose')
  75. },
  76. getSure(){
  77. this.$emit('getSure')
  78. },
  79. getChose(val){
  80. this.peoval=val
  81. },
  82. getPreviewImage(arr,idx){
  83. var newArr=[];
  84. arr.forEach(ite=>{
  85. var ds=this.baseUrl+ite
  86. newArr.push(ds)
  87. })
  88. uni.previewImage({
  89. urls: newArr,
  90. current:idx,
  91. success: function(data) {
  92. },
  93. fail: function(err) {
  94. }
  95. });
  96. },
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. // 指派
  102. .codebox{width: 470rpx;height: 620rpx;background: #FFFFFF;border-radius: 20rpx;
  103. padding: 44rpx 36rpx;position: fixed;left:140rpx;top: 40%;transform: translateY(-235rpx);
  104. }
  105. .closeimg{width: 32rpx;height: 32rpx;position: absolute;bottom: -62rpx;left: 50%;margin-left: -16rpx;}
  106. </style>