Commit f281f92e authored by 和慭琛's avatar 和慭琛

接口对接 100% UI高保真还原 100%

parent 1d9b7a34
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
*/ */
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/photo/product",
"style": {
"navigationBarTitleText": "选择产品"
}
},
{ {
"path": "pages/photo/detail", "path": "pages/photo/detail",
"style": { "style": {
...@@ -13,6 +20,10 @@ ...@@ -13,6 +20,10 @@
} }
}, },
{ {
"path": "pages/photo/preview", "path": "pages/photo/preview",
"style": { "style": {
...@@ -27,12 +38,7 @@ ...@@ -27,12 +38,7 @@
} }
}, },
{
"path": "pages/photo/product",
"style": {
"navigationBarTitleText": "选择产品"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
url:'/pages/photo/list' url:'/pages/photo/list'
+ '?brand_code=' + this.brand_code + '?brand_code=' + this.brand_code
+ '&brand=' + this.brand + '&brand=' + this.brand
+ '&product_code=' + this.product_code
+ '&product=' + this.product, + '&product=' + this.product,
}) })
}, },
......
...@@ -3,14 +3,13 @@ ...@@ -3,14 +3,13 @@
<view class="topView"> <view class="topView">
<!--text class="topTitle">示范照片 ({{currentNumber}}/{{totalNumber}})</text--> <!--text class="topTitle">示范照片 ({{currentNumber}}/{{totalNumber}})</text-->
</view> </view>
<scroll-view scroll-x class="centerBackView"> <view class="centerBackView">
<image class="photoImage" @click="imageClick(item.image)" :src="item.image" mode="" v-for="(item,ikey) in photoList":key="ikey"></image> <image class="photoImage" @click="imageClick(current_image)" :src="current_image" mode="aspectFill"></image>
</scroll-view>
<view class="bottomView">
<view class="takeView" @click="takeClick">
<text class="takeText">按规范\n拍照</text>
</view>
</view> </view>
<view class="bottomView">
<image class="takeView" :src="icon_gotake" mode="" @click="takeClick"></image>
<image class="backIcon" :src="icon_arrow_down" mode="" @click="backClick"></image>
</view>
</view> </view>
</template> </template>
...@@ -18,33 +17,34 @@ ...@@ -18,33 +17,34 @@
export default { export default {
data() { data() {
return { return {
totalNumber:0, image_count:1,
currentNumber:1, current_count:1,
photoList:[] current_image:'',
icon_gotake:'https://qn-static.banshouhui.com/gotake.png',
icon_arrow_down:'https://qn-static.banshouhui.com/arrow_down.png',
} }
}, },
onLoad(e) { onLoad(e) {
this.initData() this.initData(e)
}, },
methods: { methods: {
initData: function () { initData: function (e) {
if(e && e.current_image){
this.current_image = e.current_image
}
this.photoList = [ if(e && e.image_count){
{ this.image_count = e.image_count
image:'https://qn-static.banshouhui.com/selected.png', }
},
{ if(e && e.current_count){
image:'https://qn-static.banshouhui.com/close_new.png', this.current_count = e.current_count
}, }
{
image:'https://qn-static.banshouhui.com/auth_notice_new.png',
}
]
this.totalNumber = this.photoList.length
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '走线照片 (' + this.currentNumber + '/'+ this.totalNumber + ')' title: '走线照片 (' + this.current_count + '/'+ this.image_count + ')'
}); });
}, },
...@@ -62,6 +62,12 @@ ...@@ -62,6 +62,12 @@
}) })
}, },
//返回 点击
backClick: function () {
uni.navigateBack({
})
},
} }
...@@ -97,14 +103,14 @@ ...@@ -97,14 +103,14 @@
} }
.centerBackView{ .centerBackView{
background-color: #007AFF; background-color: #333333;
height: 568rpx; height: 568rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.photoImage{ .photoImage{
background-color: #4CD964; background-color: #333333;
width: 750rpx; width: 750rpx;
height: 568rpx; height: 568rpx;
} }
...@@ -137,4 +143,14 @@ ...@@ -137,4 +143,14 @@
text-align: center; text-align: center;
} }
.backIcon{
background-color: #FFFFFF;
width: 54rpx;
height: 54rpx;
border-radius: 27rpx;
position: fixed;
left: 60rpx;
bottom: 50rpx;
}
</style> </style>
<template> <template>
<view class="backView"> <view class="backView">
<view class="topView"> <view class="topView">
<view :class="activeTop == ikey ? 'topItemView whiteBackColor' : 'topItemView FAbackColor' " @click="topItemClick(ikey,item)" v-for="(item,ikey) in topList":key="ikey"> <view :class="activeTop == ikey ? 'topItemView whiteBackColor' : 'topItemView FAbackColor' " @click="topItemClick(ikey,item)" v-for="(item,ikey) in dataList":key="ikey">
<text class="topActiveItemTitle" v-if="activeTop == ikey">{{item.title}}</text> <text class="topActiveItemTitle" v-if="activeTop == ikey">{{item.type}}</text>
<text class="topItemTitle" v-if="activeTop != ikey">{{item.title}}</text> <text class="topItemTitle" v-if="activeTop != ikey">{{item.type}}</text>
</view> </view>
</view> </view>
<view class="rightView"> <view class="rightView">
<view class="rightItemView" @click="rightItemClick(item,ikey)" v-for="(item,ikey) in rightList":key="ikey"> <view class="rightItemView" @click="rightItemClick(item,ikey)" v-for="(item,ikey) in rightList":key="ikey">
<view :class=" item.images ? 'rightContentView width_50' : 'rightContentView width_100' "> <view :class=" item.images ? 'rightContentView width_50' : 'rightContentView width_100' ">
<text class="rightTitle u-m-t-30 u-m-l-30">{{item.title}} ({{item.photoNumber}}张)</text> <text class="rightTitle u-m-t-30 u-m-l-30">{{item.name}} ({{item.image_count}}张)</text>
<text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.content}}</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.images"> <view class="rightImageView" v-if="item.images">
<image class="rightImage" src="" mode=""></image> <image class="rightImage" :src="item.images[0]" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
<!--text class="topTitle">{{topTitle}}</text-->
<!--view class="centerBackView">
<view class="leftView">
<view class="leftItemView" @click="leftItemClick(item,ikey)" v-for="(item,ikey) in leftList":key="ikey">
<text class="leftItemText">{{item.title}}</text>
</view>
</view>
<view class="rightView">
<view class="rightItemView" @click="rightItemClick(item,ikey)" v-for="(item,ikey) in rightList":key="ikey">
<view :class=" item.images ? 'rightContentView width_50' : 'rightContentView width_100' ">
<text class="rightTitle u-m-t-30 u-m-l-30">{{item.title}} ({{item.photoNumber}}张)</text>
<text class="rightContent u-m-t-30 u-m-l-30 u-p-b-30">{{item.content}}</text>
</view>
<view class="rightImageView" v-if="item.images">
<image class="rightImage" src="" mode=""></image>
</view>
</view>
</view>
</view-->
</view> </view>
</template> </template>
...@@ -48,22 +29,24 @@ ...@@ -48,22 +29,24 @@
activeTop:0, activeTop:0,
leftList:[], leftList:[],
rightList:[], rightList:[],
brand_code:'',
product:'', product:'',
product_code:'',
brand:'', brand:'',
brand_code:'',
dataList:[],
} }
}, },
onLoad(e) { onLoad(e) {
if(e && e.brand_code){
this.brand_code = e.brand_code
}
if(e && e.product){ if(e && e.product){
this.product = e.product this.product = e.product
} }
if(e && e.product_code){
this.product_code = e.product_code
}
if(e && e.brand){ if(e && e.brand){
this.brand = e.brand this.brand = e.brand
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -71,79 +54,56 @@ ...@@ -71,79 +54,56 @@
}); });
} }
this.topList = [ if(e && e.brand_code){
{'title':'安装阶段'}, this.brand_code = e.brand_code
{'title':'勘察部分'}, }
{'title':'一一阶段'},
{'title':'二二阶段'},
{'title':'三三阶段'},
{'title':'四四阶段'},
]
this.topTitle = this.product + '-' + this.brand this.topTitle = this.product + '-' + this.brand
this.getLeftData() this.getListData()
}, },
methods: { methods: {
getLeftData: function (){ getListData: function (){
this.$u.cloudApi.getstandard({brand_code:this.brand_code}).then(res =>{ console.log('getListData:')
console.log('product_code' + this.product_code)
console.log('brand_code' + this.brand_code)
let that = this
this.$u.cloudApi.getGroupStandard({product_code:this.product_code,brand_code:this.brand_code}).then(res =>{
console.log('获取规范标准数据:') console.log('获取规范标准数据:')
console.log(res) console.log(res)
if(res.result && res.result.length){
that.handleData(res)
}
}) })
this.leftList = [
{'title':'回单','id':0},
{'title':'回单','id':1},
{'title':'回单','id':2}
]
this.getRightData()
}, },
getRightData: function () { handleData: function (res){
this.rightList = [ this.dataList = res.result
{ var item = res.result[0]
'title':'电源点照片', this.rightList = item.list
'photoNumber':4,
'content':'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12',
'images':['asdasdasd.png','assdasdad.png','asdsds.png']
},
{
'title':'电源点照片',
'photoNumber':4,
'content':'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12',
'images':null
},
{
'title':'电源点照片',
'photoNumber':4,
'content':'拍照要求:232拍照要求131拍照要求23拍照要求123拍照要求12',
'images':['asdasdasd.png','assdasdad.png','asdsds.png']
},
]
}, },
//顶部点击 //顶部点击
topItemClick: function (ikey,item) { topItemClick: function (ikey,item) {
this.activeTop = ikey this.activeTop = ikey
this.rightList = item.list
}, },
//左侧点击
leftItemClick: function (item,ikey) {
this.getRightData()
},
//右侧点击 //右侧点击
rightItemClick: function (item,ikey) { rightItemClick: function (item,ikey) {
var current_image = item.images[ikey]
uni.navigateTo({ uni.navigateTo({
url:'/pages/photo/detail' url:'/pages/photo/detail'
+'?current_image=' + current_image
+'&image_count=' + item.image_count
+'&current_count=' + ikey,
}) })
}, },
...@@ -254,8 +214,8 @@ ...@@ -254,8 +214,8 @@
.topView{ .topView{
background-color: #007AFF; background-color: #FFFFFF;
width: 100%;
height: 96rpx; height: 96rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
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