当button设置border时,border-radius失效; 下面是复现demo:
<view class="test"> <button class='btn btn-cyagen btn-sm mt10'>xxxx</button> <view class='btn btn-cyagen btn-sm mt10'>xxxx</view> </view> .test button.btn-cyagen::after { border: 0; border-radius: 0; } .test .btn-cyagen { background-color: #aa0c5b; background-repeat: repeat-x; background-image: linear-gradient(#f04199, #aa0c5b); border: 1px solid #aa0c5b; padding: 5px 15px; color: #fff; font-size: 13px; border-radius: 13px; width: 72px; }去除button默认样式 button::after { border-radius: 0; border: 0; padding: 0; }
如果请求失败检查数据和api,注意api要绑定小程序
wx.request({ url: 'https://bio.cyagen.net/api/bio/sperm-bank/search/', data: { "kw": "1", "ti": "10090", "web_source": "cn" }, method: 'POST', success: function(res) { console.log(res.data) } })