123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <template>
- <view class="orderFood-index">
- <view class="content">
- <view class="item" v-for="(item,index) in list" :key="index" @click="jump(item.type)">
- <image class="icon" :src="item.src" mode=""></image>
- <view class="name">
- {{item.name}}
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xgJrwD0vChsW012ac1e138a0aa5a970e8f8c59dab926.png/1.png',
- name:'肯德基KFC',
- type:'Kfc'
- },
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/K64jffEqRIDr487e8cab971c3b890d4066a26f5856d2.png/1.png',
- name:'麦当劳',
- type:'MDL'
- },
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/xMwtPkICBcam5513c4ac644054e60009cb8b1eb52e8f.png/1.png',
- name:'星巴克',
- type:'XBK'
- },
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/U9j6fgVmKeAt522ed50aa1a72f798260e0e30138d4c6.png/1.png',
- name:'奈雪的茶',
- type:'NXDC'
- },
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/zS5Q8sC9AAQca76eef36da2bd5a2ec234d75d8dcc044.png/1.png',
- name:'瑞幸咖啡',
- type:'RXKF'
- },
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/fA95my16Qunf967a9d992fc41134332926bcb5665881.png/1.png',
- name:'喜茶',
- type:'XC'
- },
- {
- src:'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/wk5eyuvhighG206a7ea081e3f0b783ff2a9555375e85.png/1.png',
- name:'库迪咖啡',
- type:'KD'
- }
- ]
- }
- },
- methods: {
- jump(type) {
- if (uni.getStorageSync('token')) {
- uni.setStorageSync('ot',type)
- uni.navigateTo({
- url:'./shopList'
- })
- }else{
- uni.showModal({
- title:'请登录',
- confirmText:'去登录',
- success(res){
- console.log(res);
- if(res.confirm){
- uni.navigateTo({
- url:`/login/login/login?redirect=/orderFood/index`
- })
- }
- }
- })
- }
-
-
-
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .orderFood-index{
- background: #F9F9F9;
- padding: 24rpx;
- min-height: 100vh;
- .content{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .item{
- width: 224rpx;
- background: #FFFFFF;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- padding: 24rpx;
- box-sizing: border-box;
- text-align: center;
- margin-bottom: 16rpx;
- .icon{
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- }
- .name{
- font-size: 32rpx;
- color: #222222;
- text-align: center;
- margin-top: 28rpx;
- }
- }
- }
- }
- </style>
|