'增加城市图片'
BIN
src/images/changsha.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/images/chengdu.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/images/chongqing.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/images/dali.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/images/guangzhou.jpg
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
src/images/hangzhou.jpg
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
src/images/jingzhou.jpg
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
src/images/nanjing.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/wuhan.jpg
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
src/images/xian.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
@@ -27,6 +27,17 @@ import "animate.css";
|
||||
import beijing from "../../images/beijing.jpg";
|
||||
import shanghai from "../../images/shanghai.jpg";
|
||||
import shenzhen from "../../images/shenzhen.jpg";
|
||||
import guangzhou from "../../images/guangzhou.jpg";
|
||||
import wuhan from "../../images/wuhan.jpg";
|
||||
import hangzhou from "../../images/hangzhou.jpg";
|
||||
import dali from "../../images/dali.jpg";
|
||||
import chongqing from "../../images/chongqing.jpg";
|
||||
|
||||
import changsha from "../../images/changsha.jpg";
|
||||
import jingzhou from "../../images/jingzhou.jpg";
|
||||
import chengdu from "../../images/chengdu.jpg";
|
||||
import nanjing from "../../images/nanjing.jpg";
|
||||
import xian from "../../images/xian.jpg";
|
||||
|
||||
// export default class Index extends Component {
|
||||
const Index = () => {
|
||||
@@ -51,15 +62,18 @@ const Index = () => {
|
||||
dom: custDom(),
|
||||
},
|
||||
{ cityName: "深圳", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "广州", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "武汉", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "杭州", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "大理", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "重庆", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "荆州", img: shenzhen, type: "item", dom: "" },
|
||||
{ cityName: "长沙", img: shenzhen, type: "item", dom: "" },
|
||||
|
||||
{ cityName: "广州", img: guangzhou, type: "item", dom: "" },
|
||||
{ cityName: "武汉", img: wuhan, type: "item", dom: "" },
|
||||
{ cityName: "杭州", img: hangzhou, type: "item", dom: "" },
|
||||
{ cityName: "大理", img: dali, type: "item", dom: "" },
|
||||
{ cityName: "鹤岗", img: dali, type: "item", dom: "" },
|
||||
{ cityName: "成都", img: chengdu, type: "item", dom: "" },
|
||||
{ cityName: "南京", img: nanjing, type: "item", dom: "" },
|
||||
{ cityName: "西安", img: xian, type: "item", dom: "" },
|
||||
|
||||
{ cityName: "重庆", img: chongqing, type: "item", dom: "" },
|
||||
{ cityName: "长沙", img: changsha, type: "item", dom: "" },
|
||||
{ cityName: "荆州", img: jingzhou, type: "item", dom: "" },
|
||||
].map((item, index) => {
|
||||
if (item.type === "custom") {
|
||||
// 根据屏幕变化,添加自定义组件
|
||||
@@ -79,10 +93,10 @@ const Index = () => {
|
||||
{/* 温度 */}
|
||||
<View className="itemDownleft">29度</View>
|
||||
{/* 消费 */}
|
||||
<View className="itemDownright">$1545/月</View>
|
||||
<View className="itemDownright">¥1545/月</View>
|
||||
</View>
|
||||
<Image
|
||||
style="width: 100%;height: 100%;background: #fff;border-radius: 5%;z-index:0"
|
||||
style="width: 100%;height: 100%;background: #fff;border-radius: 5%;z-index:0;opacity: 0.93"
|
||||
// mode="heightFix"
|
||||
src={item.img}
|
||||
/>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
flex-direction: column;
|
||||
.up {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
min-height: 200px;
|
||||
background-color: red;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||