| @@ -91,10 +91,11 @@ async function createing(id) { | |||||
| const data = { | const data = { | ||||
| digitalAvatarId: id, | digitalAvatarId: id, | ||||
| userImages: JSON.stringify([myImg]), | userImages: JSON.stringify([myImg]), | ||||
| title: styleData.value.title, | |||||
| }; | }; | ||||
| const res2 = await createPhotoApi(data); | const res2 = await createPhotoApi(data); | ||||
| console.log(res2); | console.log(res2); | ||||
| uni.navigateTo({ | |||||
| uni.reLaunch({ | |||||
| url: `/pages/createing/index?id=${res2.data.id}`, | url: `/pages/createing/index?id=${res2.data.id}`, | ||||
| }); | }); | ||||
| uni.hideLoading(); | uni.hideLoading(); | ||||
| @@ -75,7 +75,7 @@ | |||||
| " | " | ||||
| > | > | ||||
| <view class="top"> | <view class="top"> | ||||
| <text class="name">风格名称</text> | |||||
| <text class="name">{{ item.title }}</text> | |||||
| <view class="time"> | <view class="time"> | ||||
| <text | <text | ||||
| >生成时间 | >生成时间 | ||||
| @@ -11,12 +11,12 @@ | |||||
| @change="getSwiperIndex" | @change="getSwiperIndex" | ||||
| @click="previewImage" | @click="previewImage" | ||||
| ></u-swiper> | ></u-swiper> | ||||
| <view class="uploadBtn grayBtn"> | |||||
| <!-- <view class="uploadBtn grayBtn"> | |||||
| <text>我要让照片说话</text> | <text>我要让照片说话</text> | ||||
| <view class="free"> | <view class="free"> | ||||
| <text>耗金币2枚</text> | <text>耗金币2枚</text> | ||||
| </view> | </view> | ||||
| </view> | |||||
| </view> --> | |||||
| <view @click="downloadImg" class="uploadBtn"> | <view @click="downloadImg" class="uploadBtn"> | ||||
| <text>下载照片</text> | <text>下载照片</text> | ||||
| </view> | </view> | ||||
| @@ -271,7 +271,7 @@ function buyCoin() { | |||||
| // 俩按钮 | // 俩按钮 | ||||
| .uploadBtn { | .uploadBtn { | ||||
| position: relative; | position: relative; | ||||
| margin-top: 40rpx; | |||||
| margin-top: 140rpx; | |||||
| width: 520rpx; | width: 520rpx; | ||||
| height: 100rpx; | height: 100rpx; | ||||
| line-height: 100rpx; | line-height: 100rpx; | ||||
| @@ -190,6 +190,10 @@ async function toCloseStyle() { | |||||
| chooseImage(); | chooseImage(); | ||||
| return; | return; | ||||
| } | } | ||||
| uni.showLoading({ | |||||
| title: "上传中...", | |||||
| mask: true, | |||||
| }); | |||||
| uploadState.value = 3; | uploadState.value = 3; | ||||
| console.log(showImgUrl.value); | console.log(showImgUrl.value); | ||||
| console.log(showImgUrl2.value.path); | console.log(showImgUrl2.value.path); | ||||
| @@ -241,6 +245,7 @@ async function toCloseStyle() { | |||||
| if (res3.code == 200) { | if (res3.code == 200) { | ||||
| // 改变全局的头像 | // 改变全局的头像 | ||||
| userInfoModulesPinia.myAvatar = JSON.parse(moment.data).data.url; | userInfoModulesPinia.myAvatar = JSON.parse(moment.data).data.url; | ||||
| uploadState.value = 1; | |||||
| uni.navigateTo({ | uni.navigateTo({ | ||||
| url: "/pages/uploadPhoto/success", | url: "/pages/uploadPhoto/success", | ||||
| }); | }); | ||||
| @@ -263,6 +268,9 @@ async function toCloseStyle() { | |||||
| icon: "none", | icon: "none", | ||||
| }); | }); | ||||
| }, | }, | ||||
| complete: (complete) => { | |||||
| uni.hideLoading(); | |||||
| }, | |||||
| }); | }); | ||||
| } | } | ||||
| } | } | ||||