Commit 495e2482 authored by 李超鹏's avatar 李超鹏

Merge remote-tracking branch 'origin/dev-photo-v2' into dev-photo-v2

parents a1cd1203 e3a33888
......@@ -101,6 +101,7 @@ export default {
settleRecommend: '',
navHeight: 0, //导航栏高度
rpxScreenHeight: 0,// 照相视框高度
safeHeight:0, // 安全高度
//拍照相关数据
photo: {
product: {
......@@ -165,6 +166,8 @@ export default {
this.globalData.navHeight = a.statusBarHeight / a.screenWidth * 750 + 90
this.globalData.rpxScreenHeight = a.screenHeight / a.screenWidth * 750
this.globalData.screenHeight = a.screenHeight
this.globalData.safeHeight = a.safeArea.bottom
console.log(a,'a')
} catch (a) {
}
},
......
......@@ -105,18 +105,10 @@ export default {
if (res && util.getToken()) {
that.goBackPage()
} else {
uni.showToast({
title: '授权失败,请重新授权',
icon: 'none'
});
this.setLoginStatus()
}
}).catch(res => {
uni.hideLoading()
uni.showToast({
title: res.message,
icon: 'none'
});
this.setLoginStatus()
})
},
......@@ -141,9 +133,13 @@ export default {
return login.signup(params);
}).then(res => {
uni.hideLoading()
if (util.getToken()) {
if (res && util.getToken()) {
that.goBackPage()
} else {
uni.showToast({
title: '授权失败,请重新授权',
icon: 'none'
});
this.setLoginStatus(false)
}
}).catch(res => {
......
This diff is collapsed.
<template>
<view class="backView">
<u-loading style="position: absolute;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="backView">
<u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="topView">
<view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)" v-for="(item,ikey) in dataList" :key="ikey">
<text
......@@ -12,15 +12,15 @@
<view class="right-view-title">拍照项有:</view>
<template v-for="(item,ikey) in rightList">
<view class="rightItemView" @click="rightItemClick(item,ikey)" :key="ikey">
<view :class="['rightContentView', {'active':item.imageList.length > 0 || item.images.length > 0}]">
<view :class="['rightContentView', {'active':item.imageList.length > 0}]">
<text class="ph-lst-item-index">{{ ikey + 1 }}</text>
<text class="">{{item.name}}</text>
<image class="ph-list-item-arrow" src="/static/photo/arrow.png"></image>
<!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> -->
</view>
<view class="rightImageView" v-if="item.imageList.length > 0 || item.images.length > 0">
<image class="rightImage" v-for="(image, index) in (item.imageList.length > 0 ? item.imageList : item.images)" :src="image" :key="image"
@click.stop="handleClickImage(item, index)" mode=""></image>
<view class="rightImageView" v-if="item.imageList.length > 0">
<image class="rightImage" v-for="(image, index) in item.imageList" :src="image" :key="image"
@click.stop="handleClickImage(item, index)" mode="aspectFill"></image>
</view>
</view>
</template>
......@@ -72,7 +72,7 @@
},
methods: {
getListData: function() {
getListData: function() {
this.loading = true
let that = this
this.$u.cloudApi.getGroupStandardV2({
......@@ -80,7 +80,7 @@
'classify_id': this.classifyId,
'system_id': this.systemId,
'brand_id': this.brandId
}).then(res => {
}).then(res => {
this.loading = false
if (res && res.result) {
that.handleData(res.result)
......@@ -93,17 +93,19 @@
const globalData = getApp().globalData
globalData.photo.productList = result
this.dataList = result
var item = result[0]
globalData.photo.waterSetting = item.userWatermark
this.rightList = item.list
if (result.length > 0) {
var item = result[0]
globalData.photo.waterSetting = item.userWatermark
this.rightList = item.list
}
},
//顶部点击
handleTopItemChange: function(ikey, item) {
this.activeTop = ikey
this.rightList = item.list
this.rightList = item.list
const photo = getApp().globalData.photo
photo.topIndex = ikey
photo.topIndex = ikey
photo.waterSetting = item.userWatermark
uni.pageScrollTo({
scrollTop: 0,
......@@ -114,7 +116,7 @@
// 点击图片
handleClickImage(item, index) {
uni.previewImage({
urls: item.imageList.length > 0 ? item.imageList : item.images,
urls: item.imageList,
current:index
})
},
......@@ -197,7 +199,8 @@
margin: 0rpx 30rpx 20rpx 30rpx;
padding: 36rpx 30rpx 18rpx 30rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
background-color: #FFFFFF;
min-height: 108rpx;
}
.ph-lst-item-index {
......@@ -210,28 +213,29 @@
text-align: center;
border-width: 1px;
border-style: solid;
margin-right: 10rpx;
margin-right: 10rpx;
margin-top: 4rpx;
}
.rightContentView {
display: flex;
align-items: center;
width: 100%;
font-size: 30rpx;
align-items: flex-start;
width: 100%;
font-size: 30rpx;
color: #2272FF;
/* flex-direction: column; */
/* border-left: 2rpx solid #F3F3F3; */
}
.rightContentView.active {
color: #666666;
border-color: #666666;
}
.rightContentView.active {
color: #666666;
border-color: #666666;
}
.ph-list-item-arrow {
position: absolute;
width: 56rpx;
height: 56rpx;
right: 30rpx;
width: 40rpx;
height: 40rpx;
right: 38rpx;
}
.rightContent {
......@@ -276,12 +280,11 @@
justify-content: center;
-webkit-flex: 1;
flex: 1;
background-color: #FFFFFF;
color: #999999;
}
.topItemView.active {
color: #2272FF;
background-color: #FFFFFF;
color: #999999;
}
.topItemView.active {
color: #2272FF;
}
.topItemTitle {
......
......@@ -7,6 +7,7 @@
<image class="btn" :src="btn_remake" @click="remakePhoto"></image>
<image class="btn" :src="btn_continue" @click="continuePhoto"></image>
</view>
<image class="btn finish" src="/static/photo/finish.png" @click="finishPhoto"></image>
</view>
</template>
......@@ -19,7 +20,7 @@
return {
protocolContent: '',
btn_remake: 'https://qn-static.banshouhui.com/take_order/photo/remake.png',
btn_continue: 'https://qn-static.banshouhui.com/take_order/photo/continue.png',
btn_continue: '/static/photo/continue.png',
standardId: '',
images: [],
files: [],
......@@ -119,7 +120,12 @@
delta:1
})
},
finishPhoto(){
// 完成本项
uni.navigateBack({
delta:2
})
},
// 确认图片
continuePhoto() {
let self = this
......@@ -211,7 +217,7 @@
box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
background-color: #333333;
width: 100%;
padding:70rpx;
padding:70rpx 0;
position: fixed;
bottom: 0;
display: flex;
......@@ -223,4 +229,14 @@
height: 88rpx;
}
}
.btn{
display: block;
width: 232rpx;
height: 80rpx;
&.finish{
position: fixed;
top:30rpx;
right:30rpx;
}
}
</style>
<template>
<view class="backView">
<u-loading style="position: absolute;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<u-loading style="position: fixed;top: 50%;" :show="loading" size="36" mode="flower"></u-loading>
<view class="itemView firstItem">
<view class="itemTitleView">
<text class="itemTitle">保存原图</text>
......@@ -24,7 +24,7 @@
<switch class="itemSwitch" :checked="item['enable']" @change="itemChange(item, ikey)" color="#007AFF" />
</view>
<u-popup border-radius="10" v-model="isPopShow" safe-area-inset-bottom :mask-close-able="false" mode="center"
width="690rp" height="600rpx">
width="690rpx" height="600rpx" @close="handlePopClose">
<view class="popCenterView">
<text class="popTitle">设置自定义项</text>
<view class="inputBackView">
......@@ -48,12 +48,12 @@
<text class="popNoticeText u-m-t-20">示例:</text>
<text class="popNoticeText">工程队名称:蓝天工程队</text>
<view class="popBtnView">
<view class="popCancelBtn" @click="popCancelClick()">
<text class="popBtnText">取消</text>
</view>
<view class="popSaveBtn" @click="popSaveClick()">
<text class="popBtnText">保存</text>
</view>
<u-button :custom-style="customStyleCancel" hover-class="none" shape="circle" type="primary" @click="popCancelClick()">
取消
</u-button>
<u-button :custom-style="customStyleSave" shape="circle" type="primary" @click="popSaveClick()">
保存
</u-button>
</view>
</view>
</u-popup>
......@@ -98,6 +98,21 @@
},
showTitleSwitch() {
return this.result['lower_right'].hasOwnProperty('title_text')
},
customStyleCancel() {
return {
'background-color': '#D1D4D4',
'width': '280rpx',
'height': '96rpx'
}
},
customStyleSave() {
return {
'background-color': '##2272FF',
'width': '280rpx',
'height': '96rpx',
'margin-left': '50rpx'
}
}
},
onLoad(e) {
......@@ -205,7 +220,12 @@
this.currenItem = {
'watemark_text': '',
'watemark_value': ''
}
}
},
handlePopClose() {
this.showTipLeft = false,
this.showTipRight = false
},
//自定义弹窗 保存
......@@ -395,10 +415,10 @@
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
justify-content: center;
}
.popCancelBtn {
/* .popCancelBtn {
background-color: #D1D4D4;
width: 280rpx;
height: 96rpx;
......@@ -407,9 +427,9 @@
display: flex;
align-items: center;
justify-content: center;
}
} */
.popSaveBtn {
/* .popSaveBtn {
background-color: #2272FF;
width: 280rpx;
height: 96rpx;
......@@ -418,11 +438,11 @@
display: flex;
align-items: center;
justify-content: center;
}
} */
.popBtnText {
/* .popBtnText {
font-size: 32rpx;
color: #FFFFFF;
font-weight: 600;
}
} */
</style>
This diff is collapsed.
take-order/static/photo/arrow.png

4.86 KB | W: | H:

take-order/static/photo/arrow.png

3.61 KB | W: | H:

take-order/static/photo/arrow.png
take-order/static/photo/arrow.png
take-order/static/photo/arrow.png
take-order/static/photo/arrow.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -35,11 +35,6 @@ function authorization(data) {
app.setUserData(res.data)
resolve(res);
} else {
uni.showModal({
title: '用户登录失败',
content: res.message,
showCancel: false
});
reject(res);
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment