用uniapp实现:
<view class="box4" >
<view class="box4_top" >
<image src="../../static/icons/kefu.png"></image>
<text class="zi">Gin Teenpatti$Rummy Game</text>
<text>Monthly rate:</text>
<!-- <image src="../../static/icons/kefu.png" mode=""></image> -->
</view>
<text class="zi1">Max:1,000</text>
<view class="box4_bottom">
<text>1000rs...</text>
<button type="default"
>
Vip Only
</button>
</view>
</view>
```css
.box4_top{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
}
.box4_top text:last-child{
color: lightgray;
}
.box4_top .zi{
font-weight: bold;
font-size: 20px;
text-align: left
}
.box4 .zi1{
display: flex;
}
.box4_bottom{
display: flex;
justify-content: space-between;
}
.box4 image{
width: 20px;
height: 20px;
margin-right: 10px;
}
.box4_bottom button{
background-color: white;
border-radius: 25px;
border: 2px solid orange;
width: 150px;
height: 30px;
line-height: 30px;
color: orange;
margin-right: 10px;
}
<script>
export default {
data() {
return {
List:[]
}
},
onLoad() {
this.getVipList()
},
methods: {
async getVipList(){
const res = await this.$myRequest({
url:'/cmVars/getVariableInfoByKey',
params:{
key:'',
format:''
},
})
console.log(res)
this.List = res.data.list
}
}
}
</script>
用v-for遍历box4没有效果。这个路径中key和format怎么处理。
你贴出来的代码中没看到v-for
const res = await this.$myRequest({
url:'/cmVars/getVariableInfoByKey',
params:{
key:'LOAN-MARKET_MSG_en-IN_LOAN_loanList',
format:'api'
},
})