diff --git a/App.vue b/App.vue index 0d416ed..03c21fb 100644 --- a/App.vue +++ b/App.vue @@ -11,7 +11,7 @@ } - diff --git a/api/http.js b/api/http.js index 99e1615..1e4537a 100644 --- a/api/http.js +++ b/api/http.js @@ -33,7 +33,8 @@ function http(uri, data, callback, method = 'GET', showLoading, title) { utils.toLogin() } - if(res.statusCode == 200 && res.data.code != 200){ + if(res.statusCode == 200 && res.data.code != 200 + && res.data.code != 902){ uni.showToast({ mask: true, duration: 1000, diff --git a/api/model/index.js b/api/model/index.js index 9640055..ba86ddc 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -106,6 +106,14 @@ const api = { limit : 1000, showLoading : true, }, + // 确认收货 + confirmOrder: { + url: '/rice_index/confirmOrder', + method: 'GET', + auth : true, + limit : 1000, + showLoading : true, + }, } export default api \ No newline at end of file diff --git a/api/model/info.js b/api/model/info.js index 296b482..bbb1600 100644 --- a/api/model/info.js +++ b/api/model/info.js @@ -103,6 +103,22 @@ const api = { url: '/rice_info/getCartPageList', method: 'GET', }, + // 增加或者修改渠道申请信息 + addOrUpdateCommonUser: { + url: '/rice_info/addOrUpdateCommonUser', + method: 'POST', + limit : 500, + auth : true, + showLoading : true, + }, + // 查询渠道申请信息 + getCommonUser: { + url: '/rice_info/getCommonUser', + method: 'GET', + limit : 500, + auth : true, + showLoading : true, + }, } export default api \ No newline at end of file diff --git a/mixins/order.js b/mixins/order.js index 95f0400..cbb189a 100644 --- a/mixins/order.js +++ b/mixins/order.js @@ -8,6 +8,7 @@ export default { computed: { }, methods: { + // 立即支付 toPayOrder(item){ let api = '' @@ -35,5 +36,20 @@ export default { } }) }, + // 确认收货 + confirmOrder(item){ + uni.showModal({ + title: '您收到货了吗?', + success : e => { + if(e.confirm){ + this.$api('confirmOrder', { + orderId : item.id, + }, res => { + this.getData() + }) + } + } + }) + }, } } \ No newline at end of file diff --git a/pages.json b/pages.json index 7c26f33..34367e9 100644 --- a/pages.json +++ b/pages.json @@ -114,6 +114,9 @@ }, { "path": "home/contact" + }, + { + "path": "home/addEnterprise" } ] }], diff --git a/pages/index/cart.vue b/pages/index/cart.vue index df2791e..2b8d9ab 100644 --- a/pages/index/cart.vue +++ b/pages/index/cart.vue @@ -167,7 +167,7 @@ }, deleteCart(e, item){ this.$api('deleteCart', { - id : item.id + ids : item.id }, res => { this.getData() }) diff --git a/pages/index/category.vue b/pages/index/category.vue index 7e31faf..7c065a1 100644 --- a/pages/index/category.vue +++ b/pages/index/category.vue @@ -2,6 +2,15 @@ + + + + 0){ this.queryParams.classId = this.category[0].id @@ -67,6 +79,23 @@ /deep/ .uv-vtabs__content{ height: calc(100vh - 220rpx) !important; } + + .search { + position: relative; + background: #FFFFFF; + margin: 20rpx; + border-radius: 41rpx; + padding: 10rpx 20rpx; + display: flex; + align-items: center; + + /deep/ .uv-search__action { + background-color: $uni-color; + color: #FFFFFF; + padding: 10rpx 20rpx; + border-radius: 30rpx; + } + } } .category { font-size: 30rpx; diff --git a/pages/index/center.vue b/pages/index/center.vue index 533fa1f..4ace98f 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -53,6 +53,16 @@ 去充值 --> + + + + {{ riceInfo.balance || 0 }} + 余额(元) + + 去充值 + diff --git a/pages/index/index.vue b/pages/index/index.vue index b72c6a9..4fc8614 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -6,15 +6,20 @@ - {{ configList.index_title }} + + - + {{ item.title }} {{ item.sku }} - {{ item.price }} - 原价{{ item.oldPrice }} + 会员价 ¥{{ item.vipPrice }} + 零售价¥{{ item.price }} - + {{ riceInfo.memberNum }}/{{ configList.vip_open_num }} + + + 已成为会员, + 去购买 + + 开通会员 @@ -153,15 +165,23 @@ return { bannerList: [], vipInfoList: [], + leftClick : false, }; }, computed : { ...mapState(['userInfo', 'riceInfo']), }, + onLoad({leftClick}) { + this.leftClick = leftClick + }, onShow() { this.getBanner() this.getRiceVipList() this.$store.commit('getRiceInfo') + + if(uni.getStorageSync('token')){ + this.$store.commit('getUserInfo') + } }, methods : { // 获取轮播图 @@ -254,6 +274,12 @@ font-size: 26rpx; } } + .tips-click{ + font-size: 26rpx; + text{ + color: #A3D250; + } + } } .middle { diff --git a/pages/index/order.vue b/pages/index/order.vue index f286bf0..54f3052 100644 --- a/pages/index/order.vue +++ b/pages/index/order.vue @@ -73,11 +73,11 @@ 立即付款 - + + 确认收货 + @@ -225,7 +225,7 @@ view { margin: 12rpx; border-radius: 28rpx; - padding: 8rpx 28rpx; + padding: 16rpx 48rpx; margin-bottom: 0; } } diff --git a/pages_order/components/address/redactAddress.vue b/pages_order/components/address/redactAddress.vue index 319e766..7befe00 100644 --- a/pages_order/components/address/redactAddress.vue +++ b/pages_order/components/address/redactAddress.vue @@ -175,6 +175,11 @@ .uv-form { padding: 30rpx 0rpx; } + + .uv-input__content__field-wrapper__field{ + padding: 30rpx !important; + height: 180rpx !important; + } &::v-deep .uv-cell { padding: 0rpx 0rpx; @@ -188,7 +193,6 @@ display: flex; align-items: center; height: 80rpx; - } .uv-field__control, diff --git a/pages_order/home/addEnterprise.vue b/pages_order/home/addEnterprise.vue new file mode 100644 index 0000000..757d7fb --- /dev/null +++ b/pages_order/home/addEnterprise.vue @@ -0,0 +1,351 @@ + + + + + \ No newline at end of file diff --git a/pages_order/home/contact.vue b/pages_order/home/contact.vue index b531a96..579ac09 100644 --- a/pages_order/home/contact.vue +++ b/pages_order/home/contact.vue @@ -3,7 +3,8 @@ - + @@ -11,8 +12,9 @@ - - 联系电话:{{ configList.phone }} + + 全国联系电话:{{ configList.phone }} 拨打电话 diff --git a/pages_order/mine/balance.vue b/pages_order/mine/balance.vue index 2514908..0e55e56 100644 --- a/pages_order/mine/balance.vue +++ b/pages_order/mine/balance.vue @@ -29,8 +29,14 @@ :center="true"> @@ -51,7 +57,7 @@ mixinsListApi : 'getWaterPageList', list : [], type : ['+', '-'], - state : ['审核中', '成功', '失败'], + state : ['未到账', '已到账'], } }, computed: { @@ -120,10 +126,12 @@ .cell-text{ text-align: right; .price-text{ - color: #f40; font-size: 32rpx; font-weight: 900; } + .add{ + color: #f40; + } .tips{ font-size: 22rpx; color: #aaa; diff --git a/pages_order/mine/recharge.vue b/pages_order/mine/recharge.vue index fd7ab29..9cbac7c 100644 --- a/pages_order/mine/recharge.vue +++ b/pages_order/mine/recharge.vue @@ -103,6 +103,7 @@ title: '充值成功', icon : 'none' }) + this.form.money = 0 setTimeout(uni.navigateBack, 800, -1) } }) diff --git a/pages_order/mine/withdraw.vue b/pages_order/mine/withdraw.vue index b845ecd..34f9ca4 100644 --- a/pages_order/mine/withdraw.vue +++ b/pages_order/mine/withdraw.vue @@ -50,8 +50,14 @@ :center="true"> @@ -72,7 +78,7 @@ mixinsListApi : 'getWaterPageList', list : [], type : ['+', '-'], - state : ['审核中', '成功', '失败'], + state : ['未到账', '已到账'], form : { money : 0, }, @@ -111,6 +117,7 @@ title: '提现成功', icon : 'none' }) + this.form.money = 0 this.$store.commit('getUserInfo') this.$store.commit('getRiceInfo') this.getData() @@ -195,10 +202,12 @@ .cell-text{ text-align: right; .price-text{ - color: #f40; font-size: 32rpx; font-weight: 900; } + .add{ + color: #f40; + } .tips{ font-size: 22rpx; color: #aaa; diff --git a/pages_order/order/createOrder.vue b/pages_order/order/createOrder.vue index df441ac..42fe134 100644 --- a/pages_order/order/createOrder.vue +++ b/pages_order/order/createOrder.vue @@ -127,7 +127,7 @@ if([2].includes(n.type) && [1].includes(this.userInfo.isPay)){ - // 普通商品的同时用户是会员就计算会员价 + // 常规、普通商品的同时用户是会员就计算会员价 price += n.vipPrice * n.num }else{ // 普通价格 @@ -208,7 +208,9 @@ let data = {} let api = '' - if(this.productList[0].type == 2){//普通商品 + + if(this.productList[0].shopId || this.productList[0].type == 2){//普通商品 + let list = [] this.productList.forEach(n => { list.push({ @@ -221,11 +223,14 @@ list : JSON.stringify(list), } api = 'createSumOrder' + + this.deleteCart(this.productList.map(n => n.id).join(',')) + }else{//体验、常规商品 data = { addressId, num : this.productList[0].num, - productId : this.productList[0].id, + shopId : this.productList[0].id, } api = 'createOrder' } @@ -247,10 +252,27 @@ url: '/pages/index/order' }) }) + }else if(res.code == 902){ + uni.showModal({ + title: res.message, + success(e) { + if(e.confirm){ + uni.redirectTo({ + url: '/pages/index/order' + }) + } + } + }) } }) }, + // 删除购物车 + deleteCart(ids){ + this.$api('deleteCart', { + ids + }) + }, } } diff --git a/static/image/home/logo.png b/static/image/home/logo.png new file mode 100644 index 0000000..d0be97b Binary files /dev/null and b/static/image/home/logo.png differ diff --git a/uni_modules/uv-cell/components/uv-cell/uv-cell.vue b/uni_modules/uv-cell/components/uv-cell/uv-cell.vue index cc4e505..257b2b7 100644 --- a/uni_modules/uv-cell/components/uv-cell/uv-cell.vue +++ b/uni_modules/uv-cell/components/uv-cell/uv-cell.vue @@ -9,7 +9,7 @@ - + @@ -32,7 +32,7 @@ :class="[`uv-cell__right-icon-wrap--${arrowDirection}`]"> + :size="size === 'large' ? 40 : 36"> @@ -101,7 +101,7 @@