This commit is contained in:
weipengfei 2024-05-07 17:27:36 +08:00
parent ecf8f554a7
commit 6b3ce21739
6 changed files with 130 additions and 155 deletions

View File

@ -1,5 +1,5 @@
<template>
<up-popup :show="show" closeable round="10" @close="close">
<up-popup :show="show" closeable round="10" @close="close" :safeAreaInsetBottom="false">
<view class="good-popup">
<view class="head-title">
{{datas.is_bulk ? '称重商品' : '计件商品'}}
@ -20,20 +20,24 @@
<view>小计</view>
<view style="color: #F55726;">¥ {{subtotal}}</view>
</view>
<view v-if="datas.is_bulk" class="row" style="margin-bottom: 60rpx;">
<view v-if="datas.is_bulk" class="row">
<view>商品重量<text style="color: #F55726;">*</text></view>
<view><up-input v-model="datas.cart_num" border="none" placeholder="请输入重量" inputAlign="right"></up-input></view>
<view style="flex: 1;">
<up-input v-model="datas.cart_num" type="number" border="none" placeholder="请输入数量" inputAlign="right"></up-input>
</view>
</view>
<view v-else class="row" style="margin-bottom: 60rpx;">
<view v-else class="row">
<view>商品数量<text style="color: #F55726;">*</text></view>
<view><up-input v-model="datas.cart_num" border="none" placeholder="请输入数量" inputAlign="right"></up-input></view>
<view style="flex: 1;">
<up-input v-model="datas.cart_num" type="number" border="none" placeholder="请输入数量" inputAlign="right"></up-input>
</view>
</view>
<view class="row">
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
<view style="width: 30%;margin-right: 30rpx;">
<up-button @click="close" type="number" color="#f7f7f7"><text style="color: #333;">取消</text></up-button>
<up-button @click="close" color="#f7f7f7"><text style="color: #333;">取消</text></up-button>
</view>
<view style="flex: 1;">
<up-button @click="change" type="number" color="#20b128">确定</up-button>
<up-button @click="change" color="#20b128">确定</up-button>
</view>
</view>
</view>

View File

@ -1,10 +1,10 @@
<template>
<view class="view-popup">
<!-- #ifdef MP-WEIXIN -->
<view v-if="nav" style="width: 100%;" :style="{height: height + 'px'}"></view>
<view v-if="nav" style="width: 100%;background-color: #fff;" :style="{height: height + 'px'}"></view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view v-if="nav" style="width: 100%;height: calc( var(--status-bar-height) + 44px );"></view>
<view v-if="nav" style="width: 100%;height: calc( var(--status-bar-height) + 44px );background-color: #fff;"></view>
<!-- #endif -->
<view class="center">
<slot></slot>

View File

@ -1,146 +1,114 @@
{
"easycom": {
"autoscan": true,
// customhttps://ask.dcloud.net.cn/question/131175
"custom": {
"^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue"
}
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "购物",
"disableScroll": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/cart/cart",
"style": {
"navigationBarTitleText": "购物车",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/my/my",
"style": {
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
"easycom": {
"autoscan": true,
// customhttps://ask.dcloud.net.cn/question/131175
"custom": {
"^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue"
}
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "购物",
"disableScroll": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/cart/cart",
"style": {
"navigationBarTitleText": "购物车",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/my/my",
"style": {
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
],
"subPackages": [{
"root": "pagesOrder",
"pages": [{
"path": "order/order",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": false
}
},
{
"path": "detail/detail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "addressList/addressList",
"style": {
"navigationBarTitleText": "地址管理",
"enablePullDownRefresh": false
}
},
{
"path": "addressEdit/addressEdit",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "settle/settle",
"style": {
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pageQuota",
"pages": [{
"path": "quotation/index",
"style": {
"navigationBarTitleText": "报价单",
"enablePullDownRefresh": false
}
},
{
"path": "quotation/detail",
"style": {
"navigationBarTitleText": "报价明细",
"enablePullDownRefresh": false
}
}
],
"subPackages": [{
"root": "pagesOrder",
"pages": [{
"path": "order/order",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": false
}
},
{
"path": "detail/detail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "addressList/addressList",
"style": {
"navigationBarTitleText": "地址管理",
"enablePullDownRefresh": false
}
},
{
"path": "addressEdit/addressEdit",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "settle/settle",
"style": {
"navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false
}
}
]
},
{
"root": "pageQuota",
"pages": [{
"path": "quotation/index",
"style": {
"navigationBarTitleText": "报价单",
"enablePullDownRefresh": false
}
},
{
"path": "quotation/detail",
"style": {
"navigationBarTitleText": "报价明细",
"enablePullDownRefresh": false
}
}
]
}
]
}
]
},
],
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#fff"
},
// "tabBar": {
// "color": "#999999",
// "selectedColor": "#20b128",
// "borderStyle": "white",
// "backgroundColor": "#FFFFFF",
// "list": [{
// "pagePath": "pages/index/index",
// "text": "首页",
// "iconPath": "static/tab/a.png",
// "selectedIconPath": "static/tab/aa.png"
// },
// {
// "pagePath": "pages/cart/cart",
// "text": "购物车",
// "iconPath": "static/tab/b.png",
// "selectedIconPath": "static/tab/ba.png"
// },
// {
// "pagePath": "pages/my/my",
// "text": "我的",
// "iconPath": "static/tab/c.png",
// "selectedIconPath": "static/tab/ca.png"
// }
// ]
// },
"uniIdRouter": {}
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#fff"
}
}

View File

@ -135,6 +135,7 @@
const animationfinish = ({ detail: { current } }) => {
swiperCurrent.value = current;
tabsActive.value = current;
if(swiperCurrent.value==1) getFrequentlyPurchase();
}
//
@ -252,7 +253,7 @@
frequentlyList.value = res.data;
})
}
getFrequentlyPurchase();
onShow(()=>{
getcartList();

View File

@ -57,7 +57,7 @@
<view class="item u-line-1" :class="{'item-active': leftActive===item.id}"
v-for="(item, index) in goodClassTow" :key="index" @click="changeTwo(item, index)">{{item.name}}
</view>
<view style="width: 100%;height: 300rpx;"></view>
<view style="width: 100%;height: 450rpx;"></view>
</scroll-view>
<view class="right">
<view class="classify">
@ -117,7 +117,7 @@
</view>
</view>
</view>
<view style="width: 100%;height: 300rpx;"></view>
<view style="width: 100%;height: 350rpx;"></view>
</scroll-view>
</view>
</view>
@ -280,7 +280,9 @@
const goodClassTow = ref([]); //
const goodClassThree = ref([]); //
const getgoodClassList = () => {
goodClassListApi().then(res => {
goodClassListApi({
page_size: 1000
}).then(res => {
res.data?.lists?.unshift({
id: "",
name: "全部",

View File

@ -24,7 +24,7 @@ const useUserStore = defineStore("user", () => {
}
// #ifdef H5
token.value = "31f74a72e2d05673ec14d2a6408718ef"
token.value = "95b24dd6d2dda836fe07854b08ba0944"
userInfo.value = {
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
id: 9,
@ -33,7 +33,7 @@ const useUserStore = defineStore("user", () => {
mobile: "19330904744",
nickname: "用户1714964250",
supplier: null,
token: "31f74a72e2d05673ec14d2a6408718ef"
token: "b92ad3d7bdc06fa849dfb2c3c8be824e"
}
// #endif