diff --git a/src/pages/closeStyle/closeStyle copy.vue b/src/pages/closeStyle/closeStyle copy.vue deleted file mode 100644 index aa23b90..0000000 --- a/src/pages/closeStyle/closeStyle copy.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - - - diff --git a/src/pages/closeStyle/goCreatePhoto.vue b/src/pages/closeStyle/goCreatePhoto.vue index a8cd5e8..ca8f089 100644 --- a/src/pages/closeStyle/goCreatePhoto.vue +++ b/src/pages/closeStyle/goCreatePhoto.vue @@ -95,8 +95,8 @@ async function createing(id) { }; const res2 = await createPhotoApi(data); console.log(res2); - uni.reLaunch({ - url: `/pages/createing/index?id=${res2.data.id}`, + uni.navigateTo({ + url: `/pages/lookPhoto/index?id=${res2.data.id}`, }); uni.hideLoading(); } catch (error) { diff --git a/src/pages/closeStyle/multiplayer copy 2.vue b/src/pages/closeStyle/multiplayer copy 2.vue deleted file mode 100644 index 6ad56b8..0000000 --- a/src/pages/closeStyle/multiplayer copy 2.vue +++ /dev/null @@ -1,253 +0,0 @@ - - - - - diff --git a/src/pages/closeStyle/multiplayer copy.vue b/src/pages/closeStyle/multiplayer copy.vue deleted file mode 100644 index bcd0e10..0000000 --- a/src/pages/closeStyle/multiplayer copy.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - diff --git a/src/pages/closeStyle/multiplayer.vue b/src/pages/closeStyle/multiplayer.vue index 5fa3e4e..24a5bfc 100644 --- a/src/pages/closeStyle/multiplayer.vue +++ b/src/pages/closeStyle/multiplayer.vue @@ -321,6 +321,7 @@ async function createing(id) { myImgList.push(item.url); }); const data = { + title: styleData.value.title, digitalAvatarId: id, userImages: styleData.value.mouldType == 2 @@ -331,7 +332,7 @@ async function createing(id) { console.log(res2); uni.hideLoading(); uni.navigateTo({ - url: `/pages/createing/index?id=${res2.data.id}`, + url: `/pages/lookPhoto/index?id=${res2.data.id}`, }); } catch (error) { console.log(error); diff --git a/src/pages/createing/index.vue b/src/pages/createing/index.vue index ab6e3cf..a3e3e6e 100644 --- a/src/pages/createing/index.vue +++ b/src/pages/createing/index.vue @@ -7,31 +7,6 @@ 更换风格 - - { if (userInfoModulesPinia.platForm == 1) { return "page pageH5"; @@ -391,9 +390,9 @@ async function loginByCode() { icon: "none", }); } else { - uni.switchTab({ - url: "/pages/uploadPhoto/uploadPhoto", - }); + // uni.switchTab({ + // url: "/pages/uploadPhoto/uploadPhoto", + // }); } } catch (error) { uni.hideLoading(); @@ -405,13 +404,14 @@ async function loginByCode() { } //#endregion --------------------- +//#region 隐私协议 const getPrivacySetting = (num) => { const canIUsePrivacy = wx.canIUse("getPrivacySetting"); - console.log(canIUsePrivacy, "canIUse getPrivacySetting"); + // console.log(canIUsePrivacy, "canIUse getPrivacySetting"); if (canIUsePrivacy) { wx.getPrivacySetting({ success: (res) => { - console.log(res, "getPrivacySetting"); // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' } + // console.log(res, "getPrivacySetting"); // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' } if (res.needAuthorization) { // 需要弹出隐私协议 showPrivacy.value = true; @@ -419,9 +419,9 @@ const getPrivacySetting = (num) => { // 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用已声明过的隐私接口 if (num == 1) { // 返回token,直接跳转首页 - uni.switchTab({ - url: "/pages/uploadPhoto/uploadPhoto", - }); + // uni.switchTab({ + // url: "/pages/uploadPhoto/uploadPhoto", + // }); } else if (num == 2) { // 没有返回token,无事发生 } @@ -439,7 +439,7 @@ const closePrivacy = () => { }; const handleAgreePrivacyAuthorization = () => { - console.log("Privacy Agreed!"); + // console.log("Privacy Agreed!"); showPrivacy.value = false; // 用户同意隐私协议事件回调 // 用户点击了同意,之后所有已声明过的隐私接口和组件都可以调用了 @@ -453,20 +453,25 @@ const handleOpenPrivacyContract = () => { complete: () => {}, }); }; +//#endregion --------------------------------- -//#region //#region 初始化 const urlUid = ref(""); //通过邀请来的会携带邀请人ID参数 onLoad((options) => { - if (options.userId) { + // 二维码扫描进入时 + if (options.scene) { + const str = decodeURIComponent(options.scene); + const regex = /_u:(\d+)/; // 正则表达式匹配_u:后面的数字 + const match = str.match(regex); + urlUid.value = match[1]; + } + // 分享链接进入时 + else if (options.userId) { urlUid.value = options.userId; - uni.showToast({ - title: `Uid获取成功!(${options.userId})`, - icon: "none", - }); } else { urlUid.value = null; } + console.log(urlUid.value, "邀请人id"); uni.hideHomeButton(); // workId.value = options.id; diff --git a/src/pages/lookPhoto/index.vue b/src/pages/lookPhoto/index.vue index 42560ed..dfd10db 100644 --- a/src/pages/lookPhoto/index.vue +++ b/src/pages/lookPhoto/index.vue @@ -2,6 +2,7 @@ - 左右滑动查看更多 + + 左右滑动查看更多 + 生成中,请稍后... + {{ supperTips() }} --> + - + 邀请好友可获得2枚金币 - + @@ -61,6 +72,7 @@ import { //#endregion const userInfoModulesPinia = userInfoModules(); //#region 轮播图 +const createState = ref(null); //制作状态:1生成中,2完成,3失败 const workId = ref(null); //作品id onLoad(async (options) => { workId.value = options.id; @@ -72,15 +84,17 @@ const previewImageList = ref([]); //预览图片列表 async function getSwiperList() { const res = await getPhotoListApi(workId.value); - console.log(res.data.photoList); - swiperList.value = res.data.photoList; - swiperList.value.forEach((item) => { - if (item.imageSuper) { - previewImageList.value.push(item.imageSuper); - } else { - previewImageList.value.push(item.image); - } - }); + createState.value = res.data.status; + if (res.data.photoList) { + swiperList.value = res.data.photoList; + swiperList.value.forEach((item) => { + if (item.imageSuper) { + previewImageList.value.push(item.imageSuper); + } else { + previewImageList.value.push(item.image); + } + }); + } } //#endregion --------------------- @@ -246,6 +260,11 @@ function buyCoin() { }); } } +function goChooseStyle() { + uni.navigateTo({ + url: "/pages/closeStyle/closeStyle", + }); +} //#endregion --------------------- //#region 超分相关 @@ -402,7 +421,13 @@ async function getUserQrcode() { } } -.checkMore { +.logo { + width: 520rpx; + margin: 90rpx; +} + +.checkMore, +.wait { color: #ffffff; margin-top: 30rpx; } @@ -411,7 +436,6 @@ async function getUserQrcode() { .uploadBtn { position: relative; margin-top: 100rpx; - margin-bottom: 200rpx; width: 520rpx; height: 100rpx; line-height: 100rpx; @@ -455,6 +479,7 @@ async function getUserQrcode() { } } .grayBtn { + margin-bottom: 220rpx; .free { position: absolute; color: #fff; @@ -477,7 +502,7 @@ async function getUserQrcode() { bottom: 60rpx; width: 100%; display: flex; - justify-content: space-between; + justify-content: space-evenly; padding: 65rpx 40rpx 0; .tips { position: absolute; diff --git a/src/pages/uploadPhoto/uploadPhoto.vue b/src/pages/uploadPhoto/uploadPhoto.vue index 4c75387..dcdfef7 100644 --- a/src/pages/uploadPhoto/uploadPhoto.vue +++ b/src/pages/uploadPhoto/uploadPhoto.vue @@ -22,15 +22,15 @@ diff --git a/src/utils/share.js b/src/utils/share.js index 2612fcd..47f7454 100644 --- a/src/utils/share.js +++ b/src/utils/share.js @@ -2,7 +2,7 @@ export default { onShareAppMessage() { return { title: "邃芒智像", - path: `/pages/login/index?type=in&userId=${uni.getStorageSync('userId')}`, + path: `/pages/login/index?userId=${uni.getStorageSync('userId')}`, }; }, @@ -11,7 +11,7 @@ export default { onShareTimeline() { return { title: "邃芒智像", - path: `/pages/login/index?type=in&userId=${uni.getStorageSync('userId')}`, + path: `/pages/login/index?userId=${uni.getStorageSync('userId')}`, }; },