后置付费

This commit is contained in:
2025-06-03 09:48:31 +08:00
parent 5205361ac0
commit 3b311aa292
5 changed files with 295 additions and 17 deletions

View File

@@ -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() {