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

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

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