diff --git a/yudao-ui-app/api/api.js b/yudao-ui-app/api/api.js index 017325e3e..7432f97f3 100644 --- a/yudao-ui-app/api/api.js +++ b/yudao-ui-app/api/api.js @@ -67,7 +67,7 @@ export function setCouponReceive(couponId) { * @param object data */ export function getCoupons(data) { - return request.get('coupons', data, { + return request.get('front/coupons', data, { noAuth: true }) } diff --git a/yudao-ui-app/api/order.js b/yudao-ui-app/api/order.js index 776f61767..6dd877ae4 100644 --- a/yudao-ui-app/api/order.js +++ b/yudao-ui-app/api/order.js @@ -61,7 +61,7 @@ export function getOrderList(data) { * @param string unique */ export function orderProduct(data) { - return request.post('order/product', data); + return request.post('front/order/product', data); } /** @@ -70,7 +70,7 @@ export function orderProduct(data) { * */ export function orderComment(data) { - return request.post('order/comment', data); + return request.post('front/order/comment', data); } /** @@ -78,7 +78,7 @@ export function orderComment(data) { * @param object data */ export function orderPay(data) { - return request.post('order/pay', data); + return request.post('front/order/pay', data); } /** @@ -105,7 +105,7 @@ export function orderCancel(id) { * */ export function orderDel(uni) { - return request.post('order/del', { + return request.post('front/order/del', { id: uni }, {}, 1); } @@ -124,7 +124,7 @@ export function getOrderDetail(uni) { * */ export function orderAgain(uni) { - return request.post('order/again', { + return request.post('front/order/again', { orderNo: uni }); } @@ -135,7 +135,7 @@ export function orderAgain(uni) { * */ export function orderTake(uni) { - return request.post('order/take', { + return request.post('front/order/take', { id: uni }, {}, 1); } @@ -145,7 +145,7 @@ export function orderTake(uni) { * @returns {*} */ export function express(uni) { - return request.get("order/express/" + uni); + return request.get("front/order/express/" + uni); } /** @@ -153,7 +153,7 @@ export function express(uni) { * */ export function ordeRefundReason() { - return request.get('order/refund/reason'); + return request.get('front/order/refund/reason'); } /** @@ -161,7 +161,7 @@ export function ordeRefundReason() { * @param object data */ export function orderRefundVerify(data) { - return request.post('order/refund', data); + return request.post('front/order/refund', data); } /** @@ -169,7 +169,7 @@ export function orderRefundVerify(data) { * @param string cartId */ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain) { - return request.post('order/confirm', { + return request.post('front/order/confirm', { cartIds: cartId, isNew: isNew, addAgain: addAgain, @@ -185,7 +185,7 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain * */ export function getCouponsOrderPrice(preOrderNo) { - return request.get(`coupons/order/${preOrderNo}`) + return request.get(`front/coupons/order/${preOrderNo}`) } /** @@ -195,7 +195,7 @@ export function getCouponsOrderPrice(preOrderNo) { * */ export function orderCreate(data) { - return request.post('order/create', data); + return request.post('front/order/create', data); } /** @@ -205,7 +205,7 @@ export function orderCreate(data) { * @returns {*} */ export function postOrderComputed(data) { - return request.post("order/computed/price", data); + return request.post("front/order/computed/price", data); } /** @@ -213,7 +213,7 @@ export function postOrderComputed(data) { * @param object data */ export function qrcodeApi(data) { - return request.post('qrcode/str2base64', data, {}, 1); + return request.post('front/qrcode/str2base64', data, {}, 1); } /** @@ -221,7 +221,7 @@ export function qrcodeApi(data) { * @param object data */ export function wechatOrderPay(data) { - return request.post('pay/payment', data); + return request.post('api/front/pay/payment', data); } /** @@ -229,7 +229,7 @@ export function wechatOrderPay(data) { * @param object data */ export function wechatQueryPayResult(data) { - return request.get('pay/queryPayResult?orderNo=' + data); + return request.get('front/pay/queryPayResult?orderNo=' + data); } /** @@ -237,7 +237,7 @@ export function wechatQueryPayResult(data) { * @param object data */ export function applyRefund(orderId) { - return request.get(`order/apply/refund/${orderId}`); + return request.get(`front/order/apply/refund/${orderId}`); } /** @@ -253,5 +253,5 @@ export function preOrderApi(data) { * @param object preOrderNo */ export function loadPreOrderApi(preOrderNo) { - return request.get(`order/load/pre/${preOrderNo}`); + return request.get(`front/order/load/pre/${preOrderNo}`); } diff --git a/yudao-ui-app/libs/order.js b/yudao-ui-app/libs/order.js index 3cdf6af20..92ffabde5 100644 --- a/yudao-ui-app/libs/order.js +++ b/yudao-ui-app/libs/order.js @@ -35,8 +35,9 @@ export function getPreOrder(preOrderType, orderDetails) { "preOrderType": preOrderType, "orderDetails": orderDetails }).then(res => { + // console.log(res.data.columns.preOrderNo,'preOrder') uni.navigateTo({ - url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.preOrderNo + url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.columns.preOrderNo }); }).catch(err => { return util.Tips({ diff --git a/yudao-ui-app/package-lock.json b/yudao-ui-app/package-lock.json index b18489c50..7cacd6942 100644 --- a/yudao-ui-app/package-lock.json +++ b/yudao-ui-app/package-lock.json @@ -1,8 +1,51 @@ { "name": "yudao-ui-app", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "yudao-ui-app", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "clipboard": "^2.0.11" + } + }, + "node_modules/clipboard": { + "version": "2.0.11", + "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "dependencies": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, + "node_modules/delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + }, + "node_modules/good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", + "dependencies": { + "delegate": "^3.1.2" + } + }, + "node_modules/select": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", + "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" + }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + } + }, "dependencies": { "clipboard": { "version": "2.0.11", diff --git a/yudao-ui-app/pages.json b/yudao-ui-app/pages.json index 115212c27..262507037 100644 --- a/yudao-ui-app/pages.json +++ b/yudao-ui-app/pages.json @@ -574,18 +574,18 @@ "borderStyle": "white", "backgroundColor": "#ffffff", "list": [ - // { - // "pagePath": "pages/index/index", - // "iconPath": "static/images/tabbar/nav_icon_shop.png", - // "selectedIconPath": "static/images/1-002.png", - // "text": "商城" - // }, - // { - // "pagePath": "pages/goods_cate/goods_cate", - // "iconPath": "static/images/tabbar/nav_icon_sort.png", - // "selectedIconPath": "static/images/2-002.png", - // "text": "分类" - // }, + { + "pagePath": "pages/index/index", + "iconPath": "static/images/tabbar/nav_icon_shop.png", + "selectedIconPath": "static/images/1-002.png", + "text": "商城" + }, + { + "pagePath": "pages/goods_cate/goods_cate", + "iconPath": "static/images/tabbar/nav_icon_sort.png", + "selectedIconPath": "static/images/2-002.png", + "text": "分类" + }, { "pagePath": "pages/member_application/index", "iconPath": "static/images/2-001.png", @@ -599,12 +599,12 @@ "text": "会员申请", "visible":false }, - // { - // "pagePath": "pages/order_addcart/order_addcart", - // "iconPath": "static/images/tabbar/nav_icon_cart.png", - // "selectedIconPath": "static/images/3-002.png", - // "text": "购物车" - // }, + { + "pagePath": "pages/order_addcart/order_addcart", + "iconPath": "static/images/tabbar/nav_icon_cart.png", + "selectedIconPath": "static/images/3-002.png", + "text": "购物车" + }, { "pagePath": "pages/user/index", "iconPath": "static/images/tabbar/nav_icon_my.png", diff --git a/yudao-ui-app/pages/index/index.vue b/yudao-ui-app/pages/index/index.vue index d4c5e978a..40c7c78f6 100644 --- a/yudao-ui-app/pages/index/index.vue +++ b/yudao-ui-app/pages/index/index.vue @@ -4,14 +4,14 @@ - + - 能源工贸投资发展集团 + {{tenant.name}} - 简介:致力为社区大家服务 - 电话:023-87330926 - 服务时间:8:30-19:00 + 简介:{{tenant.introduction}} + 电话:{{tenant.serviceMobile}} + 服务时间:{{tenant.serviceTime}} @@ -49,24 +49,33 @@ @change="change" > - + 搜索 - + + 爆款秒杀 + + + + + + 排行榜 + + - + {{item.storeName}} - ¥{{item.price}} - + + @@ -247,6 +256,7 @@ configApi: {}, //分享类容配置 spikeList: [], // 秒杀 point: '', + tenant: {}, privacyStatus: false, // 隐私政策是否同意过 tabsScrollLeft: 0, // tabs当前偏移量 scrollLeft: 0, @@ -306,8 +316,9 @@ // ]); getUserInfo().then(res => { this.userInfo = res.data - getTenant(this.userInfo.userId).then(res=>{ - console.log(res,'getTenant') + getTenant(153).then(res=>{ + this.tenant = res.data + this.text = res.data.notice }) }) this.getBanners() @@ -324,11 +335,25 @@ }) }, methods: { + change(){ + console.log(this.value,'value') + }, + // 搜索 + searchSubmitValue: function() { + if (this.value.length > 0) + uni.navigateTo({ + url: '/pages/goods_list/index?searchValue=' + this.value + }) + else + return this.$util.Tips({ + title: '请填写要搜索的产品信息' + }); + }, // 加入购物车 addCart(id){ getSpuDetail(id).then(res => { - console.log(res.data.productAttr[0].id,'1111111111111') - let unique = res.data.productAttr[0].id + console.log(res.data.productValue.默认.id,'1111111111111') + let unique = res.data.productValue.默认.id postCartAdd({ productId: id, productAttrUnique: unique, @@ -341,10 +366,11 @@ go(){ console.log(this.productList,'------') }, + // 获取banner和userInfo getBanners(){ - console.log(this.$store.uid,'uid') + // console.log(this.$store.tenantId,'tenantId') getBanner().then(res=>{ this.bannerList = res.data.list[0] console.log(this.bannerList,'banner') @@ -845,12 +871,12 @@ } } .bottom { - margin-top: 27rpx; height: 200rpx; overflow: scroll; white-space: nowrap; .item { + position: relative; display: inline-block; width: 370rpx; height: 199rpx; @@ -859,6 +885,42 @@ width: 370rpx; height: 199rpx; } + .title { + position: absolute; + left: 22rpx; + top: 22rpx; + width: 116rpx; + height: 34rpx; + line-height: 34rpx; + text-align: center; + background: linear-gradient(0deg, #FF4200 0%, #FFB21D 100%); + border-radius: 8rpx; + font-size: 22rpx; + font-family: PingFang SC; + font-weight: 400; + color: #FFFFFF; + } + .rank { + width: 90rpx; + height: 34rpx; + line-height: 34rpx; + background: linear-gradient(0deg, #F74A7B 0%, #FFAFAF 100%); + border-radius: 8rpx; + } + .img1 { + position: absolute; + left: 17rpx; + top: 81rpx; + width: 166rpx; + height: 71rpx; + } + .img2 { + position: absolute; + top: 22rpx; + right: 25rpx; + width: 138rpx; + height: 132rpx; + } } } } @@ -893,16 +955,18 @@ color: #000000; } text { - margin-left: 15rpx; + position: absolute; + right: 20rpx; + bottom: 14rpx; font-size: 28rpx; + white-space: nowrap; font-family: PingFang SC; font-weight: 400; color: #E50202; } .car { position: absolute; - right: 10rpx; - bottom: 5rpx; + width: 60rpx; height: 60rpx; background: url(@/static/images/shop/car.png); diff --git a/yudao-ui-app/pages/order_addcart/order_addcart.vue b/yudao-ui-app/pages/order_addcart/order_addcart.vue index 37d004a11..0417a0c30 100644 --- a/yudao-ui-app/pages/order_addcart/order_addcart.vue +++ b/yudao-ui-app/pages/order_addcart/order_addcart.vue @@ -2,7 +2,7 @@ - 管理 + 管理 @@ -15,10 +15,10 @@ {{item.storeName}} - - + @@ -34,12 +34,12 @@ - + {{item.cartNum}} - + @@ -52,20 +52,20 @@ - + 全选 合计 ¥998.00 - 结算() + 结算() - + 全选 收藏 - 删除 + 删除 @@ -265,7 +265,7 @@ }, // 购物车重选 reelect(item, index) { - // console.log(item,'item哇') + console.log(item,'item哇') // let reCheck = { // id: item.id, // num: item.cartNum+2, diff --git a/yudao-ui-app/pages/order_details/index.vue b/yudao-ui-app/pages/order_details/index.vue index 09454c0b7..de7f77e20 100644 --- a/yudao-ui-app/pages/order_details/index.vue +++ b/yudao-ui-app/pages/order_details/index.vue @@ -26,7 +26,7 @@ - @@ -37,7 +37,7 @@ Gucci Blondie小号托特包 - ¥918.9 +
x1
@@ -48,15 +48,15 @@ 商品总价 - ¥918.9 + 运费 - ¥0.00 + 待付金额 - ¥918.9 +
@@ -96,8 +96,8 @@ 待支付: ¥123 - 取消订单 - 立即付款 + 取消订单 + 立即付款
diff --git a/yudao-ui-app/pages/users/order_confirm/index.vue b/yudao-ui-app/pages/users/order_confirm/index.vue index 33043e6a3..7d667ebe0 100644 --- a/yudao-ui-app/pages/users/order_confirm/index.vue +++ b/yudao-ui-app/pages/users/order_confirm/index.vue @@ -111,7 +111,7 @@ + > @@ -952,6 +952,7 @@ payChannel: that.payChannel }; + console.log(that.system_store.phone,'data') if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice)) return that.$util .Tips({ diff --git a/yudao-ui-app/pages/users/order_list/index.vue b/yudao-ui-app/pages/users/order_list/index.vue index ecd13343f..86770e065 100644 --- a/yudao-ui-app/pages/users/order_list/index.vue +++ b/yudao-ui-app/pages/users/order_list/index.vue @@ -23,17 +23,16 @@ - + - - - + @@ -45,8 +44,8 @@ - + @@ -62,13 +61,14 @@ + + + - +