diff --git a/pages.json b/pages.json index 6e210ca..14762be 100644 --- a/pages.json +++ b/pages.json @@ -189,6 +189,13 @@ "enablePullDownRefresh": false, "navigationBarTextStyle": "white" } + }, + { + "path": "mine/customerService", + "style": { + "navigationBarTitleText": "客服中心", + "enablePullDownRefresh": false + } } ] }], diff --git a/pages/index/index.vue b/pages/index/index.vue index 54d13e5..83fd4ab 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -139,9 +139,12 @@ - + + diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue index 8419997..9c49ae6 100644 --- a/pages_order/auth/wxUserInfo.vue +++ b/pages_order/auth/wxUserInfo.vue @@ -84,6 +84,16 @@ {{ form.address || '请选择居住地址'}} + + + + 手机号 @@ -140,6 +150,8 @@ yearDate : this.$dayjs().add(-18, 'y').valueOf(),//默认满18岁 address : '', phone : '', + middleSchool: '', + highSchool: '', }, maxDate : this.$dayjs().valueOf(), minDate : this.$dayjs().add(-100, 'y').valueOf(), @@ -218,7 +230,7 @@ } }) }, - getUserInfo(){ + getUserInfo(){ this.$api('getInfo', res => { if(res.code == 200){ @@ -234,6 +246,10 @@ this.$dayjs(res.result.yearDate + '-01-01').valueOf() || this.form.yearDate this.form.address = res.result.address || this.form.address + + this.form.middleSchool = res.result.middleSchool || this.form.middleSchool + + this.form.highSchool = res.result.highSchool || this.form.highSchool } }) }, @@ -399,6 +415,18 @@ line-height: 80rpx; color: #555; } + + .school-input{ + background-color: #f7f7f7; + width: 600rpx; + height: 80rpx; + text-align: center; + border-radius: 40rpx; + margin-top: 30rpx; + padding: 0 30rpx; + box-sizing: border-box; + color: #333; + } .btn { // background: $uni-linear-gradient-btn-color; diff --git a/pages_order/components/list/gourmet/productSelectList.vue b/pages_order/components/list/gourmet/productSelectList.vue index cdff58f..783d450 100644 --- a/pages_order/components/list/gourmet/productSelectList.vue +++ b/pages_order/components/list/gourmet/productSelectList.vue @@ -214,19 +214,10 @@ } this.$refs.productSubmit.open() }, - submit({addressId}){ - if(!addressId){ - uni.showToast({ - title: '请选择地址', - icon: 'none' - }) - return - } - - + submit(submitData){ this.$api('createSumOrder', { - addressId, + ...submitData, list : JSON.stringify(this.priceList) }, res => { if(res.code == 200){ diff --git a/pages_order/components/list/gourmet/productSubmit.vue b/pages_order/components/list/gourmet/productSubmit.vue index 57ac2ee..27a0894 100644 --- a/pages_order/components/list/gourmet/productSubmit.vue +++ b/pages_order/components/list/gourmet/productSubmit.vue @@ -4,8 +4,29 @@ bgColor="#f7f7f7"> - - + + + 配送方式 + + + 🚚 + 外卖配送 + + + 🏪 + 到店自提 + + + + + + {{ address.name }} @@ -18,6 +39,19 @@ + + + + + + 配送方式 + + + 🚚 + 外卖配送 + + + 🏪 + 到店自提 + + + + + + @click="openAddress" + v-if="deliveryMethod === '0'"> {{ address.name }} @@ -20,6 +42,17 @@ name="arrow-right"> + + + + + + + @@ -143,6 +176,7 @@ num : 1, unit : {}, addressTotal : 0, + deliveryMethod : '0', } }, methods: { @@ -190,14 +224,19 @@ let data = { shopId : this.detail.id,//商品id - addressId : this.address.id,//地址id num : this.num, + deliveryMethod: this.deliveryMethod } - if(this.$utils.verificationAll(data, { - addressId : '请选择地址', - })){ - return + // 外卖配送需要地址 + if (this.deliveryMethod === 'delivery') { + if (!this.address.id) { + return uni.showToast({ + title: '请选择收货地址', + icon: 'none' + }) + } + data.addressId = this.address.id } this.$api('createPointsOrder', data, res => { @@ -213,17 +252,20 @@ let data = { shopId : this.detail.id,//商品id // skuId : this.unit.id,//规格id - addressId : this.address.id,//地址id // sku : this.unit.title,//规格 num : this.num, + deliveryMethod: this.deliveryMethod } - - if(this.$utils.verificationAll(data, { - // skuId : '请选择规格', - addressId : '请选择地址', - })){ - return + // 外卖配送需要地址 + if (this.deliveryMethod == '0') { + if (!this.address.id) { + return uni.showToast({ + title: '请选择收货地址', + icon: 'none' + }) + } + data.addressId = this.address.id } this.$api('createOrder', data, res => { @@ -252,6 +294,9 @@ } }) }, + selectDeliveryMethod(method){ + this.deliveryMethod = method + }, } } @@ -261,6 +306,40 @@ max-height: 80vh; overflow: hidden; overflow-y: auto; + .delivery-method{ + padding: 20rpx; + background-color: #fff; + .title{ + font-size: 30rpx; + padding: 10rpx; + font-weight: 600; + } + .options{ + display: flex; + gap: 20rpx; + .option{ + padding: 15rpx 30rpx; + border: 2rpx solid #F3F3F3; + border-radius: 10rpx; + display: flex; + align-items: center; + justify-content: center; + flex: 1; + background-color: #F6F6F6; + &.active{ + border-color: $uni-price-color; + background-color: $uni-price-color; + color: #fff; + } + .icon{ + margin-right: 10rpx; + } + .text{ + font-size: 28rpx; + } + } + } + } .address{ display: flex; padding: 20rpx; diff --git a/pages_order/mine/customerService.vue b/pages_order/mine/customerService.vue new file mode 100644 index 0000000..5fe4b40 --- /dev/null +++ b/pages_order/mine/customerService.vue @@ -0,0 +1,207 @@ + + + + + \ No newline at end of file