diff --git a/api/store.js b/api/store.js index 85721a5..cc981d5 100644 --- a/api/store.js +++ b/api/store.js @@ -144,6 +144,20 @@ export function changeCartNum(id, number) { }); } +/* + * 购物车 获取商品规格 + * */ +export function getCartGoodAttr(id, uniqueId) { + return request.get(`/product/attr/${id}?uniqueId=${uniqueId}`) +} + +/* + * 购物车 商品规格修改 + * */ +export function cartGoodChangeAttr(data) { + return request.post('/cart/changeAttr', data) +} + /** * 搜索推荐关键字 */ @@ -196,3 +210,8 @@ export function storeListApi(data) { login: false }); } + +// 商品列表 +export function getHotels(param) { + return request.get('/api/hotelMain/search', param, { login: false }) +} diff --git a/api/user.js b/api/user.js index ab4ac36..a8729e9 100644 --- a/api/user.js +++ b/api/user.js @@ -539,3 +539,18 @@ export function getRechargeApi() { export function getUserCenterBanner() { return request.get("userCenterBanner"); } + + +/* + * 用户积分信息 + */ +export function getUserPointInfo(param) { + return request.get('/user/points/info', param, { login: true }) +} + +/* + * 用户积分记录 + */ +export function getUserPointBill(param) { + return request.get('/user/points/bill', param, { login: true }) +} diff --git a/assets/css/goods.less b/assets/css/goods.less index ed2ccdf..3b5ee89 100644 --- a/assets/css/goods.less +++ b/assets/css/goods.less @@ -54,8 +54,10 @@ } .value { + width: 200rpx; color: #9D9D9D; font-size: 24rpx; + text-align: right; } .red { @@ -180,9 +182,10 @@ .title { width: 160rpx; - padding: 16rpx; - border-right: 2rpx solid #D2D2D2; color: #ADADAD; + .title-cont { + padding: 16rpx; + } } } @@ -191,6 +194,13 @@ } .value { + width: calc(100% - 160rpx); + border-left: 2rpx solid #D2D2D2; + .value-cont { + padding: 16rpx; + } + } + .btn { width: 100%; padding: 16rpx; } diff --git a/assets/css/style.less b/assets/css/style.less index c093901..78275cd 100644 --- a/assets/css/style.less +++ b/assets/css/style.less @@ -843,6 +843,8 @@ page { } .goodWrapper .item .text { + display: flex; + flex-flow: column; width: 5.37*100rpx; position: relative; } @@ -866,7 +868,6 @@ page { .goodWrapper .item .text .money { font-size: 0.26*100rpx; - margin-top: 0.17*100rpx; } .goodWrapper .item .text .evaluate { @@ -3254,6 +3255,7 @@ page { .my-order .list .item .item-info .text .money { text-align: right; + color: #333; } .my-order .list .item .totalPrice { @@ -3422,7 +3424,7 @@ page { .order-details .wrapper .item .conter { color: #868686; - width: 5*100rpx; + width: 4.5*100rpx; text-align: right; } diff --git a/components/CheckboxIcon.vue b/components/CheckboxIcon.vue index e06a8c2..1ff67c1 100644 --- a/components/CheckboxIcon.vue +++ b/components/CheckboxIcon.vue @@ -1,6 +1,6 @@ @@ -19,6 +19,11 @@ export default { } } }, + data() { + return { + webUrl: Object.freeze(this.$VUE_APP_RESOURCES_URL) + } + }, computed: { isSelected: function() { return this.defaultState diff --git a/components/Coupons.vue b/components/Coupons.vue index bd82d9e..fbe4d2c 100644 --- a/components/Coupons.vue +++ b/components/Coupons.vue @@ -1,21 +1,35 @@ @@ -26,16 +47,26 @@ import Coupons from '@/components/Coupons.vue' export default { name: 'CouponsPopup', - components: {SubSection, Coupons}, + components: { SubSection, Coupons }, props: { twoList: { type: Object, - default: {} + default: { + usable: [], + unusable: [] + } + } + }, + data() { + return { + webUrl: this.$VUE_APP_RESOURCES_URL, + current: 0, + couponId: uni.getStorageSync('couponId') || 0 } }, computed: { list() { - let temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable'] + const temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable'] return this.$global.deepClone(temp) }, canUse() { @@ -45,44 +76,20 @@ export default { return this.twoList['unusable'].length } }, - watch: { - current() { - this.selectCoupon(this.couponId) - } - }, - data() { - return { - webUrl: this.$VUE_APP_RESOURCES_URL, - current: 0, - couponId: 0 - } - }, - mounted() { - this.couponId = uni.getStorageSync('couponId') || 0 - this.selectCoupon(this.couponId) - }, methods: { changeNav(index) { this.current = index }, selectCoupon(id) { - const isCancel = this.couponId === id - this.couponId = isCancel ? 0 : id - - this.list?.forEach(item => { - if (!isCancel) { - item.checked = id === item.id - } else { - item.checked = false - } + this.couponId = id + this.list.map(item => { + item.checked = id === item.id }) }, setCoupon() { if (this.current === 1) return - // if (this.couponId !== 0) { - uni.setStorageSync('couponId', this.couponId) - // } - this.$emit('close') + uni.setStorageSync('couponId', this.couponId) + this.$emit('change') } } } diff --git a/components/OrderGoods.vue b/components/OrderGoods.vue index aa7d37b..8f7ddcb 100644 --- a/components/OrderGoods.vue +++ b/components/OrderGoods.vue @@ -1,39 +1,57 @@