Merge branch 'dev'
This commit is contained in:
commit
e51a071398
38
App.vue
38
App.vue
@ -1,9 +1,10 @@
|
|||||||
<script>
|
<script>
|
||||||
// var jpushModule = uni.requireNativePlugin("JG-JPush");
|
//#ifdef APP-PLUS
|
||||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
|
// #endif
|
||||||
|
export default {
|
||||||
|
onLaunch: async function () {
|
||||||
|
|
||||||
export default {
|
|
||||||
onLaunch: function() {
|
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
try {
|
try {
|
||||||
if (!this.$store.state.app.token) uni.redirectTo({
|
if (!this.$store.state.app.token) uni.redirectTo({
|
||||||
@ -26,21 +27,34 @@
|
|||||||
// ida.push(result.messageID)
|
// ida.push(result.messageID)
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function () {
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
|
// 创建内部音频对象
|
||||||
|
const audioContext = uni.createInnerAudioContext()
|
||||||
|
|
||||||
|
// 设置音频文件地址
|
||||||
|
audioContext.src = './static/mp3/order.mp3'
|
||||||
|
|
||||||
|
// 播放音频
|
||||||
|
//#ifdef APP-PLUS
|
||||||
|
jpushModule.addNotificationListener(res => {
|
||||||
|
console.log("监听成功")
|
||||||
|
audioContext.play()
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function () {
|
||||||
console.log('App Hide')
|
console.log('App Hide')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import "static/css/base.css";
|
@import "static/css/base.css";
|
||||||
@import "static/css/style.scss";
|
@import "static/css/style.scss";
|
||||||
|
|
||||||
view {
|
view {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
59
components/GlobalPopup/GlobalPopup.vue
Normal file
59
components/GlobalPopup/GlobalPopup.vue
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<view class="box" v-show="flag">
|
||||||
|
<p>提示</p>
|
||||||
|
你有新的订单,请注意查收!
|
||||||
|
<view class="off" @click="flag=false ">
|
||||||
|
<u-icon name="close" color="black" size="22"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "GlobalPopup",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
flag: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showPopu() {
|
||||||
|
this.flag = true
|
||||||
|
setTimeout(() => {
|
||||||
|
this.flag = false
|
||||||
|
}, 3000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.box {
|
||||||
|
z-index: 99999999999;
|
||||||
|
position: absolute;
|
||||||
|
top: 80rpx;
|
||||||
|
width: 90vw;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
height: 10vh;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.off {
|
||||||
|
position: absolute;
|
||||||
|
right: 20rpx;
|
||||||
|
top: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
<p class="tit" v-if="goodsInfo.status==2" style="background-color: #47BE62;">
|
<p class="tit" v-if="goodsInfo.status==2" style="background-color: #47BE62;">
|
||||||
收货人姓名: {{fuzzyName(goodsInfo.receiver_name)}}</p>
|
收货人姓名: {{fuzzyName(goodsInfo.receiver_name)}}</p>
|
||||||
|
<p class="tit" v-if="goodsInfo.status==3" style="background-color: red;">
|
||||||
|
收货人姓名: {{fuzzyName(goodsInfo.receiver_name)}}</p>
|
||||||
<view class="contents">
|
<view class="contents">
|
||||||
<!-- 已取货 -->
|
<!-- 已取货 -->
|
||||||
<view class="left" v-if='goodsInfo.status==0'>
|
<view class="left" v-if='goodsInfo.status==0'>
|
||||||
@ -215,6 +217,60 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 已取消 -->
|
||||||
|
<view class="left" @click="goDetil" v-if='goodsInfo.status==3'>
|
||||||
|
<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="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: red;border: 0;">
|
||||||
|
<u-icon name="eye-fill" color="white" size="25" style="margin-right: 10rpx;"></u-icon>
|
||||||
|
查看详情</u-button>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<button @click.stop="click" :class="{'my_btn_new_btn': position, 'my_btn_no_positon': !position, 'my_btn_disabled': my_btn_disabled}">{{text}}</button>
|
<button @click.stop="click"
|
||||||
|
:class="{'my_btn_new_btn': position, 'my_btn_no_positon': !position, 'my_btn_disabled': my_btn_disabled}">{{text}}</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -11,22 +12,22 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: '新增'
|
default: '新增'
|
||||||
},
|
},
|
||||||
position:{
|
position: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
my_btn_disabled:{
|
my_btn_disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
click(){
|
click() {
|
||||||
this.$emit('click')
|
this.$emit('click')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -34,7 +35,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.my_btn_new_btn{
|
.my_btn_new_btn {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -47,7 +48,8 @@
|
|||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
background-color: $theme-oa-color;
|
background-color: $theme-oa-color;
|
||||||
}
|
}
|
||||||
.my_btn_no_positon{
|
|
||||||
|
.my_btn_no_positon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -55,7 +57,8 @@
|
|||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
background-color: $theme-oa-color;
|
background-color: $theme-oa-color;
|
||||||
}
|
}
|
||||||
.my_btn_disabled{
|
|
||||||
|
.my_btn_disabled {
|
||||||
background-color: #666;
|
background-color: #666;
|
||||||
color: #eee;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
@ -107,13 +107,13 @@
|
|||||||
"nativePlugins" : {
|
"nativePlugins" : {
|
||||||
"JG-JCore" : {
|
"JG-JCore" : {
|
||||||
"JPUSH_APPKEY_ANDROID" : "5ced5ec5fa7bb86302944f0f",
|
"JPUSH_APPKEY_ANDROID" : "5ced5ec5fa7bb86302944f0f",
|
||||||
"JPUSH_APPKEY_IOS" : "",
|
"JPUSH_APPKEY_IOS" : "5ced5ec5fa7bb86302944f0f",
|
||||||
"JPUSH_CHANNEL_ANDROID" : "",
|
"JPUSH_CHANNEL_ANDROID" : "",
|
||||||
"JPUSH_CHANNEL_IOS" : "",
|
"JPUSH_CHANNEL_IOS" : "",
|
||||||
"__plugin_info__" : {
|
"__plugin_info__" : {
|
||||||
"name" : "极光推送 JCore 官方 SDK",
|
"name" : "极光推送 JCore 官方 SDK",
|
||||||
"description" : "极光推送 JCore 官方 SDK HBuilder 插件版本",
|
"description" : "极光推送 JCore 官方 SDK HBuilder 插件版本",
|
||||||
"platforms" : "Android,iOS",
|
"platforms" : "All,Android,iOS",
|
||||||
"url" : "https://ext.dcloud.net.cn/plugin?id=4028",
|
"url" : "https://ext.dcloud.net.cn/plugin?id=4028",
|
||||||
"android_package_name" : "uni.UNIB5B1EDD",
|
"android_package_name" : "uni.UNIB5B1EDD",
|
||||||
"ios_bundle_id" : "uni.UNIB5B1EDD",
|
"ios_bundle_id" : "uni.UNIB5B1EDD",
|
||||||
@ -167,7 +167,7 @@
|
|||||||
"__plugin_info__" : {
|
"__plugin_info__" : {
|
||||||
"name" : "极光推送 JPush 官方 SDK",
|
"name" : "极光推送 JPush 官方 SDK",
|
||||||
"description" : "极光推送JPush官方SDK HBuilder插件版本",
|
"description" : "极光推送JPush官方SDK HBuilder插件版本",
|
||||||
"platforms" : "Android,iOS",
|
"platforms" : "All,Android,iOS",
|
||||||
"url" : "https://ext.dcloud.net.cn/plugin?id=4035",
|
"url" : "https://ext.dcloud.net.cn/plugin?id=4035",
|
||||||
"android_package_name" : "uni.UNIB5B1EDD",
|
"android_package_name" : "uni.UNIB5B1EDD",
|
||||||
"ios_bundle_id" : "uni.UNIB5B1EDD",
|
"ios_bundle_id" : "uni.UNIB5B1EDD",
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
<u-toast ref="uToast"></u-toast>
|
<u-toast ref="uToast"></u-toast>
|
||||||
<view class="map">
|
<view class="map">
|
||||||
|
|
||||||
<map id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline" :markers='markers'
|
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
|
||||||
:scale="scale" style="width:100%;height: 70%;" :latitude="markers[0].latitude"
|
:markers='markers' :scale="scale" style="width:100%;height: 70%;"
|
||||||
:enable-scroll="true" :longitude="markers[0].longitude">
|
: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 class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
||||||
</cover-image>
|
</cover-image>
|
||||||
</map>
|
</map>
|
||||||
@ -80,10 +80,12 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view style="margin-top: 200rpx;height: 1px;">
|
||||||
|
<!-- 565 -->
|
||||||
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<u-button @click="qrqodeFn" type="primary" class="custom-style"
|
<u-button @click="qrqodeFn" type="primary" style="background-color: #0122C7;border: 0;">
|
||||||
style="background-color: #0122C7;border: 0;">
|
<u-icon name="scan" color="white" size="30" style="margin-right: 10rpx;"></u-icon>
|
||||||
<u-icon name="scan" color="white" size="25" style="margin-right: 10rpx;"></u-icon>
|
|
||||||
扫码取货</u-button>
|
扫码取货</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -103,7 +105,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
mapClass: 'custom-map',
|
||||||
showLoading: true,
|
showLoading: true,
|
||||||
showPop: false,
|
showPop: false,
|
||||||
goodsDetil: undefined,
|
goodsDetil: undefined,
|
||||||
@ -152,7 +154,7 @@
|
|||||||
success: function async (res) {
|
success: function async (res) {
|
||||||
that.nowAddress = res.address.city + res.address.district + res.address.street + res
|
that.nowAddress = res.address.city + res.address.district + res.address.street + res
|
||||||
.address.streetNum + res.address.poiName
|
.address.streetNum + res.address.poiName
|
||||||
console.log(that.nowAddress)
|
|
||||||
that.markers[1].latitude = res.latitude
|
that.markers[1].latitude = res.latitude
|
||||||
that.markers[1].longitude = res.longitude
|
that.markers[1].longitude = res.longitude
|
||||||
that.getDriverLine()
|
that.getDriverLine()
|
||||||
@ -250,7 +252,7 @@
|
|||||||
points: points,
|
points: points,
|
||||||
color: "#0091ff",
|
color: "#0091ff",
|
||||||
dottedLine: true,
|
dottedLine: true,
|
||||||
width: 10,
|
width: 30,
|
||||||
|
|
||||||
}, ];
|
}, ];
|
||||||
},
|
},
|
||||||
@ -286,8 +288,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
getDetil({
|
getDetil({
|
||||||
@ -306,6 +306,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
.custom-map /deep/ .polyline {
|
||||||
|
stroke-width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 2vh 3vw;
|
padding: 2vh 3vw;
|
||||||
background-color: #F6F7FC;
|
background-color: #F6F7FC;
|
||||||
@ -392,6 +396,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin-top: 200rpx;
|
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
width: 90vw;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,49 +1,64 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- <globalPopup ref="globalPopup"></globalPopup> -->
|
<globalPopup ref="globalPopup"></globalPopup>
|
||||||
<u-sticky bgColor="#0122C7" style="width: 100vw;">
|
<u-sticky bgColor="#0122C7" style="width: 100vw">
|
||||||
<u-tabs :list="tabLists" @change="sectionChange" lineColor='#fff' :scrollable="false" lineWidth='40'
|
<u-tabs
|
||||||
inactiveStyle='color:#fff' activeStyle="color:#fff"></u-tabs>
|
:list="tabLists"
|
||||||
|
@change="sectionChange"
|
||||||
|
lineColor="#fff"
|
||||||
|
:scrollable="false"
|
||||||
|
lineWidth="40"
|
||||||
|
inactiveStyle="color:#fff"
|
||||||
|
activeStyle="color:#fff"
|
||||||
|
></u-tabs>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='white'
|
<u-search
|
||||||
v-model="keywords"></u-search>
|
placeholder="搜索你的订单"
|
||||||
|
@search="getOrderList"
|
||||||
|
:show-action="false"
|
||||||
|
bg-color="white"
|
||||||
|
v-model="keywords"
|
||||||
|
></u-search>
|
||||||
<view v-if="!orderlist.length">
|
<view v-if="!orderlist.length">
|
||||||
<u-empty mode="data" icon="../../static/img/empty/data.png">
|
<u-empty mode="data" icon="../../static/img/empty/data.png"> </u-empty>
|
||||||
</u-empty>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<logistiCard ref="logistiCards" v-for='(item,index) in orderlist' @getlist="getOrderList"
|
<logistiCard
|
||||||
@showTost='showToast' @showToast2="showToast2" :goodsInfo="item" :key="index">
|
ref="logistiCards"
|
||||||
|
v-for="(item, index) in orderlist"
|
||||||
|
@getlist="getOrderList"
|
||||||
|
@showTost="showToast"
|
||||||
|
@showToast2="showToast2"
|
||||||
|
:goodsInfo="item"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
</logistiCard>
|
</logistiCard>
|
||||||
</view>
|
</view>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<u-toast ref="uToast"></u-toast>
|
<u-toast ref="uToast"></u-toast>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getList
|
getList
|
||||||
} from "@/api/logistics.js"
|
} from "@/api/logistics.js"
|
||||||
// import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
|
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
|
||||||
import {
|
import {
|
||||||
informationAdd
|
informationAdd
|
||||||
} from "@/api/logistics.js"
|
} from "@/api/logistics.js"
|
||||||
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
|
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
// #endif
|
// #endif
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
logistiCard,
|
logistiCard,
|
||||||
// globalPopup
|
globalPopup
|
||||||
},
|
},
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
notArr: [],
|
notArr: [],
|
||||||
keywords: "",
|
keywords: "",
|
||||||
@ -59,18 +74,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
go() {
|
go () {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/logistics/te"
|
url: "/pages/logistics/te"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sectionChange(index) {
|
sectionChange (index) {
|
||||||
|
|
||||||
this.curNow = index.index;
|
this.curNow = index.index;
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
},
|
},
|
||||||
|
|
||||||
showToast() {
|
showToast () {
|
||||||
// 6
|
// 6
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@ -79,16 +94,16 @@
|
|||||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showToast2() {
|
showToast2 () {
|
||||||
// 6
|
// 6
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: "取件码不能为空",
|
message: "取件码不能为空",
|
||||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
|
||||||
}, )
|
},)
|
||||||
},
|
},
|
||||||
getOrderList() {
|
getOrderList () {
|
||||||
console.log("列表更新")
|
console.log("列表更新")
|
||||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
||||||
getList({
|
getList({
|
||||||
@ -102,10 +117,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad () {
|
||||||
let that = this
|
let that = this
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
jpushModule.addNotificationListener(function(result) {
|
jpushModule.addNotificationListener(function (result) {
|
||||||
if (!that.notArr.includes(result.messageID)) {
|
if (!that.notArr.includes(result.messageID)) {
|
||||||
that.$refs.globalPopup.showPopu();
|
that.$refs.globalPopup.showPopu();
|
||||||
that.getOrderList()
|
that.getOrderList()
|
||||||
@ -115,18 +130,18 @@
|
|||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow () {
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.content {
|
.content {
|
||||||
margin-top: 2vh;
|
margin-top: 2vh;
|
||||||
background-color: #F5F5F5;
|
background-color: #f5f5f5;
|
||||||
padding: 0vh 2vw;
|
padding: 0vh 2vw;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -11,7 +11,83 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="tit" v-if="goodsDetil.logistics.status==2" style="background-color: #47BE62;">
|
<p class="tit" v-if="goodsDetil.logistics.status==2" style="background-color: #47BE62;">
|
||||||
订单编号: {{goodsDetil.logistics.order_sn}}</p>
|
订单编号: {{goodsDetil.logistics.order_sn}}</p>
|
||||||
|
<p class="tit" v-if="goodsDetil.logistics.status==3" style="background-color: red;">
|
||||||
|
订单编号: {{goodsDetil.logistics.order_sn}}</p>
|
||||||
<view class="contents">
|
<view class="contents">
|
||||||
|
|
||||||
|
<!-- 已取消 -->
|
||||||
|
<view class="left" v-if="goodsDetil.logistics.status==3">
|
||||||
|
<view class="list">
|
||||||
|
<text>
|
||||||
|
取消时间
|
||||||
|
</text>
|
||||||
|
<view>
|
||||||
|
{{goodsDetil.record[1].create_time}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list">
|
||||||
|
<text>
|
||||||
|
收货详情
|
||||||
|
</text>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
{{goodsDetil.logistics.receiver_address}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
{{ fuzzyName(goodsDetil.logistics.receiver_name) ||"顾客姓名"}}: {{goodsDetil.logistics.receiver_phone||"顾客电话"}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
{{goodsDetil.create_time}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="list">
|
||||||
|
<text>
|
||||||
|
取货详情
|
||||||
|
</text>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
{{goodsDetil.logistics.shop_address||"商家地址"}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
{{goodsDetil.logistics.shop_name||"商家电话"}}
|
||||||
|
: {{goodsDetil.logistics.shop_phone||"商家电话"}}
|
||||||
|
</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="left" v-if="goodsDetil.logistics.status==2">
|
<view class="left" v-if="goodsDetil.logistics.status==2">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@ -86,8 +162,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 已取货 -->
|
<!-- 已取货 -->
|
||||||
<view class="left" v-else>
|
<view class="left" v-if="goodsDetil.logistics.status==1">
|
||||||
<view class="list">
|
<view class=" list">
|
||||||
<text>
|
<text>
|
||||||
用户名称
|
用户名称
|
||||||
</text>
|
</text>
|
||||||
@ -145,12 +221,10 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="total" v-if="goodsDetil.logistics.status==2||goodsDetil.logistics.status==3">
|
||||||
|
|
||||||
<view class="total" v-if="goodsDetil.logistics.status==2">
|
|
||||||
<text>共计{{goodsDetil.product_count}}件 </text>
|
<text>共计{{goodsDetil.product_count}}件 </text>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-top: 600rpx;" v-if="goodsDetil.logistics.status==1">
|
<view class="btn" v-if="goodsDetil.logistics.status==1">
|
||||||
<u-button type="primary" style="background-color: #FF7C32;border: 0; border-radius: 2vw;"
|
<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"
|
@click="showPop=true"><u-icon name="car-fill" color="white" size="25"
|
||||||
style="margin-right: 10rpx;;"></u-icon>
|
style="margin-right: 10rpx;;"></u-icon>
|
||||||
@ -254,6 +328,15 @@
|
|||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
width: 90vw;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.order {
|
.order {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
@ -2,19 +2,26 @@
|
|||||||
<view class="oa_home" style="oaColor">
|
<view class="oa_home" style="oaColor">
|
||||||
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
||||||
|
|
||||||
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
|
<view
|
||||||
|
class="home_header"
|
||||||
|
:class="!ApproveList.length > 0 ? 'home_header_no_data' : ''"
|
||||||
|
>
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view style="height: var(--status-bar-height)"></view>
|
<view style="height: var(--status-bar-height)"></view>
|
||||||
<view style="height: 100rpx"></view>
|
<view style="height: 100rpx"></view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="my_info ">
|
<view class="my_info">
|
||||||
<view class="head_img">
|
<view class="head_img">
|
||||||
<view class="img_box">
|
<view class="img_box">
|
||||||
<u--image :showLoading="true" width="150.28rpx" height="150.28rpx"
|
<u--image
|
||||||
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'" shape="circle"></u--image>
|
:showLoading="true"
|
||||||
|
width="150.28rpx"
|
||||||
|
height="150.28rpx"
|
||||||
|
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'"
|
||||||
|
shape="circle"
|
||||||
|
></u--image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<text class="nickname">工作证: {{ myOaInfo.nickname }}</text>
|
<text class="nickname">工作证: {{ myOaInfo.nickname }}</text>
|
||||||
<text>身份: {{ myOaInfo.admin_id ? "超级管理员" : "普通用户" }}</text>
|
<text>身份: {{ myOaInfo.admin_id ? "超级管理员" : "普通用户" }}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -54,37 +61,51 @@
|
|||||||
</block>
|
</block>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="backlog" :class="!ApproveList.length > 0 ? 'backlog_no_data' : ''">
|
<view
|
||||||
|
class="backlog"
|
||||||
|
:class="!ApproveList.length > 0 ? 'backlog_no_data' : ''"
|
||||||
|
>
|
||||||
<view class="head_title flex_a_c_j_sb">
|
<view class="head_title flex_a_c_j_sb">
|
||||||
<view class="title">公告列表</view>
|
<view class="title">公告列表</view>
|
||||||
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')">更多
|
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')"
|
||||||
|
>更多
|
||||||
<view class="iconfont icon-you">
|
<view class="iconfont icon-you">
|
||||||
<uni-icons type="forward"></uni-icons>
|
<uni-icons type="forward"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="ApproveList.length > 0">
|
<block v-if="ApproveList.length > 0">
|
||||||
|
<view
|
||||||
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
|
class="backlog_item flex_a_c_j_sb"
|
||||||
:key="index" @click="clickNotice(item.id)">
|
v-for="(item, index) in ApproveList.slice(0, 2)"
|
||||||
|
:key="index"
|
||||||
<view class="text"> <text class="text_time">{{item.create_time.substring(0, 10)}}</text>
|
@click="clickNotice(item.id)"
|
||||||
|
>
|
||||||
|
<view class="text">
|
||||||
|
<text class="text_time">{{
|
||||||
|
item.create_time.substring(0, 10)
|
||||||
|
}}</text>
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
<i class="iconfont icon-you"
|
||||||
|
><uni-icons type="forward"></uni-icons
|
||||||
|
></i>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view v-else class="backlog_no flex_a_c_j_sb">
|
<view v-else class="backlog_no flex_a_c_j_sb">
|
||||||
<view class="text">暂无更多消息</view>
|
<view class="text">暂无更多消息</view>
|
||||||
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
<i class="iconfont icon-you"
|
||||||
|
><uni-icons type="forward"></uni-icons
|
||||||
|
></i>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="my_task">
|
<view class="my_task">
|
||||||
<view class="task_title flex_a_c_j_sb">
|
<view class="task_title flex_a_c_j_sb">
|
||||||
<view class="title">工作管理</view>
|
<view class="title">工作管理</view>
|
||||||
<view class="flex_a_c">更多
|
<view class="flex_a_c"
|
||||||
|
>更多
|
||||||
<view class="iconfont icon-you">
|
<view class="iconfont icon-you">
|
||||||
<uni-icons type="forward"></uni-icons>
|
<uni-icons type="forward"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@ -92,11 +113,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="fast_track">
|
<view class="fast_track">
|
||||||
<block v-for="(item, index) in oaHomeData" :key="index">
|
<block v-for="(item, index) in oaHomeData" :key="index">
|
||||||
<view class="track_item" @click="navTwo(item.url, index)">
|
<view class="track_item" @click="navTwo(item.url, index)">
|
||||||
<u--image :showLoading="true" :src="item.icon" width="77.19rpx" height="77.19rpx"></u--image>
|
<u--image
|
||||||
|
:showLoading="true"
|
||||||
|
:src="item.icon"
|
||||||
|
width="77.19rpx"
|
||||||
|
height="77.19rpx"
|
||||||
|
></u--image>
|
||||||
<view class="title">{{ item.text }}</view>
|
<view class="title">{{ item.text }}</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@ -105,7 +130,8 @@
|
|||||||
<view class="my_task">
|
<view class="my_task">
|
||||||
<view class="task_title flex_a_c_j_sb">
|
<view class="task_title flex_a_c_j_sb">
|
||||||
<view class="title">配送信息</view>
|
<view class="title">配送信息</view>
|
||||||
<view class="flex_a_c" @click="goOrderList">更多
|
<view class="flex_a_c" @click="goOrderList"
|
||||||
|
>更多
|
||||||
<view class="iconfont icon-you">
|
<view class="iconfont icon-you">
|
||||||
<uni-icons type="forward"></uni-icons>
|
<uni-icons type="forward"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
@ -116,13 +142,20 @@
|
|||||||
<taskCard></taskCard>
|
<taskCard></taskCard>
|
||||||
</block> -->
|
</block> -->
|
||||||
<view v-if="orderList.length > 0">
|
<view v-if="orderList.length > 0">
|
||||||
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
|
<globalPopup ref="globalPopup"></globalPopup>
|
||||||
|
<logistiBriefCard
|
||||||
|
v-for="(item, index) in orderList"
|
||||||
|
:key="index"
|
||||||
|
:goodsInfo="item"
|
||||||
|
>
|
||||||
</logistiBriefCard>
|
</logistiBriefCard>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else class="no_task">
|
<view v-else class="no_task">
|
||||||
<view class="title">暂无配送信息</view>
|
<view class="title">暂无配送信息</view>
|
||||||
<view class="tips" v-if="!$store.state.app.token">登录后查看配送信息详情</view>
|
<view class="tips" v-if="!$store.state.app.token"
|
||||||
|
>登录后查看配送信息详情</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="head_title flex_a_c_j_sb">
|
<!-- <view class="head_title flex_a_c_j_sb">
|
||||||
<view class="">我的任务</view>
|
<view class="">我的任务</view>
|
||||||
@ -161,34 +194,40 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue"
|
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue"
|
||||||
import {
|
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
|
||||||
|
import {
|
||||||
getList
|
getList
|
||||||
} from "@/api/logistics.js"
|
} from "@/api/logistics.js"
|
||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from '@/libs/uniApi.js'
|
} from '@/libs/uniApi.js'
|
||||||
import {
|
import {
|
||||||
oaHomeData
|
oaHomeData
|
||||||
} from '@/static/server/server.js'
|
} from '@/static/server/server.js'
|
||||||
import {
|
import {
|
||||||
noticeList
|
noticeList
|
||||||
} from "@/api/notice.js"
|
} from "@/api/notice.js"
|
||||||
// import tabbar from '../components/tabbar'
|
// import tabbar from '../components/tabbar'
|
||||||
import {
|
import {
|
||||||
getIndexListAPI,
|
getIndexListAPI,
|
||||||
getTaskListAPI,
|
getTaskListAPI,
|
||||||
getMyTaskListAPI,
|
getMyTaskListAPI,
|
||||||
getApproveListAPI,
|
getApproveListAPI,
|
||||||
getUserIndexAPI
|
getUserIndexAPI
|
||||||
} from '@/api/oaApi.js'
|
} from '@/api/oaApi.js'
|
||||||
export default {
|
//#ifdef APP-PLUS
|
||||||
|
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
|
// #endif
|
||||||
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// tabbar
|
// tabbar
|
||||||
logistiBriefCard
|
logistiBriefCard,
|
||||||
|
globalPopup
|
||||||
},
|
},
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
notArr: [],
|
||||||
orderList: [],
|
orderList: [],
|
||||||
oaHomeData: [],
|
oaHomeData: [],
|
||||||
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
||||||
@ -225,14 +264,32 @@
|
|||||||
ApproveList: []
|
ApproveList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady () {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
frontColor: '#ffffff',
|
frontColor: '#ffffff',
|
||||||
backgroundColor: '#3175f9'
|
backgroundColor: '#3175f9'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad () {
|
||||||
onShow() {
|
//#ifdef APP-PLUS
|
||||||
|
const audioContext = uni.createInnerAudioContext()
|
||||||
|
audioContext.volume = 1
|
||||||
|
audioContext.src = '../../static/mp3/order.mp3'
|
||||||
|
let that = this
|
||||||
|
jpushModule.addNotificationListener(function (result) {
|
||||||
|
if (!that.notArr.includes(result.messageID)) {
|
||||||
|
that.$refs.globalPopup.showPopu();
|
||||||
|
that.getOrderList()
|
||||||
|
console.log("idnex的")
|
||||||
|
audioContext.play()
|
||||||
|
|
||||||
|
}
|
||||||
|
that.notArr.push(result.messageID)
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow () {
|
||||||
// this.getUserIndex()
|
// this.getUserIndex()
|
||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
this.getApproveList()
|
this.getApproveList()
|
||||||
@ -243,6 +300,9 @@
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
test () {
|
||||||
|
this.$refs.globalPopup.showPopu();
|
||||||
|
},
|
||||||
// test() {
|
// test() {
|
||||||
// wx.chooseMessageFile({
|
// wx.chooseMessageFile({
|
||||||
// count: 1, //限制选择的文件数量
|
// count: 1, //限制选择的文件数量
|
||||||
@ -255,7 +315,7 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
async getOrderList() {
|
async getOrderList () {
|
||||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id || ""
|
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id || ""
|
||||||
let res = await getList({
|
let res = await getList({
|
||||||
courier_id: id
|
courier_id: id
|
||||||
@ -264,16 +324,16 @@
|
|||||||
this.orderList = res.data.data
|
this.orderList = res.data.data
|
||||||
|
|
||||||
},
|
},
|
||||||
goOrderList() {
|
goOrderList () {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/logistics/index"
|
url: "/pages/logistics/index"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initUserInfo() {
|
initUserInfo () {
|
||||||
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar =
|
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar =
|
||||||
'';
|
'';
|
||||||
},
|
},
|
||||||
initOaHomeDada() {
|
initOaHomeDada () {
|
||||||
if (this.$store.state.app.userInfo.admin_id == 0) { // 如果用户不是管理员
|
if (this.$store.state.app.userInfo.admin_id == 0) { // 如果用户不是管理员
|
||||||
let arr = oaHomeData.filter(item => !item.admin); //过滤掉管理员专属页面
|
let arr = oaHomeData.filter(item => !item.admin); //过滤掉管理员专属页面
|
||||||
this.oaHomeData = arr;
|
this.oaHomeData = arr;
|
||||||
@ -294,7 +354,7 @@
|
|||||||
this.oaHomeData.splice(this.oaHomeData.length - 1, 1)
|
this.oaHomeData.splice(this.oaHomeData.length - 1, 1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getApproveList() {
|
async getApproveList () {
|
||||||
const res = await noticeList({
|
const res = await noticeList({
|
||||||
keyword: '',
|
keyword: '',
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
@ -302,7 +362,7 @@
|
|||||||
})
|
})
|
||||||
this.ApproveList = res.data.lists
|
this.ApproveList = res.data.lists
|
||||||
},
|
},
|
||||||
async getIndexList() {
|
async getIndexList () {
|
||||||
const {
|
const {
|
||||||
project,
|
project,
|
||||||
task
|
task
|
||||||
@ -318,30 +378,30 @@
|
|||||||
this.assessData[7].num = task.count_lv + '%'
|
this.assessData[7].num = task.count_lv + '%'
|
||||||
this.myTaskList = task.list
|
this.myTaskList = task.list
|
||||||
},
|
},
|
||||||
async getMyTask() {
|
async getMyTask () {
|
||||||
let data = {
|
let data = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: 10
|
limit: 10
|
||||||
}
|
}
|
||||||
const res = getMyTaskListAPI(data)
|
const res = getMyTaskListAPI(data)
|
||||||
},
|
},
|
||||||
naviTaskDetails(id) {
|
naviTaskDetails (id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/views/task_details?id=${id}`
|
url: `/pages/views/task_details?id=${id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
navTo(url) {
|
navTo (url) {
|
||||||
url ?
|
url ?
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
fail() {
|
fail () {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: url
|
url: url
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}) : Toast('暂未开放')
|
}) : Toast('暂未开放')
|
||||||
},
|
},
|
||||||
navTwo(url, key) {
|
navTwo (url, key) {
|
||||||
let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
||||||
var arr = [3, 6];
|
var arr = [3, 6];
|
||||||
|
|
||||||
@ -354,13 +414,13 @@
|
|||||||
this.navTo(url);
|
this.navTo(url);
|
||||||
},
|
},
|
||||||
// 点击公告
|
// 点击公告
|
||||||
clickNotice(e) {
|
clickNotice (e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/oaNews/oaNews?id=${e}`
|
url: `/pages/oaNews/oaNews?id=${e}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 判断当前是否登录,显示任务及完成率
|
// 判断当前是否登录,显示任务及完成率
|
||||||
showToask() {
|
showToask () {
|
||||||
if (!this.$store.state.app.token) {
|
if (!this.$store.state.app.token) {
|
||||||
this.assessData = this.assessData.map(item => {
|
this.assessData = this.assessData.map(item => {
|
||||||
item.num = '*';
|
item.num = '*';
|
||||||
@ -374,35 +434,35 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
login() {
|
login () {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/oaLogin/oaLogin'
|
url: '/pages/oaLogin/oaLogin'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getUserIndex() {
|
async getUserIndex () {
|
||||||
const res = await getUserIndexAPI()
|
const res = await getUserIndexAPI()
|
||||||
this.myOaInfo = res
|
this.myOaInfo = res
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh () {
|
||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.oa_home {
|
.oa_home {
|
||||||
padding-bottom: 120rpx;
|
padding-bottom: 120rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header_bg {
|
.header_bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// z-index: -1;
|
// z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home_header {
|
.home_header {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
// height: 607.02rpx;
|
// height: 607.02rpx;
|
||||||
@ -414,7 +474,7 @@
|
|||||||
border-radius: 0 0 30rpx 30rpx;
|
border-radius: 0 0 30rpx 30rpx;
|
||||||
|
|
||||||
.head_img {
|
.head_img {
|
||||||
background-color: #FF7C32;
|
background-color: #ff7c32;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 70rpx 50rpx 50rpx 70rpx;
|
border-radius: 70rpx 50rpx 50rpx 70rpx;
|
||||||
height: 130.28rpx;
|
height: 130.28rpx;
|
||||||
@ -553,13 +613,13 @@
|
|||||||
.backlog_no_data {
|
.backlog_no_data {
|
||||||
bottom: -70rpx;
|
bottom: -70rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.home_header_no_data {
|
.home_header_no_data {
|
||||||
margin-bottom: 93.33rpx;
|
margin-bottom: 93.33rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fast_track {
|
.fast_track {
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
// height: 331rpx;
|
// height: 331rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -583,9 +643,9 @@
|
|||||||
margin-top: 14.04rpx;
|
margin-top: 14.04rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.my_task {
|
.my_task {
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
// margin-top: 31.58rpx;
|
// margin-top: 31.58rpx;
|
||||||
@ -698,9 +758,9 @@
|
|||||||
font-size: 24.56rpx;
|
font-size: 24.56rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no_login {
|
.no_login {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -738,5 +798,5 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -21,12 +21,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<input
|
<input
|
||||||
v-if="current == 0"
|
v-if="current == 0"
|
||||||
|
@click="getId"
|
||||||
class="mobile item"
|
class="mobile item"
|
||||||
v-model="formData.account"
|
v-model="formData.account"
|
||||||
placeholder="输入账号"
|
placeholder="输入账号"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
v-if="current == 0"
|
v-if="current == 0"
|
||||||
|
@click="getId"
|
||||||
class="mobile item"
|
class="mobile item"
|
||||||
v-model="formData.password"
|
v-model="formData.password"
|
||||||
maxlength="26"
|
maxlength="26"
|
||||||
@ -108,6 +110,19 @@ export default {
|
|||||||
this.current = e.index;
|
this.current = e.index;
|
||||||
this.formData.scene = e.index + 1;
|
this.formData.scene = e.index + 1;
|
||||||
},
|
},
|
||||||
|
// 获取设备id
|
||||||
|
getId () {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (this.formData.register_id) return
|
||||||
|
jpushModule.initJPushService()
|
||||||
|
jpushModule.getRegistrationID(result => {
|
||||||
|
// 绑定极光设备id
|
||||||
|
this.formData.register_id = result.registerID || 0
|
||||||
|
|
||||||
|
console.log("设备----", this.formData)
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
async login () {
|
async login () {
|
||||||
if (!this.formData.account) return Toast('账号不能为空');
|
if (!this.formData.account) return Toast('账号不能为空');
|
||||||
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
|
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
|
||||||
@ -124,25 +139,14 @@ export default {
|
|||||||
user: data,
|
user: data,
|
||||||
token: res.data.token
|
token: res.data.token
|
||||||
})
|
})
|
||||||
let { data } = await userInfo();
|
let {
|
||||||
|
data
|
||||||
|
} = await userInfo();
|
||||||
this.$store.commit('setUserInfo', data);
|
this.$store.commit('setUserInfo', data);
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (data.is_new_user) {
|
|
||||||
uni.showLoading({
|
|
||||||
mask: true,
|
|
||||||
title: '加载中'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/oaHome/oaHome',
|
url: '/pages/oaHome/oaHome'
|
||||||
success: () => {
|
|
||||||
uni.$emit('initOaTask'); // 更新任务
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
} else uni.navigateTo({
|
|
||||||
url: '/pages/updatePasswprd/updatePasswprd'
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
initTerminal () {
|
initTerminal () {
|
||||||
// #ifndef APP-PLUS
|
// #ifndef APP-PLUS
|
||||||
@ -199,14 +203,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// // #ifdef APP-PLUS
|
|
||||||
// jpushModule.initJPushService()
|
|
||||||
// jpushModule.getRegistrationID(result => {
|
|
||||||
// // 绑定极光设备id
|
|
||||||
// this.formData.register_id = result.registerID
|
|
||||||
// console.log("设备----", this.formData)
|
|
||||||
// })
|
|
||||||
// // #endif
|
|
||||||
this.initTerminal();
|
this.initTerminal();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// 引用方式
|
// 引用方式
|
||||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
console.log('【sk】【引用方式】【jpushModule】【requireNativePlugin】')
|
// console.log('【sk】【引用方式】【jpushModule】【requireNativePlugin】')
|
||||||
|
|
||||||
// 开启 debug 模式,默认是关闭
|
// 开启 debug 模式,默认是关闭
|
||||||
function openDebug() {
|
function openDebug() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user