.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
class="record-li"
|
||||
v-for="(item, idx) in recordList"
|
||||
:key="item.id"
|
||||
@click="sheep.$router.go('/pages/user/tryOnPreview', {})"
|
||||
@click="handleJump(item)"
|
||||
>
|
||||
<image :src="item.tryOnResultUrl" mode="widthFix" style="width: 100%" />
|
||||
</li>
|
||||
@@ -24,6 +24,14 @@
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const handleJump = (item) => {
|
||||
uni.setStorageSync('tryOnId', item.id);
|
||||
uni.setStorageSync('modelId', item.modelId);
|
||||
uni.switchTab({
|
||||
url: `/pages/index/room`,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -52,9 +60,10 @@
|
||||
margin-top: 50rpx;
|
||||
.record-li {
|
||||
width: 25%;
|
||||
aspect-ratio: 1/1.4;
|
||||
height: 272rpx;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-3
@@ -24,14 +24,21 @@
|
||||
const tokenCheckTimer = ref(null);
|
||||
const token = ref('');
|
||||
const webviewRef = ref();
|
||||
const webviewUrl = ref(
|
||||
`https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}&t=${Date.now()}`,
|
||||
);
|
||||
const webviewUrl = ref('');
|
||||
|
||||
onShow(async () => {
|
||||
if (!sheep.$store('user').isLogin) {
|
||||
uni.redirectTo({ url: '/pages/login/index' });
|
||||
}
|
||||
const tryOnId = uni.getStorageSync('tryOnId');
|
||||
const modelId = uni.getStorageSync('modelId');
|
||||
if (tryOnId && modelId) {
|
||||
webviewUrl.value = `https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}&t=${Date.now()}&id=${tryOnId}&modelId=${modelId}`;
|
||||
uni.setStorageSync('tryOnId', '');
|
||||
uni.setStorageSync('modelId', '');
|
||||
} else {
|
||||
webviewUrl.value = `https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}&t=${Date.now()}`;
|
||||
}
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
+13
-2
@@ -67,12 +67,13 @@
|
||||
onShow(() => {
|
||||
sheep.$store('user').updateUserData();
|
||||
|
||||
getInfo();
|
||||
getPersonalInfo();
|
||||
getFaceInfo();
|
||||
getTryOnList();
|
||||
});
|
||||
|
||||
const userFormData = ref({});
|
||||
async function getInfo() {
|
||||
async function getPersonalInfo() {
|
||||
const { data } = await UserApi.getInfoByUser();
|
||||
try {
|
||||
const { dataJson } = data;
|
||||
@@ -83,6 +84,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function getFaceInfo() {
|
||||
await UserApi.getFaceInfo({ dataScope: '0' });
|
||||
try {
|
||||
// const { dataJson } = data;
|
||||
// userFormData.value = dataJson ? JSON.parse(dataJson) : {};
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
sheep.$store('user').updateUserData();
|
||||
setTimeout(function () {
|
||||
|
||||
Reference in New Issue
Block a user