Commit 8887c707 by liimin

去掉标签选择器

1 parent b954d408
import QR from '~/utils/lib/wxqrcode' import { wxqrcode as QR } from "~/lib/index";
import { import { orderMixin } from "~/mixins/index";
orderMixin import { iosTimeFormat } from "~/utils/format";
} from '~/mixins/index'
import {
iosTimeFormat,
} from '~/utils/format'
Page({ Page({
behaviors: [orderMixin], behaviors: [orderMixin],
/** /**
...@@ -12,35 +8,36 @@ Page({ ...@@ -12,35 +8,36 @@ Page({
*/ */
data: { data: {
couponsList: [], couponsList: [],
orderObj: [{ orderObj: [
label: '下单日期', {
key: 'time' label: "下单日期",
key: "time",
}, },
{ {
label: '订单编号', label: "订单编号",
key: 'orderCode' key: "orderCode",
}, },
{ {
label: '收货地址', label: "收货地址",
key: 'shipAddress', key: "shipAddress",
alignItems: 'flex-start' alignItems: "flex-start",
}, },
{ {
label: '订单状态', label: "订单状态",
key: 'orderStatus', key: "orderStatus",
enum: true enum: true,
} },
], ],
deliveryStatus: { deliveryStatus: {
1: '待发货', 1: "待发货",
2: '已发货', 2: "已发货",
3: '已收货' 3: "已收货",
} },
}, },
onRoute(orderCode) { onRoute(orderCode) {
if (Object.keys(orderCode).length !== 0) { if (Object.keys(orderCode).length !== 0) {
console.log(orderCode) console.log(orderCode);
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode);
} }
}, },
/** /**
...@@ -48,88 +45,94 @@ Page({ ...@@ -48,88 +45,94 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
if (options && options.orderCode) { if (options && options.orderCode) {
let orderCode = options.orderCode let orderCode = options.orderCode;
this.getOrderDetail(orderCode) this.getOrderDetail(orderCode);
} }
}, },
getOrderDetail(orderCode) { getOrderDetail(orderCode) {
let { let { orderObj } = this.data;
orderObj wx.p.wxApi.showLoading("加载中...");
} = this.data wx.p.api.shopmallApi.getOrderDetail(orderCode).then((data) => {
wx.p.wxApi.showLoading('加载中...') wx.hideLoading();
wx.p.api.shopmallApi.getOrderDetail(orderCode).then(data => { console.log(data);
wx.hideLoading() data.time = new Date(iosTimeFormat(data.createdDate)).format(
console.log(data) "yyyy.MM.dd hh:mm:ss"
data.time = new Date(iosTimeFormat(data.createdDate)).format('yyyy.MM.dd hh:mm:ss') );
data.orderGoods.map(e => { data.orderGoods.map((e) => {
e.retailPrice = Number(e.retailPrice).toFixed(2) e.retailPrice = Number(e.retailPrice).toFixed(2);
if (e.activityPrice) e.activityPrice = Number(e.activityPrice).toFixed(2) if (e.activityPrice)
}) e.activityPrice = Number(e.activityPrice).toFixed(2);
data.orderPrice = Number(data.orderPrice).toFixed(2) });
data.expressFee = Number(data.expressFee).toFixed(2) data.orderPrice = Number(data.orderPrice).toFixed(2);
data.payPrice = Number(data.payPrice).toFixed(2) data.expressFee = Number(data.expressFee).toFixed(2);
data.payPrice = Number(data.payPrice).toFixed(2);
if (data.orderSource == 4) { if (data.orderSource == 4) {
orderObj[2] = { orderObj[2] = {
label: '商户订单号', label: "商户订单号",
key: 'outTradeNo', key: "outTradeNo",
} };
} }
this.setData({ this.setData({
orderInfo: data, orderInfo: data,
orderObj orderObj,
}) });
if (data.deliveryType == 1 && data.orderVerification) this.setQr(data.orderVerification.verificationCode) if (data.deliveryType == 1 && data.orderVerification)
this.setQr(data.orderVerification.verificationCode);
if (data.relatedUserCoupon) { if (data.relatedUserCoupon) {
let list = data.relatedUserCoupon.map(item => { let list = data.relatedUserCoupon.map((item) => {
item.receiveStartTime = new Date(iosTimeFormat(item.receiveStartTime)).format('yyyy.MM.dd') item.receiveStartTime = new Date(
iosTimeFormat(item.receiveStartTime)
).format("yyyy.MM.dd");
if (item.effectiveType == 1) { if (item.effectiveType == 1) {
item.receiveEndTime = new Date(iosTimeFormat(item.receiveEndTime)).format('yyyy.MM.dd hh:mm:ss') item.receiveEndTime = new Date(
iosTimeFormat(item.receiveEndTime)
).format("yyyy.MM.dd hh:mm:ss");
} else { } else {
item.receiveEndTime = new Date(iosTimeFormat(item.receiveEndTime)).format('yyyy.MM.dd') item.receiveEndTime = new Date(
iosTimeFormat(item.receiveEndTime)
).format("yyyy.MM.dd");
} }
return item return item;
}) });
this.setData({ this.setData({
couponsList: list couponsList: list,
}) });
} }
}) });
}, },
toDetail() { toDetail() {
let [temp] = this.data.orderInfo.relatedUserCoupon, { let [temp] = this.data.orderInfo.relatedUserCoupon,
discountType, { discountType, useChannel, id } = temp,
useChannel, detailInfo = {
id xx: "xx",
} = temp, detailInfo = { };
xx: 'xx'
}
if (discountType == 2 || discountType == 4) { if (discountType == 2 || discountType == 4) {
wx.p.router.go('/packageMall/pages/coupon/coupon', { wx.p.router.go("/packageMall/pages/coupon/coupon", {
userCouponId: id, userCouponId: id,
useMemberType: this.data.useMemberType, useMemberType: this.data.useMemberType,
detailInfo detailInfo,
}) });
return return;
} }
/**线上商品代金券 */ /**线上商品代金券 */
if (discountType == 3 && useChannel == 1) { if (discountType == 3 && useChannel == 1) {
if (this.data.useMemberType == 1) { if (this.data.useMemberType == 1) {
wx.p.wxApi.showToast('代金券已使用') wx.p.wxApi.showToast("代金券已使用");
return return;
} }
wx.p.router.go('/packageMine/pages/coupon/recommend/recommend', { wx.p.router.go("/packageMine/pages/coupon/recommend/recommend", {
couponInfo: temp couponInfo: temp,
}) });
return return;
} }
wx.p.router.go('/packageMine/pages/coupon/detail/detail', { wx.p.router.go("/packageMine/pages/coupon/detail/detail", {
item: temp item: temp,
}) });
}, },
setQr(data) { setQr(data) {
this.setData({ this.setData({
qr: QR.createQrCodeImg(`t=1&c=${data}`) qr: QR.createQrCodeImg(`t=1&c=${data}`),
}) });
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -159,5 +162,5 @@ Page({ ...@@ -159,5 +162,5 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}
})
\ No newline at end of file \ No newline at end of file
onReachBottom: function () {},
});
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<image webp src="{{item.activityImg}}" lazy-load></image> <image webp src="{{item.activityImg}}" lazy-load></image>
</view> </view>
<view class="item-box-content"> <view class="item-box-content">
<view class='item-box-title'><text>{{item.activityName}}</text></view> <view class='item-box-title'><text class="item-box-title-text">{{item.activityName}}</text></view>
<view class='item-box-time'> <view class='item-box-time'>
<view class="text text-hide">{{item.viewAmount||0}}人查看|售出{{item.saleAmount || 0}}</view> <view class="text text-hide">{{item.viewAmount||0}}人查看|售出{{item.saleAmount || 0}}</view>
</view> </view>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</view> </view>
<view class="item-box-bubble"> <view class="item-box-bubble">
<!-- 活动 --> <!-- 活动 -->
<view> <view class="item-box-bubble-view">
<text class="activity-text">秒杀价</text> <text class="activity-text">秒杀价</text>
<view class="time-box"> <view class="time-box">
<view class="time {{item.activityStatus == 1 ? 'start' : 'end'}} " wx:if="{{item.activityStatus != 3}}"> <view class="time {{item.activityStatus == 1 ? 'start' : 'end'}} " wx:if="{{item.activityStatus != 3}}">
......
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
color: #0A0D14; color: #0A0D14;
} }
.item-box-title image { .item-box-title .item-box-title-image {
flex: 0 0 48rpx; flex: 0 0 48rpx;
height: 32rpx; height: 32rpx;
margin-right: 12rpx; margin-right: 12rpx;
margin-top: 5rpx; margin-top: 5rpx;
} }
.item-box-title text { .item-box-title .item-box-title-text {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
margin-bottom: -6rpx; margin-bottom: -6rpx;
} }
.item-box-bubble>view { .item-box-bubble>.item-box-bubble-view {
position: relative; position: relative;
background: #FFF5F3; background: #FFF5F3;
height: 40rpx; height: 40rpx;
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
display: flex; display: flex;
} }
.item-box-bubble>view::after { .item-box-bubble>.item-box-bubble-view::after {
content: ''; content: '';
position: absolute; position: absolute;
width: 0; width: 0;
......
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
<view class="bgkf"> <view class="bgkf">
<glsx-image webp src="home/home-kf-bg.png"></glsx-image> <glsx-image webp src="home/home-kf-bg.png"></glsx-image>
<view class="close-icon" bindtap="showFlex"> <view class="close-icon" bindtap="showFlex">
<glsx-image webp src="home/kf-close.png"></glsx-image> <glsx-image class="image-close"webp src="home/kf-close.png"></glsx-image>
</view> </view>
<view class="qr-box"> <view class="qr-box">
<view class="userinfo-wrap"> <view class="userinfo-wrap">
<view class="icon"> <view class="icon">
<image wx:if="{{customerlist[0].thumbAvatar}}" webp src="{{customerlist[0].thumbAvatar}}"></image> <image class="image-icon" wx:if="{{customerlist[0].thumbAvatar}}" webp src="{{customerlist[0].thumbAvatar}}"></image>
<glsx-image wx:else webp src="home/kf-persion-icon.png"></glsx-image> <glsx-image class="image-icon" wx:else webp src="home/kf-persion-icon.png"></glsx-image>
</view> </view>
<view class="name">{{customerlist[0].staffName || ''}}</view> <view class="name">{{customerlist[0].staffName || ''}}</view>
<view class="mobile" wx:if="{{customerlist[0].staffPhone}}"> <view class="mobile" wx:if="{{customerlist[0].staffPhone}}">
<glsx-image webp src="home/kf-mobile.png"></glsx-image> <glsx-image class="image-mobile" webp src="home/kf-mobile.png"></glsx-image>
<text>{{customerlist[0].staffPhone}}</text> <text>{{customerlist[0].staffPhone}}</text>
</view> </view>
<view class="qr-icon"> <view class="qr-icon">
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
</view> </view>
</view> </view>
<view class="kf-text"> <view class="kf-text">
<view class="text-left"><glsx-image webp src="home/home-Kf-down.png"></glsx-image><text>保存图片\n到相册</text></view> <view class="text-left kf-text-view" ><glsx-image class="kf-image" webp src="home/home-Kf-down.png"></glsx-image><text>保存图片\n到相册</text></view>
<view><glsx-image webp src="home/home-Kf-phone.png"></glsx-image><text>打开微信扫一扫添加客服企微</text></view> <view class="kf-text-view"><glsx-image webp class="kf-image" src="home/home-Kf-phone.png"></glsx-image><text>打开微信扫一扫添加客服企微</text></view>
</view> </view>
<view class="save-btn"> <view class="save-btn">
<view class="btn text-center" bindtap="saveClick"> <view class="btn text-center" bindtap="saveClick">
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
right: 16rpx; right: 16rpx;
top: -68rpx; top: -68rpx;
} }
.close-icon image{ .close-icon .image-close{
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
} }
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
top: -28rpx; top: -28rpx;
} }
.model .bgkf .icon image { .model .bgkf .icon .image-icon {
border-radius: 50%; border-radius: 50%;
} }
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.qr-box .mobile image{ .qr-box .mobile .image-mobile{
width: 24rpx; width: 24rpx;
height: 26rpx; height: 26rpx;
} }
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
padding: 0 40rpx; padding: 0 40rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.kf-text view{ .kf-text .kf-text-view{
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
margin-left: 20rpx; margin-left: 20rpx;
color: #B1B1B3; color: #B1B1B3;
} }
.kf-text image{ .kf-text .kf-image{
flex-shrink: 0; flex-shrink: 0;
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}"> <view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}">
<view class="text">{{item}}</view> <view class="text">{{item}}</view>
<view class="line"> <view class="line">
<glsx-image src="home/tab-line.png"></glsx-image> <glsx-image class="line-image" src="home/tab-line.png"></glsx-image>
</view> </view>
</view> </view>
</block> </block>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
transition: all .25s; transition: all .25s;
} }
.tab .line image { .tab .line .line-image {
width: 40rpx; width: 40rpx;
height: 16rpx; height: 16rpx;
} }
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</view> </view>
<view class="item-box-content"> <view class="item-box-content">
<view class='item-box-title'> <view class='item-box-title'>
<image wx:if="{{item.goods.isMemberGoods}}" webp src="{{item.IMGURL}}index/member-goods-icon.png" /> <image class="item-box-title-image" wx:if="{{item.goods.isMemberGoods}}" webp src="{{item.IMGURL}}index/member-goods-icon.png" />
<text>{{item.goods.goodsName}}</text> <text class="item-box-title-text">{{item.goods.goodsName}}</text>
</view> </view>
<view class='item-box-time'> <view class='item-box-time'>
<view class="text text-hide"> <view class="text text-hide">
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
</view> </view>
<view class="item-box-bubble"> <view class="item-box-bubble">
<!-- 会员商品 --> <!-- 会员商品 -->
<view wx:if="{{item.goods.isMemberGoods}}" class="text"> <view wx:if="{{item.goods.isMemberGoods}}" class="text item-box-bubble-view">
<text>会员价</text> <text class="item-box-bubble-text">会员价</text>
开通会员权益立享 开通会员权益立享
</view> </view>
</view> </view>
......
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
color: #0A0D14; color: #0A0D14;
} }
.item-box-title image{ .item-box-title .item-box-title-image{
flex: 0 0 48rpx; flex: 0 0 48rpx;
height: 32rpx; height: 32rpx;
margin-right: 12rpx; margin-right: 12rpx;
margin-top: 5rpx; margin-top: 5rpx;
} }
.item-box-title text{ .item-box-title .item-box-title-text{
font-size: 28rpx; font-size: 28rpx;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
margin-bottom: -10rpx; margin-bottom: -10rpx;
} }
.item-box-bubble view{ .item-box-bubble .item-box-bubble-view{
position: relative; position: relative;
background: #FFF5F3; background: #FFF5F3;
height: 40rpx; height: 40rpx;
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
font-size: 20rpx; font-size: 20rpx;
color: #FF6038; color: #FF6038;
} }
.item-box-bubble view::after { .item-box-bubble .item-box-bubble-view::after {
content: ''; content: '';
position: absolute; position: absolute;
width: 0; width: 0;
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
border-bottom: 16rpx solid #FFF5F3; border-bottom: 16rpx solid #FFF5F3;
} }
.item-box-bubble text{ .item-box-bubble .item-box-bubble-text{
margin-right: 16rpx; margin-right: 16rpx;
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<glsx-image class="equity-icon" src="home/vip-icon.png"></glsx-image> <glsx-image class="equity-icon" src="home/vip-icon.png"></glsx-image>
<text class="text">生活权益|专享超百种生活权益</text> <text class="text">生活权益|专享超百种生活权益</text>
<block wx:if="{{!memberInfo.equityName}}"> <block wx:if="{{!memberInfo.equityName}}">
<view class="equity-btn" bindtap="toBuyMember">立即开通</view> <view class="content-view equity-btn" bindtap="toBuyMember">立即开通</view>
</block> </block>
</view> </view>
</view> </view>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
align-items: center; align-items: center;
} }
.equity-box .content view { .equity-box .content .content-view {
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!