diff --git a/components/date-picker/date-picker.vue b/components/date-picker/date-picker.vue index e860ce7..4ae0907 100644 --- a/components/date-picker/date-picker.vue +++ b/components/date-picker/date-picker.vue @@ -3,19 +3,19 @@ - 配送 + 发货时间 - + + 非到货时间,预计发货后48小时左右可到货。 @@ -30,13 +30,13 @@ {{dateObj.lunarData?dateObj.lunarData:''}} 今日剩余可提货量:{{dateObj.canUse.quantity - dateObj.canUse.booked}} - + @@ -62,63 +62,63 @@ return [] } }, - // 快递 - express: { - type: Array, - default () { - return [] - } - } + // // 快递 + // express: { + // type: Array, + // default () { + // return [] + // } + // } }, data() { return { show: false, - expressIndex: -1, - expressObj: {}, + // expressIndex: -1, + // expressObj: {}, dateIndex: -1, dateObj: {}, - hhList: ['09:00-15:00', '15:00-21:00'], - hhIndex: -1, + // hhList: ['09:00-15:00', '15:00-21:00'], + // hhIndex: -1, } }, methods: { - chooseExpress(index, item) { - this.expressObj = item - this.expressIndex = index - }, + // chooseExpress(index, item) { + // this.expressObj = item + // this.expressIndex = index + // }, chooseDate(index, item) { this.dateIndex = index this.dateObj = item }, - chooseHh(index, item) { - this.hhTime = item - this.hhIndex = index - }, + // chooseHh(index, item) { + // this.hhTime = item + // this.hhIndex = index + // }, closePop() { this.show = false }, confirmPop() { if (isEmptyObject(this.dateObj)) { - toast('请选择日期') - return - } - if (isEmptyObject(this.expressObj)) { - toast('请选择快递') - return - } - if (isNull(this.hhTime)) { - toast('请选择时间') + toast('请选择发货时间') return } + // if (isEmptyObject(this.expressObj)) { + // toast('请选择快递') + // return + // } + // if (isNull(this.hhTime)) { + // toast('请选择时间') + // return + // } // 将对象A的值插入到对象B中 - for (const key in this.expressObj) { - if (this.expressObj.hasOwnProperty(key)) { - this.dateObj[`express${key}`] = this.expressObj[key]; - } - } - this.dateObj.hhtime = this.hhTime + // for (const key in this.expressObj) { + // if (this.expressObj.hasOwnProperty(key)) { + // this.dateObj[`express${key}`] = this.expressObj[key]; + // } + // } + // this.dateObj.hhtime = this.hhTime this.$emit('refresh', this.dateObj) this.show = false console.log("this.dateObj", this.dateObj) @@ -145,6 +145,7 @@ justify-content: space-between; align-items: center; padding-left: 35rpx; + padding-bottom: 10rpx; } &-express { @@ -178,9 +179,9 @@ &-stitle { font-size: 24rpx; - color: #000; + color: #787877; padding-left: 35rpx; - margin-bottom: 35rpx; + margin-bottom: 20rpx; } &-list { diff --git a/packages/change/change.vue b/packages/change/change.vue index cb1103e..cb2baeb 100644 --- a/packages/change/change.vue +++ b/packages/change/change.vue @@ -160,7 +160,7 @@ .systemtext text { display: block; - font-size: 20rpx; + font-size: 28rpx; color: #000; line-height: 36rpx; } @@ -202,7 +202,7 @@ height: 74rpx; line-height: 74rpx; color: #676767 !important; - font-size: 20rpx !important; + font-size: 26rpx !important; padding-left: 94rpx; padding-right: 30rpx; background-position: left 30rpx center; @@ -219,15 +219,15 @@ } /deep/ .u-btn { - color: #b98b44 !important; - font-size: 24rpx !important; + color: #fff !important; + font-size: 26rpx !important; font-weight: bold; padding: 0; height: 74rpx !important; width: 100%; line-height: 74rpx !important; border-radius: 50rpx; - background-color: #f4f3f2 !important; + background-color: #b98b44 !important; } /deep/ .u-btn::after { diff --git a/packages/my/addaddress.vue b/packages/my/addaddress.vue index a73e446..1464a60 100644 --- a/packages/my/addaddress.vue +++ b/packages/my/addaddress.vue @@ -11,11 +11,7 @@ - - - - 定位 - + @@ -23,7 +19,11 @@ --> - + + + + 定位 + @@ -124,7 +124,8 @@ const res = await this.$u.api.getRegion() this.listArea = res.regions }, - openArea() { + openArea() { + uni.hideKeyboard() this.$refs.pickers.open().then(function() { console.log('picker打开'); }); @@ -190,7 +191,7 @@ uni.chooseLocation({ success(res) { console.log("res", res) - _this.form.area = res.address + // _this.form.area = res.address _this.form.address = res.name }, fail(res) { diff --git a/packages/myorder/infoconfirm.vue b/packages/myorder/infoconfirm.vue index ba639c8..fb77339 100644 --- a/packages/myorder/infoconfirm.vue +++ b/packages/myorder/infoconfirm.vue @@ -14,13 +14,13 @@ - 收货日期 + 发货时间 {{details.send_date?$moment(details.send_date).format("YYYY年M月DD日"):''}} {{details.lunarData?details.lunarData:""}} - {{details.hh?details.hh:''}} + {{details.week?'['+details.week+']':''}} diff --git a/packages/myorder/myorder.vue b/packages/myorder/myorder.vue index 41f937a..a92ac90 100644 --- a/packages/myorder/myorder.vue +++ b/packages/myorder/myorder.vue @@ -36,9 +36,10 @@ - 预计送达时间 + 预计发货时间 {{item.send_date?$moment(item.send_date).format("M月DD日"):''}}{{item.week?'['+item.week+']':''}}{{item.hh?item.hh:''}} + class="orderweek">{{item.week?'['+item.week+']':''}} + diff --git a/packages/order/order.vue b/packages/order/order.vue index f148760..1ad5243 100644 --- a/packages/order/order.vue +++ b/packages/order/order.vue @@ -2,7 +2,9 @@ - + + + @@ -25,24 +27,25 @@ --> 卡券状态 - + - - {{form.express}} + {{form.ymd}} [{{form.week}}] - {{form.hh}} + - 选择提货时间 + 选择发货时间 @@ -63,24 +66,23 @@ - + + + + 定位 - - - + + + - @@ -102,12 +104,30 @@ + + + + + 温馨提示 + + 1、下单时请注意填写正确的收货信息。 + 2、因收件方信息有误导致产生的多余运费或退件由收件方自付。 + 3、此商品为生鲜产品,非质量问题不退换。 + 4、如出现售后或快递问题,请于签收日期起1日内反馈,超出不再受理。 + + + 我同意 + + + - + {{cardInfo.sku?cardInfo.sku.name:''}} {{cardInfo.sku?cardInfo.sku.specs:''}} @@ -118,13 +138,13 @@ - 收货日期 + 发货时间 {{form.ymd}} {{form.lunarData}} - {{form.hh}} + [{{form.week}}] @@ -157,6 +177,7 @@ {{type=='edit'?'确认修改':'确认提货'}} + @@ -197,11 +218,12 @@ data() { return { showinfo: false, + showagree: false, showAddress: false, listAddress: [], addressInfo: '', - cardInfo: {}, - type:'', + cardInfo: {}, + type: '', form: { card_number: '', password: '', @@ -209,8 +231,8 @@ send_date: '', ymd: '', lunarData: '', - express: '', - hh: '', + // express: '', + // hh: '', week: '', area: '', @@ -226,13 +248,13 @@ buy_name: '', buy_mobile: '' }, - listExpress: [{ - id: 0, - value: '顺丰快递' - }, { - id: 1, - value: '中通快递' - }], + // listExpress: [{ + // id: 0, + // value: '顺丰快递' + // }, { + // id: 1, + // value: '中通快递' + // }], listDates: [], date: '', listArea: [], @@ -249,7 +271,7 @@ rules: { send_date: [{ required: true, - message: '请选择提货时间', + message: '请选择发货时间', trigger: ['change', 'blur'], }], area: [{ @@ -285,37 +307,39 @@ this.$refs.uForm.setRules(this.rules); }, - onLoad(option) { + onLoad(option) { let that = this - if (option.hasCard) { - if(option.type=='edit'){ - this.type = 'edit' - this.form = uni.getStorageSync("vuex_update_card") ? uni.getStorageSync("vuex_update_card") : {}, - this.cardInfo = uni.getStorageSync("vuex_update_card") ? uni.getStorageSync("vuex_update_card") : {}, - this.form.ymd = this.momentDay(this.form.send_date).ymd - uni.removeStorageSync("vuex_update_card") - uni.setNavigationBarTitle({ - title: '修改订单', - success: function() { - console.log('标题设置成功'); - that.showinfo = false - }, - fail: function(err) { - console.error('标题设置失败', err); - } - }); - console.log("this.form",this.form) - // uni.removeStorageSync("vuex_update_card") - }else{ - this.cardInfo = uni.getStorageSync("vuex_card") ? uni.getStorageSync("vuex_card").card : {} - this.form.card_number = uni.getStorageSync("vuex_card") ? uni.getStorageSync("vuex_card").card_number : '' - this.form.password = uni.getStorageSync("vuex_card") ? uni.getStorageSync("vuex_card").password : '' - uni.removeStorageSync("vuex_card") + if (option.hasCard) { + if (option.type == 'edit') { + this.type = 'edit' + this.form = uni.getStorageSync("vuex_update_card") ? uni.getStorageSync("vuex_update_card") : {}, + this.cardInfo = uni.getStorageSync("vuex_update_card") ? uni.getStorageSync("vuex_update_card") : + {}, + this.form.ymd = this.momentDay(this.form.send_date).ymd + uni.removeStorageSync("vuex_update_card") + uni.setNavigationBarTitle({ + title: '修改订单', + success: function() { + console.log('标题设置成功'); + that.showinfo = false + }, + fail: function(err) { + console.error('标题设置失败', err); + } + }); + console.log("this.form", this.form) + // uni.removeStorageSync("vuex_update_card") + } else { + this.cardInfo = uni.getStorageSync("vuex_card") ? uni.getStorageSync("vuex_card").card : {} + this.form.card_number = uni.getStorageSync("vuex_card") ? uni.getStorageSync("vuex_card").card_number : + '' + this.form.password = uni.getStorageSync("vuex_card") ? uni.getStorageSync("vuex_card").password : '' + // uni.removeStorageSync("vuex_card") } - + this.getAddress() this.getDates() - this.getExpress() + // this.getExpress() this.getArea() } else { toast("未查询到卡券信息") @@ -328,15 +352,15 @@ methods: { async getAddress() { const res = await this.$u.api.getUserAddress() - this.listAddress = res.address - if(!this.type == 'edit'){ - this.showAddress = this.listAddress.length > 0 ? true : false + this.listAddress = res.address + if (!this.type == 'edit') { + this.showAddress = this.listAddress.length > 0 ? true : false } }, - async getExpress() { - const res = await this.$u.api.getExpress() - this.listExpress = res - }, + // async getExpress() { + // const res = await this.$u.api.getExpress() + // this.listExpress = res + // }, changeAddress(e) { console.log("e", e) if (e) { @@ -398,9 +422,9 @@ if (e) { this.form.send_date = e.date this.form.ymd = e.ymd - this.form.express = e.expressname - this.form.express_type_id = e.expressid - this.form.hh = e.hhtime + // this.form.express = e.expressname + // this.form.express_type_id = e.expressid + // this.form.hh = e.hhtime this.form.week = e.week this.form.lunarData = e.lunarData } @@ -411,11 +435,9 @@ async getArea() { const res = await this.$u.api.getRegion() this.listArea = res.regions - - console.log(res) - console.log(this.listArea) }, openArea() { + uni.hideKeyboard() this.$refs.pickers.open().then(function() { console.log('picker打开'); }); @@ -425,7 +447,7 @@ // return if (e) { let data = e.data - let _this = this + let _this = this _this.form.area = '' data.forEach(function(item, index) { _this.form.area += item.value + ' '; @@ -464,7 +486,7 @@ uni.chooseLocation({ success(res) { console.log("res", res) - _this.form.area = res.address + // _this.form.area = res.address _this.form.address = res.name }, fail(res) { @@ -503,49 +525,50 @@ city_id: this.form.city_id, district_id: this.form.district_id, defalut: 1 - }).then(res => { - if(this.type=='edit'){ - uni.redirectTo({ - url: '/packages/myorder/myorder' - }) - }else{ - uni.redirectTo({ - url: '/packages/product/public' - }) + }).then(res => { + if (this.type == 'edit') { + uni.redirectTo({ + url: '/packages/myorder/myorder' + }) + } else { + uni.redirectTo({ + url: '/packages/product/public' + }) } - + }).then(res => { - if(this.type=='edit'){ - uni.redirectTo({ - url: '/packages/myorder/myorder' - }) - }else{ - uni.redirectTo({ - url: '/packages/product/public' - }) + if (this.type == 'edit') { + uni.redirectTo({ + url: '/packages/myorder/myorder' + }) + } else { + uni.redirectTo({ + url: '/packages/product/public' + }) } }) } else { - if(this.type=='edit'){ - uni.redirectTo({ - url: '/packages/myorder/myorder' - }) - }else{ - uni.redirectTo({ - url: '/packages/product/public' - }) + if (this.type == 'edit') { + uni.redirectTo({ + url: '/packages/myorder/myorder' + }) + } else { + uni.redirectTo({ + url: '/packages/product/public' + }) } } }, submit() { let that = this - if ((!isNull(this.form.mobile2) && this.form.mobile2.length > 0) || (!isNull(this.form.buy_mobile) && this - .form.buy_mobile.length > 0)) { + if (!isNull(this.form.mobile2) && this.form.mobile2.length > 0) { if (!isMobile(this.form.mobile2)) { toast('备用电话不正确') return } + } + if (!isNull(this.form.buy_mobile) && this.form.buy_mobile.length > 0) { if (!isMobile(this.form.buy_mobile)) { toast('购买人电话不正确') return @@ -559,6 +582,7 @@ title: '信息确认', success: function() { console.log('标题设置成功'); + that.showagree = true that.showinfo = true }, fail: function(err) { @@ -566,40 +590,40 @@ } }); } else { - this.form.show = 0 - if(this.type=='edit'){ - console.log("this.form",this.form) - // return - this.$u.api.saveUserOrder(this.form).then(res => { - uni.removeStorageSync('vuex_update_card') - toast(res.msg, 1000, function() { - setTimeout(function() { - that.saveDefalutAddress() - }, 500) - - }) - - }).then(res => { - console.log('res1', res) - - }) - }else{ - this.$u.api.addUserOrder(this.form).then(res => { - console.log("res", res) - uni.removeStorageSync('vuex_card') - toast(res.msg, 1000, function() { - setTimeout(function() { - that.saveDefalutAddress() - }, 500) - - }) - - }).then(res => { - console.log('res1', res) - - }) + this.form.show = 0 + if (this.type == 'edit') { + console.log("this.form", this.form) + // return + this.$u.api.saveUserOrder(this.form).then(res => { + uni.removeStorageSync('vuex_update_card') + toast(res.msg, 1000, function() { + setTimeout(function() { + that.saveDefalutAddress() + }, 500) + + }) + + }).then(res => { + console.log('res1', res) + + }) + } else { + this.$u.api.addUserOrder(this.form).then(res => { + console.log("res", res) + uni.removeStorageSync('vuex_card') + toast(res.msg, 1000, function() { + setTimeout(function() { + that.saveDefalutAddress() + }, 500) + + }) + + }).then(res => { + console.log('res1', res) + + }) } - + } } else { @@ -965,5 +989,51 @@ border: 1rpx solid #ba8b45; background: #ba8b45; } + + .agreeinfo { + position: fixed; + top: 0; + left: 0; + background: rgba(0, 0, 0, 0.7); + display: flex; + align-items: center; + width: 100vw; + height: 100vh; + z-index: 9; + padding: 0 50rpx; + + &-wrap { + background: #fff; + padding: 60rpx 40rpx; + border-radius: 20rpx; + } + + &-title { + font-size: 32rpx; + color: #000; + margin-bottom: 30rpx + } + + &-content { + line-height: 1.8; + font-size: 30rpx; + } + + &-btn { + + >view { + background-color: #ba8b45; + color: #fff; + border-radius: 40rpx; + width: 60%; + margin: 0 auto; + height: 75rpx; + text-align: center; + line-height: 75rpx; + margin: 40rpx auto; + margin-top: 60rpx; + } + } + } } \ No newline at end of file