新增首页状态、个人中心多图上传
parent
54d53d5634
commit
dfc4a926a2
|
@ -220,7 +220,7 @@
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
this.$requst.post('/universal/api.login/signout').then(res => {})
|
this.$requst.post('/universal/api.login/signout').then(res => {})
|
||||||
},
|
},
|
||||||
// 手机加星号
|
// 手机加星号
|
||||||
tel(tel="0000000000") {
|
tel(tel="0000000000") {
|
||||||
const telNum = tel.toString();
|
const telNum = tel.toString();
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
<view class="disac mar-s40">
|
<view class="disac mar-s40">
|
||||||
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in workOrderList" :key="index">
|
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in workOrderList" :key="index">
|
||||||
<view class="posir" style="height: 60rpx;">
|
<view class="posir" style="height: 60rpx;">
|
||||||
<image :style="{width: [59,56,58,58][index]+'rpx',height:[49,58,60,54][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
<image :style="{width: [59,56,58,51][index]+'rpx',height:[49,58,60,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101},
|
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101},
|
||||||
// {imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
|
// {imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
|
||||||
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:0,id:0},
|
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:0,id:0},
|
||||||
// {imgsrc:'/static/public/icon-home-stayCollection.png',title:'已完成',num:0,id:5},
|
{imgsrc:'/static/public/icon-home-completed.png',title:'已完成',num:0,id:5},
|
||||||
],
|
],
|
||||||
// 结算情况
|
// 结算情况
|
||||||
settlementList:[
|
settlementList:[
|
||||||
|
|
|
@ -237,18 +237,27 @@
|
||||||
},
|
},
|
||||||
// 图片上传
|
// 图片上传
|
||||||
uploadImgEv(index){
|
uploadImgEv(index){
|
||||||
|
if(index==0 || index==1){
|
||||||
|
var countNum = 1;
|
||||||
|
}
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count:1,
|
count:countNum,
|
||||||
sourceType:['album'],
|
sourceType:['album'],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
let tempImg = res.tempFilePaths[0];
|
for(let i=0;i<res.tempFilePaths.length;i++){
|
||||||
uploadImg({path:tempImg}).then(res=>{
|
let tempImg = res.tempFilePaths[i];
|
||||||
if(res.code) {
|
uploadImg({path:tempImg}).then(res=>{
|
||||||
this.$toolAll.tools.showToast('上传成功');
|
if(res.code) {
|
||||||
this.imgList[index] = tempImg;
|
this.$toolAll.tools.showToast('上传成功');
|
||||||
this.temporaryImg[index] = res.data.id;
|
if(this.imgList[index]==''){
|
||||||
}
|
this.imgList[index] = tempImg;
|
||||||
})
|
}else{
|
||||||
|
this.imgList[index] =this.imgList[index] + ',' + tempImg;
|
||||||
|
}
|
||||||
|
this.temporaryImg[index] = res.data.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},fail:(err)=> {
|
},fail:(err)=> {
|
||||||
this.$toolAll.tools.checkQx(err.code);
|
this.$toolAll.tools.checkQx(err.code);
|
||||||
}
|
}
|
||||||
|
@ -259,18 +268,17 @@
|
||||||
let arr = [];
|
let arr = [];
|
||||||
// 不能滑动看其他的图片
|
// 不能滑动看其他的图片
|
||||||
this.imgList.forEach((item,index)=>{
|
this.imgList.forEach((item,index)=>{
|
||||||
if(current==index) arr.push(item);
|
if(current==index){
|
||||||
|
arr = item.split(',');
|
||||||
|
console.log(arr,33333)
|
||||||
|
};
|
||||||
})
|
})
|
||||||
if(arr.length) {
|
if(arr.length) {
|
||||||
if(arr[0]) {
|
uni.previewImage({
|
||||||
uni.previewImage({
|
current:current,
|
||||||
current:current,
|
urls: arr,
|
||||||
urls: arr,
|
success() {}
|
||||||
success() {}
|
})
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$toolAll.tools.showToast('请上传,再查看')
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.$toolAll.tools.showToast('请上传,再查看')
|
this.$toolAll.tools.showToast('请上传,再查看')
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue