页面修改

This commit is contained in:
THK3121 2023-08-21 17:25:01 +08:00
parent 44d04c8a9f
commit 6e6de0952c
7 changed files with 725 additions and 281 deletions

View File

@ -13,7 +13,7 @@
<view @click.stop="callFn(goodsInfo.shop_phone)" class="address">
联系电话:&nbsp;&nbsp; <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
color="#2979ff" size="22"></u-icon>
{{goodsInfo.shop_phone}}
<text>{{goodsInfo.shop_phone}}</text>
</view>
<view class="address">取货地址:&nbsp;&nbsp;{{goodsInfo.shop_address}}</view>
<view class="address">通知日期:&nbsp;&nbsp;{{goodsInfo.create_time}}</view>
@ -29,12 +29,14 @@
<view class="qh_btn" v-if='goodsInfo.status==0' @click.stop="goDetil(goodsInfo.id)">
<u-button type="primary" class="custom-style" style="background-color: #0122C7;border: 0;">
<u-icon name="scan" color="white" size="25" style="margin-right: 10rpx;"></u-icon>
待取货/点击查看</u-button>
<u-icon v-if="!is_captain" name="scan" color="white" size="25" style="margin-right: 10rpx;"></u-icon>
<text v-if="!is_captain">待取货/</text>点击查看</u-button>
</view>
<view class="" v-if='goodsInfo.status==1' @click.stop="goDetil(goodsInfo.id)">
<u-button type="primary" style="background-color: #FF7C32; border: 0;"><u-icon name="car-fill" color="white"
size="25" style="margin-right: 10rpx;"></u-icon> 待配送/点击查看</u-button>
<u-button type="primary" style="background-color: #FF7C32; border: 0;"><u-icon v-if="!is_captain"
name="car-fill" color="white" size="25" style="margin-right: 10rpx;"></u-icon> <text
v-if="!is_captain">待配送/</text>点击查看</u-button>
</view>
</view>
</template>
@ -46,11 +48,13 @@
props: ['goodsInfo'],
data() {
return {
is_captain: 0,
}
},
mounted() {
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
},
methods: {
fuzzyName(name) {
let length = name.length;
@ -100,6 +104,9 @@
.address {
margin: 10rpx 0;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;

View File

@ -33,7 +33,10 @@
</text>
<view @click.stop="callFn(goodsInfo.shop_phone)">
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
color="#2979ff" size="22"></u-icon> {{goodsInfo.shop_phone}}
color="#2979ff" size="22"></u-icon>
<text class="phone_num"> {{goodsInfo.shop_phone}}</text>
</view>
</view>
<view class="list">
@ -82,7 +85,7 @@
扫码取货</u-button>
<u-button v-else type="primary" @click="goDetil" class="custom-style"
style="background-color: #0122C7;border: 0;">
<u-icon name="scan" color="white" size="25" style="margin-right: 10rpx;"></u-icon>
查看详情</u-button>
</view>
@ -313,8 +316,9 @@
}
},
onLaunch() {
mounted() {
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
// console.log(this.is_captain + '5656565656s')
},
methods: {
fuzzyName(name) {
@ -406,6 +410,8 @@
padding: 30rpx 20rpx;
}
.contents {
background-color: #fff;
padding: 30rpx 20rpx;
@ -433,6 +439,12 @@
text-overflow: ellipsis;
}
/* .phone_num {
color: red;
line-height: 22px;
display: inline-block;
} */
view {
flex: 8;

View File

@ -129,6 +129,10 @@
// this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`)
} else this.navTo('');
if (this.$props.datas.type == 32) {
// this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
this.navTo(`/subpkg/vehicle/vehicle?task_id=${this.$props.datas?.id}`)
} else this.navTo('');
}
}
}

View File

@ -197,286 +197,299 @@
"root": "subpkg",
"name": "subpkg",
"pages": [{
"path": "personnel/personnel",
"style": {
"navigationBarTitleText": "人员管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
"path": "personnel/personnel",
"style": {
"navigationBarTitleText": "人员管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "finance/finance",
"style": {
"navigationBarTitleText": "财务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "finance/finance",
"style": {
"navigationBarTitleText": "财务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "topUp/topUp",
"style": {
"navigationBarTitleText": "账户充值",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "充值记录",
"fontSize": "15",
"width": "90"
}]
}, {
"path": "topUp/topUp",
"style": {
"navigationBarTitleText": "账户充值",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "充值记录",
"fontSize": "15",
"width": "90"
}]
}
}
}
}
}, {
"path": "contract/contract",
"style": {
"navigationBarTitleText": "合同管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0022C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "contract/contract",
"style": {
"navigationBarTitleText": "合同管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0022C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "contractDetail/contractDetail",
"style": {
"navigationBarTitleText": "合同详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "contractDetail/contractDetail",
"style": {
"navigationBarTitleText": "合同详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "pdfView/pdfView",
"style": {
"navigationBarTitleText": "合同内容",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "pdfView/pdfView",
"style": {
"navigationBarTitleText": "合同内容",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyInfo/companyInfo",
"style": {
"navigationBarTitleText": "公司信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyInfo/companyInfo",
"style": {
"navigationBarTitleText": "公司信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companySign/companySign",
"style": {
"navigationBarTitleText": "签约公司详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companySign/companySign",
"style": {
"navigationBarTitleText": "签约公司详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "personnelDetails/personnelDetails",
"style": {
"navigationBarTitleText": "人员详细信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "personnelDetails/personnelDetails",
"style": {
"navigationBarTitleText": "人员详细信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "orderDetail/orderDetail",
"style": {
"navigationBarTitleText": "流水详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "orderDetail/orderDetail",
"style": {
"navigationBarTitleText": "流水详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "withdrawDeposit/withdrawDeposit",
"style": {
"navigationBarTitleText": "提现余额",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "提现记录",
"fontSize": "15",
"width": "90"
}]
}, {
"path": "withdrawDeposit/withdrawDeposit",
"style": {
"navigationBarTitleText": "提现余额",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
"buttons": [{
"color": "#fff",
"text": "提现记录",
"fontSize": "15",
"width": "90"
}]
}
}
}
}
}, {
"path": "withdrawList/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}, {
"path": "withdrawList/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "noticeList/noticeList",
"style": {
"navigationBarTitleText": "公告列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "topUpList/topUpList",
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyAdmin/companyAdmin",
"style": {
"navigationBarTitleText": "公司管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "newPersonnel/newPersonnel",
"style": {
"navigationBarTitleText": "新增人员",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "archives/archives",
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "newArchives/newArchives",
"style": {
"navigationBarTitleText": "信息登记",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "updateArchives/updateArchives",
"style": {
"navigationBarTitleText": "信息更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "fixedAssets/fixedAssets",
"style": {
"navigationBarTitleText": "固定资产",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "taskAdmin/taskAdmin",
"style": {
"navigationBarTitleText": "任务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "archivesDetail/archivesDetail",
"style": {
"navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "captain/captain",
"style": {
"navigationBarTitleText": "队长列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyFinance/companyFinance",
"style": {
"navigationBarTitleText": "公司财务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyUnsign/companyUnsign",
"style": {
"navigationBarTitleText": "未签约公司列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "submit/submit",
"style": {
"navigationBarTitleText": "提交审核",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "dispatching/dispatching",
"style": {
"navigationBarTitleText": "任务:宣传配送",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "blockTransaction/blockTransaction",
"style": {
"navigationBarTitleText": "任务:片区交易",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "fileTask/fileTask",
"style": {
"navigationBarTitleText": "已更新商机",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "vehicle/vehicle",
"style": {
"navigationBarTitleText": "三轮车游走",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}
}, {
"path": "noticeList/noticeList",
"style": {
"navigationBarTitleText": "公告列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "topUpList/topUpList",
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyAdmin/companyAdmin",
"style": {
"navigationBarTitleText": "公司管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "newPersonnel/newPersonnel",
"style": {
"navigationBarTitleText": "新增人员",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "archives/archives",
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "newArchives/newArchives",
"style": {
"navigationBarTitleText": "信息登记",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "updateArchives/updateArchives",
"style": {
"navigationBarTitleText": "信息更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "fixedAssets/fixedAssets",
"style": {
"navigationBarTitleText": "固定资产",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "taskAdmin/taskAdmin",
"style": {
"navigationBarTitleText": "任务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "archivesDetail/archivesDetail",
"style": {
"navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "captain/captain",
"style": {
"navigationBarTitleText": "队长列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyFinance/companyFinance",
"style": {
"navigationBarTitleText": "公司财务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "companyUnsign/companyUnsign",
"style": {
"navigationBarTitleText": "未签约公司列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "submit/submit",
"style": {
"navigationBarTitleText": "提交审核",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "dispatching/dispatching",
"style": {
"navigationBarTitleText": "任务:宣传配送",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "blockTransaction/blockTransaction",
"style": {
"navigationBarTitleText": "任务:片区交易",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "fileTask/fileTask",
"style": {
"navigationBarTitleText": "已更新商机",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}]
]
}],
"globalStyle": {
"navigationBarTextStyle": "black",

View File

@ -1,3 +1,8 @@
.u-icon {
vertical-align: middle;
/* 垂直居中对齐 */
}
.font-bg-red,
.font_bg-red {
display: inline-block;

View File

@ -78,21 +78,13 @@
<text> {{item.city_name+item.area_name+item.street_name}}</text>
</view>
</view>
</view>
</view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
<mybtn text="新建签约" @click="navTo('/subpkg/companyUnsign/companyUnsign')">
<u-icon name="plus" color="white" size="18" style="margin-right: 10rpx;"></u-icon>
</mybtn>
</mybtn>
<!-- <u-button class="btns" @click="navTo('/subpkg/companyUnsign/companyUnsign')">
<u-icon name="plus" color="white" size="18" style="margin-right: 10rpx;"></u-icon>
新建签约

411
subpkg/vehicle/vehicle.vue Normal file
View File

@ -0,0 +1,411 @@
<template>
<view>
<view v-if='showLoading'>
<u-loading-page :loading="showLoading"></u-loading-page>
</view>
<view v-else>
<view class="content">
<u-toast ref="uToast"></u-toast>
<view class="map">
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
:markers='markers' :scale="scale" style="width:100%;height: 70%;"
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
<cover-image class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
</cover-image>
</map>
<view class="map_address">
<view>
<text class="cir" style="background-color: #40BC5E;"></text> 起点:&nbsp;&nbsp;{{nowAddress}}
</view>
<view>
<text class="cir" style="background-color: #FF7C32;"></text>
终点:&nbsp;&nbsp;{{goodsDetil.logistics.shop_address}}
</view>
</view>
</view>
<view class="order_info">
<view class="top">
<view>
订单号信息:
</view>
<view>订单编号:&nbsp;&nbsp;{{goodsDetil.logistics.order_sn}}</view>
<view>
商户名称:&nbsp;&nbsp; {{goodsDetil.logistics.shop_name}}
</view>
<view @click.stop="callFn(goodsDetil.logistics.shop_phone)">
联系电话:&nbsp;&nbsp; <u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
color="#fff" size="22"></u-icon>{{goodsDetil.logistics.shop_phone}}
</view>
<view>
店铺地址:&nbsp;&nbsp;{{goodsDetil.logistics.shop_address}}
</view>
</view>
<view class="mark">
请详细核对订单信息
</view>
</view>
<view class="order_info" style="background-color: #47BE62;">
<view class="top">
<view>
物流信息:
</view>
<view>用户名称:&nbsp;&nbsp;{{fuzzyName( goodsDetil.logistics.receiver_name)}}</view>
<view>
通知时间:&nbsp;&nbsp;{{goodsDetil.logistics.create_time}}
</view>
<view class="pro_list">
<text>
商品信息
</text>
<view class="goods">
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="flex: 8;">{{item.goods_name}}</text>
<text style="flex: 2;">X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<view class="mark" style="display: flex; justify-content: space-between;">
<text>请详细核对订单信息</text>
<text style="color: #0122C7;">共计{{goodsDetil.product_count}}件商品</text>
</view>
</view>
<view style="margin-top: 200rpx;height: 1px;">
<!-- 565 -->
</view>
<view class="btn" v-if="!is_captain">
<u-button @click="qrqodeFn" type="primary" style="background-color: #0122C7;border: 0;">
<u-icon name="scan" color="white" size="30" style="margin-right: 10rpx;"></u-icon>
扫码取货</u-button>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getDetil
} from "@/api/logistics.js"
import {
takeGoods
} from "@/api/logistics.js"
export default {
data() {
return {
is_captain: 0,
mapClass: 'custom-map',
showLoading: true,
showPop: false,
goodsDetil: undefined,
scale: 17,
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
//#ifdef APP
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
that.markers[1].latitude = res.latitude
that.markers[1].longitude = res.longitude
that.getDriverLine()
}
});
//#endif
},
//
test() {
if (this.is_captain) return
var packageName = 'com.autonavi.minimap';
var main = plus.android.runtimeMainActivity();
var packageManager = main.getPackageManager();
var PackageManager = plus.android.importClass(packageManager)
var packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
if (packageInfo) {
var Uri = plus.android.importClass("android.net.Uri");
var url =
`amapuri://route/plan?sourceApplication=maxuslife+
&sid=A&slat=36.702558&slon=116.876678&sname=我的位置&did=B&dlat=${this.markers[0].latitude}&dlon=${this.markers[0].longitude}&dname=${this.goodsDetil.logistics.shop_name}&dev=0&t=0`;
var Intent = plus.android.importClass('android.content.Intent');
var intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
var uri = Uri.parse(url);
//SchemeURIdata
intent.setData(uri);
intent.setPackage("com.autonavi.minimap");
var main = plus.android.runtimeMainActivity();
main.startActivity(intent);
} else {
// alert('' + packageName + '')
uni.showToast({
title: `只支持高德地图`,
icon: 'none'
})
}
console.log("唤醒高德线路规划")
},
showToast() {
this.$refs.uToast.show({
type: 'success',
title: '成功主题(带图标)',
message: "操作成功",
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
})
},
mapFun() {
uni.openLocation({
latitude: Number(this.goodsDetil.logistics.shop_lat),
longitude: Number(this.goodsDetil.logistics.shop_long),
address: this.goodsDetil.logistics.shop_address,
name: this.goodsDetil.logistics.shop_name,
scale: 15,
});
},
showToast() {
this.$refs.uToast.show({
type: 'success',
title: '成功主题(带图标)',
message: "操作成功",
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: 30,
}, ];
},
fail: function(res) {
console.log("获取路线失败", res);
},
});
},
qrqodeFn() {
let that = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
that.takeGood(res.result)
}
});
},
// {}
takeGood(sn) {
takeGoods({
logistics_id: this.goodsDetil.logistics.id,
order_id: this.goodsDetil.logistics.order_id,
order_sn: sn
}).then(res => {
this.showToast()
setTimeout(() => {
uni.navigateBack()
}, 1000)
})
},
},
onLoad(options) {
// console.log()
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
getDetil({
logistics_id: 6
}).then(res => {
this.goodsDetil = res.data
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)
})
},
}
</script>
<style lang='scss' scoped>
.custom-map /deep/ .polyline {
stroke-width: 20px;
}
.content {
padding: 2vh 3vw;
background-color: #F6F7FC;
height: 100vh;
box-sizing: border-box;
}
.map {
height: 40vh;
border-radius: 2vw;
overflow: hidden;
}
.map_address {
background-color: white;
padding: 20rpx 10rpx;
.cir {
display: inline-block;
width: 2vw;
height: 4vw;
border-radius: 2vw;
margin: 0 20rpx;
}
}
.map_btn {
width: 50px;
height: 50px;
position: absolute;
bottom: 0px;
right: 0;
z-index: 9999999;
}
.order_info {
border: none;
background-color: #FF7C32;
border-radius: 2vw;
overflow: hidden;
margin-top: 50rpx;
margin-bottom: 30rpx;
color: white;
.top {
padding: 1vw 3vw;
view {
margin: 10rpx 0;
}
}
.mark {
background-color: white;
color: #A8A8A8;
padding: 10rpx 20rpx;
}
.pro_list {
display: flex;
text {
flex: 2
}
.goods {
flex: 8;
margin: 0;
.goods_tit {
margin: 0;
display: flex;
}
}
}
}
.btn {
position: fixed;
bottom: 20rpx;
width: 90vw;
left: 50%;
transform: translateX(-50%);
}
</style>