init commit

This commit is contained in:
quantulr
2024-05-08 17:32:39 +08:00
parent e3a0666d5a
commit e3513e70fa
16 changed files with 522 additions and 114 deletions

37
api/express.js Normal file
View File

@ -0,0 +1,37 @@
// const request = require("../utils/request")
const { md5 } = require("../utils/md5")
const guessExpressCom = ({ num, key, success, fail }) => {
wx.request({
url: `https://www.kuaidi100.com/autonumber/auto?num=${num}&key=${key}`,
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success,
fail
})
}
const getExpressDetail = ({ num, success, fail }) => {
const param = JSON.stringify({ com: "yuantong", num, phone: "", from: "", to: "", resultv2: "0", show: "0", order: "desc" })
console.log(param);
wx.request({
url: `https://poll.kuaidi100.com/poll/query.do`,
method: "POST",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
data: {
customer: "F9449547DFA2DD0968C0552BA286AD35",
sign: md5(`${param}AjjPbmMP4727F9449547DFA2DD0968C0552BA286AD35`, 32).toUpperCase(),
param
},
success,
fail
})
}
module.exports = {
guessExpressCom,
getExpressDetail
}

3
app.js
View File

@ -147,7 +147,8 @@ App({
// ip: 'http://106.54.198.47/', //接口地址
ip: 'https://sanpinhuicai.com/', //接口地址
//ip: 'http://192.168.0.199:9090/', //接口地址
// ip: 'http://192.168.0.112:9000/', //接口地址/
// ip: 'http://127.0.0.1:9000/', //接口地址/
//appId wx65c9560afc9cbaa7
}

View File

@ -97,5 +97,11 @@
"scope.userLocation": {
"desc": "你的位置信息将方便您查看附近自提点"
}
},
"plugins": {
"kdPlugin": {
"version": "1.1.2",
"provider": "wx6885acbedba59c14"
}
}
}

1
icon/kefu.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="198.45px" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M224.9168 398.048c39.7488-125.5296 157.3104-216.7488 295.8816-216.7488 138.4704 0 256.032 91.2192 295.8768 216.7488h51.5616c-41.4384-153.1872-181.5024-266.2512-347.5248-266.2512-165.936 0-306 113.064-347.3424 266.2512h51.5472z" fill="#4887ED" /><path d="M205.5104 737.2352h-1.3056c-74.6256 0-135.288-60.6576-135.288-135.2832v-77.6256c0-74.6256 60.6624-135.288 135.288-135.288h1.2192c36.3744 0 65.8992 29.5296 65.8992 65.904v216.4704c0 36.288-29.5248 65.8224-65.8128 65.8224z" fill="#639DF6" /><path d="M204.2048 441.2672c-45.744 0-82.968 37.2192-82.968 82.968v77.6256c0 45.7488 37.224 82.968 82.968 82.968h1.3056a13.5696 13.5696 0 0 0 13.5024-13.5024V454.8608a13.608 13.608 0 0 0-13.5936-13.5936h-1.2144z" fill="#8EB7FE" /><path d="M834.0176 737.2352h-1.3056c-36.288 0-65.8128-29.5248-65.8128-65.8128V454.8608c0-36.3744 29.5248-65.8992 65.8992-65.8992h1.2192c74.6256 0 135.288 60.6576 135.288 135.2832v77.6304c0.0864 74.6112-60.6624 135.36-135.288 135.36z" fill="#639DF6" /><path d="M832.7984 441.2672a13.608 13.608 0 0 0-13.5936 13.5936v216.4752a13.5696 13.5696 0 0 0 13.5024 13.5024h1.3056c45.7488 0 82.968-37.2192 82.968-82.9632V524.24c0-45.744-37.2192-82.9632-82.968-82.9632h-1.2192v-0.0096z" fill="#8EB7FE" /><path d="M566.0816 877.5776h-4.776c-14.4432-0.1872-25.968-12.1008-25.7808-26.5296a26.1456 26.1456 0 0 1 26.1504-25.7808h0.3744c155.0688 2.256 248.3424-127.8768 249.288-129.1872a26.2512 26.2512 0 0 1 36.4704-6.3696 26.1456 26.1456 0 0 1 6.4704 36.3696c-4.512 6.1872-108.1056 151.4976-288.1968 151.4976z" fill="#4887ED" /></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

1
icon/zaixiankefu.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M512.020898 1013.551234a498.238975 498.238975 0 0 1-354.672926-146.888758A498.238975 498.238975 0 0 1 10.480113 512.010449a498.301667 498.301667 0 0 1 146.909655-354.693823A498.238975 498.238975 0 0 1 512.020898 10.469664 498.134487 498.134487 0 0 1 866.63113 157.358421a498.44795 498.44795 0 0 1 146.930552 354.652028 498.301667 498.301667 0 0 1-146.909654 354.63113 498.176282 498.176282 0 0 1-354.63113 146.909655z m-200.135671-730.953899a80.936144 80.936144 0 0 0-80.852554 80.852554v262.807371a80.936144 80.936144 0 0 0 80.852554 80.831657h34.877982l63.026959 75.502785a30.4895 30.4895 0 0 0 21.440868 8.881452 30.4895 30.4895 0 0 0 21.440869-8.881452l62.964266-75.502785h196.436807a80.936144 80.936144 0 0 0 80.831657-80.831657V363.449889a80.936144 80.936144 0 0 0-80.831657-80.852554z" fill="#10C55B" /><path d="M613.394829 461.6056H380.261954a26.707047 26.707047 0 0 1 0-53.393196h233.132875a26.707047 26.707047 0 0 1 0 53.393196z m-97.884044 123.170058h-135.248831a26.707047 26.707047 0 0 1 0-53.393196h135.248831a26.707047 26.707047 0 0 1 0 53.393196z m0 0" fill="#10C55B" /></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,3 +1,4 @@
const { guessExpressCom, getExpressDetail } = require("../../api/express")
// pages/logistics_details/logistics_details.js
Page({
@ -5,14 +6,36 @@ Page({
* 页面的初始数据
*/
data: {
records: [],
num: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// guessExpressCom({
// num: "YT7460149632645",
// key: "AjjPbmMP4727",
// success(resp) {
// console.log(resp);
// }
// })
this.setData({
num: "YT7460149632645"
})
getExpressDetail({
num: this.data.num,
success: (res) => {
console.log(res);
if (res.data.status === "200") {
console.log(res.data.data);
this.setData({
records: res.data.data
})
}
}
})
},
/**

View File

@ -1,2 +1,10 @@
<!--pages/logistics_details/logistics_details.wxml-->
<text>TODO: 物流详情</text>
<view style="padding:48rpx 48rpx 92rpx;">
<view style="margin-bottom: 36rpx;">圆通快递:{{num}}</view>
<view wx:for="{{records}}" class="record-item">
<view class="dot" />
<view class="line" />
<text class="time">{{item.time}}</text>
<text style="margin-top: 20rpx;">{{item.context}}</text>
</view>
</view>

View File

@ -1 +1,46 @@
/* pages/logistics_details/logistics_details.wxss */
.record-item {
/* padding-bottom: 48rpx; */
display: flex;
flex-direction: column;
position: relative;
padding-left: 48rpx;
}
.record-item:not(:last-child) {
padding-bottom: 48rpx;
}
.time {
font-size: 24rpx;
}
.dot {
position: absolute;
left: 0;
top: 9rpx;
width: 16rpx;
height: 16rpx;
background-color: gray;
opacity: 50%;
border-radius: 50%;
z-index: 999;
}
.record-item:nth-child(2) .dot {
background-color: red;
opacity: 1;
width: 24rpx;
height: 24rpx;
left: -6rpx;
}
.line {
position: absolute;
left: 8rpx;
top: 0;
height: 100%;
width: 2rpx;
background-color: gray;
opacity: 50%;
}

View File

@ -81,19 +81,20 @@ Page({
const prevPage = pages[pages.length - 2]  // 上一页
// 调用上一个页面的setData 方法将数据存储
if(this.data.dataList.length>0){
if (this.data.dataList.length > 0) {
prevPage.setData({
address: dataList[index].addressProvince + dataList[index].addressCity + dataList[index].addressArea + dataList[index].addressDetailed,
addressId: dataList[index].id,
province: dataList[index].addressProvince,
orderPick:2,
orderPick: 2,
})
}else{
prevPage.requestUpdateAddress && prevPage.requestUpdateAddress()
} else {
prevPage.setData({
address: '选择收货方式',
addressId: '',
province: '',
orderPick:2,
orderPick: 2,
})
}
@ -156,6 +157,9 @@ Page({
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -71,7 +71,7 @@ Page({
},
//订单数据
orderList: function () {
if(time) {
if (time) {
clearTimeout(time);
}
console.log(11111)
@ -88,7 +88,9 @@ Page({
userId: app.globalData.userId,
status: this.data.type,
page: this.data.page,
num: this.data.num
num: this.data.num,
addressId: undefined,
currentOrder: undefined
},
success: res => {
console.log(res)
@ -120,7 +122,7 @@ Page({
orderList: orderList,
page: this.data.page + 1
})
time = setInterval(()=>{
time = setInterval(() => {
this.countDown(orderList);
}, 1000)
@ -160,6 +162,22 @@ Page({
url: '/pages/expresswx/expresswx',
})
},
viewLogisticsDetails(e) {
const { logisticsNum } = e.currentTarget.dataset
wx.navigateTo({
url: `/pages/logistics_details/logistics_details`,
})
},
updateAddress(e) {
const { addressId, id: orderId } = e.currentTarget.dataset
this.setData({
currentOrder: orderId
})
wx.navigateTo({
url: '/pages/my/my_address/my_address?orderAddress=true&addressId=' + addressId,
})
},
//查看进度
after: function (e) {
wx.navigateTo({
@ -355,6 +373,23 @@ Page({
})
},
requestUpdateAddress() {
const { addressId, currentOrder } = this.data
console.log(addressId, currentOrder,);
wx.request({
url: app.globalData.ip + '/wisdommining/api/order/requestUpdateAddress',
method: "GET",
data: {
addressId, orderId: currentOrder
},
success: (result) => {
wx.showToast({
title: result.data.message,
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -388,6 +423,5 @@ Page({
*/
onReachBottom: function () {
this.orderList()
},
}
})

View File

@ -1,39 +1,39 @@
<!--pages/my/my_order/my_order.wxml-->
<view style="width:750rpx;background-color: #ffffff;">
<view class="typeAll display_J_S">
<view class="type {{type==0?'type_xz':''}}" catchtap="type" data-type="0">
<view class="type_s">全部</view>
<view class="typeXz" wx:if='{{type==0}}'></view>
</view>
<view class="type {{type==1?'type_xz':''}}" catchtap="type" data-type="1">
<view class="type_s">待支付</view>
<view class="typeXz" wx:if='{{type==1}}'></view>
</view>
<view class="type {{type==2?'type_xz':''}}" catchtap="type" data-type="2">
<view class="type_s">待发货</view>
<view class="typeXz" wx:if='{{type==2}}'></view>
</view>
<view class="type {{type==3?'type_xz':''}}" catchtap="type" data-type="3">
<view class="type_s">待收货</view>
<view class="typeXz" wx:if='{{type==3}}'></view>
</view>
<view class="type {{type==6?'type_xz':''}}" catchtap="type" data-type="6">
<view class="type_s">退款售后</view>
<view class="typeXz" wx:if='{{type==6}}'></view>
</view>
<view class="type {{type==4?'type_xz':''}}" catchtap="type" data-type="4">
<view class="type_s">已完成</view>
<view class="typeXz" wx:if='{{type==4}}'></view>
</view>
</view>
<view class="typeAll display_J_S">
<view class="type {{type==0?'type_xz':''}}" catchtap="type" data-type="0">
<view class="type_s">全部</view>
<view class="typeXz" wx:if='{{type==0}}'></view>
</view>
<view class="type {{type==1?'type_xz':''}}" catchtap="type" data-type="1">
<view class="type_s">待支付</view>
<view class="typeXz" wx:if='{{type==1}}'></view>
</view>
<view class="type {{type==2?'type_xz':''}}" catchtap="type" data-type="2">
<view class="type_s">待发货</view>
<view class="typeXz" wx:if='{{type==2}}'></view>
</view>
<view class="type {{type==3?'type_xz':''}}" catchtap="type" data-type="3">
<view class="type_s">待收货</view>
<view class="typeXz" wx:if='{{type==3}}'></view>
</view>
<view class="type {{type==6?'type_xz':''}}" catchtap="type" data-type="6">
<view class="type_s">退款售后</view>
<view class="typeXz" wx:if='{{type==6}}'></view>
</view>
<view class="type {{type==4?'type_xz':''}}" catchtap="type" data-type="4">
<view class="type_s">已完成</view>
<view class="typeXz" wx:if='{{type==4}}'></view>
</view>
</view>
</view>
<view class="orderAll">
<view class="order" wx:for="{{orderList}}" wx:key='index' data-num="{{item.orderNumber}}" catchtap="toOrderDetail">
<view class="state" wx:if="{{item.status<6}}">
{{item.status==5?'已取消':item.status==1?'待支付':item.status==2?'待发货':item.status==3?'待收货':item.status==4?'已完成':''}}
</view>
<view class="state" wx:if="{{item.status>5}}">
{{
<view class="order" wx:for="{{orderList}}" wx:key='index' data-num="{{item.orderNumber}}" catchtap="toOrderDetail">
<view class="state" wx:if="{{item.status<6}}">
{{item.status==5?'已取消':item.status==1?'待支付':item.status==2?'待发货':item.status==3?'待收货':item.status==4?'已完成':''}}
</view>
<view class="state" wx:if="{{item.status>5}}">
{{
item.status==61?'换货审核中'
:item.status==62?'退货审核中'
:item.status==63&&item.orderRefundType==1?'换货申请成功'
@ -47,64 +47,65 @@
:item.status==66&&item.orderRefundType==2?'退货失败'
:''
}}
</view>
<view class="number">订单编号:<text>{{item.orderNumber}}</text></view>
<view class="goods display_J_B" wx:for="{{item.goodsList}}" wx:for-item="goods" wx:key='index'>
<view class="goodsL">
<image src="{{goods.goodsPhoto}}"></image>
</view>
<view class="goodsM">
<view class="goodsTitle GStitleTwo">{{goods.goodsName}}</view>
<view class="goodsPrice" wx:if='{{item.orderPayWay!=3}}'>
{{item.orderPayWay!=2?'¥'+goods.price:goods.price+'积分'}}
</view>
<view class="goodsPrice" wx:if='{{item.orderPayWay==3}}'>¥0</view>
</view>
<view class="goodsR display_A_E">x <text>{{goods.goodsNum}}</text></view>
</view>
</view>
<view class="number">订单编号:<text>{{item.orderNumber}}</text></view>
<view class="goods display_J_B" wx:for="{{item.goodsList}}" wx:for-item="goods" wx:key='index'>
<view class="goodsL">
<image src="{{goods.goodsPhoto}}"></image>
</view>
<view class="goodsM">
<view class="goodsTitle GStitleTwo">{{goods.goodsName}}</view>
<view class="goodsPrice" wx:if='{{item.orderPayWay!=3}}'>
{{item.orderPayWay!=2?'¥'+goods.price:goods.price+'积分'}}
</view>
<view class="goodsPrice" wx:if='{{item.orderPayWay==3}}'>¥0</view>
</view>
<view class="goodsR display_A_E">x <text>{{goods.goodsNum}}</text></view>
</view>
<view class="total display_J_E">
<view class="total1" wx:if="{{item.orderPick==1}}">自提</view>
<view class="total1" wx:if="{{item.orderPick!=1&&item.orderFreight==0}}">免运费</view>
<view class="total2" wx:if="{{item.orderPick!=1&&item.orderFreight!=0}}">
运费<text><text>¥</text>{{item.orderFreight}}</text>
</view>
<view class="total3">合计<text>{{item.orderPayWay!=2?'¥'+item.orderActualPay:item.orderOtherPay+'积分'}}</text></view>
</view>
<view wx:if="{{item.timeStr}}" style="font-size: 28rpx">
您需要在<text style="color:#ee7b1e;">{{item.timeStr}}</text>内处理
</view>
<view class="btn display_J_E">
<view class="btn1" wx:if="{{item.status==3}}" data-item='{{item}}' catchtap="express">物流查询</view>
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' catchtap="confirm">确认收货</view>
<view class="btn1" wx:if="{{item.status==1}}">立即支付</view>
<view class="btn1" wx:if="{{item.status==4||item.status==5}}" catchtap="del" data-id='{{item.id}}'
data-index="{{index}}">删除订单</view>
<view class="total display_J_E">
<view class="total1" wx:if="{{item.orderPick==1}}">自提</view>
<view class="total1" wx:if="{{item.orderPick!=1&&item.orderFreight==0}}">免运费</view>
<view class="total2" wx:if="{{item.orderPick!=1&&item.orderFreight!=0}}">
运费<text><text>¥</text>{{item.orderFreight}}</text>
</view>
<view class="total3">合计<text>{{item.orderPayWay!=2?'¥'+item.orderActualPay:item.orderOtherPay+'积分'}}</text></view>
</view>
<view wx:if="{{item.timeStr}}" style="font-size: 28rpx">
您需要在<text style="color:#ee7b1e;">{{item.timeStr}}</text>内处理
</view>
<view class="btn display_J_E">
<view class="btn1" wx:if="{{item.status==3}}" data-item='{{item}}' data-logistics-num='{{item.logisticsNum}}' catchtap="viewLogisticsDetails">物流查询</view>
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' catchtap="confirm">确认收货</view>
<view class="btn1" wx:if="{{item.status==1}}">立即支付</view>
<view class="btn1" wx:if="{{item.status==4||item.status==5}}" catchtap="del" data-id='{{item.id}}' data-index="{{index}}">删除订单</view>
<!-- 退货流程 -->
<!-- 待发货 申请 -->
<view class="btn1 btn2" wx:if="{{item.status==2}}" data-id='{{item.id}}' catchtap="apply1">
申请退款</view>
<!-- 待收货申请 -->
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}'
data-s='{{item.status}}' data-sq='1' catchtap="apply">申请退货</view>
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}'
data-s='{{item.status}}' data-sq='2' catchtap="apply">申请换货</view>
<!-- 申请中 -->
<view class="btn1 btn2" wx:if="{{item.status==61||item.status==62||item.status==63||item.status==66}}"
data-id='{{item.id}}' data-num='{{item.orderNumber}}' catchtap="after">查看进度</view>
<!-- 退货待商家收货 完成 -->
<view class="btn1 btn2" wx:if="{{(item.status==64||item.status==65)&&item.orderRefundType!=3}}"
data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-sq='{{item.orderRefundType==1?2:1}}' catchtap="jilu">
退换货记录</view>
<!-- 退货流程 -->
<!-- 待发货 申请 -->
</view>
</view>
<view class="btn1 btn2" wx:if="{{item.status==2}}" data-id='{{item.id}}' catchtap="apply1">
申请退款</view>
<!-- 待收货申请 -->
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-s='{{item.status}}' data-sq='1' catchtap="apply">申请退货</view>
<view class="btn1 btn2" wx:if="{{item.status==3}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-s='{{item.status}}' data-sq='2' catchtap="apply">申请换货</view>
<!-- 申请中 -->
<view class="btn1 btn2" wx:if="{{item.status==61||item.status==62||item.status==63||item.status==66}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' catchtap="after">查看进度</view>
<!-- 退货待商家收货 完成 -->
<view class="btn1 btn2" wx:if="{{(item.status==64||item.status==65)&&item.orderRefundType!=3}}" data-id='{{item.id}}' data-num='{{item.orderNumber}}' data-sq='{{item.orderRefundType==1?2:1}}' catchtap="jilu">
退换货记录</view>
</view>
<!-- wx:if="{{item.status==2}}" -->
<view class="btn display_J_E" style="margin-top: 24rpx;">
<view class="btn1 btn2" data-id='{{item.id}}' data-address-id="{{item.addressId}}" catchtap="updateAddress">
修改地址</view>
</view>
</view>
</view>
<view class="empty" wx:if="{{orderList.length==0}}">
<view class="emptyImg">
<image src="/icon/order_none.png"></image>
</view>
<view class="emptyTitle">暂无订单~</view>
<view class="emptyImg">
<image src="/icon/order_none.png"></image>
</view>
<view class="emptyTitle">暂无订单~</view>
</view>

View File

@ -335,12 +335,12 @@ Page({
phoneNumber: '15955151737',
})
},
viewLogisticsDetails() {
viewLogisticsDetails(e) {
const { logisticsNum } = e.currentTarget.dataset
wx.navigateTo({
url: "/pages/logistics_details/logistics_details",
url: `/pages/logistics_details/logistics_details`,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -11,7 +11,7 @@
<!--待收货-->
<view class="logistics-all" data-item='{{goods}}' catchtap="express" wx:if='{{goods.status==3}}'>
<view class="logistics-all" data-item='{{goods}}' data-logistics-num="{{goods.logisticsNum}}" catchtap="viewLogisticsDetails" wx:if='{{goods.status==3}}'>
<view class="logistics display_J_B">
<view class="logistics-l display_J_S display_A_C">
<image src="/icon/express_icon.png"></image>
@ -118,8 +118,16 @@
<view class="order-l">快速解决问题</view>
<!-- <view class="order-r">暂无</view> -->
<view class="contact-b">
<button bind:tap="callCustomService" type="primary">客服电话</button>
<button type="primary" plain open-type="contact">在线客服</button>
<view bind:tap="callCustomService" class="contact-bth">
<image style="width: 36rpx;height: 36rpx;margin-right: 12rpx;" src="/icon/kefu.svg" />
客服电话
</view>
<view style="position: relative;" class="contact-bth">
<image style="width: 36rpx; height: 36rpx; margin-right: 12rpx;" src="/icon/zaixiankefu.svg" />
在线客服
<button type="primary" class="open-type-contact" plain open-type="contact"></button>
</view>
<!-- <button bind:tap="callCustomService" type="primary"></button> -->
</view>
</view>
</view>
@ -130,15 +138,15 @@
</view>
<view class="code-cont">核销时请出示此核销码~</view>
</view>
<view class="display_J_A display_A_C">
<button class="rounded-full" plain bind:tap="viewLogisticsDetails">查看物流</button>
</view>
<!-- <view class="display_J_E display_A_C">
<button class="logistics-btn rounded-full" type="warn" size="mini" plain bind:tap="viewLogisticsDetails">查看物流</button>
</view> -->
<view style="height:230rpx;"></view>
<view wx:if="{{!shops}}">
<view class="b-btn display_J_E display_A_C" wx:if="{{goods.status>2&&goods.status<6}}">
<view class="btn" wx:if="{{goods.status==5||goods.status==4}}" catchtap="del">删除订单</view>
<view class="btn" wx:if="{{goods.status==3}}" data-item='{{goods}}' catchtap="express">物流查询</view>
<view class="btn" wx:if="{{goods.status==3}}" data-item='{{goods}}' data-logistics-num='{{goods.logisticsNum}}' catchtap="viewLogisticsDetails">物流查询</view>
<view class="btn btn-red" catchtap="confirm" wx:if="{{goods.status==3}}">确认收货</view>
</view>

View File

@ -323,16 +323,44 @@ page {
}
.contact-b {
margin-top: 20rpx;
margin-top: 32rpx;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
}
.contact-bth {
display: flex;
align-items: center;
}
.contact-bth:last-child {
margin-left: 160rpx;
}
.open-type-contact {
position: absolute;
left: 0;
top: 0;
z-index: 99;
width: 100% !important;
height: 100%;
color: transparent !important;
border-color: transparent !important;
background-color: transparent !important;
}
.rounded-full {
border-radius: 9999px;
}
.logistics-btn {
margin-left: 0;
margin-right: 40rpx;
color: orange !important;
border-color: orange !important;
}
.code {
width: 750rpx;
height: 240rpx;

196
utils/md5.js Normal file
View File

@ -0,0 +1,196 @@
/*!
* md5js v1.0.7
* (c) 2017-2018 penyuying
* Released under the MIT License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.md5 = {})));
}(this, (function (exports) { 'use strict';
/*
eslint-disable
*/
function md5(text, bit) {
var sMessage = text; //this;
function RotateLeft(lValue, iShiftBits) {
return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
}
function AddUnsigned(lX, lY) {
var lX4, lY4, lX8, lY8, lResult;
lX8 = lX & 0x80000000;
lY8 = lY & 0x80000000;
lX4 = lX & 0x40000000;
lY4 = lY & 0x40000000;
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
if (lX4 & lY4) return lResult ^ 0x80000000 ^ lX8 ^ lY8;
if (lX4 | lY4) {
if (lResult & 0x40000000) return lResult ^ 0xC0000000 ^ lX8 ^ lY8;else return lResult ^ 0x40000000 ^ lX8 ^ lY8;
} else return lResult ^ lX8 ^ lY8;
}
function F(x, y, z) {
return x & y | ~x & z;
}
function G(x, y, z) {
return x & z | y & ~z;
}
function H(x, y, z) {
return x ^ y ^ z;
}
function I(x, y, z) {
return y ^ (x | ~z);
}
function FF(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
}
function GG(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
}
function HH(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
}
function II(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
}
function ConvertToWordArray(sMessage) {
var lWordCount;
var lMessageLength = sMessage.length;
var lNumberOfWords_temp1 = lMessageLength + 8;
var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - lNumberOfWords_temp1 % 64) / 64;
var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
var lWordArray = Array(lNumberOfWords - 1);
var lBytePosition = 0;
var lByteCount = 0;
while (lByteCount < lMessageLength) {
lWordCount = (lByteCount - lByteCount % 4) / 4;
lBytePosition = lByteCount % 4 * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | sMessage.charCodeAt(lByteCount) << lBytePosition;
lByteCount++;
}
lWordCount = (lByteCount - lByteCount % 4) / 4;
lBytePosition = lByteCount % 4 * 8;
lWordArray[lWordCount] = lWordArray[lWordCount] | 0x80 << lBytePosition;
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
return lWordArray;
}
function WordToHex(lValue) {
var WordToHexValue = "",
WordToHexValue_temp = "",
lByte,
lCount;
for (lCount = 0; lCount <= 3; lCount++) {
lByte = lValue >>> lCount * 8 & 255;
WordToHexValue_temp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
}
return WordToHexValue;
}
var x = Array();
var k, AA, BB, CC, DD, a, b, c, d;
var S11 = 7,
S12 = 12,
S13 = 17,
S14 = 22;
var S21 = 5,
S22 = 9,
S23 = 14,
S24 = 20;
var S31 = 4,
S32 = 11,
S33 = 16,
S34 = 23;
var S41 = 6,
S42 = 10,
S43 = 15,
S44 = 21;
// Steps 1 and 2. Append padding bits and length and convert to words
x = ConvertToWordArray(sMessage);
// Step 3. Initialise
a = 0x67452301;b = 0xEFCDAB89;c = 0x98BADCFE;d = 0x10325476;
// Step 4. Process the message in 16-word blocks
for (k = 0; k < x.length; k += 16) {
AA = a;BB = b;CC = c;DD = d;
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
a = AddUnsigned(a, AA);b = AddUnsigned(b, BB);c = AddUnsigned(c, CC);d = AddUnsigned(d, DD);
}
if (bit == 32) {
return WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d);
} else {
return WordToHex(b) + WordToHex(c);
}
}
exports.md5 = md5;
Object.defineProperty(exports, '__esModule', { value: true });
})));

15
utils/request.js Normal file
View File

@ -0,0 +1,15 @@
const request = (config) => new Promise((resolve, reject) => {
wx.request({
...config,
success(res) {
resolve(res)
},
fail(err) {
reject(err)
}
})
})
module.exports = {
request: request
}