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