页面修改
This commit is contained in:
commit
3684c3a7ce
38
App.vue
38
App.vue
@ -1,9 +1,10 @@
|
||||
<script>
|
||||
// var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
//#ifdef APP-PLUS
|
||||
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
// #endif
|
||||
export default {
|
||||
onLaunch: async function () {
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
try {
|
||||
if (!this.$store.state.app.token) uni.redirectTo({
|
||||
@ -26,21 +27,34 @@
|
||||
// ida.push(result.messageID)
|
||||
// })
|
||||
},
|
||||
onShow: function() {
|
||||
onShow: function () {
|
||||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
</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 {
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
</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;">
|
||||
收货人姓名: {{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="left" v-if='goodsInfo.status==0'>
|
||||
@ -215,6 +217,60 @@
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -11,22 +12,22 @@
|
||||
type: String,
|
||||
default: '新增'
|
||||
},
|
||||
position:{
|
||||
position: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
my_btn_disabled:{
|
||||
my_btn_disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
click(){
|
||||
methods: {
|
||||
click() {
|
||||
this.$emit('click')
|
||||
}
|
||||
}
|
||||
@ -34,7 +35,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my_btn_new_btn{
|
||||
.my_btn_new_btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@ -47,7 +48,8 @@
|
||||
line-height: 90rpx;
|
||||
background-color: $theme-oa-color;
|
||||
}
|
||||
.my_btn_no_positon{
|
||||
|
||||
.my_btn_no_positon {
|
||||
width: 100%;
|
||||
border-radius: 0;
|
||||
color: #fff;
|
||||
@ -55,7 +57,8 @@
|
||||
line-height: 90rpx;
|
||||
background-color: $theme-oa-color;
|
||||
}
|
||||
.my_btn_disabled{
|
||||
|
||||
.my_btn_disabled {
|
||||
background-color: #666;
|
||||
color: #eee;
|
||||
}
|
||||
|
368
manifest.json
368
manifest.json
@ -1,33 +1,33 @@
|
||||
{
|
||||
"name": "供销综合平台",
|
||||
"appid": "__UNI__B5B1EDD",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"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
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"Payment": {},
|
||||
"Barcode": {},
|
||||
"Camera": {},
|
||||
"Maps": {}
|
||||
"modules" : {
|
||||
"Payment" : {},
|
||||
"Barcode" : {},
|
||||
"Camera" : {},
|
||||
"Maps" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"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\"/>",
|
||||
@ -48,113 +48,283 @@
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"payment": {
|
||||
"weixin": {
|
||||
"__platform__": ["ios", "android"],
|
||||
"appid": "wx4789d9f1b50390ba",
|
||||
"UniversalLinks": ""
|
||||
"sdkConfigs" : {
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx4789d9f1b50390ba",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"ad": {},
|
||||
"maps": {
|
||||
"amap": {
|
||||
"appkey_ios": "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"appkey_android": "0799f37420c0784f1e6cba230a68bdb1"
|
||||
"ad" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "0799f37420c0784f1e6cba230a68bdb1",
|
||||
"appkey_android" : "0799f37420c0784f1e6cba230a68bdb1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen": {
|
||||
"useOriginalMsgbox": true
|
||||
"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"
|
||||
"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"
|
||||
"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"
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nativePlugins" : {
|
||||
"JG-JCore" : {
|
||||
"JPUSH_APPKEY_ANDROID" : "5ced5ec5fa7bb86302944f0f",
|
||||
"JPUSH_APPKEY_IOS" : "5ced5ec5fa7bb86302944f0f",
|
||||
"JPUSH_CHANNEL_ANDROID" : "",
|
||||
"JPUSH_CHANNEL_IOS" : "",
|
||||
"__plugin_info__" : {
|
||||
"name" : "极光推送 JCore 官方 SDK",
|
||||
"description" : "极光推送 JCore 官方 SDK HBuilder 插件版本",
|
||||
"platforms" : "All,Android,iOS",
|
||||
"url" : "https://ext.dcloud.net.cn/plugin?id=4028",
|
||||
"android_package_name" : "uni.UNIB5B1EDD",
|
||||
"ios_bundle_id" : "uni.UNIB5B1EDD",
|
||||
"isCloud" : true,
|
||||
"bought" : 1,
|
||||
"pid" : "4028",
|
||||
"parameters" : {
|
||||
"JPUSH_APPKEY_ANDROID" : {
|
||||
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
|
||||
"key" : "JPUSH_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_APPKEY_IOS" : {
|
||||
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
|
||||
"key" : "JCore:APP_KEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_CHANNEL_ANDROID" : {
|
||||
"des" : "[Android]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key" : "JPUSH_CHANNEL",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_CHANNEL_IOS" : {
|
||||
"des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key" : "JCore:CHANNEL",
|
||||
"value" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"JG-JPush" : {
|
||||
"JPUSH_ADVERTISINGID_IOS" : "",
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS" : "",
|
||||
"JPUSH_GOOGLE_API_KEY" : "",
|
||||
"JPUSH_GOOGLE_APP_ID" : "",
|
||||
"JPUSH_GOOGLE_PROJECT_ID" : "",
|
||||
"JPUSH_GOOGLE_PROJECT_NUMBER" : "",
|
||||
"JPUSH_GOOGLE_STORAGE_BUCKET" : "",
|
||||
"JPUSH_HONOR_APPID" : "",
|
||||
"JPUSH_HUAWEI_APPID" : "",
|
||||
"JPUSH_ISPRODUCTION_IOS" : "",
|
||||
"JPUSH_MEIZU_APPID" : "",
|
||||
"JPUSH_MEIZU_APPKEY" : "",
|
||||
"JPUSH_OPPO_APPID" : "",
|
||||
"JPUSH_OPPO_APPKEY" : "",
|
||||
"JPUSH_OPPO_APPSECRET" : "",
|
||||
"JPUSH_VIVO_APPID" : "",
|
||||
"JPUSH_VIVO_APPKEY" : "",
|
||||
"JPUSH_XIAOMI_APPID" : "",
|
||||
"JPUSH_XIAOMI_APPKEY" : "",
|
||||
"__plugin_info__" : {
|
||||
"name" : "极光推送 JPush 官方 SDK",
|
||||
"description" : "极光推送JPush官方SDK HBuilder插件版本",
|
||||
"platforms" : "All,Android,iOS",
|
||||
"url" : "https://ext.dcloud.net.cn/plugin?id=4035",
|
||||
"android_package_name" : "uni.UNIB5B1EDD",
|
||||
"ios_bundle_id" : "uni.UNIB5B1EDD",
|
||||
"isCloud" : true,
|
||||
"bought" : 1,
|
||||
"pid" : "4035",
|
||||
"parameters" : {
|
||||
"JPUSH_ADVERTISINGID_IOS" : {
|
||||
"des" : "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
|
||||
"key" : "JPush:ADVERTISINGID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS" : {
|
||||
"des" : "[iOS]是否默认初始化,是填true,不是填false或者不填",
|
||||
"key" : "JPush:DEFAULTINITJPUSH",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_GOOGLE_API_KEY" : {
|
||||
"des" : "厂商google api_key,示例:g-12346578",
|
||||
"key" : "google_api_key",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_GOOGLE_APP_ID" : {
|
||||
"des" : "厂商google mobilesdk_app_id,示例:g-12346578",
|
||||
"key" : "google_app_id",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_GOOGLE_PROJECT_ID" : {
|
||||
"des" : "厂商google project_id ,示例:g-12346578",
|
||||
"key" : "project_id",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_GOOGLE_PROJECT_NUMBER" : {
|
||||
"des" : "厂商google project_number,示例:g-12346578",
|
||||
"key" : "gcm_defaultSenderId",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_GOOGLE_STORAGE_BUCKET" : {
|
||||
"des" : "厂商google storage_bucket,示例:g-12346578",
|
||||
"key" : "google_storage_bucket",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_HONOR_APPID" : {
|
||||
"des" : "厂商HONOR-appId,示例:12346578",
|
||||
"key" : "com.hihonor.push.app_id",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_HUAWEI_APPID" : {
|
||||
"des" : "厂商HUAWEI-appId,示例:appid=12346578",
|
||||
"key" : "com.huawei.hms.client.appid",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_ISPRODUCTION_IOS" : {
|
||||
"des" : "[iOS]是否是生产环境,是填true,不是填false或者不填",
|
||||
"key" : "JPush:ISPRODUCTION",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPID" : {
|
||||
"des" : "厂商MEIZU-appId,示例:MZ-12345678",
|
||||
"key" : "MEIZU_APPID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPKEY" : {
|
||||
"des" : "厂商MEIZU-appKey,示例:MZ-12345678",
|
||||
"key" : "MEIZU_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_OPPO_APPID" : {
|
||||
"des" : "厂商OPPO-appId,示例:OP-12345678",
|
||||
"key" : "OPPO_APPID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_OPPO_APPKEY" : {
|
||||
"des" : "厂商OPPO-appkey,示例:OP-12345678",
|
||||
"key" : "OPPO_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_OPPO_APPSECRET" : {
|
||||
"des" : "厂商OPPO-appSecret,示例:OP-12345678",
|
||||
"key" : "OPPO_APPSECRET",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_VIVO_APPID" : {
|
||||
"des" : "厂商VIVO-appId,示例:12345678",
|
||||
"key" : "com.vivo.push.app_id",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_VIVO_APPKEY" : {
|
||||
"des" : "厂商VIVO-appkey,示例:12345678",
|
||||
"key" : "com.vivo.push.api_key",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPID" : {
|
||||
"des" : "厂商XIAOMI-appId,示例:MI-12345678",
|
||||
"key" : "XIAOMI_APPID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPKEY" : {
|
||||
"des" : "厂商XIAOMI-appKey,示例:MI-12345678",
|
||||
"key" : "XIAOMI_APPKEY",
|
||||
"value" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
"h5": {
|
||||
"devServer": {
|
||||
"proxy": {
|
||||
"baseUrlTest/adminapi": {
|
||||
"target": "https://worker-task.lihaink.cn",
|
||||
"changeOrigin": true,
|
||||
"pathRewrite": {
|
||||
"^/baseUrlTest/adminapi": "/adminapi"
|
||||
"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"
|
||||
"baseUrlTest/api" : {
|
||||
"target" : "https://worker-task.lihaink.cn",
|
||||
"changeOrigin" : true,
|
||||
"pathRewrite" : {
|
||||
"^/baseUrlTest/api" : "/api"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"amap": {
|
||||
"key": "275cd3601b1b2d6414f6c988e7911664",
|
||||
"securityJsCode": "d2d7c56801819e8bdf71b8a71846f235",
|
||||
"serviceHost": ""
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"key" : "275cd3601b1b2d6414f6c988e7911664",
|
||||
"securityJsCode" : "d2d7c56801819e8bdf71b8a71846f235",
|
||||
"serviceHost" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "wx6e14cb98394e36bc",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx6e14cb98394e36bc",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents": true
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion": "2"
|
||||
"vueVersion" : "2"
|
||||
}
|
||||
|
@ -8,9 +8,9 @@
|
||||
<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">
|
||||
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
|
||||
:markers='markers' :scale="scale" style="width:100%;height: 70%;"
|
||||
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
|
||||
<cover-image class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
||||
</cover-image>
|
||||
</map>
|
||||
@ -80,10 +80,12 @@
|
||||
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 200rpx;height: 1px;">
|
||||
<!-- 565 -->
|
||||
</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 @click="qrqodeFn" type="primary" style="background-color: #0122C7;border: 0;">
|
||||
<u-icon name="scan" color="white" size="30" style="margin-right: 10rpx;"></u-icon>
|
||||
扫码取货</u-button>
|
||||
</view>
|
||||
</view>
|
||||
@ -103,7 +105,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
mapClass: 'custom-map',
|
||||
showLoading: true,
|
||||
showPop: false,
|
||||
goodsDetil: undefined,
|
||||
@ -152,7 +154,7 @@
|
||||
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()
|
||||
@ -250,7 +252,7 @@
|
||||
points: points,
|
||||
color: "#0091ff",
|
||||
dottedLine: true,
|
||||
width: 10,
|
||||
width: 30,
|
||||
|
||||
}, ];
|
||||
},
|
||||
@ -286,8 +288,6 @@
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
getDetil({
|
||||
@ -306,6 +306,10 @@
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.custom-map /deep/ .polyline {
|
||||
stroke-width: 20px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 2vh 3vw;
|
||||
background-color: #F6F7FC;
|
||||
@ -392,6 +396,12 @@
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 200rpx;
|
||||
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
width: 90vw;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
}
|
||||
</style>
|
@ -1,49 +1,64 @@
|
||||
<template>
|
||||
<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>
|
||||
<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 class="content">
|
||||
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='white'
|
||||
v-model="keywords"></u-search>
|
||||
<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>
|
||||
<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
|
||||
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>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
getList
|
||||
} from "@/api/logistics.js"
|
||||
// import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue"
|
||||
import {
|
||||
} 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 {
|
||||
} 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,
|
||||
// globalPopup
|
||||
globalPopup
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
notArr: [],
|
||||
keywords: "",
|
||||
@ -59,18 +74,18 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
go() {
|
||||
go () {
|
||||
uni.navigateTo({
|
||||
url: "/pages/logistics/te"
|
||||
})
|
||||
},
|
||||
sectionChange(index) {
|
||||
sectionChange (index) {
|
||||
|
||||
this.curNow = index.index;
|
||||
this.getOrderList()
|
||||
},
|
||||
|
||||
showToast() {
|
||||
showToast () {
|
||||
// 6
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
@ -79,16 +94,16 @@
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
|
||||
})
|
||||
},
|
||||
showToast2() {
|
||||
showToast2 () {
|
||||
// 6
|
||||
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: "取件码不能为空",
|
||||
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
|
||||
}, )
|
||||
},)
|
||||
},
|
||||
getOrderList() {
|
||||
getOrderList () {
|
||||
console.log("列表更新")
|
||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
||||
getList({
|
||||
@ -102,10 +117,10 @@
|
||||
}
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
onLoad () {
|
||||
let that = this
|
||||
//#ifdef APP-PLUS
|
||||
jpushModule.addNotificationListener(function(result) {
|
||||
jpushModule.addNotificationListener(function (result) {
|
||||
if (!that.notArr.includes(result.messageID)) {
|
||||
that.$refs.globalPopup.showPopu();
|
||||
that.getOrderList()
|
||||
@ -115,18 +130,18 @@
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
onShow () {
|
||||
this.getOrderList()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.content {
|
||||
.content {
|
||||
margin-top: 2vh;
|
||||
background-color: #F5F5F5;
|
||||
background-color: #f5f5f5;
|
||||
padding: 0vh 2vw;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -11,7 +11,83 @@
|
||||
</p>
|
||||
<p class="tit" v-if="goodsDetil.logistics.status==2" style="background-color: #47BE62;">
|
||||
订单编号: {{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="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="list">
|
||||
@ -86,8 +162,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 已取货 -->
|
||||
<view class="left" v-else>
|
||||
<view class="list">
|
||||
<view class="left" v-if="goodsDetil.logistics.status==1">
|
||||
<view class=" list">
|
||||
<text>
|
||||
用户名称
|
||||
</text>
|
||||
@ -145,12 +221,10 @@
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="total" v-if="goodsDetil.logistics.status==2">
|
||||
<view class="total" v-if="goodsDetil.logistics.status==2||goodsDetil.logistics.status==3">
|
||||
<text>共计{{goodsDetil.product_count}}件 </text>
|
||||
</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;"
|
||||
@click="showPop=true"><u-icon name="car-fill" color="white" size="25"
|
||||
style="margin-right: 10rpx;;"></u-icon>
|
||||
@ -254,6 +328,15 @@
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
width: 90vw;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
}
|
||||
|
||||
.order {
|
||||
position: relative;
|
||||
background-color: white;
|
||||
|
@ -2,19 +2,26 @@
|
||||
<view class="oa_home" style="oaColor">
|
||||
<!-- <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 -->
|
||||
<view style="height: var(--status-bar-height)"></view>
|
||||
<view style="height: 100rpx"></view>
|
||||
<!-- #endif -->
|
||||
<view class="my_info ">
|
||||
<view class="my_info">
|
||||
<view class="head_img">
|
||||
<view class="img_box">
|
||||
<u--image :showLoading="true" width="131.43rpx" height="131.43rpx"
|
||||
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'" shape="circle"></u--image>
|
||||
<u--image
|
||||
:showLoading="true"
|
||||
width="131.43rpx"
|
||||
height="131.43rpx"
|
||||
:src="myOaInfo.avatar || '../../static/img/public/avatar.png'"
|
||||
shape="circle"
|
||||
></u--image>
|
||||
</view>
|
||||
|
||||
|
||||
<text class="nickname">工作证: {{ myOaInfo.nickname }}</text>
|
||||
<text>身份: {{ myOaInfo.admin_id ? "超级管理员" : "普通用户" }}</text>
|
||||
</view>
|
||||
@ -54,37 +61,51 @@
|
||||
</block>
|
||||
</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="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">
|
||||
<uni-icons type="forward"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="ApproveList.length > 0">
|
||||
|
||||
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
|
||||
:key="index" @click="clickNotice(item.id)">
|
||||
|
||||
<view class="text"> <text class="text_time">{{item.create_time.substring(0, 10)}}</text>
|
||||
<view
|
||||
class="backlog_item flex_a_c_j_sb"
|
||||
v-for="(item, index) in ApproveList.slice(0, 2)"
|
||||
:key="index"
|
||||
@click="clickNotice(item.id)"
|
||||
>
|
||||
<view class="text">
|
||||
<text class="text_time">{{
|
||||
item.create_time.substring(0, 10)
|
||||
}}</text>
|
||||
{{ item.title }}
|
||||
</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>
|
||||
</block>
|
||||
<view v-else class="backlog_no flex_a_c_j_sb">
|
||||
<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 class="my_task">
|
||||
<view class="task_title flex_a_c_j_sb">
|
||||
<view class="title">工作管理</view>
|
||||
<view class="flex_a_c">更多
|
||||
<view class="flex_a_c"
|
||||
>更多
|
||||
<view class="iconfont icon-you">
|
||||
<uni-icons type="forward"></uni-icons>
|
||||
</view>
|
||||
@ -92,11 +113,15 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="fast_track">
|
||||
<block v-for="(item, index) in oaHomeData" :key="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>
|
||||
</block>
|
||||
@ -105,7 +130,8 @@
|
||||
<view class="my_task">
|
||||
<view class="task_title flex_a_c_j_sb">
|
||||
<view class="title">配送信息</view>
|
||||
<view class="flex_a_c" @click="goOrderList">更多
|
||||
<view class="flex_a_c" @click="goOrderList"
|
||||
>更多
|
||||
<view class="iconfont icon-you">
|
||||
<uni-icons type="forward"></uni-icons>
|
||||
</view>
|
||||
@ -116,13 +142,20 @@
|
||||
<taskCard></taskCard>
|
||||
</block> -->
|
||||
<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>
|
||||
</view>
|
||||
|
||||
<view v-else class="no_task">
|
||||
<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 class="head_title flex_a_c_j_sb">
|
||||
<view class="">我的任务</view>
|
||||
@ -161,88 +194,106 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue"
|
||||
import {
|
||||
getList
|
||||
} from "@/api/logistics.js"
|
||||
import {
|
||||
Toast
|
||||
} from '@/libs/uniApi.js'
|
||||
import {
|
||||
oaHomeData
|
||||
} from '@/static/server/server.js'
|
||||
import {
|
||||
noticeList
|
||||
} from "@/api/notice.js"
|
||||
// import tabbar from '../components/tabbar'
|
||||
import {
|
||||
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue";
|
||||
import globalPopup from "@/components/GlobalPopup/GlobalPopup.vue";
|
||||
import { getList } from "@/api/logistics.js";
|
||||
import { Toast } from "@/libs/uniApi.js";
|
||||
import { oaHomeData } from "@/static/server/server.js";
|
||||
import { noticeList } from "@/api/notice.js";
|
||||
// import tabbar from '../components/tabbar'
|
||||
import {
|
||||
getIndexListAPI,
|
||||
getTaskListAPI,
|
||||
getMyTaskListAPI,
|
||||
getApproveListAPI,
|
||||
getUserIndexAPI
|
||||
} from '@/api/oaApi.js'
|
||||
export default {
|
||||
getUserIndexAPI,
|
||||
} from "@/api/oaApi.js";
|
||||
//#ifdef APP-PLUS
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
// #endif
|
||||
export default {
|
||||
components: {
|
||||
// tabbar
|
||||
logistiBriefCard
|
||||
logistiBriefCard,
|
||||
globalPopup,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
notArr: [],
|
||||
orderList: [],
|
||||
oaHomeData: [],
|
||||
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
||||
assessData: [{
|
||||
num: '0',
|
||||
name: '任务'
|
||||
src: "https://cdn.uviewui.com/uview/album/1.jpg",
|
||||
assessData: [
|
||||
{
|
||||
num: "0",
|
||||
name: "任务",
|
||||
},
|
||||
{
|
||||
num: '0',
|
||||
name: '已完成'
|
||||
num: "0",
|
||||
name: "已完成",
|
||||
},
|
||||
{
|
||||
num: '0',
|
||||
name: '未完成'
|
||||
num: "0",
|
||||
name: "未完成",
|
||||
},
|
||||
{
|
||||
num: '0%',
|
||||
name: '完成率'
|
||||
num: "0%",
|
||||
name: "完成率",
|
||||
},
|
||||
],
|
||||
project: {},
|
||||
task: {},
|
||||
page: 1,
|
||||
myTaskList: [],
|
||||
flowState: '#47B347', // 任务状态
|
||||
priority: '', // 任务紧急度
|
||||
flowState: "#47B347", // 任务状态
|
||||
priority: "", // 任务紧急度
|
||||
myOaInfo: {
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
mobile: '',
|
||||
did_name: '',
|
||||
label_name: '',
|
||||
avatar: "",
|
||||
nickname: "",
|
||||
mobile: "",
|
||||
did_name: "",
|
||||
label_name: "",
|
||||
},
|
||||
ApproveList: []
|
||||
}
|
||||
ApproveList: [],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff',
|
||||
backgroundColor: '#3175f9'
|
||||
})
|
||||
frontColor: "#ffffff",
|
||||
backgroundColor: "#3175f9",
|
||||
});
|
||||
},
|
||||
onLoad() {
|
||||
//#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
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
// this.getUserIndex()
|
||||
// this.getIndexList()
|
||||
this.getApproveList()
|
||||
this.initUserInfo()
|
||||
this.showToask()
|
||||
this.initOaHomeDada()
|
||||
this.getOrderList()
|
||||
this.getApproveList();
|
||||
this.initUserInfo();
|
||||
this.showToask();
|
||||
this.initOaHomeDada();
|
||||
this.getOrderList();
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
test() {
|
||||
this.$refs.globalPopup.showPopu();
|
||||
},
|
||||
// test() {
|
||||
// wx.chooseMessageFile({
|
||||
// count: 1, //限制选择的文件数量
|
||||
@ -256,90 +307,91 @@
|
||||
// })
|
||||
// },
|
||||
async getOrderList() {
|
||||
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id || ""
|
||||
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
||||
let res = await getList({
|
||||
courier_id: id
|
||||
courier_id: id,
|
||||
// courier_id: 167
|
||||
})
|
||||
this.orderList = res.data.data
|
||||
|
||||
});
|
||||
this.orderList = res.data.data;
|
||||
},
|
||||
goOrderList() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/logistics/index"
|
||||
})
|
||||
url: "/pages/logistics/index",
|
||||
});
|
||||
},
|
||||
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() {
|
||||
if (this.$store.state.app.userInfo.admin_id == 0) { // 如果用户不是管理员
|
||||
let arr = oaHomeData.filter(item => !item.admin); //过滤掉管理员专属页面
|
||||
if (this.$store.state.app.userInfo.admin_id == 0) {
|
||||
// 如果用户不是管理员
|
||||
let arr = oaHomeData.filter((item) => !item.admin); //过滤掉管理员专属页面
|
||||
this.oaHomeData = arr;
|
||||
} else {
|
||||
// this.oaHomeData = oaHomeData;
|
||||
let arr = oaHomeData.filter(item => !item.captain); //过滤掉普通用户专属页面
|
||||
let arr = oaHomeData.filter((item) => !item.captain); //过滤掉普通用户专属页面
|
||||
this.oaHomeData = arr;
|
||||
}
|
||||
if (this.$store.state.app.userInfo?.company?.company_type_name == '平台公司') {
|
||||
this.oaHomeData = this.oaHomeData.filter(item => {
|
||||
return item.text == '人员管理' ? false : true;
|
||||
})
|
||||
if (
|
||||
this.$store.state.app.userInfo?.company?.company_type_name == "平台公司"
|
||||
) {
|
||||
this.oaHomeData = this.oaHomeData.filter((item) => {
|
||||
return item.text == "人员管理" ? false : true;
|
||||
});
|
||||
}
|
||||
// 判断是否需要显示更多按钮
|
||||
if (this.oaHomeData >= 8) {
|
||||
this.oaHomeData[7] = this.oaHomeData[this.oaHomeData.length - 1];
|
||||
} else {
|
||||
this.oaHomeData.splice(this.oaHomeData.length - 1, 1)
|
||||
this.oaHomeData.splice(this.oaHomeData.length - 1, 1);
|
||||
}
|
||||
},
|
||||
async getApproveList() {
|
||||
const res = await noticeList({
|
||||
keyword: '',
|
||||
keyword: "",
|
||||
page_no: 1,
|
||||
page_size: 2
|
||||
})
|
||||
this.ApproveList = res.data.lists
|
||||
page_size: 2,
|
||||
});
|
||||
this.ApproveList = res.data.lists;
|
||||
},
|
||||
async getIndexList() {
|
||||
const {
|
||||
project,
|
||||
task
|
||||
} = await getIndexListAPI()
|
||||
console.log(task, '222');
|
||||
this.assessData[0].num = project.count
|
||||
this.assessData[1].num = project.count_ok
|
||||
this.assessData[2].num = project.count_no
|
||||
this.assessData[3].num = project.count_lv + '%'
|
||||
this.assessData[4].num = task.count
|
||||
this.assessData[5].num = task.count_ok
|
||||
this.assessData[6].num = task.count_no
|
||||
this.assessData[7].num = task.count_lv + '%'
|
||||
this.myTaskList = task.list
|
||||
const { project, task } = await getIndexListAPI();
|
||||
console.log(task, "222");
|
||||
this.assessData[0].num = project.count;
|
||||
this.assessData[1].num = project.count_ok;
|
||||
this.assessData[2].num = project.count_no;
|
||||
this.assessData[3].num = project.count_lv + "%";
|
||||
this.assessData[4].num = task.count;
|
||||
this.assessData[5].num = task.count_ok;
|
||||
this.assessData[6].num = task.count_no;
|
||||
this.assessData[7].num = task.count_lv + "%";
|
||||
this.myTaskList = task.list;
|
||||
},
|
||||
async getMyTask() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: 10
|
||||
}
|
||||
const res = getMyTaskListAPI(data)
|
||||
limit: 10,
|
||||
};
|
||||
const res = getMyTaskListAPI(data);
|
||||
},
|
||||
naviTaskDetails(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/views/task_details?id=${id}`
|
||||
})
|
||||
url: `/pages/views/task_details?id=${id}`,
|
||||
});
|
||||
},
|
||||
navTo(url) {
|
||||
url ?
|
||||
uni.navigateTo({
|
||||
url
|
||||
? uni.navigateTo({
|
||||
url: url,
|
||||
fail() {
|
||||
uni.switchTab({
|
||||
url: url
|
||||
url: url,
|
||||
});
|
||||
},
|
||||
})
|
||||
}
|
||||
}) : Toast('暂未开放')
|
||||
: Toast("暂未开放");
|
||||
},
|
||||
navTwo(url, key) {
|
||||
let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
|
||||
@ -347,8 +399,8 @@
|
||||
|
||||
if (role_id && role_id[0] == 9) {
|
||||
if (arr.indexOf(key) == -1) {
|
||||
Toast('请先成立公司后开放')
|
||||
return false
|
||||
Toast("请先成立公司后开放");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
this.navTo(url);
|
||||
@ -356,53 +408,53 @@
|
||||
// 点击公告
|
||||
clickNotice(e) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/oaNews/oaNews?id=${e}`
|
||||
})
|
||||
url: `/pages/oaNews/oaNews?id=${e}`,
|
||||
});
|
||||
},
|
||||
// 判断当前是否登录,显示任务及完成率
|
||||
showToask() {
|
||||
if (!this.$store.state.app.token) {
|
||||
this.assessData = this.assessData.map(item => {
|
||||
item.num = '*';
|
||||
this.assessData = this.assessData.map((item) => {
|
||||
item.num = "*";
|
||||
return item;
|
||||
})
|
||||
});
|
||||
} else {
|
||||
// 新增接口后要替换为接口
|
||||
this.assessData = this.assessData.map(item => {
|
||||
item.num = '0';
|
||||
this.assessData = this.assessData.map((item) => {
|
||||
item.num = "0";
|
||||
return item;
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
login() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/oaLogin/oaLogin'
|
||||
})
|
||||
url: "/pages/oaLogin/oaLogin",
|
||||
});
|
||||
},
|
||||
async getUserIndex() {
|
||||
const res = await getUserIndexAPI()
|
||||
this.myOaInfo = res
|
||||
}
|
||||
const res = await getUserIndexAPI();
|
||||
this.myOaInfo = res;
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// this.getIndexList()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.oa_home {
|
||||
.oa_home {
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.header_bg {
|
||||
.header_bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
// z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.home_header {
|
||||
.home_header {
|
||||
position: relative;
|
||||
padding: 28rpx;
|
||||
// height: 607.02rpx;
|
||||
@ -415,7 +467,7 @@
|
||||
|
||||
.head_img {
|
||||
position: relative;
|
||||
background-color: #FF7C32;
|
||||
background-color: #ff7c32;
|
||||
width: 100%;
|
||||
height: 105.14rpx;
|
||||
line-height: 105.14rpx;
|
||||
@ -555,13 +607,13 @@
|
||||
.backlog_no_data {
|
||||
bottom: -70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.home_header_no_data {
|
||||
.home_header_no_data {
|
||||
margin-bottom: 93.33rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fast_track {
|
||||
.fast_track {
|
||||
width: 694rpx;
|
||||
// height: 331rpx;
|
||||
display: flex;
|
||||
@ -585,9 +637,9 @@
|
||||
margin-top: 14.04rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.my_task {
|
||||
.my_task {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
// margin-top: 31.58rpx;
|
||||
@ -700,9 +752,9 @@
|
||||
font-size: 24.56rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no_login {
|
||||
.no_login {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
@ -740,5 +792,5 @@
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -21,12 +21,14 @@
|
||||
</view>
|
||||
<input
|
||||
v-if="current == 0"
|
||||
@click="getId"
|
||||
class="mobile item"
|
||||
v-model="formData.account"
|
||||
placeholder="输入账号"
|
||||
/>
|
||||
<input
|
||||
v-if="current == 0"
|
||||
@click="getId"
|
||||
class="mobile item"
|
||||
v-model="formData.password"
|
||||
maxlength="26"
|
||||
@ -108,6 +110,19 @@ export default {
|
||||
this.current = e.index;
|
||||
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 () {
|
||||
if (!this.formData.account) return Toast('账号不能为空');
|
||||
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
|
||||
@ -124,7 +139,9 @@ export default {
|
||||
user: data,
|
||||
token: res.data.token
|
||||
})
|
||||
let { data } = await userInfo();
|
||||
let {
|
||||
data
|
||||
} = await userInfo();
|
||||
this.$store.commit('setUserInfo', data);
|
||||
uni.hideLoading()
|
||||
if (data.is_new_user) {
|
||||
@ -142,7 +159,6 @@ export default {
|
||||
} else uni.navigateTo({
|
||||
url: '/pages/updatePasswprd/updatePasswprd'
|
||||
});
|
||||
|
||||
},
|
||||
initTerminal () {
|
||||
// #ifndef APP-PLUS
|
||||
@ -199,14 +215,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// // #ifdef APP-PLUS
|
||||
// jpushModule.initJPushService()
|
||||
// jpushModule.getRegistrationID(result => {
|
||||
// // 绑定极光设备id
|
||||
// this.formData.register_id = result.registerID
|
||||
// console.log("设备----", this.formData)
|
||||
// })
|
||||
// // #endif
|
||||
|
||||
this.initTerminal();
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 引用方式
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
console.log('【sk】【引用方式】【jpushModule】【requireNativePlugin】')
|
||||
// console.log('【sk】【引用方式】【jpushModule】【requireNativePlugin】')
|
||||
|
||||
// 开启 debug 模式,默认是关闭
|
||||
function openDebug() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user