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;

@ -1,27 +1,29 @@
<template> <template>
<view class='cotainer'> <view class='cotainer'>
<view> <view>
<!-- <u-empty v-if="dataList.length==0" marginTop="250"></u-empty> --> <!-- <u-empty v-if="dataList.length==0" marginTop="250"></u-empty> -->
<view class="ordertop"> <view class="ordertop">
<view>{{totalScore}}</view> <view>{{totalScore}}</view>
<view> <view>
<!-- <text>积分规则</text> <!-- <text>积分规则</text>
<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> <view>
<view> <text>{{item.created_at}}</text>
<text>{{item.created_at}}</text> </view>
</view> </view>
</view> <view>
<view> +{{item.score}}
+{{item.score}} </view>
</view>
</view> </view>
</view>
<view v-else style="height:80vh">
<u-empty mode="data"></u-empty>
</view> </view>
</view> </view>
</view> </view>
@ -29,85 +31,103 @@
<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() {
// this.loadOrder(1) // this.loadOrder(1)
this.loadScore() this.loadScore()
}, },
methods: { methods: {
async loadScore(){ async loadScore() {
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
}
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.cotainer{ .cotainer {
padding: 40rpx; padding: 40rpx;
background-color: #f0efed; background-color: #f0efed;
height: 100vh; height: 100vh;
overflow: scroll; overflow: scroll;
}
.ordertop{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom:30rpx;
>view{
&:first-child{
font-size: 52rpx;
color:#ba8b45;
}
&:last-child{
font-size: 24rpx;
color:#666666;
}
}
} }
.ordertop {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
>view {
&:first-child {
font-size: 52rpx;
color: #ba8b45;
}
&:last-child {
font-size: 24rpx;
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{
border-bottom:1px solid #f3f3f3; &-item {
padding:20rpx; border-bottom: 1px solid #f3f3f3;
display: flex; padding: 20rpx;
justify-content: space-between; display: flex;
align-items: center; justify-content: space-between;
>view{ align-items: center;
&:first-child{ font-size: 28rpx;
font-size: 24rpx;
color:#000; >view {
>view{ &:first-child {
&:last-child{ font-size: 28rpx;
font-size: 20rpx; color: #000;
margin-top:10rpx;
color:#adadac; >view {
text{ &:last-child {
margin-right:20rpx; font-size: 20rpx;
} margin-top: 10rpx;
} color: #adadac;
}
} text {
&:last-child{ margin-right: 20rpx;
color:#ba8b45;
font-size: 36rpx; font-size: 26rpx;
} }
} }
}
}
&:last-child {
color: #ba8b45;
font-size: 36rpx;
}
}
} }
} }
</style> </style>

@ -202,8 +202,6 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
</view> </view>
</view> </view>
</template> </template>
@ -375,10 +373,12 @@
methods: { methods: {
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()
@ -406,11 +406,13 @@
await this.$u.api.getDates({ await this.$u.api.getDates({
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