sadjv3_jishi/pages/index/game/workphoto.vue

87 lines
1.8 KiB
Vue
Raw Normal View History

2024-06-05 19:14:51 +08:00
<template>
2024-07-02 16:25:38 +08:00
<view class="" style="width: 100%; background: #fff;">
2024-06-05 19:14:51 +08:00
<view class="" style="width: 100%;">
2024-07-02 16:25:38 +08:00
<view class="page-back" v-for="(item,index) in photoList":key="index">
<image :src="item" style="width: 100%; border-radius: 26rpx;" mode="widthFix" @click="saveImg(item)"></image>
2024-06-05 19:14:51 +08:00
</view>
2024-07-01 19:06:00 +08:00
<view class="tabbar" style="background: linear-gradient(to right, #019c88, #2dbe93); border-radius: 50rpx;"
@click="goNav()" >重新上传</view>
2024-06-05 19:14:51 +08:00
</view>
2024-07-01 19:06:00 +08:00
<u-empty v-show="photoList.length==0" icon-size="180" text="暂无生活照片" mode="list"></u-empty>
2024-06-05 19:14:51 +08:00
</view>
</template>
<script>
export default {
data() {
return {
artificerId: '',
photoList: []
}
},
onLoad(e) {
console.log(e)
this.artificerId = e.artificerId
this.getDet()
},
methods: {
2024-07-01 19:06:00 +08:00
goNav(){
uni.navigateTo({
url:'/pages/xingxiangzhao/index'
})
},
2024-06-05 19:14:51 +08:00
// 详情
getDet() {
uni.showLoading({
title: '加载中...'
});
this.$Request.get("/app/artificer/selectArtificerByArtificerId", {
artificerId: this.artificerId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
console.log(res.data);
this.photoList = res.data.lifePhoto.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>
2024-07-01 19:06:00 +08:00
.tabbar {
width: 690upx;
height: 86upx;
background: #019c88;
border-radius: 8upx;
margin: 0 auto;
text-align: center;
line-height: 86upx;
color: #FFFFFF;
margin-top: 20rpx;
}
2024-07-02 16:25:38 +08:00
.page-back{
background: fff;
padding: 30rpx;
}
.page-back img{
border-radius: 30rpx;
}
2024-06-05 19:14:51 +08:00
</style>