换ubuntu

This commit is contained in:
asd
2019-12-23 14:13:27 +08:00
parent 2688882a3e
commit 888b4ee55c
485 changed files with 12277 additions and 12196 deletions

View File

@@ -1,98 +1,98 @@
// pages/classify/classify.js
import { request } from "../../utils/bin"
Page({
/**
* 页面的初始数据
*/
data: {
type: [],
list:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
request({
url: "Goods/goodsCategoryList",
data: {
parent_id: 2
}
}).then((res) => {
// console.log(res)
this.setData({
type: res.data.result
})
this.select({detail:{id:res.data.result[0].id}})
console.log(this.data.type, 150)
})
},
select(a){
// console.log(a)
// a.detail.id
request({
url:'Goods/goodsList',
urldata:{
id:a.detail.id,
sort:'shop_price',
sort_asc:'desc',
p:0
}
}).then((res)=>{
console.log(res)
this.setData({
list:res.data.result.goods_list
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
// pages/classify/classify.js
import { request } from "../../utils/bin"
Page({
/**
* 页面的初始数据
*/
data: {
type: [],
list:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
request({
url: "Goods/goodsCategoryList",
data: {
parent_id: 2
}
}).then((res) => {
// console.log(res)
this.setData({
type: res.data.result
})
this.select({detail:{id:res.data.result[0].id}})
console.log(this.data.type, 150)
})
},
select(a){
// console.log(a)
// a.detail.id
request({
url:'Goods/goodsList',
urldata:{
id:a.detail.id,
sort:'shop_price',
sort_asc:'desc',
p:0
}
}).then((res)=>{
console.log(res)
this.setData({
list:res.data.result.goods_list
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})

View File

@@ -1,6 +1,6 @@
{
"usingComponents": {
"list":"../components/classify/list/index",
"navigation":"../components/classify/navigation/index"
}
{
"usingComponents": {
"list":"../components/classify/list/index",
"navigation":"../components/classify/navigation/index"
}
}

View File

@@ -1,7 +1,7 @@
.box{
width: 750rpx;
display: flex;
border-top: 1rpx solid #eaeaea;
.box{
width: 750rpx;
display: flex;
border-top: 1rpx solid #eaeaea;
}

View File

@@ -1,4 +1,4 @@
<view class="box">
<navigation bindselect="select" types="{{type}}"></navigation>
<list list="{{list}}"></list>
<view class="box">
<navigation bindselect="select" types="{{type}}"></navigation>
<list list="{{list}}"></list>
</view>

View File

@@ -1 +1 @@
.box{width:750rpx;display:flex;border-top:1rpx solid #eaeaea}
.box{width:750rpx;display:flex;border-top:1rpx solid #eaeaea}