congzc 1 year ago
parent
commit
baca4aea78
4 changed files with 14 additions and 5 deletions
  1. +2
    -1
      src/pages/closeStyle/goCreatePhoto.vue
  2. +1
    -1
      src/pages/index/index.vue
  3. +3
    -3
      src/pages/lookPhoto/index.vue
  4. +8
    -0
      src/pages/uploadPhoto/uploadPhoto.vue

+ 2
- 1
src/pages/closeStyle/goCreatePhoto.vue View File

@@ -91,10 +91,11 @@ async function createing(id) {
const data = {
digitalAvatarId: id,
userImages: JSON.stringify([myImg]),
title: styleData.value.title,
};
const res2 = await createPhotoApi(data);
console.log(res2);
uni.navigateTo({
uni.reLaunch({
url: `/pages/createing/index?id=${res2.data.id}`,
});
uni.hideLoading();


+ 1
- 1
src/pages/index/index.vue View File

@@ -75,7 +75,7 @@
"
>
<view class="top">
<text class="name">风格名称</text>
<text class="name">{{ item.title }}</text>
<view class="time">
<text
>生成时间


+ 3
- 3
src/pages/lookPhoto/index.vue View File

@@ -11,12 +11,12 @@
@change="getSwiperIndex"
@click="previewImage"
></u-swiper>
<view class="uploadBtn grayBtn">
<!-- <view class="uploadBtn grayBtn">
<text>我要让照片说话</text>
<view class="free">
<text>耗金币2枚</text>
</view>
</view>
</view> -->
<view @click="downloadImg" class="uploadBtn">
<text>下载照片</text>
</view>
@@ -271,7 +271,7 @@ function buyCoin() {
// 俩按钮
.uploadBtn {
position: relative;
margin-top: 40rpx;
margin-top: 140rpx;
width: 520rpx;
height: 100rpx;
line-height: 100rpx;


+ 8
- 0
src/pages/uploadPhoto/uploadPhoto.vue View File

@@ -190,6 +190,10 @@ async function toCloseStyle() {
chooseImage();
return;
}
uni.showLoading({
title: "上传中...",
mask: true,
});
uploadState.value = 3;
console.log(showImgUrl.value);
console.log(showImgUrl2.value.path);
@@ -241,6 +245,7 @@ async function toCloseStyle() {
if (res3.code == 200) {
// 改变全局的头像
userInfoModulesPinia.myAvatar = JSON.parse(moment.data).data.url;
uploadState.value = 1;
uni.navigateTo({
url: "/pages/uploadPhoto/success",
});
@@ -263,6 +268,9 @@ async function toCloseStyle() {
icon: "none",
});
},
complete: (complete) => {
uni.hideLoading();
},
});
}
}


Loading…
Cancel
Save