'增加城市图片'
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 beijing from "../../images/beijing.jpg";
|
||||||
import shanghai from "../../images/shanghai.jpg";
|
import shanghai from "../../images/shanghai.jpg";
|
||||||
import shenzhen from "../../images/shenzhen.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 {
|
// export default class Index extends Component {
|
||||||
const Index = () => {
|
const Index = () => {
|
||||||
@@ -51,15 +62,18 @@ const Index = () => {
|
|||||||
dom: custDom(),
|
dom: custDom(),
|
||||||
},
|
},
|
||||||
{ 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: shenzhen, type: "item", dom: "" },
|
{ cityName: "武汉", img: wuhan, type: "item", dom: "" },
|
||||||
{ cityName: "杭州", img: shenzhen, type: "item", dom: "" },
|
{ cityName: "杭州", img: hangzhou, type: "item", dom: "" },
|
||||||
{ cityName: "大理", img: shenzhen, type: "item", dom: "" },
|
{ cityName: "大理", img: dali, type: "item", dom: "" },
|
||||||
{ cityName: "重庆", img: shenzhen, type: "item", dom: "" },
|
{ cityName: "鹤岗", img: dali, type: "item", dom: "" },
|
||||||
{ cityName: "荆州", img: shenzhen, type: "item", dom: "" },
|
{ cityName: "成都", img: chengdu, type: "item", dom: "" },
|
||||||
{ cityName: "长沙", img: shenzhen, 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) => {
|
].map((item, index) => {
|
||||||
if (item.type === "custom") {
|
if (item.type === "custom") {
|
||||||
// 根据屏幕变化,添加自定义组件
|
// 根据屏幕变化,添加自定义组件
|
||||||
@@ -79,10 +93,10 @@ const Index = () => {
|
|||||||
{/* 温度 */}
|
{/* 温度 */}
|
||||||
<View className="itemDownleft">29度</View>
|
<View className="itemDownleft">29度</View>
|
||||||
{/* 消费 */}
|
{/* 消费 */}
|
||||||
<View className="itemDownright">$1545/月</View>
|
<View className="itemDownright">¥1545/月</View>
|
||||||
</View>
|
</View>
|
||||||
<Image
|
<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"
|
// mode="heightFix"
|
||||||
src={item.img}
|
src={item.img}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.up {
|
.up {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200px;
|
min-height: 200px;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||