diff --git a/src/assets/img/QRCode.jpg b/src/assets/img/QRCode.jpg
new file mode 100644
index 0000000..1624af5
Binary files /dev/null and b/src/assets/img/QRCode.jpg differ
diff --git a/src/pages/camera/index.vue b/src/pages/camera/index.vue
index 6fc3d43..4bb3ab3 100644
--- a/src/pages/camera/index.vue
+++ b/src/pages/camera/index.vue
@@ -351,7 +351,9 @@ const uoloadImageAws = async (file, data) => {
duration: 1500,
});
setTimeout(() => {
+ // 将拍照照片地址存储到本地并清空上传照片地址
uni.setStorageSync("CcurrentUrl", data.data.url);
+ uni.setStorageSync("UcurrentUrl", null);
uni.navigateTo({
url: `/pages/createing/index?imageUrl=${data.data.url}&id=${modelId.value}`,
});
@@ -416,6 +418,9 @@ const refreshUploadStatus = async (id) => {
isShowCanvas.value = false;
isSuccess.value = true;
isUpload.value = true;
+
+ // 将上传照片地址存储到本地并清空拍照照片地址
+ uni.setStorageSync("CcurrentUrl", null);
uni.setStorageSync("UcurrentUrl", UimgSrc.value);
}
} catch (error) {
diff --git a/src/pages/created/index.vue b/src/pages/created/index.vue
index 42af967..7518605 100644
--- a/src/pages/created/index.vue
+++ b/src/pages/created/index.vue
@@ -37,6 +37,18 @@
> -->
重新选择
退出登录
+
+
+
+
+
+
+ 您的次数已用完,微信扫码可以查看作品哦
+ 我知道了
+
+
@@ -56,6 +68,8 @@ const userInfoModulesPinia = userInfoModules();
//#region 轮播图
const createState = ref(1); //制作状态:1生成中,2完成,3失败
const workId = ref(null); //作品id
+const showQrCode = ref(false);
+const QRCodeUrl = ref("");
onLoad(async (options) => {
workId.value = options.id;
@@ -117,10 +131,21 @@ function previewImage(index) {
//#region 页面跳转
function goChooseStyle() {
- uni.navigateTo({
- url: "/pages/chooseStyle/index",
- });
+ if (userInfoModulesPinia.createTimes) {
+ uni.navigateTo({
+ url: "/pages/chooseStyle/index",
+ });
+ } else {
+ showQrCode.value = true;
+ }
}
+
+const cancelUplaod = () => {
+ showQrCode.value = false;
+ userInfoModulesPinia.clearStorage();
+ uni.navigateTo({ url: "/pages/login/index" });
+};
+
//#endregion ---------------------
//#region 超分相关
@@ -419,4 +444,44 @@ onUnload(() => {
}
z-index: 9;
}
+.overlay {
+ .content {
+ width: 100%;
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ text-align: center;
+ .imageBox {
+ position: relative;
+ margin-top: 200rpx;
+ width: 500rpx;
+ height: 500rpx;
+ border-radius: 30rpx;
+ background-color: #fff;
+ .mask {
+ position: absolute;
+ width: 500rpx;
+ height: 500rpx;
+ border-radius: 30rpx;
+ background-color: rgba($color: #000000, $alpha: 0.7);
+ z-index: 2;
+ }
+ image {
+ width: 500rpx;
+ height: 500rpx;
+ border-radius: 30rpx;
+ background-color: #fff;
+ }
+ }
+ text {
+ margin-top: 20rpx;
+ font-weight: 900;
+ font-size: 32rpx;
+ }
+ // .orangeBtn {
+ // margin-top: 100rpx;
+ // }
+ }
+}
diff --git a/src/store/modules/userInfo.js b/src/store/modules/userInfo.js
index 3e39805..b014fe1 100644
--- a/src/store/modules/userInfo.js
+++ b/src/store/modules/userInfo.js
@@ -40,8 +40,8 @@ export const userInfoModules = defineStore("userInfoStore", () => {
uni.setStorageSync("createTimes", 0);
uni.setStorageSync("phone", null);
uni.setStorageSync("UserId", null);
- uni.clearStorageSync("CcurrentUrl")
- uni.clearStorageSync("UcurrentUrl")
+ uni.setStorageSync("CcurrentUrl", null)
+ uni.setStorageSync("UcurrentUrl", null)
}
return { token, phone, createTimes, clearStorage };
},