feat(fittingRoom): 新增衣服长度选择功能在上传衣服页面增加分类和长度选择功能,支持用户选择衣服类型和具体长度部位。新增 pattern 常量定义各种长度选项,并在 store 中添加相应的状态管理。同时更新了相关样式和组件依赖。
fix(uploadClothes): 修复上传页面分类选择逻辑 调整上传衣服页面的分类选择逻辑,使用 uv-radio-group 实现单选功能,支持衣服类型和长度部位的选择。引入 fittingRoom store 中的 tabs 和 pattern 数据,优化用户交互体验。 chore(deps): 更新 uv-icon 和 uv-radio 组件版本更新 uv-icon 和 uv-radio 组件的 package.json 配置文件,设置版本号为1.0.13。更新 changelog 文档,记录组件的优化和 bug 修复历史。完善组件的平台兼容性配置和依赖关系。 style(components): 调整上传页面样式布局优化上传衣服页面的样式布局,新增 warp、title、container 等样式类,改善分类和长度选择区域的显示效果。调整单选框的间距和对齐方式,提升用户界面的美观性和可用性。
This commit is contained in:
@@ -8,6 +8,10 @@
|
|||||||
fail: () => {},
|
fail: () => {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.updateToken=function(newToken) {
|
||||||
|
console.log('Token updated via global function:', newToken);
|
||||||
|
uni.setStorageSync('token', newToken);
|
||||||
|
}
|
||||||
// 加载Shopro底层依赖
|
// 加载Shopro底层依赖
|
||||||
ShoproInit();
|
ShoproInit();
|
||||||
});
|
});
|
||||||
|
|||||||
+144
-159
@@ -1,36 +1,36 @@
|
|||||||
{
|
{
|
||||||
"name": "商城",
|
"name" : "商城",
|
||||||
"appid": "__UNI__460BC4C",
|
"appid" : "__UNI__4143309",
|
||||||
"description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
|
"description" : "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
|
||||||
"versionName": "2025.09",
|
"versionName" : "2025.09",
|
||||||
"versionCode": "183",
|
"versionCode" : "183",
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueCompiler": "uni-app",
|
"nvueCompiler" : "uni-app",
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion": 3,
|
"compilerVersion" : 3,
|
||||||
"nvueLaunchMode": "fast",
|
"nvueLaunchMode" : "fast",
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
"safearea": {
|
"safearea" : {
|
||||||
"bottom": {
|
"bottom" : {
|
||||||
"offset": "none"
|
"offset" : "none"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": {
|
"modules" : {
|
||||||
"Payment": {},
|
"Payment" : {},
|
||||||
"Share": {},
|
"Share" : {},
|
||||||
"VideoPlayer": {},
|
"VideoPlayer" : {},
|
||||||
"OAuth": {}
|
"OAuth" : {}
|
||||||
},
|
},
|
||||||
"distribute": {
|
"distribute" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"permissions": [
|
"permissions" : [
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||||
@@ -64,174 +64,159 @@
|
|||||||
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
|
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
|
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
|
||||||
],
|
],
|
||||||
"minSdkVersion": 21,
|
"minSdkVersion" : 21,
|
||||||
"schemes": "shopro"
|
"schemes" : "shopro"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"urlschemewhitelist": [
|
"urlschemewhitelist" : [ "baidumap", "iosamap" ],
|
||||||
"baidumap",
|
"dSYMs" : false,
|
||||||
"iosamap"
|
"privacyDescription" : {
|
||||||
],
|
"NSPhotoLibraryUsageDescription" : "需要同意访问您的相册选取图片才能完善该条目",
|
||||||
"dSYMs": false,
|
"NSPhotoLibraryAddUsageDescription" : "需要同意访问您的相册才能保存该图片",
|
||||||
"privacyDescription": {
|
"NSCameraUsageDescription" : "需要同意访问您的摄像头拍摄照片才能完善该条目",
|
||||||
"NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目",
|
"NSUserTrackingUsageDescription" : "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
|
||||||
"NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
|
|
||||||
"NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
|
|
||||||
"NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
|
|
||||||
},
|
},
|
||||||
"urltypes": "shopro",
|
"urltypes" : "shopro",
|
||||||
"capabilities": {
|
"capabilities" : {
|
||||||
"entitlements": {
|
"entitlements" : {
|
||||||
"com.apple.developer.associated-domains": [
|
"com.apple.developer.associated-domains" : [ "applinks:shopro.sheepjs.com" ]
|
||||||
"applinks:shopro.sheepjs.com"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idfa": true
|
"idfa" : true
|
||||||
},
|
},
|
||||||
"sdkConfigs": {
|
"sdkConfigs" : {
|
||||||
"speech": {},
|
"speech" : {},
|
||||||
"ad": {},
|
"ad" : {},
|
||||||
"oauth": {
|
"oauth" : {
|
||||||
"apple": {},
|
"apple" : {},
|
||||||
"weixin": {
|
"weixin" : {
|
||||||
"appid": "wxae7a0c156da9383b",
|
"appid" : "wxae7a0c156da9383b",
|
||||||
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"payment": {
|
"payment" : {
|
||||||
"weixin": {
|
"weixin" : {
|
||||||
"__platform__": [
|
"__platform__" : [ "ios", "android" ],
|
||||||
"ios",
|
"appid" : "wxae7a0c156da9383b",
|
||||||
"android"
|
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
||||||
],
|
|
||||||
"appid": "wxae7a0c156da9383b",
|
|
||||||
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
|
||||||
},
|
},
|
||||||
"alipay": {
|
"alipay" : {
|
||||||
"__platform__": [
|
"__platform__" : [ "ios", "android" ]
|
||||||
"ios",
|
|
||||||
"android"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"share": {
|
"share" : {
|
||||||
"weixin": {
|
"weixin" : {
|
||||||
"appid": "wxae7a0c156da9383b",
|
"appid" : "wxae7a0c156da9383b",
|
||||||
"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
"UniversalLinks" : "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"orientation": [
|
"orientation" : [ "portrait-primary" ],
|
||||||
"portrait-primary"
|
"splashscreen" : {
|
||||||
],
|
"androidStyle" : "common",
|
||||||
"splashscreen": {
|
"iosStyle" : "common",
|
||||||
"androidStyle": "common",
|
"useOriginalMsgbox" : true
|
||||||
"iosStyle": "common",
|
|
||||||
"useOriginalMsgbox": true
|
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"hdpi": "unpackage/res/icons/72x72.png",
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad": {
|
"ipad" : {
|
||||||
"app": "unpackage/res/icons/76x76.png",
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
"app@2x": "unpackage/res/icons/152x152.png",
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
"notification": "unpackage/res/icons/20x20.png",
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
"settings": "unpackage/res/icons/29x29.png",
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"spotlight": "unpackage/res/icons/40x40.png",
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone": {
|
"iphone" : {
|
||||||
"app@2x": "unpackage/res/icons/120x120.png",
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
"app@3x": "unpackage/res/icons/180x180.png",
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"quickapp": {},
|
"quickapp" : {},
|
||||||
"quickapp-native": {
|
"quickapp-native" : {
|
||||||
"icon": "/static/logo.png",
|
"icon" : "/static/logo.png",
|
||||||
"package": "com.example.demo",
|
"package" : "com.example.demo",
|
||||||
"features": [
|
"features" : [
|
||||||
{
|
{
|
||||||
"name": "system.clipboard"
|
"name" : "system.clipboard"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"quickapp-webview": {
|
"quickapp-webview" : {
|
||||||
"icon": "/static/logo.png",
|
"icon" : "/static/logo.png",
|
||||||
"package": "com.example.demo",
|
"package" : "com.example.demo",
|
||||||
"minPlatformVersion": 1070,
|
"minPlatformVersion" : 1070,
|
||||||
"versionName": "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode": 100
|
"versionCode" : 100
|
||||||
},
|
},
|
||||||
"mp-weixin": {
|
"mp-weixin" : {
|
||||||
"appid": "wx736793c30c956243",
|
"appid" : "wx736793c30c956243",
|
||||||
"setting": {
|
"setting" : {
|
||||||
"urlCheck": false,
|
"urlCheck" : false,
|
||||||
"minified": true,
|
"minified" : true,
|
||||||
"postcss": true
|
"postcss" : true
|
||||||
},
|
},
|
||||||
"optimization": {
|
"optimization" : {
|
||||||
"subPackages": true
|
"subPackages" : true
|
||||||
},
|
},
|
||||||
"plugins": {},
|
"plugins" : {},
|
||||||
"lazyCodeLoading": "requiredComponents",
|
"lazyCodeLoading" : "requiredComponents",
|
||||||
"usingComponents": {},
|
"usingComponents" : {},
|
||||||
"permission": {},
|
"permission" : {},
|
||||||
"requiredPrivateInfos": [
|
"requiredPrivateInfos" : [ "chooseAddress" ]
|
||||||
"chooseAddress"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"mp-alipay": {
|
"mp-alipay" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-baidu": {
|
"mp-baidu" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-toutiao": {
|
"mp-toutiao" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-jd": {
|
"mp-jd" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"h5": {
|
"h5" : {
|
||||||
"template": "index.html",
|
"template" : "index.html",
|
||||||
"router": {
|
"router" : {
|
||||||
"mode": "history",
|
"mode" : "history",
|
||||||
"base": "/"
|
"base" : "/"
|
||||||
},
|
},
|
||||||
"sdkConfigs": {
|
"sdkConfigs" : {
|
||||||
"maps": {}
|
"maps" : {}
|
||||||
},
|
},
|
||||||
"async": {
|
"async" : {
|
||||||
"timeout": 20000
|
"timeout" : 20000
|
||||||
},
|
},
|
||||||
"title": "商城",
|
"title" : "商城",
|
||||||
"optimization": {
|
"optimization" : {
|
||||||
"treeShaking": {
|
"treeShaking" : {
|
||||||
"enable": true
|
"enable" : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vueVersion": "3",
|
"vueVersion" : "3",
|
||||||
"_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639",
|
"_spaceID" : "192b4892-5452-4e1d-9f09-eee1ece40639",
|
||||||
"locale": "zh-Hans",
|
"locale" : "zh-Hans",
|
||||||
"fallbackLocale": "zh-Hans"
|
"fallbackLocale" : "zh-Hans"
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,27 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: liguigong liguigong@shopline.com
|
* @Author: liguigong liguigong@shopline.com
|
||||||
* @Date: 2025-09-26 19:17:18
|
* @Date: 2025-09-26 19:17:18
|
||||||
* @LastEditors: liguigong liguigong@shopline.com
|
* @LastEditors:
|
||||||
* @LastEditTime: 2025-09-26 19:31:15
|
* @LastEditTime: 2025-09-27 16:38:42
|
||||||
* @FilePath: pages/fittingRoom/components/Clothespic.vue
|
* @FilePath: pages/fittingRoom/components/Clothespic.vue
|
||||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<view class="clothes-box">
|
<view class="clothes-box">
|
||||||
<view></view>
|
<view v-for="item in fittingRoomStore.currentClothes" class="clothes-pic">
|
||||||
|
<image class="pic" :src="item.fileUrl" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
<view class="btn" @click="tryItOn">试穿</view>
|
<view class="btn" @click="tryItOn">试穿</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
function tryItOn() {}
|
import sheep from '@/sheep';
|
||||||
|
|
||||||
|
const fittingRoomStore = sheep.$store('fittingRoom');
|
||||||
|
function tryItOn() {
|
||||||
|
fittingRoomStore.tryOn()
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.clothes-box {
|
.clothes-box {
|
||||||
@@ -29,6 +37,16 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
.clothes-pic {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
.pic {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
.btn {
|
.btn {
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
background: #000;
|
background: #000;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: liguigong liguigong@shopline.com
|
* @Author: liguigong liguigong@shopline.com
|
||||||
* @Date: 2025-09-19 16:26:36
|
* @Date: 2025-09-19 16:26:36
|
||||||
* @LastEditors: liguigong liguigong@shopline.com
|
* @LastEditors:
|
||||||
* @LastEditTime: 2025-09-26 18:21:04
|
* @LastEditTime: 2025-09-27 16:37:29
|
||||||
* @FilePath: pages/fittingRoom/components/s-grid-clothes.vue
|
* @FilePath: pages/fittingRoom/components/s-grid-clothes.vue
|
||||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||||
-->
|
-->
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
<uni-grid-item
|
<uni-grid-item
|
||||||
v-for="(item, index) in fittingRoomStore.clothes"
|
v-for="(item, index) in fittingRoomStore.clothes"
|
||||||
:key="index"
|
:key="index"
|
||||||
:index="index + 100"
|
:index="item"
|
||||||
>
|
>
|
||||||
<view class="grid-item-box" style="background-color: #fff">
|
<view class="grid-item-box" style="background-color: #fff">
|
||||||
<view v-if="index == 3" class="inUse">
|
<view v-if="fittingRoomStore.currentClothes.some(v => v.clothId === item.clothId)" class="inUse">
|
||||||
<view class="edit" @click="goEdit(item)">编辑</view>
|
<view class="edit" @click="goEdit(item)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function change(e) {
|
function change(e) {
|
||||||
fittingRoomStore.changeClothes();
|
fittingRoomStore.changeClothes(e.detail.index);
|
||||||
console.log('🚀 ~ change 🐶63 ~ index: ', e.detail.index);
|
console.log('🚀 ~ change 🐶63 ~ index: ', e.detail.index);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
import Clothespic from './components/Clothespic.vue'; // 隐藏原生tabBar
|
import Clothespic from './components/Clothespic.vue'; // 隐藏原生tabBar
|
||||||
|
|
||||||
const fittingRoomStore = sheep.$store('fittingRoom');
|
const fittingRoomStore = sheep.$store('fittingRoom');
|
||||||
uni.setStorageSync('token', '42be01f1a6c54ea591c991b5da0977c0');
|
|
||||||
sheep.$helper.toast('请选择是否同意协议');
|
sheep.$helper.toast('请选择是否同意协议');
|
||||||
// 隐藏原生tabBar
|
// 隐藏原生tabBar
|
||||||
uni.hideTabBar({
|
uni.hideTabBar({
|
||||||
@@ -110,6 +110,8 @@
|
|||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
uni.setStorageSync('token', options?.token ?? 'e84526c0f7a3457da54e663fb4396beb');
|
||||||
|
console.log("🚀 ~ URL上的token ~ options?.token: ", options?.token);
|
||||||
// 预览模板
|
// 预览模板
|
||||||
if (options.templateId) {
|
if (options.templateId) {
|
||||||
sheep.$store('app').init(options.templateId);
|
sheep.$store('app').init(options.templateId);
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
|
|
||||||
function deleteClothes() {
|
function deleteClothes() {
|
||||||
FittingRoomApi.deleteCloth({ id: clothesId.value }).then((res) => {
|
FittingRoomApi.deleteCloth({ id: clothesId.value }).then((res) => {
|
||||||
|
fittingRoomStore.currentClothes = []
|
||||||
sheep.$router.go('/pages/fittingRoom/index');
|
sheep.$router.go('/pages/fittingRoom/index');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @Author: liguigong liguigong@shopline.com
|
* @Author: liguigong liguigong@shopline.com
|
||||||
* @Date: 2025-09-23 09:41:10
|
* @Date: 2025-09-23 09:41:10
|
||||||
* @LastEditors: liguigong liguigong@shopline.com
|
* @LastEditors:
|
||||||
* @LastEditTime: 2025-09-26 17:56:13
|
* @LastEditTime: 2025-09-27 15:48:31
|
||||||
* @FilePath: sheep/api/fittingRoom/index.js
|
* @FilePath: sheep/api/fittingRoom/index.js
|
||||||
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
* @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
|
||||||
*/
|
*/
|
||||||
@@ -133,6 +133,14 @@ const FittingRoomApi = {
|
|||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//试穿
|
||||||
|
tryOnApi: (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/digital/on-record/create',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
addHairApi: (data) => {
|
addHairApi: (data) => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import app from './app';
|
import app from './app';
|
||||||
import FittingRoomApi from '../api/fittingRoom';
|
import FittingRoomApi from '../api/fittingRoom';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
|
||||||
const _tabsMap = [undefined, 'topCloth', 'bottomCloth', 'dress', 'suit', 'hair'];
|
const _tabsMap = [undefined, 'topCloth', 'bottomCloth', 'dress', 'suit', 'hair'];
|
||||||
|
|
||||||
@@ -96,7 +97,28 @@ const fittingRoom = defineStore({
|
|||||||
let modelList = (httpResponse.result || []).slice(0, 4);
|
let modelList = (httpResponse.result || []).slice(0, 4);
|
||||||
this.modelList = modelList;
|
this.modelList = modelList;
|
||||||
this.currentModel = modelList?.[0] ?? {};
|
this.currentModel = modelList?.[0] ?? {};
|
||||||
this.getTestResults(modelList?.[0].id);
|
this.getTestResults(modelList?.[0]?.id);
|
||||||
|
},
|
||||||
|
// 试穿
|
||||||
|
async tryOn() {
|
||||||
|
if (!this.currentModel?.id) {
|
||||||
|
sheep.$helper.toast('请选择模特');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.currentClothes?.[0]?.fileUrl) {
|
||||||
|
sheep.$helper.toast('请选择衣服');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const httpResponse = await FittingRoomApi.tryOnApi({
|
||||||
|
"modelId": this.currentModel.id,
|
||||||
|
"modelImageUrl": this.currentModel.fileUrl,
|
||||||
|
"clothingImageUrl": this.currentClothes[0]?.fileUrl,
|
||||||
|
});
|
||||||
|
if (httpResponse.code !== 0) {
|
||||||
|
sheep.$helper.toast(httpResponse.msg);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.getTestResults(this.currentModel.id)
|
||||||
},
|
},
|
||||||
// 切换模特
|
// 切换模特
|
||||||
switchModels(item) {
|
switchModels(item) {
|
||||||
@@ -139,7 +161,9 @@ const fittingRoom = defineStore({
|
|||||||
this.getCloths();
|
this.getCloths();
|
||||||
},
|
},
|
||||||
// 点击衣服
|
// 点击衣服
|
||||||
changeClothes() {
|
changeClothes(data) {
|
||||||
|
console.log("🚀 ~ changeClothes ~ data: ", data);
|
||||||
|
this.currentClothes = [data];
|
||||||
console.log('切换衣服');
|
console.log('切换衣服');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user