diff --git a/common/util.js b/common/util.js
index f40cf5b..3860b02 100644
--- a/common/util.js
+++ b/common/util.js
@@ -162,6 +162,16 @@ const toMapAPP = (lat,lng,name) => {
}
})
+}
+// 检查是否空对象
+const isEmptyObject = (obj) => {
+ // 检查传入参数是否为一个对象
+ if (typeof obj !== 'object' || obj === null) {
+ throw new Error('Input must be an object');
+ }
+
+ // 使用Object.keys()方法获取对象的属性键数组,并检查其长度是否为0
+ return Object.keys(obj).length === 0;
}
export {
@@ -174,5 +184,6 @@ export {
isMobile,
getDistance,
toMapAPP,
- shareInfo
+ shareInfo,
+ isEmptyObject
}
\ No newline at end of file
diff --git a/components/date-picker/date-picker.vue b/components/date-picker/date-picker.vue
index 084f024..3b91381 100644
--- a/components/date-picker/date-picker.vue
+++ b/components/date-picker/date-picker.vue
@@ -4,43 +4,49 @@
配送
-
+
-
-
-
- {{item.value}}
-
- 送货时间
-
-
-
-
- {{item.ymd}}[{{item.week}}]
-
-
-
-
-
- {{dateObj.lunarData?dateObj.lunarData:''}}
-
-
-
- {{item}}
-
-
-
+
+
+ {{item.value}}
+
+
+ 送货时间
+
+
+
+
+ {{item.ymd}}[{{item.week}}]
+
+
+
+
+
+ {{dateObj.lunarData?dateObj.lunarData:''}}
+
+
+
+ {{item}}
+
+
+
+
+
+ 确定
-
-
\ No newline at end of file
diff --git a/packages/my/addaddress.vue b/packages/my/addaddress.vue
index f693691..078145c 100644
--- a/packages/my/addaddress.vue
+++ b/packages/my/addaddress.vue
@@ -2,7 +2,7 @@
微信地址
-
+
@@ -18,10 +18,14 @@
+
+
+
-
- 提交
+
+ 提交
@@ -47,7 +51,8 @@
area: '',
address: '',
contact: '',
- mobile: ''
+ mobile: '',
+ defalut:false
},
listArea:[],
showArea: false,
@@ -181,9 +186,17 @@
this.$refs.uForm.validate(valid => {
if (valid) {
+ if(this.form.defalut){
+ this.form.defalut = 1
+ }
this.$u.api.saveUserAddress(this.form).then(res=>{
- toast('提交成功')
- uni.navigateBack(-1)
+ toast('提交成功',1000,function(){
+ setTimeout(function(){
+ uni.navigateBack(-1)
+ },500)
+
+ })
+
})
} else {
console.log('验证失败');
@@ -200,7 +213,7 @@
padding: 40rpx;
.orderForm {
&-wx{
- color:#2979ff;
+ color:#ba8b45;
margin-bottom:20rpx;
font-size: 32rpx;
}
@@ -225,7 +238,17 @@
}
&-btn {
- margin: 40rpx;
+ margin: 40rpx;
+ >view{
+ background-color: #ba8b45;
+ color: #fff;
+ border-radius: 40rpx;
+ width: 100%;
+ margin: 0 auto;
+ height: 75rpx;
+ text-align: center;
+ line-height: 75rpx;
+ }
}
}
}
diff --git a/packages/my/address.vue b/packages/my/address.vue
index e123f90..e94976f 100644
--- a/packages/my/address.vue
+++ b/packages/my/address.vue
@@ -20,7 +20,7 @@
-
+
新增地址
@@ -146,7 +146,7 @@
}
}
&-add{
- color:#2979ff;
+ color:#ba8b45;
margin: 20rpx 0;
font-size: 32rpx;
u-icon{
diff --git a/packages/myorder/infoconfirm.vue b/packages/myorder/infoconfirm.vue
index 06b5b76..a1655e7 100644
--- a/packages/myorder/infoconfirm.vue
+++ b/packages/myorder/infoconfirm.vue
@@ -5,8 +5,8 @@
- 蟹太太大闸蟹红金款999型
- 公4.0两母3.0两 4对 8只装
+ {{details.sku?details.sku.name:''}}
+ {{details.sku?details.sku.specs:''}}
@@ -16,13 +16,13 @@
收货日期
- 2024年9月28日
- 农历八月十三
+ {{details.send_date?$moment(details.send_date).format("YYYY年M月DD日"):''}}
+ {{details.lunarData?details.lunarData:""}}
- 09:00-15:00
- [周三]
-
+ {{details.hh?details.hh:''}}
+ {{details.week?'['+details.week+']':''}}
+
@@ -32,7 +32,7 @@
收货地址
- 浙江省杭州市滨江区银泰海威国际xxxx
+ {{details.area?details.area:''}}{{details.address?details.address:''}}
@@ -43,15 +43,11 @@
收货人
- 王冰冰
- 15326589454
+ {{details.contact?details.contact:''}}
+ {{details.mobile?details.mobile:''}}
-
- 返回修改
- 确认提货
-
@@ -60,11 +56,13 @@
data() {
return {
-
+ details:{}
}
},
- onLoad() {
-
+ onLoad(option) {
+ this.details = uni.getStorageSync('order_detail')?uni.getStorageSync('order_detail'):''
+ uni.removeStorageSync('order_detail')
+ console.log(this.details)
},
methods: {
diff --git a/packages/myorder/myorder.vue b/packages/myorder/myorder.vue
index 911513f..adbf685 100644
--- a/packages/myorder/myorder.vue
+++ b/packages/myorder/myorder.vue
@@ -5,88 +5,32 @@
-
+
- 运单号1:SFSF1454237639361
- 已发货
+ 运单号:{{item.express_number?item.express_number:'-'}}
+ {{item.status==0?'待发货':'已发货'}}
-
+
- 蟹太太大闸蟹红金款999型
- 公4.0两母3.0两 4对 8只装
+ {{item.sku?item.sku.name:''}}
+ {{item.sku?item.sku.specs:''}}
-
+
预计送达时间
- 9月28日[周三]09:00-15:00
+ {{item.send_date?$moment(item.send_date).format("M月DD日"):''}}{{item.week?'['+item.week+']':''}}{{item.hh?item.hh:''}}
- 删除订单
+
通知收件人
-
-
-
- 商品兑换成功
- 待发货
-
-
-
-
-
-
-
- 蟹太太大闸蟹红金款999型
- 公4.0两母3.0两 4对 8只装
-
-
-
- 预计送达时间
- 9月28日[周三]09:00-15:00
-
-
-
- 删除订单
- 通知收件人
-
-
-
-
-
-
-
- 商品兑换成功
- 待发货
-
-
-
-
-
-
-
- 蟹太太大闸蟹红金款999型
- 公4.0两母3.0两 4对 8只装
-
-
-
- 预计送达时间
- 9月28日[周三]09:00-15:00
-
-
-
- 删除订单
- 通知收件人
-
-
-
-
@@ -97,30 +41,42 @@
data() {
return {
list: [{
- name: '全部'
+ name: '全部',
+ status:'',
}, {
- name: '待发货'
+ name: '待发货',
+ status:0
}, {
- name: '待收货',
- },{
- name: '已完成',
- }],
- current: 0
+ name: '已发货',
+ status:1
+ }],
+ status:'',
+ current: 0,
+ orderList:[]
}
},
onLoad() {
-
+ this.getOrderList()
},
methods: {
change(index) {
- this.current = index;
+ this.current = index;
+ this.status = this.list[index].status
+ this.getOrderList()
},
- toDetail(){
- console.log("123")
+ toDetail(item){
+ uni.setStorageSync('order_detail', item)
uni.navigateTo({
url:'/packages/myorder/infoconfirm'
})
- }
+ },
+ async getOrderList(){
+ const res = await this.$u.api.getUserOrder({
+ status:this.status
+ })
+ this.orderList = res
+ // this.listArea = res.regions
+ },
}
}
diff --git a/packages/order/order.vue b/packages/order/order.vue
index bf5617a..8a9dede 100644
--- a/packages/order/order.vue
+++ b/packages/order/order.vue
@@ -1,72 +1,77 @@
-
-
- {{cardInfo.sku?cardInfo.sku.name:''}}
-
-
-
-
-
- {{cardInfo.sku?cardInfo.sku.specs:''}}
-
-
- 今日剩余可提货量
- 99
-
-
- 卡券状态
-
+
+
+
+
+
+
+
+
+ {{cardInfo.sku?cardInfo.sku.name:''}}
+
+
+
+
+ {{cardInfo.sku?cardInfo.sku.specs:''}}
+
+
+ 今日剩余可提货量
+ 99
+
+
+ 卡券状态
+
+
-
-
-
- 提货时间
-
-
- 顺丰快递
- 9月28日 [周三] 09:00-15:00
+
-
-
+
+
+
+
+
+ {{form.express}}
+ {{form.ymd}} [{{form.week}}]
+ {{form.hh}}
+
+
+
+ 选择提货时间
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
定位
-
+
-
-
+
@@ -75,14 +80,13 @@
获取位置
-->
-
+
-
+
-
+
@@ -91,66 +95,84 @@
点击提货
-
-
-
-
+
-
-
-
-
- 您提货的商品是
-
- {{cardInfo.sku?cardInfo.sku.name:''}}{{cardInfo.sku?cardInfo.sku.specs:''}}
+
+
+
+
+
+
+ {{cardInfo.sku?cardInfo.sku.name:''}}
+ {{cardInfo.sku?cardInfo.sku.specs:''}}
-
- 发货时间
- {{momentDay(date)}}
+
+
+
+
-
- 收货信息
-
-
- 收货人:
- {{form.contact}}
-
-
- 收货人电话:
- {{form.mobile}}
-
-
- 收货地址:
- {{form.area}}{{form.address}}
-
+
+ 收货日期
+
+ {{form.ymd}}
+ {{form.lunarData}}
+
+
+ {{form.hh}}
+ [{{form.week}}]
+
+
+
+
+
+
+
+
+ 收货地址
+
+ {{form.area}}{{form.address}}
-
- 返回修改
- 确认提货
+
+
+
+
+
+
+ 收货人
+
+ {{form.contact}}
+ {{form.mobile}}
+
+
+ 返回修改
+ 确认提货
+
-
-
-
-
-
-
-
-
- {{item.contact}} {{item.mobile}}
- {{item.area}}{{item.address}}
-
-
+
+
+
+ 选择地址
+
+
+
+
+ {{item.contact}} {{item.mobile}}
+ {{item.area}}{{item.address}}
+
+
+
-
+
+
@@ -163,11 +185,11 @@
isNull
} from '@/common/util.js'
import solarLunar from '@/node_modules/solarlunar';
- import auiPicker from '@/components/aui-picker.vue';
+ import auiPicker from '@/components/aui-picker.vue';
import datePicker from '@/components/date-picker/date-picker.vue'
export default {
components: {
- auiPicker,
+ auiPicker,
datePicker
},
data() {
@@ -180,7 +202,14 @@
form: {
card_number: '',
password: '',
+
send_date: '',
+ ymd: '',
+ lunarData: '',
+ express: '',
+ hh: '',
+ week: '',
+
area: '',
address: '',
province_id: '',
@@ -189,20 +218,19 @@
contact: '',
mobile: '',
mobile2: '',
- checked: false,
+ defalut: false,
myself: 1,
buy_name: '',
buy_mobile: ''
- },
- listExpress:[{
- id:0,
- value:'顺丰快递'
- },{
- id:1,
- value:'中通快递'
+ },
+ listExpress: [{
+ id: 0,
+ value: '顺丰快递'
+ }, {
+ id: 1,
+ value: '中通快递'
}],
listDates: [],
- showCalendar: false,
date: '',
listArea: [],
showArea: false,
@@ -218,7 +246,7 @@
rules: {
send_date: [{
required: true,
- message: '请选择预约提货时间',
+ message: '请选择提货时间',
trigger: ['change', 'blur'],
}],
area: [{
@@ -251,7 +279,7 @@
}
},
onReady() {
- // this.$refs.uForm.setRules(this.rules);
+ this.$refs.uForm.setRules(this.rules);
},
onLoad(option) {
@@ -294,53 +322,55 @@
}
})
}
- },
-
+ },
+
async getDates() {
await this.$u.api.getDates({
card_number: this.form.card_number,
password: this.form.password,
}).then(res => {
- console.log("dare", res)
let data = res.card
if (data.open_dates) {
- for (var k in data.open_dates) {
+ for (var k in data.open_dates) {
let _k = this.momentDay(k)
this.listDates.push(_k)
}
- }
- console.log("this.listDates",this.listDates)
+ }
}).then(res => {
})
- },
- momentDay(date) {
- if (date) {
- const weeks = ["周日", '周一', '周二', '周三', '周四', '周五', '周六', ]
- let dateArr = date.split("-")
- let ymd = this.$moment(date).format("M月DD日")
- let week = weeks[this.$moment(date).day()]
- const solar2lunarData = solarLunar.solar2lunar(dateArr[0], dateArr[1], dateArr[2]);
- return {
- ymd:ymd,
- week:week,
- lunarData:`农历${solar2lunarData.monthCn}${solar2lunarData.dayCn}`,
- }
- }
-
- },
- openDatePicker(){
- this.$refs.datePickers.show = true
},
- changeDate(e) {
- console.log(e)
+ momentDay(date) {
+ if (date) {
+ const weeks = ["周日", '周一', '周二', '周三', '周四', '周五', '周六', ]
+ let dateArr = date.split("-")
+ let ymd = this.$moment(date).format("M月DD日")
+ let week = weeks[this.$moment(date).day()]
+ const solar2lunarData = solarLunar.solar2lunar(dateArr[0], dateArr[1], dateArr[2]);
+
+ return {
+ date: date,
+ ymd: ymd,
+ week: week,
+ lunarData: `农历${solar2lunarData.monthCn}${solar2lunarData.dayCn}`,
+ }
+ }
+
+ },
+ backDate(e) {
+ console.log("e123", e)
if (e) {
- // this.form.send_date = e.result
- // this.date = e
- this.date = e[0].label
- this.form.send_date = e[0].value
+ this.form.send_date = e.date
+ this.form.ymd = e.ymd
+ this.form.express = e.expressvalue
+ this.form.hh = e.hhtime
+ this.form.week = e.week
+ this.form.lunarData = e.lunarData
}
},
+ openDatePicker() {
+ this.$refs.datePickers.show = true
+ },
async getArea() {
const res = await this.$u.api.getRegion()
this.listArea = res.regions
@@ -410,7 +440,49 @@
}
})
},
+ backShow() {
+ let that = this
+ uni.setNavigationBarTitle({
+ title: '信息确认',
+ success: function() {
+ console.log('标题设置成功');
+ that.showinfo = false
+ },
+ fail: function(err) {
+ console.error('标题设置失败', err);
+ }
+ });
+ },
+ saveDefalutAddress() {
+ if (this.form.defalut) {
+ this.$u.api.saveUserAddress({
+ id: this.form.address_id ? this.form.address_id : '',
+ area: this.form.area,
+ address: this.form.address,
+ contact: this.form.contact,
+ mobile: this.form.mobile,
+ province_id: this.form.province_id,
+ city_id: this.form.city_id,
+ district_id: this.form.district_id,
+ defalut: 1
+ }).then(res => {
+ uni.redirectTo({
+ url: '/packages/myorder/myorder'
+ })
+ }).then(res => {
+ uni.redirectTo({
+ url: '/packages/myorder/myorder'
+ })
+ })
+ } else {
+ uni.redirectTo({
+ url: '/packages/myorder/myorder'
+ })
+ }
+
+ },
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 (!isMobile(this.form.mobile2)) {
@@ -423,23 +495,30 @@
}
}
this.$refs.uForm.validate(valid => {
- console.log('验证通过');
+ // console.log('验证通过');
if (valid) {
if (!this.showinfo) {
- this.showinfo = true
- console.log("this.showinfo", this.showinfo)
+ uni.setNavigationBarTitle({
+ title: '信息确认',
+ success: function() {
+ console.log('标题设置成功');
+ that.showinfo = true
+ },
+ fail: function(err) {
+ console.error('标题设置失败', err);
+ }
+ });
} else {
- console.log('submit');
this.form.show = 0
this.$u.api.addUserOrder(this.form).then(res => {
console.log("res", res)
uni.removeStorageSync('vuex_card')
- toast(res.msg)
- setTimeout(function() {
- uni.redirectTo({
- url: '/packages/myorder/myorder'
- })
- }, 2000)
+ toast(res.msg, 1000, function() {
+ setTimeout(function() {
+ that.saveDefalutAddress()
+ }, 500)
+
+ })
}).then(res => {
console.log('res1', res)
@@ -449,6 +528,7 @@
} else {
console.log('验证失败');
+ // toast('请填写完整信息')
}
});
}
@@ -462,6 +542,7 @@
padding: 29rpx 54rpx;
background-color: #f0efed;
padding-bottom: 200rpx;
+
.addressinfo {
position: fixed;
top: 0;
@@ -475,8 +556,9 @@
justify-content: center;
.content {
- width: 80%;
- height: 600rpx;
+ width: 100%;
+ height: 800rpx;
+ // overflow: scroll;
position: relative;
&-wrap {
@@ -485,18 +567,21 @@
border-radius: 20rpx;
overflow: scroll;
width: 100%;
- height: 100%;
- padding: 40rpx;
+ height: 650rpx;
+ padding: 40rpx;
+ padding-top:0;
}
- &-close {
- position: absolute;
- top: -20rpx;
- right: -20rpx;
+ &-title {
+ text-align: center;
+ padding: 30rpx;
+ font-size: 32rpx;
+
}
.u-radio {
align-items: baseline;
+ margin-bottom: 20rpx;
}
&-contact {}
@@ -509,78 +594,6 @@
}
}
- .showinfo {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background: rgba(0, 0, 0, .5);
- z-index: 9999999;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .content {
- width: 100vw;
- height: 100vh;
- padding: 40rpx;
- box-sizing: border-box;
- background: #fff;
- // border-radius: 16rpx;
- overflow: scroll;
- }
-
- &-info {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
-
- >view {
- margin: 20rpx;
- font-size: 36rpx;
-
- &:last-child {
- width: 350rpx;
- color: #ccc;
- font-size: 28rpx;
- text-align: center;
- }
-
- }
- }
-
- &-wrap {
- >view {
- &:first-child {
- text-align: center;
- margin: 20rpx;
- }
-
- &:last-child {
- border: 1px solid #333;
- padding: 20rpx;
- border-radius: 15rpx;
- font-weight: bold;
-
- >view {
- margin-bottom: 10rpx;
- }
- }
- }
- }
-
- &-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 30rpx;
-
- u-button {
- margin: 0 20rpx;
- }
- }
- }
.orderInfo {
padding: 40rpx 24rpx;
@@ -639,16 +652,26 @@
flex-wrap: wrap;
justify-content: space-between;
- >view {
+ .u-form-item {
+ padding: 0;
+
+ .u-form-item__body {
+ align-items: baseline;
+ }
+ }
+
+ .hh {
&:last-child {
text-align: right;
display: flex;
align-items: center;
+ justify-content: flex-end;
>view {
&:first-child {
view {
- margin-bottom: 15rpx;
+ height: 50rpx;
+ line-height: 50rpx;
&:last-child {
margin-bottom: 0rpx
@@ -724,5 +747,147 @@
}
}
}
+
+ .ordercontainer {
+ background: #f0efed;
+ width: 100%;
+ height: 100vh;
+ padding: 42rpx 50rpx 300rpx;
+ overflow-y: scroll;
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 9999999;
+ }
+
+ .confirmbox {
+ width: 100%;
+ padding-top: 22rpx;
+ padding-bottom: 35rpx;
+ background: url(../../static/confirmbg1.jpg) no-repeat center top;
+ background-size: cover;
+ border-radius: 10rpx;
+ box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, .47);
+
+ }
+
+ .confirmpicinfo {
+ text-align: center;
+ font-size: 24rpx;
+ color: #d5c7b5;
+ line-height: 42rpx;
+ }
+
+ .imgbox {
+ width: 307rpx;
+ margin: 0 auto;
+ border-radius: 10rpx;
+ border: 1px solid #ba8b45;
+ overflow: hidden;
+ margin-bottom: 14rpx;
+ }
+
+ .imgbox image {
+ width: 100%;
+ height: auto;
+ vertical-align: middle;
+ }
+
+ .confirmpicinfo .pictitle {
+ color: #ba8b45;
+ }
+
+ .confirmlist {
+ margin-top: 30rpx;
+ border-radius: 10rpx;
+ overflow: hidden;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-repeat: no-repeat;
+ background-position: center top;
+ background-size: cover;
+ box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, .47);
+ padding: 10rpx 10rpx 10rpx 20rpx;
+ }
+
+ .confirmlist.index0 {
+ background-image: url(../../static/confirmbg2.jpg);
+ }
+
+ .confirmlist.index1 {
+ background-image: url(../../static/confirmbg3.jpg);
+ }
+
+ .confirmlist.index2 {
+ background-image: url(../../static/confirmbg4.jpg);
+ }
+
+ .confirmlist image {
+ width: 62rpx;
+ height: auto;
+ }
+
+ .confirmlist .confirmright {
+ width: 550rpx;
+ background: #fff;
+ border-radius: 10rpx;
+ padding: 45rpx 20rpx 25rpx;
+ }
+
+ .confirmmarker {
+ display: block;
+ font-size: 24rpx;
+ color: #000;
+ font-weight: bold;
+ margin-bottom: 8rpx;
+ }
+
+ .flex-li {
+ display: flex;
+ justify-content: space-between;
+ color: #000;
+ font-size: 30rpx;
+ line-height: 60rpx;
+ }
+
+ .confirmdate text.smallfont {
+ font-size: 24rpx;
+ }
+
+ .confirmbtn {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ // height: 115rpx;
+
+ display: flex;
+ padding: 40rpx 0rpx;
+ justify-content: space-between;
+ background: #fff;
+ align-items: center;
+ }
+
+ .confirmbtn text {
+ display: inline-block;
+ width: 284rpx;
+ line-height: 74rpx;
+ height: 74rpx;
+ text-align: center;
+ border-radius: 74rpx;
+ border: 1rpx solid #d1d1d0;
+ margin: 0 38rpx;
+ font-size: 29rpx;
+ color: #000;
+ }
+
+ .confirmbtn text.confirmtab {
+ color: #fff;
+ border: 1rpx solid #ba8b45;
+ background: #ba8b45;
+ }
}
\ No newline at end of file
diff --git a/pages/me/me.vue b/pages/me/me.vue
index c5fd621..bdcf69d 100644
--- a/pages/me/me.vue
+++ b/pages/me/me.vue
@@ -10,24 +10,40 @@
-
-
-
+
+
+
+
+
+
+
+
+ {{item.title}}
- {{item.title}}
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
@@ -42,21 +58,22 @@
姓名:
+ v-model="form.nickname" placeholder="请输入姓名" :border="false" shape="circle"
+ clearable>
+
+
+
+ 电话:
+
+
-
-
- 电话:
-
-
-
提 交
-
+
@@ -70,47 +87,49 @@
toast,
shareInfo
} from "@/common/util.js"
- import tabbar from '@/components/tabbar/tabbar.vue';
- export default{
- components:{
- tabbar
+ import tabbar from '@/components/tabbar/tabbar.vue';
+ export default {
+ components: {
+ tabbar
},
data() {
return {
- navBarTop: 0,
- showPhone:false,
+ navBarTop: 0,
+ showPhone: false,
info: {},
headReplace: require('@/static/share.jpg'),
showform: false,
maskClose: false,
imgurl: '',
form: {
- nickname: '',
- mobile:''
+ nickname: '',
+ mobile: ''
},
list: [{
- title: '我的订单',
- icon:'order',
- url: '/packages/myorder/myorder',
- },{
- title: '我的积分',
- icon:'coupon',
- url: '/packages/my/score',
- },
- // {
- // title: '卡劵查询',
- // icon:'search',
- // url: '/packages/card/index',
- // },
- {
- title: '我的地址',
- icon:'map',
- url: '/packages/my/address',
- },{
- title: '意见反馈',
- icon:'info-circle',
- url: '/packages/my/feedback',
- }]
+ title: '我的订单',
+ icon: 'order',
+ url: '/packages/myorder/myorder',
+ }, {
+ title: '我的积分',
+ icon: 'coupon',
+ url: '/packages/my/score',
+ },
+ // {
+ // title: '卡劵查询',
+ // icon:'search',
+ // url: '/packages/card/index',
+ // },
+ {
+ title: '我的地址',
+ icon: 'map',
+ url: '/packages/my/address',
+ }, {
+ id: 'feedback',
+ title: '意见反馈',
+ icon: 'info-circle',
+ // url: '/packages/my/feedback',
+ }
+ ]
}
},
onShareAppMessage() {
@@ -122,34 +141,34 @@
onLoad() {
const MenuButton = uni.getMenuButtonBoundingClientRect()
this.navBarTop = MenuButton.top //左侧文字与右侧胶囊对齐
- },
- onShow() {
- this.getInitUser()
+ },
+ onShow() {
+ this.getInitUser()
},
methods: {
- onChooseAvatar(e) {
- console.log("e",e)
+ onChooseAvatar(e) {
+ console.log("e", e)
uni.uploadFile({
url: baseUrl + "/api/mobile/user/upload",
filePath: e.detail.avatarUrl,
- name: 'file',
- header:{
- 'Authorization' : `Bearer ${this.vuex_token}`
+ name: 'file',
+ header: {
+ 'Authorization': `Bearer ${this.vuex_token}`
},
success: (res) => {
uni.showToast({
title: '上传成功',
duration: 1000
- })
-
- this.imgurl = JSON.parse(res.data).url
+ })
+
+ this.imgurl = JSON.parse(res.data).url
this.form.headimgurl = this.imgurl
- },
- fail(res){
- uni.showToast({
- title: '上传失败',
- duration: 1000
- })
+ },
+ fail(res) {
+ uni.showToast({
+ title: '上传失败',
+ duration: 1000
+ })
}
})
},
@@ -160,30 +179,30 @@
this.form.nickname = e.detail.value
}
- },
- getUserWxPhone(res) {
- if(!res.detail.code){
- this.showPhone = false
- return
- }
- this.$u.api.getUserMobile({
- code: res.detail.code,
- iv:res.detail.iv,
- encryptedData:res.detail.encryptedData
- }).then(res => {
- this.form.mobile = res.mobile
- this.showPhone = false
- this.showform = true
- })
+ },
+ getUserWxPhone(res) {
+ if (!res.detail.code) {
+ this.showPhone = false
+ return
+ }
+ this.$u.api.getUserMobile({
+ code: res.detail.code,
+ iv: res.detail.iv,
+ encryptedData: res.detail.encryptedData
+ }).then(res => {
+ this.form.mobile = res.mobile
+ this.showPhone = false
+ this.showform = true
+ })
},
async getInitUser() {
const res = await this.$u.api.user()
this.$u.vuex('vuex_user', res.user)
this.form = res.user
this.imgurl = res.user.headimgurl ? res.user.headimgurl : ''
- this.info = this.$u.deepClone(res.user);
- if(isNull(res.user.mobile)){
- this.showPhone = true
+ this.info = this.$u.deepClone(res.user);
+ if (isNull(res.user.mobile)) {
+ this.showPhone = true
}
},
submit() {
@@ -198,10 +217,10 @@
})
},
toUrl(item) {
- if(item.url){
- uni.navigateTo({
- url:item.url
- })
+ if (item.url) {
+ uni.navigateTo({
+ url: item.url
+ })
}
},
}
@@ -265,6 +284,23 @@
color: #666666;
border-bottom: 1px solid #e0e0e0;
+ button {
+ padding: 0;
+ margin: 0;
+ border: 1px solid transparent;
+ width: 100%;
+ background: transparent;
+ display: flex;
+ justify-content: space-between;
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 1.5;
+ }
+
+ button::after {
+ border: none;
+ }
+
& image {
vertical-align: middle;
@@ -344,7 +380,7 @@
&-btn {
box-shadow: 0.5px 3px 9px 0px rgba(235, 107, 85, 0.3);
- background: #2979ff;
+ background: #ba8b45;
border-radius: 44rpx;
text-align: center;
height: 88rpx;
@@ -356,6 +392,4 @@
}
}
}
-
-
\ No newline at end of file
diff --git a/pages/talk/talk.vue b/pages/talk/talk.vue
index e75f472..d96be24 100644
--- a/pages/talk/talk.vue
+++ b/pages/talk/talk.vue
@@ -10,7 +10,7 @@
-
+
长按扫码添加企业微信