- {{goodsInfo.shop_name}}
- {{goodsInfo.user_name}}
- 联系方式 :{{goodsInfo.shop_phone}}
- 联系方式 :{{goodsInfo.user_phone}}
+
+ 收货人姓名: {{ fuzzyName(goodsInfo.user_name) }}
+
+
+ 收货人姓名: {{fuzzyName(goodsInfo.user_name)}}
+
+
+
+
+
+
+ 店主姓名
+
+
+ {{goodsInfo.shop_user ||'暂无'}}
+
+
+
+
+
+ 联系方式
+
+
+ {{goodsInfo.shop_phone}}
+
+
+
+
+ 商家地址
+
+
+
+ {{goodsInfo.shop_address}}
+
+
+
+
+
+ 订单编号
+
+
+
+ {{goodsInfo.order_sn}}
+
+
+
+
+
+
+
+ 商品信息
+
+
+
+ {{item.goods_name}}
+ X{{item.product_num}}{{item.goods_unit}}
+
+
+
-
-
-
- 商家地址
- {{goodsInfo.shop_address}}
-
-
- 用户地址
- {{goodsInfo.user_address}}
-
-
- 订单编号
- {{goodsInfo.order_sn}}
-
-
- 采购商品
-
- {{item.goods_name}}
- X{{item.product_num}}{{item.goods_unit}}
+
+
+ 共计{{goodsInfo.product_count}}件商品
+
+
+
+
+ 扫码取货
+
+
+
+
+
+
+
+
+
+
+
+
+ 收货地址
+
+
+
+ {{goodsInfo.user_address}}
+
+
+
+
+
+ 订单编号
+
+
+ {{goodsInfo.order_sn}}
+
+
+
+
+
+
+
+ 商品信息
+
+
+
+ {{item.goods_name}}
+ X{{item.product_num}}{{item.goods_unit}}
+
+
+
+
+
+
+
+
+
+ 联系电话
+
+
+ {{goodsInfo.user_phone}}
+
+
+
+
+
+ 共计{{goodsInfo.product_count}}件商品
+
+
+ 货物送达
+
+
+
+
+
+
+
+
+ 联系电话
+
+
+ {{goodsInfo.user_phone}}
+
+
+
+
+
+ 用户地址
+
+
+
+ {{goodsInfo.user_address}}
+
+
+
+
+
+
+ 取货时间
+
+
+ {{goodsInfo.qh_time}}
+
+
+
+
+
+ 送达时间
+
+
+ {{goodsInfo.ps_time}}
+
+
+
+
+
+
+
+
+
+
+ 共计{{goodsInfo.product_count}}件商品
+
+
+
+
+ 查看详情
+
+
-
-
-
-
-
- 订单编号 {{goodsInfo.order_sn}}
-
-
- 联系方式 {{goodsInfo.user_phone}}
-
- 送达时间 {{goodsInfo.ps_time||"暂未送达"}}
-
-
- 取货时间 {{goodsInfo.qh_time||"暂未取货"}}
-
-
- 共计{{goodsInfo.product_count}}件商品
-
-
-
-
-
-
+
-
+
-
- 扫码取货
- 已送达
- 查看详情
-
+
@@ -89,34 +242,18 @@
props: ['goodsInfo'],
data() {
return {
-
list: [],
flag: undefined,
showPop: false,
take_code: "",
- showKeybord: false,
- // popContent: ["请确认已经收到货", "请确认已送达"]
- }
- },
- computed: {
- pst_time() {
- let timestamp = this.goodsInfo.ps_time
- // 此处时间戳以毫秒为单位
- let date = new Date(parseInt(timestamp) * 1000);
- let Year = date.getFullYear();
- let Moth = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
- let Day = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
- let Hour = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
- let Minute = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
- let Sechond = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
- let GMT = Year + '-' + Moth + '-' + Day + ' ' + Hour + ':' + Minute + ':' + Sechond;
- return GMT
+
}
},
methods: {
- test() {
- // console.log(666)
- uni.hideKeyboard()
+ fuzzyName(name) {
+ let length = name.length;
+ let fuzzyChars = "*".repeat(length - 1);
+ return name[0] + fuzzyChars;
},
goDetil() {
let status = this.goodsInfo.status
@@ -124,6 +261,12 @@
url: `/pages/logistics/${status==0?"deliveryDetil":"logisticDetil"}?id=${this.goodsInfo.id}`
})
},
+ callFn(num) {
+ uni.makePhoneCall({
+ phoneNumber: num
+ });
+ // console.log(9999)
+ },
// 扫码
qrqodeFn() {
@@ -167,33 +310,10 @@
this.$emit('getlist')
})
},
- showMore() {
- if (this.goodsInfo.products.length <= 3) {
- this.list = this.goodsInfo.products
- } else {
- this.flag = true
- for (let i = 0; i < 3; i++) {
- this.list.push(this.goodsInfo.products[i])
- }
- }
- },
- getMore() {
- if (this.flag) {
- for (let i = 3; i < this.goodsInfo.products.length; i++) {
- this.list.push(this.goodsInfo.products[i])
- }
- this.flag = false
- }
- }
+
},
- mounted() {
- this.showMore()
- // console.log(this.goodsInfo)
- // console.log(this.goodsInfo)
- // conso
- }
}
@@ -201,118 +321,109 @@
.order {
position: relative;
background-color: white;
- margin: 20rpx 0;
border-radius: 15rpx;
height: auto;
- padding: 2vh 3vw;
box-sizing: border-box;
+ overflow: hidden;
+ margin: 2vh 2vw;
- .custom-style {
- border: 0;
- width: 25vw;
- position: absolute;
- top: 0;
- right: 0;
- height: 4vh;
- border-radius: 0 7px 0 7px;
- }
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
+ /* padding: 2vh 2vw; */
-
-
- p {
- font-family: "PingFang SC-Medium";
+ .tit {
+ /* padding: 2vh 2vw; */
font-size: 32rpx;
font-weight: bold;
+ background-color: #FF7C32;
+ color: white;
+ padding: 30rpx 20rpx;
}
- .phone {
- color: #999999;
- padding: 10rpx 0;
- border-bottom: 1px dashed blue;
- }
+ .contents {
+ background-color: #fff;
+ padding: 30rpx 20rpx;
- .content_box {
- margin: 15rpx 0;
-
- view {
- display: flex;
+ .list {
margin: 10rpx 0;
-
- text:first-child {
- color: #999;
- }
}
- .products {
- display: block;
- .tit {
- color: #999;
+ .hr {
+ border-bottom: 1px dashed #0122C7;
+ margin: 20rpx 0;
+ }
+ }
- float: left;
- margin: 0
+
+
+ .left {
+ .list {
+ display: flex;
+
+ .norow {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
- .product {
- width: 65vw;
- display: flex;
- justify-content: space-between;
- margin-left: 18vw;
-
-
- .left {
- color: black;
- width: 55vw;
- margin: 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ view {
+ flex: 8;
+ view {
+ margin-bottom: 10rpx;
}
-
-
}
+ text {
+ flex: 2;
+ }
}
-
}
+ .pro_list {
+ display: flex;
- .cil_left {
- width: 30rpx;
- height: 30rpx;
- background-color: #F5F5F5;
- border-radius: 30rpx;
- position: absolute;
- top: 110rpx;
- left: -15rpx;
-
- }
-
- .cil_right {
- width: 30rpx;
- height: 30rpx;
- background-color: #F5F5F5;
- border-radius: 30rpx;
- position: absolute;
- top: 110rpx;
- right: -15rpx;
-
+ text {
+ margin-right: 20rpx;
+ }
}
.total {
- text-align: right;
+ margin: 20rpx 0;
color: #3274F9;
font-weight: bold;
font-size: 32rpx;
- margin: 20rpx 0;
+ text-align: right;
}
- .icon {
+
+
+ .goods_tit {
+ display: flex;
+ justify-content: space-between;
+
+ .goods_detil {
+ width: 55vw;
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+
+ .tost_tit {
text-align: center;
-
}
+
+ }
+
+ .address {
+ width: 65vw;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.finishOrder {
diff --git a/manifest.json b/manifest.json
index ef158e8..7657782 100644
--- a/manifest.json
+++ b/manifest.json
@@ -28,22 +28,26 @@
/* android打包配置 */
"android" : {
"permissions" : [
- "",
"",
"",
+ "",
+ "",
"",
"",
+ "",
"",
"",
"",
"",
"",
+ "",
"",
"",
"",
"",
"",
"",
+ "",
""
]
},
@@ -66,6 +70,34 @@
"appkey_ios" : "0799f37420c0784f1e6cba230a68bdb1",
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
}
+ },
+ "geolocation" : {
+ "amap" : {
+ "__platform__" : [ "ios", "android" ],
+ "appkey_ios" : "0799f37420c0784f1e6cba230a68bdb1",
+ "appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
+ }
+ },
+ "push" : {
+ "unipush" : {
+ "version" : "2",
+ "offline" : true,
+ "hms" : {},
+ "oppo" : {},
+ "vivo" : {},
+ "mi" : {},
+ "meizu" : {},
+ "fcm" : {},
+ "icons" : {
+ "small" : {
+ "ldpi" : "C:/Users/Administrator/Pictures/216X50k/资源 5@4x.png",
+ "mdpi" : "C:/Users/Administrator/Pictures/216X50k/资源 5@4x.png",
+ "hdpi" : "C:/Users/Administrator/Pictures/216X50k/资源 5@4x.png",
+ "xhdpi" : "C:/Users/Administrator/Pictures/216X50k/资源 5@4x.png",
+ "xxhdpi" : "C:/Users/Administrator/Pictures/216X50k/资源 5@4x.png"
+ }
+ }
+ }
}
},
"splashscreen" : {
diff --git a/pages.json b/pages.json
index 332e2ba..a66942d 100644
--- a/pages.json
+++ b/pages.json
@@ -85,7 +85,7 @@
"style": {
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false,
- "navigationBarBackgroundColor": "#3175f9",
+ "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@@ -94,7 +94,7 @@
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
- "navigationBarBackgroundColor": "#3175f9",
+ "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@@ -103,7 +103,7 @@
"style": {
"navigationBarTitleText": "配送信息",
"enablePullDownRefresh": false,
- "navigationBarBackgroundColor": "#3175f9",
+ "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
diff --git a/pages/logistics/deliveryDetil.vue b/pages/logistics/deliveryDetil.vue
index 31d51ff..ab10aa7 100644
--- a/pages/logistics/deliveryDetil.vue
+++ b/pages/logistics/deliveryDetil.vue
@@ -1,67 +1,95 @@
-
+
-
+
+
+
-
-
-
-
-
-
- 订单号: {{goodsDetil.logistics.order_sn}}
-
- 商户名称 {{goodsDetil.logistics.shop_name}}
-
-
- 联系电话 {{goodsDetil.logistics.shop_phone}}
-
-
- {{goodsDetil.logistics.shop_address}}
-
-
- 物流信息
-
-
-
- {{item.content }}
-
-
- {{item.create_time }}
-
-
-
-
- 商品信息
-
-
-
- {{item.goods_name}}
- X{{item.product_num}}{{item.goods_unit}}
+
+
+
+ 起点: {{nowAddress}}
+
+
+
+ 终点: {{goodsDetil.logistics.shop_address}}
+
+
+
+
+
+ 订单号信息:
+
+ 订单编号: {{goodsDetil.logistics.order_sn}}
+
+ 商户名称: {{goodsDetil.logistics.shop_name}}
+
+
+ 联系电话: {{goodsDetil.logistics.shop_phone}}
+
+
+ 店铺地址: {{goodsDetil.logistics.shop_address}}
+
+
+
+
+ 请详细核对订单信息
+
+
-
- 共计{{goodsDetil.product_count}}件商品
+
+
+
+ 物流信息:
+
+ 用户名称: {{fuzzyName( goodsDetil.logistics.user_name)}}
+
+ 通知时间: {{goodsDetil.logistics.create_time}}
+
+
+
+ 商品信息
+
+
+
+ {{item.goods_name}}
+ X{{item.product_num}}{{item.goods_unit}}
+
+
+
+
+
+
+ 请详细核对订单信息
+ 共计{{goodsDetil.product_count}}件商品
+
+
+
+
+
+
+
+ 扫码取货
- 扫码取货
-
+
@@ -75,21 +103,65 @@
export default {
data() {
return {
+
showLoading: true,
showPop: false,
goodsDetil: undefined,
- scale: 17,
- latitude: undefined,
- longitude: undefined,
- markers: [{
- id: 1,
- latitude: undefined,
- longitude: undefined,
- iconPath: '../../static/tabs-icon/home-a.png', //显示的图标
- }],
+ scale: 15,
+ nowAddress: "无",
+ markers: [
+ // 商家
+ {
+ id: 1,
+ latitude: undefined,
+ longitude: undefined,
+ iconPath: '../../static/img/logistics/SJ.png', //显示的图标
+ },
+ // 骑手
+ {
+ id: 2,
+ latitude: undefined,
+ longitude: undefined,
+ iconPath: '../../static/img/logistics/QS.png', //显示的图标
+ }
+ ],
+
+ polyline: []
+
+
}
},
methods: {
+ fuzzyName(name) {
+ let length = name.length;
+ let fuzzyChars = "*".repeat(length - 1);
+ return name[0] + fuzzyChars;
+ },
+ callFn(num) {
+ uni.makePhoneCall({
+ phoneNumber: num
+ });
+ },
+ // 获取位置
+ // 位置
+ locationFn() {
+ let that = this
+ uni.getLocation({
+ type: 'gcj02',
+ geocode: true,
+ isHighAccuracy: true,
+ success: function async (res) {
+ that.nowAddress = res.address.city + res.address.district + res.address.street + res
+ .address.streetNum + res.address.poiName
+ console.log(that.nowAddress)
+ that.markers[1].latitude = res.latitude
+ that.markers[1].longitude = res.longitude
+ that.getDriverLine()
+
+ }
+ });
+ },
+
// 唤起高德
test() {
var packageName = 'com.autonavi.minimap';
@@ -146,6 +218,52 @@
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
})
},
+ getDriverLine() {
+ const that = this;
+ const key = "997c9a3d88154fa78f4d28bebc1dd84f";
+
+ const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`;
+
+ const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`;
+ uni.request({
+ // url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
+ url: `https:restapi.amap.com/v4/direction/bicycling?key=${key}&origin=${origin}&destination=${destination}`,
+ success: (res) => {
+ const data = res.data.data;
+ var points = [];
+ if (data.paths && data.paths[0] && data.paths[0].steps) {
+ var steps = data.paths[0].steps;
+ for (var i = 0; i < steps.length; i++) {
+ //将每一步的数据放到points数组中
+ var poLen = steps[i].polyline.split(";");
+ for (var j = 0; j < poLen.length; j++) {
+ points.push({
+ longitude: parseFloat(poLen[j].split(",")[0]),
+ latitude: parseFloat(poLen[j].split(",")[1]),
+ });
+ }
+ }
+
+ that.runningRoute = data.paths[0].steps[0].instruction;
+
+ }
+ that.polyline = [{
+ points: points,
+ color: "#0091ff",
+ dottedLine: true,
+ width: 10,
+
+ }, ];
+ },
+ fail: function(res) {
+ console.log("获取路线失败", res);
+ },
+ });
+ },
+
+
+
+
qrqodeFn() {
let that = this
uni.scanCode({
@@ -162,8 +280,6 @@
order_id: this.goodsDetil.logistics.order_id,
order_sn: sn
}).then(res => {
- console.log("取货成功")
- // this.$emit('showTost')
this.showToast()
setTimeout(() => {
uni.navigateBack()
@@ -172,17 +288,6 @@
},
- getLocation() {
- uni.getLocation({
- type: 'wgs84',
- success: function(res) {
- console.log('当前位置的经度:' + res.longitude);
- console.log('当前位置的纬度:' + res.latitude);
- }
- });
-
- }
-
},
onLoad(options) {
@@ -190,121 +295,104 @@
logistics_id: options.id
}).then(res => {
this.goodsDetil = res.data
- this.latitude = res.data.logistics.shop_lat
- this.longitude = res.data.logistics.shop_long
this.markers[0].latitude = res.data.logistics.shop_lat
this.markers[0].longitude = res.data.logistics.shop_long
+ this.locationFn()
setTimeout(() => {
this.showLoading = false
}, 500)
})
-
-
},
-
-
-
-
-
}
\ No newline at end of file
diff --git a/pages/logistics/index.vue b/pages/logistics/index.vue
index f15d27f..dd0634f 100644
--- a/pages/logistics/index.vue
+++ b/pages/logistics/index.vue
@@ -1,23 +1,29 @@
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+