提交 e63522c4 authored 作者: 刘旭's avatar 刘旭

初步完成永信达遗留项,等待测试

上级 3554609e
<template> <template>
<view style="margin-bottom: 20rpx;"> <view style="margin-bottom: 20rpx;">
<view class="login-input"> <view class="login-input">
<view :class="'iconfont ' + inputData.iconfont + ' login-icon'"></view> <view :class="'iconfont ' + inputData?.iconfont + ' login-icon'"></view>
<input <input :type="inputData?.type" :placeholder="inputData?.placeholder" :password="inputData?.password"
:type="inputData?.type" class="input-text" v-model="inputData?.inputValue" @blur="handleValue" />
:placeholder="inputData.placeholder" <text class="getcode" v-if="inputData?.checkType === 'code'">获取验证码</text>
:password="inputData?.password"
class="input-text"
v-model="inputData.inputValue"
@blur="handleValue"
/>
<text class="getcode" v-if="inputData.checkType === 'code'">获取验证码</text>
</view> </view>
<text class="check" v-if="inputData.check">{{ inputData.checkContent }}</text> <text class="check" v-if="inputData?.check">{{ inputData?.checkContent }}</text>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
let props = defineProps({ let props = defineProps({
inputData: Object inputData: {
type: Object
}
}); });
let emits = defineEmits(['hangleInput']); let emits = defineEmits(['hangleInput']);
...@@ -37,17 +33,20 @@ let handleValue = (Value: any) => { ...@@ -37,17 +33,20 @@ let handleValue = (Value: any) => {
border-radius: 50rpx; border-radius: 50rpx;
width: 560rpx; width: 560rpx;
height: 70rpx; height: 70rpx;
.login-icon { .login-icon {
line-height: 70rpx; line-height: 70rpx;
margin: 0 15rpx; margin: 0 15rpx;
font-size: 42rpx; font-size: 42rpx;
color: #c7c7c7; color: #c7c7c7;
} }
.input-text { .input-text {
height: 100%; height: 100%;
line-height: 70rpx; line-height: 70rpx;
flex: 1 1 auto; flex: 1 1 auto;
} }
.getcode { .getcode {
height: 100%; height: 100%;
width: 144rpx; width: 144rpx;
...@@ -56,6 +55,7 @@ let handleValue = (Value: any) => { ...@@ -56,6 +55,7 @@ let handleValue = (Value: any) => {
line-height: 70rpx; line-height: 70rpx;
} }
} }
.check { .check {
font-size: 24rpx; font-size: 24rpx;
color: red; color: red;
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
} }
}, },
{ {
"path": "pages/productLine1/index", "path": "pages/productLine/index",
"style": { "style": {
"navigationBarTitleText": "产品线1", "navigationBarTitleText": "产品线",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
...@@ -187,13 +187,6 @@ ...@@ -187,13 +187,6 @@
} }
}, },
{ {
"path": "pages/productLine/productLineDetails",
"style": {
"navigationBarTitleText": "产品线详情",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "pages/profile/about", "path": "pages/profile/about",
"style": { "style": {
"navigationBarTitleText": "关于", "navigationBarTitleText": "关于",
...@@ -221,7 +214,7 @@ ...@@ -221,7 +214,7 @@
"text": "分类" "text": "分类"
}, },
{ {
"pagePath": "pages/productLine1/index", "pagePath": "pages/productLine/index",
"iconPath": "/static/tabbar/message.png", "iconPath": "/static/tabbar/message.png",
"selectedIconPath": "/static/tabbar/message_fill.png", "selectedIconPath": "/static/tabbar/message_fill.png",
"text": "产品线" "text": "产品线"
......
.group-item {
width: 100%;
padding: 15rpx;
margin: 0 10rpx 10rpx;
background-color: #fff;
.details {
width: 55%;
min-height: 200rpx;
display: flex;
flex-direction: column;
align-items: self-start !important;
margin-left: 20rpx;
.b-tag {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
}
.circle {
position: relative;
display: inline-block;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background-color: #f32329;
margin-right: 20rpx;
.horizontal {
position: absolute;
top: 44%;
left: 50%;
width: 24rpx;
height: 6rpx;
margin-left: -12rpx;
margin-bottom: -3rpx;
border-radius: 4rpx;
background-color: #fff;
}
}
.number-box {
display: flex;
flex-direction: column;
justify-content: flex-end;
}
}
:deep(.u-navbar) {
max-width: 420px;
margin: 0 auto;
.u-navbar-content-title {
left: 36%;
}
}
.footer {
position: fixed;
bottom: var(--window-bottom);
left: var(--window-left);
right: var(--window-right);
padding: 0.625rem;
z-index: 99;
background-color: #fff;
max-width: 420px;
margin: 0 auto;
border-top: 0.0625rem solid #f7f7f7;
border-left: #f6f6f6 solid 1px;
border-right: #f6f6f6 solid 1px;
display: flex;
justify-content: space-between;
align-items: center;
.right {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
}
...@@ -271,15 +271,14 @@ let togoods = (data: any) => { ...@@ -271,15 +271,14 @@ let togoods = (data: any) => {
partList: data.partList || [], partList: data.partList || [],
isDefaultSku: true isDefaultSku: true
}) })
console.log(specStore.defaultSelect, 'cc'); // console.log(specStore.defaultSelect, 'cc');
// 是否含有自定义规格 // 是否含有自定义规格
if (data.productId === 0) specStore.$patch({ specificationCustom: data.specificationCustom || [] }) if (data.productId === 0) specStore.$patch({ specificationCustom: data.specificationCustom || [] })
} }
}); });
else else
uni.reLaunch({ uni.reLaunch({
url: '../productLine1/index?id=' + data.goodsId + '&cartId=' + data.id, url: '../productLine/index?id=' + data.goodsId + '&cartId=' + data.id,
}); });
}; };
...@@ -407,90 +406,5 @@ onShow(() => { ...@@ -407,90 +406,5 @@ onShow(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.group-item { @import './index.scss';
width: 100%;
padding: 15rpx;
margin: 0 10rpx 10rpx;
background-color: #fff;
.details {
width: 55%;
min-height: 200rpx;
display: flex;
flex-direction: column;
align-items: self-start !important;
margin-left: 20rpx;
.b-tag {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
}
.circle {
position: relative;
display: inline-block;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background-color: #f32329;
margin-right: 20rpx;
.horizontal {
position: absolute;
top: 44%;
left: 50%;
width: 24rpx;
height: 6rpx;
margin-left: -12rpx;
margin-bottom: -3rpx;
border-radius: 4rpx;
background-color: #fff;
}
}
.number-box {
display: flex;
flex-direction: column;
justify-content: flex-end;
}
}
:deep(.u-navbar) {
max-width: 420px;
margin: 0 auto;
.u-navbar-content-title {
left: 36%
}
}
.footer {
position: fixed;
bottom: var(--window-bottom);
left: var(--window-left);
right: var(--window-right);
padding: 0.625rem;
z-index: 99;
background-color: #fff;
max-width: 420px;
margin: 0 auto;
border-top: 0.0625rem solid #f7f7f7;
border-left: #f6f6f6 solid 1px;
border-right: #f6f6f6 solid 1px;
display: flex;
justify-content: space-between;
align-items: center;
// .left {
// height: 100%;
// }
.right {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
}
</style> </style>
<template>
<view class="u-wrap">
<!-- 搜索 -->
<view>
<uni-search-bar
placeholder="输入搜索商品"
bgColor="#EEEEEE"
clearButton="auto"
cancelButton="none"
@confirm="search"
/>
</view>
<view class="u-menu-wrap">
<view class="right-cates">
<u-tabs
name="name"
:list="categoryList"
v-model="current"
@change="tabsChange"
></u-tabs>
<goodsItem
v-for="item in currentSubCategoryData"
:src="item.picUrl"
:name="item.name"
:brief="item.brief"
:counterPrice="item.counterPrice"
:retailPrice="item.retailPrice"
@tap="cateGoryGoods(item)"
/>
<view style="padding: 20rpx;">
<u-loadmore :status="status" icon-type="flower" />
</view>
<view class="footer"></view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import { getCatalogIndex, getGoodsList } from '@/api/category';
import goodsItem from '@/components/goodsItem.vue';
const current = ref(0); // 预设当前项的值
const categoryList = ref([] as any); //右侧tabber数据
const currentSubCategoryData = ref([] as any); //初始tabber数据
const listQuery = ref({
categoryId: 0,
page: 1,
limit: 10
});
let status = ref('loadmore');
let total = ref(0);
onLoad((options: any) => {
if (JSON.stringify(options) === '{}') {
initIndex();
} else {
let data = JSON.parse(options.data);
listQuery.value.categoryId = data.id;
initIndex();
setTimeout(() => {
current.value = data.index;
}, 300);
}
});
const search = (val: any) => {
uni.navigateTo({ url: '../index/search?keyword=' + val.value });
};
const cateGoryGoods = (row: any) => {
uni.navigateTo({ url: '/pages/goods/index?id=' + row.id });
};
// 上拉加载数据
onReachBottom(() => {
// 判断是否还有下一页数据
if (listQuery.value.page * listQuery.value.limit >= total.value)
return (status.value = 'nomore');
// // 判断是否正在请求其它数据,如果是,则不发起额外的请求
if (status.value === 'loading') return;
listQuery.value.page += 1;
initGoodsList(listQuery.value);
});
const tabsChange = (e: any) => {
currentSubCategoryData.value = [];
current.value = e;
listQuery.value.categoryId = categoryList.value[e].id;
initGoodsList(listQuery.value);
};
const initIndex = () => {
getCatalogIndex().then((res: any) => {
if (res.data.code === 200) {
categoryList.value = res.data.data.categoryList;
if (listQuery.value.categoryId === 0)
listQuery.value.categoryId = categoryList.value[0].id;
initGoodsList(listQuery.value);
console.log(categoryList.value, '分类数据');
}
});
};
const initGoodsList = (data: any) => {
status.value = 'loading';
getGoodsList(data).then((res: any) => {
if (res.data.code === 200) {
if (res.data.data.total > 10) status.value = 'loadmore';
else status.value = 'nomore';
total.value = res.data.data.total;
currentSubCategoryData.value = [...currentSubCategoryData.value, ...res.data.data.list];
}
});
};
</script>
<style lang="scss" scoped>
.right-cates {
width: 100%;
height: 100%;
background-color: #fff;
}
.u-wrap {
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top));
/* #endif */
display: flex;
flex-direction: column;
}
.u-search-box {
padding: 18rpx 30rpx;
}
.footer {
width: 100%;
height: 108rpx;
background-color: #fff;
}
</style>
<template> <template>
<view class="app-container"> <view class="app-container">
<goodsItem <goodsItem v-for="item in itemList" :src="item.picUrl" :name="item.name" :brief="item.brief"
v-for="item in itemList" :counterPrice="item.counterPrice" :retailPrice="item.retailPrice" @tap="newGoods(item)" />
:src="item.picUrl" <view style="padding: 20rpx;">
:name="item.name" <u-loadmore :status="status" icon-type="flower" />
:brief="item.brief" </view>
:counterPrice="item.counterPrice"
:retailPrice="item.retailPrice"
@tap="newGoods(item)"
/>
<view style="padding: 20rpx;"><u-loadmore :status="status" icon-type="flower" /></view>
</view> </view>
</template> </template>
...@@ -57,4 +52,5 @@ let initList = (data: any) => { ...@@ -57,4 +52,5 @@ let initList = (data: any) => {
initList(newQuery); initList(newQuery);
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
</style>
.grid {
padding: 16rpx;
.grid-text {
width: 90%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
font-size: 24rpx;
margin-top: 2rpx;
text-align: center;
}
}
.text {
font-size: 14px;
margin-top: 5px;
}
.uni-grid-item__box {
align-items: center;
justify-content: center;
}
.goods-item {
width: auto;
height: 380rpx;
background-color: #ffffff;
margin: 5rpx;
border-radius: 25rpx;
overflow: hidden;
.goods-img {
width: 100%;
height: 300rpx;
}
.goods-infos {
margin: 6rpx 10rpx;
.goods-title {
font-size: 16px;
font-family: arial, sans-serif;
display: -webkit-box;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 30rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.goods-price {
color: #dd524d;
font-family: arial, sans-serif;
display: flex;
justify-content: flex-end;
font-size: 10px;
.price {
margin: 40rpx 20rpx 0 0;
font-size: 16px;
font-weight: bold;
}
}
.goods-sales-count {
//margin-right: 10rpx;;
text-align: right;
font-size: 10px;
color: #999999;
}
}
}
.topic {
width: 100%;
.topic-item {
.title {
margin-top: 20rpx;
font-size: 28rpx;
color: rgb(171, 149, 109);
.text {
overflow: hidden;
}
}
}
}
...@@ -198,100 +198,6 @@ const initIndex = () => { ...@@ -198,100 +198,6 @@ const initIndex = () => {
initIndex(); initIndex();
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
// page { @import './index.scss';
// filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
// -webkit-filter: grayscale(100%);
// }
.grid {
padding: 16rpx;
.grid-text {
width: 90%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
font-size: 24rpx;
margin-top: 2rpx;
text-align: center;
}
}
.text {
font-size: 14px;
margin-top: 5px;
}
.uni-grid-item__box {
align-items: center;
justify-content: center;
}
.goods-item {
width: auto;
height: 380rpx;
background-color: #ffffff;
margin: 5rpx;
border-radius: 25rpx;
overflow: hidden;
.goods-img {
width: 100%;
height: 300rpx;
}
.goods-infos {
margin: 6rpx 10rpx;
.goods-title {
font-size: 16px;
font-family: arial, sans-serif;
display: -webkit-box;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 30rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.goods-price {
color: #dd524d;
font-family: arial, sans-serif;
display: flex;
justify-content: flex-end;
font-size: 10px;
.price {
margin: 40rpx 20rpx 0 0;
font-size: 16px;
font-weight: bold;
}
}
.goods-sales-count {
//margin-right: 10rpx;;
text-align: right;
font-size: 10px;
color: #999999;
}
}
}
.topic {
width: 100%;
.topic-item {
.title {
margin-top: 20rpx;
font-size: 28rpx;
color: rgb(171, 149, 109);
.text {
overflow: hidden;
}
}
}
}
</style> </style>
<template> <template>
<view style="padding: 24rpx;"> <view style="padding: 24rpx;">
<uni-search-bar <uni-search-bar v-model="searchQuery.keyword" placeholder="输入搜索商品" bgColor="#EEEEEE" clearButton="auto"
v-model="searchQuery.keyword" cancelButton="none" @confirm="search" />
placeholder="输入搜索商品"
bgColor="#EEEEEE"
clearButton="auto"
cancelButton="none"
@confirm="search"
/>
<view v-if="searchList.length !== 0"> <view v-if="searchList.length !== 0">
<goodsItem <goodsItem v-for="item in searchList" :src="item.picUrl" :name="item.name" :brief="item.brief"
v-for="item in searchList" :counterPrice="item.counterPrice" :retailPrice="item.retailPrice" @tap="searchGoods(item)" />
:src="item.picUrl"
:name="item.name"
:brief="item.brief"
:counterPrice="item.counterPrice"
:retailPrice="item.retailPrice"
@tap="searchGoods(item)"
/>
<u-loadmore :status="status" icon-type="flower" /> <u-loadmore :status="status" icon-type="flower" />
</view> </view>
<view v-else><u-loadmore status="nomore" icon-type="flower" /></view> <view v-else>
<u-loadmore status="nomore" icon-type="flower" />
</view>
</view> </view>
</template> </template>
......
:deep(uni-page-wrapper) {
background-color: #fff;
}
:deep(uni-page) {
padding: 0 6rpx;
box-sizing: border-box;
}
.login-container {
padding-top: 40%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #fff;
.getCaptcha {
width: 400rpx;
background-color: rgb(253, 243, 208);
color: $u-tips-color;
border: none;
font-size: 30rpx;
margin-top: 20rpx;
&::after {
border: none;
}
}
.title-iamge {
width: 400rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
width: 100%;
color: #d79972;
font-size: 30rpx;
text-align: center;
align-self: flex-end;
}
}
...@@ -62,110 +62,27 @@ let clickNextStep = () => { ...@@ -62,110 +62,27 @@ let clickNextStep = () => {
} }
}; };
// user123
let initLogin = async (mobile: number, password: string) => { let initLogin = async (mobile: number, password: string) => {
uni.clearStorage(); await uni.removeStorage({ key: 'token' });
let res: any = await login({ mobile, password }); await uni.removeStorage({ key: 'mobile' });
await uni.removeStorage({ key: 'nickName' });
const res: any = await login({ mobile, password });
if (res.data.code === 200) { if (res.data.code === 200) {
uni.setStorage({ await uni.setStorage({ key: 'token', data: res.data.data.token });
key: 'token', await uni.setStorage({ key: 'mobile', data: inputData.inputValue });
data: res.data.data.token, await uni.setStorage({ key: 'nickName', data: res.data.data.userInfo.nickName });
success: () => { await uni.switchTab({ url: '../profile/index' });
uni.switchTab({ await uni.showToast({ title: '登陆成功', icon: 'none', duration: 1000 });
url: '../profile/index',
success() {
uni.setStorage({
key: 'mobile',
data: inputData.inputValue,
success() {
uni.setStorage({
key: 'nickName',
data: res.data.data.userInfo.nickName,
success() {
uni.showToast({
title: '登陆成功',
icon: 'none',
duration: 1000,
});
},
});
},
});
},
});
},
});
} else { } else {
console.log('5000'); await uni.showToast({ title: '手机号或密码错误', icon: 'none', duration: 2000 });
uni.showToast({
title: '手机号或密码错误',
icon: 'none',
duration: 2000,
});
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(uni-page-wrapper) { @import './index.scss';
background-color: #fff;
}
:deep(uni-page) {
padding: 0 6rpx;
box-sizing: border-box;
}
.login-container {
padding-top: 40%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #fff;
.getCaptcha {
width: 400rpx;
background-color: rgb(253, 243, 208);
color: $u-tips-color;
border: none;
font-size: 30rpx;
margin-top: 20rpx;
&::after {
border: none;
}
}
.title-iamge {
width: 400rpx;
}
.login-text {
margin-top: 10%;
font-weight: 700;
font-size: 40rpx;
color: #1d2b5f;
}
.login-form {
margin-top: 15%;
}
.next-step {
margin-top: 20rpx;
width: 245rpx;
height: 90rpx;
}
.footer-text {
margin-top: 40%;
display: block;
width: 100%;
color: #d79972;
font-size: 30rpx;
text-align: center;
align-self: flex-end;
}
}
</style> </style>
<template>
<view class="cell-item" v-if="Object.keys(item).length != 0">
<view class="cell-item-name">
<view>
<u-icon v-if="!item.isSubmit && item.deleted" name="error-circle-fill" color="#ff0000"
style="margin-right: 10rpx;" />
<u-icon v-if="
item.deleted && item.isSubmit
? false
: item.deleted ||
typeof item.isSubmit === 'undefined'
? false
: !item.isSubmit && !item.deleted
" name="error-circle-fill" color="#0055ff" style="margin-right: 4rpx;" />
<text>{{ item?.name }}</text>
</view>
<text style="color: #909399; margin-left: 20rpx;">×{{ item?.number }}</text>
</view>
<view class="cell-item-content">
<view>
<u-tag v-show="item?.size" :text="item?.size" type="info" size="mini" />
<u-tag v-show="item?.SDTrack" :text="item?.SDTrack" type="info" size="mini" />
<u-tag v-show="item?.Segs" :text="item?.Segs" type="info" size="mini" />
</view>
</view>
</view>
<view v-else class="add-item">
<u-icon name="plus" color="#c6c6c6" size="50" />
</view>
</template>
<script setup lang='ts'>
import { ref } from 'vue'
const props = defineProps({
item: {
type: Object,
default: {}
}
})
</script>
<style lang = "scss" scoped>
</style>
\ No newline at end of file
...@@ -18,16 +18,18 @@ ...@@ -18,16 +18,18 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { useStore } from '@/store/useStore'; import { useStore, useLineStore } from '@/store/useStore';
let store = useStore(); let store = useStore();
let store1 = useLineStore();
let showTitle = ref(false); let showTitle = ref(false);
let title = ref(store.title); // let title = ref(store.title);
let title = ref(store1.title);
let type = ref('text'); let type = ref('text');
let saveTitle = () => { let saveTitle = () => {
if (title.value) { if (title.value) {
store.$patch({ store1.$patch({
title: title.value, title: title.value,
}); });
uni.showToast({ uni.showToast({
......
$nav-heigth: var(--window-bottom);
:deep(.u-mask) {
max-width: 420px;
margin: 0 auto;
}
:deep(.u-drawer-content) {
max-width: 420px;
margin: 0 auto;
}
:deep(.u-navbar) {
max-width: 420px;
margin: 0 auto;
.u-navbar-content-title {
left: 36% !important;
}
}
:deep(.uni-tab__cart-box) {
max-width: 420px;
margin: auto;
border-left: #f6f6f6 solid 1px;
border-right: #f6f6f6 solid 1px;
}
.add {
position: absolute;
width: 100%;
height: 40px;
background-color: #fff;
z-index: 0;
margin-top: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.goods-nav {
position: fixed;
left: 0;
bottom: $nav-heigth;
width: 100%;
display: inline;
transform: none;
z-index: 99;
}
.empty_box {
height: 200rpx;
}
.cell-group {
height: 134rpx;
display: flex;
justify-content: flex-start;
align-items: center;
overflow: hidden;
background-color: #fff;
.cell-item {
box-sizing: border-box;
width: 50%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx;
border-bottom: #f6f6f6 6rpx solid;
:deep(.cell-item-name) {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 14rpx;
padding: 0 10rpx;
}
:deep(.cell-item-content) {
display: flex;
justify-content: flex-start;
align-items: center;
}
}
.add-item {
flex: 1;
height: 100%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
border-bottom: #f6f6f6 6rpx solid;
}
}
差异被折叠。
<template>
<view class="container">
<block v-for="res in detailData">
<view style="margin-bottom: 20rpx; background-color: #fff;">
<view style="width: 100%; text-align: end; padding: 20rpx 20rpx 0 0;">{{
res.name
}}</view>
<block v-for="(item, index) in res.values">
<view class="details">
<u-image width="140rpx" height="200rpx" :src="
item.picUrl.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
" class="img"></u-image>
<view class="right">
<view class="name">{{ item.goodsName }}</view>
<view class="tag">
<block v-for="(item1, index1) in item.specifications?.length" :key="index1">
<u-tag :text="item.specifications[index1]" type="info" size="mini"
style="margin: 8rpx 8rpx 8rpx 0;" />
</block>
</view>
<text style="display: flex; justify-content: flex-end; color: #969799; font-size: 12px;">
x{{ item.number }}
</text>
</view>
</view>
<u-line v-if="res.values.length >= 1" color="#e8e8e8" />
</block>
</view>
</block>
<view class="content-footer">
<u-button shape="circle" type="error" size="mini" style="margin-right: 30;" @tap="toIndex">
返回首页
</u-button>
<view>
<u-button shape="circle" size="mini" @tap="generateQuote">生成报价</u-button>
<u-button shape="circle" size="mini" style="margin-left: 20rpx;" @tap="download">
下载技术规格书
</u-button>
</view>
</view>
</view>
<view style="height: 100rpx;"></view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onLoad, onBackPress } from '@dcloudio/uni-app';
import { orderDetail } from '@/api/index';
import { getProductLineMultipleDetail } from '@/api/productLine';
import { useLineStore } from '@/store/useStore';
import config from '@/utils/config';
let store = useLineStore();
let baseUrl = config.baseUrl;
let enclosure = ref(''); // pdf key值
let detailData = ref([] as any);
let type = ref();
let orderId = ref();
onLoad((options: any) => {
type.value = options.type;
orderId.value = options.orderId;
// console.log(type.value, 'type.value');
initOrderData(options.orderId);
});
// 返回首页
let toIndex = () => {
uni.reLaunch({
url: '../index/index',
success() {
if (type.value === 'productline') {
store.$reset(); // 重置pinia数据
}
},
});
};
// 生成报价
let generateQuote = () => {
uni.navigateTo({
url: `../order/quotation?orderId=${orderId.value}&lineId=${0}`,
});
};
// 下载技术规格书pdf
let download = () => {
open(baseUrl + '/wx/storage/downloadFile/' + enclosure.value)
};
let lineNames = ref([] as any)
// 获取goodsId
let initOrderData = (orderId: number) => {
orderDetail({ orderId }).then((res: any) => {
if (res.data.code === 200) {
enclosure.value = res.data.data.orderInfo.enclosure;
let lineArr = [] as any
res.data.data.orderGoods.map((item: any, i: number) => {
if (item.goodsId) {
lineArr.push(item.goodsId)
lineNames.value.push({
id: item.goodsId,
name: item.goodsName
})
}
});
initProductLineMultipleDetail(lineArr)
}
});
};
let initProductLineMultipleDetail = (lineArr: []) => {
getProductLineMultipleDetail(lineArr).then((res: any) => {
if (res.data.code === 200) {
for (const key in res.data.data) {
lineNames.value.map((item: any) => {
if (key == item.id) {
detailData.value.push({
name: item.name,
values: res.data.data[key]
})
}
})
}
// console.log(detailData.value, 'getProductLineMultipleDetail', lineNames.value);
}
})
}
// 通过type判断返回页面
onBackPress((options: any) => {
if (type.value === 'productline') {
if (options.from === 'navigateBack') {
return false;
}
uni.switchTab({
url: '../productLine1/index',
success() {
store.$reset(); // 重置pinia数据
let pages = getCurrentPages(); //获取所有页面的数组对象
let currPage: any = pages[pages.length - 1]; //当前页面
uni.reLaunch({
url: '/' + currPage.route,
});
},
});
return true;
} else if (type.value === 'productLineCart') {
if (options.from === 'navigateBack') {
return false;
}
uni.switchTab({
url: '../cart/index',
success() {
let pages = getCurrentPages(); //获取所有页面的数组对象
let currPage: any = pages[pages.length - 1]; //当前页面
uni.reLaunch({
url: '/' + currPage.route,
});
},
});
return true;
}
});
</script>
<style lang="scss" scoped>
.container {
box-sizing: border-box;
margin: 16rpx;
// background-color: #fff;
.details {
width: 100%;
padding: 16rpx 32rpx;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
background-color: #fff;
.img {
margin-right: 20rpx;
}
.tag {
margin-top: 1%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-bottom: 5%;
}
.right {
width: 80%;
.sum-price {
display: flex;
justify-content: space-between;
}
}
}
.content-footer {
// margin-top: 50rpx;
padding: 50rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
}
}
.footer {
position: fixed;
bottom: 0;
z-index: 99;
width: 100%;
height: 100rpx;
background-color: #fff;
padding: 0 32rpx;
line-height: 100rpx;
font-size: 30rpx;
font-weight: 600;
display: flex;
justify-content: space-between;
}
</style>
<template>
<u-popup v-model="show" mode="bottom" length="80%" :mask-close-able="false" closeable @close="handleClose">
<view class="u-wrap">
<!-- 搜索 -->
<view style="width: 90%; height: 50px; position: fixed; top: 0; z-index: 1; background-color: #fff;">
<uni-search-bar placeholder="输入搜索商品" bgColor="#EEEEEE" clearButton="auto" cancelButton="none"
@confirm="search" />
</view>
<view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop">
<view v-for="(item, index) in categoryList" :key="item.id" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" :data-current="index"
@tap.stop="swichMenu(index, item.id)">
<text class="u-line-1">{{ item.name }}</text>
</view>
</scroll-view>
<view class="right-cates">
<block v-for="(item, index) in currentSubCategoryData" :key="item.id">
<view class="item-container" @tap="cateGoryGoods(item)">
<u-image width="100rpx" height="100rpx" :src="
item.picUrl.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"></u-image>
<view class="content">
<view class="title">
<text>{{ item.name }}</text>
<text style="color: #646566;">{{ item.brief }}</text>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
</u-popup>
<search-popup ref="searchPopupRef" :show="showSearchPopup" @search-close="searchClose"
@cateGoryGoods="cateGoryGoods" />
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { getCatalogIndex, getGoodsList } from '@/api/category';
import config from '@/utils/config';
import searchPopup from './searchPopup.vue';
let baseUrl = config.baseUrl;
const scrollTop = ref(0); //tab标题的滚动条位置
const current = ref(0); // 预设当前项的值
const menuHeight = ref(0); // 左边菜单的高度
const menuItemHeight = ref(0); // 左边菜单item的高度
const categoryList = ref([] as any); //右侧tabber数据
const currentSubCategoryData = ref([] as any); //初始tabber数据
const listQuery = ref({
categoryId: 0,
page: 1,
limit: 10,
});
let status = ref('loadmore');
let total = ref(0);
let emits = defineEmits(['close', 'categoryData']);
const showSearchPopup = ref(false);
const searchPopupRef = ref();
let props = defineProps({
show: {
type: Boolean,
default: false,
},
});
const search = (val: any) => {
// if (!val.value) return;
searchPopupRef.value.searchQuery.keyword = val.value;
searchPopupRef.value.initList();
showSearchPopup.value = true;
};
const cateGoryGoods = (row: any) => {
emits('categoryData', row);
handleClose();
};
// 点击左边的栏目切换
const swichMenu = async (index: any, id: number) => {
currentSubCategoryData.value = [];
current.value = index;
listQuery.value.categoryId = categoryList.value[index].id;
initGoodsList(listQuery.value);
// 如果为0,意味着尚未初始化
if (menuHeight.value == 0 || menuItemHeight.value == 0) {
await getElRect('menu-scroll-view', 'menuHeight');
await getElRect('u-tab-item', 'menuItemHeight');
}
// 将菜单菜单活动item垂直居中
scrollTop.value =
index * menuItemHeight.value + menuItemHeight.value / 2 - menuHeight.value / 2;
};
// 获取一个目标元素的高度
const getElRect = (elClass?: any, dataVal?: any) => {
new Promise((resolve: any, reject: any) => {
const query = uni.createSelectorQuery().in(this);
query
.select('.' + elClass)
.fields({ size: true }, (res: any) => {
// 如果节点尚未生成,res值为null,循环调用执行
if (!res) {
setTimeout(() => {
getElRect(elClass);
}, 10);
return;
}
dataVal = res.height;
})
.exec();
});
};
const initIndex = () => {
getCatalogIndex().then((res: any) => {
if (res.data.code === 200) {
categoryList.value = res.data.data.categoryList;
if (listQuery.value.categoryId === 0)
listQuery.value.categoryId = categoryList.value[0].id;
initGoodsList(listQuery.value);
// console.log(categoryList.value, '分类数据');
}
});
};
const initGoodsList = (data: any) => {
status.value = 'loading';
getGoodsList(data).then((res: any) => {
if (res.data.code === 200) {
if (res.data.data.total > 10) status.value = 'loadmore';
else status.value = 'nomore';
total.value = res.data.data.total;
currentSubCategoryData.value = [...currentSubCategoryData.value, ...res.data.data.list];
}
});
};
let handleClose = () => {
emits('close', false);
};
const searchClose = () => {
showSearchPopup.value = false;
};
defineExpose({
initIndex,
currentSubCategoryData,
});
</script>
<style lang="scss" scoped>
// :deep(.uni-scroll-view-content) {
// background-color: #f6f6f6;
// }
.right-cates {
width: 100%;
height: 100%;
background-color: #fff;
padding: 0 24rpx;
.item-container {
box-sizing: border-box;
width: 100%;
height: 160rpx;
padding: 12rpx 0;
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: 1rpx solid #f5f5f5;
.content {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 20rpx;
.title {
display: flex;
flex-direction: column;
}
.price {
.new-price {
font-size: 32rpx;
}
.old-price {
margin-left: 10rpx;
color: #969799;
font-size: 20rpx;
text-decoration: line-through;
}
}
}
}
}
.u-wrap {
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top));
/* #endif */
display: flex;
flex-direction: column;
border-left: #f6f6f6 solid 1px;
border-right: #f6f6f6 solid 1px;
}
.u-search-box {
padding: 18rpx 30rpx;
}
.u-menu-wrap {
flex: 1;
display: flex;
overflow: hidden;
margin-top: 100rpx;
}
.u-search-inner {
background-color: rgb(234, 234, 234);
border-radius: 100rpx;
display: flex;
align-items: center;
padding: 10rpx 16rpx;
}
.u-search-text {
font-size: 26rpx;
color: $u-tips-color;
margin-left: 10rpx;
}
.u-tab-view {
width: 200rpx;
height: 100%;
}
.u-tab-item {
height: 110rpx;
background: #f6f6f6;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #444;
font-weight: 400;
line-height: 1;
padding-left: 20rpx;
}
.u-tab-item-active {
position: relative;
color: #000;
font-size: 30rpx;
font-weight: 600;
background: #fff;
padding-left: 20rpx;
}
.u-tab-item-active::before {
content: '';
position: absolute;
border-left: 4px solid $u-type-primary;
height: 32rpx;
left: 0;
top: 39rpx;
}
.u-tab-view {
height: 100%;
}
.right-box {
background-color: rgb(250, 250, 250);
}
.page-view {
padding: 16rpx;
}
.class-item {
margin-bottom: 30rpx;
background-color: #fff;
padding: 16rpx;
border-radius: 8rpx;
}
.item-title {
font-size: 26rpx;
color: $u-main-color;
font-weight: bold;
}
.item-menu-name {
font-weight: normal;
font-size: 24rpx;
color: $u-main-color;
}
.item-container {
display: flex;
flex-wrap: wrap;
}
.thumb-box {
width: 33.333333%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 20rpx;
}
.item-menu-image {
width: 120rpx;
height: 120rpx;
}
</style>
<template>
<view class="drag-and-drop-sort-B" :style="[containerSize]">
<template v-if="controlsPositionArray.length !== 0">
<view v-for="(item, index) in controlsArray" :key="index" class="_item" :style="{
background: '#fff',
transition: curretnControlsIndex === index ? 'initial' : '.3s',
'z-index': curretnControlsIndex === index ? 1 : 0,
width: controlsSize.width + 'px',
height: controlsSize.height + 'px',
top: controlsPositionArray[index].top + 'px',
left: controlsPositionArray[index].left + 'px',
}">
<view @touchstart="handleTouchstart($event, index)" @touchmove.prevent="handleTouchmove($event, index)"
@touchend="handleTouchend" @tap="handleTap(index, item)" style="width: 100%; height: 100%;">
<!-- 自定义内容 -->
<view class="item"
style="display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;"
:style="{ backgroundColor: item.show ? '#fff' : '#f5f5f5' }">
<slot :row="item" :index="index"></slot>
</view>
</view>
</view>
</template>
<!-- <u-action-sheet
:list="sheetList"
v-model="sheetShow"
:cancel-btn="false"
class="action-sheet"
@click="sheetChange"
></u-action-sheet> -->
</view>
</template>
<script>
export default {
name: 'drag-and-drop-sort',
props: {
// 容器大小
// containerSize: {
// type: Object,
// default: () => ({ wdith: '120px', height: '40px' }),
// },
// 控件的大小
controlsSize: {
type: Object,
default: () => ({ width: 0, height: 0 }),
},
// 数据列表
controlsList: {
type: Array,
default: () => [],
},
// 是否为导入方式进入
isUpload: {
type: Boolean,
default: false,
},
},
emits: ['sheet-del', 'sheet-edit', 'sheet-copy', 'height-change'],
data() {
return {
sheetShow: false,
sheetList: [
{
text: '修改规格',
},
{
text: '复制',
},
{
text: '删除',
},
],
// 控件列表
controlsArray: [],
// 每行最大存放的个数
maxWidthCount: 1,
// 控件的间距
margin: {
margin_x: 0,
margin_y: 2,
},
// 记录所有控件的初始位置
recordInitControlsPoisitonList: [],
// 控件的数据
controlsPositionArray: [],
// 记录当前手指的位置
recordPosition: {
x: 0,
y: 0,
},
// 记录当前操作的控件数据
recordControlsPositionItem: {},
// 当前操作的控件的下标
curretnControlsIndex: -1,
containerSize: {
wdith: '80px',
height: '',
},
systemInfo: undefined,
sheetIndex: 0,
};
},
mounted() {
this.init();
},
methods: {
init() {
// 获取系统信息
this.systemInfo = uni.getSystemInfoSync();
// 获取控件列表
this.controlsArray = this.controlsList;
// 初始化控件的位置
this.controlsPositionArray = this.initControlsPosition();
},
/** 初始化各个控件的位置 */
initControlsPosition() {
// 用于返回出去的新数组
let tempArray = [];
// 设置控件位置
for (let i = 0, j = 0; i < this.controlsList.length; i++, j++) {
tempArray[i] = {
left: this.margin.margin_x,
top:
j * (this.controlsSize.height + this.margin.margin_y) +
this.margin.margin_y,
};
}
// 记录数据 - 进行深拷贝
this.recordInitControlsPoisitonList = [...tempArray];
// 返回数据
// console.log(tempArray, 'tempArray');
return tempArray;
},
// 点击操作
handleTap(index, item) {
let that = this;
if (that.isUpload) return
// console.log(that.controlsArray, index);
if (index == that.controlsArray.length - 1) return;
that.controlsArray.forEach((item, i) => {
if (i !== index) item.show = false;
});
that.controlsArray[index].show = true;
// that.sheetShow = true;
that.sheetIndex = index;
uni.showActionSheet({
itemList: ['修改规格', '复制', '删除'],
success: function (res) {
that.sheetChange(res.tapIndex, item);
},
fail: function (res) {
console.log(res.errMsg);
},
});
},
// 点击选择操作
sheetChange(index, item) {
let that = this;
switch (index) {
case 0:
that.$emit('sheet-edit', that.sheetIndex);
break;
case 1:
that.$emit('sheet-copy', that.sheetIndex);
break;
case 2:
that.$emit('sheet-del', that.sheetIndex, item);
break;
}
},
/** 处理手指触摸后移动 */
handleTouchmove(event, index) {
if (this.isUpload) return
if (index == this.controlsArray.length - 1) return;
const { pageX, pageY } = event.touches[0];
// 获取移动的差
this.controlsPositionArray[this.curretnControlsIndex] = {
left:
this.controlsPositionArray[this.curretnControlsIndex].left +
(pageX - this.recordPosition.x),
top:
this.controlsPositionArray[this.curretnControlsIndex].top +
(pageY - this.recordPosition.y),
};
// 记录位置
this.recordPosition = { x: pageX, y: pageY };
// 判断当前移动的位置是否需要进行排序
if (
this.controlsPositionArray[this.curretnControlsIndex].top >=
this.recordInitControlsPoisitonList[this.recordInitControlsPoisitonList.length - 1]
.top
)
return;
if (
this.curretnControlsIndex !== this.controlsPositionArray.length - 1 &&
this.controlsPositionArray[this.curretnControlsIndex].top >
this.controlsPositionArray[this.curretnControlsIndex + 1].top
) {
// 向下移动
// 交换位置
this._handleChangeControlsPosition(0, this.curretnControlsIndex + 1);
}
// 向上移动
else if (
this.curretnControlsIndex !== 0 &&
this.controlsPositionArray[this.curretnControlsIndex].top <
this.controlsPositionArray[this.curretnControlsIndex - 1].top
) {
// 交换位置
this._handleChangeControlsPosition(0, this.curretnControlsIndex - 1);
}
},
/** 处理手指触摸开始事件 */
handleTouchstart(event, index) {
if (this.isUpload) return
if (index == this.controlsArray.length - 1) return;
const { pageX, pageY } = event.touches[0];
// 记录一些数据
this.curretnControlsIndex = index;
this.recordPosition = { x: pageX, y: pageY };
this.recordControlsPositionItem = this.controlsPositionArray[index];
},
/** 处理手指松开事件 */
handleTouchend(event) {
// 将操控的控件归位
this.controlsPositionArray[
this.curretnControlsIndex
] = this.recordInitControlsPoisitonList[this.curretnControlsIndex];
this.curretnControlsIndex = -1;
},
// 达到最后一个返回原位
handleReturn(index) {
let i = this.controlsArray.length - 2;
let arr = this.controlsArray[index];
this.controlsArray.splice(i, 1);
this.controlsArray.splice(index, 0, arr);
},
/**
* 处理交换控件位置的方法 -
* @param {number} index 需要与第几个下标交换位置
* */
_handleChangeControlsPosition(type, index) {
// 记录当前操控的控件数据
let tempControls = this.controlsArray[this.curretnControlsIndex];
// 设置原来位置的数据
this.controlsArray[this.curretnControlsIndex] = this.controlsArray[index];
// 将临时存放的数据设置好
this.controlsArray[index] = tempControls;
// 调整控件位置数据
this.controlsPositionArray[index] = this.controlsPositionArray[
this.curretnControlsIndex
];
this.controlsPositionArray[this.curretnControlsIndex] = this.recordControlsPositionItem;
// 改变当前选中的位置
this.curretnControlsIndex = index;
// 记录新位置的数据
this.recordControlsPositionItem = this.recordInitControlsPoisitonList[
this.curretnControlsIndex
];
},
},
watch: {
controlsArray: {
handler: function () {
let that = this;
this.controlsPositionArray = that.initControlsPosition();
},
deep: true,
immediate: true,
},
// 监听数组, 大于15条时,增加高度
controlsList: {
handler: function () {
let that = this;
// that.$emit('height-change');
// if (that.controlsPositionArray.length > 17) that.$emit('height-change', 28);
// else that.$emit('height-change', 40);
},
deep: true,
immediate: true,
},
},
};
</script>
<style scoped lang="scss">
$sheet-heigth: var(--window-bottom);
.drag-and-drop-sort-B {
position: relative;
._item {
position: absolute;
}
}
// .action-sheet {
// position: fixed;
// bottom: 50px;
// z-index: 99;
// overflow-y: scroll;
// -webkit-overflow-scrolling: touch;
// }
</style>
<template>
<u-popup
v-model="show"
mode="bottom"
length="90%"
:mask-close-able="false"
closeable
@close="handleClose"
>
<view>
<view
style="width: 90%; height: 50px; position: fixed; top: 0; z-index: 1; background-color: #fff;"
>
<uni-search-bar
v-model="searchQuery.keyword"
placeholder="输入搜索商品"
bgColor="#EEEEEE"
clearButton="auto"
cancelButton="none"
@confirm="search"
/>
</view>
<view style="height: 120rpx"></view>
<view v-if="searchList.length !== 0">
<goodsItem
v-for="item in searchList"
:src="item.picUrl"
:name="item.name"
:brief="item.brief"
:counterPrice="item.counterPrice"
:retailPrice="item.retailPrice"
@tap="searchGoods(item)"
/>
<view style="padding-bottom: 40rpx;">
<u-loadmore :status="status" icon-type="flower" @loadmore="loadMore" />
</view>
</view>
<view v-else><u-loadmore status="nomore" icon-type="flower" /></view>
</view>
</u-popup>
</template>
<script lang="ts" setup>
import { ref, reactive } from 'vue';
import { getGoodsList } from '@/api/category';
import goodsItem from '@/components/goodsItem.vue';
let props = defineProps({
show: {
type: Boolean,
default: false,
},
});
let emits = defineEmits(['search-close', 'cateGoryGoods']);
let searchQuery = reactive({
keyword: '',
page: 1,
limit: 10,
categoryId: 0,
});
let status = ref('loadmore');
let total = ref(0);
let searchList = ref([] as any);
let search = (val: any) => {
searchList.value = [];
searchQuery.page = 1;
searchQuery.keyword = val.value;
initList();
};
let searchGoods = (item: any) => {
emits('search-close', false);
emits('cateGoryGoods', item);
};
// 点击加载更多 status = loadmore 时生效
let loadMore = () => {
// 判断是否还有下一页数据
if (searchQuery.page * searchQuery.limit >= total.value) return (status.value = 'nomore');
// // 判断是否正在请求其它数据,如果是,则不发起额外的请求
if (status.value === 'loading') return;
searchQuery.page += 1;
initList();
};
let initList = () => {
status.value = 'loading';
getGoodsList(searchQuery).then((res: any) => {
if (res.data.data.total > 10) status.value = 'loadmore';
else status.value = 'nomore';
if (res.data.code === 200) {
total.value = res.data.data.total;
searchList.value = [...searchList.value, ...res.data.data.list];
}
});
};
let handleClose = () => {
searchList.value = [];
emits('search-close', false);
};
defineExpose({
searchQuery,
initList,
});
</script>
<style></style>
<template>
<u-popup v-model="showTitle" mode="center" height="380rpx" width="80%">
<view style="padding: 30rpx 30rpx 0 30rpx; height: 100%;">
<view style="font-size: 34rpx; width: 100%; text-align: center; margin-bottom: 20rpx;">
设置产品线名称
</view>
<u-form label-width="110">
<u-form-item label="名称:">
<u-input v-model="title" :type="type" :border="true" clearable placeholder="请输入名称" />
</u-form-item>
</u-form>
<u-button :maxlength="11" type="error" style="margin-top: 40rpx;" @tap="saveTitle">
保存
</u-button>
</view>
</u-popup>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useStore, useLineStore } from '@/store/useStore';
let store = useStore();
let store1 = useLineStore();
let showTitle = ref(false);
// let title = ref(store.title);
let title = ref(store1.title);
let type = ref('text');
let saveTitle = () => {
if (title.value) {
store1.$patch({
title: title.value,
});
uni.showToast({
title: '设置成功',
icon: 'none',
});
showTitle.value = false;
} else {
uni.showToast({
title: '设置失败',
icon: 'none',
});
}
};
defineExpose({
showTitle,
title
});
</script>
<style>
</style>
...@@ -107,7 +107,7 @@ let toGoods = (data: any) => { ...@@ -107,7 +107,7 @@ let toGoods = (data: any) => {
let toProductLine = (id: any) => { let toProductLine = (id: any) => {
uni.reLaunch({ uni.reLaunch({
url: '../productLine1/index?id=' + id + '&collectionId=0', url: '../productLine/index?id=' + id + '&collectionId=0',
}); });
}; };
......
declare module 'lodash'
\ No newline at end of file
const CONFIG: any = { const CONFIG: any = {
// 开发环境配置 // 开发环境配置
development: { development: {
assetsPath: 'http://192.168.60:81', // 静态资源路径 assetsPath: 'http://192.168.60:81', // 静态资源路径
// baseUrl: 'http://192.168.0.9:8089', // 后台接口请求地址 // baseUrl: 'http://192.168.0.9:8089', // 后台接口请求地址
baseUrl: 'http://192.168.0.60:81', // 后台接口请求地址 baseUrl: 'http://192.168.0.60:81', // 后台接口请求地址
hostUrl: 'http://192.168.0.60:81', // H5地址(前端运行地址) hostUrl: 'http://192.168.0.60:81', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址 websocketUrl: '', // websocket服务端地址
}, },
// 生产环境配置 // 生产环境配置
production: { production: {
assetsPath: '', // 静态资源路径 assetsPath: '', // 静态资源路径
baseUrl: '', // 后台接口请求地址 baseUrl: '', // 后台接口请求地址
// baseUrl: 'https://api.test.siccat.com/api/graphql', // baseUrl: 'https://api.test.siccat.com/api/graphql',
hostUrl: '', // H5地址(前端运行地址) hostUrl: '', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址 websocketUrl: '', // websocket服务端地址
}, },
} }
export default CONFIG[process.env.NODE_ENV] export default CONFIG[process.env.NODE_ENV]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论