搜索框查询
|
|
@ -14,3 +14,18 @@
|
|||
package-lock.json
|
||||
yarn.lock
|
||||
|
||||
|
||||
# 微信小程序CI上传密钥(敏感文件,禁止提交)
|
||||
private.key
|
||||
|
||||
# 可选:如果有测试环境的密钥文件,也一起忽略
|
||||
private-test.key
|
||||
|
||||
# 其他小程序开发常见忽略项(建议一并添加,避免冗余文件提交)
|
||||
node_modules/
|
||||
dist/
|
||||
unpackage/
|
||||
.DS_Store
|
||||
*.log
|
||||
.vscode/
|
||||
.project
|
||||
|
|
|
|||
|
|
@ -287,11 +287,12 @@ export function getBrandList(params) {
|
|||
}
|
||||
|
||||
// 获取品牌树状结构
|
||||
export function getBrandTree(storeId) {
|
||||
export function getBrandTree(storeId, brandName) {
|
||||
return request8081({
|
||||
baseUrl: 'http://193.112.94.36:8081',
|
||||
baseUrl: 'http://192.168.0.7:8081',
|
||||
url: `/mall/brand/getTree/${storeId}`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: { brandName }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -325,11 +326,12 @@ export function addClassification(data) {
|
|||
}
|
||||
|
||||
// 获取分类树状结构
|
||||
export function getClassificationTree(storeId) {
|
||||
export function getClassificationTree(storeId, classificationName) {
|
||||
return request8081({
|
||||
baseUrl: 'http://193.112.94.36:8081',
|
||||
baseUrl: 'http://192.168.0.7:8081',
|
||||
url: `/mall/classification/getTree/${storeId}`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: { classificationName }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
const ci = require('miniprogram-ci');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// 配置项(必须改!)
|
||||
const config = {
|
||||
appid: 'wx9393bde462d9805a', // 替换成你的正式小程序AppID
|
||||
// 替换成你的密钥文件路径(比如 private.wx9393bde462d9805a.key)
|
||||
privateKeyPath: path.resolve(__dirname, './private.wx9393bde462d9805a.key'),
|
||||
projectPath: path.resolve(__dirname, './unpackage/dist/dev/mp-weixin'),
|
||||
version: '1.0.0',
|
||||
desc: '自动化上传测试',
|
||||
// ci-script.js 中的 setting 配置
|
||||
setting: {
|
||||
es6: true,
|
||||
es7: true,
|
||||
minify: true, // 基础压缩
|
||||
minifyJS: true, // 压缩JS(移除注释、空格、变量名混淆)
|
||||
minifyWXSS: true, // 压缩样式(合并重复样式、移除空格)
|
||||
minifyXML: true, // 压缩配置文件(app.json/page.json)
|
||||
autoPrefixWXSS: true,
|
||||
codeProtect: false, // 关闭代码保护(保护会增加体积)
|
||||
ignoreUnusedFiles: true, // 自动忽略未引用的文件
|
||||
disableUseStrict: true, // 禁用"use strict"减少JS体积
|
||||
disableShowSourceMap: true // 关闭sourcemap(调试文件占体积)
|
||||
},
|
||||
previewQrOutputPath: path.resolve(__dirname, './preview-qr.png'),
|
||||
onProgressUpdate: (res) => {
|
||||
console.log(`进度:${res.progress}%,状态:${res.status}`);
|
||||
}
|
||||
};
|
||||
|
||||
// 上传代码方法
|
||||
async function uploadCode() {
|
||||
try {
|
||||
if (!fs.existsSync(config.privateKeyPath)) {
|
||||
throw new Error(`密钥文件不存在:${config.privateKeyPath}`);
|
||||
}
|
||||
const project = new ci.Project({
|
||||
appid: config.appid,
|
||||
type: 'miniProgram',
|
||||
projectPath: config.projectPath,
|
||||
privateKeyPath: config.privateKeyPath,
|
||||
ignores: ['node_modules/**/*'],
|
||||
});
|
||||
const uploadResult = await ci.upload({
|
||||
project,
|
||||
version: config.version,
|
||||
desc: config.desc,
|
||||
setting: config.setting,
|
||||
onProgressUpdate: config.onProgressUpdate,
|
||||
});
|
||||
console.log('✅ 代码上传成功:', uploadResult);
|
||||
} catch (error) {
|
||||
console.error('❌ 上传失败:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// 执行上传
|
||||
uploadCode();
|
||||
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
// 应用版本
|
||||
version: "1.2.0",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png",
|
||||
logo: "http://193.112.94.36:8099/static/images/logo.png",
|
||||
// 官方网站
|
||||
site_url: "http://ruoyi.vip",
|
||||
// 政策协议
|
||||
|
|
|
|||
|
|
@ -59,16 +59,16 @@
|
|||
"subPackages" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"networkTimeout": {
|
||||
"request": 10000,
|
||||
"connectSocket": 10000,
|
||||
"uploadFile": 10000,
|
||||
"downloadFile": 10000
|
||||
"networkTimeout" : {
|
||||
"request" : 10000,
|
||||
"connectSocket" : 10000,
|
||||
"uploadFile" : 10000,
|
||||
"downloadFile" : 10000
|
||||
}
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"h5" : {
|
||||
"template" : "static/index.html",
|
||||
"template" : "http://193.112.94.36:8099/static/images/index.html",
|
||||
"devServer" : {
|
||||
"port" : 9090,
|
||||
"https" : false
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"miniprogram-ci": "^2.1.26"
|
||||
}
|
||||
}
|
||||
|
|
@ -198,4 +198,4 @@
|
|||
"navigationBarTitleText": "RuoYi",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,16 +12,21 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<view class="search-box">
|
||||
<input
|
||||
class="search-input"
|
||||
type="text"
|
||||
placeholder="搜索品牌名称"
|
||||
v-model="searchKeyword"
|
||||
/>
|
||||
<!-- 搜索框(增加层级隔离+样式重置) -->
|
||||
<view class="search-bar">
|
||||
<view class="search-input">
|
||||
<uni-icons class="search-icon" type="search" size="20" color="#CCCCCC"></uni-icons>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="搜索品牌名称"
|
||||
placeholder-class="input-placeholder"
|
||||
v-model="searchKeyword"
|
||||
class="input"
|
||||
@input="handleSearchInput"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 品牌列表 -->
|
||||
<view class="brand-list">
|
||||
<view
|
||||
|
|
@ -34,7 +39,7 @@
|
|||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 品牌管理入口 -->
|
||||
<view class="brand-management" @click="handleToBrandManagement">
|
||||
<text class="management-text">品牌管理</text>
|
||||
|
|
@ -47,18 +52,9 @@
|
|||
export default {
|
||||
name: 'BrandSelector',
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
defaultValue: {
|
||||
type: String,
|
||||
default: '默认品牌'
|
||||
},
|
||||
brandList: {
|
||||
type: Array,
|
||||
default: () => [{ name: '默认品牌' }]
|
||||
}
|
||||
visible: { type: Boolean, default: false },
|
||||
defaultValue: { type: String, default: '默认品牌' },
|
||||
brandList: { type: Array, default: () => [{ name: '默认品牌' }] }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -75,7 +71,7 @@ export default {
|
|||
filteredBrandList() {
|
||||
if (!this.searchKeyword) return this.brandList
|
||||
return this.brandList.filter(item =>
|
||||
item.name.includes(this.searchKeyword)
|
||||
item.name.toLowerCase().includes(this.searchKeyword.toLowerCase())
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
@ -92,12 +88,16 @@ export default {
|
|||
},
|
||||
handleToBrandManagement() {
|
||||
this.$emit('toBrandManagement')
|
||||
},
|
||||
handleSearchInput(e) {
|
||||
this.searchKeyword = e.detail.value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 基础遮罩层
|
||||
.brand-selector-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
|
@ -110,75 +110,114 @@ export default {
|
|||
z-index: 999;
|
||||
}
|
||||
|
||||
// 容器
|
||||
.brand-selector-container {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
max-height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
// 头部
|
||||
.selector-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
.close-icon {
|
||||
font-size: 36rpx;
|
||||
color: #666;
|
||||
}
|
||||
.header-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.confirm-btn {
|
||||
font-size: 30rpx;
|
||||
color: #E62429;
|
||||
}
|
||||
padding: 24rpx 32rpx;
|
||||
border-bottom: 1rpx solid #F5F5F5;
|
||||
|
||||
.close-icon { font-size: 36rpx; color: #666666; font-weight: 400; }
|
||||
.header-title { font-size: 32rpx; font-weight: 500; color: #333333; }
|
||||
.confirm-btn { font-size: 30rpx; color: #E62429; font-weight: 400; }
|
||||
}
|
||||
|
||||
.search-box {
|
||||
padding: 20rpx 30rpx;
|
||||
// 搜索框:终极修复版(解决覆盖+还原视觉)
|
||||
.search-bar {
|
||||
padding: 20rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
position: relative;
|
||||
z-index: 1001; // 确保搜索框在最上层
|
||||
|
||||
.search-input {
|
||||
width: 100%;
|
||||
padding: 20rpx;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #FFFFFF !important;
|
||||
border: 1rpx solid #E8E8E8;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
height: 76rpx;
|
||||
padding: 0 24rpx;
|
||||
position: relative;
|
||||
z-index: 1002; // 确保输入框容器层级最高
|
||||
|
||||
.search-icon {
|
||||
margin-right: 16rpx;
|
||||
color: #CCCCCC !important;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
z-index: 1; // 图标层级低于输入框文字
|
||||
}
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333333 !important; // 强制文字颜色,防止被全局样式覆盖
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
background: transparent !important;
|
||||
padding: 0; // 彻底移除内边距,避免行高冲突
|
||||
line-height: 76rpx; // 行高与容器高度一致,确保垂直居中
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: relative;
|
||||
z-index: 2; // 确保文字在最上层,不被任何元素遮挡
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
font-size: 28rpx;
|
||||
color: #CCCCCC !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 品牌列表
|
||||
.brand-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
|
||||
.brand-item {
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
padding: 28rpx 32rpx;
|
||||
border-bottom: 1rpx solid #F5F5F5;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
font-weight: 400;
|
||||
|
||||
&.active {
|
||||
color: #E62429;
|
||||
&::after {
|
||||
content: "✓";
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 品牌管理入口
|
||||
.brand-management {
|
||||
padding: 30rpx;
|
||||
padding: 28rpx 32rpx;
|
||||
text-align: center;
|
||||
color: #1677FF;
|
||||
font-size: 28rpx;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
border-top: 1rpx solid #F5F5F5;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -10,7 +10,13 @@
|
|||
|
||||
<!-- 搜索框 -->
|
||||
<view class="search-box">
|
||||
<input type="text" placeholder="搜索品牌名称" class="search-input" />
|
||||
<input
|
||||
v-model="searchKeyword"
|
||||
type="text"
|
||||
placeholder="搜索品牌名称"
|
||||
class="search-input"
|
||||
@input="onSearchInput"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 品牌树状列表 -->
|
||||
|
|
@ -181,12 +187,14 @@ export default {
|
|||
renameBrandIndex: null,
|
||||
// 编辑二级品牌相关
|
||||
editSubBrandId: null,
|
||||
// 搜索关键字
|
||||
searchKeyword: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// 获取storeId
|
||||
this.storeId = getStoreId()
|
||||
// 加载品牌列表
|
||||
// 加载品牌列表,初始时不传入搜索关键字
|
||||
this.loadBrandList()
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -194,13 +202,12 @@ export default {
|
|||
uni.navigateBack()
|
||||
},
|
||||
// 加载品牌列表
|
||||
async loadBrandList() {
|
||||
async loadBrandList(brandName = '') {
|
||||
try {
|
||||
// 使用新的getBrandTree接口,传入storeId作为URL参数
|
||||
const res = await getBrandTree(this.storeId)
|
||||
// 使用新的getBrandTree接口,传入storeId作为URL参数和brandName作为查询参数
|
||||
const res = await getBrandTree(this.storeId, brandName)
|
||||
if (res.code === 200 && res.data) {
|
||||
// 新接口直接返回树状结构,可能不需要额外处理
|
||||
// 但需要根据实际返回格式调整
|
||||
// 格式化并设置品牌列表
|
||||
this.brandList = this.formatBrandData(res.data)
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -222,6 +229,13 @@ export default {
|
|||
})) : []
|
||||
}))
|
||||
},
|
||||
// 搜索输入处理
|
||||
onSearchInput() {
|
||||
const keyword = this.searchKeyword.trim()
|
||||
|
||||
// 调用API进行搜索,传入搜索关键字
|
||||
this.loadBrandList(keyword)
|
||||
},
|
||||
// 展开/折叠一级品牌
|
||||
toggleExpand(index) {
|
||||
this.brandList[index].expanded = !this.brandList[index].expanded
|
||||
|
|
@ -615,6 +629,8 @@ export default {
|
|||
font-size: 28rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
color: #333;
|
||||
height: 72rpx;
|
||||
}
|
||||
|
||||
/* 品牌树 */
|
||||
|
|
|
|||
|
|
@ -12,9 +12,17 @@
|
|||
<!-- 搜索框 -->
|
||||
<view class="search-bar">
|
||||
<view class="search-input">
|
||||
<text class="search-icon">🔍</text>
|
||||
<input type="text" placeholder="搜索分类名称" v-model="searchText" class="input" />
|
||||
</view>
|
||||
<!-- <text>🔍</text> -->
|
||||
<uni-icons class="search-icon" type="search" size="18" color="#999"></uni-icons>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="搜索分类名称"
|
||||
v-model="searchText"
|
||||
class="input"
|
||||
@input="handleSearchInput"
|
||||
@confirm="handleSearchConfirm"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公告栏 -->
|
||||
|
|
@ -307,7 +315,7 @@ export default {
|
|||
const storeInfo = getStoreInfo();
|
||||
const storeId = storeInfo ? storeInfo.storeId : 1;
|
||||
|
||||
getClassificationTree(storeId)
|
||||
getClassificationTree(storeId, this.searchText)
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
this.categories = res.data || [];
|
||||
|
|
@ -594,6 +602,18 @@ export default {
|
|||
console.error('重命名分类失败:', error);
|
||||
uni.showToast({ title: '网络请求失败', icon: 'none' });
|
||||
});
|
||||
},
|
||||
|
||||
// 搜索输入处理
|
||||
handleSearchInput() {
|
||||
// 触发分类搜索
|
||||
this.loadClassificationTree();
|
||||
},
|
||||
|
||||
// 搜索确认处理
|
||||
handleSearchConfirm() {
|
||||
// 触发分类搜索
|
||||
this.loadClassificationTree();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -262,13 +262,39 @@
|
|||
</view>
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<view class="search-box">
|
||||
<view class="search-box" style="z-index: 10000; pointer-events: auto; display: flex; align-items: center; gap: 10rpx;">
|
||||
<input
|
||||
class="search-input"
|
||||
type="text"
|
||||
placeholder="搜索品牌名称"
|
||||
v-model="brandSearchKeyword"
|
||||
placeholder="搜索品牌名称1"
|
||||
:value="brandSearchKeyword"
|
||||
@input="brandSearchKeyword = $event.detail.value"
|
||||
style="
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
z-index: 10001;
|
||||
pointer-events: auto;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
"
|
||||
/>
|
||||
<view
|
||||
@click="performBrandSearch"
|
||||
style="
|
||||
padding: 15rpx 25rpx;
|
||||
background-color: #E62429;
|
||||
color: white;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
z-index: 10002;
|
||||
pointer-events: auto;
|
||||
"
|
||||
>
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 品牌列表(二级树状结构) -->
|
||||
|
|
@ -334,13 +360,39 @@
|
|||
</view>
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<view class="search-box">
|
||||
<view class="search-box" style="z-index: 10000; pointer-events: auto; display: flex; align-items: center; gap: 10rpx;">
|
||||
<input
|
||||
class="search-input"
|
||||
type="text"
|
||||
placeholder="搜索分类名称"
|
||||
v-model="categorySearchKeyword"
|
||||
:value="categorySearchKeyword"
|
||||
@input="categorySearchKeyword = $event.detail.value"
|
||||
style="
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
z-index: 10001;
|
||||
pointer-events: auto;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
"
|
||||
/>
|
||||
<view
|
||||
@click="performCategorySearch"
|
||||
style="
|
||||
padding: 15rpx 25rpx;
|
||||
background-color: #E62429;
|
||||
color: white;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
z-index: 10002;
|
||||
pointer-events: auto;
|
||||
"
|
||||
>
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 分类列表(二级树状结构) -->
|
||||
|
|
@ -402,7 +454,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getProductDetail, updateProduct, updateProductWithFile } from '@/api/product'
|
||||
import { getProductDetail, updateProduct, updateProductWithFile, getClassificationTree, getBrandTree } from '@/api/product'
|
||||
import { getStoreId } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'GoodsEdit',
|
||||
|
|
@ -682,62 +734,91 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
// 获取品牌数据
|
||||
// 获取品牌数据 - 简化版,只获取所有品牌
|
||||
async getBrandData() {
|
||||
try {
|
||||
const res = await uni.request({
|
||||
url: 'http://193.112.94.36:8081/mall/brand/getTree/2',
|
||||
method: 'GET'
|
||||
});
|
||||
// 使用默认门店ID 2,如果未找到门店ID
|
||||
const storeId = getStoreId() || 2;
|
||||
|
||||
if (res[1] && res[1].data && res[1].data.code === 200) {
|
||||
this.brandData = res[1].data.data;
|
||||
// 直接获取所有品牌
|
||||
const res = await getBrandTree(storeId);
|
||||
|
||||
if (res.code === 200) {
|
||||
this.brandData = res.data || [];
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取品牌数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
console.log('获取品牌数据失败:', res);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取品牌数据失败:', error);
|
||||
uni.showToast({
|
||||
title: '网络请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取分类数据
|
||||
// 获取分类数据 - 简化版,只获取所有分类
|
||||
async getCategoryData() {
|
||||
try {
|
||||
const storeId = getStoreId();
|
||||
if (!storeId) {
|
||||
uni.showToast({
|
||||
title: '请先选择门店',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 使用默认门店ID 2,如果未找到门店ID
|
||||
const storeId = getStoreId() || 2;
|
||||
|
||||
const res = await uni.request({
|
||||
url: `http://193.112.94.36:8081/mall/classification/getTree/${storeId}`,
|
||||
method: 'GET'
|
||||
});
|
||||
// 直接获取所有分类
|
||||
const res = await getClassificationTree(storeId);
|
||||
|
||||
if (res[1] && res[1].data && res[1].data.code === 200) {
|
||||
this.categoryData = res[1].data.data;
|
||||
if (res.code === 200) {
|
||||
this.categoryData = res.data || [];
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取分类数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
console.log('获取分类数据失败:', res);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取分类数据失败:', error);
|
||||
uni.showToast({
|
||||
title: '网络请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 执行分类搜索
|
||||
async performCategorySearch() {
|
||||
try {
|
||||
// 使用默认门店ID 2,如果未找到门店ID
|
||||
const storeId = getStoreId() || 2;
|
||||
|
||||
// 调用分类搜索API
|
||||
const res = await getClassificationTree(storeId, this.categorySearchKeyword);
|
||||
|
||||
if (res.code === 200) {
|
||||
this.categoryData = res.data || [];
|
||||
} else {
|
||||
console.log('搜索分类失败:', res);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('搜索分类失败:', error);
|
||||
}
|
||||
},
|
||||
|
||||
// 分类输入处理 - 仅更新数据,不触发API
|
||||
handleCategoryInput(e) {
|
||||
// 直接更新数据,让v-model正常工作
|
||||
this.categorySearchKeyword = e.detail.value;
|
||||
},
|
||||
|
||||
// 品牌输入处理 - 仅更新数据,不触发API
|
||||
handleBrandInput(e) {
|
||||
// 直接更新数据,让v-model正常工作
|
||||
this.brandSearchKeyword = e.detail.value;
|
||||
},
|
||||
|
||||
// 执行品牌搜索
|
||||
async performBrandSearch() {
|
||||
try {
|
||||
// 使用默认门店ID 2,如果未找到门店ID
|
||||
const storeId = getStoreId() || 2;
|
||||
|
||||
// 调用品牌搜索API
|
||||
const res = await getBrandTree(storeId, this.brandSearchKeyword);
|
||||
|
||||
if (res.code === 200) {
|
||||
this.brandData = res.data || [];
|
||||
} else {
|
||||
console.log('搜索品牌失败:', res);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('搜索品牌失败:', error);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -1168,6 +1249,7 @@ export default {
|
|||
display: flex;
|
||||
align-items: flex-end;
|
||||
z-index: 999;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.brand-selector-container {
|
||||
|
|
@ -1177,6 +1259,8 @@ export default {
|
|||
max-height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
pointer-events: auto;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.selector-header {
|
||||
|
|
@ -1202,12 +1286,51 @@ export default {
|
|||
|
||||
.search-box {
|
||||
padding: 20rpx 30rpx;
|
||||
/* 确保搜索框容器可以被点击 */
|
||||
pointer-events: auto;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
|
||||
.search-input {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
/* 确保输入框可以被点击和选中 */
|
||||
pointer-events: auto;
|
||||
z-index: 1001;
|
||||
/* 确保输入框有焦点样式 */
|
||||
border: 1rpx solid #ddd;
|
||||
/* 确保可以选中文本 */
|
||||
user-select: text;
|
||||
/* 确保可以获得焦点 */
|
||||
outline: none;
|
||||
/* 确保触摸设备上可以正常使用 */
|
||||
-webkit-user-select: text;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:focus {
|
||||
border-color: #E62429;
|
||||
box-shadow: 0 0 0 2rpx rgba(230, 36, 41, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.search-button {
|
||||
padding: 15rpx 25rpx;
|
||||
background-color: #E62429;
|
||||
color: white;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
/* 确保按钮可以被点击 */
|
||||
pointer-events: auto;
|
||||
z-index: 1002;
|
||||
/* 添加点击反馈 */
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1283,6 +1406,7 @@ export default {
|
|||
display: flex;
|
||||
align-items: flex-end;
|
||||
z-index: 999;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.category-selector-container {
|
||||
|
|
@ -1292,6 +1416,8 @@ export default {
|
|||
max-height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
pointer-events: auto;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.category-list {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ export default {
|
|||
barcode: '6901285991240',
|
||||
price: 1,
|
||||
quantity: 1,
|
||||
image: '/static/yibao.png'
|
||||
image: 'http://193.112.94.36:8099/static/images/yibao.png'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -294,7 +294,7 @@ export default {
|
|||
barcode: barcode,
|
||||
price: 10,
|
||||
quantity: 1,
|
||||
image: '/static/yibao.png'
|
||||
image: 'http://193.112.94.36:8099/static/images/yibao.png'
|
||||
};
|
||||
this.goodsList.push(mockGoods);
|
||||
uni.showToast({ title: '识别成功', icon: 'success' });
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<view class="status-left-content">
|
||||
<!-- 快速处理卡片 -->
|
||||
<view class="dui">
|
||||
<image class="dui-img" src="/static/Mask group.png"></image>
|
||||
<image class="dui-img" src="http://193.112.94.36:8099/static/images/Mask group.png"></image>
|
||||
</view>
|
||||
<view class="status-left">
|
||||
<text class="status-text">快速处理</text>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<view class="two">
|
||||
<view class="shop-icons">
|
||||
<image
|
||||
src="/static/Frame 8.png"
|
||||
src="http://193.112.94.36:8099/static/images/Frame 8.png"
|
||||
class="shop-icon"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<view class="xianjin">
|
||||
<image
|
||||
src="/static/Frame 75.png"
|
||||
src="http://193.112.94.36:8099/static/images/Frame 75.png"
|
||||
mode="aspectFit"
|
||||
class="close-icon"
|
||||
@click="closeDuty"
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<view class="closeView">
|
||||
<!-- 右侧:关闭按钮图片 -->
|
||||
<image
|
||||
src="/static/Frame 7.png"
|
||||
src="http://193.112.94.36:8099/static/images/Frame 7.png"
|
||||
class="close-icons"
|
||||
mode="aspectFit"
|
||||
@click="closeDuty"
|
||||
|
|
@ -821,7 +821,7 @@ export default {
|
|||
.item-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 61.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 61.png');
|
||||
background-size: 100% 100%; /* 完全填充容器 */
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -834,7 +834,7 @@ export default {
|
|||
.item-iconb {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 67.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 67.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -847,7 +847,7 @@ export default {
|
|||
.item-iconc {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 71.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 71.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -860,7 +860,7 @@ export default {
|
|||
.item-icond {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 68.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 68.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -873,7 +873,7 @@ export default {
|
|||
.item-icone {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 66.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 66.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -885,7 +885,7 @@ export default {
|
|||
.item-iconf {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 76.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 76.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -897,7 +897,7 @@ export default {
|
|||
.item-icong {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 64.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 64.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
@ -910,7 +910,7 @@ export default {
|
|||
.item-iconh {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-image: url('/static/Frame 64.png');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/Frame 64.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<view class="store-status">
|
||||
<view class="status-content">
|
||||
<view class="dui">
|
||||
<image class="dui-img" src="/static/Frame 52.png"></image>
|
||||
<image class="dui-img" src="http://193.112.94.36:8099/static/images/Frame 52.png"></image>
|
||||
</view>
|
||||
<view class="status-left">
|
||||
<text class="status-text">已开启微店商店库</text>
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
</view>
|
||||
<view class="goods-top" @tap="goToStockDetail(item)">
|
||||
<view class="goods-tou">
|
||||
<image :src="item.mainImage ? 'http://193.112.94.36:8081' + item.mainImage : '/static/687b6f95b14eff60f4b77147b3726ab2.jpg' "></image>
|
||||
<image :src="item.mainImage ? 'http://193.112.94.36:8081' + item.mainImage : 'http://193.112.94.36:8099/static/images/687b6f95b14eff60f4b77147b3726ab2.jpg' "></image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<text class="goods-name">{{ item.productName }}</text>
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@
|
|||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #ffffff;
|
||||
background-image: url('/static/687b6f95b14eff60f4b77147b3726ab2.jpg');
|
||||
background-image: url('http://193.112.94.36:8099/static/images/687b6f95b14eff60f4b77147b3726ab2.jpg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAwaAlslxygdY6X7jWg9l3py4TXn6Kdqnu2oA4cvqvYjekRxZG
|
||||
UNllThCnD8f7nOwJVKHUvvCifC2xb34QXcxQSqLBN5zF1LaenAIEULcu/1p9l3Eq
|
||||
KLaaa7IEaRQz1LY4R6nnAwbHoWFIF2Cvr3k6lHLWxG3Cs2oI/oF1NHPu8oap2Cgp
|
||||
un+m4XX+1L9ylt1iTn3FEcT8MmaTXmqILCsFv2dXYZtZncBvIUP1FRsFzWqSt2Dm
|
||||
jsSD0+OxFiCT4MaUXxe+XLH+eTKy28AhGhIP07DFctR11iyfYEsRjfgRBRuKEHG6
|
||||
t+t9OdUhyB6E/BiFXzzJuuRhe7yS/SGvezQt9QIDAQABAoIBAQCUloZ3QtSo6LKx
|
||||
RJJyak+VXxmEGY2+lJf03BL1wYUX1WVfHCvn3X0NlF/wD2L6wHREm1A9G0NGEnao
|
||||
/dAneyReslmeiNOUcnRzemS/YGRTl6jrr+9PgRot7VXPIa7I3PGBpVPfkbNfF92P
|
||||
+yW3fkvDIgHIigaxUn0GemhsUU+ckv9Ihy6kE+WkH5leqDEBOC2MnLpwZJLWqGh/
|
||||
Bs4RkKaAV9FPeuAbny6nEL6KvSHBT1vUnyw/xCAUsH216TDZAbIpkjnA40vORykX
|
||||
D/NIZECGywCvD2nTS5TCwb7ecVtBodB1GPNdNpqTaNONskbjIzClCZwwLWWf6nV6
|
||||
Ws/ay+6hAoGBAOCpkN1c+uR48ypb+p2O6wY+xejuYYnAP6y908q+hGyc7cKSEmgL
|
||||
/berEsrpR4ZYAC5QXphfGsxiYf6YH1vRngETJseydPP/aGI/LplPXQWLbmJropmX
|
||||
zjqoIYuar8qQnpxCCKodU/geoIAE+okopUE2T3zEpMbxSqoQZ0JZKaW5AoGBANyi
|
||||
Sxes9UoNEJ07Xk1zxVkxDWUYAbwlM9wUCEqAI8PhyEWi+s7KcXswDXQ++h/rQfCc
|
||||
ezKZBxDmJR7Il2+vAJyQgk0yhHE7s1dQcI325wVeuYJ63lDgT3qcSS0DjfDail3U
|
||||
y+dJPvo8c9oc5slj9GpKCDn7U1GkkofgX3bAE6gdAoGAOo63/ZrQomCMMQxMZGju
|
||||
BXCzMSWBMuBzOFk6LOw/o/e7WS2tsoT9mrPycAUh6Xhig6/bGCgh2ggCttN7yPj4
|
||||
EBunzgFLzpVR5dnGEZvICTvwh6K6fQI+dLeCFts42rmbPetQStbeHhwNhZDGpJ19
|
||||
hWPckA7JTDl0VqNz5q1K17ECgYBdq8mV06iQN9vF5V60I2K16010jiyuZF0QIrEi
|
||||
cCS/FSyh4//3q5tiYZRUtigbRRZJwSXM5YtKcWtxFli04eewkOnBPKFeMaqCd3RR
|
||||
0XFjpkO8Uc3xKEqWE6Q9qDSq/R2hmKa5Gy/RrbjB8WNKPVWXirbTZxCIqQZNCcV9
|
||||
9S5jQQKBgQCBjwzjox8weiS+UsrxC/fF0nQ6LgObzn2kqjtKq/kKBYfZ7CJ8pQ1x
|
||||
lAq6C9cSeOi1PiGxHFiS5t61hNfPYQtlT2+sk11luSb6k+wfusNa1OCR7NYgZjP5
|
||||
KPgOP4G503KPIHCmhumDwz4USy1DMw9JuekuP8jsnP7NyvU473C99g==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
Before Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 867 B |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 263 B |
BIN
static/Union.png
|
Before Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 525 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
BIN
static/logo.png
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
BIN
static/pei.png
|
Before Width: | Height: | Size: 866 B |
BIN
static/zhen.png
|
Before Width: | Height: | Size: 751 B |