@@ -1,9 +1,9 @@
{
"pages": [
+ "template/carts/index",
"template/home/index",
"template/login/index",
- "template/view/index",
+ "template/view/index"
- "template/carts/index"
],
"window": {
"navigationBarTextStyle": "#fff",
@@ -1,7 +1,7 @@
@import 'static/weiui/weui.wxss';
page{
- background-color: #F8F8F8;
+ background-color: #FFFFFF;
font-size: 16px;
font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
}
@@ -1,6 +1,6 @@
// template/carts/index.js
Page({
-
+ dever: getApp().dever,
/**
* 页面的初始数据
*/
@@ -12,7 +12,17 @@ Page({
* 生命周期函数--监听页面加载
onLoad: function (options) {
+ //test - begin
+ var list = new Array();
+ for(var i=1; i<10; i++){
+ var item = new Object();
+ item.name = i+'盒有机韭菜';
+ item.price = i*20;
+ item.id = i;
+ list.push(item);
+ }
+ this.dever.setList(this, list);
+ //test - end
},
@@ -62,5 +72,12 @@ Page({
onShareAppMessage: function () {
+ },
+
+ /**
+ * 调用微信地址
+ */
+ useWxAddress: function(){
})
@@ -1,2 +1,21 @@
-<!--template/carts/index.wxml-->
+<view class='top'>
-<text>template/carts/index.wxml</text>
+ <view class='address'>
+ <text class='tips'>填写收货地址</text>
+ <button class='nxh__button' bindtap='useWxAddress'>使用微信地址</button>
+ </view>
+ <view class='order' wx:for='{{list}}' wx:key='{{index}}'>
+ <text class='title'>{{item.name}}</text>
+ <view class='oper'>
+ <text class='price'>¥ {{item.price}}</text>
+ <view class='edit-num'>
+ <image class='sub' src='/static/img/carts-sub.png'></image>
+ <view class='num'>1</view>
+ <image class='add' src='/static/img/carts-add.png'></image>
+</view>
+<view class='bottom'>
+ <view class='left'>合计 ¥297 元</view>
+ <view class='right'>立即支付</view>
@@ -1 +1,81 @@
-/* template/carts/index.wxss */
+.top {
+ display: flex;
+ flex-direction: column;
+ justify-items: center;
+ text-align: center;
+ margin-bottom: 120rpx;
+}
+.address {
+ padding: 40rpx 30rpx 30rpx 30rpx;
+ border-bottom: 5px solid #FBFBFB;
+.tips {
+ color: #ccc;
+ font-size: 30rpx;
+.nxh__button {
+ background: #fff;
+ border:1rpx solid #539804;
+ color: #539804;
+ margin-top: 6rpx;
+ width: 300rpx;
+.order {
+ padding: 40rpx 50rpx 30rpx 50rpx;
+ border-bottom: 1px solid #FBFBFB;
+.order .title {
+ justify-content: left;
+ font-size: 35rpx;
+ margin-bottom: 25rpx;
+.order .oper {
+ flex-direction: row;
+ justify-content: space-between;
+.order .price {
+ color: #666666;
+.order .edit-num {
+ align-items: center;
+.edit-num .num {
+ margin: 0 15rpx 0 15rpx;
+.edit-num .sub, .edit-num .add {
+ width: 45rpx;
+ height: 45rpx;
+.bottom {
+ width: 750rpx;
+ height: 119rpx;
+ position: fixed;
+ bottom: 0;
+.bottom .left {
+ background: #434343;
+ color: #fff;
+ flex-grow: 1;
+ padding-left: 50rpx;
+.bottom .right {
+ background: #539804;
+ width: 250rpx;
+ justify-content: center;