12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view class="padding" style="width: 100%;">
- <view class="flex flex-wrap" style="width: 100%;">
- <view style="width: 220rpx;height: 160rpx;margin-right: 10rpx;" v-for="(item,index) in order.workImg" :key="index">
- <image :src="item" style="width: 100%;height: 100%;" @click="saveImg(item)"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- order:[]
- }
- },
- onLoad(e) {
- console.log(e)
- this.id = e.id
- this.getDet()
- },
- methods: {
- // 详情
- getDet() {
- uni.showLoading({
- title: '加载中...'
-
- });
- this.$Request.get("/app/orderTaking/queryTakingDetails", {
- id: this.id,
- }).then(res => {
- uni.hideLoading();
- if (res.code == 0) {
- this.order = res.data
- this.order.workImg = this.order.workImg.split(",");
- }
- this.loading = false;
- });
- },
- saveImg(imgs) {
- console.log(imgs)
- let that = this;
- let imgArr = []
- imgArr.push(imgs);
- // //预览图片
- uni.previewImage({
- urls: imgArr,
- current: imgArr[0]
- });
- },
- }
- }
- </script>
- <style>
- </style>
|