接口调试

dev
Esdese 3 years ago
parent b54629731a
commit 73054b2a5c

@ -12,9 +12,20 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
login(){
wx.getUserProfile({
desc:"需获取",
success:res=>{
console.log(res);
}
})
},
getPhoneNumber(e){
console.log(e);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -26,7 +37,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**

@ -4,6 +4,6 @@
<input placeholder="请输入账号" placeholder-class="placeholder-style" ></input>
<view style="font-size:28rpx;font-weight:bolder;margin-top: 32rpx;margin-left: 32rpx"
>密码</view>
<input placeholder="请输入密码" placeholder-class="placeholder-style"></input>
<button class="bts">立即绑定</button>
<input placeholder="请输入密码" placeholder-class="placeholder-style" type="password"></input>
<button class="bts" bindtap="login">立即绑定</button>
</view>

@ -18,4 +18,12 @@
}
.menu-tabs .van-sticky .van-sticky-wrap{
margin-left: -24rpx;
}
}
.van-index-bar .van-index-bar__sidebar{
top:480rpx;
transform:none;
}
.van-image{
margin-left: 48rpx;
margin-top: 14rpx;
}

@ -1,61 +1,89 @@
Page({
const app = getApp()
const words = [];
Component({
data: {
result: [],
mockData:[
{
name:'A',
data:[
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"宝马",
},
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"奥迪",
},
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"保时捷",
},
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"法拉利",
}
]
},
{
name:'B',
data:[
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"宝马",
},
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"奥迪",
},
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"保时捷",
},
{
imgUrl:"https://img.yzcdn.cn/vant/cat.jpeg",
carName:"法拉利",
}
]
}
]
mockData: [{
name: 'A',
data: [{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "宝马",
},
{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "奥迪",
},
{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "保时捷",
},
{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "法拉利",
}
]
},
{
name: 'B',
data: [{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "宝马",
},
{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "奥迪",
},
{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "保时捷",
},
{
imgUrl: "https://img.yzcdn.cn/vant/cat.jpeg",
carName: "法拉利",
}
]
}
],
result: [],
},
startCp(){
wx.navigateTo({
url: '/pages/varComm/pages/brandRatio/index',
})
methods: {
startCp() {
wx.navigateTo({
url: '/pages/varComm/pages/brandRatio/index',
})
},
onChange(event) {
console.log(event);
this.setData({
result: event.detail,
});
},
},
onChange(event) {
console.log(event);
this.setData({
result: event.detail,
});
lifetimes: {
attached() {
app.globalData.request({
action: 'getUserBrand',
token: 't%2BrswgjvzGM=',
}).then(res => {
let arr = []
for (let i = 65; i <= 90; i++) {
arr.push({
name: String.fromCharCode(i),
data: []
});
}
for(let i of res){
for(let j of arr){
if(i.firstword == j.name){
j.data.push(i)
}
}
}
console.log(arr);
})
}
},
});
})

@ -1,3 +1,4 @@
{
"usingComponents": {}
"usingComponents": {},
"component": true
}

@ -1,4 +1,13 @@
/* pages/varComm/pages/event/index.wxss */
page {
background-color: #f9f9f9;
}
.box {
/* height:400rpx; */
background: #006bff;
padding-top: 16rpx;
}
.add1{
width:750rpx;
overflow-x:scroll;
@ -60,10 +69,7 @@
border-top-right-radius: 24rpx;
}
.van-index-bar .van-index-bar__sidebar{
top:480rpx;
transform:none;
}
.van-index-anchor text{
font-size: 24rpx;
color: rgba(153, 153, 153, 1);
@ -81,14 +87,7 @@
.van-checkbox{
display: inline-block !important;
}
.my_cell .van-checkbox__icon {
margin-left: 32rpx ;
font-size: 32rpx !important;
}
.my_cell .van-image{
margin-left: 48rpx;
margin-top: 4rpx;
}
.my_cell text{
font-size: 28rpx;
margin-left: 24rpx;

@ -119,4 +119,12 @@ checkbox .wx-checkbox-input {
font-size: 28rpx;
height: 24rpx;
justify-content:space-between;
}
.van-checkbox__icon {
margin-left: 32rpx ;
font-size: 32rpx !important;
}
.van-image{
margin-left: 48rpx;
margin-top: 6rpx;
}
Loading…
Cancel
Save