我的订单

master
wangxiaoping 4 years ago
parent 723e99e211
commit b2fb58243b

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

@ -5,7 +5,8 @@
<view class="h3">您已经购买成功</view> <view class="h3">您已经购买成功</view>
<view class="p">请等待客户人员联系您</view> <view class="p">请等待客户人员联系您</view>
</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> </view>
</template> </template>

@ -1,52 +1,27 @@
<template> <template>
<view class="content"> <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)"> <view v-for="(item,index) in items" :key="index" :class="{btna:count == index}" @tap="change(index)">
{{item}}<view class="line"></view> {{item}}<view class="line"></view>
</view> </view>
</view> </view>
<view class="end-cont" :class="{dis:btnnum == 0}"> <view class="end-cont" :class="{dis:btnnum == 0}">
<view class="statusBox"> <view class="statusBox">
<text>待付款</text> <text v-for="(item,index) in statusLabels" :key="index" @click="changeStatus(index)" :class="{cur: index == status}">{{item}}</text>
<text class="cur">待服务</text>
<text>已服务</text>
<text>待评价</text>
</view> </view>
  <view class="orderCol">   <view class="orderCol" v-for="(item, index) in list" :key="item.id" @click="goDetail(item.id)">
<view class="title"> <view class="title">
<view>孕期保健Q&A<text class="free">免费</text></view> <view>{{item.order_name || '暂无'}}<!-- <text class="free">免费</text> --></view>
<view class="status">待参加</view> <!-- <view class="status">待参加</view> -->
</view> </view>
<view class="infoList"> <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="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 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> </view>
<view class="infoList"> <view class="btn"><!--<text> 预约服务 </text>--></view>
<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> </view>
</view> </view>
<view class="end-cont" :class="{dis:btnnum == 1}"> <view class="end-cont" :class="{dis:btnnum == 1}" >
<view class="statusBox"> <view class="statusBox">
<text>待付款</text> <text>待付款</text>
<text class="cur">待服务</text> <text class="cur">待服务</text>
@ -69,23 +44,63 @@
</template> </template>
<script> <script>
//{"0":"","10":"","20":"","100":""}
export default { export default {
data() { data() {
return { return {
btnnum: 0, info: {
items:["活动订单","商品订单"], token: ''
count:"" },
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: { methods: {
change(e) { changeStatus(i) {
this.status = i
this.page = 1
this.list = []
this.getOrderList()
},
change(e) {
this.count = e this.count = e
this.btnnum = e this.btnnum = e
console.log(this.count) 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> </script>
@ -120,7 +135,7 @@
} }
.end-cont{ .end-cont{
display: none; display: none;
padding-top:88rpx; // padding-top:88rpx;
} }
.btna{ .btna{
color: #FF578A; 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> <template>
<view class="content"> <view class="content">
<image class="banner" mode="widthFix" src="../../static/member_01.jpg"></image> <image class="banner" mode="widthFix" src="../../static/member_01.jpg"></image>
<view class="joinBTn" @tap="joinUs"></view> <view class="joinBTn" @tap="joinUs"></view>
</view> </view>
</template> </template>
@ -16,7 +17,12 @@
uni.navigateTo({ uni.navigateTo({
url:"../member/member" url:"../member/member"
}); });
} },
myOrder(){
uni.navigateTo({
url:"../../packages/packageOrder/pages/myOrder/myOrder"
});
}
} }
} }
</script> </script>

@ -1,6 +1,6 @@
<template> <template>
<view class="content"> <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" @click="getUserProfile"></button>
<button v-show="!showProfile" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"></button> <button v-show="!showProfile" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"></button>

@ -130,13 +130,13 @@
// //
ctx.fillStyle = "#fff"; ctx.fillStyle = "#fff";
// xy // 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.font = "16px bold";
// //
ctx.fillStyle = "#333"; ctx.fillStyle = "#000";
// xy // 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.beginPath();
// ctx.arc(SCREEN_WIDTH * 0.62+SCREEN_WIDTH * 0.2*0.5, (SCREEN_HEIGHT - // ctx.arc(SCREEN_WIDTH * 0.62+SCREEN_WIDTH * 0.2*0.5, (SCREEN_HEIGHT -
// 50 - SCREEN_WIDTH * 0.8 * 1.5) / 2 + SCREEN_WIDTH * // 50 - SCREEN_WIDTH * 0.8 * 1.5) / 2 + SCREEN_WIDTH *

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