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> <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="good-popup">
<view class="head-title"> <view class="head-title">
{{datas.is_bulk ? '称重商品' : '计件商品'}} {{datas.is_bulk ? '称重商品' : '计件商品'}}
@ -20,20 +20,24 @@
<view>小计</view> <view>小计</view>
<view style="color: #F55726;">¥ {{subtotal}}</view> <view style="color: #F55726;">¥ {{subtotal}}</view>
</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>商品重量<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>
<view v-else class="row" style="margin-bottom: 60rpx;"> <view v-else class="row">
<view>商品数量<text style="color: #F55726;">*</text></view> <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>
<view class="row"> <view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
<view style="width: 30%;margin-right: 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>
<view style="flex: 1;"> <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>
</view> </view>

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="view-popup"> <view class="view-popup">
<!-- #ifdef MP-WEIXIN --> <!-- #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 --> <!-- #endif -->
<!-- #ifndef MP-WEIXIN --> <!-- #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 --> <!-- #endif -->
<view class="center"> <view class="center">
<slot></slot> <slot></slot>

View File

@ -1,146 +1,114 @@
{ {
"easycom": { "easycom": {
"autoscan": true, "autoscan": true,
// customhttps://ask.dcloud.net.cn/question/131175 // customhttps://ask.dcloud.net.cn/question/131175
"custom": { "custom": {
"^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue", "^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "@/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" "^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue"
} }
}, },
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "购物", "navigationBarTitleText": "购物",
"disableScroll": true, "disableScroll": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/cart/cart", "path": "pages/cart/cart",
"style": { "style": {
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/my/my", "path": "pages/my/my",
"style": { "style": {
"navigationBarTitleText": "个人中心", "navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
], ],
"subPackages": [{ "subPackages": [{
"root": "pagesOrder", "root": "pagesOrder",
"pages": [{ "pages": [{
"path": "order/order", "path": "order/order",
"style": { "style": {
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "detail/detail", "path": "detail/detail",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "addressList/addressList", "path": "addressList/addressList",
"style": { "style": {
"navigationBarTitleText": "地址管理", "navigationBarTitleText": "地址管理",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "addressEdit/addressEdit", "path": "addressEdit/addressEdit",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "settle/settle", "path": "settle/settle",
"style": { "style": {
"navigationBarTitleText": "确认订单", "navigationBarTitleText": "确认订单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
] ]
}, },
{ {
"root": "pageQuota", "root": "pageQuota",
"pages": [{ "pages": [{
"path": "quotation/index", "path": "quotation/index",
"style": { "style": {
"navigationBarTitleText": "报价单", "navigationBarTitleText": "报价单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "quotation/detail", "path": "quotation/detail",
"style": { "style": {
"navigationBarTitleText": "报价明细", "navigationBarTitleText": "报价明细",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
] ]
} }
] ],
},
"globalStyle": {
], "navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"globalStyle": { "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black", "backgroundColor": "#fff"
"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": {}
} }

View File

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

View File

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

View File

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