@@ -104,6 +104,8 @@ const startCamera = () => { | |||||
audio: false, | audio: false, | ||||
video: { | video: { | ||||
facingMode: "user", | facingMode: "user", | ||||
width: 240, | |||||
height: 350, | |||||
}, | }, | ||||
}) | }) | ||||
.then(success) | .then(success) | ||||
@@ -503,7 +505,7 @@ onUnload(() => { | |||||
.top { | .top { | ||||
display: flex; | display: flex; | ||||
width: 100%; | width: 100%; | ||||
height: 32%; | |||||
height: 25%; | |||||
.example { | .example { | ||||
width: 60%; | width: 60%; | ||||
height: 100%; | height: 100%; | ||||
@@ -536,7 +538,7 @@ onUnload(() => { | |||||
.bottom { | .bottom { | ||||
position: relative; | position: relative; | ||||
width: 100%; | width: 100%; | ||||
height: 68%; | |||||
height: 75%; | |||||
video { | video { | ||||
width: 100%; | width: 100%; | ||||
height: 100%; | height: 100%; | ||||
@@ -655,8 +657,8 @@ onUnload(() => { | |||||
.fromCamera { | .fromCamera { | ||||
position: absolute; | position: absolute; | ||||
top: 110rpx; | top: 110rpx; | ||||
width: 120%; | |||||
height: 60%; | |||||
left: 130rpx; | |||||
width: 200%; | |||||
} | } | ||||
.fromUpload { | .fromUpload { | ||||
position: absolute; | position: absolute; | ||||
@@ -32,8 +32,8 @@ | |||||
<!-- </view> --> | <!-- </view> --> | ||||
<view v-if="createState == 2" class="checkMore">左右滑动查看更多</view> | <view v-if="createState == 2" class="checkMore">左右滑动查看更多</view> | ||||
<view v-if="createState != 2" class="wait"> | <view v-if="createState != 2" class="wait"> | ||||
<view>写真生成中</view> | |||||
<view>稍后您可在“智像小相册”微信小程序中查看</view> | |||||
<view class="creating">写真生成中</view> | |||||
<view class="check">稍后您可在“智像小相册”微信小程序中查看</view> | |||||
</view> | </view> | ||||
<!-- <view | <!-- <view | ||||
@click="subscribe" | @click="subscribe" | ||||
@@ -102,6 +102,10 @@ async function getSwiperList() { | |||||
createState.value = res.data.status; | createState.value = res.data.status; | ||||
if (res.data.photoList) { | if (res.data.photoList) { | ||||
uni.showToast({ | |||||
title: "生成成功!", | |||||
icon: "success", | |||||
}); | |||||
swiperList.value = res.data.photoList; | swiperList.value = res.data.photoList; | ||||
swiperList.value.forEach((item) => { | swiperList.value.forEach((item) => { | ||||
if (item.imageSuper) { | if (item.imageSuper) { | ||||
@@ -259,8 +263,7 @@ function loginOut() { | |||||
uni.navigateTo({ url: "/pages/chooseStyle/index" }); | uni.navigateTo({ url: "/pages/chooseStyle/index" }); | ||||
} else if (res.cancel) { | } else if (res.cancel) { | ||||
console.log("用户点击取消"); | console.log("用户点击取消"); | ||||
userInfoModulesPinia.clearStorage(); | |||||
uni.navigateTo({ url: "/pages/login/index" }); | |||||
showQrCode.value = true; | |||||
} | } | ||||
}, | }, | ||||
}); | }); | ||||
@@ -386,8 +389,13 @@ onUnload(() => { | |||||
} | } | ||||
.checkMore, | .checkMore, | ||||
.wait { | .wait { | ||||
text-align: center; | |||||
color: #ffffff; | color: #ffffff; | ||||
margin-top: 30rpx; | margin-top: 30rpx; | ||||
.creating { | |||||
font-size: 40rpx; | |||||
margin-bottom: 10rpx; | |||||
} | |||||
} | } | ||||
// 俩按钮 | // 俩按钮 | ||||
@@ -48,6 +48,18 @@ | |||||
<view class="orangeBtn" style="margin-top: 60rpx">取 消</view> | <view class="orangeBtn" style="margin-top: 60rpx">取 消</view> | ||||
</view> | </view> | ||||
</u-overlay> | </u-overlay> | ||||
<u-overlay class="overlay" :show="showQrCodeII" opacity="0.9"> | |||||
<view class="content"> | |||||
<view class="imageBox"> | |||||
<image src="../../assets/img/QRCode.jpg" mode="scaleToFill" /> | |||||
</view> | |||||
<text>微信扫码查看我的写真相册</text> | |||||
<view class="orangeBtn" style="margin-top: 100rpx" @click="cancelUplaod" | |||||
>我知道了</view | |||||
> | |||||
</view> | |||||
</u-overlay> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
@@ -150,6 +162,8 @@ async function createing2() { | |||||
//#region 获取二维码 | //#region 获取二维码 | ||||
const qrCode = ref(null); //二维码路径 | const qrCode = ref(null); //二维码路径 | ||||
const showQrCode = ref(false); | const showQrCode = ref(false); | ||||
const showQrCodeII = ref(false); | |||||
async function getQRCode() { | async function getQRCode() { | ||||
uni.showLoading({ | uni.showLoading({ | ||||
title: "加载中", | title: "加载中", | ||||
@@ -317,25 +331,34 @@ function toCamera() { | |||||
} | } | ||||
//#endregion --------------------- | //#endregion --------------------- | ||||
const cancelUplaod = () => { | |||||
showQrCodeII.value = false; | |||||
userInfoModulesPinia.clearStorage(); | |||||
uni.navigateTo({ url: "/pages/login/index" }); | |||||
}; | |||||
//#region 退出登录 | //#region 退出登录 | ||||
function loginOut() { | function loginOut() { | ||||
uni.showModal({ | |||||
title: "是否结束拍摄?", | |||||
content: `您还有${1}次拍摄机会`, | |||||
confirmColor: "#ff4f00", | |||||
confirmText: "再来一套", | |||||
cancelText: "结束拍摄", | |||||
success: function (res) { | |||||
if (res.confirm) { | |||||
console.log("用户点击确定"); | |||||
uni.navigateTo({ url: "/pages/chooseStyle/index" }); | |||||
} else if (res.cancel) { | |||||
console.log("用户点击取消"); | |||||
userInfoModulesPinia.clearStorage(); | |||||
uni.navigateTo({ url: "/pages/login/index" }); | |||||
} | |||||
}, | |||||
}); | |||||
if (userInfoModulesPinia.createTimes) { | |||||
uni.showModal({ | |||||
title: "是否结束拍摄?", | |||||
content: `您还有${userInfoModulesPinia.createTimes}次拍摄机会`, | |||||
confirmColor: "#ff4f00", | |||||
confirmText: "再来一套", | |||||
cancelText: "结束拍摄", | |||||
success: function (res) { | |||||
if (res.confirm) { | |||||
console.log("用户点击确定"); | |||||
uni.navigateTo({ url: "/pages/chooseStyle/index" }); | |||||
} else if (res.cancel) { | |||||
console.log("用户点击取消"); | |||||
showQrCodeII.value = true; | |||||
} | |||||
}, | |||||
}); | |||||
} else { | |||||
showQrCodeII.value = true; | |||||
} | |||||
} | } | ||||
//#endregion --------------------- | //#endregion --------------------- | ||||