后置付费
This commit is contained in:
@@ -42,21 +42,46 @@
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 45%;
|
||||
width: 93%;
|
||||
left: calc((100vw - 96%)/2);
|
||||
height: 420rpx;
|
||||
height: 120rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.02);
|
||||
margin: 20rpx 10rpx 0 10rpx;
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
overflow-y: scroll;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.img-photo {
|
||||
width: 10%;
|
||||
height: 85%;
|
||||
border-radius: 12px;
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
.center :last-child {
|
||||
.img-time {
|
||||
width: 55%;
|
||||
margin-left: 20rpx;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.img-state {
|
||||
width: 20%;
|
||||
margin-left: 10rpx;
|
||||
font-size: 14px;
|
||||
color: #66c5ff;
|
||||
}
|
||||
|
||||
.img-icon {
|
||||
position: absolute;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
right: 15rpx;
|
||||
}
|
||||
|
||||
.center .img:last-child {
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
@@ -4,8 +4,14 @@
|
||||
<view class="back" @tap="goBack()" :style="{'top' : uniMenuInfo.top - 12 + 'px'}"></view>
|
||||
<view class="center" v-if="uniMenuInfo.bottom"
|
||||
:style="{'height': 'calc(100vh - ' + (uniMenuInfo.bottom + 10) + 'px)', 'top': uniMenuInfo.top + 35 + 'px'}">
|
||||
<view class="img" v-for="(item, idx) in imgUrlList" @tap="previewImage(item.aiPhoto)" :key="item.id">
|
||||
<image :src="item.aiPhoto+'?x-oss-process=image/resize,m_lfit,h_800,w_800'" mode="aspectFill" />
|
||||
<view class="img" v-for="(item, idx) in imgUrlList" :key="item.id" @tap="goDisplay(item)">
|
||||
<image class="img-photo"
|
||||
:src="'https://oss.humengfilms.com/' + item.aiPhoto+'?x-oss-process=image/resize,m_lfit,h_800,w_800'"
|
||||
mode="aspectFill" />
|
||||
<view class="img-time">{{item.createTime}}</view>
|
||||
<view class="img-state">{{item.aiPhoto!=null?'生成完成':'生成中'}}</view>
|
||||
<image class="img-icon"
|
||||
src="https://humeng-res.oss-cn-beijing.aliyuncs.com/hm_aigc/applet/right.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -25,9 +31,24 @@
|
||||
mask: true
|
||||
});
|
||||
this.uniMenuInfo = uni.getStorageSync('uniMenuInfo');
|
||||
},
|
||||
onShow() {
|
||||
this.initializeLoading();
|
||||
},
|
||||
methods: {
|
||||
goDisplay(record) {
|
||||
console.log(record)
|
||||
let myPhoto = record.aiPhoto == null?2:1
|
||||
uni.setStorageSync('record', record)
|
||||
uni.navigateTo({
|
||||
url: "../display/display?code=" + record.code + "&templateId=" + record.templateId
|
||||
+ "&mchId=" + record.mchId +"&buyType=" + record.buyType + "&templateSetId=" + record.templateSetId
|
||||
+ "&myPhoto=" + myPhoto,
|
||||
success() {
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
},
|
||||
previewImage(url) {
|
||||
let previewImageList = [];
|
||||
previewImageList.push(url);
|
||||
@@ -46,15 +67,16 @@
|
||||
url: _this.java_http_url + '/applet/smart_camera/getMyAiPhoto',
|
||||
method: 'POST',
|
||||
data: {
|
||||
userId: uni.getStorageSync('userInfo').id
|
||||
userId: uni.getStorageSync('userInfo').id,
|
||||
type: 2
|
||||
},
|
||||
success(res) {
|
||||
console.log('用户生成ai照片', res)
|
||||
if(res.data.code == 200) {
|
||||
_this.imgUrlList = res.data.data;
|
||||
_this.imgUrlList.forEach((el, idx)=> {
|
||||
el.aiPhoto = 'https://oss.humengfilms.com/' + el.aiPhoto
|
||||
})
|
||||
// _this.imgUrlList.forEach((el, idx)=> {
|
||||
// el.aiPhoto = 'https://oss.humengfilms.com/' + el.aiPhoto
|
||||
// })
|
||||
}
|
||||
},
|
||||
complete() {
|
||||
|
||||
Reference in New Issue
Block a user