diff --git a/README.md b/README.md new file mode 100644 index 0000000..ec8ba82 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +维伦 \ No newline at end of file diff --git a/api/page/cart.js b/api/page/cart.js index 120a63c..b82b3b1 100644 --- a/api/page/cart.js +++ b/api/page/cart.js @@ -27,4 +27,9 @@ export const toCartApi = async (listId, productId) => { product_id: productId }) } - +export const submitHighIntentApi = async (list_id, intent_remark = '') => { + return await post(`${prefix}submit-high-intent`, { list_id, intent_remark }) +} +export const savePreferSkuApi = async (params) => { + return await post(`${prefix}save-prefer-sku`, params) +} diff --git a/api/page/product.js b/api/page/product.js index 9ed451b..30ab55e 100644 --- a/api/page/product.js +++ b/api/page/product.js @@ -1,5 +1,5 @@ -import {get} from '../request'; +import {get, post} from '../request'; const prefix = 'product/' @@ -12,3 +12,6 @@ export const getCategoryListByPidApi = async (pid = 0) => { export const getProductDetailApi = async (id = 0, p_user_id = 0) => { return await get(`${prefix}detail`, {id, p_user_id}) } +export const productViewApi = async (id) => { + return await post(`${prefix}view`, { id }) +} diff --git a/api/page/user.js b/api/page/user.js index 9916daa..7e842a2 100644 --- a/api/page/user.js +++ b/api/page/user.js @@ -15,3 +15,6 @@ export const updateNickNameApi = async (nick_name) => { nick_name }) } +export const updateProfileApi = async (nick_name, avatar) => { + return await post(`${prefix}update-profile`, { nick_name, avatar }) +} diff --git a/pages.json b/pages.json index 09465e4..f1bc9c3 100644 --- a/pages.json +++ b/pages.json @@ -63,6 +63,12 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/cart/quote", + "style": { + "navigationBarTitleText": "查看报价" + } + }, { "path": "pages/search/search", "style": { diff --git a/pages/cart/cart.vue b/pages/cart/cart.vue index dbaf3c9..2ae1714 100644 --- a/pages/cart/cart.vue +++ b/pages/cart/cart.vue @@ -29,6 +29,11 @@ {{ item.created_at }} + + 已申请 + 已报价 + 报价中 + @@ -319,6 +324,35 @@ view, scroll-view, text, image { font-family: Arial, sans-serif; } +.list-status-badges { + display: flex; + flex-wrap: wrap; + gap: 8rpx; + margin-left: 16rpx; +} + +.list-badge { + font-size: 18rpx; + padding: 2rpx 10rpx; + border-radius: 4rpx; + font-weight: 600; +} + +.list-badge.intent { + color: #B4854D; + background: rgba(180, 133, 77, 0.1); +} + +.list-badge.quoted { + color: #fff; + background: #B4854D; +} + +.list-badge.quoting { + color: #B4854D; + border: 1rpx solid rgba(180, 133, 77, 0.4); +} + .delete-btn { padding: 10rpx; margin-right: -10rpx; /* 增加点击热区修正视觉位置 */ diff --git a/pages/cart/detail.vue b/pages/cart/detail.vue index 8efa240..c91a7dc 100644 --- a/pages/cart/detail.vue +++ b/pages/cart/detail.vue @@ -1,6 +1,5 @@