第二版部分页面改善

This commit is contained in:
THK3121 2023-08-18 16:03:25 +08:00
commit 1b215956fb
147 changed files with 11003 additions and 4240 deletions

68
App.vue
View File

@ -1,32 +1,46 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
try{
if(!this.$store.state.app.token)uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
}catch(e){
uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
// var jpushModule = uni.requireNativePlugin("JG-JPush");
var jpushModule = uni.requireNativePlugin("JG-JPush");
export default {
onLaunch: function() {
console.log('App Launch')
try {
if (!this.$store.state.app.token) uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
} catch (e) {
uni.redirectTo({
url: '/pages/oaLogin/oaLogin'
})
}
// jpushModule.initJPushService()
// const audioContext = uni.createInnerAudioContext()
// audioContext.src = './static/mp3/order.mp3'
// let ida = [0]
// jpushModule.addNotificationListener(function (result) {
// if (!ida.includes(result.messageID)) {
// audioContext.play()
// }
// ida.push(result.messageID)
// })
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@import 'static/css/base.css';
@import 'static/css/style.scss';
/*每个页面公共css */
@import "static/css/base.css";
@import "static/css/style.scss";
view {
box-sizing: border-box;
}
</style>
view {
box-sizing: border-box;
}
</style>

View File

@ -20,6 +20,11 @@ export const userCenter = (data) => oahttp.get('/user/center', data)
*/
export const userInfo = (data) => oahttp.get('/user/info', data)
/**
* 修改密码
*/
export const changePassword = (data) => oahttp.post('/user/changePassword', data)
/**
* 新增人员
*/

View File

@ -5,4 +5,7 @@ import oahttp from "@/utils/oahttp.js";
*/
export const taskLists = (data) => oahttp.get('/task/lists', data)
/**
* 任务:更新档案列表
*/
export const taskInformationgist = (data) => oahttp.get('/task/informationg_list', data)

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,23 @@
<template>
<view class="c_card">
<view class="f_card">
<view class="item" @click="naviTo('/subpkg/topUp/topUp')">
<view class="item" @click="navTo('/subpkg/topUp/topUp')">
<view>公司账户余额()</view>
<view class="price" v-if="company.deposit">{{cCount(company.deposit)}}</view>
<view class="price" v-if="company.deposit">{{cCount(+company.deposit)}}</view>
<view class="price" v-else>0.00</view>
</view>
<view class="item" @click="naviTo('/subpkg/withdrawDeposit/withdrawDeposit')">
<view class="item" @click="navTo('/subpkg/withdrawDeposit/withdrawDeposit')">
<view>公司收益金额()</view>
<view class="price" v-if="company.company_money">{{cCount(company.company_money)}}</view>
<view class="price" v-if="company.company_money">{{cCount(+company.company_money)}}</view>
<view class="price" v-else>0.00</view>
</view>
</view>
<view class="f_nav">
<view class="title">账单流水</view>
<view class="right">
<view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">日账单</view>
<view class="btn" :class="current==1?'active':''" @click="current=1;initLoad()">月账单</view>
<view class="btn" @click="naviTo('/subpkg/companyFinance/companyFinance')">更多</view>
<view class="btn" :class="current==0?'active':''" @click="current=0;initLoad()">日账单</view>
<!-- <view class="btn" :class="current==1?'active':''" @click="current=1;initLoad()">月账单</view> -->
<view class="btn" @click="navTo('/subpkg/companyFinance/companyFinance')">更多</view>
</view>
</view>
<view class="f_list">
@ -28,12 +28,21 @@
<view class="bottom">
<view class="text">
<view class="t_item" v-if="current==0">
<view>任务名称</view>
<view class="t_title">任务名称</view>
<view class="tips">{{item.remark}}</view>
</view>
<view class="t_item">
<view>收益来源</view>
<view class="tips">{{current?item.remark:item.type_desc}}</view>
<view class="t_title">金额归属</view>
<view class="tips"><text v-if="item.userInfo">{{item.userInfo.nickname}}</text></view>
</view>
<view class="t_item">
<view class="t_title">收益来源</view>
<view class="tips">
<!-- {{current?item.remark:item.type_desc}} -->
<text v-if="item.change_type==202" style="color: #46be61;">{{item.type_desc}}</text>
<text v-else-if="item.change_type==203" style="color: #ff7c32;">{{item.type_desc}}</text>
<text v-else="item.change_type==203">{{item.type_desc}}</text>
</view>
</view>
</view>
<view class="price">{{current?(item.expenditure==0?'+'+item.income:'-'+item.income):item.change_amount_desc}}</view>
@ -53,14 +62,17 @@
return {
current: 0,
list: [],
company:{},
company:{
company_money: "0",
deposit: "0"
},
loadConfig:{
page: 1,
limit: 15,
lastpage: '',
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
nomoreText: '没有更多账单了~~',
status: 'loadmore'
},
};
@ -68,11 +80,12 @@
mounted() {
uni.$on('companyInfo', (e)=>{
this.company = e;
console.log(this.company);
this.initLoad();
})
},
methods:{
naviTo(url) {
navTo(url) {
url ?
uni.navigateTo({
url: url,
@ -233,8 +246,9 @@
line-height: 39rpx;
.t_item{
display: flex;
&:nth-child(1){
.t_title{
margin-bottom: 16rpx;
flex-shrink: 0 !important;
}
.tips{
font-size: 28rpx;

View File

@ -14,17 +14,9 @@
<u--input :value="formDataText.village" type="text" disabled disabledColor="#fff" placeholder="请选择村"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item v-if="!formDataRead.brigade" label="小队" :required="!readonly" prop="brigade" borderBottom>
<u-checkbox-group
placement="row"
@change="changeBrigade"
>
<view class="box">
<view class="box_item" v-for="item in brigadeList" :key="item.id">
<u-checkbox style="checkbox" :customStyle="{marginBottom: '12px',marginRight: '12px'}" activeColor="#3175f9" :label="item.brigade_name" :name="item.id"></u-checkbox>
</view>
</view>
</u-checkbox-group>
<u-form-item label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom>
<u--input :value="formDataText.brigade" disabled disabledColor="#fff" placeholder="请选择小队"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</u--form>
<u-picker :show="showProvince" :columns="[changeList()]" :keyName="changeType+'_name'" @confirm="confirm"
@ -161,10 +153,6 @@
this.changeType = type;
this.showProvince = true;
},
//
changeBrigade(e){
this.formData.brigade = e;
},
//
changeList() {
return this[this.changeType + 'List'];

View File

@ -1,20 +1,38 @@
<template>
<view class="card" @click="goDetil(goodsInfo.id)">
<u-button type="primary" class="custom-style" style="background-color: #34A853;"
v-if='goodsInfo.status==0'>待取货</u-button>
<u-button type="primary" class="custom-style" v-if='goodsInfo.status==1'>待送货</u-button>
<view v-if="goodsInfo.status==0">
<p>{{goodsInfo.shop_name}}</p>
<view class="address">地址:&nbsp;&nbsp;{{goodsInfo.shop_address}}</view>
<view class="date">日期:&nbsp;&nbsp;{{goodsInfo.create_time}}</view>
<view class="tit">
<view v-if="goodsInfo.status==0">取货点:&nbsp;&nbsp;{{goodsInfo.shop_name}}</view>
<view v-else>收货人:&nbsp;&nbsp;{{ fuzzyName(goodsInfo.receiver_name) }}</view>
</view>
<view v-if="goodsInfo.status==1">
<p>{{goodsInfo.user_name}}</p>
<view class="address">地址:&nbsp;&nbsp;{{goodsInfo.user_address}}</view>
<!-- <view class="date">日期:&nbsp;&nbsp;{{goodsInfo.create_time}}</view> -->
<view class="content">
<view v-if="goodsInfo.status==0">
<view class="address">店主姓名:&nbsp;&nbsp;{{goodsInfo.shop_user}}</view>
<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}}
</view>
<view class="address">取货地址:&nbsp;&nbsp;{{goodsInfo.shop_address}}</view>
<view class="address">通知日期:&nbsp;&nbsp;{{goodsInfo.create_time}}</view>
</view>
<view v-if="goodsInfo.status==1">
<view class="address" @click.stop="callFn(goodsInfo.receiver_phone)">
联系电话:&nbsp;&nbsp;<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
color="#FF7C32" size="22"></u-icon>{{goodsInfo.receiver_phone}}</view>
<view class="address">收货地址:&nbsp;&nbsp;{{goodsInfo.receiver_address}}</view>
<view class="address">通知日期:&nbsp;&nbsp;{{goodsInfo.qh_time}}</view>
</view>
</view>
<view class="qh_btn" v-if='goodsInfo.status==0'>
<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>
</view>
<view class="" v-if='goodsInfo.status==1'>
<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>
</view>
</view>
</template>
<script>
@ -28,25 +46,30 @@
}
},
mounted() {
// console.log(this.goodsInfo)
// console.log(6666)
},
methods: {
fuzzyName(name) {
let length = name.length;
let fuzzyChars = "*".repeat(length - 1);
return name[0] + fuzzyChars;
},
callFn(num) {
uni.makePhoneCall({
phoneNumber: num //
});
// console.log(9999)
},
goDetil(id) {
uni.navigateTo({
// url: `/pages/logistics/deliveryDetil?id=${id}`,
// deliveryDetil
url: `/pages/logistics/${this.goodsInfo.status==1?"logisticDetil":"deliveryDetil"}?id=${id}`,
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
@ -55,29 +78,27 @@
width: 92vw;
height: AUTO;
background-color: #fff;
border-radius: 1vw;
position: relative;
padding: 2vh 2vw;
margin: 0 0 20rpx 0;
overflow: hidden;
border-radius: 2vw;
box-sizing: border-box;
margin-bottom: 30rpx;
.custom-style {
border: 0;
width: 20vw;
position: absolute;
top: 0;
right: 0;
height: 4vh;
border-radius: 0 7px 0 7px;
.tit {
border-bottom: 3px solid #F5F5F5;
font-size: 30rpx;
font-weight: bold;
padding: 20rpx 15rpx;
}
P {
font-size: 32rpx;
font-weight: bold;
}
.content {
padding: 20rpx 15rpx;
.address {
font-weight: bold;
margin: 15rpx 0;
.address {
margin: 10rpx 0;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
}
}
}

View File

@ -1,84 +1,233 @@
<template>
<view class="order">
<view>
<view>
<view class="order">
<p class="tit" v-if="goodsInfo.status==0" style="background-color: #0122C7;">
商户姓名:&nbsp;&nbsp;{{goodsInfo.shop_name}}
</p>
<p class="tit" v-if="goodsInfo.status==1" style="background-color: #FF7C32;">
收货人姓名:&nbsp;&nbsp;{{ fuzzyName(goodsInfo.receiver_name) }}</p>
<p class="tit" v-if="goodsInfo.status==2" style="background-color: #47BE62;">
收货人姓名:&nbsp;&nbsp;{{fuzzyName(goodsInfo.receiver_name)}}</p>
<view class="contents">
<!-- 已取货 -->
<view class="left" v-if='goodsInfo.status==0'>
<view style="margin: 0;padding: 0;" @click="goDetil">
<view class="list">
<text>
店主姓名
</text>
<view>
{{goodsInfo.shop_user ||'暂无'}}
</view>
</view>
<view class="list">
<text>
联系方式
</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}}
</view>
</view>
<view class="list">
<text>
商家地址
</text>
<view>
<view class="address">
{{goodsInfo.shop_address}}
</view>
</view>
</view>
<view class="list">
<text>
订单编号
</text>
<view>
<view class="address">
{{goodsInfo.order_sn}}
</view>
</view>
</view>
<view class="hr">
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsInfo.products">
<text class="goods_detil">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
<!-- <u-notify message="成功" duration="2000" show="true"></u-notify> -->
<view v-if='goodsInfo.status !==2'>
<view class="" @click="goDetil">
<p v-if="goodsInfo.status==0">{{goodsInfo.shop_name}}</p>
<p v-else>{{goodsInfo.user_name}}</p>
<view class='phone' v-if="goodsInfo.status==0">联系方式 :{{goodsInfo.shop_phone}} </view>
<view class='phone' v-else>联系方式 :{{goodsInfo.user_phone}} </view>
<view class="content_box">
<view class="left">
<view v-if="goodsInfo.status==0">
商家地址
</view>
<view v-if="goodsInfo.status==1">
用户地址
</view>
<view style="margin: 20rpx 0;">
订单编号
</view>
<view class="">
采购商品
<view class="total">
共计{{goodsInfo.product_count}}件商品
</view>
<u-button type="primary" @click="qrqodeFn" 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>
<view class="right">
<view class="goods_tit" v-if="goodsInfo.status==0">
{{goodsInfo.shop_address}}
<!-- 已送达 -->
<view v-if="goodsInfo.status==1" class="left">
<view style="margin: 0;padding:0" @click="goDetil">
<view class="list">
<text>
收货地址
</text>
<view>
<view class="address">
{{goodsInfo.receiver_address}}
</view>
</view>
</view>
<view class="list">
<text>
订单编号
</text>
<view>
{{goodsInfo.order_sn}}
</view>
</view>
<view class="hr">
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsInfo.products">
<text class="goods_detil">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<view class="goods_tit" v-else>
{{goodsInfo.user_address}}
<view class="list">
<text>
联系电话
</text>
<view @click.stop="callFn(goodsInfo.receiver_phone)">
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone" color="#FF7C32"
size="22"></u-icon> {{goodsInfo.receiver_phone}}
</view>
</view>
<view style="margin: 20rpx 0;">
{{goodsInfo.order_sn}}
</view>
<view class='product' v-for="(item,index) in goodsInfo.products" :key="index">
<text class="goods_tit">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
<view class="total">
共计{{goodsInfo.product_count}}件商品
</view>
<u-button type="primary" @click="showPop = true"
style="background-color: #FF7C32; border: 0;"><u-icon name="car-fill" color="white"
size="25" style="margin-right: 10rpx;"></u-icon> 货物送达</u-button>
</view>
<!-- 详情 -->
<view class="left" @click="goDetil" v-if='goodsInfo.status==2'>
<view style="margin: 0;padding:0">
<view class="list">
<text>
联系电话
</text>
<view @click.stop="callFn(goodsInfo.receiver_phone)">
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone"
color="#47BE62" size="22"></u-icon> {{goodsInfo.receiver_phone}}
</view>
</view>
<view class="list">
<text>
用户地址
</text>
<view>
<view class="address">
{{goodsInfo.receiver_address}}
</view>
</view>
</view>
<view class="list">
<text>
取货时间
</text>
<view>
{{goodsInfo.qh_time}}
</view>
</view>
<view class="list">
<text>
送达时间
</text>
<view>
{{goodsInfo.ps_time}}
</view>
</view>
<view class="hr">
</view>
<!-- ' <view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsInfo.products">
<text class="goods_detil">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
' -->
</view>
<view class="total">
共计{{goodsInfo.product_count}}件商品
</view>
<u-button type="primary" class="custom-style" style="background-color: #47BE62;border: 0;">
<u-icon name="eye-fill" color="white" size="25" style="margin-right: 10rpx;"></u-icon>
查看详情</u-button>
</view>
</view>
</view>
<!-- <view class="icon" @click='getMore' v-if="flag">
<image style="width: 70rpx;height: 70rpx;text-align: center;" src="@/static/img/logistics/more.png"
alt="">
</view> -->
</view>
<view v-else class='finishOrder' @click="goDetil">
<view>
<text style="color:#999">订单编号</text> <text> {{goodsInfo.order_sn}}</text>
</view>
<view class="phone">
<text style="color:#999">联系方式</text> {{goodsInfo.user_phone}}
</view>
<view style="margin: 20rpx 0;">
<text style="color:#999">收货时间</text> {{goodsInfo.xd_time||"暂未收货"}}
</view>
<view style="margin: 20rpx 0;">
<text style="color:#999">送达时间</text> {{goodsInfo.pc_time||"暂未送达"}}
</view>
<view style="margin: 20rpx 0;">
<text style="color:#999">取货时间</text> {{goodsInfo.qh_time||"暂未取货"}}
</view>
</view>
<view class="total">
共计{{goodsInfo.product_count}}件商品
</view>
<view class="cil_left">
</view>
<view class="cil_right">
</view>
<u-modal :show="showPop" @confirm="confirm" :content="popContent[goodsInfo.status]" @close="showPop=false"
:closeOnClickOverlay="true"></u-modal>
<u-button type="primary" @click="showPop = true" v-if='goodsInfo.status==0'>已取货</u-button>
<u-button type="primary" @click="showPop = true" style="background-color: #34A853;border: none;"
v-if='goodsInfo.status==1'>已送达</u-button>
<u-button type="primary" @click="goDetil" style="background-color: red;border:none"
v-if='goodsInfo.status==2'>查看详情</u-button>
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" title="请输入收件码" :closeOnClickOverlay="true">
<view class="slot-content">
<u--input placeholder="请输入收件码" type="number" border="surround" v-model="take_code"></u--input>
</view>
</u-modal>
</view>
@ -93,39 +242,60 @@
props: ['goodsInfo'],
data() {
return {
list: [],
flag: undefined,
showPop: false,
popContent: ["请确认已经收到货", "请确认已送达"]
take_code: "",
}
},
methods: {
fuzzyName(name) {
let length = name.length;
let fuzzyChars = "*".repeat(length - 1);
return name[0] + fuzzyChars;
},
goDetil() {
let status = this.goodsInfo.status
uni.navigateTo({
url: `/pages/logistics/${status==0?"deliveryDetil":"logisticDetil"}?id=${this.goodsInfo.id}`
})
},
callFn(num) {
uni.makePhoneCall({
phoneNumber: num
});
// console.log(9999)
},
test() {
this.showMore()
this.getMore()
//
qrqodeFn() {
let that = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
that.takeGood(res.result)
}
});
},
// {}
takeGood() {
takeGood(sn) {
takeGoods({
user_id: this.goodsInfo.courier_id,
logistics_id: this.goodsInfo.id
logistics_id: this.goodsInfo.id,
order_id: this.goodsInfo.order_id,
order_sn: sn
}).then(res => {
this.$emit('showTost')
this.$emit('getlist')
})
},
async confirm() {
await this.goodsInfo.status == 0 ? this.takeGood() : this.doneGood()
confirm() {
if (!this.take_code) {
return
}
this.doneGood()
this.showPop = false
this.showMore()
@ -133,41 +303,17 @@
//
doneGood() {
doneDelivery({
user_id: this.goodsInfo.courier_id,
// user_id: 167,
take_code: this.take_code,
logistics_id: this.goodsInfo.id
}).then(res => {
this.$emit('showTost')
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
}
}
</script>
@ -175,107 +321,107 @@
.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; */
.goods_tit {
width: 60vw;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
}
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;
.list {
margin: 10rpx 0;
}
.hr {
border-bottom: 1px dashed #0122C7;
margin: 20rpx 0;
}
}
.content_box {
.left {
.list {
display: flex;
.norow {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
view {
flex: 8;
view {
margin-bottom: 10rpx;
}
}
text {
flex: 2;
}
}
}
.pro_list {
display: flex;
justify-content: space-between;
margin: 15rpx 0;
.left {
flex: 1;
color: #999999;
text {
margin-right: 20rpx;
}
.right {
flex: 4;
.product {
margin: 10rpx 0;
display: flex;
justify-content: space-between;
}
.icon_a {
/* transform: translateX(180deg); */
transform: rotate(90deg);
display: inline-block;
/* font-family: ; */
}
}
}
.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;
}
.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;
}
.finishOrder {

View File

@ -151,7 +151,6 @@
</u-form-item>
</block>
</u--form>
</view>
</template>

View File

@ -3,27 +3,31 @@
<u-sticky bgColor="#f5f5f5" offsetTop="44px">
<!-- <u-tabs :list="tabLists" @click="changeCurrent" lineColor='#3274F9' :scrollable="false"
inactiveStyle='color:#666' activeStyle="color:#3274F9"></u-tabs> -->
<uni-segmented-control :current="current" :values="['全部','已完成', '未完成']" styleType="text" @clickItem="changeCurrent" activeColor="#3274F9"></uni-segmented-control>
<uni-segmented-control :current="current" :values="['全部','已完成']" styleType="text"
@clickItem="changeCurrent" activeColor="#3274F9"></uni-segmented-control>
</u-sticky>
<view class="c_task_index_list">
<view v-for="item in 10" @click="naviTo('/subpkg/dispatching/dispatching')" :key="item">
<taskItem></taskItem>
<view v-for="item in list" :key="item.id">
<taskItem :datas="item"></taskItem>
</view>
</view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
<!-- <u-empty v-else icon="/static/img/empty/data.png" text="没有数据"></u-empty> -->
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
<!-- <u-empty icon="/static/img/empty/data.png" text="没有数据"></u-empty> -->
</view>
</template>
<script>
import { Toast } from "../../libs/uniApi";
import taskItem from "./taskItem.vue"
import taskItem from "./taskItem.vue";
import { taskLists } from "@/api/task.js";
export default {
name: "task",
components: { taskItem },
data() {
return {
current: 0,
status: 0,
// tabLists: [{
// name: '',
// }, {
@ -33,8 +37,7 @@
// }],
loadConfig: {
page: 1,
limit: 15,
lastpage: '',
limit: 25,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
@ -43,17 +46,53 @@
list: []
};
},
created() {
this.initLoadConfig();
},
methods: {
naviTo(url) {
navTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
changeCurrent(e) {
if(this.current!==e.currentIndex){
this.current = e.currentIndex;
if (this.current !== e.currentIndex) {
this.current = +e.currentIndex;
switch (this.current) {
case 1:
this.status = 3;
break;
case 2:
this.status = 5;
break;
default:
this.status = 0;
}
this.initLoadConfig();
}
},
initLoadConfig() {
this.loadConfig.page = 1;
this.loadConfig.status = 'loadmore';
this.list = [];
this.loadList();
},
async loadList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading";
let res = await taskLists({
page: this.loadConfig.page,
status: this.status,
limit: this.loadConfig.limit
});
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data];
}
}
}

View File

@ -15,8 +15,19 @@
<view class="b_right">
<view class="item">
<view class="left">
<view>任务进度:</view>
<view class="text">30%</view>
<view>任务状态:</view>
<view class="text">
<text v-if="datas.status==2||datas.status==1" style="color: #ff7c32;">
<block v-if="(datas.type==31||datas.type==32||datas.type==33)">
<block v-if="datas.extend&&datas.extend.informationg">{{(datas.extend.informationg.update?datas.extend.informationg.update:0)+'/'+(datas.extend.informationg.count?datas.extend.informationg.count:0)}}</block>
<block v-else-if="datas.extend&&datas.extend.transaction&&datas.extend.transaction.arr">{{(datas.extend.transaction.arr.total_price?datas.extend.transaction.arr.total_price:0)+'元/'+(datas.extend.transaction.arr.day_money?datas.extend.transaction.arr.day_money:0)+'元'}}</block>
<block v-else>进行中</block>
</block>
<block v-else>进行中</block>
</text>
<text v-if="datas.status==3" style="color: #46be61;">已完成</text>
<text v-if="datas.status==5">已关闭</text>
</view>
</view>
<view class="right">{{datas.money||'0.00'}}<text class="price"></text></view>
</view>
@ -35,6 +46,7 @@
</template>
<script>
import { Toast } from '../../libs/uniApi';
export default {
name: "task",
props: {
@ -51,17 +63,21 @@
};
},
methods:{
naviTo(url) {
navTo(url) {
url ?
uni.navigateTo({
url: url,
}) : Toast('暂未开放')
},
clickTask(){
console.log('点击');
if(this.$props.datas.type==1){
this.naviTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
}else this.naviTo('');
// console.log('', this.$props.datas);
if((this.$props.datas.type!=31)&&this.$props.datas.status!==2&&this.$props.datas.status!==1){
return this.$props.datas.status==3?Toast('任务已完成!'):Toast('任务已结束!');
}
if(this.$props.datas.type==31){
// 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('');
}
}
}

19
main.js
View File

@ -7,6 +7,7 @@ import uView from '@/uni_modules/uview-ui'
import taskCard from "@/components/taskCard/taskCard.vue"
import mybtn from "@/components/mybtn/mybtn.vue"
import company from "@/components/company/company.vue"
Vue.use(uView)
Vue.use(taskCard)
Vue.use(mybtn)
@ -19,18 +20,20 @@ import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App,
store
...App,
store
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import {
createSSRApp
} from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
const app = createSSRApp(App)
return {
app
}
}
// #endif
// #endif

View File

@ -1,160 +1,160 @@
{
"name" : "供销综合平台",
"appid" : "__UNI__B5B1EDD",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {
"Payment" : {},
"Barcode" : {},
"Camera" : {},
"Maps" : {}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx4789d9f1b50390ba",
"UniversalLinks" : ""
}
},
"ad" : {},
"maps" : {
"amap" : {
"appkey_ios" : "0799f37420c0784f1e6cba230a68bdb1",
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
}
}
},
"splashscreen" : {
"useOriginalMsgbox" : true
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp" : {},
"h5" : {
"devServer" : {
"proxy" : {
"baseUrlTest/adminapi" : {
"target" : "https://worker-task.lihaink.cn",
"changeOrigin" : true,
"pathRewrite" : {
"^/baseUrlTest/adminapi" : "/adminapi"
}
},
"baseUrlTest/api" : {
"target" : "https://worker-task.lihaink.cn",
"changeOrigin" : true,
"pathRewrite" : {
"^/baseUrlTest/api" : "/api"
}
}
}
},
"sdkConfigs" : {
"maps" : {
"amap" : {
"key" : "275cd3601b1b2d6414f6c988e7911664",
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
"serviceHost" : ""
}
}
}
},
/* */
"mp-weixin" : {
"appid" : "wx6e14cb98394e36bc",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
"name": "供销综合平台",
"appid": "__UNI__B5B1EDD",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules": {
"Payment": {},
"Barcode": {},
"Camera": {},
"Maps": {}
},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios": {
"dSYMs": false
},
/* SDK */
"sdkConfigs": {
"payment": {
"weixin": {
"__platform__": ["ios", "android"],
"appid": "wx4789d9f1b50390ba",
"UniversalLinks": ""
}
},
"ad": {},
"maps": {
"amap": {
"appkey_ios": "0799f37420c0784f1e6cba230a68bdb1",
"appkey_android": "0799f37420c0784f1e6cba230a68bdb1"
}
}
},
"splashscreen": {
"useOriginalMsgbox": true
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp": {},
"h5": {
"devServer": {
"proxy": {
"baseUrlTest/adminapi": {
"target": "https://worker-task.lihaink.cn",
"changeOrigin": true,
"pathRewrite": {
"^/baseUrlTest/adminapi": "/adminapi"
}
},
"baseUrlTest/api": {
"target": "https://worker-task.lihaink.cn",
"changeOrigin": true,
"pathRewrite": {
"^/baseUrlTest/api": "/api"
}
}
}
},
"sdkConfigs": {
"maps": {
"amap": {
"key": "275cd3601b1b2d6414f6c988e7911664",
"securityJsCode": "d2d7c56801819e8bdf71b8a71846f235",
"serviceHost": ""
}
}
}
},
/* */
"mp-weixin": {
"appid": "wx6e14cb98394e36bc",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "2"
}

Binary file not shown.

View File

@ -0,0 +1,27 @@
//
// JGInforCollectionAuth.h
// JCore
//
// Created by 豆瓣 on 2021/10/27.
// Copyright © 2021 jiguang. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 合规接口,是否授权极光采集一定的设备信息
@interface JGInforCollectionAuthItems : NSObject
/// 是否授权默认YES
@property(nonatomic,assign)BOOL isAuth;
@end
@interface JGInforCollectionAuth : NSObject
/// 设备信息采集授权接口(合规接口)
/// 请务必在调用初始化、功能性接口前调用此接口进行合规授权
/// @param authBlock auth:YES 则极光认为您同意极光采集一定的设备信息
+(void)JCollectionAuth:(void(^_Nullable)(JGInforCollectionAuthItems *authInfo))authBlock;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,17 @@
//
// JCoreModule.h
// UniPluginJCore
//
// Created by huangshuni on 2021/1/21.
//
#import <Foundation/Foundation.h>
#import "DCUniModule.h"
NS_ASSUME_NONNULL_BEGIN
@interface JCoreModule : DCUniModule
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/JCoreModule.h</key>
<data>
4aMcBALZuuQeh2JQjJqqvSkc2mA=
</data>
<key>Info.plist</key>
<data>
06+wBVr403G+lX5fr/4efqHMj2A=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/JCoreModule.h</key>
<dict>
<key>hash</key>
<data>
4aMcBALZuuQeh2JQjJqqvSkc2mA=
</data>
<key>hash2</key>
<data>
h/0w2CaU3JBhKI3Pp4EiSWqLf/ZY1Ju+5+tBAdowZ5k=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

Binary file not shown.

View File

@ -0,0 +1,61 @@
{
"name": "JG-JCore",
"id": "JG-JCore",
"version": "1.1.4",
"description": "极光推送JCore插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"ios": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "JCoreModule"
}
],
"integrateType": "framework",
"deploymentTarget": "11.0",
"validArchitectures": [
"arm64"
],
"parameters": {
"JPUSH_APPKEY_IOS": {
"des": "[iOS]极光portal配置应用信息时分配的AppKey",
"key": "JCore:APP_KEY"
},
"JPUSH_CHANNEL_IOS": {
"des": "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key": "JCore:CHANNEL"
}
}
},
"android": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "cn.jiguang.uniplugin_jcore.JCoreModule"
}
],
"integrateType": "aar",
"minSdkVersion": "19",
"permissions": [
],
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"parameters": {
"JPUSH_APPKEY_ANDROID": {
"des": "[Android]极光portal配置应用信息时分配的AppKey",
"key": "JPUSH_APPKEY"
},
"JPUSH_CHANNEL_ANDROID":{
"des": "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key": "JPUSH_CHANNEL"
}
}
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,939 @@
/*
* | | | | \ \ / / | | | | / _______|
* | |____| | \ \/ / | |____| | / /
* | |____| | \ / | |____| | | | _____
* | | | | / \ | | | | | | |____ |
* | | | | / /\ \ | | | | \ \______| |
* | | | | /_/ \_\ | | | | \_________|
*
* Copyright (c) 2011 ~ 2017 Shenzhen HXHG. All rights reserved.
*/
#define JPUSH_VERSION_NUMBER 5.0.0
#import <Foundation/Foundation.h>
@class CLRegion;
@class UILocalNotification;
@class CLLocation;
@class UNNotificationCategory;
@class UNNotificationSettings;
@class UNNotificationRequest;
@class UNNotification;
@class UIView;
@protocol JPUSHRegisterDelegate;
@protocol JPUSHGeofenceDelegate;
@protocol JPUSHNotiInMessageDelegate;
@protocol JPUSHInAppMessageDelegate;
typedef void (^JPUSHTagsOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq);
typedef void (^JPUSHTagValidOperationCompletion)(NSInteger iResCode, NSSet *iTags, NSInteger seq, BOOL isBind);
typedef void (^JPUSHAliasOperationCompletion)(NSInteger iResCode, NSString *iAlias, NSInteger seq);
typedef void (^JPUSHPropertiesOperationCompletion)(NSInteger iResCode, NSDictionary *properties, NSInteger seq);
typedef void (^JPUSHLiveActivityTokenCompletion)(NSInteger iResCode, NSString *iLiveActivityId, NSData *pushToken, NSInteger seq);
extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中
extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接
extern NSString *const kJPFNetworkDidCloseNotification; // 关闭连接
extern NSString *const kJPFNetworkDidRegisterNotification; // 注册成功
extern NSString *const kJPFNetworkFailedRegisterNotification; //注册失败
extern NSString *const kJPFNetworkDidLoginNotification; // 登录成功
extern NSString *const kJPFNetworkDidReceiveMessageNotification; // 收到消息(非APNS)
extern NSString *const kJPFServiceErrorNotification; // 错误提示
typedef NS_OPTIONS(NSUInteger, JPAuthorizationOptions) {
JPAuthorizationOptionNone = 0, // the application may not present any UI upon a notification being received
JPAuthorizationOptionBadge = (1 << 0), // the application may badge its icon upon a notification being received
JPAuthorizationOptionSound = (1 << 1), // the application may play a sound upon a notification being received
JPAuthorizationOptionAlert = (1 << 2), // the application may display an alert upon a notification being received
JPAuthorizationOptionCarPlay = (1 << 3), // The ability to display notifications in a CarPlay environment.
JPAuthorizationOptionCriticalAlert NS_AVAILABLE_IOS(12.0) = (1 << 4) , //The ability to play sounds for critical alerts.
JPAuthorizationOptionProvidesAppNotificationSettings NS_AVAILABLE_IOS(12.0) = (1 << 5) , //An option indicating the system should display a button for in-app notification settings.
JPAuthorizationOptionProvisional NS_AVAILABLE_IOS(12.0) = (1 << 6) , //The ability to post noninterrupting notifications provisionally to the Notification Center.
JPAuthorizationOptionAnnouncement NS_AVAILABLE_IOS(13.0) = (1 << 7) , //The ability for Siri to automatically read out messages over AirPods.
};
typedef NS_ENUM(NSUInteger, JPAuthorizationStatus) {
JPAuthorizationNotDetermined = 0, // The user has not yet made a choice regarding whether the application may post user notifications.
JPAuthorizationStatusDenied, // The application is not authorized to post user notifications.
JPAuthorizationStatusAuthorized, // The application is authorized to post user notifications.
JPAuthorizationStatusProvisional NS_AVAILABLE_IOS(12.0), // The application is authorized to post non-interruptive user notifications.
};
/*!
*
*/
@interface JPUSHRegisterEntity : NSObject
/*!
*
* badge,sound,alert
*/
@property (nonatomic, assign) NSInteger types;
/*!
*
* iOS10 UNNotificationCategory
* iOS8-iOS9 UIUserNotificationCategory
*/
@property (nonatomic, strong) NSSet *categories;
@end
/*!
*
*/
@interface JPushNotificationIdentifier : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSArray<NSString *> *identifiers; // 推送的标识数组
@property (nonatomic, copy) UILocalNotification *notificationObj NS_DEPRECATED_IOS(4_0, 10_0); // iOS10以下可以传UILocalNotification对象数据iOS10以上无效
@property (nonatomic, assign) BOOL delivered NS_AVAILABLE_IOS(10_0); // 在通知中心显示的或待推送的标志默认为NOYES表示在通知中心显示的NO表示待推送的
@property (nonatomic, copy) void (^findCompletionHandler)(NSArray *results); // 用于查询回调,调用[findNotification:]方法前必须设置results为返回相应对象数组iOS10以下返回UILocalNotification对象数组iOS10以上根据delivered传入值返回UNNotification或UNNotificationRequest对象数组delivered传入YES则返回UNNotification对象数组否则返回UNNotificationRequest对象数组
@end
/*!
*
* iOS10以上有效
*/
@interface JPushNotificationSound : NSObject <NSCopying, NSCoding>
@property (nonatomic, copy) NSString *soundName; //普通通知铃声
@property (nonatomic, copy) NSString *criticalSoundName NS_AVAILABLE_IOS(12.0); //警告通知铃声
@property (nonatomic, assign) float criticalSoundVolume NS_AVAILABLE_IOS(12.0); //警告通知铃声音量有效值在0~1之间默认为1
@end
/*!
*
*/
@interface JPushNotificationContent : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSString *title; // 推送标题
@property (nonatomic, copy) NSString *subtitle; // 推送副标题
@property (nonatomic, copy) NSString *body; // 推送内容
@property (nonatomic, copy) NSNumber *badge; // 角标的数字。如果不需要改变角标传@(-1)
@property (nonatomic, copy) NSString *action NS_DEPRECATED_IOS(8_0, 10_0); // 弹框的按钮显示的内容IOS 8默认为"打开", 其他默认为"启动",iOS10以上无效
@property (nonatomic, copy) NSString *categoryIdentifier; // 行为分类标识
@property (nonatomic, copy) NSDictionary *userInfo; // 本地推送时可以设置userInfo来增加附加信息远程推送时设置的payload推送内容作为此userInfo
@property (nonatomic, copy) NSString *sound; // 声音名称,不设置则为默认声音
@property (nonatomic, copy) JPushNotificationSound *soundSetting NS_AVAILABLE_IOS(10.0); //推送声音实体
@property (nonatomic, copy) NSArray *attachments NS_AVAILABLE_IOS(10_0); // 附件iOS10以上有效需要传入UNNotificationAttachment对象数组类型
@property (nonatomic, copy) NSString *threadIdentifier NS_AVAILABLE_IOS(10_0); // 线程或与推送请求相关对话的标识iOS10以上有效可用来对推送进行分组
@property (nonatomic, copy) NSString *launchImageName NS_AVAILABLE_IOS(10_0); // 启动图片名iOS10以上有效从推送启动时将会用到
@property (nonatomic, copy) NSString *summaryArgument NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的部分参数。iOS12以上有效。
@property (nonatomic, assign) NSUInteger summaryArgumentCount NS_AVAILABLE_IOS(12.0); //插入到通知摘要中的项目数。iOS12以上有效。
@property (nonatomic, copy) NSString *targetContentIdentifier NS_AVAILABLE_IOS(13.0); // An identifier for the content of the notification used by the system to customize the scene to be activated when tapping on a notification.
//iOS15以上的新增属性 interruptionLevel为枚举UNNotificationInterruptionLevel
// The interruption level determines the degree of interruption associated with the notification
@property (nonatomic, assign) NSUInteger interruptionLevel NS_AVAILABLE_IOS(15.0);
// Relevance score determines the sorting for the notification across app notifications. The expected range is between 0.0f and 1.0f.
@property (nonatomic, assign) double relevanceScore NS_AVAILABLE_IOS(15.0);
// iOS16以上的新增属性
@property (nonatomic, copy) NSString *filterCriteria NS_AVAILABLE_IOS(16.0); // default nil
@end
/*!
*
* dateComponentstimeIntervalregion在iOS10以上可选择其中一个参数传入有效值IIIIII使其中一种触发方式生效fireDate为iOS10以下根据时间触发时须传入的参数
*/
@interface JPushNotificationTrigger : NSObject<NSCopying, NSCoding>
@property (nonatomic, assign) BOOL repeat; // 设置是否重复默认为NO
@property (nonatomic, copy) NSDate *fireDate NS_DEPRECATED_IOS(2_0, 10_0); // 用来设置触发推送的时间iOS10以上无效
@property (nonatomic, copy) CLRegion *region NS_AVAILABLE_IOS(8_0); // 用来设置触发推送的位置iOS8以上有效iOS10以上优先级为I应用需要有允许使用定位的授权
@property (nonatomic, copy) NSDateComponents *dateComponents NS_AVAILABLE_IOS(10_0); // 用来设置触发推送的日期时间iOS10以上有效优先级为II
@property (nonatomic, assign) NSTimeInterval timeInterval NS_AVAILABLE_IOS(10_0); // 用来设置触发推送的时间iOS10以上有效优先级为III
@end
/*!
*
*/
@interface JPushNotificationRequest : NSObject<NSCopying, NSCoding>
@property (nonatomic, copy) NSString *requestIdentifier; // 推送请求标识
@property (nonatomic, copy) JPushNotificationContent *content; // 设置推送的具体内容
@property (nonatomic, copy) JPushNotificationTrigger *trigger; // 设置推送的触发方式
@property (nonatomic, copy) void (^completionHandler)(id result); // 注册或更新推送成功回调iOS10以上成功则result为UNNotificationRequest对象失败则result为nil;iOS10以下成功result为UILocalNotification对象失败则result为nil
@end
/*!
*
*/
@interface JPushInAppMessage : NSObject
@property (nonatomic, copy) NSString *mesageId; // 消息id
@property (nonatomic, copy) NSString *title; // 标题
@property (nonatomic, copy) NSString *content; // 内容
@property (nonatomic, strong) NSArray *target; // 目标页面
@property (nonatomic, copy) NSString *clickAction; // 跳转地址
@property (nonatomic, strong) NSDictionary *extras; // 附加字段
@end
/*!
* JPush
*/
@interface JPUSHService : NSObject
///----------------------------------------------------
/// @name Setup 启动相关
///----------------------------------------------------
/*!
* @abstract SDK
*
* @param launchingOption .
* @param appKey JPush ,. JPush .
* @param channel . .
* @param isProduction . , NO; , YES.
* App profile provision的配置.
*
* @discussion SDK启动必须的参数, SDK.
* App , JPush SDK .
*/
+ (void)setupWithOption:(NSDictionary *)launchingOption
appKey:(NSString *)appKey
channel:(NSString *)channel
apsForProduction:(BOOL)isProduction;
/*!
* @abstract SDK
*
* @param launchingOption .
* @param appKey JPush ,. JPush .
* @param channel . .
* @param isProduction . , NO; , YES.
* App profile provision的配置.
* @param advertisingId 广IDFA 使IDFAnil.
*
* @discussion SDK启动必须的参数, SDK.
* App , JPush SDK .
*/
+ (void)setupWithOption:(NSDictionary *)launchingOption
appKey:(NSString *)appKey
channel:(NSString *)channel
apsForProduction:(BOOL)isProduction
advertisingIdentifier:(NSString *)advertisingId;
///----------------------------------------------------
/// @name APNs about 通知相关
///----------------------------------------------------
/*!
* @abstract
*
* @param types
* @param categories
*
*/
+ (void)registerForRemoteNotificationTypes:(NSUInteger)types
categories:(NSSet *)categories;
/*!
* @abstract iOS10
*
* @param config
* @param delegate
*
*/
+ (void)registerForRemoteNotificationConfig:(JPUSHRegisterEntity *)config delegate:(id<JPUSHRegisterDelegate>)delegate;
+ (void)registerDeviceToken:(NSData *)deviceToken;
/*!
* @abstract liveActivity并上报其pushToken
* pushToken有变化的时候同步调用该接口
* liveActivity结束的时候pushToken传nil
*
* @param liveActivityId liveActivity
* @param pushToken liveActivity的pushTokenpushToken
* @param completion
* @param seq
*/
+ (void)registerLiveActivity:(NSString *)liveActivityId
pushToken:(NSData * _Nullable)pushToken
completion:(JPUSHLiveActivityTokenCompletion _Nullable )completion
seq:(NSInteger)seq;
/*!
* @abstract APNs
*/
+ (void)handleRemoteNotification:(NSDictionary *)remoteInfo;
/*!
* @abstract Token
*
* @param voipToken 使Voip Token
*/
+ (void)registerVoipToken:(NSData *)voipToken;
/*!
* @abstract Voip
*
* @param remoteInfo Voip
*/
+ (void)handleVoipNotification:(NSDictionary *)remoteInfo;
/*!
* @abstract
* @param completion status值返回JPAuthorizationStatus
*/
+ (void)requestNotificationAuthorization:(void (^)(JPAuthorizationStatus status))completion;
/*!
* @abstract iOS8及以上有效
*/
+ (void)openSettingsForNotification:(void (^)(BOOL success))completionHandler NS_AVAILABLE_IOS(8_0);
/*!
* Tags操作接口
* ////
* https://docs.jiguang.cn/jpush/client/iOS/ios_api/
*/
/**
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)addTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)setTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param tags tags集合
@param completion
@param seq
*/
+ (void)deleteTags:(NSSet<NSString *> *)tags
completion:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param completion
@param seq
*/
+ (void)cleanTags:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tags
@param completion
@param seq
*/
+ (void)getAllTags:(JPUSHTagsOperationCompletion)completion
seq:(NSInteger)seq;
/**
tag是否绑定
@param completion
@param seq
*/
+ (void)validTag:(NSString *)tag
completion:(JPUSHTagValidOperationCompletion)completion
seq:(NSInteger)seq;
/**
Alias
@param alias alias
@param completion
@param seq
*/
+ (void)setAlias:(NSString *)alias
completion:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/**
alias
@param completion
@param seq
*/
+ (void)deleteAlias:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/**
alias
@param completion
@param seq
*/
+ (void)getAlias:(JPUSHAliasOperationCompletion)completion
seq:(NSInteger)seq;
/*!
* @abstract tags
*
* @discussion tags , tags.
* tags . SDK .
*/
+ (NSSet *)filterValidTags:(NSSet *)tags;
/*!
* Property操作接口
* //
* https://docs.jiguang.cn/jpush/client/iOS/ios_api/
*/
/**
/
@param properties NSDictionary
Key NSString Value为用户属性值 NSStringNSNumberNSDate类型BOOL类型NSNumber类型
@param completion
@param seq
*/
+ (void)setProperties:(NSDictionary *)properties
completion:(JPUSHPropertiesOperationCompletion)completion
seq:(NSInteger)seq;
/**
@param keys
@param completion
@param seq
*/
+ (void)deleteProperties:(NSSet<NSString *> *)keys
completion:(JPUSHPropertiesOperationCompletion)completion
seq:(NSInteger)seq;
/**
@param completion
@param seq
*/
+ (void)cleanProperties:(JPUSHPropertiesOperationCompletion)completion
seq:(NSInteger)seq;
/*!
*
* 使
*/
/**
+ (void)pageLeave:(NSString *)pageName; 使
@param pageName
@discussion 使pageEnterTo:pageLeave:
*/
+ (void)pageEnterTo:(NSString *)pageName;
/**
+ (void)pageEnterTo:(NSString *)pageName;使
@param pageName
@discussion 使pageEnterTo:pageLeave:
*/
+ (void)pageLeave:(NSString *)pageName;
/*!
* @abstract
*
* @discussion JPUSHInAppMessageDelegate的代理对象
*
*/
+ (void)setInAppMessageDelegate:(id<JPUSHInAppMessageDelegate>)inAppMessageDelegate;
///----------------------------------------------------
/// @name Stats 统计功能
///----------------------------------------------------
/*!
* @abstract
*
* @param pageName
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)startLogPageView:(NSString *)pageName __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract
*
* @param pageName
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)stopLogPageView:(NSString *)pageName __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract
*
* @param pageName
* @param seconds
* @discussion JCore 1.1.8 使 JAnalytics
*/
+ (void)beginLogPageView:(NSString *)pageName duration:(int)seconds __attribute__((deprecated("JCore 1.1.8 版本已过期")));
/*!
* @abstract Crash日志收集
*
* @discussion .
*/
+ (void)crashLogON;
/*!
* @abstract
*
* @param latitude .
* @param longitude .
*
*/
+ (void)setLatitude:(double)latitude longitude:(double)longitude;
/*!
* @abstract
*
* @param location CLLocation *
*
* @discussion CoreLocation.framework #import <CoreLocation/CoreLocation.h>
*/
+ (void)setLocation:(CLLocation *)location;
/**
10 iOS系统默认地理围栏最大个数为20
@param count count
*/
+ (void)setGeofeneceMaxCount:(NSInteger)count;
/**
''
15
*/
+ (void)setGeofenecePeriodForInside:(NSInteger)seconds;
/**
@param delegate
@param launchOptions app启动完成是收到的字段参数
*/
+ (void)registerLbsGeofenceDelegate:(id<JPUSHGeofenceDelegate>)delegate withLaunchOptions:(NSDictionary *)launchOptions;
/**
@param geofenceId id
*/
+ (void)removeGeofenceWithIdentifier:(NSString *)geofenceId;
///----------------------------------------------------
/// @name Local Notification 本地通知
///----------------------------------------------------
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param request JPushNotificationRequest类型request.requestIdentifier即更新已有的推送iOS10以上有效request.completionHandler返回
* @discussion 使
*
*/
+ (void)addNotification:(JPushNotificationRequest *)request;
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param identifier JPushNotificationIdentifier类型iOS10以上identifier设置为nilidentifier.delivered和identifier.identifiers来移除相应在通知中心显示推送或待推送请求identifier.identifiers如果设置为nil或空数组则移除相应标志下所有在通知中心显示推送或待推送请求iOS10以下identifier设置为nilidentifier.delivered属性无效identifier.notificationObj传入特定推送对象来移除此推送
* @discussion 使
*
*/
+ (void)removeNotification:(JPushNotificationIdentifier *)identifier;
/*!
* @abstract (iOS10iOS10以下版本)
*
* JPush 2.1.9
* @param identifier JPushNotificationIdentifier类型iOS10以上可以通过设置identifier.delivered和identifier.identifiers来查找相应在通知中心显示推送或待推送请求identifier.identifiers如果设置为nil或空数组则返回相应标志下所有在通知中心显示推送或待推送请求iOS10以下identifier.delivered属性无效identifier.identifiers如果设置nil或空数组则返回所有未触发的推送identifier.findCompletionHandler回调才能得到查找结果(NSArray *results)
* @discussion 使
*
*/
+ (void)findNotification:(JPushNotificationIdentifier *)identifier;
/*!
* @abstract 64
*
* @param fireDate
* @param alertBody
* @param badge -1
* @param alertAction IOS 8"打开", "启动"
* @param notificationKey
* @param userInfo
* @param soundName nil为默认声音
*
* @discussion 64 [addNotification:]
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract ( iOS8 )
*
* IOS8新参数
* @param region
* @param regionTriggersOnce
* @param category
* @discussion [addNotification:]
*/
+ (UILocalNotification *)setLocalNotification:(NSDate *)fireDate
alertBody:(NSString *)alertBody
badge:(int)badge
alertAction:(NSString *)alertAction
identifierKey:(NSString *)notificationKey
userInfo:(NSDictionary *)userInfo
soundName:(NSString *)soundName
region:(CLRegion *)region
regionTriggersOnce:(BOOL)regionTriggersOnce
category:(NSString *)category NS_AVAILABLE_IOS(8_0) __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notification
* @param notificationKey
*
* @discussion App在前台运行时不会进行弹窗--iOS10以下还可继续使用iOS10以上在[UNUserNotificationCenterDelegate willPresentNotification:withCompletionHandler:]completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert);
*/
+ (void)showLocalNotificationAtFront:(UILocalNotification *)notification
identifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notificationKey
* @discussion [removeNotification:]
*/
+ (void)deleteLocalNotificationWithIdentifierKey:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
* @discussion [removeNotification:]
*/
+ (void)deleteLocalNotification:(UILocalNotification *)localNotification __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
*
* @param notificationKey
* @return , [array count]0
* @discussion [findNotification:]
*/
+ (NSArray *)findLocalNotificationWithIdentifier:(NSString *)notificationKey __attribute__((deprecated("JPush 2.1.9 版本已过期")));
/*!
* @abstract
* @discussion [removeNotification:]
*/
+ (void)clearAllLocalNotifications __attribute__((deprecated("JPush 2.1.9 版本已过期")));
///----------------------------------------------------
/// @name Server badge 服务器端 badge 功能
///----------------------------------------------------
/*!
* @abstract ()
*
* @param value . ()
*
* @discussion .
* UIApplication:setApplicationIconBadgeNumber .
*
* JPush .
* , APNs , , .
*
* JPush :
*
* - API () badge ;
* - API APNs (),
* 使 "+1" , badge () +1 badge ;
*/
+ (BOOL)setBadge:(NSInteger)value;
/*!
* @abstract (0)
*
* @discussion [setBadge:0] .
* [JPUSHService setBadge:] .
*/
+ (void)resetBadge;
///----------------------------------------------------
/// @name Other Feature 其他功能
///----------------------------------------------------
/*!
* @abstract ()
*
* @param mobileNumber .
* @param completion error为空error带有错误码及错误信息
*
* @discussion completion异步返回completion设置为nil不处理结果信息
*
*/
+ (void)setMobileNumber:(NSString *)mobileNumber completion:(void (^)(NSError *error))completion;
///----------------------------------------------------
/// @name Logs and others 日志与其他
///----------------------------------------------------
/*!
* @abstract JPush标识此设备的 registrationID
*
* @discussion SDK注册成功后, registrationID .
*
* JPush registrationID .
* , registrationID , , .
* registrationIDCompletionHandler:registrationID的方法block中获取registrationID,resCode为返回码,resCode返回1011,registrationID返回nil.
* JPush .
*/
+ (NSString *)registrationID;
+ (void)registrationIDCompletionHandler:(void(^)(int resCode,NSString *registrationID))completionHandler;
/*!
* @abstract Debug
*
* @discussion JMessage iOS Android .
* : Verbose, Debug, Info, Warning, Error.
* , Android .
*
* SDK : Info. , .
*
* SDK启动后调用本接口: Debug, .
*/
+ (void)setDebugMode;
/*!
* @abstract
*
* @discussion , [JPUSHService setDebugMode]
*
* , Warning, Error . , , .
*
* , , .
*/
+ (void)setLogOFF;
/*!
* @abstract SDK地理位置权限开关
*
* @discussion SDK地理围栏的相关功能将受到影响
*
*/
+ (void)setLocationEanable:(BOOL)isEanble;
/*!
* @abstract PUSH开关
*
* @discussion PUSH之后liveActivity消息推送
*
*/
+ (void)setPushEnable:(BOOL)isEnable completion:(void (^)(NSInteger iResCode))completion;
/*!
* @abstract
*
* @discussion JPushNotiInMessageDelegate的代理对象
*
*/
+ (void)setNotiInMessageDelegate:(id<JPUSHNotiInMessageDelegate>)notiInMessageDelegate;
///----------------------------------------------------
///********************下列方法已过期********************
///**************请使用新版tag/alias操作接口**************
///----------------------------------------------------
/// @name Tag alias setting 设置别名与标签
///----------------------------------------------------
/*!
*
* ()nilhttps://docs.jiguang.cn/jpush/client/iOS/ios_api/
* setTags:alias:fetchCompletionHandle:block里面处理设置结果即可.
* WARN: 使block时需要注意循环引用问题
*/
+ (void) setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
target:(id)theTarget __attribute__((deprecated("JPush 2.1.1 版本已过期")));
+ (void) setTags:(NSSet *)tags
alias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void) setTags:(NSSet *)tags
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void)setTags:(NSSet *)tags
alias:(NSString *)alias
fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void) setTags:(NSSet *)tags
aliasInbackground:(NSString *)alias __attribute__((deprecated("JPush 3.0.6 版本已过期")));
+ (void)setAlias:(NSString *)alias
callbackSelector:(SEL)cbSelector
object:(id)theTarget __attribute__((deprecated("JPush 3.0.6 版本已过期")));
@end
@class UNUserNotificationCenter;
@class UNNotificationResponse;
@protocol JPUSHRegisterDelegate <NSObject>
/*
* @brief handle UserNotifications.framework [willPresentNotification:withCompletionHandler:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param notification
* @param completionHandler callback中的options 使UNNotificationPresentationOptions
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger options))completionHandler;
/*
* @brief handle UserNotifications.framework [didReceiveNotificationResponse:withCompletionHandler:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param response
* @param completionHandler
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler;
/*
* @brief handle UserNotifications.framework [openSettingsForNotification:]
* @param center [UNUserNotificationCenter currentNotificationCenter]
* @param notification
*/
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification NS_AVAILABLE_IOS(12.0);
/**
*
* @param status JPAuthorizationStatus
* @param info
*/
- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info;
@end
@protocol JPUSHGeofenceDelegate <NSObject>
/**
@param geofence
@param error
*/
- (void)jpushGeofenceRegion:(NSDictionary *)geofence
error:(NSError *)error;
/**
@param geofenceList
*/
- (void)jpushCallbackGeofenceReceived:(NSArray<NSDictionary*> *)geofenceList;
/**
@param geofenceId id
@param userInfo
@param error
*/
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didEnterRegion:(NSDictionary *)userInfo error:(NSError *)error __attribute__((deprecated("JPush 3.6.0 版本已过期")));
/**
@param geofenceId id
@param userInfo
@param error
*/
- (void)jpushGeofenceIdentifer:(NSString *)geofenceId didExitRegion:(NSDictionary *)userInfo error:(NSError *)error __attribute__((deprecated("JPush 3.6.0 版本已过期")));
@end
@protocol JPUSHNotiInMessageDelegate <NSObject>
/**
@param content
*/
- (void)jPushNotiInMessageDidShowWithContent:(NSDictionary *)content;
/**
@param content
*/
- (void)jPushNotiInMessageDidClickWithContent:(NSDictionary *)content;
@end
@protocol JPUSHInAppMessageDelegate <NSObject>
/**
@param inAppMessage
*/
- (void)jPushInAppMessageDidShow:(JPushInAppMessage *)inAppMessage;
/**
@param inAppMessage
*/
- (void)jPushInAppMessageDidClick:(JPushInAppMessage *)inAppMessage;
@end

View File

@ -0,0 +1,17 @@
//
// JPushModule.h
// UniPluginJPush
//
// Created by huangshuni on 2021/1/12.
//
#import <Foundation/Foundation.h>
#import "DCUniModule.h"
NS_ASSUME_NONNULL_BEGIN
@interface JPushModule : DCUniModule
@end
NS_ASSUME_NONNULL_END

Binary file not shown.

View File

@ -0,0 +1,165 @@
{
"name": "JG-JPush",
"id": "JG-JPush",
"version": "1.1.9",
"description": "极光推送Hbuilder插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"ios": {
"deploymentTarget": "11.0",
"validArchitectures": [
"arm64"
],
"plugins": [{
"type": "module",
"name": "JG-JPush",
"class": "JPushModule"
}],
"hooksClass": "JPushProxy",
"integrateType": "framework",
"frameworks": [
"CFNetwork.framework",
"CoreFoundation.framework",
"CoreTelephony.framework",
"SystemConfiguration.framework",
"CoreGraphics.framework",
"Foundation.framework",
"UIKit.framework",
"Security.framework",
"libz.tbd",
"AdSupport.framework",
"UserNotifications.framework",
"libresolv.tbd",
"WebKit.framework",
"AppTrackingTransparency.framework",
"StoreKit.framework"
],
"resources": [
],
"capabilities": {
"entitlements": {
"aps-environment":"development"
}
},
"privacies": [
"NSLocationAlwaysAndWhenInUseUsageDescription",
"NSLocationAlwaysUsageDescription",
"NSLocationWhenInUseUsageDescription"
],
"parameters": {
"JPUSH_ISPRODUCTION_IOS": {
"des": "[iOS]是否是生产环境是填true不是填false或者不填",
"key": "JPush:ISPRODUCTION"
},
"JPUSH_ADVERTISINGID_IOS": {
"des": "[iOS]广告标识符IDFA如果不需要使用IDFA可不填",
"key": "JPush:ADVERTISINGID"
},
"JPUSH_DEFAULTINITJPUSH_IOS": {
"des": "[iOS]是否默认初始化是填true不是填false或者不填",
"key": "JPush:DEFAULTINITJPUSH"
}
}
},
"android": {
"plugins": [
{
"type": "module",
"name": "JG-JPush",
"class": "cn.jiguang.uniplugin_jpush.JPushModule"
}
],
"integrateType": "aar",
"minSdkVersion": "19",
"permissions": [
"${applicationId}.permission.JPUSH_MESSAGE",
"android.permission.INTERNET",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.POST_NOTIFICATIONS",
"com.huawei.android.launcher.permission.CHANGE_BADGE",
"com.vivo.notification.permission.BADGE_ICON",
"com.hihonor.android.launcher.permission.CHANGE_BADGE",
"android.permission.VIBRATE",
"android.permission.ACCESS_COARSE_LOCATION",
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.ACCESS_BACKGROUND_LOCATION",
"android.permission.READ_PHONE_STATE",
"android.permission.QUERY_ALL_PACKAGES",
"android.permission.GET_TASKS",
"android.permission.ACCESS_WIFI_STATE",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.READ_EXTERNAL_STORAGE",
"${applicationId}.permission.MIPUSH_RECEIVE",
"com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE",
"com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE"
],
"parameters": {
"JPUSH_OPPO_APPKEY": {
"des": "厂商OPPO-appkey,示例OP-12345678",
"key": "OPPO_APPKEY"
},
"JPUSH_OPPO_APPID":{
"des": "厂商OPPO-appId,示例OP-12345678",
"key": "OPPO_APPID"
},
"JPUSH_OPPO_APPSECRET":{
"des": "厂商OPPO-appSecret,示例OP-12345678",
"key": "OPPO_APPSECRET"
},
"JPUSH_VIVO_APPKEY":{
"des": "厂商VIVO-appkey,示例12345678",
"key": "com.vivo.push.api_key"
},
"JPUSH_VIVO_APPID":{
"des": "厂商VIVO-appId,示例12345678",
"key": "com.vivo.push.app_id"
},
"JPUSH_MEIZU_APPKEY":{
"des": "厂商MEIZU-appKey,示例MZ-12345678",
"key": "MEIZU_APPKEY"
},
"JPUSH_MEIZU_APPID":{
"des": "厂商MEIZU-appId,示例MZ-12345678",
"key": "MEIZU_APPID"
},
"JPUSH_XIAOMI_APPKEY":{
"des": "厂商XIAOMI-appKey,示例MI-12345678",
"key": "XIAOMI_APPKEY"
},
"JPUSH_XIAOMI_APPID":{
"des": "厂商XIAOMI-appId,示例MI-12345678",
"key": "XIAOMI_APPID"
},
"JPUSH_HUAWEI_APPID":{
"des": "厂商HUAWEI-appId,示例appid=12346578",
"key": "com.huawei.hms.client.appid"
},
"JPUSH_HONOR_APPID" : {
"des" : "厂商HONOR-appId,示例12346578",
"key" : "com.hihonor.push.app_id"
},
"JPUSH_GOOGLE_API_KEY" : {
"des" : "厂商google api_key,示例:g-12346578",
"key" : "google_api_key"
},
"JPUSH_GOOGLE_APP_ID" : {
"des" : "厂商google mobilesdk_app_id,示例g-12346578",
"key" : "google_app_id"
},
"JPUSH_GOOGLE_PROJECT_NUMBER" : {
"des" : "厂商google project_number,示例g-12346578",
"key" : "gcm_defaultSenderId"
},
"JPUSH_GOOGLE_PROJECT_ID" : {
"des" : "厂商google project_id ,示例g-12346578",
"key" : "project_id"
},
"JPUSH_GOOGLE_STORAGE_BUCKET" : {
"des" : "厂商google storage_bucket,示例g-12346578",
"key" : "google_storage_bucket"
}
}
}
}
}

3158
package-lock.json generated

File diff suppressed because it is too large Load Diff

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"devDependencies": {
"node-sass": "^9.0.0",
"sass-loader": "^13.3.2"
}
}

View File

@ -25,8 +25,8 @@
"path": "pages/business/business",
"style": {
"navigationBarTitleText": "商机信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -35,7 +35,7 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
},
@ -43,7 +43,8 @@
"path": "pages/oaExamine/oaExamine",
"style": {
"navigationBarTitleText": "审批",
"navigationBarBackgroundColor": "#3175f9",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
},
@ -51,7 +52,8 @@
"path": "pages/oaTask/oaTask",
"style": {
"navigationBarTitleText": "今日任务",
"navigationBarBackgroundColor": "#3175f9",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
},
@ -67,7 +69,7 @@
"path": "pages/oaManager/oaManager",
"style": {
"navigationBarTitleText": "片区经理",
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -76,7 +78,7 @@
"style": {
"navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -85,7 +87,16 @@
"style": {
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/logistics/te",
"style": {
"navigationBarTitleText": "测试",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -94,16 +105,7 @@
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/logistics/t",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -112,12 +114,20 @@
"style": {
"navigationBarTitleText": "配送信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/updatePasswprd/updatePasswprd",
"style": {
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}
],
"subPackages": [{
"root": "pages/views",
@ -168,7 +178,7 @@
"style": {
"navigationBarTitleText": "公司公示文档",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -177,7 +187,7 @@
"style": {
"navigationBarTitleText": "请假申请",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -191,7 +201,7 @@
"style": {
"navigationBarTitleText": "人员管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -200,7 +210,7 @@
"style": {
"navigationBarTitleText": "财务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -209,7 +219,7 @@
"style": {
"navigationBarTitleText": "账户充值",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
@ -227,8 +237,8 @@
"path": "contract/contract",
"style": {
"navigationBarTitleText": "合同管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -237,7 +247,7 @@
"style": {
"navigationBarTitleText": "合同详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -246,7 +256,7 @@
"style": {
"navigationBarTitleText": "合同内容",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -255,7 +265,7 @@
"style": {
"navigationBarTitleText": "公司信息",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -264,7 +274,7 @@
"style": {
"navigationBarTitleText": "签约公司详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -273,7 +283,7 @@
"style": {
"navigationBarTitleText": "人员详细信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -282,7 +292,7 @@
"style": {
"navigationBarTitleText": "流水详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -291,7 +301,7 @@
"style": {
"navigationBarTitleText": "提现余额",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": {
@ -309,7 +319,7 @@
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -317,8 +327,8 @@
"path": "noticeList/noticeList",
"style": {
"navigationBarTitleText": "公告列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -327,7 +337,7 @@
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -336,7 +346,7 @@
"style": {
"navigationBarTitleText": "公司管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -345,7 +355,7 @@
"style": {
"navigationBarTitleText": "新增人员",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -354,7 +364,7 @@
"style": {
"navigationBarTitleText": "档案管理",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -363,7 +373,7 @@
"style": {
"navigationBarTitleText": "信息登记",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -372,7 +382,7 @@
"style": {
"navigationBarTitleText": "信息更新",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -381,7 +391,7 @@
"style": {
"navigationBarTitleText": "固定资产",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -390,7 +400,7 @@
"style": {
"navigationBarTitleText": "任务管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -399,7 +409,7 @@
"style": {
"navigationBarTitleText": "档案详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -407,8 +417,8 @@
"path": "captain/captain",
"style": {
"navigationBarTitleText": "队长列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -417,7 +427,7 @@
"style": {
"navigationBarTitleText": "公司财务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -426,7 +436,7 @@
"style": {
"navigationBarTitleText": "未签约公司列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -435,7 +445,7 @@
"style": {
"navigationBarTitleText": "提交审核",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -444,7 +454,7 @@
"style": {
"navigationBarTitleText": "任务:宣传配送",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -453,16 +463,16 @@
"style": {
"navigationBarTitleText": "任务:片区交易",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "fileTask/fileTask",
"style": {
"navigationBarTitleText": "任务:档案更新",
"navigationBarTitleText": "已更新商机",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
@ -476,7 +486,7 @@
},
"tabBar": {
"color": "#282828",
"selectedColor": "#3175f9",
"selectedColor": "#0122C7",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [{

View File

@ -1,53 +1,95 @@
<template>
<view class="content">
<u-toast ref="uToast"></u-toast>
<view class="map">
<map id="map" :markers='markers' :scale="scale" :enable-zoom="true" :polyline="polyline"
style="width:100%;height: 100%;" :latitude="latitude" :enable-scroll="false" :longitude="longitude">
</map>
<view>
<view v-if='showLoading'>
<u-loading-page :loading="showLoading"></u-loading-page>
</view>
<view class="order_info">
<u-modal :show="showPop" @confirm="confirm" content="56565撒大苏打撒旦" @close="showPop=false"
:closeOnClickOverlay="true"></u-modal>
<button @click="getDriverLine">线路规划</button>
<p class='tit'>订单号: {{goodsDetil.logistics.order_sn}}</p>
<view class="store_name">
商户名称 {{goodsDetil.logistics.shop_name}}
</view>
<view class="store_time">
{{goodsDetil.logistics.shop_address}}
</view>
<view class="tit_a">
<text>物流信息</text>
</view>
<view class="info" v-for="(item,index) in goodsDetil.record">
<view style="margin: 20rpx 0;">
{{item.content }}
<view v-else>
<view class="content">
<u-toast ref="uToast"></u-toast>
<view class="map">
<map 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 style="margin: 20rpx 0;">
{{item.create_time }}
</view>
</view>
<view class="pro_info">
<view style="color: #999; flex:1">
商品信息
</view>
<view style="flex:4">
<view v-for="(item,index) in goodsDetil.product" class="goods_tit">
<text style="width: 60vw;">{{item.goods_name}}</text>
<text style="float: right;">X{{item.product_num}}{{item.goods_unit}}</text>
<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>
<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 class="total">
共计{{goodsDetil.product_count}}件商品
</view>
<view class="mark" style="display: flex; justify-content: space-between;">
<text>请详细核对订单信息</text>
<text style="color: #0122C7;">共计{{goodsDetil.product_count}}件商品</text>
</view>
</view>
<view class="btn">
<u-button @click="qrqodeFn" 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>
</view>
</view>
<u-button type="primary" v-if='goodsDetil.logistics.status==0' @click="confirm"
class="custom-style">已取货</u-button>
</view>
</view>
</template>
@ -61,99 +103,111 @@
export default {
data() {
return {
showLoading: true,
showPop: false,
goodsDetil: undefined,
scale: 17,
latitude: 28.908854,
longitude: 105.43639400000002,
markers: [],
polyline: [],
// https://p4.itc.cn/images03/20200518/90137c12bbac485dbc5bb0fe9d8cf4bd.jpeg
// https://t9.baidu.com/it/u=414099140,1072313909&fm=193
// mark: [{
// id: 0,
// latitude: 28.908854,
// longitude: 105.43639400000002,
// iconPath: 'https://img2.baidu.com/it/u=3116155797,2219949885&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', //
// width: 40, //
// height: 40, //
// title: '', //
// alpha: 0.5, //
// callout: { //
// content: '', //
// color: '#ffffff', //
// fontSize: 14, //
// borderRadius: 15, //
// borderWidth: '10',
// bgColor: '#3274F9', //
// display: 'ALWAYS', //
// },
// },
// {
// id: 2,
// latitude: 28.908447, //
// longitude: 105.439304,
// //
// iconPath: '../../static/img/contract/company.png', //
// rotate: 0, //
// width: 20, //
// height: 30, //
// alpha: 0.5, //
// callout: { //
// content: '', //
// color: 'white', //
// fontSize: 14, //
// borderRadius: 15, //
// borderWidth: '10',
// bgColor: '#3274F9', //
// display: 'ALWAYS', //
// },
// },
// ],
// polyline: [{
// points: [{
// latitude: 28.908854,
// longitude: 105.43639400000002,
// }, {
// latitude: 28.908447, //
// longitude: 105.439304,
// }],
// color: "#0091ff",
// // dottedLine: true,
// // colorList: true,
// // dottedLine: true,
// width: 15,
// // arrowLine: true,
// // colorList: true,
// // colorList: true
// }
// ]
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: {
confirm() {
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
takeGoods({
user_id: id,
logistics_id: this.goodsDetil.logistics.id
}).then(res => {
this.showToast()
setTimeout(() => {
uni.navigateBack()
}, 2000)
})
this.showPop = false
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
console.log(that.nowAddress)
that.markers[1].latitude = res.latitude
that.markers[1].longitude = res.longitude
that.getDriverLine()
}
});
//#endif
},
//
test() {
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({
@ -163,24 +217,16 @@
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
})
},
/*
地图相关
*/
// 线
getDriverLine() {
const that = this;
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
//
const origin = "28.908854,105.43639400000002,";
//
this.startingPoint()
//
this.endPoint()
//
const destination = "28.908447,105.439304,";
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=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 = [];
@ -196,17 +242,16 @@
});
}
}
console.log(data.paths[0].steps[0].instruction)
that.runningRoute = data.paths[0].steps[0].instruction;
console.log('行驶路线-----------', that.runningRoute)
}
that.polyline = [{
points: points,
color: "#0091ff",
dottedLine: true,
width: 15,
arrowLine: true,
colorList: true,
width: 10,
}, ];
},
fail: function(res) {
@ -214,44 +259,34 @@
},
});
},
// 线marker
startingPoint() {
let point = [{
id: 1,
width: 40,
height: 40,
latitude: 28.908854,
longitude: 105.43639400000002,
iconPath: "https://p4.itc.cn/images03/20200518/90137c12bbac485dbc5bb0fe9d8cf4bd.jpeg",
anchor: {
x: 0.5,
y: 1,
},
}, ];
this.markers = this.markers.concat(point);
qrqodeFn() {
let that = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
that.takeGood(res.result)
}
});
},
// 线marker
endPoint() {
let point = [{
id: 2,
width: 40,
height: 40,
latitude: 28.908447, //
longitude: 105.439304,
//
iconPath: 'https://t9.baidu.com/it/u=414099140,1072313909&fm=193',
anchor: {
x: 0.5,
y: 1,
},
}, ];
this.markers = this.markers.concat(point);
// {}
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) {
@ -259,108 +294,104 @@
logistics_id: options.id
}).then(res => {
this.goodsDetil = res.data
console.log(this.goodsDetil)
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)
})
},
// onShow() {
// let that = this
// // uni.getLocation({
// // type: 'wgs84',
// // success: function(res) {
// // that.mark[0].latitude = res.latitude
// // that.mark[0].longitude = res.longitude
// // console.log(that.mark[0])
// // console.log(res)
// // }
// // });
// }
}
</script>
<style lang='scss' scoped>
.content {
padding: 2vh 3vw;
background-color: #F6F7FC;
height: 100vh;
box-sizing: border-box;
}
.map {
height: 40vh;
width: 100vw;
border-radius: 2vw;
overflow: hidden;
}
.custom-style {
width: 100%;
background-color: #3C9CFF;
border: none;
color: white;
height: 90rpx;
line-height: 90rpx;
.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 {
height: auto;
background-color: white;
border-radius: 6vw 6vw 0 0;
transform: translateY(-5vh);
padding: 5vh 3vw;
box-sizing: border-box;
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;
}
.tit {
font-weight: bold;
font-size: 35rpx
}
.tit_a {
.mark {
background-color: white;
color: #A8A8A8;
padding: 10rpx 20rpx;
}
.pro_list {
display: flex;
justify-content: space-between;
font-weight: bold;
font-size: 35rpx
text {
flex: 2
}
.goods {
flex: 8;
margin: 0;
.goods_tit {
margin: 0;
display: flex;
}
}
}
.total {
text-align: right;
color: #3274F9;
font-weight: bold;
font-size: 32rpx;
margin: 20rpx 0;
}
.store_name {
color: #999999;
margin: 18rpx 0;
}
.store_time {
color: #999999;
padding: 0 0 20rpx 0;
border-bottom: 1px solid #999999;
margin-bottom: 20rpx;
}
.info {
margin: 10rpx 0;
}
.pro_info {
display: flex;
justify-content: space-between;
}
}
.goods_tit {
display: flex;
justify-content: space-between;
}
.icon {
text-align: center;
font-size: 50rpx;
text {
display: block;
transform: rotate(90deg);
}
.btn {
margin-top: 200rpx;
}
</style>

View File

@ -1,50 +1,56 @@
<template>
<view class="content">
<view style="background-color: #fff;padding: 18rpx 28rpx 0 18rpx;">
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='#f5f5f5'
v-model="keywords"></u-search>
</view>
<!-- <view style="margin: 10rpx 0 0 0;"></view> -->
<u-sticky bgColor="#fff">
<u-tabs :list="list" lineColor='#3274F9' inactiveStyle='color:#666' activeStyle="color:#3274F9"
:current="curNow" @change="sectionChange" :scrollable="false"></u-tabs>
<view>
<!-- <globalPopup ref="globalPopup"></globalPopup> -->
<u-sticky bgColor="#0122C7" style="width: 100vw;">
<u-tabs :list="tabLists" @change="sectionChange" lineColor='#fff' :scrollable="false" lineWidth='40'
inactiveStyle='color:#fff' activeStyle="color:#fff"></u-tabs>
</u-sticky>
<view v-if="!orderlist.length">
<u-empty mode="data" icon="../../static/img/empty/data.png">
</u-empty>
<view class="content">
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='white'
v-model="keywords"></u-search>
<view v-if="!orderlist.length">
<u-empty mode="data" icon="../../static/img/empty/data.png">
</u-empty>
</view>
<view v-else>
<logistiCard ref="logistiCards" v-for='(item,index) in orderlist' @getlist="getOrderList"
@showTost='showToast' @showToast2="showToast2" :goodsInfo="item" :key="index">
</logistiCard>
</view>
<!-- -->
<u-toast ref="uToast"></u-toast>
</view>
<view v-else>
<logistiCard v-for='(item,index) in orderlist' @getlist="getOrderList" @showTost='showToast'
:goodsInfo="item" :key="index">
</logistiCard>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script>
import {
getList
} from "@/api/logistics.js"
// import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
import {
informationAdd
} from "@/api/logistics.js"
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
//#ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
export default {
components: {
logistiCard
logistiCard,
// globalPopup
},
data() {
return {
notArr: [],
keywords: "",
list: [{
name: '待取货'
tabLists: [{
name: '待配送',
}, {
name: '已取货'
name: '待送达'
}, {
name: '已送达'
}],
@ -53,11 +59,19 @@
}
},
methods: {
sectionChange(e) {
this.curNow = e.index;
go() {
uni.navigateTo({
url: "/pages/logistics/te"
})
},
sectionChange(index) {
this.curNow = index.index;
this.getOrderList()
},
showToast() {
// 6
this.$refs.uToast.show({
type: 'success',
title: '成功主题(带图标)',
@ -65,27 +79,42 @@
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
})
},
showToast2() {
// 6
this.$refs.uToast.show({
type: 'error',
message: "取件码不能为空",
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
}, )
},
getOrderList() {
console.log("列表更新")
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
getList({
status: this.curNow,
// courier_id: 167,
courier_id: id,
keywords: this.keywords
}).then(res => {
this.orderlist = []
this.orderlist = res.data.data
for (let i = 0; i < this.orderlist.length; i++) {
// this.logistiCard
}
})
}
},
onLoad() {
let that = this
//#ifdef APP-PLUS
jpushModule.addNotificationListener(function(result) {
if (!that.notArr.includes(result.messageID)) {
that.$refs.globalPopup.showPopu();
that.getOrderList()
}
that.notArr.push(result.messageID)
})
// #endif
},
onShow() {
this.getOrderList()
@ -95,4 +124,9 @@
</script>
<style lang='scss'>
.content {
margin-top: 2vh;
background-color: #F5F5F5;
padding: 0vh 2vw;
}
</style>

View File

@ -3,144 +3,174 @@
<view v-if='showLoading'>
<u-loading-page :loading="showLoading"></u-loading-page>
</view>
<view v-else>
<view class="order">
<u-loading-page :loading="showLoading"></u-loading-page>
<p>订单号:{{goodsDetil.logistics.order_sn}}</p>
<view class='phone'>收货时间 : &nbsp;{{goodsDetil.record[0].create_time}} </view>
<!-- 已送达 -->
<view class="left" v-if="goodsDetil.logistics.status>=2">
<view class="list">
<text>
收货时间
</text>
<view>
{{goodsDetil.record[0].create_time}}
</view>
</view>
<view class="list">
<text>
收获详情
</text>
<view>
<p class="tit" v-if="goodsDetil.logistics.status==1">订单编号:&nbsp;&nbsp;{{goodsDetil.logistics.order_sn}}
</p>
<p class="tit" v-if="goodsDetil.logistics.status==2" style="background-color: #47BE62;">
订单编号:&nbsp;&nbsp;{{goodsDetil.logistics.order_sn}}</p>
<view class="contents">
<!-- 已送达 -->
<view class="left" v-if="goodsDetil.logistics.status==2">
<view class="list">
<text>
收货时间
</text>
<view>
{{goodsDetil.logistics.user_address}}
</view>
<view>
{{goodsDetil.logistics.user_name||"顾客电话"}}
</view>
<view>
{{goodsDetil.record[0].create_time}}
{{goodsDetil.record[2].create_time}}
</view>
</view>
</view>
<view class="list">
<text>
取货详情
</text>
<view>
<view class="list">
<text>
收获详情
</text>
<view>
{{goodsDetil.logistics.shop_address||"商家地址"}}
</view>
<view>
{{goodsDetil.logistics.shop_phone||"商家电话"}}
</view>
<view>
{{goodsDetil.record[1].create_time}}
</view>
</view>
</view>
<view class="list">
<text>
订单详情
</text>
<view>
<view v-for="(item,index) in goodsDetil.record" :key="item.create_time">
<view>
{{item.content}}
{{goodsDetil.logistics.receiver_address}}
</view>
<view>
{{item.create_time}}
{{ fuzzyName(goodsDetil.logistics.receiver_name) ||"顾客姓名"}}:&nbsp;&nbsp;{{goodsDetil.logistics.receiver_phone||"顾客电话"}}
</view>
<view>
{{goodsDetil.record[2].create_time}}
</view>
</view>
</view>
<view class="list">
<text>
取货详情
</text>
<view>
<view>
{{goodsDetil.logistics.shop_address||"商家地址"}}
</view>
<view>
{{goodsDetil.logistics.shop_name||"商家电话"}}
:&nbsp;&nbsp;{{goodsDetil.logistics.shop_phone||"商家电话"}}
</view>
<view>
{{goodsDetil.record[1].create_time}}
</view>
</view>
</view>
<!-- 下划线 -->
<view class="hr">
</view>
<view>
<view>
物流信息
</view>
<view style="margin: 10rpx 0;">
<u-steps :current="record.length" direction="column">
<u-steps-item :title="item.content" :desc="item.create_time"
v-for="(item,index) in goodsDetil.record">
</u-steps-item>
</u-steps>
</view>
</view>
<view class="pro_list">
<text style="width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<!-- 已取货 -->
<view class="left" v-else>
<view class="list">
<text>
用户名称
</text>
<view>
{{goodsDetil.logistics.user_name}}
</view>
</view>
<view class="list" style="margin: 10rpx 0;">
<text style="width: 16vw;">
收货地址
</text>
<view>
<!-- 已取货 -->
<view class="left" v-else>
<view class="list">
<text>
用户名称
</text>
<view>
{{goodsDetil.logistics.user_address}}
{{ fuzzyName(goodsDetil.logistics.receiver_name)}}
</view>
</view>
</view>
<view class="list">
<text>
物流信息
</text>
<view>
<view v-for="(item,index) in goodsDetil.record">
{{item.content}}
<view class="list">
<text>
联系方式
</text>
<view @click.stop="callFn(goodsDetil.logistics.receiver_phone)">
<u-icon style="display: inline-block;margin-left: 5rpx;" name="phone" color="#2979ff"
size="22"></u-icon> {{goodsDetil.logistics.receiver_phone}}
</view>
</view>
<view class="list" style="margin: 10rpx 0;">
<text style="width: 16vw;">
收货地址
</text>
<view>
<view>
{{item.create_time}}
{{goodsDetil.logistics.receiver_address}}
</view>
</view>
</view>
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
<view>
物流信息
</view>
<view style="margin: 20rpx 0;">
<u-steps :current="record.length-1" direction="column">
<u-steps-item :title="item.content" :desc="item.create_time"
v-for="(item,index) in (record)">
</u-steps-item>
</u-steps>
</view>
</view>
<view class="hr">
</view>
<view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text>
</view>
</view>
</view>
</view>
<view class="total" v-if="goodsDetil.logistics.status==2">
<text>共计{{goodsDetil.product_count}} </text>
</view>
<view style="margin-top: 600rpx;" v-if="goodsDetil.logistics.status==1">
<u-button type="primary" style="background-color: #FF7C32;border: 0; border-radius: 2vw;"
@click="showPop=true"><u-icon name="car-fill" color="white" size="25"
style="margin-right: 10rpx;;"></u-icon>
货物送达</u-button>
</view>
</view>
</view>
<view>
<u-modal :show="showPop" @close="showPop=false" title="请输入收件码" @confirm="confirm"
:closeOnClickOverlay="true">
<view class="slot-content">
<u--input placeholder="请输入收件码" type="number" border="surround" v-model="take_code"></u--input>
</view>
</u-modal>
<u-toast ref="uToast"></u-toast>
</view>
<view class="total">
<text>共计{{goodsDetil.product_count}}件商品 </text>
</view>
<u-button v-if='goodsDetil.logistics.status==1' @click="showPop=true" type="primary"
style="background-color: #34A853;border: none;">已送达</u-button>
</view>
<view class="cil_left">
</view>
<view class="cil_right">
</view>
<u-modal :show="showPop" @confirm="confirm" content="请确认货物已送达" @close="showPop=false"
:closeOnClickOverlay="true"></u-modal>
<u-toast ref="uToast"></u-toast>
</view>
</view>
@ -164,14 +194,30 @@
showLoading: true,
goodsDetil: undefined,
flag: 0,
take_code: ""
}
},
computed: {
record() {
return this.goodsDetil.record.reverse()
}
},
methods: {
callFn(num) {
uni.makePhoneCall({
phoneNumber: num
});
// console.log(9999)
},
fuzzyName(name) {
let length = name.length;
let fuzzyChars = "*".repeat(length - 1);
return name[0] + fuzzyChars;
},
confirm() {
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
if (!this.take_code) return
doneDelivery({
user_id: id,
// user_id: id,
take_code: this.take_code,
logistics_id: this.goodsDetil.logistics.id
}).then(res => {
this.showToast()
@ -192,13 +238,11 @@
},
},
onLoad(options) {
// console.log(options.id)
getDetil({
logistics_id: options.id
}).then(res => {
this.showLoading = false
this.goodsDetil = res.data
console.log(this.goodsDetil)
})
},
@ -208,33 +252,46 @@
<style lang='scss' scoped>
.content {
background-color: #F5F5F5;
padding: 2vh 2vw;
}
.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;
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;
font-size: 20rpx;
.contents {
background-color: #fff;
padding: 30rpx 20rpx;
.list {
margin: 10rpx 0;
}
.hr {
border-bottom: 1px dashed #0122C7;
margin: 20rpx 0;
}
}
.left {
.list {
display: flex;
@ -251,17 +308,6 @@
flex: 2;
}
/* view {
view {
margin-bottom: 10rpx;
}
}
text {
margin-right: 20rpx;
width: 30vw;
color: #999;
} */
}
}
@ -309,5 +355,9 @@
justify-content: space-between;
}
.tost_tit {
text-align: center;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More