我的订单

master
wangxiaoping 4 years ago
parent 723e99e211
commit b2fb58243b

@ -53,7 +53,7 @@
},
token: '',
openid: '',
package_id: '',
package_id: ''
}
},
onLoad(options) {
@ -62,7 +62,7 @@
this.token = phone_token.token
let user_info = weixin.getUserInfoCache()
this.openid = user_info.openid
this.package_id = options.package_id
this.info.productId = options.package_id
},
methods: {
pay() {

@ -5,7 +5,8 @@
<view class="h3">您已经购买成功</view>
<view class="p">请等待客户人员联系您</view>
</view>
<navigator url="../active/active" open-type="switchTab"><view class="pinkBtn">返回首页</view></navigator>
<navigator url="../../../packageOrder/pages/myOrder/myOrder" open-type="switchTab"><view class="pinkBtn">我的订单</view></navigator>
<navigator url="../../../../pages/home/home" open-type="switchTab"><view class="pinkBtn">返回首页</view></navigator>
</view>
</template>

@ -1,52 +1,27 @@
<template>
<view class="content">
<view class="end-title">
<view class="end-title" style="display:none;">
<view v-for="(item,index) in items" :key="index" :class="{btna:count == index}" @tap="change(index)">
{{item}}<view class="line"></view>
</view>
</view>
<view class="end-cont" :class="{dis:btnnum == 0}">
<view class="statusBox">
<text>待付款</text>
<text class="cur">待服务</text>
<text>已服务</text>
<text>待评价</text>
<text v-for="(item,index) in statusLabels" :key="index" @click="changeStatus(index)" :class="{cur: index == status}">{{item}}</text>
</view>
  <view class="orderCol">
  <view class="orderCol" v-for="(item, index) in list" :key="item.id" @click="goDetail(item.id)">
<view class="title">
<view>孕期保健Q&A<text class="free">免费</text></view>
<view class="status">待参加</view>
<view>{{item.order_name || '暂无'}}<!-- <text class="free">免费</text> --></view>
<!-- <view class="status">待参加</view> -->
</view>
<view class="infoList">
<view class="infoCol"><view class="date"><image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>2021-02-10 14:00</view></view>
<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>
</view>
<view class="btn"><text>预约服务</text></view>
</view>
  <view class="orderCol">
<view class="title">
<view>时光印记孕妈妈摄影套餐</view>
<view class="status">待参加</view>
<view class="infoCol"><view class="date"><image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>{{item.created_at}}</view><view class="price"><text>¥</text>{{item.total}}</view></view>
<!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>-->
</view>
<view class="infoList">
<view class="infoCol"><view class="date"><image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>2有效期至:2018年11月25日</view><view class="price"><text>¥</text>100</view></view>
<view class="infoCol"><view class="bulid"><image mode="heightFix" src="../../static/icon_dianpu@2x.png"></image>时光印记孕妈妈摄影机构</view></view>
</view>
<view class="btn"><text>预约服务</text></view>
</view>
  <view class="orderCol">
<view class="title">
<view>时光印记孕妈妈摄影套餐</view>
<view class="status">待评价</view>
</view>
<view class="infoList">
<view class="infoCol"><view class="date"><image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>2有效期至:2018年11月25日</view><view class="price"><text>¥</text>100</view></view>
<view class="infoCol"><view class="bulid"><image mode="heightFix" src="../../static/icon_dianpu@2x.png"></image>时光印记孕妈妈摄影机构</view></view>
</view>
<view class="btn"><text>预约服务</text></view>
<view class="btn"><!--<text> 预约服务 </text>--></view>
</view>
</view>
<view class="end-cont" :class="{dis:btnnum == 1}">
<view class="end-cont" :class="{dis:btnnum == 1}" >
<view class="statusBox">
<text>待付款</text>
<text class="cur">待服务</text>
@ -69,23 +44,63 @@
</template>
<script>
//{"0":"","10":"","20":"","100":""}
export default {
data() {
return {
btnnum: 0,
items:["活动订单","商品订单"],
count:""
info: {
token: ''
},
btnnum: 0,
items:["活动订单","商品订单"],
count:"",
token: '',
page: 1,
list: [],
status: 0,
statusLabels: {0: "待确认", 10:"待支付", 20:"进行中", 100:"已完成"},
}
},
onLoad() {
onLoad(options) {
const phone_token = uni.getStorageSync('phone_token')
this.info.phone = phone_token.phone
this.token = phone_token.token
this.status = options.status || 0
this.getOrderList()
},
onShow() {
},
onReachBottom() {
this.getOrderList()
},
methods: {
change(e) {
changeStatus(i) {
this.status = i
this.page = 1
this.list = []
this.getOrderList()
},
change(e) {
this.count = e
this.btnnum = e
console.log(this.count)
}
},
getOrderList() {
const phone_token = uni.getStorageSync('phone_token')
uni.request({
url: this.baseUrl + '/api/member/get-orders',
method: 'GET',
data: {
state: this.status,
page: this.page,
token: phone_token.token
},
success: r => {
this.list = this.list.concat(r.data.data)
this.page++
}
})
}
}
}
</script>
@ -120,7 +135,7 @@
}
.end-cont{
display: none;
padding-top:88rpx;
// padding-top:88rpx;
}
.btna{
color: #FF578A;

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

@ -1,7 +1,8 @@
<template>
<view class="content">
<image class="banner" mode="widthFix" src="../../static/member_01.jpg"></image>
<view class="joinBTn" @tap="joinUs"></view>
<view class="joinBTn" @tap="joinUs"></view>
</view>
</template>
@ -16,7 +17,12 @@
uni.navigateTo({
url:"../member/member"
});
}
},
myOrder(){
uni.navigateTo({
url:"../../packages/packageOrder/pages/myOrder/myOrder"
});
}
}
}
</script>

@ -1,6 +1,6 @@
<template>
<view class="content">
<image class="logo" src="../../static/logo@3x.png"></image>
<image class="logo" src="../../static/logo.jpg"></image>
<button v-show="showProfile" @click="getUserProfile"></button>
<button v-show="!showProfile" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"></button>

@ -130,13 +130,13 @@
//
ctx.fillStyle = "#fff";
// xy
ctx.fillText("会员福利孕产礼包", SCREEN_WIDTH * 0.26, SCREEN_WIDTH * 0.695/ 1.4 );
ctx.fillText("会员福利孕产礼包", SCREEN_WIDTH * 0.15, (SCREEN_HEIGHT-SCREEN_WIDTH * 0.8 * 1.5)/2);
ctx.font = "16px bold";
//
ctx.fillStyle = "#333";
ctx.fillStyle = "#000";
// xy
ctx.fillText("专享大礼包", SCREEN_WIDTH * 0.2, SCREEN_WIDTH * 0.695/ 0.63 );
ctx.fillText("专享大礼包", SCREEN_WIDTH * 0.2, (SCREEN_HEIGHT-SCREEN_WIDTH * 0.8 * 1.5)/2+SCREEN_WIDTH * 0.695/ 1.6*1.5);
// ctx.beginPath();
// ctx.arc(SCREEN_WIDTH * 0.62+SCREEN_WIDTH * 0.2*0.5, (SCREEN_HEIGHT -
// 50 - SCREEN_WIDTH * 0.8 * 1.5) / 2 + SCREEN_WIDTH *

@ -16,54 +16,27 @@
<view class="title">{{userProfile.nickName || '匿名用户'}}</view>
</view>
<view class="myOrder">
<view class="orderTab">
<uni-segmented-control :current="current" :values="items.map(v=>v.title)" @clickItem="onClickItem" styleType="text" activeColor="#FF578A"></uni-segmented-control>
</view>
<view class="orderTab">我的订单</view>
<view class="content">
<view class="tabCol" v-show="current === 0">
<view class="tabCol">
<view class="orderMenu">
<view class="menuCol" @tap="nodata()">
<view class="menuCol" @tap="goOrderCol(0)">
<image src="../../static/icon_daifukuan@2x.png"></image>
<text>付款</text>
<text>确认</text>
</view>
<view class="menuCol" @tap="nodata()">
<view class="menuCol" @tap="goOrderCol(10)">
<image src="../../static/icon_daifuwu@2x.png"></image>
<text>服务</text>
<text>支付</text>
</view>
<view class="menuCol" @tap="nodata()">
<view class="menuCol" @tap="goOrderCol(20)">
<image src="../../static/icon_yifuwu@2x.png"></image>
<text>已服务</text>
<text>进行中</text>
</view>
<view class="menuCol" @tap="nodata()">
<view class="menuCol" @tap="goOrderCol(100)">
<image src="../../static/icon_daipingjia@2x.png"></image>
<text>待评价</text>
<text>已完成</text>
</view>
<view class="menuCol allOrder" @tap="nodata()">
<image src="../../static/icon_dingdan@2x.png"></image>
<text>全部订单</text>
<image class="line" src="../../static/bg_yinying@2x.png"></image>
</view>
</view>
</view>
<view class="tabCol" v-show="current === 1">
<view class="orderMenu">
<view class="menuCol" @tap="nodata()">
<image src="../../static/icon_daifukuan@2x.png"></image>
<text>待付款</text>
</view>
<view class="menuCol" @tap="nodata()">
<image src="../../static/icon_daifahuo@2x.png"></image>
<text>待发货</text>
</view>
<view class="menuCol" @tap="nodata()">
<image src="../../static/icon_yishouhuo@2x.png"></image>
<text>待收货</text>
</view>
<view class="menuCol" @tap="nodata()">
<image src="../../static/icon_daipingjia@2x.png"></image>
<text>待评价</text>
</view>
<view class="menuCol allOrder" @tap="nodata()">
<view class="menuCol allOrder" @tap="toMyOrder()">
<image src="../../static/icon_dingdan@2x.png"></image>
<text>全部订单</text>
<image class="line" src="../../static/bg_yinying@2x.png"></image>
@ -176,11 +149,13 @@
this.stytemInfo();
},
onShow() {
let userProfile = uni.getStorageSync('user_profile')
if (userProfile) {
this.userProfile = userProfile
} else {
uni.navigateTo({ url: '../login/index?showProfile=1'})
if (this.checkLogin()) {
let userProfile = uni.getStorageSync('user_profile')
if (userProfile) {
this.userProfile = userProfile
} else {
uni.navigateTo({ url: '../login/index?showProfile=1'})
}
}
},
onPageScroll(e) {
@ -207,6 +182,16 @@
url:"../../packages/packagePromotion/pages/speadApply/speadApply"
})
},
toMyOrder(){
uni.navigateTo({
url:"../../packages/packageOrder/pages/myOrder/myOrder"
})
},
goOrderCol(v){
uni.navigateTo({
url:"../../packages/packageOrder/pages/myOrder/myOrder?status=" + v
})
},
nodata(){
uni.showToast({
title: '正在建设中',
@ -270,9 +255,9 @@
image{width:112rpx;height:112rpx;border-radius: 50%;margin-right:30rpx;}
.title{font-size: 36rpx;font-weight: 500;color: #FFFFFF;line-height: 36px;}
}
.myOrder{width:710rpx;background:rgba(255,255,255,0.92);border-radius: 16rpx;margin:30rpx auto 0 auto;}
.myOrder{width:710rpx;background:rgba(255,255,255,1);border-radius: 16rpx;margin:30rpx auto 0 auto;}
.orderTab{
font-size: 32rpx;font-weight: 400;width:60%;margin-left:10rpx;padding-top:15rpx;
font-size: 32rpx;font-weight: 400;width:60%;margin-left:10rpx;padding:30rpx 30rpx 0 30rpx;
}
.segmented-control__item--text{border-color: rgba(255,255,255,0)!important;}
.segmented-control__text{color:#666666;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Loading…
Cancel
Save