我的中的部分接口
This commit is contained in:
parent
d52c9b94a4
commit
2ab1b6df53
@ -10,6 +10,7 @@ export default {
|
|||||||
const data = {};
|
const data = {};
|
||||||
return request.post('/api/merchant/order',{merchant_product_id,order_amount})
|
return request.post('/api/merchant/order',{merchant_product_id,order_amount})
|
||||||
},
|
},
|
||||||
|
orderList:()=>request.get('/api/merchant-pay'),
|
||||||
calculatePrice:(merchant_product_id)=>request.post('/api/merchant/order/calculate-price',{merchant_product_id}),
|
calculatePrice:(merchant_product_id)=>request.post('/api/merchant/order/calculate-price',{merchant_product_id}),
|
||||||
merchantPay:(merchant_id,amount)=>request.post('/api/merchant-pay',{merchant_id,amount})
|
merchantPay:(merchant_id,amount)=>request.post('/api/merchant-pay',{merchant_id,amount})
|
||||||
}
|
}
|
||||||
16
api/user.js
16
api/user.js
@ -23,7 +23,21 @@ export default {
|
|||||||
pre:(data)=>request.post('/api/order/pre-order',data),
|
pre:(data)=>request.post('/api/order/pre-order',data),
|
||||||
real:(data)=>request.post('/api/order',data),
|
real:(data)=>request.post('/api/order',data),
|
||||||
list:()=>request.get('/api/order/user/list'),
|
list:()=>request.get('/api/order/user/list'),
|
||||||
merchantList:()=>request.get('/api/merchant/order/user')
|
merchantList:()=>request.get('/api/merchant/order/user'),
|
||||||
|
merchantDetail:(order_id)=>request.get(`/api/merchant/order/${order_id}`),
|
||||||
|
detail:(orderid)=>request.get(`/api/order/${orderid}`)
|
||||||
|
},
|
||||||
|
coupon:{
|
||||||
|
status:{
|
||||||
|
unused:'UNUSED',used:'USED',expired:'EXPIRED'
|
||||||
|
},
|
||||||
|
list:(status)=>request.get('/api/coupon/user/list',status?{status}:{})
|
||||||
|
},
|
||||||
|
point:{
|
||||||
|
list:()=>request.get('/api/point/records')
|
||||||
|
},
|
||||||
|
friend:{
|
||||||
|
list:()=>request.get('/api/user/referrals')
|
||||||
},
|
},
|
||||||
createPayment(order_id,order_type){
|
createPayment(order_id,order_type){
|
||||||
return request.post('/api/wechat/create-payment',{order_id,order_type});
|
return request.post('/api/wechat/create-payment',{order_id,order_type});
|
||||||
|
|||||||
26
app.js
26
app.js
@ -2,25 +2,12 @@ import userApi from './api/user';
|
|||||||
import commonApi from './api/common';
|
import commonApi from './api/common';
|
||||||
App({
|
App({
|
||||||
onLaunch() {
|
onLaunch() {
|
||||||
// 展示本地存储能力
|
|
||||||
const logs = wx.getStorageSync('logs') || []
|
|
||||||
logs.unshift(Date.now())
|
|
||||||
wx.setStorageSync('logs', logs)
|
|
||||||
|
|
||||||
// 登录
|
|
||||||
wx.login({
|
|
||||||
success: res => {
|
|
||||||
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
|
||||||
}
|
|
||||||
})
|
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
key:'accessToken',
|
key:'accessToken',
|
||||||
success:(res)=>{
|
success:(res)=>{
|
||||||
this.globalData.accessToken = res.data;
|
this.globalData.accessToken = res.data;
|
||||||
if(res.data){
|
if(res.data){
|
||||||
userApi.info().then((data)=>{
|
this.getUserInfo();
|
||||||
this.globalData.userInfo = data;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -30,6 +17,17 @@ App({
|
|||||||
url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async getUserInfo(){
|
||||||
|
if(this.globalData.userInfoGetTime&&
|
||||||
|
this.globalData.userInfo&&
|
||||||
|
new Date()-this.globalData.userInfoGetTime<1000*60*5){
|
||||||
|
return this.globalData.userInfo;
|
||||||
|
}
|
||||||
|
const data = await userApi.info();
|
||||||
|
this.globalData.userInfo = data;
|
||||||
|
this.globalData.userInfoGetTime = new Date();
|
||||||
|
return data;
|
||||||
|
},
|
||||||
globalData: {
|
globalData: {
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
accessToken:null,
|
accessToken:null,
|
||||||
|
|||||||
10
app.wxss
10
app.wxss
@ -163,6 +163,9 @@ page-container .content{
|
|||||||
.money-promation{
|
.money-promation{
|
||||||
color:#FF8400;
|
color:#FF8400;
|
||||||
}
|
}
|
||||||
|
.money-yellow{
|
||||||
|
color:var(--main-color);
|
||||||
|
}
|
||||||
.money-blue{
|
.money-blue{
|
||||||
color:#1A4DEB;
|
color:#1A4DEB;
|
||||||
}
|
}
|
||||||
@ -270,11 +273,11 @@ page-container .content{
|
|||||||
width:100%;
|
width:100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
background-color: #1A4DEB;
|
background-color:var(--main-color);
|
||||||
transition-duration: .4s;
|
transition-duration: .4s;
|
||||||
}
|
}
|
||||||
.tab-bar .current .item{
|
.tab-bar .current .item{
|
||||||
color: #000;
|
color: var(--main-color);
|
||||||
}
|
}
|
||||||
.tab-bar .current .item::before{
|
.tab-bar .current .item::before{
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@ -289,6 +292,9 @@ navigator button{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding:60rpx 0 30rpx 0;
|
padding:60rpx 0 30rpx 0;
|
||||||
}
|
}
|
||||||
|
.list-empty .icon{
|
||||||
|
width:132rpx;height:132rpx;
|
||||||
|
}
|
||||||
.list-empty .title{
|
.list-empty .title{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
BIN
assets/icon/shop/coupon-empty@2x.png
Normal file
BIN
assets/icon/shop/coupon-empty@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/icon/shop/point-empty@2x.png
Normal file
BIN
assets/icon/shop/point-empty@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
assets/icon/shop/promation@2x.png
Normal file
BIN
assets/icon/shop/promation@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 325 B |
@ -1,23 +1,34 @@
|
|||||||
// pages/my/coupon/index.js
|
import userApi from '../../../api/user';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
tabIndex:0
|
tabIndex:0,
|
||||||
|
list:[]
|
||||||
},
|
},
|
||||||
|
|
||||||
changeTab(event){
|
changeTab(event){
|
||||||
const tabIndex = event.currentTarget.dataset.index;
|
const tabIndex = event.currentTarget.dataset.index;
|
||||||
this.setData({tabIndex})
|
this.setData({tabIndex})
|
||||||
|
this.loadList();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.loadList();
|
||||||
|
},
|
||||||
|
|
||||||
|
loadList(){
|
||||||
|
const status = [userApi.coupon.status.unused,userApi.coupon.status.used,userApi.coupon.status.expired];
|
||||||
|
userApi.coupon.list(status[this.data.tabIndex]).then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
list:data
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -10,12 +10,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="coupon-list">
|
<view class="coupon-list" wx:if="{{list.length>0}}">
|
||||||
<view class="item" wx:for="{{3}}" wx:key="index">
|
<view class="item {{tabIndex==0?'':'used'}}" wx:for="{{list}}" wx:key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">平台奖励跑腿券</view>
|
<view class="name">{{item.coupon_name}}</view>
|
||||||
<view class="desc">有效期至2025.03.06</view>
|
<view class="desc">有效期至 {{item.expire_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right money money-blue">3.0</view>
|
<view class="right money money-yellow">{{item.coupon_amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="list-empty" wx:else>
|
||||||
|
<image class="icon" src="/assets/icon/shop/coupon-empty@2x.png"/>
|
||||||
|
<view class="title">暂无跑腿券</view>
|
||||||
|
</view>
|
||||||
@ -39,3 +39,23 @@
|
|||||||
right:-12rpx;
|
right:-12rpx;
|
||||||
left:auto;
|
left:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.coupon-list .item.used .name{
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
.coupon-list .item.used .money{
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-empty{
|
||||||
|
padding-top:400rpx;
|
||||||
|
}
|
||||||
|
.list-empty .icon{
|
||||||
|
width:132rpx;height:132rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-empty .title{
|
||||||
|
color: rgba(136, 136, 136, 0.6);
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-top:20rpx;
|
||||||
|
}
|
||||||
@ -1,18 +1,23 @@
|
|||||||
// pages/my/firend/index.js
|
import userApi from '../../../api/user';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
list:[]
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
userApi.friend.list().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
list:data
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<view class="firend-list">
|
<view class="firend-list" wx:if="{{list.length>0}}">
|
||||||
<view class="item" wx:for="{{3}}" wx:key="index">
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">跑腿订单返现</view>
|
<view class="name">跑腿订单返现</view>
|
||||||
<view class="desc">134****6777</view>
|
<view class="desc">134****6777</view>
|
||||||
@ -10,3 +10,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="list-empty">
|
||||||
|
<view class="sub-title">暂无邻友</view>
|
||||||
|
</view>
|
||||||
@ -25,5 +25,5 @@
|
|||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
.firend-list .item .status{
|
.firend-list .item .status{
|
||||||
color:#1A4DEB;
|
color:var(--main-color)
|
||||||
}
|
}
|
||||||
@ -1,11 +1,12 @@
|
|||||||
// pages/my/index/index.js
|
const app = getApp();
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
userInfo:{}
|
||||||
},
|
},
|
||||||
|
|
||||||
goToCouponList(){
|
goToCouponList(){
|
||||||
@ -23,7 +24,11 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
app.getUserInfo().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
userInfo:data
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image class="avatar" src="/assets/imgs/for_test/avatar.png"/>
|
<image class="avatar" src="{{userInfo.avatar}}"/>
|
||||||
<view class="name">微信用户</view>
|
<view class="name">{{userInfo.nickname}}</view>
|
||||||
<navigator class="setting" url="/pages/my/setting/index">
|
<navigator class="setting" url="/pages/my/setting/index">
|
||||||
<image src="/assets/icon/my/setting@2x.png" class="icon"/>
|
<image src="/assets/icon/my/setting@2x.png" class="icon"/>
|
||||||
</navigator>
|
</navigator>
|
||||||
@ -10,12 +10,12 @@
|
|||||||
|
|
||||||
<view class="page-container property">
|
<view class="page-container property">
|
||||||
<view class="item" bind:tap="goToCouponList">
|
<view class="item" bind:tap="goToCouponList">
|
||||||
<view class="value">2</view>
|
<view class="value">{{userInfo.coupon_count}}</view>
|
||||||
<view class="key">跑腿券(张)</view>
|
<view class="key">跑腿券(张)</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" bind:tap="goToMoney">
|
<view class="item" bind:tap="goToMoney">
|
||||||
<view class="money value">0.0</view>
|
<view class="value">{{userInfo.points}}</view>
|
||||||
<view class="key">消费金(元)</view>
|
<view class="key">蜂蜜(克)</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,10 @@
|
|||||||
.user-info{
|
.user-info{
|
||||||
height:460rpx;
|
height:460rpx;
|
||||||
background-color: #1A4DEB;
|
background: linear-gradient(298deg, #FFC300 9%, #FFD95D 97%);
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-radius: 0 0 20rpx 20rpx;
|
||||||
}
|
}
|
||||||
.user-info::before{
|
|
||||||
content:'';
|
|
||||||
position: absolute;
|
|
||||||
width:215rpx;height:215rpx;
|
|
||||||
border: 50rpx solid #2459FF;
|
|
||||||
border-top:0;
|
|
||||||
border-left: 0;
|
|
||||||
top:0;left:0;
|
|
||||||
border-radius: 0 0 100% 0;
|
|
||||||
}
|
|
||||||
.user-info::after{
|
|
||||||
content:'';
|
|
||||||
position: absolute;
|
|
||||||
width:135rpx;height:135rpx;
|
|
||||||
border: 50rpx solid #2459FF;
|
|
||||||
border-right:0;
|
|
||||||
border-bottom: 0;
|
|
||||||
right:0;bottom:0;
|
|
||||||
border-radius: 100% 0 0 0;
|
|
||||||
z-index: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info .content{
|
.user-info .content{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -37,7 +16,6 @@
|
|||||||
width:112rpx;height:112rpx;
|
width:112rpx;height:112rpx;
|
||||||
}
|
}
|
||||||
.user-info .content .name{
|
.user-info .content .name{
|
||||||
color:#fff;
|
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
flex:1;
|
flex:1;
|
||||||
@ -75,5 +53,4 @@
|
|||||||
}
|
}
|
||||||
.property .item .value{
|
.property .item .value{
|
||||||
font-size:56rpx;
|
font-size:56rpx;
|
||||||
color:#1A4DEB;
|
|
||||||
}
|
}
|
||||||
@ -1,18 +1,23 @@
|
|||||||
// pages/my/money/index.js
|
import userApi from '../../../api/user';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
list:[]
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
userApi.point.list().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
list:data
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,15 +1,19 @@
|
|||||||
<view class="consume">
|
<view class="consume">
|
||||||
<view class="title">消费金 (元)</view>
|
<view class="title">蜂蜜 (克)</view>
|
||||||
<view class="money">3.3</view>
|
<view class="point">0</view>
|
||||||
<view class="tips">买券自动抵扣</view>
|
<view class="tips">取包裹自动抵扣</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="money-list">
|
<view class="money-list" wx:if="{{list.length>0}}">
|
||||||
<view class="item" wx:for="{{3}}" wx:key="index">
|
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">跑腿订单返现</view>
|
<view class="name">跑腿订单返现</view>
|
||||||
<view class="desc">2024.03.01 10:12:20</view>
|
<view class="desc">2024.03.01 10:12:20</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money money-blue">3.3</view>
|
<view class="money money-yellow">3.3</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="list-empty" wx:else>
|
||||||
|
<image class="icon" src="/assets/icon/shop/point-empty@2x.png"/>
|
||||||
|
<view class="sub-title">暂无蜂蜜</view>
|
||||||
|
</view>
|
||||||
@ -1,26 +1,24 @@
|
|||||||
|
|
||||||
.consume{
|
.consume{
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
background: linear-gradient(270deg, #3566FF 0%, #1A4DEB 60%);
|
background: linear-gradient(270deg, #FFDB00 0%, #FFC300 60%);
|
||||||
box-shadow: 0 10rpx 10rpx 0 rgba(54, 98, 236, 0.2);
|
box-shadow: 0 10rpx 10rpx 0 rgba(54, 98, 236, 0.2);
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
padding:40rpx 30rpx;
|
padding:40rpx 30rpx;
|
||||||
color:#fff;
|
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
.consume .title{
|
.consume .title{
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.consume .money{
|
.consume .point{
|
||||||
font-size: 70rpx;
|
font-size: 70rpx;
|
||||||
margin-top:40rpx;
|
margin-top:40rpx;
|
||||||
color:#fff;
|
|
||||||
}
|
}
|
||||||
.consume .tips{
|
.consume .tips{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
right:0;top:32rpx;
|
right:0;top:32rpx;
|
||||||
border-radius: 60rpx 0 0 60rpx;
|
border-radius: 60rpx 0 0 60rpx;
|
||||||
background-color: #1A4DEB;
|
background-color:var(--main-color);
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
padding:0 16rpx;
|
padding:0 16rpx;
|
||||||
@ -51,3 +49,6 @@
|
|||||||
.money-list .item .money::before{
|
.money-list .item .money::before{
|
||||||
content: '+';
|
content: '+';
|
||||||
}
|
}
|
||||||
|
.list-empty{
|
||||||
|
padding-top:300rpx;
|
||||||
|
}
|
||||||
@ -1,11 +1,12 @@
|
|||||||
// pages/order/detail-group/index.js
|
import userApi from '../../../api/user';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
orderDetail:{}
|
||||||
},
|
},
|
||||||
|
|
||||||
goToSuccess(){
|
goToSuccess(){
|
||||||
@ -13,12 +14,26 @@ Page({
|
|||||||
url: '/pages/order/success/index',
|
url: '/pages/order/success/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
makePhoneCall(){
|
||||||
|
wx.makePhoneCall({
|
||||||
|
phoneNumber: this.data.orderDetail.merchant_phone,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
copyOrderId(){
|
||||||
|
wx.setClipboardData({
|
||||||
|
data: this.data.orderDetail.order_id,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
userApi.order.merchantDetail(options.id).then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
orderDetail:data
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "到店出示二维码"
|
||||||
}
|
}
|
||||||
@ -1,14 +1,13 @@
|
|||||||
<view class="page-container prd-info">
|
<view class="page-container prd-info">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<image class="image" src="/assets/imgs/for_test/woman.png"/>
|
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<view class="name">【洗吹】精致造型</view>
|
<view class="name">{{orderDetail.product_name}}</view>
|
||||||
<view class="tags">
|
<view class="tags">
|
||||||
<view class="tag">周一至周五可用</view>
|
<view class="tag">周一至周五可用</view>
|
||||||
<view class="tag">免预约</view>
|
<view class="tag">免预约</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money money-normal">9.9</view>
|
<view class="money money-normal">{{orderDetail.order_amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="spliter dashed"></view>
|
<view class="spliter dashed"></view>
|
||||||
<view class="qrcode" bind:tap="goToSuccess">
|
<view class="qrcode" bind:tap="goToSuccess">
|
||||||
@ -18,8 +17,8 @@
|
|||||||
|
|
||||||
<view class="page-container address">
|
<view class="page-container address">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="text1">椰岛造型</view>
|
<view class="text1">{{orderDetail.merchant_name}}</view>
|
||||||
<view class="text2">距离 2.1km</view>
|
<view class="text2">距离 xxx km</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right location">
|
<view class="right location">
|
||||||
<view class="icon-con">
|
<view class="icon-con">
|
||||||
@ -27,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text">导航</view>
|
<view class="text">导航</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right phone">
|
<view class="right phone" bind:tap="makePhoneCall">
|
||||||
<view class="icon-con">
|
<view class="icon-con">
|
||||||
<image class="icon" src="/assets/icon/shop/phone@2x.png"/>
|
<image class="icon" src="/assets/icon/shop/phone@2x.png"/>
|
||||||
</view>
|
</view>
|
||||||
@ -40,8 +39,14 @@
|
|||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">交易订单</view>
|
<view class="key">交易订单</view>
|
||||||
<view class="value">4972003158292222817</view>
|
<view class="value">{{orderDetail.order_id}}</view>
|
||||||
<view class="copy">复制</view>
|
<view class="copy-area" bind:tap="copyOrderId">
|
||||||
|
<view class="copy">复制</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">订单状态</view>
|
||||||
|
<view class="value">{{orderDetail.status}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">交易方式</view>
|
<view class="key">交易方式</view>
|
||||||
@ -49,17 +54,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">手机号码</view>
|
<view class="key">手机号码</view>
|
||||||
<view class="value">157****0627</view>
|
<view class="value">{{}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">下单时间</view>
|
<view class="key">下单时间</view>
|
||||||
<view class="value">2024/10/10 12:03:21</view>
|
<view class="value">{{orderDetail.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="bottom-bar">
|
<view class="bottom-bar">
|
||||||
<button class="button button1" plain size="mini">取消订单</button>
|
<!-- <button class="button button1" plain size="mini">取消订单</button> -->
|
||||||
<button class="button button2" plain size="mini">联系客服</button>
|
<button class="button button2" plain size="mini">申请退款</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="patch"></view>
|
<view class="patch"></view>
|
||||||
@ -13,7 +13,6 @@
|
|||||||
}
|
}
|
||||||
.prd-info .head .center{
|
.prd-info .head .center{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left:20rpx;
|
|
||||||
margin-top:10rpx;
|
margin-top:10rpx;
|
||||||
}
|
}
|
||||||
.prd-info .head .money{
|
.prd-info .head .money{
|
||||||
@ -85,6 +84,9 @@
|
|||||||
display:flex;
|
display:flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.order-info .kv .copy-area{
|
||||||
|
padding:10rpx;
|
||||||
|
}
|
||||||
.order-info .kv .copy{
|
.order-info .kv .copy{
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
border-radius: 60rpx;
|
border-radius: 60rpx;
|
||||||
|
|||||||
@ -1,20 +1,34 @@
|
|||||||
// pages/order/detail/index.js
|
import userApi from '../../../api/user';
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
orderDetail:{}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
userApi.order.detail(options.id).then((data)=>{
|
||||||
|
let totalPackage = 0;
|
||||||
|
data.packages.map((item)=>{
|
||||||
|
item.pickup_codes = item.pickup_codes.split(',');
|
||||||
|
totalPackage+=item.pickup_codes.length;
|
||||||
|
});
|
||||||
|
data.totalPackage = totalPackage;
|
||||||
|
this.setData({
|
||||||
|
orderDetail:data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
copyOrderId(){
|
||||||
|
wx.setClipboardData({
|
||||||
|
data: this.data.orderDetail.order.orderid,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<view class="order-status waiting">待接单</view>
|
<view class="order-status waiting">待接单</view>
|
||||||
<view class="page-container sender">
|
<view class="page-container sender" wx:if="{{orderDetail.order.deliveryman_user_id}}">
|
||||||
<view class="title">跑腿员</view>
|
<view class="title">跑腿员</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
@ -17,42 +17,32 @@
|
|||||||
<view class="page-container address">
|
<view class="page-container address">
|
||||||
<view class="title">送货地址</view>
|
<view class="title">送货地址</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="text">朝阳时代西锦12栋1单元2072</view>
|
<view class="text">{{orderDetail.order.community_name}}{{orderDetail.order.address_detail}}</view>
|
||||||
<view class="user">何灵先生 158****3822</view>
|
<view class="user">{{orderDetail.order.address_name}} {{orderDetail.order.address_phone}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container package-info">
|
<view class="page-container package-info">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="left">取件信息</view>
|
<view class="left">取件信息</view>
|
||||||
<view class="right">
|
<view class="right" wx:if="{{orderDetail.order.deliveryman_user_id}}">
|
||||||
<label>送达时间</label>
|
<label>送达时间</label>
|
||||||
<label class="time">18:00~21:00</label>
|
<label class="time">18:00~21:00</label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="spliter"></view>
|
<block wx:for="{{orderDetail.packages}}" wx:key="index">
|
||||||
<view class="package">
|
<view class="spliter"></view>
|
||||||
<view class="p-title">妈妈驿站 (朝阳时代西锦) 共5件包裹</view>
|
<view class="package">
|
||||||
<view class="code-list">
|
<view class="p-title">{{item.station_name}} 共{{item.pickup_codes.length}}件包裹</view>
|
||||||
<view class="item">1-1-1111</view>
|
<view class="code-list">
|
||||||
<view class="item">2-2-2222</view>
|
<view class="item" wx:for="{{item.pickup_codes}}"
|
||||||
<view class="item">3-3-3333</view>
|
wx:for-item="package" wx:for-index="pIndex" wx:key="pIndex">{{package}}</view>
|
||||||
<view class="item">4-4-4444</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</block>
|
||||||
<view class="spliter"></view>
|
|
||||||
<view class="package">
|
|
||||||
<view class="p-title">菜鸟驿站 (朝阳时代西锦) 共1件包裹</view>
|
|
||||||
<view class="code-list">
|
|
||||||
<view class="item">1-1-1111</view>
|
|
||||||
<view class="item">2-2-2222</view>
|
|
||||||
<view class="item">3-3-3333</view>
|
|
||||||
<view class="item">4-4-4444</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="page-container send-way">
|
<view class="page-container send-way">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="left">送达方式</view>
|
<view class="left">送达方式</view>
|
||||||
<view class="right">敲门递件</view>
|
<view class="right">{{orderDetail.order.delivery_method}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -61,21 +51,25 @@
|
|||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">订单编号</view>
|
<view class="key">订单编号</view>
|
||||||
<view class="value">2024071166325555</view>
|
<view class="value">{{orderDetail.order.orderid}}</view>
|
||||||
<view class="copy">复制</view>
|
<view class="copy-area" bind:tap="copyOrderId">
|
||||||
|
<view class="copy">复制</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">提交时间</view>
|
<view class="key">提交时间</view>
|
||||||
<view class="value">2024-07-11 16:46:32</view>
|
<view class="value">{{orderDetail.order.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">取件数量</view>
|
<view class="key">取件数量</view>
|
||||||
<view class="value">5</view>
|
<view class="value">{{orderDetail.totalPackage}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kv">
|
<view class="kv">
|
||||||
<view class="key">跑腿费用</view>
|
<view class="key">跑腿费用</view>
|
||||||
<view class="value">
|
<view class="value">
|
||||||
<view class="money">3.5</view>
|
<view class="money">
|
||||||
|
{{orderDetail.order.original_amount-orderDetail.order.coupon_discount_amount}}
|
||||||
|
</view>
|
||||||
<view class="tag">先享后付</view>
|
<view class="tag">先享后付</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -93,7 +93,6 @@
|
|||||||
.package-info .package .code-list{
|
.package-info .package .code-list{
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
row-gap: 30rpx;
|
row-gap: 30rpx;
|
||||||
column-gap: 84rpx;
|
column-gap: 84rpx;
|
||||||
@ -121,10 +120,13 @@
|
|||||||
.order-info .kv .copy{
|
.order-info .kv .copy{
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
border-radius: 60rpx;
|
border-radius: 60rpx;
|
||||||
background-color: #EBF0FF;
|
background: rgba(255, 195, 0, 0.1);
|
||||||
color:#1A4DEB;
|
color: #FEC400;
|
||||||
line-height: 32rpx;
|
line-height: 32rpx;
|
||||||
padding:0 14rpx;
|
padding:0rpx 14rpx;
|
||||||
|
}
|
||||||
|
.order-info .kv .copy-area{
|
||||||
|
padding:10rpx;
|
||||||
}
|
}
|
||||||
.order-info .kv .tag{
|
.order-info .kv .tag{
|
||||||
border: 1rpx solid #EB0000;
|
border: 1rpx solid #EB0000;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import userApi from '../../../api/user';
|
import userApi from '../../../api/user';
|
||||||
|
import shopApi from '../../../api/shop';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -8,20 +9,23 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
tabIndex:0,
|
tabIndex:0,
|
||||||
orderList:[],
|
orderList:[],
|
||||||
merchantOrderList:[]
|
merchantOrderList:[],
|
||||||
|
couponList:[]
|
||||||
},
|
},
|
||||||
changeTab(event){
|
changeTab(event){
|
||||||
const tabIndex = event.currentTarget.dataset.index;
|
const tabIndex = event.currentTarget.dataset.index;
|
||||||
this.setData({tabIndex})
|
this.setData({tabIndex})
|
||||||
},
|
},
|
||||||
goToDetail(){
|
goToDetail(event){
|
||||||
|
const orderId = event.currentTarget.dataset.id;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/order/detail/index',
|
url: `/pages/order/detail/index?id=${orderId}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goToGroupDetail(){
|
goToCouponDetail(event){
|
||||||
|
const id = event.currentTarget.dataset.id;
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/order/detail-group/index',
|
url: `/pages/order/detail-group/index?id=${id}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -29,16 +33,24 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
//代取快递列表
|
||||||
userApi.order.list().then((data)=>{
|
userApi.order.list().then((data)=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
orderList:data.items
|
orderList:data.items
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
userApi.order.merchantList().then((data)=>{
|
//消费买单列表
|
||||||
|
shopApi.orderList().then((data)=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
merchantOrderList:data
|
merchantOrderList:data.items
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
//代金券列表
|
||||||
|
userApi.order.merchantList().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
couponList:data
|
||||||
|
})
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,12 +4,15 @@
|
|||||||
<view class="item">跑腿服务</view>
|
<view class="item">跑腿服务</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container {{tabIndex==1?'current':''}}" bind:tap="changeTab" data-index="1">
|
<view class="item-container {{tabIndex==1?'current':''}}" bind:tap="changeTab" data-index="1">
|
||||||
<view class="item">团购省钱</view>
|
<view class="item">消费买单</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
|
||||||
|
<view class="item">代金券</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="order-list" wx:if="{{tabIndex==0}}">
|
<view class="order-list" wx:if="{{tabIndex==0}}">
|
||||||
<view class="item" wx:for="{{orderList}}" wx:key="index" bind:tap="goToDetail">
|
<view class="item" wx:for="{{orderList}}" wx:key="index" bind:tap="goToDetail" data-id="{{item.orderid}}">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<view class="icon-con">
|
<view class="icon-con">
|
||||||
<image class="icon" src="/assets/icon/order/package@2x.png"/>
|
<image class="icon" src="/assets/icon/order/package@2x.png"/>
|
||||||
@ -33,8 +36,39 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group-list" wx:if="{{tabIndex==1}}">
|
<view class="bill-list" wx:if="{{tabIndex==1}}" wx:for="{{merchantOrderList}}" wx:key="index">
|
||||||
<view class="item status-waiting" wx:for="{{merchantOrderList}}" wx:key="index" bind:tap="goToGroupDetail">
|
<view class="item">
|
||||||
|
<image class="image" src="{{item.product_image}}"/>
|
||||||
|
<view class="name">{{item.merchant_name}}</view>
|
||||||
|
<view class="amount">-{{item.amount}}</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">订单状态</view>
|
||||||
|
<view class="value">{{item.status}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">支付方式</view>
|
||||||
|
<view class="value">微信支付</view>
|
||||||
|
</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">买单金额</view>
|
||||||
|
<view class="value kv-amount">-{{item.amount}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">赠送蜂蜜</view>
|
||||||
|
<view class="value kv-point">+{{item.gift_points}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">交易时间</view>
|
||||||
|
<view class="value">{{item.create_time}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="kv">
|
||||||
|
<view class="key">交易单号</view>
|
||||||
|
<view class="value">{{item.order_id}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="group-list" wx:if="{{tabIndex==2}}">
|
||||||
|
<view class="item status-waiting" wx:for="{{couponList}}" wx:key="index" bind:tap="goToCouponDetail" data-id="{{item.order_id}}">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<label>{{item.merchant_name}}</label>
|
<label>{{item.merchant_name}}</label>
|
||||||
@ -43,7 +77,6 @@
|
|||||||
<view class="status">{{item.status}}</view>
|
<view class="status">{{item.status}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<image class="image" src="{{item.product_image}}"/>
|
|
||||||
<view class="center">
|
<view class="center">
|
||||||
<view>{{item.product_name}}</view>
|
<view>{{item.product_name}}</view>
|
||||||
<view class="tags">
|
<view class="tags">
|
||||||
|
|||||||
@ -126,7 +126,6 @@
|
|||||||
}
|
}
|
||||||
.group-list .content .center{
|
.group-list .content .center{
|
||||||
flex:1;
|
flex:1;
|
||||||
margin-left:40rpx;
|
|
||||||
}
|
}
|
||||||
.group-list .content .tags{
|
.group-list .content .tags{
|
||||||
margin-top:22rpx;
|
margin-top:22rpx;
|
||||||
@ -145,3 +144,46 @@
|
|||||||
color: #1A4DEB;
|
color: #1A4DEB;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bill-list{
|
||||||
|
|
||||||
|
}
|
||||||
|
.bill-list .item{
|
||||||
|
text-align: center;
|
||||||
|
background-color: #fff;
|
||||||
|
margin:20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding:90rpx 24rpx 24rpx;
|
||||||
|
}
|
||||||
|
.bill-list .item .image{
|
||||||
|
width:132rpx;height:132rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
.bill-list .item .name{
|
||||||
|
font-size: 34rpx;
|
||||||
|
margin-top:30rpx;
|
||||||
|
}
|
||||||
|
.bill-list .item .amount{
|
||||||
|
font-size: 56rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
margin:30rpx 0 58rpx 0;
|
||||||
|
}
|
||||||
|
.bill-list .item .kv{
|
||||||
|
padding:12rpx 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.bill-list .item .key{
|
||||||
|
flex:1;
|
||||||
|
text-align: left;
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
.bill-list .item .kv-amount{
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
.bill-list .item .kv-point{
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color:var(--main-color)
|
||||||
|
}
|
||||||
@ -59,6 +59,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="page-container item ticket" wx:for="{{productList}}" wx:key="index">
|
<view class="page-container item ticket" wx:for="{{productList}}" wx:key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
|
<view class="promation">
|
||||||
|
<image src="/assets/icon/shop/promation@2x.png" class="image"/>
|
||||||
|
<label>{{item.promotion_text}}</label>
|
||||||
|
</view>
|
||||||
<view class="title">{{item.name}}</view>
|
<view class="title">{{item.name}}</view>
|
||||||
<view class="bl-money">
|
<view class="bl-money">
|
||||||
<label class="money">{{item.sale_price}}</label>
|
<label class="money">{{item.sale_price}}</label>
|
||||||
|
|||||||
@ -105,6 +105,8 @@
|
|||||||
.group-buy .item{
|
.group-buy .item{
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
display:flex;
|
display:flex;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.group-buy .item:first-child{
|
.group-buy .item:first-child{
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
@ -117,6 +119,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
|
.group-buy .item.ticket .title{
|
||||||
|
margin-top:40rpx;
|
||||||
|
}
|
||||||
.group-buy .item.ticket .right{
|
.group-buy .item.ticket .right{
|
||||||
border-left: 1.6rpx dashed rgba(153, 153, 153, 0.3);
|
border-left: 1.6rpx dashed rgba(153, 153, 153, 0.3);
|
||||||
}
|
}
|
||||||
@ -154,17 +159,18 @@
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
.group-buy .item .promation{
|
.group-buy .item .promation{
|
||||||
border-radius: 6rpx;
|
background-color: #FFC300;
|
||||||
background-color: #FFECEC;
|
font-size:22rpx;
|
||||||
color: #FF3A3A;
|
position: absolute;
|
||||||
font-size: 20rpx;
|
top:0;left:0;
|
||||||
display: inline-flex;
|
padding:8rpx 16rpx;
|
||||||
padding:4px 6px;
|
border-radius: 9px 3px 9px 0px;
|
||||||
align-items: center;
|
color:#fff;
|
||||||
margin-top:20rpx;
|
|
||||||
}
|
}
|
||||||
.group-buy .item .promation .icon{
|
.group-buy .item .promation .image{
|
||||||
width:24rpx;height:24rpx;
|
width:28rpx;height:28rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
vertical-align: text-top;
|
||||||
}
|
}
|
||||||
.group-buy .item .bottom{
|
.group-buy .item .bottom{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import shop from '../../../api/shop';
|
import shop from '../../../api/shop';
|
||||||
import shopApi from '../../../api/shop';
|
import shopApi from '../../../api/shop';
|
||||||
|
const app = getApp();
|
||||||
|
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
@ -10,7 +11,8 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
tabIndex:0,
|
tabIndex:0,
|
||||||
categories:[],
|
categories:[],
|
||||||
shopList:[]
|
shopList:[],
|
||||||
|
userInfo:{}
|
||||||
},
|
},
|
||||||
changeTab(event){
|
changeTab(event){
|
||||||
const tabIndex = event.currentTarget.dataset.index;
|
const tabIndex = event.currentTarget.dataset.index;
|
||||||
@ -41,6 +43,11 @@ Page({
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
this.loadList();
|
this.loadList();
|
||||||
|
app.getUserInfo().then((data)=>{
|
||||||
|
this.setData({
|
||||||
|
userInfo:data
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<nav-bar/>
|
<nav-bar/>
|
||||||
<view class="consume">
|
<view class="consume">
|
||||||
<view class="title">消费金 (元)</view>
|
<view class="title">蜂蜜 (克)</view>
|
||||||
<view class="money">3.3</view>
|
<view class="point">{{userInfo.points}}</view>
|
||||||
<view class="tips">买券自动抵扣</view>
|
<view class="tips">买券自动抵扣</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
|
|||||||
@ -1,26 +1,25 @@
|
|||||||
|
|
||||||
.consume{
|
.consume{
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
background: linear-gradient(270deg, #3566FF 0%, #1A4DEB 60%);
|
background: linear-gradient(270deg, #FFDB00 0%, #FFC300 60%);
|
||||||
box-shadow: 0 10rpx 10rpx 0 rgba(54, 98, 236, 0.2);
|
box-shadow: 0 10rpx 10rpx 0 rgba(54, 98, 236, 0.2);
|
||||||
margin:20rpx;
|
margin:20rpx;
|
||||||
padding:40rpx 30rpx;
|
padding:40rpx 30rpx;
|
||||||
color:#fff;
|
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
.consume .title{
|
.consume .title{
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.consume .money{
|
.consume .point{
|
||||||
font-size: 70rpx;
|
font-size: 70rpx;
|
||||||
margin-top:40rpx;
|
margin-top:40rpx;
|
||||||
color:#fff;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.consume .tips{
|
.consume .tips{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
right:0;top:32rpx;
|
right:0;top:32rpx;
|
||||||
border-radius: 60rpx 0 0 60rpx;
|
border-radius: 60rpx 0 0 60rpx;
|
||||||
background-color: #1A4DEB;
|
background-color: var(--main-color);
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
padding:0 16rpx;
|
padding:0 16rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user