diff --git a/api/api.js b/api/api.js
index c70db8b..f830a4e 100644
--- a/api/api.js
+++ b/api/api.js
@@ -13,7 +13,7 @@ import Fly from 'flyio/dist/npm/wx'
// #endif
import { handleLoginFailure } from '@/utils'
-import { VUE_APP_API_URL } from '@/config'
+import { VUE_APP_API_URL, VUE_APP_UPLOAD_URL } from '@/config'
import cookie from '@/utils/cookie'
import { replace } from '@/utils/router'
@@ -155,7 +155,7 @@ export const upload = (options)=>{
...options.headers,
Authorization: 'Bearer ' + token.accessToken,
},
- url:options.url?`${VUE_APP_API_URL}${options.url}`:VUE_APP_API_URL+'/member/user/update-avatar',
+ url:options.url?`${VUE_APP_API_URL}${options.url}`:VUE_APP_UPLOAD_URL,
success:(res)=>resolve(res),
fail:(err)=>reject(err),
complete:()=>uni.hideLoading()
diff --git a/components/Header/index.vue b/components/Header/index.vue
index 20d8b94..51e2df6 100644
--- a/components/Header/index.vue
+++ b/components/Header/index.vue
@@ -12,7 +12,7 @@ import { useRouter } from "@/hooks/useRouter";
import { createAnimation } from "@/utils/utils";
import { useScroll } from "@/hooks/useScroll";
-const HEADER_HEIGHT = 40 // header高度
+const HEADER_HEIGHT = 60 // header高度
const {goBack} = useRouter()
/**
@@ -31,6 +31,10 @@ const {goBack} = useRouter()
*
*/
const props = defineProps({
+ scrollTop:{
+ type:Number,
+ default:()=>0
+ },
systemBarAreaBg: {
type: String,
default: () => '#FFFFFF00' // 透明 #FFFFFF00
@@ -93,7 +97,8 @@ const {
bgChangeColor,
propUp,
showRight,
- leftWidth
+ leftWidth,
+ scrollTop
} = toRefs(props)
const emits = defineEmits(['getSystemInfo', 'animation'])
@@ -198,7 +203,8 @@ const scrollMaskStyle = computed(() => {
// 总高度
const containerHeight = computed(() => {
- return (unref(heightInfo).statusBarHeight + HEADER_HEIGHT)
+ const marginTop = unref(menuInfo).height > 0 ? `${((HEADER_HEIGHT - unref(menuInfo).height))/2}` : 0
+ return (unref(heightInfo).statusBarHeight + HEADER_HEIGHT - marginTop)
})
let animation
@@ -208,7 +214,6 @@ function doCreateAnimation() {
animation = createAnimation(0, scrollEnd, 0, 1)
}
-const {scrollTop} = useScroll();
watch(scrollTop, () => {
if (!bgChangeByScroll.value) return
if (!animation) doCreateAnimation()
diff --git a/components/LazyImage/index.vue b/components/LazyImage/index.vue
new file mode 100644
index 0000000..c1bb8f0
--- /dev/null
+++ b/components/LazyImage/index.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/ListLoadLoading/index.vue b/components/ListLoadLoading/index.vue
index 299f4b9..e9d9821 100644
--- a/components/ListLoadLoading/index.vue
+++ b/components/ListLoadLoading/index.vue
@@ -7,11 +7,14 @@
-->
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/activity/activity.vue b/components/activity/activity.vue
index e0159b2..0232c19 100644
--- a/components/activity/activity.vue
+++ b/components/activity/activity.vue
@@ -19,7 +19,7 @@
diff --git a/components/good-attr-select/good-attr-select.vue b/components/good-attr-select/good-attr-select.vue
index 2099450..f779861 100644
--- a/components/good-attr-select/good-attr-select.vue
+++ b/components/good-attr-select/good-attr-select.vue
@@ -44,12 +44,13 @@
>
@@ -62,12 +63,13 @@
@@ -89,7 +91,7 @@
{{ item.attrName }}
-
+
{
const detail = await getProductDetail(id)
@@ -157,6 +166,9 @@ const handleGetDetail = async (id) => {
selectedAttr.value = unref(defaultSelectAttrStr).split(',')
curAttr.value = productValue.value[defaultSelectAttrStr.value]
}
+ if(storeNum.value>curAttr.value.stock){
+ storeNum.value = curAttr.value.stock
+ }
}
}
@@ -164,6 +176,12 @@ const handleSelectAttr = (index, attr) => {
selectedAttr.value[index] = attr
let selectedAttrStr = selectedAttr.value.join(',')
curAttr.value = productValue.value[selectedAttrStr]
+ if(storeNum.value === 0 && curAttr.value.stock >0){
+ storeNum.value = 1
+ }
+ if(storeNum.value>curAttr.value.stock){
+ storeNum.value = curAttr.value.stock
+ }
}
const handleSubmit = () => {
@@ -180,20 +198,21 @@ const handleSubmit = () => {
// })
// return
// }
- let selectedAttrStr = selectedAttr.value.join(',')
- emit('submit', {
- store: productValue.value[selectedAttrStr],
- num: storeNum.value
- })
- emit('select', {
- store: productValue.value[selectedAttrStr],
- num: storeNum.value
- })
- emit('onSelect', {
- store: productValue.value[selectedAttrStr],
- num: storeNum.value
- })
-
+ if(curAttr.value.stock!==0 && storeNum.value!==0){
+ let selectedAttrStr = selectedAttr.value.join(',')
+ emit('submit', {
+ store: productValue.value[selectedAttrStr],
+ num: storeNum.value
+ })
+ emit('select', {
+ store: productValue.value[selectedAttrStr],
+ num: storeNum.value
+ })
+ emit('onSelect', {
+ store: productValue.value[selectedAttrStr],
+ num: storeNum.value
+ })
+ }
}
const {toast} = useInterface()
@@ -208,13 +227,11 @@ function handleCartNumberInputChange(e, item) {
const value = Number(e.detail.value)
if (value <= 0) {
storeNum.value = 1
- toast({title: '至少选一件哦~'})
- }
- if (value > item.stock) {
+ } else if (value > item.stock) {
storeNum.value = item.stock
- toast({title: '超出库存啦~'})
+ } else {
+ storeNum.value = value
}
- storeNum.value = value
}
/**
@@ -225,13 +242,18 @@ function handleCartNumberInputChange(e, item) {
*/
function handleCartNumberChange(item, type = 'plus') {
if (type === 'plus') {
- // +
- if (storeNum.value + 1 > item.stock) return toast({title: '超出库存啦~'})
- storeNum.value += 1
+ if (storeNum.value + 1 > item.stock){
+ storeNum.value =item.stock
+ } else{
+ storeNum.value += 1
+ }
+
} else {
- // -
- if (storeNum.value - 1 <= 0) return toast({title: '至少选一件哦~'})
- storeNum.value -= 1
+ if (storeNum.value - 1 <= 0){
+ storeNum.value = 1
+ } else {
+ storeNum.value -= 1
+ }
}
}
@@ -268,8 +290,9 @@ defineExpose({
}
.attr-info {
- flex: 1;
+ max-width: calc(100% - 150rpx - 30rpx);
display: flex;
+ flex: 1;
flex-direction: column;
justify-content: space-between;
margin-left: 30rpx;
@@ -277,6 +300,11 @@ defineExpose({
font-size: 28rpx;
line-height: 40rpx;
color: #333333;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-line-clamp: 2;
}
&-bottom {
@@ -304,12 +332,13 @@ defineExpose({
}
&-attr {
- padding: 40rpx 30rpx;
+ padding: 40rpx 30rpx 10rpx 0;
&.row {
display: flex;
align-items: center;
justify-content: space-between;
+ padding-bottom: 40rpx;
.goodAttrSelect-attr-title {
margin-bottom: 0;
@@ -317,7 +346,7 @@ defineExpose({
}
&-title {
- margin-bottom: 30rpx;
+ margin:0 0 30rpx 30rpx;
}
&-content {
@@ -341,7 +370,7 @@ defineExpose({
display: flex;
justify-content: center;
align-items: center;
-
+ margin: 0 0 30rpx 30rpx;
&.check {
background: #333333;
color: #fff;
@@ -363,20 +392,33 @@ defineExpose({
.button {
font-size: 32rpx;
- width: 34rpx;
+ width: 40rpx;
aspect-ratio: 1/1;
border-radius: 5rpx;
- border: 2rpx solid #cccccc;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
transition: all .3s;
+ border: 1px solid #999999;
&:active {
scale: 1.2;
}
+ &.disabled{
+ border-color: #dddddd;
+ :deep(.uv-icon__icon){
+ color: #dddddd !important;
+ }
+ &:active {
+ scale: 1;
+ }
+ }
}
}
+.gap{
+ gap: 20rpx;
+}
+
diff --git a/components/good-coupon-select/good-coupon-select.vue b/components/good-coupon-select/good-coupon-select.vue
index 49a2d1d..8119e2c 100644
--- a/components/good-coupon-select/good-coupon-select.vue
+++ b/components/good-coupon-select/good-coupon-select.vue
@@ -6,15 +6,15 @@
>
-
+
-
+
暂时没有可领取的优惠券~
@@ -31,7 +31,7 @@ import Empty from "@/components/Empty/index.vue"
import { getProductCoupon } from "@/api/coupon";
import CouponItem from "@/pages/discountCoupon/components/CouponItem.vue";
import Popup from '@/components/Popup/index.vue';
-import emptyIcon from "@/static/icon/empty/优惠券.png";
+import { emptyCouponIcon } from "@/utils/images";
const props = defineProps(["id"])
@@ -91,6 +91,9 @@ defineExpose({
padding: 24rpx;
box-sizing: border-box;
width: 100%;
+ .coupon-list {
+ margin-bottom: 24rpx;
+ }
}
diff --git a/components/goods/goods.vue b/components/goods/goods.vue
index fb80588..87b3594 100644
--- a/components/goods/goods.vue
+++ b/components/goods/goods.vue
@@ -29,7 +29,7 @@
>
{{ data.attrInfo.sku }}
-
+
@@ -368,6 +368,9 @@ const handleSelectAttr = () => {
font-size: 24rpx;
color: #999999;
margin-right: 10rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
&-value {
@@ -375,6 +378,7 @@ const handleSelectAttr = () => {
font-size: 24rpx;
color: #333333;
margin-right: 10rpx;
+ display: -webkit-box;
}
&-action {
diff --git a/components/goodsComponents/Goods.vue b/components/goodsComponents/Goods.vue
index ba1294d..afd5784 100644
--- a/components/goodsComponents/Goods.vue
+++ b/components/goodsComponents/Goods.vue
@@ -6,7 +6,8 @@
@update: 2023-11-02 18:30
-->
-
diff --git a/components/refund-order/refund-order.vue b/components/refund-order/refund-order.vue
index 7043153..25297dc 100644
--- a/components/refund-order/refund-order.vue
+++ b/components/refund-order/refund-order.vue
@@ -42,7 +42,7 @@
:class="data.state === 3 && 'color-y'"
>{{ data.state === 3 ? '成功退款' : '待平台处理' }}
- {{ data.state === 3 ? '成功' : '' }}退款¥{{data.refundAmount}}
+ {{ data.state === 3 ? '成功' : '' }}退款¥{{data.refundAmount.toFixed(2)}}
@@ -52,14 +52,14 @@
删除记录
撤销申请
@@ -88,17 +88,20 @@
+
diff --git a/pages/bargaining/bargaining.vue b/pages/bargaining/bargaining.vue
index 13a4e49..47606c2 100644
--- a/pages/bargaining/bargaining.vue
+++ b/pages/bargaining/bargaining.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/collect/collect.vue b/pages/collect/collect.vue
index 8f8c1de..931f66d 100644
--- a/pages/collect/collect.vue
+++ b/pages/collect/collect.vue
@@ -1,12 +1,8 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- 您还没有收藏的商品~
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 您还没有收藏的商品~
+
+
+
+
@@ -112,6 +110,8 @@
@confirm="toDelete"
@cancel="toCancelDelete"
>
+
+
@@ -123,20 +123,23 @@ import Modal from '@/components/Modal/index.vue'
import { usePage } from '@/hooks'
import Empty from "@/components/Empty/index.vue";
-import emptyIcon from '@/static/icon/empty/收藏.png'
+import {emptyCollectIcon} from "@/utils/images";
import { useRouter } from "@/hooks/useRouter";
import { useInterface } from "@/hooks/useInterface";
+import ReturnTop from "@/components/ReturnTop/index.vue";
+import { useScroll } from "@/hooks/useScroll";
+import Header from "@/components/Header/index.vue";
const {goBack, push} = useRouter()
const {type, refresh, dataList} = usePage(collectPage)
const {toast} = useInterface();
-
+const {scrollTop} = useScroll()
const options = ref([{
text: '删除',
style: {
- backgroundColor: '#f56c6c'
+ backgroundColor: '#ee6d46'
}
}])
@@ -319,4 +322,18 @@ onLoad(async (option) => {
}
}
}
+.collect :deep(.uv-swipe-action-item__right__button__wrapper) {
+ position: relative;
+ &:before {
+ position: absolute;
+ content: '';
+ background: url("https://b2c-pro-static-dev.zkthink.com/static/images/delete_icon.png") no-repeat center center;
+ width: 50rpx;
+ height: 50rpx;
+ background-size: contain;
+ }
+}
+.collect :deep(.uv-swipe-action-item__right__button__wrapper__text) {
+ visibility: hidden;
+}
diff --git a/pages/createAddress/createAddress.vue b/pages/createAddress/createAddress.vue
index 7e3a1b9..89b7c1a 100644
--- a/pages/createAddress/createAddress.vue
+++ b/pages/createAddress/createAddress.vue
@@ -203,6 +203,7 @@ const onSave = async () => {
if (actionType.value == 'select') {
push({url: '/pages/address/address'}, {data: {type: 'select'},type:'redirectTo'})
} else {
+ main.getAddressList(1)
goBack()
}
} catch (error) {
diff --git a/pages/discount/discount.vue b/pages/discount/discount.vue
index 7cc9fea..d690011 100644
--- a/pages/discount/discount.vue
+++ b/pages/discount/discount.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/discountCoupon/components/CouponItem.vue b/pages/discountCoupon/components/CouponItem.vue
index 5e0ddcc..964a2a0 100644
--- a/pages/discountCoupon/components/CouponItem.vue
+++ b/pages/discountCoupon/components/CouponItem.vue
@@ -91,7 +91,7 @@ const goToProduct = (coupons) => {
.coupon-item {
width: 100%;
aspect-ratio: 682/176;
- background: url("@/static/background/coupon-bg.png") no-repeat ;
+ background: url("https://b2c-pro-static-dev.zkthink.com/static/background/coupon-bg.png") no-repeat ;
background-size: 100%;
padding: 25rpx 60rpx;
box-sizing: border-box;
diff --git a/pages/discountCoupon/index.vue b/pages/discountCoupon/index.vue
index a298c01..5108573 100644
--- a/pages/discountCoupon/index.vue
+++ b/pages/discountCoupon/index.vue
@@ -11,10 +11,13 @@ import { onLoad } from '@dcloudio/uni-app'
import { useRouter } from "@/hooks/useRouter";
const {goBack} = useRouter();
+const {scrollTop} = useScroll()
import { useDiscountCoupon } from "@/pages/discountCoupon/index.utils";
import CouponItem from "@/pages/discountCoupon/components/CouponItem.vue";
import Empty from "@/components/Empty/index.vue"
-import emptyIcon from '@/static/icon/empty/优惠券.png'
+import { emptyCouponIcon } from "@/utils/images";
+import ReturnTop from "@/components/ReturnTop/index.vue";
+import { useScroll } from "@/hooks/useScroll";
const {
tabList,
@@ -42,20 +45,21 @@ const {
-
+
-
+
您暂时没有可使用的优惠券~
+
@@ -76,6 +80,9 @@ const {
padding: 35rpx;
box-sizing: border-box;
width: 100%;
+ .coupon-list {
+ margin-bottom: 24rpx;
+ }
}
}
diff --git a/pages/evaluate/evaluate.vue b/pages/evaluate/evaluate.vue
index 175194d..e855d62 100644
--- a/pages/evaluate/evaluate.vue
+++ b/pages/evaluate/evaluate.vue
@@ -10,11 +10,12 @@
商品评价
-
+
服务评价
@@ -93,7 +95,7 @@ const handleOrderComments = async () => {
icon: "none",
duration: 2000
});
- push({url:'/pages/orderList/orderList'},{data:{type: 3}})
+ goBack()
}
}
diff --git a/pages/flashKilling/flashKilling.vue b/pages/flashKilling/flashKilling.vue
index 61f52d8..38c91c8 100644
--- a/pages/flashKilling/flashKilling.vue
+++ b/pages/flashKilling/flashKilling.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/footprint/footprint.vue b/pages/footprint/footprint.vue
index 62deec9..aa4ac51 100644
--- a/pages/footprint/footprint.vue
+++ b/pages/footprint/footprint.vue
@@ -1,12 +1,8 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 您还没有浏览足迹~
+
+
+
+
+
+
@@ -17,7 +23,7 @@ import UvIcon from "@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue";
商品推荐
-
+
查看更多
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 784f0b6..695a1a7 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -3,13 +3,14 @@
@@ -84,6 +86,7 @@ import Live from './components/Live/index.vue'
import NewProduct from './components/NewProduct/index.vue'
import Seckill from './components/Seckill/index.vue'
import Recommend from "./components/Recommend/index.vue";
+import ReturnTop from "@/components/ReturnTop/index.vue"
import UvIcon from "@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue";
import { useScroll } from "@/hooks/useScroll";
@@ -123,7 +126,7 @@ onLoad(() => {
doGetHomeData()
})
-useScroll()
+const {scrollTop} = useScroll()
@@ -147,7 +150,7 @@ useScroll()
.search-col {
@include useFlex(flex-start, center);
@include usePadding(30, 15);
- width: 320rpx;
+ width: 100%;
height: 60rpx;
border-radius: 50rpx;
background: $white-color;
diff --git a/pages/loading/loading.vue b/pages/loading/loading.vue
index 13a4e49..47606c2 100644
--- a/pages/loading/loading.vue
+++ b/pages/loading/loading.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/login/guid.vue b/pages/login/guid.vue
index 7c8b05e..6d5a5f4 100644
--- a/pages/login/guid.vue
+++ b/pages/login/guid.vue
@@ -6,7 +6,7 @@
@update: 2023-11-08 16:20
-->
diff --git a/pages/streaming/streaming.vue b/pages/streaming/streaming.vue
index 13a4e49..47606c2 100644
--- a/pages/streaming/streaming.vue
+++ b/pages/streaming/streaming.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/pages/submitOrder/components/coupon-select.vue b/pages/submitOrder/components/coupon-select.vue
index fe8e237..793b702 100644
--- a/pages/submitOrder/components/coupon-select.vue
+++ b/pages/submitOrder/components/coupon-select.vue
@@ -37,7 +37,7 @@
暂无可用的优惠券
@@ -56,8 +56,6 @@
-
+
@@ -235,7 +237,7 @@ onLoad(async options => {
@@ -247,7 +249,7 @@ onLoad(async options => {
点击添加地址
@@ -313,8 +315,9 @@ onLoad(async options => {
{{ row.prefix }}
{{ orderDetail["priceGroup"][row.field]?.toFixed(2) }}
diff --git a/pages/submitOrder/submitOrder_old.vue b/pages/submitOrder/submitOrder_old.vue
index 730d89d..21478a7 100644
--- a/pages/submitOrder/submitOrder_old.vue
+++ b/pages/submitOrder/submitOrder_old.vue
@@ -41,7 +41,7 @@
@@ -71,7 +71,7 @@
@@ -101,7 +101,7 @@
@@ -150,7 +150,7 @@
@@ -171,7 +171,7 @@
diff --git a/pages/user/components/GridCard.vue b/pages/user/components/GridCard.vue
index af042dd..55bcdb0 100644
--- a/pages/user/components/GridCard.vue
+++ b/pages/user/components/GridCard.vue
@@ -130,18 +130,19 @@ function toLink(listItem) {
.dot {
z-index: 99;
position: absolute;
- background: red;
+ background: #EE6D46;
color: #fff;
right: 20%;
top: 0;
transform: translateY(-20%);
- font-size: 22rpx;
- width: 35rpx;
- height: 35rpx;
+ font-size: 18rpx;
+ width: 38rpx;
+ height: 38rpx;
text-align: center;
- line-height: 35rpx;
+ line-height: 38rpx;
box-sizing: border-box;
border-radius: 50%;
+ border: 2rpx solid #ffffff;
}
.icon {
diff --git a/pages/user/index.data.js b/pages/user/index.data.js
index 23db0f1..6815270 100644
--- a/pages/user/index.data.js
+++ b/pages/user/index.data.js
@@ -5,22 +5,8 @@
* @description:index.data
* @update: 2023-11-09 15:21
* */
-import toPayIcon from '@/static/images/icon-dfk.png'
-import toFHIcon from '@/static/images/icon-dfh.png'
-import toSHIcon from '@/static/images/icon-dsh.png'
-import toPJIcon from '@/static/images/icon-dpj.png'
-import toZJIcon from '@/static/images/icon-wdzj.png'
-import toYHQIcon from '@/static/images/icon-yhq.png'
-import toSCIcon from '@/static/images/icon-wdsc.png'
-import toZBIcon from '@/static/images/icon-kqzb.png'
-import toTGIcon from '@/static/images/icon-wdtg.png'
-import toKJIcon from '@/static/images/icon-kqjl.png'
-import toSHOIcon from '@/static/images/icon-kqjl.png'
-import toKFIcon from '@/static/images/icon-lxkf.png'
-
-import toDZIcon from '@/static/images/icon-address.png'
-import toZHIcon from '@/static/images/icon-zhsz.png'
+import { toPayIcon, toFHIcon, toSHIcon, toPJIcon, toZJIcon, toYHQIcon, toSCIcon, toZBIcon, toTGIcon, toKJIcon, toSHOIcon, toKFIcon, toDZIcon, toZHIcon } from "@/utils/images";
export const orderIconList = [
{
diff --git a/pages/user/user.vue b/pages/user/user.vue
index 6848688..91624ef 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -12,7 +12,7 @@
>
点击登录
diff --git a/pages/userInfo/index.utlis.js b/pages/userInfo/index.utlis.js
index 5d29f95..83c8159 100644
--- a/pages/userInfo/index.utlis.js
+++ b/pages/userInfo/index.utlis.js
@@ -15,6 +15,7 @@ export function useRequest() {
async function doUpdateAvatar(file) {
try {
await upload({
+ url:'/member/user/update-avatar',
filePath: file.url,
name: 'avatarFile'
});
diff --git a/pages/userInfo/userInfo.vue b/pages/userInfo/userInfo.vue
index 2b39695..c684892 100644
--- a/pages/userInfo/userInfo.vue
+++ b/pages/userInfo/userInfo.vue
@@ -1,11 +1,6 @@
-
+
0){
+ remainTimeStr += `${days}天`
+ }
+ if(hours>0){
+ remainTimeStr += `${hours}小时`
+ }
+ return `还剩${remainTimeStr}自动确认`
+}
+
/**
* 正则检测大陆手机号
* @param phone