123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <template>
- <view class="page" :style="{'height':h+'px','padding-top':mt+'px'}">
- <c-nav-bar title="选择门店" backUrl="/pages/login/index" @goBack="goBack" :showHome="false"></c-nav-bar>
- <view class="card" v-for="(item,index) in list" :key="index" @tap="toHome(item)">
- <view>
- <text>{{item.name}}</text>
- <text>{{item.type}}</text>
- </view>
- <view>进店</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- userInfo:null,
- list:[]
- }
- },
- onLoad(option) {
- if(option.userInfo) this.userInfo = JSON.parse(decodeURIComponent(option.userInfo));
- this.getList();
- },
- methods: {
- goBack(e){
- uni.clearStorageSync();
- },
- getList(){
- this.list = [
- { name:'一家民宿', type:'酒店民宿'},
- { name:'石柱村渔家乐', type:'渔家乐' },
- { name:'周游嵊泗', type:'旅行社' }
- ]
- },
- toHome(item){
- console.log(item)
- this.$store.state.moduleHouse.homestayId=item.merchantId||'1711268640588517378';
- uni.setStorageSync('userInfo',this.userInfo);
- uni.reLaunch({
- url:'/pages/home/index'
- })
- }
- }
- }
- </script>
- <style scoped lang="less">
- .page{
- background: #F3F4F4;
- padding-bottom: 20rpx;
- box-sizing: border-box;
- overflow-y: auto;
- .card{
- width: calc(100% - 60rpx);
- height: 180rpx;
- background: #FFFFFF;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- margin: 20rpx 30rpx 0;
- padding: 0 30rpx 0 60rpx;
- box-sizing: border-box;
- background: url(https://i.ringzle.com/file/20240109/1ee084be17f74dde94617dcb7f7c8af3.png) no-repeat;
- background-size: 100% 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- &>view{
- &:first-child{
- display: flex;
- flex-direction: column;
- text{
- font-size: 32rpx;
- font-family: PingFang SC, PingFang SC;
- font-weight: 800;
- color: #1E3A62;
- &:last-child{
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- color: #1E3A62;
- margin-top: 10rpx;
- }
- }
- }
- &:last-child{
- width: 140rpx;
- height: 56rpx;
- border-radius: 36rpx 36rpx 36rpx 36rpx;
- border: 1rpx solid #70849F;
- background: transparent;
- line-height: 56rpx;
- text-align: center;
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC;
- font-weight: 800;
- color: #1E3A62;
- }
- }
- }
- }
- </style>
|