main
lion 1 year ago
parent 1c4b4e78f5
commit c9a5a524f4

@ -48,7 +48,7 @@ const install = (Vue, vm) => {
provider: 'weixin', provider: 'weixin',
success: (res) => { success: (res) => {
let url = baseUrl + let url = baseUrl +
'/api/mobile/user/login' '/api/mobile/user/applet-login'
uni.request({ uni.request({
url: url, url: url,
data:{ data:{

@ -202,12 +202,12 @@
width: 140rpx; width: 140rpx;
line-height: 80rpx; line-height: 80rpx;
color: #fff; color: #fff;
font-size: 24rpx; font-size: 26rpx;
border-right: 1rpx solid #f6d9b6; border-right: 1rpx solid #f6d9b6;
} }
.listitem text { .listitem text {
font-size: 24rpx; font-size: 26rpx;
line-height: 80rpx; line-height: 80rpx;
color: #f6d9b6; color: #f6d9b6;
padding-left: 20rpx; padding-left: 20rpx;
@ -218,7 +218,7 @@
height: 74rpx; height: 74rpx;
line-height: 74rpx; line-height: 74rpx;
background: #b98b44; background: #b98b44;
font-size: 24rpx; font-size: 26rpx;
color: #fff; color: #fff;
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;

@ -215,7 +215,7 @@
height: 74rpx; height: 74rpx;
line-height: 74rpx; line-height: 74rpx;
color: #676767 !important; color: #676767 !important;
font-size: 20rpx !important; font-size: 26rpx !important;
padding-left: 94rpx; padding-left: 94rpx;
padding-right: 30rpx; padding-right: 30rpx;
background-position: left 30rpx center; background-position: left 30rpx center;
@ -233,7 +233,7 @@
/deep/ .u-btn { /deep/ .u-btn {
color: #b98b44 !important; color: #b98b44 !important;
font-size: 24rpx !important; font-size: 26rpx !important;
font-weight: bold; font-weight: bold;
padding: 0; padding: 0;
height: 74rpx !important; height: 74rpx !important;

@ -9,8 +9,7 @@
<u-icon name="arrow-right" size="24"></u-icon> --> <u-icon name="arrow-right" size="24"></u-icon> -->
</view> </view>
</view> </view>
<view class="orderlist"> <view class="orderlist" v-if="showLog">
<view class="orderlist-item" v-for="item in scoreLog"> <view class="orderlist-item" v-for="item in scoreLog">
<view> <view>
<view>积分获取</view> <view>积分获取</view>
@ -23,19 +22,22 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else style="height:80vh">
<u-empty mode="data"></u-empty>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
components: { components: {},
},
data() { data() {
return { return {
isLoading: false, isLoading: false,
totalScore: 0, totalScore: 0,
scoreLog:[] scoreLog: [],
showLog:true
} }
}, },
onLoad() { onLoad() {
@ -49,6 +51,12 @@
const res = await this.$u.api.user() const res = await this.$u.api.user()
this.totalScore = res.user.score this.totalScore = res.user.score
this.scoreLog = res.scoreLog this.scoreLog = res.scoreLog
if(res.scoreLog && res.scoreLog.length>0){
this.showLog = true
}else{
this.showLog = false
}
} }
} }
} }
@ -61,48 +69,60 @@
height: 100vh; height: 100vh;
overflow: scroll; overflow: scroll;
} }
.ordertop { .ordertop {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 30rpx; margin-bottom: 30rpx;
>view { >view {
&:first-child { &:first-child {
font-size: 52rpx; font-size: 52rpx;
color: #ba8b45; color: #ba8b45;
} }
&:last-child { &:last-child {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
} }
} }
} }
.orderlist { .orderlist {
padding: 30rpx; padding: 30rpx;
// padding-bottom: 150rpx; // padding-bottom: 150rpx;
background-color: #fff; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
&-item { &-item {
border-bottom: 1px solid #f3f3f3; border-bottom: 1px solid #f3f3f3;
padding: 20rpx; padding: 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 28rpx;
>view { >view {
&:first-child { &:first-child {
font-size: 24rpx; font-size: 28rpx;
color: #000; color: #000;
>view { >view {
&:last-child { &:last-child {
font-size: 20rpx; font-size: 20rpx;
margin-top: 10rpx; margin-top: 10rpx;
color: #adadac; color: #adadac;
text { text {
margin-right: 20rpx; margin-right: 20rpx;
font-size: 26rpx;
} }
} }
} }
} }
&:last-child { &:last-child {
color: #ba8b45; color: #ba8b45;
font-size: 36rpx; font-size: 36rpx;

@ -202,8 +202,6 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
</view> </view>
</view> </view>
</template> </template>
@ -376,9 +374,11 @@
async getAddress() { async getAddress() {
const res = await this.$u.api.getUserAddress() const res = await this.$u.api.getUserAddress()
this.listAddress = res.address this.listAddress = res.address
if (!this.type == 'edit') { console.log("this.type",this.type)
if (!(this.type == 'edit')) {
this.showAddress = this.listAddress.length > 0 ? true : false this.showAddress = this.listAddress.length > 0 ? true : false
} }
console.log("this.type",this.type,this.showAddress)
}, },
// async getExpress() { // async getExpress() {
// const res = await this.$u.api.getExpress() // const res = await this.$u.api.getExpress()
@ -407,10 +407,12 @@
card_number: this.form.card_number card_number: this.form.card_number
}).then(res => { }).then(res => {
let data = res.card let data = res.card
if(data.open_dates && data.open_dates.length===0){
toast("当前无可提货时间")
return
}
if (data.open_dates) { if (data.open_dates) {
for (var k in data.open_dates) { for (var k in data.open_dates) {
// 0
if (data.open_dates[k]['quantity'] - data.open_dates[k]['booked'] > 0) { if (data.open_dates[k]['quantity'] - data.open_dates[k]['booked'] > 0) {
if(this.isAfterTwoDays(k)){ if(this.isAfterTwoDays(k)){
let _k = this.momentDay(k) let _k = this.momentDay(k)
@ -419,9 +421,10 @@
..._k ..._k
}) })
} }
} }
} }
}else{
toast("当前无可提货时间")
} }
}).then(res => { }).then(res => {

Loading…
Cancel
Save