RN-微信钱包页面布局

此博客展示了使用React Native编写的微信相关布局代码,包含微信开头布局、腾讯服务布局、限时推广布局和第三方服务布局等。通过导入组件和使用样式表,实现了不同功能区域的展示,如钱包、收付款、信用卡还款等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

//微信

import React, { Component } from "react";
import { View, Text, ScrollView } from "react-native";
import Zhi from "./Zhi";
import Teng from "./Teng";
import Xian from "./Xian";
import Ge from "./Ge";

export default class Wei extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <ScrollView>
        <Zhi />
        <Teng />
        <Xian />
        <Ge />
      </ScrollView>
    );
  }
}

//微信开头布局

import React, { Component } from "react";
import { View, Text, Image, StyleSheet } from "react-native";

export default class Zhi extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <View style={[styles.column, styles.yan]}>
        <View style={styles.row}>
          <View style={[styles.row, styles.bu]}>
            <Image style={styles.fan} source={require("./img/a1.png")} />
            <Text style={styles.wo}>我</Text>
          </View>
          <View style={styles.bao}>
            <Text style={styles.qian}>钱包</Text>
          </View>
          <Image style={styles.ge} source={require("./img/a2.png")} />
        </View>
        <View style={styles.column}>
          <View style={[styles.row, styles.tu]}>
            <Image style={styles.fu} source={require("./img/b1.png")} />
            <Image style={styles.fu} source={require("./img/b2.png")} />
            <Image style={styles.fu} source={require("./img/b3.png")} />
          </View>
          <View style={[styles.row, styles.zi]}>
            <Text style={styles.shou}>收付款</Text>
            <View style={styles.column}>
              <Text style={styles.ling}>零钱</Text>
              <Text style={styles.san}>¥ 3.31</Text>
            </View>
            <Text style={styles.shou}>银行卡</Text>
          </View>
        </View>
      </View>
    );
  }
}
const styles = StyleSheet.create({
  row: {
    flexDirection: "row"
  },
  column: {
    flexDirection: "column"
  },
  yan: {
    backgroundColor: "#686F78"
  },
  fan: {
    width: 15,
    height: 15,
    marginVertical: 13,
    marginLeft: 10
  },
  wo: {
    fontSize: 15,
    color: "#FAFAFA",
    marginTop: 10
  },
  qian: {
    fontSize: 17,
    color: "#FAFAFA",
    fontWeight: "bold"
  },
  bao: {
    width: "100%",
    alignItems: "center",
    marginTop: 10
  },
  bu: {
    position: "absolute",
    left: 0,
    top: 0
  },
  ge: {
    width: 25,
    height: 25,
    position: "absolute",
    top: 10,
    right: 5
  },
  tu: {
    marginTop: 30,
    width: "100%",
    justifyContent: "space-around"
  },
  fu: {
    width: 40,
    height: 40
  },
  zi: {
    marginTop: 20,
    width: "100%",
    justifyContent: "space-around",
    marginBottom: 15
  },
  shou: {
    fontSize: 15,
    color: "#FAFAFA"
  },
  ling: {
    fontSize: 15,
    color: "#FAFAFA",
    marginLeft: 7
  },
  san: {
    fontSize: 12,
    color: "#A0A1A2",
    marginLeft: 5,
    marginTop: 3
  }
});
 

//腾讯服务布局

import React, { Component } from "react";
import { View, Text, Image, StyleSheet } from "react-native";

export default class Teng extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <View style={[styles.column, styles.line, styles.bei]}>
        <View>
          <Text style={{ margin: 15, fontWeight: "100", fontSize: 14 }}>
            腾讯服务
          </Text>
        </View>
        <View style={[styles.column, styles.bian]}>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/c1.png")} />
              <Image style={styles.tu} source={require("./img/c2.png")} />
              <Image style={styles.tu} source={require("./img/c3.png")} />
            </View>
            <View style={[styles.row, styles.heng]}>
              <Text style={styles.zi}>信用卡还款</Text>
              <Text style={styles.zi}>微粒贷借钱</Text>
              <Text style={styles.zi}>手机充值</Text>
            </View>
          </View>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/c4.png")} />
              <Image style={styles.tu} source={require("./img/c5.png")} />
              <Image style={styles.tu} source={require("./img/c6.png")} />
            </View>
            <View style={[styles.row, styles.heng]}>
              <Text style={styles.zi}>理财通</Text>
              <Text style={styles.zi}>生活缴费</Text>
              <Text style={styles.zi}>Q币充值</Text>
            </View>
          </View>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/c7.png")} />
              <Image style={styles.tu} source={require("./img/c8.png")} />
              <Image style={styles.tu} source={require("./img/c9.png")} />
            </View>
            <View style={[styles.row, styles.heng]}>
              <Text style={styles.zi}>城市服务</Text>
              <Text style={styles.zi}>腾讯公益</Text>
              <Text style={styles.zi}>保险服务</Text>
            </View>
          </View>
        </View>
      </View>
    );
  }
}
const styles = StyleSheet.create({
  row: {
    flexDirection: "row"
  },
  column: {
    flexDirection: "column"
  },
  line: {
    borderTopColor: "#E0E2E5",
    borderTopWidth: 10
  },
  heng: {
    width: "100%",
    justifyContent: "space-around"
  },
  bei: {
    backgroundColor: "#FFFFFF",
    borderColor: "#E0E2E5",
    borderWidth: 1
  },
  tu: {
    width: 35,
    height: 35
  },
  zi: {
    fontSize: 13
  },
  bian: {
    borderColor: "#D2CFCF",
    borderWidth: 1
  },
  zheng: {
    marginVertical: 15
  }
});
 

//限时推广

import React, { Component } from "react";
import { View, Text, Image, StyleSheet } from "react-native";

export default class Xian extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <View>
        <View style={[styles.column, styles.line, styles.bei]}>
          <View>
            <Text style={{ margin: 15, fontWeight: "100", fontSize: 14 }}>
              限时推广
            </Text>
          </View>
          <View style={[styles.column, styles.bian]}>
            <View style={[styles.column, styles.zheng]}>
              <View style={[styles.row, styles.heng]}>
                <Image style={styles.tu} source={require("./img/d1.png")} />
              </View>
              <View style={[styles.row, styles.heng]}>
                <Text style={styles.zi}>腾讯网卡</Text>
              </View>
            </View>
          </View>
        </View>
      </View>
    );
  }
}
const styles = StyleSheet.create({
  row: {
    flexDirection: "row"
  },
  column: {
    flexDirection: "column"
  },
  line: {
    borderTopColor: "#E0E2E5",
    borderTopWidth: 10
  },
  heng: {
    width: "100%",
    marginHorizontal: 10
  },
  bei: {
    backgroundColor: "#FFFFFF",
    borderColor: "#E0E2E5",
    borderWidth: 1
  },
  tu: {
    width: 35,
    height: 35,
    marginLeft: 3
  },
  zi: {
    fontSize: 13
  },
  bian: {
    borderColor: "#D2CFCF",
    borderWidth: 1
  },
  zheng: {
    marginVertical: 15
  }
});
 

//第三方服务布局

import React, { Component } from "react";
import { View, Text, Image, StyleSheet } from "react-native";

export default class Ge extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <View style={[styles.column, styles.line, styles.bei]}>
        <View>
          <Text style={{ margin: 15, fontWeight: "100", fontSize: 14 }}>
            第三方服务
          </Text>
        </View>
        <View style={[styles.column, styles.bian]}>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/e1.png")} />
              <Image style={styles.tu} source={require("./img/e2.png")} />
              <Image style={styles.tu} source={require("./img/e3.png")} />
            </View>
            <View style={[styles.row, styles.heng]}>
              <Text style={styles.zi}>火车票机票</Text>
              <Text style={styles.zi}>滴滴出行</Text>
              <Text style={styles.zi}>京东优选</Text>
            </View>
          </View>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/e4.png")} />
              <Image style={styles.tu} source={require("./img/e5.png")} />
              <Image style={styles.tu} source={require("./img/e6.png")} />
            </View>
            <View style={[styles.row, styles.heng]}>
              <Text style={styles.zi}>美团外卖</Text>
              <Text style={styles.zi}>电影演出赛事</Text>
              <Text style={styles.zi}>吃喝玩乐</Text>
            </View>
          </View>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/e7.png")} />
              <Image style={styles.tu} source={require("./img/e8.png")} />
              <Image style={styles.tu} source={require("./img/e9.png")} />
            </View>
            <View style={[styles.row, styles.heng, styles.ju]}>
              <Text style={styles.zi}> 酒店 </Text>
              <Text style={styles.zi}> 摩拜单车</Text>
              <Text style={styles.zi}>蘑菇街女装</Text>
            </View>
          </View>
          <View style={[styles.column, styles.zheng]}>
            <View style={[styles.row, styles.heng]}>
              <Image style={styles.tu} source={require("./img/e10.png")} />
              <Image style={styles.tu} source={require("./img/e11.png")} />
              <Image style={styles.tu} source={require("./img/e12.png")} />
            </View>
            <View style={[styles.row, styles.heng]}>
              <Text style={styles.zi}>唯品会特卖</Text>
              <Text style={[styles.zi, styles.wei]}>转转二手</Text>
              <Text style={[styles.zi, styles.cai]}>彩票</Text>
            </View>
          </View>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  row: {
    flexDirection: "row"
  },
  column: {
    flexDirection: "column"
  },
  line: {
    borderTopColor: "#E0E2E5",
    borderTopWidth: 10
  },
  heng: {
    width: "100%",
    justifyContent: "space-around"
  },
  bei: {
    backgroundColor: "#FFFFFF",
    borderColor: "#E0E2E5",
    borderWidth: 1
  },
  tu: {
    width: 35,
    height: 35
  },
  zi: {
    fontSize: 13
  },
  bian: {
    borderColor: "#D2CFCF",
    borderWidth: 1
  },
  zheng: {
    marginVertical: 15
  },
  ju: {
    marginLeft: 9
  },
  wei: {
    marginRight: 20
  },
  cai: {
    marginRight: 15
  }
});
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值