订单确认

This commit is contained in:
asd 2019-12-13 17:22:58 +08:00
commit cd77d30a00
32 changed files with 385 additions and 7 deletions

View File

@ -6,9 +6,10 @@
- page 页面 - page 页面
- index 首页 - index 首页
- shopping 购物车 - shopping 购物车
- orderconfirm 订单确认
- utils 插件 - utils 插件
- [bin.js](./doc/bin.md) - [bin.js](./doc/bin.md)
- doc 文档存放
## 页面路由 ## 页面路由
- pages/index/index 首页 <br> - pages/index/index 首页 <br>
- pages/shopping/shopping 购物车 <br> - pages/shopping/shopping 购物车 <br>
@ -17,3 +18,18 @@
- index/list 商品列表 - index/list 商品列表
- index/lsit/commodity 商品单条 - index/lsit/commodity 商品单条
- index/shopping/shoppingitem 购物车商品信息 - index/shopping/shoppingitem 购物车商品信息
- pages/search/search 搜索页 <br>
组件
- index/search 顶部搜索框
- search/hot 热门上搜索列表
- pages/classify/classify 分类页 <br>
组件
- classify/list 右侧商品列表
- classify/navigation 左侧导航列表
组件
- orderconfirm/agreement 同意协议
- orderconfirm/bottom 订单确认底部
- orderconfirm/chooseaddr 选择地址
- orderconfirm/chooseway 选择方式
- orderconfirm/ordershopinfo 顶部的商品信息
- orderconfirm/orderyf 运费

View File

@ -1,9 +1,10 @@
{ {
"pages": [ "pages": [
"pages/orderconfirm/orderconfirm", "pages/orderconfirm/orderconfirm",
"pages/classify/classify",
"pages/shopping/shopping", "pages/shopping/shopping",
"pages/search/search",
"pages/index/index" "pages/index/index"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",

View File

@ -0,0 +1,8 @@
Component({
properties: {
},
data: {
},
methods: {
}
})

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
}
}

View File

@ -0,0 +1,52 @@
.list{
padding-left: 20rpx;
width: 572rpx;
box-sizing: border-box;
height: 100vh;
.commodity {
width: 552rpx;
// height: 143rpx;
// margin-top: 32rpx;
display: flex;
align-items: center;
.content {
width: 552rpx;
height: 100%;
display: flex;
align-items: center;
// box-shadow: 0 0 24rpx 0 rgba(227, 227, 227, 0.4);
border-bottom: 2rpx solid #eaeaea;
padding: 30rpx 0;
.imgthumb {
width: 105rpx;
height: 105rpx;
margin-left: 40rpx;
background-color: #333;
}
.introduce {
width: 336rpx;
margin-left: 40rpx;
display: flex;
flex-direction: column;
> text {
font-size: 22rpx;
color: #333;
margin-bottom: 22rpx;
}
> view {
display: flex;
align-items: center;
justify-content: space-between;
> text:first-child {
font-size: 30rpx;
color: #dec499;
}
> text:last-child {
font-size: 22rpx;
color: #999;
}
}
}
}
}
}

View File

@ -0,0 +1,38 @@
<scroll-view class="list" scroll-y="{{true}}" >
<view class="commodity">
<view class="content">
<image class="imgthumb "></image>
<view class="introduce">
<text>产品名称产品名称产品名称产品名称产品名称产品</text>
<view>
<text>¥657</text>
<text>加入购物车</text>
</view>
</view>
</view>
</view>
<view class="commodity">
<view class="content">
<image class="imgthumb "></image>
<view class="introduce">
<text>产品名称产品名称产品名称产品名称产品名称产品</text>
<view>
<text>¥657</text>
<text>加入购物车</text>
</view>
</view>
</view>
</view>
<view class="commodity">
<view class="content">
<image class="imgthumb "></image>
<view class="introduce">
<text>产品名称产品名称产品名称产品名称产品名称产品</text>
<view>
<text>¥657</text>
<text>加入购物车</text>
</view>
</view>
</view>
</view>
</scroll-view>

View File

@ -0,0 +1 @@
.list{padding-left:20rpx;width:572rpx;box-sizing:border-box;height:100vh}.list .commodity{width:552rpx;display:flex;align-items:center}.list .commodity .content{width:552rpx;height:100%;display:flex;align-items:center;border-bottom:2rpx solid #eaeaea;padding:30rpx 0}.list .commodity .content .imgthumb{width:105rpx;height:105rpx;margin-left:40rpx;background-color:#333}.list .commodity .content .introduce{width:336rpx;margin-left:40rpx;display:flex;flex-direction:column}.list .commodity .content .introduce>text{font-size:22rpx;color:#333;margin-bottom:22rpx}.list .commodity .content .introduce>view{display:flex;align-items:center;justify-content:space-between}.list .commodity .content .introduce>view>text:first-child{font-size:30rpx;color:#dec499}.list .commodity .content .introduce>view>text:last-child{font-size:22rpx;color:#999}

View File

@ -0,0 +1,8 @@
Component({
properties: {
},
data: {
},
methods: {
}
})

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
}
}

View File

@ -0,0 +1,20 @@
.navigation {
width: 188rpx;
// margin-right: 2rpx;
border-right: 2rpx solid #eaeaea;
max-height: 100vh;
view{
height: 97rpx;
font-size: 28rpx;
color: #333;
border-bottom: 2rpx solid #eaeaea;
line-height: 97rpx;
font-weight: bold;
text-align: center;
box-sizing: border-box;
}
.on{
border-left: 5rpx solid #56CC84;
color:#56CC84;
}
}

View File

@ -0,0 +1,10 @@
<scroll-view class="navigation" scroll-y="{{true}}" >
<view class="on">热门商品</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
</scroll-view>

View File

@ -0,0 +1 @@
.navigation{width:188rpx;border-right:2rpx solid #eaeaea;max-height:100vh}.navigation view{height:97rpx;font-size:28rpx;color:#333;border-bottom:2rpx solid #eaeaea;line-height:97rpx;font-weight:bold;text-align:center;box-sizing:border-box}.navigation .on{border-left:5rpx solid #56CC84;color:#56CC84}

View File

@ -16,7 +16,7 @@
>input{ >input{
height: 30rpx; height: 30rpx;
width: 480rpx; width: 480rpx;
margin-top: 25rpx; margin-top: 20rpx;
margin-left: 17rpx; margin-left: 17rpx;
font-size: 30rpx; font-size: 30rpx;
} }

View File

@ -1 +1 @@
.search{width:613rpx;height:76rpx;margin-top:30rpx;box-sizing:border-box;border-radius:15rpx;display:flex;border:1rpx solid #c6c6c6}.search>image{width:42rpx;height:42rpx;background-color:#000;margin-left:40rpx;margin-top:17rpx}.search>input{height:30rpx;width:480rpx;margin-top:25rpx;margin-left:17rpx;font-size:30rpx} .search{width:613rpx;height:76rpx;margin-top:30rpx;box-sizing:border-box;border-radius:15rpx;display:flex;border:1rpx solid #c6c6c6}.search>image{width:42rpx;height:42rpx;background-color:#000;margin-left:40rpx;margin-top:17rpx}.search>input{height:30rpx;width:480rpx;margin-top:20rpx;margin-left:17rpx;font-size:30rpx}

View File

@ -0,0 +1,8 @@
Component({
properties: {
},
data: {
},
methods: {
}
})

View File

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

View File

@ -0,0 +1,22 @@
.hot {
display: flex;
align-items: center;
flex-direction: column;
.title {
font-size: 34rpx;
color: #333;
font-weight: bold;
width: 415rpx;
height: 61rpx;
line-height: 61rpx;
text-align: center;
background-image: linear-gradient(to right, #fff, #ecfff8, #fff);
margin-top: 53rpx;
margin-bottom: 38rpx;
}
.word{
font-size: 30rpx;
color: #999;
margin-bottom: 55rpx;
}
}

View File

@ -0,0 +1,5 @@
<view class="hot">
<view class="title">热门搜索</view>
<view class="word">化妆品</view>
<view class="word">化妆品</view>
</view>

View File

@ -0,0 +1 @@
.hot{display:flex;align-items:center;flex-direction:column}.hot .title{font-size:34rpx;color:#333;font-weight:bold;width:415rpx;height:61rpx;line-height:61rpx;text-align:center;background-image:linear-gradient(to right, #fff, #ecfff8, #fff);margin-top:53rpx;margin-bottom:38rpx}.hot .word{font-size:30rpx;color:#999;margin-bottom:55rpx}

View File

@ -16,10 +16,11 @@ object
responseType,类型 responseType,类型
complete 成功失败都执行的回调函数 complete 成功失败都执行的回调函数
} }
```` ```
``` ```
request({ request({
url:"https://api.luyaun.tk/getlist",
method:"GET"
}).then((res)=>{ }).then((res)=>{
请求成功执行方法 请求成功执行方法
},(rej)=>{ },(rej)=>{

View File

@ -0,0 +1,66 @@
// pages/classify/classify.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

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

View File

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

View File

@ -0,0 +1,4 @@
<view class="box">
<navigation></navigation>
<list></list>
</view>

View File

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

View File

@ -4,5 +4,8 @@ Page({
}, },
onLoad(){ onLoad(){
},
searchs(){
console.log(10)
} }
}) })

View File

@ -1,4 +1,4 @@
<view class="box"> <view class="box">
<search></search> <search bind:tap="searchs"></search>
<list></list> <list></list>
</view> </view>

66
pages/search/search.js Normal file
View File

@ -0,0 +1,66 @@
// pages/search/search.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

6
pages/search/search.json Normal file
View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"search":"../components/index/search/index",
"hot":"../components/search/hot/index"
}
}

7
pages/search/search.scss Normal file
View File

@ -0,0 +1,7 @@
.box {
border-top: #eaeaea solid 1rpx;
width: 750rpx;
display: flex;
align-items: center;
flex-direction: column;
}

4
pages/search/search.wxml Normal file
View File

@ -0,0 +1,4 @@
<view class="box">
<search></search>
<hot></hot>
</view>

1
pages/search/search.wxss Normal file
View File

@ -0,0 +1 @@
.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column}