小程序订单页面优化

pull/56/head
Suk1No 1 month ago
parent 1a31c16083
commit 58ff637238

@ -12,13 +12,11 @@
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="star" title="我的收藏"></u-cell-item>
<u-cell-item icon="photo" title="我的订单"></u-cell-item>
<u-cell-item @click="toOrder" icon="star" title="我的订单"></u-cell-item>
<u-cell-item icon="photo" title="我的收藏"></u-cell-item>
<u-cell-item icon="coupon" title="我的地址"></u-cell-item>
</u-cell-group>
</view>
</view>
</template>
@ -29,6 +27,9 @@
import {
ref
} from 'vue'
import {
userLogin
} from '../../api/user.js'
//
const nickName = ref('大幕孤烟直')
//
@ -52,7 +53,16 @@
})
}
}
//
const toOrder = () => {
getUserInfo()
//details.vue
uni.navigateTo({
url: '../order/order'
});
}
onShow(() => {
userLogin()
getUserInfo()
})
</script>

@ -17,7 +17,10 @@
<view class="store">{{ res.userName }}</view>
<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
</view>
<view class="right">{{ res.phone }}</view>
<view style="margin-left: 6px;;" class="right">{{ res.phone }}</view>
</view>
<view class="">
{{res.address}}
</view>
<view class="item" v-for="(item, index) in res.goodsList" :key="index">
<view class="left">
@ -44,12 +47,8 @@
</text>
</view>
<view class="bottom">
<view class="more">
<u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon>
</view>
<view class="logistics btn">查看物流</view>
<view class="exchange btn">卖了换钱</view>
<view class="evaluate btn">评价</view>
<view v-if="res.status == '0'" class="exchange btn"></view>
<view v-if="res.status == '2'" class="evaluate btn"></view>
</view>
</view>
<u-loadmore :status="loadStatus[index]" bgColor="#f2f2f2"></u-loadmore>
@ -150,7 +149,7 @@
const getOrderList = async (idx) => {
let res = await getOrderListApi({
openid: uni.getStorageSync("openid"),
type: idx == 0 ? '' : idx,
type: idx == 0 ? '' : idx - 1,
currentPage: currentPage.value,
pageSize: pageSize.value
})
@ -189,7 +188,7 @@
.order {
width: 710rpx;
background-color: #ffffff;
margin: 20rpx auto;
margin: 10rpx auto;
border-radius: 20rpx;
box-sizing: border-box;
padding: 20rpx;
@ -197,8 +196,8 @@
.top {
display: flex;
justify-content: space-between;
// justify-content: space-between;
.left {
display: flex;
align-items: center;
@ -223,8 +222,8 @@
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
}
}
@ -278,7 +277,7 @@
display: flex;
margin-top: 40rpx;
padding: 0 10rpx;
justify-content: space-between;
justify-content: flex-end;
align-items: center;
.btn {

Loading…
Cancel
Save