三轮车购买哦

This commit is contained in:
THK3121 2023-10-10 18:44:37 +08:00
parent 8de048e341
commit 8965c01b23
6 changed files with 90 additions and 15 deletions

22
App.vue
View File

@ -21,11 +21,16 @@
// uni.showModal({
// content: info.referrerInfo.extraData
// })
// console.log('App Launch:',info);
if (info.referrerInfo?.extraData?.uniMP) {
//宿App
uni.onHostEventReceive((event, data) => {
if(event=='getLocation') uni.$emit('uniMP_getLocation', data);
else if(event=='im'){
uni.navigateTo({
url:'/subpkg/chatMang/index'
})
}
});
uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP);
uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token);
@ -64,10 +69,25 @@
}
},
onShow: function() {
// uni.onHostEventReceive((event, data) => {
// // if(event=='getLocation') uni.$emit('uniMP_getLocation', data);
// });
// const audioContext = uni.createInnerAudioContext()
// //
// audioContext.src = '/static/mp3/order.mp3'
//
uni.onHostEventReceive((event,data)=>{
if(event=='im'){
uni.navigateTo({
url:'/subpkg/chatMang/index'
})
}else if(event=='re_id'){
uni.setStorageSync("re_id",data)
}
// console.log('Receive event('+event+') from HOST: '+JSON.stringify(data));
});
//#ifdef APP-PLUS
jpushModule.initJPushService()
jpushModule.addNotificationListener(res => {

View File

@ -3,8 +3,8 @@ let httpApi; // 总域名
let httpApiTwo; // 物流系统域名
let httpApiTest
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {
@ -22,7 +22,7 @@ switch (env) {
httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试
httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试
httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
httpApiTest = 'http://192.168.1.13:8081' //测试环境
httpApiTest = 'http://192.168.1.11:8081' //测试环境
}

View File

@ -119,8 +119,8 @@
</view>
</view>
<view class="" style="display: flex;">
<view class="brange">
99
<view class="brange" v-if="managerInfo.msg_num">
{{managerInfo.msg_num}}
</view>
<view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons>
@ -131,7 +131,7 @@
<view class="my_task">
<view class="task_title flex_a_c_j_sb">
<view class="title">工作管理</view>
<view class="title" @click="leftClick">工作管理</view>
<!-- <view class="flex_a_c"
>更多
<view class="iconfont icon-you">
@ -263,6 +263,7 @@ export default {
},
data () {
return {
brange:0,
options: {
data: '',
@ -313,14 +314,11 @@ export default {
};
},
async onLoad () {
await this.$onLaunched;
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")||'{}')?.is_captain
this.options.data = bj;
let user_id= JSON.parse( uni.getStorageSync("USER_INFO")).id
getAreaManagerApi({user_id}).then(res=>{
console.log(res.data)
this.managerInfo=res.data
})
//#ifdef APP-PLUS
let that = this;
jpushModule.addNotificationListener(function (result) {
@ -355,8 +353,16 @@ export default {
})
},
async onShow () {
// uni.navigateTo({
// url:'/subpkg/chatMang/index'
// }
// this.getUserIndex()
// this.getIndexList()
let user_id= JSON.parse( uni.getStorageSync("USER_INFO")).id
getAreaManagerApi({user_id}).then(res=>{
console.log(res.data)
this.managerInfo=res.data
})
await this.$onLaunched;
if (uni.getStorageSync('uniMP')) this.uniMP = true;
userInfo().then(({
@ -456,6 +462,7 @@ export default {
})
},
leftClick (e) {
console.log("发送给宿主")
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));

View File

@ -19,8 +19,13 @@
</view>
<view @longpress="copyText(item.content)" class="task-li-content" v-if="item.type=='text'"
style="margin-right: 10rpx;">
<view style="color: #576B95;" @click="href(item.content)" v-if="isLink(item.content)">
{{item.content}}
</view>
<view class="" v-else>
{{item.content}}
</view>
</view>
<!-- 图片 -->
<view class="task-li-content" v-if="item.type=='image'" style="margin-right: 10rpx;"
@tap="previewImage(item.content)">
@ -45,7 +50,15 @@
<!-- 文字 -->
<view class="task-li-content" @longpress="copyText(item.content)" v-if="item.type=='text'"
style="margin-right: 10rpx;">
{{item.content}}
<!-- {{item.content}} -->
<view style="color: #576B95;" @click="href(item.content)" v-if="isLink(item.content)">
{{item.content}}
</view>
<view class="" v-else>
{{item.content}}
</view>
<!-- <a href="item.content" target="_blank"> {{item.content}}</a> -->
</view>
<!-- 图片 -->
<view class="task-li-content" v-if="item.type=='image'" style="margin-right: 10rpx;"
@ -166,6 +179,15 @@
}
},
methods: {
isLink(text){
var pattern = /^(https?:\/\/|www\.|.*\.com).*$/i;
return pattern.test(text);
},
href(url){
// uni.navigate
plus.runtime.openURL(url);
// plus.runtime.openUrl(url)
},
previewImage(src) {
this.imageList[0]=src
uni.previewImage({
@ -546,6 +568,8 @@
// color: white;
word-break: break-all;
max-width: 60vw;
overflow-wrap: break-word;
}

View File

@ -23,7 +23,15 @@
<view class="car-info-r">
选择该车辆为监管车辆
<view class="" style="margin: 10rpx 50rpx;">
<checkbox @tap='change' activeBorderColor='red' color="#FFCC33" backgroundColor='#FFCC33'></checkbox>
<u-checkbox-group
v-model="checkboxValue1[index]"
placement="column"
@change="checkboxChange(index)"
>
<u-checkbox
>
</u-checkbox>
</u-checkbox-group>
</view>
</view>
@ -66,12 +74,24 @@
a:"https://tse3-mm.cn.bing.net/th/id/OIP-C.0xzWZj1_A-nzJiUBxrk8XQHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
carList:[1,1,1,1,1,1,,1,1,],
showPop:false,
checkList:[1,1,1,1,1,1,1,1]
checkList:[1,1,1,1,1,1,1,1],
checkboxValue1:[],
arr:[]
}
}
,methods:{
checkboxChange(i){
if(this.arr.includes(i)){
// this.arr
}else{
this.arr.push(i)
}
console.log(this.arr)
},
close() {
this.showPop=false
},

View File

@ -11,6 +11,10 @@
<u-empty text="你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统~" icon="../../static/img/empty/data.png">
</u-empty>
<view class="">
<mytn text='购买车辆' ></mytn>
</view>
<view>
<mytn text='申请用车' class="upCar" :position="false" @click="applycarFn"></mytn>