detailphoto.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view class="padding" style="width: 100%;">
  3. <view class="flex flex-wrap" style="width: 100%;">
  4. <view style="width: 220rpx;height: 160rpx;margin-right: 10rpx;" v-for="(item,index) in order.certificateImg"
  5. :key="index">
  6. <image :src="item" style="width: 100%;height: 100%;" @click="saveImg(item)"></image>
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. id: '',
  16. order: []
  17. }
  18. },
  19. onLoad(e) {
  20. console.log(e)
  21. this.id = e.id
  22. this.getDet()
  23. },
  24. methods: {
  25. // 详情
  26. getDet() {
  27. uni.showLoading({
  28. title: '加载中...'
  29. });
  30. this.$Request.get("/app/orderTaking/queryTakingDetails", {
  31. id: this.id,
  32. }).then(res => {
  33. uni.hideLoading();
  34. if (res.code == 0) {
  35. this.order = res.data
  36. // this.order.gameName = this.order.gameName.split(",");
  37. // this.order.detailsImg = this.order.detailsImg.split(",");
  38. this.order.certificateImg = this.order.certificateImg.split(",");
  39. // this.order.headImg = this.order.headImg.split(",");
  40. // this.order.workImg = this.order.workImg.split(",");
  41. // this.selectFollow()
  42. // uni.hideLoading();
  43. } else {
  44. // this.loading = false;
  45. // uni.hideLoading();
  46. }
  47. this.loading = false;
  48. });
  49. },
  50. saveImg(imgs) {
  51. console.log(imgs)
  52. let that = this;
  53. let imgArr = []
  54. imgArr.push(imgs);
  55. // //预览图片
  56. uni.previewImage({
  57. urls: imgArr,
  58. current: imgArr[0]
  59. });
  60. },
  61. }
  62. }
  63. </script>
  64. <style>
  65. </style>