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

选择产品页 选择品牌页 页面搭建

parent af0189e5
......@@ -6,6 +6,19 @@
*/
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/photo/product",
"style": {
"navigationBarTitleText": "选择产品"
}
},
{
"path": "pages/photo/brand",
"style": {
"navigationBarTitleText": "选择品牌"
}
},
{
"path": "pages/photo/try",
......
<template>
<view class="backView">
<text class="topTitle">选择产品</text>
<view class="">
<view class="itemView u-m-t-80" v-for="(item,ikey) in brandList":key="ikey">
<text class="itemTitle" @click="itemClick(item)">{{item.title}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
brandList:[]
}
},
onLoad(e) {
this.getBrandList()
},
methods: {
getBrandList: function () {
this.brandList = [
{
'title':'广汽',
'id':0
},
{
'title':'比亚迪',
'id':1
}
]
},
//选择 点击
itemClick: function (item) {
},
}
}
</script>
<style>
.backView{
background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.topTitle{
margin-top: 80rpx;
font-size: 32rpx;
}
.itemView{
background-color: #999999;
width: 400rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.itemTitle{
font-size: 28rpx;
}
</style>
<template>
<view class="backView">
<text class="topTitle">选择产品</text>
<view class="">
<view class="itemView u-m-t-80" v-for="(item,ikey) in productList":key="ikey">
<text class="itemTitle" @click="itemClick(item)">{{item.title}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
productList:[]
}
},
onLoad(e) {
this.getProductList()
},
methods: {
getProductList: function(){
this.productList = [
{
'title':'新风机',
'id':0
},
{
'title':'充电桩',
'id':1
}
]
},
//选择 点击
itemClick: function (item) {
uni.navigateTo({
url:'/pages/photo/brand'
})
},
}
}
</script>
<style>
.backView{
background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.topTitle{
margin-top: 80rpx;
font-size: 32rpx;
}
.itemView{
background-color: #999999;
width: 400rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.itemTitle{
font-size: 28rpx;
}
</style>
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