123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <template>
- <view class="u-page">
- <navigation-bar title="选择角色" background-color="#fff" front-color="#000000" />
- <u-list>
- <u-list-item v-for="(item, index) in roles" :key="index" >
- <!-- #fff7f7 -->
- <!-- <u-row customStyle="marginBottom:10px;backgroundColor: '#fff7f7';height: '200px'"> -->
- <u-row @click="choose(item)" :class="index==current? 'active-custom-style':'custom-style'">
- <u-col span="8">
- <view class="r-role">
- {{item.name}}
- </view>
- </u-col>
- <u-col span="4">
- <view class="l-role">
- <u-image :showLoading="true" :src="item.src" width="110px" height="142px" radius="10px"></u-image>
- </view>
- </u-col>
- </u-row>
- </u-list-item>
- </u-list>
- <!-- <u-button type="error" shape="circle" text="下一步" @click="next()"></u-button> -->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- roles: [{
- id: 1,
- name: "我是边民",
- src: require("@/static/images/role/bm.png")
- },
- {
- id: 2,
- name: "我是经销商",
- src: require("@/static/images/role/jxs.png")
- },
- {
- id: 3,
- name: "我是外籍商户",
- src: require("@/static/images/role/wjsh.png")
- },
- {
- id: 4,
- name: "我是司机",
- src: require("@/static/images/role/sj.png")
- },
- ],
- // customStyle: {
- // marginBottom: '10px',
- // backgroundColor: '#fff7f7',
- // height: '200px'
- // }
- current: 1,
- }
- },
- methods: {
- choose(data) {
- this.$common.to('/pages/login/register?type='+data.id);
- },
- next(){
- uni.navigateTo({
- url:"/pages/index/index"
- })
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- padding: 0 30px;
- }
- .custom-style {
- margin-bottom: 10px;
- background-color: #fff7f7;
- height: 145px;
- border-radius: 10px;
- }
-
- .active-custom-style {
- margin-bottom: 10px;
- background-color: #fff7f7;
- height: 145px;
- border-radius: 10px;
- border: #f83d3d 1px solid;
- }
-
- .r-role {
- font-size: 34px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .l-role {
- // margin-left: 10px;
- // position: absolute;
- // right: 10px;
- // bottom: 10px;
- }
- </style>
|