Commit 8ad2fcb0 authored by 和慭琛's avatar 和慭琛

页面搭建

parent 80a253df
...@@ -6,6 +6,14 @@ ...@@ -6,6 +6,14 @@
*/ */
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "下单"
}
},
{ {
"path": "pages/photo/product", "path": "pages/photo/product",
...@@ -13,6 +21,17 @@ ...@@ -13,6 +21,17 @@
"navigationBarTitleText": "选择产品" "navigationBarTitleText": "选择产品"
} }
}, },
{
"path": "pages/photo/detail",
"style": {
"navigationBarTitleText": "图片展示"
}
},
{ {
"path": "pages/photo/list", "path": "pages/photo/list",
"style": { "style": {
...@@ -21,6 +40,10 @@ ...@@ -21,6 +40,10 @@
}, },
{ {
"path": "pages/photo/brand", "path": "pages/photo/brand",
"style": { "style": {
...@@ -36,13 +59,7 @@ ...@@ -36,13 +59,7 @@
} }
}, },
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "下单"
}
},
......
<template>
<view class="backView">
<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>
</view>
</template>
<script>
export default {
data() {
return {
totalNumber:0,
currentNumber:1,
photoList:[]
}
},
onLoad(e) {
this.initData()
},
methods: {
initData: function () {
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
},
//照片预览
imageClick: function (image) {
uni.previewImage({
urls: [image]
})
},
//拍照 点击
takeClick: function () {
uni.navigateTo({
url:'/pages/photo/try'
})
},
}
}
</script>
<style>
.backView{
background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.topView{
background-color: #000000;
width: 100%;
height: 15%;
display: flex;
align-items: center;
justify-content: center;
}
.topTitle{
font-size: 28rpx;
color: #FFFFFF;
}
.centerBackView{
background-color: #007AFF;
height: 800rpx;
display: flex;
flex-direction: row;
}
.photoImage{
background-color: #4CD964;
width: 750rpx;
height: 800rpx;
}
.bottomView{
background-color: #000000;
width: 100%;
height: 20%;
position: fixed;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
}
.takeView{
background-color: #FFFFFF;
width: 160rpx;
height: 160rpx;
border-radius: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.takeText{
font-size: 28rpx;
text-align: center;
}
</style>
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<text class="topTitle">{{topTitle}}</text> <text class="topTitle">{{topTitle}}</text>
<view class="centerBackView"> <view class="centerBackView">
<view class="leftView"> <view class="leftView">
<view class="leftItemView" v-for="(item,ikey) in leftList":key="ikey"> <view class="leftItemView" @click="leftItemClick(item,ikey)" v-for="(item,ikey) in leftList":key="ikey">
<text class="leftItemText">{{item.title}}</text> <text class="leftItemText">{{item.title}}</text>
</view> </view>
</view> </view>
<view class="rightView"> <view class="rightView">
<view class="rightItemView" 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.title}} ({{item.photoNumber}}张)</text>
<text class="rightContent u-m-t-30 u-m-l-30 u-p-b-30">{{item.content}}</text> <text class="rightContent u-m-t-30 u-m-l-30 u-p-b-30">{{item.content}}</text>
...@@ -33,16 +33,22 @@ ...@@ -33,16 +33,22 @@
}, },
onLoad(e) { onLoad(e) {
this.topTitle = '充电桩-北汽' this.topTitle = '充电桩-北汽'
this.getData() this.getLeftData()
}, },
methods: { methods: {
getData: function (){ getLeftData: function (){
this.leftList = [ this.leftList = [
{'title':'回单','id':0}, {'title':'回单','id':0},
{'title':'回单','id':1}, {'title':'回单','id':1},
{'title':'回单','id':2} {'title':'回单','id':2}
] ]
this.getRightData()
},
getRightData: function () {
this.rightList = [ this.rightList = [
{ {
'title':'电源点照片', 'title':'电源点照片',
...@@ -65,14 +71,19 @@ ...@@ -65,14 +71,19 @@
] ]
}, },
//拨打客服 点击 //左侧点击
phoneCallClick: function (phone) { leftItemClick: function (item,ikey) {
uni.makePhoneCall({ this.getRightData()
phoneNumber: phone
});
}, },
//右侧点击
rightItemClick: function (item,ikey) {
uni.navigateTo({
url:'/pages/photo/detail'
})
},
} }
} }
......
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