Initial Commit

This commit is contained in:
quantulr
2024-05-06 15:34:15 +08:00
commit e3a0666d5a
307 changed files with 28969 additions and 0 deletions

View File

@ -0,0 +1,124 @@
// pages/expresswx/expresswx.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
current: 1,
verticalCurrent: 1,
expresslist: [],
expressData: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
expressData:JSON.parse(app.globalData.expressData)
})
console.log(this.data.expressData)
wx.showLoading({
title: '加载中',
})
wx.request({
url: app.globalData.ip + '/wisdommining/api/order/getLogistics',
data: {
logisticsNumber: this.data.expressData.logisticsNum,
},
success: res => {
wx.hideLoading()
if (res.data.code == 1) {
if (res.data.value.length == 0) {
wx.showModal({
title: '提示',
content: '暂无物流信息',
showCancel: false,
success: s => {
wx.navigateBack()
}
})
} else {
var expresslist = res.data.value;
this.setData({
expresslist: expresslist,
})
console.log(this.data.expresslist)
}
} else {
wx.showModal({
title: '数据查询异常',
content: res.data.message,
showCancel: false,
success: s => {
wx.navigateBack()
}
})
}
},
fail: res => {
wx.hideLoading()
wx.showToast({
title: '数据查询失败',
icon: 'none',
})
}
})
},
//复制单号
num: function (e) {
wx.setClipboardData({
data: e.currentTarget.dataset.num,
success(res) {
wx.getClipboardData({
success(res) {
console.log(res.data) // data
}
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
})

View File

@ -0,0 +1,7 @@
{
"usingComponents": {
"i-steps": "/dist/steps/index",
"i-step": "/dist/step/index"
},
"navigationBarTitleText": "物流详情"
}

View File

@ -0,0 +1,35 @@
<!--pages/expresswx/expresswx.wxml-->
<view class="top">
<!-- <view class="top_state">
<text>物流状态:</text>
<text style="font-size:28rpx;color:#d9ae59">配送中</text>
</view> -->
<view class="top_state">
物流公司:<text>{{expressData.logisticsName}}</text>
</view>
<view class="top_state display_A_C" style="margin-top:20rpx;">
物流单号:<text>{{expressData.logisticsNum}}</text>
<text class="sing" catchtap="num" data-num="{{expressData.logisticsNum}}" style="margin-left:30rpx;padding:0 10rpx;">复制单号</text>
</view>
</view>
<view>
<view class="erp">
<view>
<i-steps current="{{current}}" direction="vertical">
<!-- 遍历 -->
<block wx:for="{{expresslist}}" wx:for-item="lit" wx:key="index">
<i-step>
<view slot="date" style="position:relative;top:0rpx"></view>
<view slot="title"></view>
<!-- 内容 -->
<view slot="content" class="{{index==current-1?'limer':'topermi'}} {{index==3?'':'yearbord'}}">
<view>{{lit.content}} </view>
<view>{{lit.time}}</view>
</view>
</i-step>
</block>
</i-steps>
</view>
</view>
</view>

View File

@ -0,0 +1,56 @@
/* pages/expresswx/expresswx.wxss */
page{
background: #F9F9F9
}
.top{
margin:0 30rpx;
background-color: #ffffff;
border-radius: 10rpx;
padding: 20rpx 30rpx;
margin-top: 25rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.top_state text{
color: #333;
margin-left: 10rpx;
}
.top_state{
line-height: 32rpx;
font-size: 24rpx;
display: inline-block;
color: #666;
}
.top_state .sing{
width: 100rpx;
height: 30rpx;
border-radius: 4rpx;
border: solid 1rpx #333333;
font-size: 20rpx;
text-align: center;
line-height: 30rpx;
color: #333;
}
.i-steps {
padding-left: 117rpx;
}
.erp{
background: white;
margin: 0 30rpx;
margin-top: 20rpx;
padding: 0 30rpx;
padding-top: 60rpx;
border-radius: 10rpx;
}
.topermi{
position: relative;
top:-15rpx;
}
.limer{
color: #ee7b1e;
}
.yearbord{
border-bottom:1rpx solid #e5e5e5;
padding-bottom: 30rpx
}