feat: 添加新功能和优化现有逻辑,增强用户体验
This commit is contained in:
parent
e665c4ced7
commit
742402180b
|
@ -21,7 +21,12 @@ export const cartListApi = (data) => {
|
|||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
//购物车-批发列表
|
||||
export const cartWholesaleListApi = (data) => {
|
||||
return request.get('/order/cart/wholesale_lists', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
//购物车-常买记录
|
||||
export const frequentlyPurchaseApi = (data) => {
|
||||
return request.get('/order/order/frequently_purchase', data);
|
||||
|
|
|
@ -11,3 +11,10 @@ export const goodClassListApi = (data) => {
|
|||
export const storeProductListApi = (data) => {
|
||||
return request.get('/product/product/store_lists', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批发商品列表
|
||||
*/
|
||||
export const storeProductWholesaleListApi = (data) => {
|
||||
return request.get('/product/product/wholesale_lists', data);
|
||||
}
|
|
@ -14,7 +14,8 @@
|
|||
</view>
|
||||
<view class="row">
|
||||
<view>商品单位</view>
|
||||
<view>{{ datas.unit_name }}</view>
|
||||
<view >{{ datas.unit_name }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view>商品价格</view>
|
||||
|
@ -37,7 +38,19 @@
|
|||
<view v-if="datas.is_bulk" class="row" style="height: 100rpx;">
|
||||
<view>购买重量<text style="color: #F55726;">*</text></view>
|
||||
<view style="justify-content: end;">
|
||||
<up-number-box :min="0" v-model="datas.cart_num" @change="valChange"></up-number-box>
|
||||
<up-input
|
||||
type="digit"
|
||||
placeholder="请输入重量"
|
||||
border="surround"
|
||||
v-model="datas.cart_num"
|
||||
@change="valChange"
|
||||
style="width: 100rpx;"
|
||||
>
|
||||
<template #suffix>
|
||||
<span>{{ datas.unit_name }}</span>
|
||||
</template>
|
||||
</up-input>
|
||||
<!-- <up-number-box :min="0.1" :step="0.1" v-model="datas.cart_num" @change="valChange"></up-number-box> -->
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="row" style="height: 100rpx;">
|
||||
|
@ -78,7 +91,7 @@
|
|||
|
||||
})
|
||||
|
||||
const valChange = () => {
|
||||
const valChange = (e) => {
|
||||
uni.vibrateShort();
|
||||
}
|
||||
|
||||
|
@ -87,8 +100,11 @@
|
|||
});
|
||||
const setData = (e) => {
|
||||
datas.value = e;
|
||||
if (Number(e.batch) > 0) datas.value.cart_num = e.batch;
|
||||
else datas.value.cart_num = 1;
|
||||
if (Number(e.batch) > 0) {
|
||||
datas.value.cart_num = e.batch;
|
||||
} else {
|
||||
datas.value.cart_num = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -114,6 +130,11 @@
|
|||
let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props
|
||||
.priceKey
|
||||
.op_price];
|
||||
if (!sell) {
|
||||
sell = datas.value.price
|
||||
num = datas.value.cart_num
|
||||
}
|
||||
|
||||
return Number(num * sell * 100 / 100).toFixed(2)
|
||||
})
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ let BASE_URL
|
|||
let WSS_URL
|
||||
import store from "@/store/user.js"
|
||||
// 环境
|
||||
let env = "dev"
|
||||
// let env = "dev"
|
||||
// let env = "prod"
|
||||
// let env = "release";
|
||||
// let env = "local";
|
||||
let env = "local";
|
||||
|
||||
switch (env) {
|
||||
case 'dev':
|
||||
|
@ -33,6 +33,7 @@ let config = {
|
|||
WSS_URL: WSS_URL,
|
||||
HEADER: {
|
||||
'content-type': 'application/json',
|
||||
'accept':'json',
|
||||
//#ifdef MP
|
||||
'Form-type': 'routine',
|
||||
//#endif
|
||||
|
|
|
@ -121,6 +121,13 @@
|
|||
{
|
||||
"navigationBarTitleText" : "提现申请记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/wholesale/index",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "批发"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</view>
|
||||
<view class="afterSales-goods-right-info">
|
||||
<text class="goods_desc">{{item.unit}}</text>
|
||||
<text class="goods_num">x5</text>
|
||||
<text class="goods_num">x{{item.cart_num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<view class="login-box">
|
||||
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png" @click="test()">
|
||||
</image>
|
||||
<view class="tips">欢迎登录泸优采</view>
|
||||
<view class="tips">欢迎登录蜀优采</view>
|
||||
<block v-if="showWeixin">
|
||||
<up-transition :show="showWeixin">
|
||||
<view class="btn">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<view style="text-align: center;">
|
||||
<image class="logo" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/35adb202404271727457954.png">
|
||||
</image>
|
||||
<view class="tips">欢迎登录泸优采</view>
|
||||
<view class="tips">欢迎登录蜀优采</view>
|
||||
</view>
|
||||
|
||||
<view class='card'>
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
<up-cell title="商品列表" :isLink="true" url="pages/product/product" v-if="userInfo.system_store_id>0"></up-cell>
|
||||
<up-cell title="订单列表" :isLink="true" url="pagesOrder/delivery/index" v-if="userInfo.system_store_id>0"></up-cell>
|
||||
<up-cell title="采购列表" :isLink="true" url="pageQuota/purchase_product_offer/index" v-if="userInfo.delivery_service_id>0"></up-cell>
|
||||
<up-cell title="我要批发" :isLink="true" url="pages/wholesale/index" v-if="userInfo.label_id==99"></up-cell>
|
||||
</up-cell-group>
|
||||
</view>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,7 @@
|
|||
@click="callPhone(store_info.phone)">
|
||||
<view class="top" style="align-items: flex-start;">
|
||||
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
||||
<text style="margin: 0 10rpx;color:#20B128">自提点</text>
|
||||
<text style="margin: 0 10rpx;color:#20B128">配送点</text>
|
||||
</view>
|
||||
<view>
|
||||
<view style="color: #333;">
|
||||
|
|
|
@ -1,5 +1,34 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view class="m-card m-address" style="margin-top: 20rpx;">
|
||||
<view class="address-info"
|
||||
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'>
|
||||
<view class="top" style="align-items: flex-start;">
|
||||
<!-- <view style="color: #333;width: 200rpx;">
|
||||
<view style="margin: 0 10rpx;color:#20B128;width: 150rpx;">配送点</view>
|
||||
<view class="isreser"> {{reservation?"次日可提":"当日可提" }}
|
||||
</view>
|
||||
</view> -->
|
||||
<view>
|
||||
<view style="color: #333;">
|
||||
{{shop_Info.name}}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #333;margin: 10rpx 0;">
|
||||
{{shop_Info.detailed_address}}
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text>{{shop_Info.phone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;"
|
||||
@click="navgo(`/multipleShop/index/index?event=settle&cart_id=${cartStore.cartList.join(',')}`)">
|
||||
切换配送点
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-card good-info">
|
||||
<view class="head-title">商品明细</view>
|
||||
|
||||
|
@ -60,7 +89,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<up-alert v-if="timeContent!=''" type="error" :description="timeContent"></up-alert>
|
||||
<up-notice-bar text= "门店切换已移动到首页,若切换店铺,购物车商品将跟随门店一起切换"></up-notice-bar>
|
||||
<!-- <up-notice-bar text="门店切换已移动到首页,若切换店铺,购物车商品将跟随门店一起切换"></up-notice-bar> -->
|
||||
|
||||
</view>
|
||||
|
||||
|
@ -201,6 +230,7 @@
|
|||
|
||||
// 用户选择的门店信息
|
||||
let STORE_INFO = uni.getStorageSync('STORE_INFO');
|
||||
console.log(STORE_INFO)
|
||||
if (STORE_INFO) {
|
||||
shop_Info.value = JSON.parse(STORE_INFO)
|
||||
} else {
|
||||
|
@ -494,6 +524,11 @@
|
|||
onShow(() => {
|
||||
getAddressList();
|
||||
})
|
||||
|
||||
uni.$on('settle', function(data) {
|
||||
let datas = JSON.parse(data)
|
||||
shop_Info.value = datas
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
@ -22,6 +22,7 @@ function baseRequest(url, method, data, {
|
|||
url: Url + '/api' + url,
|
||||
method: method || 'GET',
|
||||
header: {
|
||||
accept:'json',
|
||||
...header
|
||||
},
|
||||
data: method != 'GET' ? data || {} : {},
|
||||
|
|
Loading…
Reference in New Issue