main
lion 1 year ago
parent 1c4b4e78f5
commit c9a5a524f4

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

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

@ -215,7 +215,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;
@ -233,7 +233,7 @@
/deep/ .u-btn {
color: #b98b44 !important;
font-size: 24rpx !important;
font-size: 26rpx !important;
font-weight: bold;
padding: 0;
height: 74rpx !important;

@ -1,27 +1,29 @@
<template>
<view class='cotainer'>
<view>
<!-- <u-empty v-if="dataList.length==0" marginTop="250"></u-empty> -->
<view class="ordertop">
<view>{{totalScore}}</view>
<view>
<!-- <text>积分规则</text>
<u-icon name="arrow-right" size="24"></u-icon> -->
</view>
<!-- <u-empty v-if="dataList.length==0" marginTop="250"></u-empty> -->
<view class="ordertop">
<view>{{totalScore}}</view>
<view>
<!-- <text>积分规则</text>
<u-icon name="arrow-right" size="24"></u-icon> -->
</view>
</view>
<view class="orderlist">
<view class="orderlist-item" v-for="item in scoreLog">
<view>
<view>积分获取</view>
<view>
<text>{{item.created_at}}</text>
</view>
</view>
<view>
+{{item.score}}
</view>
<view class="orderlist" v-if="showLog">
<view class="orderlist-item" v-for="item in scoreLog">
<view>
<view>积分获取</view>
<view>
<text>{{item.created_at}}</text>
</view>
</view>
<view>
+{{item.score}}
</view>
</view>
</view>
<view v-else style="height:80vh">
<u-empty mode="data"></u-empty>
</view>
</view>
</view>
@ -29,85 +31,103 @@
<script>
export default {
components: {
},
components: {},
data() {
return {
isLoading: false,
totalScore:0,
scoreLog:[]
totalScore: 0,
scoreLog: [],
showLog:true
}
},
onLoad() {
// this.loadOrder(1)
// this.loadOrder(1)
this.loadScore()
},
methods: {
async loadScore(){
const res = await this.$u.api.user()
this.totalScore = res.user.score
async loadScore() {
const res = await this.$u.api.user()
this.totalScore = res.user.score
this.scoreLog = res.scoreLog
if(res.scoreLog && res.scoreLog.length>0){
this.showLog = true
}else{
this.showLog = false
}
}
}
}
</script>
<style lang="scss">
.cotainer{
padding: 40rpx;
background-color: #f0efed;
height: 100vh;
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;
}
}
<style lang="scss">
.cotainer {
padding: 40rpx;
background-color: #f0efed;
height: 100vh;
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;
}
}
}
.orderlist {
padding:30rpx;
// padding-bottom: 150rpx;
background-color: #fff;
border-radius: 10rpx;
&-item{
border-bottom:1px solid #f3f3f3;
padding:20rpx;
display: flex;
justify-content: space-between;
align-items: center;
>view{
&:first-child{
font-size: 24rpx;
color:#000;
>view{
&:last-child{
font-size: 20rpx;
margin-top:10rpx;
color:#adadac;
text{
margin-right:20rpx;
}
}
}
}
&:last-child{
color:#ba8b45;
font-size: 36rpx;
}
}
padding: 30rpx;
// padding-bottom: 150rpx;
background-color: #fff;
border-radius: 10rpx;
&-item {
border-bottom: 1px solid #f3f3f3;
padding: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
>view {
&:first-child {
font-size: 28rpx;
color: #000;
>view {
&:last-child {
font-size: 20rpx;
margin-top: 10rpx;
color: #adadac;
text {
margin-right: 20rpx;
font-size: 26rpx;
}
}
}
}
&:last-child {
color: #ba8b45;
font-size: 36rpx;
}
}
}
}
</style>

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

Loading…
Cancel
Save