diff --git a/yudao-ui-app/api/order.js b/yudao-ui-app/api/order.js index c63ac36eb..f2dbe156f 100644 --- a/yudao-ui-app/api/order.js +++ b/yudao-ui-app/api/order.js @@ -97,10 +97,13 @@ export function orderData() { * @param string id * */ +// export function orderCancel(id) { +// return request.post('front/order/cancel', { +// id: id +// }, {}, 1); +// } export function orderCancel(id) { - return request.post('front/order/cancel', { - id: id - }, {}, 1); + return request.post('front/order/cancel?id=' + id); } /** diff --git a/yudao-ui-app/pages/index/index.vue b/yudao-ui-app/pages/index/index.vue index 29b325442..18246ba30 100644 --- a/yudao-ui-app/pages/index/index.vue +++ b/yudao-ui-app/pages/index/index.vue @@ -41,14 +41,8 @@ - + @@ -184,7 +178,7 @@ import Loading from '@/components/Loading/index.vue'; const arrTemp = ["beforePay", "afterPay", "refundApply", "beforeRecharge", "createBargain", "pink"]; export default { - computed: mapGetters(['isLogin', 'uid']), + computed: mapGetters(['isLogin', 'uid','tenantId']), components: { tabNav, goodList, @@ -269,7 +263,7 @@ page: 1, limit: 10, }, - vip: {},//会员 + vip: {}, //会员 tempArr: [], //精品推荐临时数组 roll: [], // 新闻简报 site_name: '', //首页title @@ -335,53 +329,51 @@ // Promise.all([this.getAllCategory(), this.getIndexConfig() // // , this.setVisit() // ]); + // #ifdef MP + this.getTemlIds() + // #endif + }, + onShow() { + this.getIndexConfig(); getUserInfo().then(res => { this.userInfo = res.data - getTenant(153).then(res => { + getTenant(this.tenantId).then(res => { this.tenant = res.data this.text = res.data.notice }) }) getHeader().then(res => { this.vip = res.data - console.log(this.vip, '会员') }) this.getBanners() this.getIndexPage() - this.getIndexConfig(); - // #ifdef MP - this.getTemlIds() - // #endif - }, - onShow() { let self = this uni.setNavigationBarTitle({ title: self.site_name }) }, methods: { - - goUrl(e){ + + goUrl(e) { let url = '' - if(this.bannerList[e].url.indexOf('http')>=0){ + if (this.bannerList[e].url.indexOf('http') >= 0) { url = this.bannerList[e].url - }else{ + } else { url = 'http://' + this.bannerList[e].url } window.open(url) }, // 跳转会员权益 - goEquity(){ - console.log('goEmember_equity') + goEquity() { uni.switchTab({ - url:'/pages/member_equity/index' + url: '/pages/member_equity/index' }) }, // 跳转公告详情 goNoticeDetail() { - uni.navigateTo({ - url: '/pages/notice/index' - }) + uni.navigateTo({ + url: '/pages/notice/index' + }) }, // 搜索 searchSubmitValue: function() { @@ -397,32 +389,23 @@ // 加入购物车 addCart(id) { getSpuDetail(id).then(res => { - console.log(res.data.productValue.默认.id, '1111111111111') let unique = res.data.productValue.默认.id postCartAdd({ productId: id, productAttrUnique: unique, cartNum: 1 }).then(res => { - console.log('加入成功') }) }) }, go() { - console.log(this.productList, '------') }, // 获取banner和userInfo getBanners() { - - // console.log(this.$store.tenantId,'tenantId') getBanner().then(res => { - this.bannerList = [...res.data.list] - console.log(res.data.list,'banner') - + this.bannerList = [...res.data.list] }) - console.log(this.userInfo.userId, 'userInfo111111') - }, getCoupon: function(id, index) { let that = this; @@ -540,9 +523,7 @@ getIndexPage() { let that = this productPage().then(res => { - console.log(res.data.list, '商品列表') this.productList = this.productList.concat(res.data.list) - console.log(this.productList, '---------') }) }, getcouponList() { diff --git a/yudao-ui-app/pages/order_details/index.vue b/yudao-ui-app/pages/order_details/index.vue index 987474b1d..d8d5ae031 100644 --- a/yudao-ui-app/pages/order_details/index.vue +++ b/yudao-ui-app/pages/order_details/index.vue @@ -21,7 +21,7 @@ - 古驰旗舰店> + {{orderInfo.orderId}} @@ -37,10 +37,10 @@ {{item.sku}} - + -
x{{item.cartNum}}
+
x{{item.payNum}}
@@ -48,21 +48,21 @@ 商品总价 - + - + 运费 - + - + 待付金额 - + - + @@ -81,7 +81,7 @@ {{orderInfo.createTime}} - + 待支付: - 取消订单 + 取消订单 立即付款 @@ -307,10 +307,11 @@ * 打开支付组件 * */ - pay_open: function() { - this.pay_close = true; - this.pay_order_id = this.orderInfo.orderId; - this.totalPrice = this.orderInfo.payPrice; + pay_open: function(item) { + console.log(item,'0000000000') + uni.navigateTo({ + url: '/pages/goods_cashier/index?order_id=' + item + }) }, /** * 支付成功回调 @@ -494,6 +495,7 @@ }, cancelOrder() { let self = this + console.log(self) uni.showModal({ title: '提示', content: '确认取消该订单?', @@ -618,9 +620,9 @@ .shopName { width: 240rpx; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + // overflow: hidden; + // white-space: nowrap; + // text-overflow: ellipsis; font-size: 28rpx; font-family: PingFang SC; font-weight: 400; diff --git a/yudao-ui-app/pages/users/order_confirm/index.vue b/yudao-ui-app/pages/users/order_confirm/index.vue index 98cf86838..9fc1eaa07 100644 --- a/yudao-ui-app/pages/users/order_confirm/index.vue +++ b/yudao-ui-app/pages/users/order_confirm/index.vue @@ -105,7 +105,7 @@ value="" name="mark" placeholder='请添加备注(150字以内)'> - + 商品总价: @@ -156,7 +156,7 @@ - +