diff --git a/CategoryIcon/baby/1.png b/CategoryIcon/baby/1.png new file mode 100644 index 0000000..735af10 Binary files /dev/null and b/CategoryIcon/baby/1.png differ diff --git a/CategoryIcon/baby/2.png b/CategoryIcon/baby/2.png new file mode 100644 index 0000000..3f4af48 Binary files /dev/null and b/CategoryIcon/baby/2.png differ diff --git a/CategoryIcon/baby/3.png b/CategoryIcon/baby/3.png new file mode 100644 index 0000000..63795c1 Binary files /dev/null and b/CategoryIcon/baby/3.png differ diff --git a/CategoryIcon/baby/4.png b/CategoryIcon/baby/4.png new file mode 100644 index 0000000..773416a Binary files /dev/null and b/CategoryIcon/baby/4.png differ diff --git a/CategoryIcon/bedding/1.png b/CategoryIcon/bedding/1.png new file mode 100644 index 0000000..7837795 Binary files /dev/null and b/CategoryIcon/bedding/1.png differ diff --git a/CategoryIcon/bedding/2.png b/CategoryIcon/bedding/2.png new file mode 100644 index 0000000..a86db41 Binary files /dev/null and b/CategoryIcon/bedding/2.png differ diff --git a/CategoryIcon/bedding/3.png b/CategoryIcon/bedding/3.png new file mode 100644 index 0000000..da68124 Binary files /dev/null and b/CategoryIcon/bedding/3.png differ diff --git a/CategoryIcon/bedding/4.png b/CategoryIcon/bedding/4.png new file mode 100644 index 0000000..420d803 Binary files /dev/null and b/CategoryIcon/bedding/4.png differ diff --git a/CategoryIcon/bedding/5.png b/CategoryIcon/bedding/5.png new file mode 100644 index 0000000..811881f Binary files /dev/null and b/CategoryIcon/bedding/5.png differ diff --git a/CategoryIcon/bedding/6.png b/CategoryIcon/bedding/6.png new file mode 100644 index 0000000..e1103f0 Binary files /dev/null and b/CategoryIcon/bedding/6.png differ diff --git a/CategoryIcon/bedding/7.png b/CategoryIcon/bedding/7.png new file mode 100644 index 0000000..8503125 Binary files /dev/null and b/CategoryIcon/bedding/7.png differ diff --git a/CategoryIcon/diet/1.png b/CategoryIcon/diet/1.png new file mode 100644 index 0000000..5d0aeff Binary files /dev/null and b/CategoryIcon/diet/1.png differ diff --git a/CategoryIcon/diet/2.png b/CategoryIcon/diet/2.png new file mode 100644 index 0000000..30248db Binary files /dev/null and b/CategoryIcon/diet/2.png differ diff --git a/CategoryIcon/diet/3.png b/CategoryIcon/diet/3.png new file mode 100644 index 0000000..adf768f Binary files /dev/null and b/CategoryIcon/diet/3.png differ diff --git a/CategoryIcon/diet/4.png b/CategoryIcon/diet/4.png new file mode 100644 index 0000000..d4c14ce Binary files /dev/null and b/CategoryIcon/diet/4.png differ diff --git a/CategoryIcon/home/1.png b/CategoryIcon/home/1.png new file mode 100644 index 0000000..d45b28d Binary files /dev/null and b/CategoryIcon/home/1.png differ diff --git a/CategoryIcon/home/14.png b/CategoryIcon/home/14.png new file mode 100644 index 0000000..a9587e2 Binary files /dev/null and b/CategoryIcon/home/14.png differ diff --git a/CategoryIcon/home/2.png b/CategoryIcon/home/2.png new file mode 100644 index 0000000..fac85d0 Binary files /dev/null and b/CategoryIcon/home/2.png differ diff --git a/CategoryIcon/home/3.png b/CategoryIcon/home/3.png new file mode 100644 index 0000000..792355b Binary files /dev/null and b/CategoryIcon/home/3.png differ diff --git a/CategoryIcon/home/4.png b/CategoryIcon/home/4.png new file mode 100644 index 0000000..e183b01 Binary files /dev/null and b/CategoryIcon/home/4.png differ diff --git a/CategoryIcon/home/5.png b/CategoryIcon/home/5.png new file mode 100644 index 0000000..d6140a2 Binary files /dev/null and b/CategoryIcon/home/5.png differ diff --git a/CategoryIcon/kitchen/1.png b/CategoryIcon/kitchen/1.png new file mode 100644 index 0000000..1858fb3 Binary files /dev/null and b/CategoryIcon/kitchen/1.png differ diff --git a/CategoryIcon/kitchen/2.png b/CategoryIcon/kitchen/2.png new file mode 100644 index 0000000..ff697e0 Binary files /dev/null and b/CategoryIcon/kitchen/2.png differ diff --git a/CategoryIcon/kitchen/3.png b/CategoryIcon/kitchen/3.png new file mode 100644 index 0000000..ee92a62 Binary files /dev/null and b/CategoryIcon/kitchen/3.png differ diff --git a/CategoryIcon/kitchen/4.png b/CategoryIcon/kitchen/4.png new file mode 100644 index 0000000..0106ca5 Binary files /dev/null and b/CategoryIcon/kitchen/4.png differ diff --git a/CategoryIcon/kitchen/5.png b/CategoryIcon/kitchen/5.png new file mode 100644 index 0000000..3e6d606 Binary files /dev/null and b/CategoryIcon/kitchen/5.png differ diff --git a/CategoryIcon/kitchen/6.png b/CategoryIcon/kitchen/6.png new file mode 100644 index 0000000..fd52e54 Binary files /dev/null and b/CategoryIcon/kitchen/6.png differ diff --git a/CategoryIcon/kitchen/7.png b/CategoryIcon/kitchen/7.png new file mode 100644 index 0000000..2f91066 Binary files /dev/null and b/CategoryIcon/kitchen/7.png differ diff --git a/CategoryIcon/kitchen/8.png b/CategoryIcon/kitchen/8.png new file mode 100644 index 0000000..f3c729a Binary files /dev/null and b/CategoryIcon/kitchen/8.png differ diff --git a/CategoryIcon/outfit/2.png b/CategoryIcon/outfit/2.png new file mode 100644 index 0000000..1c0c98b Binary files /dev/null and b/CategoryIcon/outfit/2.png differ diff --git a/CategoryIcon/outfit/3.png b/CategoryIcon/outfit/3.png new file mode 100644 index 0000000..fdc9548 Binary files /dev/null and b/CategoryIcon/outfit/3.png differ diff --git a/CategoryIcon/outfit/4.png b/CategoryIcon/outfit/4.png new file mode 100644 index 0000000..02c2b96 Binary files /dev/null and b/CategoryIcon/outfit/4.png differ diff --git a/CategoryIcon/outfit/5.png b/CategoryIcon/outfit/5.png new file mode 100644 index 0000000..fdde3f3 Binary files /dev/null and b/CategoryIcon/outfit/5.png differ diff --git a/CategoryIcon/outfit/6.png b/CategoryIcon/outfit/6.png new file mode 100644 index 0000000..cce6b10 Binary files /dev/null and b/CategoryIcon/outfit/6.png differ diff --git a/CategoryIcon/outfit/banshenqun.png b/CategoryIcon/outfit/banshenqun.png new file mode 100644 index 0000000..aa39eb3 Binary files /dev/null and b/CategoryIcon/outfit/banshenqun.png differ diff --git a/CategoryIcon/outfit/chenshan.png b/CategoryIcon/outfit/chenshan.png new file mode 100644 index 0000000..119a9b0 Binary files /dev/null and b/CategoryIcon/outfit/chenshan.png differ diff --git a/CategoryIcon/outfit/diaodai.png b/CategoryIcon/outfit/diaodai.png new file mode 100644 index 0000000..7222f3e Binary files /dev/null and b/CategoryIcon/outfit/diaodai.png differ diff --git a/CategoryIcon/outfit/polo.png b/CategoryIcon/outfit/polo.png new file mode 100644 index 0000000..5210179 Binary files /dev/null and b/CategoryIcon/outfit/polo.png differ diff --git a/CategoryIcon/personal/1.png b/CategoryIcon/personal/1.png new file mode 100644 index 0000000..c39b749 Binary files /dev/null and b/CategoryIcon/personal/1.png differ diff --git a/CategoryIcon/personal/2.png b/CategoryIcon/personal/2.png new file mode 100644 index 0000000..6490578 Binary files /dev/null and b/CategoryIcon/personal/2.png differ diff --git a/CategoryIcon/personal/3.png b/CategoryIcon/personal/3.png new file mode 100644 index 0000000..d0615ec Binary files /dev/null and b/CategoryIcon/personal/3.png differ diff --git a/CategoryIcon/personal/4.png b/CategoryIcon/personal/4.png new file mode 100644 index 0000000..60c5597 Binary files /dev/null and b/CategoryIcon/personal/4.png differ diff --git a/CategoryIcon/personal/hufu.png b/CategoryIcon/personal/hufu.png new file mode 100644 index 0000000..87da9ae Binary files /dev/null and b/CategoryIcon/personal/hufu.png differ diff --git a/README.md b/README.md index 8d44737..8284a27 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # shopdz-minapp shopdz 商城小程序源码 + +# 使用步骤 +- 申请小程序号,将小程序号AppId填写到 project.config.json appid 中。 +- 修改 config.js host 接口地址 +- 使用开发者工具运行小程序,测试功能是否正常 \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..6313ea7 --- /dev/null +++ b/app.js @@ -0,0 +1,81 @@ +//app.js +const curl = require('./config').host; +App({ + onLaunch: function (options) { + console.log(options); + // 展示本地存储能力 + var self = this; + var logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + console.log(res.userInfo) + var nickName = res.userInfo.nickName; + var avatarUrl = res.userInfo.avatarUrl; + wx.setStorageSync('nickName', nickName); + wx.setStorageSync('avatarUrl', avatarUrl); + } + }) + } + } + }) + + }, + + http: function (url, data='', method="GET") { //封装http请求 + const apiUrl = 'http://shopdz.shopdz.cn/' //请求域名 + console.log(this.globalData) + const currency = { + //openid: this.globalData.openid + } + return new Promise((resolve, reject) => { + wx.request({ + url: apiUrl + url, + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + data: Object.assign(currency,data), + method: method, + success: function (res) { + if(res.data.code != 200){ + wx.showModal({ + title: '提示', + content: res.data.message, + success: function (res) { + if (res.confirm) { + console.log('用户点击确定') + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + } + resolve(res.data) + }, + fail: function (res) { + reject(res); + }, + complete: function () { + console.log('complete'); + } + }) + }) + }, + + globalData: { + userInfo: null, + openid:null, + nickName: null, + avatarUrl: null, + num:0, + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..fbf6f11 --- /dev/null +++ b/app.json @@ -0,0 +1,78 @@ +{ + "pages": [ + "pages/index/index", + "pages/list/index", + "pages/cart/index", + "pages/user/index", + "pages/details/index", + "pages/bindPhone/index", + "pages/coupon/index", + "pages/order/index", + "pages/addressList/index", + "pages/addressAdd/index", + "pages/address-Add/index", + "pages/address-Adds/index", + "pages/orderDetails/index", + "pages/detail/detail", + "pages/settlement/index", + "pages/integral/index", + "pages/coupon_all/index", + "pages/footprint/index", + "pages/feedback/index", + "pages/help/index", + "pages/yijian/yijian", + "pages/question/question", + "pages/questiong/question", + "pages/refund/index", + "pages/assemble/index", + "pages/assemble_detail/index", + "pages/extension/index", + "pages/evaluate/index", + "pages/refund_detail/index", + "pages/logistics/index", + "pages/comment/index", + "pages/return_goods/index", + "pages/withdrawaccount/index", + "pages/fenlei/index", + "pages/record/index" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "ShopDZ商城", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "backgroundColor": "#fff", + "borderStyle": "black", + "color": "#333", + "selectedColor": "#ff5f19", + "list": [ + { + "selectedIconPath": "images/home_page_n.png", + "iconPath": "images/home_page_y.png", + "pagePath": "pages/index/index", + "text": "首页" + }, + { + "selectedIconPath": "images/shopping_f_t.png", + "iconPath": "images/shopping_f.png", + "pagePath": "pages/fenlei/index", + "text": "分类" + }, + { + "selectedIconPath": "images/Shopping.png", + "iconPath": "images/shopping_select.png", + "pagePath": "pages/cart/index", + "text": "购物车" + }, + { + "selectedIconPath": "images/my_y.png", + "iconPath": "images/my_n.png", + "pagePath": "pages/user/index", + "text": "我的" + } + ] + }, + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..defda2d --- /dev/null +++ b/app.wxss @@ -0,0 +1,14 @@ +/**app.wxss**/ +@import "/lib/weui.wxss"; +.container { + height: 100%; +} +image{ + width: 100%; +} +.fl{ + float: left +} +.fr{ + float: right; +} \ No newline at end of file diff --git a/config.js b/config.js new file mode 100644 index 0000000..ae8e839 --- /dev/null +++ b/config.js @@ -0,0 +1,8 @@ +// var host = 'http://shopdz.pm.comsenz-service.com/'; +// var host = 'https://miniapp.shopdz.cn/'; +var host = 'https://shopdz.shopdz.cn/'; +const config = { + host, +} + +module.exports = config \ No newline at end of file diff --git a/images/Shopping.png b/images/Shopping.png new file mode 100644 index 0000000..171b8e3 Binary files /dev/null and b/images/Shopping.png differ diff --git a/images/add_to cart.png b/images/add_to cart.png new file mode 100644 index 0000000..454b335 Binary files /dev/null and b/images/add_to cart.png differ diff --git a/images/already_shipped.png b/images/already_shipped.png new file mode 100644 index 0000000..6dfc8dd Binary files /dev/null and b/images/already_shipped.png differ diff --git a/images/birthday.png b/images/birthday.png new file mode 100644 index 0000000..cf1a942 Binary files /dev/null and b/images/birthday.png differ diff --git a/images/choice_n.png b/images/choice_n.png new file mode 100644 index 0000000..0e502f7 Binary files /dev/null and b/images/choice_n.png differ diff --git a/images/choice_y.png b/images/choice_y.png new file mode 100644 index 0000000..4372726 Binary files /dev/null and b/images/choice_y.png differ diff --git a/images/completed.png b/images/completed.png new file mode 100644 index 0000000..db2c573 Binary files /dev/null and b/images/completed.png differ diff --git a/images/delete.png b/images/delete.png new file mode 100644 index 0000000..d48b69a Binary files /dev/null and b/images/delete.png differ diff --git a/images/edit.png b/images/edit.png new file mode 100644 index 0000000..c9cda70 Binary files /dev/null and b/images/edit.png differ diff --git a/images/festival.png b/images/festival.png new file mode 100644 index 0000000..951f122 Binary files /dev/null and b/images/festival.png differ diff --git a/images/home_page_n.png b/images/home_page_n.png new file mode 100644 index 0000000..32ba7ed Binary files /dev/null and b/images/home_page_n.png differ diff --git a/images/home_page_y.png b/images/home_page_y.png new file mode 100644 index 0000000..17e9048 Binary files /dev/null and b/images/home_page_y.png differ diff --git a/images/img1.jpg b/images/img1.jpg new file mode 100644 index 0000000..2181995 Binary files /dev/null and b/images/img1.jpg differ diff --git a/images/img2.jpg b/images/img2.jpg new file mode 100644 index 0000000..fef11e0 Binary files /dev/null and b/images/img2.jpg differ diff --git a/images/img3.jpg b/images/img3.jpg new file mode 100644 index 0000000..dc8ccb0 Binary files /dev/null and b/images/img3.jpg differ diff --git a/images/list1.png b/images/list1.png new file mode 100644 index 0000000..3718f0b Binary files /dev/null and b/images/list1.png differ diff --git a/images/list2.png b/images/list2.png new file mode 100644 index 0000000..c9cb3b6 Binary files /dev/null and b/images/list2.png differ diff --git a/images/list3.png b/images/list3.png new file mode 100644 index 0000000..9c6e813 Binary files /dev/null and b/images/list3.png differ diff --git a/images/list4.png b/images/list4.png new file mode 100644 index 0000000..67d011d Binary files /dev/null and b/images/list4.png differ diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..7b2890f Binary files /dev/null and b/images/logo.png differ diff --git a/images/my_n.png b/images/my_n.png new file mode 100644 index 0000000..345e24b Binary files /dev/null and b/images/my_n.png differ diff --git a/images/my_order.png b/images/my_order.png new file mode 100644 index 0000000..bdf3071 Binary files /dev/null and b/images/my_order.png differ diff --git a/images/my_y.png b/images/my_y.png new file mode 100644 index 0000000..940cba7 Binary files /dev/null and b/images/my_y.png differ diff --git a/images/party.png b/images/party.png new file mode 100644 index 0000000..65e84f7 Binary files /dev/null and b/images/party.png differ diff --git a/images/pending_delivery.png b/images/pending_delivery.png new file mode 100644 index 0000000..1bcd67d Binary files /dev/null and b/images/pending_delivery.png differ diff --git a/images/pending_payment.png b/images/pending_payment.png new file mode 100644 index 0000000..ec17ef1 Binary files /dev/null and b/images/pending_payment.png differ diff --git a/images/return.png b/images/return.png new file mode 100644 index 0000000..f872313 Binary files /dev/null and b/images/return.png differ diff --git a/images/shopping_cart_return.png b/images/shopping_cart_return.png new file mode 100644 index 0000000..ddc04b3 Binary files /dev/null and b/images/shopping_cart_return.png differ diff --git a/images/shopping_f.png b/images/shopping_f.png new file mode 100644 index 0000000..99f4797 Binary files /dev/null and b/images/shopping_f.png differ diff --git a/images/shopping_f_t.png b/images/shopping_f_t.png new file mode 100644 index 0000000..00a73e0 Binary files /dev/null and b/images/shopping_f_t.png differ diff --git a/images/shopping_select.png b/images/shopping_select.png new file mode 100644 index 0000000..7e2ef59 Binary files /dev/null and b/images/shopping_select.png differ diff --git a/images/triangle.png b/images/triangle.png new file mode 100644 index 0000000..4332211 Binary files /dev/null and b/images/triangle.png differ diff --git a/images/triangle_2.png b/images/triangle_2.png new file mode 100644 index 0000000..4e51ea2 Binary files /dev/null and b/images/triangle_2.png differ diff --git a/images/wedding.png b/images/wedding.png new file mode 100644 index 0000000..09e618a Binary files /dev/null and b/images/wedding.png differ diff --git a/img/accunt.png b/img/accunt.png new file mode 100644 index 0000000..6498ee3 Binary files /dev/null and b/img/accunt.png differ diff --git a/img/banner.jpg b/img/banner.jpg new file mode 100644 index 0000000..4f1094a Binary files /dev/null and b/img/banner.jpg differ diff --git a/img/bg1.png b/img/bg1.png new file mode 100644 index 0000000..9dbc678 Binary files /dev/null and b/img/bg1.png differ diff --git a/img/cart.png b/img/cart.png new file mode 100644 index 0000000..69a1c20 Binary files /dev/null and b/img/cart.png differ diff --git a/img/collecticon.png b/img/collecticon.png new file mode 100644 index 0000000..dac9dfe Binary files /dev/null and b/img/collecticon.png differ diff --git a/img/collecticon2.png b/img/collecticon2.png new file mode 100644 index 0000000..d780af3 Binary files /dev/null and b/img/collecticon2.png differ diff --git a/img/gotop.png b/img/gotop.png new file mode 100644 index 0000000..5b3af37 Binary files /dev/null and b/img/gotop.png differ diff --git a/img/group.png b/img/group.png new file mode 100644 index 0000000..9bf73c7 Binary files /dev/null and b/img/group.png differ diff --git a/img/groupH.png b/img/groupH.png new file mode 100644 index 0000000..fa5a31b Binary files /dev/null and b/img/groupH.png differ diff --git a/img/home.png b/img/home.png new file mode 100644 index 0000000..0928099 Binary files /dev/null and b/img/home.png differ diff --git a/img/icon0-0.png b/img/icon0-0.png new file mode 100644 index 0000000..021ee36 Binary files /dev/null and b/img/icon0-0.png differ diff --git a/img/login.jpg b/img/login.jpg new file mode 100644 index 0000000..b664d6e Binary files /dev/null and b/img/login.jpg differ diff --git a/img/logo.png b/img/logo.png new file mode 100644 index 0000000..d42ff67 Binary files /dev/null and b/img/logo.png differ diff --git a/img/menu.png b/img/menu.png new file mode 100644 index 0000000..baedff8 Binary files /dev/null and b/img/menu.png differ diff --git a/img/more_b.png b/img/more_b.png new file mode 100644 index 0000000..8858efe Binary files /dev/null and b/img/more_b.png differ diff --git a/img/pwd.png b/img/pwd.png new file mode 100644 index 0000000..2231d7e Binary files /dev/null and b/img/pwd.png differ diff --git a/img/searchbtn.png b/img/searchbtn.png new file mode 100644 index 0000000..369ce6e Binary files /dev/null and b/img/searchbtn.png differ diff --git a/img/shareicon.png b/img/shareicon.png new file mode 100644 index 0000000..c7e36e0 Binary files /dev/null and b/img/shareicon.png differ diff --git a/img/shopcar.png b/img/shopcar.png new file mode 100644 index 0000000..8b038b5 Binary files /dev/null and b/img/shopcar.png differ diff --git a/img/shops1.png b/img/shops1.png new file mode 100644 index 0000000..0371614 Binary files /dev/null and b/img/shops1.png differ diff --git a/img/shops2.png b/img/shops2.png new file mode 100644 index 0000000..c4c11fd Binary files /dev/null and b/img/shops2.png differ diff --git a/img/shops3.png.png b/img/shops3.png.png new file mode 100644 index 0000000..ce1fe3f Binary files /dev/null and b/img/shops3.png.png differ diff --git a/img/toggle.png b/img/toggle.png new file mode 100644 index 0000000..4f7e6a5 Binary files /dev/null and b/img/toggle.png differ diff --git a/img/toggle1.png b/img/toggle1.png new file mode 100644 index 0000000..bd18b3e Binary files /dev/null and b/img/toggle1.png differ diff --git a/img/toggle2.png b/img/toggle2.png new file mode 100644 index 0000000..fa81e7e Binary files /dev/null and b/img/toggle2.png differ diff --git a/lib/weui.wxss b/lib/weui.wxss new file mode 100644 index 0000000..1a64524 --- /dev/null +++ b/lib/weui.wxss @@ -0,0 +1,1042 @@ +/*! + * weui.js v1.1.0 (https://github.com/weui/weui-wxss) + * Copyright 2016, wechat ui team + * MIT license + */ +page { + line-height: 1.6; + font-family: -apple-system-font, "Helvetica Neue", sans-serif; +} +icon { + vertical-align: middle; +} +.weui-cells { + position: relative; + margin-top: 1.17647059em; + background-color: #FFFFFF; + line-height: 1.41176471; + font-size: 17px; +} +.weui-cells:before { + content: " "; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 1px; + border-top: 1rpx solid #D9D9D9; + color: #D9D9D9; +} +.weui-cells:after { + content: " "; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + border-bottom: 1rpx solid #D9D9D9; + color: #D9D9D9; +} +.weui-cells__title { + margin-top: .77em; + margin-bottom: .3em; + padding-left: 15px; + padding-right: 15px; + color: #999999; + font-size: 14px; +} +.weui-cells_after-title { + margin-top: 0; +} +.weui-cells__tips { + margin-top: .3em; + color: #999999; + padding-left: 15px; + padding-right: 15px; + font-size: 14px; +} +.weui-cell { + padding: 10px 15px; + position: relative; + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; +} +.weui-cell:before { + content: " "; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 1px; + border-top: 1rpx solid #D9D9D9; + color: #D9D9D9; + left: 15px; +} +.weui-cell:first-child:before { + display: none; +} +.weui-cell_active { + background-color: #ECECEC; +} +.weui-cell_primary { + -webkit-box-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.weui-cell__bd { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; +} +.weui-cell__ft { + text-align: right; + color: #999999; +} +.weui-cell_access { + color: inherit; +} +.weui-cell__ft_in-access { + padding-right: 13px; + position: relative; +} +.weui-cell__ft_in-access:after { + content: " "; + display: inline-block; + height: 6px; + width: 6px; + border-width: 2px 2px 0 0; + border-color: #C8C8CD; + border-style: solid; + -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + position: relative; + top: -2px; + position: absolute; + top: 50%; + margin-top: -4px; + right: 2px; +} +.weui-cell_link { + color: #586C94; + font-size: 14px; +} +.weui-cell_link:active { + background-color: #ECECEC; +} +.weui-cell_link:first-child:before { + display: block; +} +.weui-icon-radio { + margin-left: 3.2px; + margin-right: 3.2px; +} +.weui-icon-checkbox_circle, +.weui-icon-checkbox_success { + margin-left: 4.6px; + margin-right: 4.6px; +} +.weui-check__label:active { + background-color: #ECECEC; +} +.weui-check { + position: absolute; + left: -9999px; +} +.weui-check__hd_in-checkbox { + padding-right: 0.35em; +} +.weui-cell__ft_in-radio { + padding-left: 0.35em; +} +.weui-cell_input { + padding-top: 0; + padding-bottom: 0; +} +.weui-label { + width: 105px; + word-wrap: break-word; + word-break: break-all; +} +.weui-input { + height: 2.58823529em; + min-height: 2.58823529em; + line-height: 2.58823529em; +} +.weui-toptips { + position: fixed; + -webkit-transform: translateZ(0); + transform: translateZ(0); + top: 0; + left: 0; + right: 0; + padding: 5px; + font-size: 14px; + text-align: center; + color: #FFFFFF; + z-index: 5000; + word-wrap: break-word; + word-break: break-all; +} +.weui-toptips_warn { + background-color: #E64340; +} +.weui-textarea { + display: block; + width: 100%; +} +.weui-textarea-counter { + color: #B2B2B2; + text-align: right; +} +.weui-textarea-counter_warn { + color: #E64340; +} +.weui-cell_warn { + color: #E64340; +} +.weui-form-preview { + position: relative; + background-color: #FFFFFF; +} +.weui-form-preview:before { + content: " "; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 1px; + border-top: 1rpx solid #D9D9D9; + color: #D9D9D9; +} +.weui-form-preview:after { + content: " "; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + border-bottom: 1rpx solid #D9D9D9; + color: #D9D9D9; +} +.weui-form-preview__value { + font-size: 14px; +} +.weui-form-preview__value_in-hd { + font-size: 26px; +} +.weui-form-preview__hd { + position: relative; + padding: 10px 15px; + text-align: right; + line-height: 2.5em; +} +.weui-form-preview__hd:after { + content: " "; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + border-bottom: 1rpx solid #D9D9D9; + color: #D9D9D9; + left: 15px; +} +.weui-form-preview__bd { + padding: 10px 15px; + font-size: .9em; + text-align: right; + color: #999999; + line-height: 2; +} +.weui-form-preview__ft { + position: relative; + line-height: 50px; + display: -webkit-box; + display: -webkit-flex; + display: flex; +} +.weui-form-preview__ft:after { + content: " "; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 1px; + border-top: 1rpx solid #D5D5D6; + color: #D5D5D6; +} +.weui-form-preview__item { + overflow: hidden; +} +.weui-form-preview__label { + float: left; + margin-right: 1em; + min-width: 4em; + color: #999999; + text-align: justify; + text-align-last: justify; +} +.weui-form-preview__value { + display: block; + overflow: hidden; + word-break: normal; + word-wrap: break-word; +} +.weui-form-preview__btn { + position: relative; + display: block; + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; + color: #3CC51F; + text-align: center; +} +.weui-form-preview__btn:after { + content: " "; + position: absolute; + left: 0; + top: 0; + width: 1px; + bottom: 0; + border-left: 1rpx solid #D5D5D6; + color: #D5D5D6; +} +.weui-form-preview__btn:first-child:after { + display: none; +} +.weui-form-preview__btn_active { + background-color: #EEEEEE; +} +.weui-form-preview__btn_default { + color: #999999; +} +.weui-form-preview__btn_primary { + color: #0BB20C; +} +.weui-cell_select { + padding: 0; +} +.weui-select { + position: relative; + padding-left: 15px; + padding-right: 30px; + height: 2.58823529em; + min-height: 2.58823529em; + line-height: 2.58823529em; + border-right: 1rpx solid #D9D9D9; +} +.weui-select:before { + content: " "; + display: inline-block; + height: 6px; + width: 6px; + border-width: 2px 2px 0 0; + border-color: #C8C8CD; + border-style: solid; + -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); + position: relative; + top: -2px; + position: absolute; + top: 50%; + right: 15px; + margin-top: -4px; +} +.weui-select_in-select-after { + padding-left: 0; +} +.weui-cell__hd_in-select-after, +.weui-cell__bd_in-select-before { + padding-left: 15px; +} +.weui-cell_vcode { + padding-right: 0; +} +.weui-vcode-img { + margin-left: 5px; + height: 2.58823529em; + vertical-align: middle; +} +.weui-vcode-btn { + display: inline-block; + height: 2.58823529em; + margin-left: 5px; + padding: 0 0.6em 0 0.7em; + border-left: 1px solid #E5E5E5; + line-height: 2.58823529em; + vertical-align: middle; + font-size: 17px; + color: #3CC51F; + white-space: nowrap; +} +.weui-vcode-btn:active { + color: #52a341; +} +.weui-cell_switch { + padding-top: 6px; + padding-bottom: 6px; +} +.weui-uploader__hd { + display: -webkit-box; + display: -webkit-flex; + display: flex; + padding-bottom: 10px; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; +} +.weui-uploader__title { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; +} +.weui-uploader__info { + color: #B2B2B2; +} +.weui-uploader__bd { + margin-bottom: -4px; + margin-right: -9px; + overflow: hidden; +} +.weui-uploader__file { + float: left; + margin-right: 9px; + margin-bottom: 9px; +} +.weui-uploader__img { + display: block; + width: 79px; + height: 79px; +} +.weui-uploader__file_status { + position: relative; +} +.weui-uploader__file_status:before { + content: " "; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.5); +} +.weui-uploader__file-content { + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + color: #FFFFFF; +} +.weui-uploader__input-box { + float: left; + position: relative; + margin-right: 9px; + margin-bottom: 9px; + width: 77px; + height: 77px; + border: 1px solid #D9D9D9; +} +.weui-uploader__input-box:before, +.weui-uploader__input-box:after { + content: " "; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + background-color: #D9D9D9; +} +.weui-uploader__input-box:before { + width: 2px; + height: 39.5px; +} +.weui-uploader__input-box:after { + width: 39.5px; + height: 2px; +} +.weui-uploader__input-box:active { + border-color: #999999; +} +.weui-uploader__input-box:active:before, +.weui-uploader__input-box:active:after { + background-color: #999999; +} +.weui-uploader__input { + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; +} +.weui-article { + padding: 20px 15px; + font-size: 15px; +} +.weui-article__section { + margin-bottom: 1.5em; +} +.weui-article__h1 { + font-size: 18px; + font-weight: 400; + margin-bottom: .9em; +} +.weui-article__h2 { + font-size: 16px; + font-weight: 400; + margin-bottom: .34em; +} +.weui-article__h3 { + font-weight: 400; + font-size: 15px; + margin-bottom: .34em; +} +.weui-article__p { + margin: 0 0 .8em; +} +.weui-msg { + padding-top: 36px; + text-align: center; +} +.weui-msg__link { + display: inline; + color: #586C94; +} +.weui-msg__icon-area { + margin-bottom: 30px; +} +.weui-msg__text-area { + margin-bottom: 25px; + padding: 0 20px; +} +.weui-msg__title { + margin-bottom: 5px; + font-weight: 400; + font-size: 20px; +} +.weui-msg__desc { + font-size: 14px; + color: #999999; +} +.weui-msg__opr-area { + margin-bottom: 25px; +} +.weui-msg__extra-area { + margin-bottom: 15px; + font-size: 14px; + color: #999999; +} +@media screen and (min-height: 438px) { + .weui-msg__extra-area { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + text-align: center; + } +} +.weui-flex { + display: -webkit-box; + display: -webkit-flex; + display: flex; +} +.weui-flex__item { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; +} +.weui-btn { + margin-top: 15px; +} +.weui-btn:first-child { + margin-top: 0; +} +.weui-btn-area { + margin: 1.17647059em 15px 0.3em; +} +.weui-agree { + display: block; + padding: .5em 15px; + font-size: 13px; +} +.weui-agree__text { + color: #999999; +} +.weui-agree__link { + display: inline; + color: #586C94; +} +.weui-agree__checkbox { + position: absolute; + left: -9999px; +} +.weui-agree__checkbox-icon { + position: relative; + top: 2px; + display: inline-block; + border: 1px solid #D1D1D1; + background-color: #FFFFFF; + border-radius: 3px; + width: 11px; + height: 11px; +} +.weui-agree__checkbox-icon-check { + position: absolute; + top: 1px; + left: 1px; +} +.weui-footer { + color: #999999; + font-size: 14px; + text-align: center; +} +.weui-footer_fixed-bottom { + position: fixed; + bottom: .52em; + left: 0; + right: 0; +} +.weui-footer__links { + font-size: 0; +} +.weui-footer__link { + display: inline-block; + vertical-align: top; + margin: 0 .62em; + position: relative; + font-size: 14px; + color: #586C94; +} +.weui-footer__link:before { + content: " "; + position: absolute; + left: 0; + top: 0; + width: 1px; + bottom: 0; + border-left: 1rpx solid #C7C7C7; + color: #C7C7C7; + left: -0.65em; + top: .36em; + bottom: .36em; +} +.weui-footer__link:first-child:before { + display: none; +} +.weui-footer__text { + padding: 0 .34em; + font-size: 12px; +} +.weui-grids { + border-top: 1rpx solid #D9D9D9; + border-left: 1rpx solid #D9D9D9; + overflow: hidden; +} +.weui-grid { + position: relative; + float: left; + padding: 20px 10px; + width: 33.33333333%; + box-sizing: border-box; + border-right: 1rpx solid #D9D9D9; + border-bottom: 1rpx solid #D9D9D9; +} +.weui-grid_active { + background-color: #ECECEC; +} +.weui-grid__icon { + display: block; + width: 28px; + height: 28px; + margin: 0 auto; +} +.weui-grid__label { + margin-top: 5px; + display: block; + text-align: center; + color: #000000; + font-size: 14px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.weui-loading { + margin: 0 5px; + width: 20px; + height: 20px; + display: inline-block; + vertical-align: middle; + -webkit-animation: weuiLoading 1s steps(12, end) infinite; + animation: weuiLoading 1s steps(12, end) infinite; + background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat; + background-size: 100%; +} +@-webkit-keyframes weuiLoading { + 0% { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } + 100% { + -webkit-transform: rotate3d(0, 0, 1, 360deg); + transform: rotate3d(0, 0, 1, 360deg); + } +} +@keyframes weuiLoading { + 0% { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } + 100% { + -webkit-transform: rotate3d(0, 0, 1, 360deg); + transform: rotate3d(0, 0, 1, 360deg); + } +} +.weui-badge { + display: inline-block; + padding: .15em .4em; + min-width: 8px; + border-radius: 18px; + background-color: #F43530; + color: #FFFFFF; + line-height: 1.2; + text-align: center; + font-size: 12px; + vertical-align: middle; +} +.weui-badge_dot { + padding: .4em; + min-width: 0; +} +.weui-loadmore { + width: 65%; + margin: 1.5em auto; + line-height: 1.6em; + font-size: 14px; + text-align: center; +} +.weui-loadmore__tips { + display: inline-block; + vertical-align: middle; +} +.weui-loadmore_line { + border-top: 1px solid #E5E5E5; + margin-top: 2.4em; +} +.weui-loadmore__tips_in-line { + position: relative; + top: -0.9em; + padding: 0 .55em; + background-color: #FFFFFF; + color: #999999; +} +.weui-loadmore__tips_in-dot { + position: relative; + padding: 0 .16em; + width: 4px; + height: 1.6em; +} +.weui-loadmore__tips_in-dot:before { + content: " "; + position: absolute; + top: 50%; + left: 50%; + margin-top: -1px; + margin-left: -2px; + width: 4px; + height: 4px; + border-radius: 50%; + background-color: #E5E5E5; +} +.weui-panel { + background-color: #FFFFFF; + margin-top: 10px; + position: relative; + overflow: hidden; +} +.weui-panel:first-child { + margin-top: 0; +} +.weui-panel:before { + content: " "; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 1px; + border-top: 1rpx solid #E5E5E5; + color: #E5E5E5; +} +.weui-panel:after { + content: " "; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + border-bottom: 1rpx solid #E5E5E5; + color: #E5E5E5; +} +.weui-panel__hd { + padding: 14px 15px 10px; + color: #999999; + font-size: 13px; + position: relative; +} +.weui-panel__hd:after { + content: " "; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + border-bottom: 1rpx solid #E5E5E5; + color: #E5E5E5; + left: 15px; +} +.weui-media-box { + padding: 15px; + position: relative; +} +.weui-media-box:before { + content: " "; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 1px; + border-top: 1rpx solid #E5E5E5; + color: #E5E5E5; + left: 15px; +} +.weui-media-box:first-child:before { + display: none; +} +.weui-media-box__title { + font-weight: 400; + font-size: 17px; + width: auto; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + word-wrap: normal; + word-wrap: break-word; + word-break: break-all; +} +.weui-media-box__desc { + color: #999999; + font-size: 13px; + line-height: 1.2; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} +.weui-media-box__info { + margin-top: 15px; + padding-bottom: 5px; + font-size: 13px; + color: #CECECE; + line-height: 1em; + list-style: none; + overflow: hidden; +} +.weui-media-box__info__meta { + float: left; + padding-right: 1em; +} +.weui-media-box__info__meta_extra { + padding-left: 1em; + border-left: 1px solid #CECECE; +} +.weui-media-box__title_in-text { + margin-bottom: 8px; +} +.weui-media-box_appmsg { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; +} +.weui-media-box__thumb { + width: 100%; + height: 100%; + vertical-align: top; +} +.weui-media-box__hd_in-appmsg { + margin-right: .8em; + width: 60px; + height: 60px; + line-height: 60px; + text-align: center; +} +.weui-media-box__bd_in-appmsg { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; + min-width: 0; +} +.weui-media-box_small-appmsg { + padding: 0; +} +.weui-cells_in-small-appmsg { + margin-top: 0; +} +.weui-cells_in-small-appmsg:before { + display: none; +} +.weui-progress { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; +} +.weui-progress__bar { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; +} +.weui-progress__opr { + margin-left: 15px; + font-size: 0; +} +.weui-navbar { + display: -webkit-box; + display: -webkit-flex; + display: flex; + position: absolute; + z-index: 500; + top: 0; + width: 100%; + border-bottom: 1rpx solid #CCCCCC; +} +.weui-navbar__item { + position: relative; + display: block; + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; + padding: 13px 0; + text-align: center; + font-size: 0; +} +.weui-navbar__item.weui-bar__item_on { + color: #1AAD19; +} +.weui-navbar__slider { + position: absolute; + content: " "; + left: 0; + bottom: 0; + width: 6em; + height: 3px; + background-color: #1AAD19; + -webkit-transition: -webkit-transform .3s; + transition: -webkit-transform .3s; + transition: transform .3s; + transition: transform .3s, -webkit-transform .3s; +} +.weui-navbar__title { + display: inline-block; + font-size: 15px; + max-width: 8em; + width: auto; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + word-wrap: normal; +} +.weui-tab { + position: relative; + height: 100%; +} +.weui-tab__panel { + box-sizing: border-box; + height: 100%; + padding-top: 50px; + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.weui-search-bar { + position: relative; + padding: 8px 10px; + display: -webkit-box; + display: -webkit-flex; + display: flex; + box-sizing: border-box; + background-color: #EFEFF4; + border-top: 1rpx solid #D7D6DC; + border-bottom: 1rpx solid #D7D6DC; +} +.weui-icon-search { + margin-right: 8px; + font-size: inherit; +} +.weui-icon-search_in-box { + position: absolute; + left: 10px; + top: 7px; +} +.weui-search-bar__text { + display: inline-block; + font-size: 14px; + vertical-align: middle; +} +.weui-search-bar__form { + position: relative; + -webkit-box-flex: 1; + -webkit-flex: auto; + flex: auto; + border-radius: 5px; + background: #FFFFFF; + border: 1rpx solid #E6E6EA; +} +.weui-search-bar__box { + position: relative; + padding-left: 30px; + padding-right: 30px; + width: 100%; + box-sizing: border-box; + z-index: 1; +} +.weui-search-bar__input { + height: 28px; + line-height: 28px; + font-size: 14px; +} +.weui-icon-clear { + position: absolute; + top: 0; + right: 0; + padding: 7px 8px; + font-size: 0; +} +.weui-search-bar__label { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + border-radius: 3px; + text-align: center; + color: #9B9B9B; + background: #FFFFFF; + line-height: 28px; +} +.weui-search-bar__cancel-btn { + margin-left: 10px; + line-height: 28px; + color: #09BB07; + white-space: nowrap; +} diff --git a/pages/address-Add/index.js b/pages/address-Add/index.js new file mode 100644 index 0000000..523905b --- /dev/null +++ b/pages/address-Add/index.js @@ -0,0 +1,294 @@ +// pages/addressAdd/index.js +const app = getApp(); +// var curl = 'https://miniapp.shopdz.cn/'; +const curl = require('../../config').host; +Page({ + + /** + * 页面的初始数据 + */ + data: { + region: ['广东省', '广州市', '海珠区'], + customItem: '全部', + name:'',//姓名 + phone:'',//手机号 + address: '',//详情地址 + childAreaList: null,//所有省 + province: null,//所有市 + area:null,//所有县或地区 + province_id: null,//省份id + info_province: null,//省份名字 + city_id: null,//城市id + info_city: null,//城市名字 + area_id: null,//县或区id + info_area: null,//县或区名字 + address_id:null, + style:null, + is_default:1, + addressIs:true, + _id:null + }, + //省份 + bindChange:function(e){ + var self = this; + var province_id = self.data.childAreaList[e.detail.value].area_id;//省份id + var province = self.data.childAreaList[e.detail.value].area_name;//省份名字 + if (e.detail.value){ + self.province(province_id); + self.setData({ + province_id: province_id,//省份id + info_province: province,//省份名字 + }) + } + }, + //市 + bindRegionChang:function(e){ + var self = this; + var city_id = self.data.province[e.detail.value].area_id;//城市id + var city = self.data.province[e.detail.value].area_name;//城市名字 + if (e.detail.value){ + self.area(city_id); + this.setData({ + city_id: city_id,//城市id + info_city: city,//城市名字 + }) + } + }, + //区或县 + bindRegionChange: function (e) { + var area = this.data.area[e.detail.value].area_name; + if (e.detail.value){ + this.setData({ + area_id: this.data.area[e.detail.value].area_id,//县或区id + info_area: area,//县或区名字 + }) + } + }, + //姓名 + bindKeyName: function (e) { + this.setData({ + name: e.detail.value + }) + }, + //电话 + bindKeyMobile: function (e) { + this.setData({ + phone: e.detail.value + }) + }, + //详情地址 + bindKeyDetailed: function (e) { + this.setData({ + address: e.detail.value + }) + }, + //提交 + submitFun:function(){ + var self = this; + var zn_zw = /^[\u4e00-\u9fa50-9]+$/; + + if (self.data.name.length > 10 || !self.data.name){ + wx.showToast({ + title: "请输入正常姓名", + icon: 'none', + duration: 2000 + }) + return; + } + + if (self.data.phone.length > 11 || self.data.phone.length < 11 || !self.data.phone){ + wx.showToast({ + title: "请输入11位正常手机号", + icon: 'none', + duration: 2000 + }) + return; + } + var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; + if (!myreg.test(self.data.phone)) { + wx.showToast({ + title: "请输入11位正常手机号", + icon: 'none', + duration: 2000 + }) + return; + } + if (self.data.address.length > 50 || !self.data.address) { + wx.showToast({ + title: "请缩减详情地址字数或请输入详情地址", + icon: 'none', + duration: 2000 + }) + return; + } + if (!self.data.info_province || !self.data.info_city || !self.data.info_area){ + wx.showToast({ + title: "省份,城市,区县不能为空", + icon: 'none', + duration: 2000 + }) + return; + } + var key = wx.getStorageSync('key'); + var area_info = self.data.info_province + self.data.info_city + self.data.info_area; + var params_wx = { + key: key, + true_name: self.data.name, + province_id: self.data.province_id, + city_id: self.data.city_id, + area_id: self.data.area_id, + area_info: area_info, + address: self.data.address, + tel_phone: self.data.phone, + is_default: self.data.is_default, + }; + wx.request({ + url: curl +'api.php/Member/addressAdd', + data: params_wx, + method:'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + wx.navigateBack(); + } + }) + }, + //默认选中 + defaults:function(e){ + var self = this; + var is_default = e.currentTarget.dataset.id; + if (is_default == 0){ + self.setData({ + is_default: '1', + }); + } else if (is_default == 1){ + self.setData({ + is_default: '0', + }); + } + }, + //所有省份 + childAreaList:function(){ + var self = this; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key, area_parent_id:0}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if(res.data.code == 0){ + var childAreaList = res.data.data; var i = 0; + self.setData({ + childAreaList: childAreaList, + }); + } + } + }) + }, + //所有市 + province: function (province){ + var self = this; + var key = wx.getStorageSync('key'); + if (province){ + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key,area_parent_id: province}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if (res.data.code == 0) { + var province = res.data.data; + self.setData({ + province: province, + }); + } + } + }) + } + }, + //所有区或县 + area: function (area){ + var self = this; + var key = wx.getStorageSync('key'); + if (area){ + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key, area_parent_id: area}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if (res.data.code == 0) { + var area = res.data.data; + self.setData({ + area: area, + }); + } + } + }) + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var self = this; + self.childAreaList(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/address-Add/index.json b/pages/address-Add/index.json new file mode 100644 index 0000000..3f2e6a9 --- /dev/null +++ b/pages/address-Add/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "新增地址" +} \ No newline at end of file diff --git a/pages/address-Add/index.wxml b/pages/address-Add/index.wxml new file mode 100644 index 0000000..6fe24f2 --- /dev/null +++ b/pages/address-Add/index.wxml @@ -0,0 +1,67 @@ + + + + 联系人 + + + + 手机号 + + + + + + {{info_province}} + + + 请选择省 + + + + + + + + + + + {{info_city}} + + + 请选择市 + + + + + + + + + + + {{info_area}} + + + 请选择区 + + + + + + + + 详细地址 + + + + + + + + + + 设为默认地址 + + + 保存 + \ No newline at end of file diff --git a/pages/address-Add/index.wxss b/pages/address-Add/index.wxss new file mode 100644 index 0000000..c66b70a --- /dev/null +++ b/pages/address-Add/index.wxss @@ -0,0 +1,148 @@ +.main{ + + height: 100vh; + background: #e8e9e8; +} +.item{ + display: flex; + border-bottom: 1px solid #d8d8d8; + line-height: 20px; + padding: 15px; +} +.items{ + display: flex; + border-bottom: 1px solid #d8d8d8; + line-height: 38px; + padding: 5px; +} +.address-default { + height: 100rpx; + background: #fafafa; + line-height: 48px; + text-align: center; +} +.address-check { + margin: 1rpx 0; + display: inline-block; + vertical-align: middle; +} +.check-box { + position: relative; + background: url(http://shopdz.shopdz.cn/wap/img/cb-selected.png) no-repeat top center; + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + /* margin: 60rpx auto; */ +} +.checks-box { + position: relative; + background: url(http://shopdz.shopdz.cn/wap/img/cb-normal.png) no-repeat top center; + /* /img/cb-normal.png */ + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + /* margin: 60rpx auto; */ +} +.check-box input[type=checkbox] { + position: absolute; + top: 0; + left: 0; + width: 10px; + height: 10px; + z-index: 89; + opacity: 0; +} +input[type="checkbox"] { + -webkit-appearance: none; +} +.remind4 { + color: #999; + font-size: 30rpx; + display: inline-block; + vertical-align: middle; +} +.data{ + background: #fff; + padding: 0 20px; +} +.item text { + flex: 0 1 25%; + font-size: 16px; + color: #080808; +} +.item .xiangxi{ + flex: 0 1 25%; + font-size: 16px; + color: #4e4b4b; +} +.item input{ + flex: 1 1 auto; + font-size: 16px; + color: #333333; + line-height: 40px; + height: 40px; +} + +.items text { + flex: 0 1 25%; + font-size: 16px; + color: #080808; +} +.items .xiangxi{ + flex: 0 1 25%; + font-size: 16px; + color: #4e4b4b; +} +.items input{ + flex: 1 1 auto; + font-size: 16px; + color: #333333; + line-height: 40px; + height: 40px; +} + +.item .code{ + flex: 0 1 25%; + font-size: 12px; + color:#ff5f19; + border-left: 1px solid #d8d8d8; + text-align: center; + height: 24px; + margin: 8px 0; + line-height: 24px; +} + +.item .icon{ + flex: 0 1 10%; + text-align: right; +} + +.item picker{ + flex: 1 1 auto; + font-size:16px; +} + +.item .icon image{ + width:8px; + height:15px; +} + +.text{ + font-size: 12px; + color: #999999; + background: #fff; + padding: 10px 20px; +} + +.btn{ + line-height: 46px; + background: #E5E5E5; + font-size: 18px; + color: #FFFFFF; + text-align:center; + margin:50px 30px; + border-radius:2px; +} +.active{ + background:#ff5f19; +} \ No newline at end of file diff --git a/pages/address-Adds/index.js b/pages/address-Adds/index.js new file mode 100644 index 0000000..ea9e03e --- /dev/null +++ b/pages/address-Adds/index.js @@ -0,0 +1,314 @@ +// pages/addressAdd/index.js +const app = getApp(); +// var curl = 'https://miniapp.shopdz.cn/'; +const curl = require('../../config').host; +Page({ + + /** + * 页面的初始数据 + */ + data: { + region: ['广东省', '广州市', '海珠区'], + customItem: '全部', + name:'',//姓名 + phone:'',//手机号 + address: null,//详情地址 + childAreaList: null,//所有省 + province: null,//所有市 + area:null,//所有县或地区 + province_id: null,//省份id + info_province: null,//省份名字 + city_id: null,//城市id + info_city: null,//城市名字 + area_id: null,//县或区id + info_area: null,//县或区名字 + address_id:null, + style:null, + is_default:1, + addressIs:true, + _id:null + }, + //省份 + bindChange:function(e){ + var self = this; + var province_id = self.data.childAreaList[e.detail.value].area_id;//省份id + var province = self.data.childAreaList[e.detail.value].area_name;//省份名字 + if (e.detail.value){ + self.province(province_id); + self.setData({ + province_id: province_id,//省份id + info_province: province,//省份名字 + }) + } + }, + //市 + bindRegionChang:function(e){ + var self = this; + var city_id = self.data.province[e.detail.value].area_id;//城市id + var city = self.data.province[e.detail.value].area_name;//城市名字 + if (e.detail.value){ + self.area(city_id); + this.setData({ + city_id: city_id,//城市id + info_city: city,//城市名字 + }) + } + }, + //区或县 + bindRegionChange: function (e) { + var area = this.data.area[e.detail.value].area_name; + if (e.detail.value){ + this.setData({ + area_id: this.data.area[e.detail.value].area_id,//县或区id + info_area: area,//县或区名字 + }) + } + }, + //姓名 + bindKeyName: function (e) { + this.setData({ + name: e.detail.value + }) + }, + //电话 + bindKeyMobile: function (e) { + this.setData({ + phone: e.detail.value + }) + }, + //详情地址 + bindKeyDetailed: function (e) { + this.setData({ + address: e.detail.value + }) + }, + //提交 + submitFun:function(){ + var self = this; + + var zn_zw = /^[\u4e00-\u9fa5]+$/; + + if (self.data.name.length > 10 || !self.data.name) { + wx.showToast({ + title: "请输入正常姓名", + icon: 'none', + duration: 2000 + }) + return; + } + + if (self.data.phone.length > 11 || self.data.phone.length < 11 || !self.data.phone) { + wx.showToast({ + title: "请输入11位正常手机号", + icon: 'none', + duration: 2000 + }) + return; + } + var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; + if (!myreg.test(self.data.phone)) { + wx.showToast({ + title: "请输入11位正常手机号", + icon: 'none', + duration: 2000 + }) + return; + } + if (self.data.address.length > 50 || !self.data.address) { + wx.showToast({ + title: "请缩减详情地址字数或请输入详情地址", + icon: 'none', + duration: 2000 + }) + return; + } + if (!self.data.info_province || !self.data.info_city || !self.data.info_area) { + wx.showToast({ + title: "省份,城市,区县不能为空", + icon: 'none', + duration: 2000 + }) + return; + } + + + var key = wx.getStorageSync('key'); + var id = self.data.id; + var num = self.data.num; + var area_info = self.data.info_province + self.data.info_city + self.data.info_area; + var params_wx = { + key: key, + true_name: self.data.name, + province_id: self.data.province_id, + city_id: self.data.city_id, + area_id: self.data.area_id, + area_info: area_info, + address: self.data.address, + tel_phone: self.data.phone, + is_default: self.data.is_default, + }; + wx.request({ + url: curl +'api.php/Member/addressAdd', + data: params_wx, + method:'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + console.log(res); + if(num){ + wx.navigateTo({ + url: '../orderDetails/index?id=' + id +'&goods_num='+num, + }); + }else{ + wx.navigateTo({ + url: '../orderDetails/index?id=' + id, + }); + } + } + }) + }, + //默认选中 + defaults:function(e){ + var self = this; + var is_default = e.currentTarget.dataset.id; + if (is_default == 0){ + self.setData({ + is_default: '1', + }); + } else if (is_default == 1){ + self.setData({ + is_default: '0', + }); + } + }, + //所有省份 + childAreaList:function(){ + var self = this; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key, area_parent_id:0}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if(res.data.code == 0){ + var childAreaList = res.data.data; var i = 0; + self.setData({ + childAreaList: childAreaList, + }); + } + } + }) + }, + //所有市 + province: function (province){ + var self = this; + var key = wx.getStorageSync('key'); + if (province){ + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key,area_parent_id: province}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if (res.data.code == 0) { + var province = res.data.data; + self.setData({ + province: province, + }); + } + } + }) + } + }, + //所有区或县 + area: function (area){ + var self = this; + var key = wx.getStorageSync('key'); + if (area){ + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key, area_parent_id: area}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if (res.data.code == 0) { + var area = res.data.data; + self.setData({ + area: area, + }); + } + } + }) + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var self = this; + var id = options.id; + var num = options.num; + self.childAreaList(); + self.setData({ + id:id, + num:num, + }); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/address-Adds/index.json b/pages/address-Adds/index.json new file mode 100644 index 0000000..3f2e6a9 --- /dev/null +++ b/pages/address-Adds/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "新增地址" +} \ No newline at end of file diff --git a/pages/address-Adds/index.wxml b/pages/address-Adds/index.wxml new file mode 100644 index 0000000..99d471b --- /dev/null +++ b/pages/address-Adds/index.wxml @@ -0,0 +1,67 @@ + + + + 联系人 + + + + 手机号 + + + + + + {{info_province}} + + + 请选择省 + + + + + + + + + + + {{info_city}} + + + 请选择市 + + + + + + + + + + + {{info_area}} + + + 请选择区 + + + + + + + + 详细地址 + + + + + + + + + + 设为默认地址 + + + 保存 + \ No newline at end of file diff --git a/pages/address-Adds/index.wxss b/pages/address-Adds/index.wxss new file mode 100644 index 0000000..e2b24c2 --- /dev/null +++ b/pages/address-Adds/index.wxss @@ -0,0 +1,121 @@ +.main{ + + height: 100vh; + background: #e8e9e8; +} +.item{ + display: flex; + border-bottom: 1px solid #d8d8d8; + line-height: 40px; + padding: 15px 0 0 0; + +} +.address-default { + height: 80rpx; + background: #fafafa; + line-height: 2.2; + text-align: center; +} +.address-check { + margin: 1rpx 0; + display: inline-block; + vertical-align: middle; +} +.check-box { + position: relative; + background: url(http://shopdz.shopdz.cn/wap/img/cb-selected.png) no-repeat top center; + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + /* margin: 60rpx auto; */ +} +.checks-box { + position: relative; + background: url(http://shopdz.shopdz.cn/wap/img/cb-normal.png) no-repeat top center; + /* /img/cb-normal.png */ + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + /* margin: 60rpx auto; */ +} +.check-box input[type=checkbox] { + position: absolute; + top: 0; + left: 0; + width: 10px; + height: 10px; + z-index: 89; + opacity: 0; +} +input[type="checkbox"] { + -webkit-appearance: none; +} +.remind4 { + color: #999; + font-size: 30rpx; + display: inline-block; + vertical-align: middle; +} +.data{ + background: #fff; + padding: 0 20px; +} +.item text { + flex: 0 1 25%; + font-size: 14px; + color: #333333; +} + +.item input{ + flex: 1 1 auto; + font-size: 16px; + color: #333333; + line-height: 40px; + height: 40px; +} + +.item .code{ + flex: 0 1 25%; + font-size: 12px; + color:#ff5f19; + border-left: 1px solid #d8d8d8; + text-align: center; + height: 24px; + margin: 8px 0; + line-height: 24px; +} + +.item .icon{ + flex: 0 1 10%; + text-align: right; +} + +.item picker{ + flex: 1 1 auto; + font-size:16px; +} + +.item .icon image{ + width:8px; + height:15px; +} + +.text{ + font-size: 12px; + color: #999999; + background: #fff; + padding: 10px 20px; +} + +.btn{ + line-height: 46px; + background: #E5E5E5; + font-size: 18px; + color: #FFFFFF; + text-align:center; + margin:50px 30px; + border-radius:2px; +} +.active{ + background:#ff5f19; +} \ No newline at end of file diff --git a/pages/addressAdd/index.js b/pages/addressAdd/index.js new file mode 100644 index 0000000..c534bcc --- /dev/null +++ b/pages/addressAdd/index.js @@ -0,0 +1,349 @@ +// pages/addressAdd/index.js +const app = getApp(); +// var curl = 'https://miniapp.shopdz.cn/'; +const curl = require('../../config').host; +Page({ + + /** + * 页面的初始数据 + */ + data: { + region: ['广东省', '广州市', '海珠区'], + customItem: '全部', + name:'', + phone:'', + province:null,//省 + city: null,//市 + area:null,//县或地区 + info_province: null,//省 + info_city: null,//市 + info_area: null,//县或地区 + address:null, + childAreaList:null, + province_id:null, + city_id:null, + area_id:null, + address_id:null, + style:null, + is_default:null, + addressIs:true, + _id:null + }, + //省份 + bindChange:function(e){ + var self = this; + var province_id = self.data.childAreaList[e.detail.value].area_id; + var province = self.data.childAreaList[e.detail.value].area_name; + if (e.detail.value){ + self.province(province_id); + self.setData({ + province_id: province_id, + info_province: province, + city_id:false, + area_id: false, + }) + } + }, + //市 + bindRegionChang:function(e){ + var self = this; + var city_id = self.data.province[e.detail.value].area_id; + var city = self.data.province[e.detail.value].area_name; + if (e.detail.value){ + self.area(city_id); + console.log(city); + this.setData({ + city_id: city_id, + info_city: city, + area_id:false, + }) + } + }, + //区或县 + bindRegionChange: function (e) { + var area = this.data.area[e.detail.value].area_name; + if (e.detail.value){ + this.setData({ + area_id: this.data.area[e.detail.value].area_id, + info_area: area, + }) + } + }, + bindKeyName: function (e) { + this.setData({ + name: e.detail.value + }) + }, + bindKeyMobile: function (e) { + this.setData({ + phone: e.detail.value + }) + }, + bindKeyDetailed: function (e) { + this.setData({ + address: e.detail.value + }) + }, + //提交 + submitFun:function(){ + var self = this; + var zn_zw = /^[\u4e00-\u9fa5]+$/; + + if (self.data.name.length > 10 || !self.data.name) { + wx.showToast({ + title: "请输入正常姓名", + icon: 'none', + duration: 2000 + }) + return; + } + + if (self.data.phone.length > 11 || self.data.phone.length < 11 || !self.data.phone) { + wx.showToast({ + title: "请输入11位正常手机号", + icon: 'none', + duration: 2000 + }) + return; + } + var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; + if (!myreg.test(self.data.phone)) { + wx.showToast({ + title: "请输入11位正常手机号", + icon: 'none', + duration: 2000 + }) + return; + } + if (self.data.address.length > 50 || !self.data.address) { + wx.showToast({ + title: "请缩减详情地址字数或请输入详情地址", + icon: 'none', + duration: 2000 + }) + return; + } + if (!self.data.info_province || !self.data.info_city || !self.data.info_area) { + wx.showToast({ + title: "省份,城市,区县不能为空", + icon: 'none', + duration: 2000 + }) + return; + } + var key = wx.getStorageSync('key'); + var area_info = self.data.info_province + self.data.info_city + self.data.info_area; + var params_wx = { + key: key, + true_name: self.data.name, + province_id: self.data.province_id, + city_id: self.data.city_id, + area_id: self.data.area_id, + area_info: area_info, + address: self.data.address, + tel_phone: self.data.phone, + address_id: self.data.address_id, + is_default: self.data.is_default, + }; + wx.request({ + url: curl +'api.php/Member/addressAdd', + data: params_wx, + method:'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + wx.navigateBack(); + } + }) + }, + //默认选中 + defaults:function(e){ + var self = this; + var is_default = e.currentTarget.dataset.id; + if (is_default == 0){ + self.setData({ + style: 'check-box', + is_default: '1', + }); + } else if (is_default == 1){ + self.setData({ + style: 'checks-box', + is_default: '0', + }); + } + }, + //所有省份 + childAreaList:function(){ + var self = this; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key, area_parent_id:0}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if(res.data.code == 0){ + var childAreaList = res.data.data; var i = 0; + for(var i = 0; i < childAreaList.length;i++){ + if (self.data.province_id == childAreaList[i].area_id){ + var info_province = childAreaList[i].area_name; + } + } + self.setData({ + childAreaList: childAreaList, + info_province: info_province, + }); + } + } + }) + }, + //所有市 + province: function (province){ + var self = this; + var key = wx.getStorageSync('key'); + if (province){ + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key,area_parent_id: province}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if (res.data.code == 0) { + var province = res.data.data; + for (var i = 0; i < province.length; i++) { + if (self.data.city_id == province[i].area_id) { + var info_city = province[i].area_name; + break; + }else{ + var info_area = null; + } + } + self.setData({ + province: province, + info_city: info_city, + }); + } + } + }) + } + }, + //所有区或县 + area: function (area){ + var self = this; + var key = wx.getStorageSync('key'); + if (area){ + wx.request({ + url: curl +'api.php/Member/getChildAreaList', + data: { key: key, area_parent_id: area}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if (res.data.code == 0) { + var area = res.data.data; + for (var i = 0; i < area.length; i++) { + if (self.data.area_id == area[i].area_id) { + var info_area = area[i].area_name; + break; + }else{ + var info_area = null; + } + } + self.setData({ + area: area, + info_area: info_area, + }); + } + } + }) + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var self = this; + if (options.address_id){ + var province_id = options.province; + var city_id = options.city; + var area_id = options.area; + var is_default = options.is_default; + if (is_default == 1){ + var style = 'check-box'; + }else if(is_default== 0){ + var style = 'checks-box'; + } + self.childAreaList(); + self.province(province_id); + self.area(city_id); + this.setData({ + style: style, + is_default: is_default, + city_id: city_id, + province_id: province_id, + area_id: area_id, + address: options.address, + name: options.name, + phone: options.phone, + // detailed: options.detailed, + address_id: options.address_id, + addressIs:false + }) + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/addressAdd/index.json b/pages/addressAdd/index.json new file mode 100644 index 0000000..f7d850a --- /dev/null +++ b/pages/addressAdd/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "修改地址" +} \ No newline at end of file diff --git a/pages/addressAdd/index.wxml b/pages/addressAdd/index.wxml new file mode 100644 index 0000000..3cca54a --- /dev/null +++ b/pages/addressAdd/index.wxml @@ -0,0 +1,70 @@ + + + + + 联系人 + + + + 手机号 + + + + + + + {{item.area_name}} + + + + + + + + + + + {{item.area_name}} + + + 请选择市 + + + + + + + + + + + {{item.area_name}} + + + 请选择区 + + + + + + + + 详细地址 + + + + + + + + 设为默认地址 + + + 保存 + \ No newline at end of file diff --git a/pages/addressAdd/index.wxss b/pages/addressAdd/index.wxss new file mode 100644 index 0000000..e3ac284 --- /dev/null +++ b/pages/addressAdd/index.wxss @@ -0,0 +1,120 @@ +.main{ + height: 100vh; + background: #e8e9e8; +} +.item{ + display: flex; + border-bottom: 1px solid #d8d8d8; + line-height: 40px; + padding: 15px 0 0 0; + +} +.address-default { + height: 80rpx; + background: #fafafa; + line-height: 2.2; + text-align: center; +} +.address-check { + margin: 1rpx 0; + display: inline-block; + vertical-align: middle; +} +.check-box { + position: relative; + background: url(http://shopdz.shopdz.cn/wap/img/cb-selected.png) no-repeat top center; + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + /* margin: 60rpx auto; */ +} +.checks-box { + position: relative; + background: url(http://shopdz.shopdz.cn/wap/img/cb-normal.png) no-repeat top center; + /* /img/cb-normal.png */ + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + /* margin: 60rpx auto; */ +} +.check-box input[type=checkbox] { + position: absolute; + top: 0; + left: 0; + width: 10px; + height: 10px; + z-index: 89; + opacity: 0; +} +input[type="checkbox"] { + -webkit-appearance: none; +} +.remind4 { + color: #999; + font-size: 30rpx; + display: inline-block; + vertical-align: middle; +} +.data{ + background: #fff; + padding: 0 20px; +} +.item text { + flex: 0 1 25%; + font-size: 14px; + color: #333333; +} + +.item input{ + flex: 1 1 auto; + font-size: 16px; + color: #333333; + line-height: 40px; + height: 40px; +} + +.item .code{ + flex: 0 1 25%; + font-size: 12px; + color:#ff5f19; + border-left: 1px solid #d8d8d8; + text-align: center; + height: 24px; + margin: 8px 0; + line-height: 24px; +} + +.item .icon{ + flex: 0 1 10%; + text-align: right; +} + +.item picker{ + flex: 1 1 auto; + font-size:16px; +} + +.item .icon image{ + width:8px; + height:15px; +} + +.text{ + font-size: 12px; + color: #999999; + background: #fff; + padding: 10px 20px; +} + +.btn{ + line-height: 46px; + background: #E5E5E5; + font-size: 18px; + color: #FFFFFF; + text-align:center; + margin:50px 30px; + border-radius:2px; +} +.active{ + background:#ff5f19; +} \ No newline at end of file diff --git a/pages/addressList/index.js b/pages/addressList/index.js new file mode 100644 index 0000000..57e932b --- /dev/null +++ b/pages/addressList/index.js @@ -0,0 +1,172 @@ +// pages/addressList/index.js +const app = getApp() +// const curl = 'https://miniapp.shopdz.cn/'; +const curl = require('../../config').host; +Page({ + + /** + * 页面的初始数据 + */ + data: { + address_list:[], + id:'', + state:null, + address_id:null, + is_addressDel:false, + }, + + /** + * 生命周期函数--监听页面加载 + */ + defaultFun:function(data){ + // app.http('v1/user/defaultCity', { + // id: data.currentTarget.dataset.item._id + // }, 'POST') + // .then(res => { + // app.globalData.userInfo.address = res.data + // this.setData({ + // id: res.data._id + // }) + // if (this.data.state == 1){ + // wx.navigateBack({ + // delta: 1 + // }) + // } + // }) + }, + onLoad: function (options) { + var self = this; + self.address(); + // this.setData({ + // id: app.globalData.userInfo.address._id, + // state: options ? options.type:null + // }) + }, + address:function(){ + var self = this; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl +'api.php/Member/addressList', + data:{key:key}, + method: 'POST', + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + success:function(res){ + if(res.data.code == 0){ + var address = res.data.data.address_list; + self.setData({ + address_list:address, + }); + // console.log(address); + } + } + }) + }, + addressDel:function(e){ + var self = this; + var key = wx.getStorageSync('key'); + var address_id = e.currentTarget.dataset.id; + var data = { + key:key, + address_id:address_id, + } + wx.showModal({ + title: '确定要删除此地址吗?', + cancelText: "取消", //默认是“取消” + confirmText: "确定", //默认是“确定” + success(res) { + if (res.cancel) { + console.log('隐藏'); + } else { + wx.request({ + url: curl + 'api.php/Member/addressDel', + data: data, + header: { + 'content-type': 'application/x-www-form-urlencoded' // 默认值 + }, + method: 'POST', + success: function (res) { + if (res.data.code == 1) { + wx.showToast({ + title: "默认地址不能删除", + icon: 'none', + duration: 2000 + }) + } + self.address(); + self.setData({ + address_id: null, + is_addressDel: false, + }); + } + }) + } + } + }) + }, + deletes:function(e){ + var self = this; + var address_id = e.currentTarget.dataset.id; + self.setData({ + address_id: address_id, + is_addressDel:true, + }); + }, + cancel:function(){ + var self = this; + self.setData({ + address_id: null, + is_addressDel: false, + }); + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + var self = this; + self.address(); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/addressList/index.json b/pages/addressList/index.json new file mode 100644 index 0000000..b1efb68 --- /dev/null +++ b/pages/addressList/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "我的地址" +} \ No newline at end of file diff --git a/pages/addressList/index.wxml b/pages/addressList/index.wxml new file mode 100644 index 0000000..9379ac1 --- /dev/null +++ b/pages/addressList/index.wxml @@ -0,0 +1,32 @@ + + + + + + {{item.true_name}} + 默认 + + + {{item.tel_phone}} + {{item.area_info}}{{item.address}} + + + + + + + + + + + + 新增收货地址 + + + + 确定要删除此地址吗? + + 取消 + 确定 + + \ No newline at end of file diff --git a/pages/addressList/index.wxss b/pages/addressList/index.wxss new file mode 100644 index 0000000..3c365d7 --- /dev/null +++ b/pages/addressList/index.wxss @@ -0,0 +1,112 @@ +.list .item{ + display: flex; + margin: 0 18px; + border-bottom: 1px solid #dedede; + /* padding: 15px 0; */ + align-items: center; + height: 98px; +} +.item .left{ + flex: 1 0 80%; + font-size: 14px; +} +.address-name { + width: 18%; +} +.name2, .phone1 { + line-height: 2; + font-size: 26rpx; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.address-describe { + margin-left: 4%; +} +.address-word { + font-size: 22rpx; + line-height: 1.5; + padding: .4rpx; + width: 85%; + word-wrap: break-word; +} +.default { + padding: .4rpx; + border: 1px solid #AB2B2B; + border-radius: .4rpx; + -webkit-border-radius: .4rpx; + font-size: 20rpx; + position: relative; + top: .4rpx; + -webkit-box-sizing: border-box; +} +.item .edit,.choice{ + flex: 1 0 10%; + text-align: center; +} + +.item .edit image{ + width: 20px; + height: 20px; +} +.item .choice image{ + width: 25px; + height: 26px; +} +.alertbox { + position: fixed; + z-index: 10001; + width: 80%; + /* width: 432px; */ + left: 10%; + background: #fff; + top: 30%; + /* border-radius: 3px; */ + -webkit-border-radius: 3px; + /* -moz-border-radius: 3px; */ + /* -o-border-radius: 3px; */ + display: block; + /* display: none; */ +} +.alert-p { + font-size: 40rpx; + color: #666; + text-align: center; + line-height: 3; +} +.btnbox1 { + height: 80rpx; + border-top: 1px solid #f0f0f0; +} +.cancelbtn1 { + width: 50%; + height: 100%; + line-height: 80rpx; + float: left; + border-right: 1px solid #f0f0f0; + -webkit-box-sizing: border-box; + font-size: 36rpx; + text-align: center; + cursor: pointer; +} +.surebtn1 { + width: 50%; + height: 100%; + line-height: 80rpx; + float: left; + -webkit-box-sizing: border-box; + font-size: 36rpx; + text-align: center; + cursor: pointer; + color: #AB2B2B; + display: inline-block; +} +.btn{ + height: 8vh; + line-height: 8vh; + text-align: center; + background:#ff5f19; + font-size: 14px; + color: #fff; +} \ No newline at end of file diff --git a/pages/assemble/index.js b/pages/assemble/index.js new file mode 100644 index 0000000..865a402 --- /dev/null +++ b/pages/assemble/index.js @@ -0,0 +1,141 @@ +// pages/coupon/index.js +const app = getApp(); +// var curl = 'https://miniapp.shopdz.cn/'; +const curl = require('../../config').host; +Page({ + + /** + * 页面的初始数据 + */ + data: { + tabIndex:1, + list:[], + img:[], + }, + tabFun(e){ + var self = this; + self.setData({ + tabIndex: e.currentTarget.dataset.index + }) + console.log(e.currentTarget.dataset.index); + if (e.currentTarget.dataset.index == 1){ + self.not_used(); + } else if (e.currentTarget.dataset.index == 2){ + self.already_used(); + } else if (e.currentTarget.dataset.index == 3){ + self.failure(); + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var self = this; + self.not_used(); + self.shopping(); + }, + //未使用 + not_used:function(){ + var self = this; + // var key = wx.getStorageSync('key'); + wx.request({ + url: curl +'api.php/plugin/index/code/group/action/getGroupSet', + method:'GET', + success:function(res){ + if(res.data.code == 0){ + console.log(res); + var list = res.data.data; + self.setData({ + img:list, + }); + } + + } + }) + }, + //已使用 + already_used: function () { + var self = this; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl + 'api.php/coupon/lists/status/2?key=' + key, + method: 'GET', + success: function (res) { + if (res.data.code == 0) { + console.log(res); + var list = res.data.data.list; + self.setData({ + list: list, + }); + } + + } + }) + }, + //已失效 + shopping: function () { + var self = this; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl + 'api.php/plugin/index/code/group/action/grouplist', + method: 'GET', + success: function (res) { + if (res.data.code == 0) { + var list = res.data.data; + self.setData({ + list: list, + }); + } + + } + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/assemble/index.json b/pages/assemble/index.json new file mode 100644 index 0000000..2f211f1 --- /dev/null +++ b/pages/assemble/index.json @@ -0,0 +1,3 @@ +{ +"navigationBarTitleText": "" +} \ No newline at end of file diff --git a/pages/assemble/index.wxml b/pages/assemble/index.wxml new file mode 100644 index 0000000..2160cbe --- /dev/null +++ b/pages/assemble/index.wxml @@ -0,0 +1,62 @@ + + + + 拼团首页 + + + 我的拼团 + + + + + + + + + + 拼团玩法 + + + + 1选择商品 + 2支付开团 + 3邀请好友 + 4拼团成功 + + + + + + + + + 3人团 + + + + + {{item.goods_name}} + {{item.group_content}} + 活动时间:{{item.starttime_text}}-{{item.endtime_text}} + + + ¥{{item.group_price}} + ¥{{item.goods_price}} + + + 我要开团 + + + + + + + + + + diff --git a/pages/assemble/index.wxss b/pages/assemble/index.wxss new file mode 100644 index 0000000..cac9a7d --- /dev/null +++ b/pages/assemble/index.wxss @@ -0,0 +1,304 @@ +page{ + padding-bottom: 96rpx; + background-color: #eee; +} +.tab{ + height: 7vh; + display: flex; + line-height: 7vh; + background-color: #fff; +} +.tab view{ + flex: 1 0 auto; + font-size: 14px; + color: #333333; + text-align: center; +} +.tab .active{ + color: #ff5f19; + border-bottom: 1px solid #ff5f19; + padding-bottom:1.8vh; +} +.tab-content { + padding-bottom: 40rpx; +} +.show { + display: block; +} +.voucher-list { + width: 100%; + overflow: hidden; + /* display: none; */ +} +.coupon-list { + width: 100%; + background: #f0f0f0; +} +.coupon-li { + width: 94%; + padding: 20rpx 3% 0 3%; + margin: 0; + height: auto; + min-height: 24rpx; + position: relative; + /* border-bottom: 1px solid #f0f0f0; */ +} +.coupon-det { + width: 100%; + box-sizing: border-box; + margin: 0 auto; +} +.coupon-box-top { + width: 100%; + padding: 10px 14px; + box-sizing: border-box; + position: relative; +} +.Color010 { + background: #63b359 !important; +} +.Color011 { + background: #b35959 !important; +} +.coupon-box-bottom { + width: 100%; + height: 100rpx; + background: #fff; + text-align: center; + box-shadow: 0px 5px 5px -5px #999; +} +.coupon-top-con { + color: #fff; + font-size: 30rpx; + text-align: center; + line-height: 45rpx; +} +.zoom { + overflow: hidden; + zoom: 1; +} +.coupon-subtit { + text-align: left; + line-height: 24px; + font-size: 30rpx; +} +.left { + float: left; +} +.right { + float: right; +} +.couponMoney-box { + padding: 10px 0; +} +.couponMoney-box .money-unit { + font-size: 32rpx !important; + font-weight: 600; + display: inline-block; +} +.couponMoney-box .money-num { + font-size: 50rpx !important; + display: inline-block; +} +.coupon-statu { + display: inline-block; + height: 40rpx; + opacity: .3; +} +.coupon-bottom-tit { + font-size: 12px; + text-align: center; + color: #666; + padding-top: 10px; +} +.coupon-remind2 { + font-size: 28rpx; + color: #999; + text-align: center; +} +.btn{ + position: fixed; + bottom:0; + left: 0; + width: 100%; + height: 96rpx; + text-align: center; + font-size: 14px; + color: #fff; + background: #ab2b2b; + line-height: 96rpx; +} +.coupon-share { + color: #d65357 !important; + background: #fff; + /* color: #fff; */ + display: inline-block; + width: 100px; + height: 28px; + line-height: 28px !important; + border: 1px solid #fff; + border-radius: 3px; + /* background: transparent; */ + cursor: pointer; + overflow: hidden; +} +.img-center { + text-align: center; +} +.coupon-null-img { + margin: 20px auto; +} +.coupon-tit { + color: #888; + letter-spacing: 2px; + font-weight: normal; + font-size: 30rpx; +} + +.playGroup { + width: 92%; + padding:15rpx 4% 15rpx 4%; + color: #666; + overflow: hidden; + zoom: 1; + border-bottom: 1px solid #e6e6e6; +} +.playGroup .playGroup-tit { + font-size: 25rpx; + line-height: 36rpx; + float: left; + margin-right: 25rpx; +} +.playGroup .playGroup-point { + display: inline-block; + vertical-align: middle; + height: 30rpx; + margin: 0 0 15rpx 0; + float: right; +} +.groupStep-list { + overflow: hidden; + zoom: 1; + padding: 15rpx 4%; +} +.li { + float: left; + font-size: 25rpx; + line-height: 35rpx; + width: 25%; +} +.groupStep-list .groupStep-num { + display: inline-block; + width: 30rpx; + height: 30rpx; + line-height: 35rpx; + text-align: center; + background: #ccc; + border-radius: 50%; + margin: 0 15rpx; + position: relative; + top: 5rpx; + overflow: hidden; +} +.commodityImg-box { + padding-top: 25rpx; + border-top: 1px solid #e6e6e6; + position: relative; + background: #fafafa; +} +.commodityImg { + display: block; + width: 100%; +} +.groupIntroduce { + position: absolute; + left: 0; + bottom: 0; + height:80rpx; + width: 100%; +} +.introduceCover { + position: absolute; + top: 0; + left: 0; + background: #fff; + opacity: 0.5; + z-index: 2; + width: 100%; + height: 100%; +} +.introduceCon { + position: absolute; + top: 0; + left: 0; + z-index: 3; + padding: 18rpx 4%; + width: 92%; + height: 40rpx; + overflow: hidden; + zoom: 1; +} +.groupPerson-num { + background: #ab2b2b; + color: #fff; + font-size: 30rpx; + display: inline-block; + height: 40rpx; + line-height: 40rpx; + padding: 0 15rpx; + border-radius: 2px; + float: left; +} +.group-comDet { + padding: 0 4%; + background: #fff; +} +.group-comDet .group-comName { + font-size: 26rpx; + color: #333; + line-height: 55rpx; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding: 20rpx 0 4rpx 0; +} +.group-comDet .group-comDescribe { + /* width: 50%; */ + font-size: 24rpx; + color: #808080; + line-height: 30rpx; + padding: 10rpx 0; +} +.groupOpen { + overflow: hidden; + zoom: 1; + padding: 5rpx 0 25rpx 0; +} +.group-comPrice { + float: left; + line-height: 75rpx; +} +.group-newPrice { + color: #ab2b2b; + font-size: 38rpx; + padding-right: .16rpx; + /* font-weight: 600; */ +} +.group-oldPrice { + color: #999; + font-size: 30rpx; + text-decoration: line-through; +} +.groupOpen-btn { + float: right; + display: inline-block; + height: 70rpx; + line-height: 70rpx; + border: none; + border-radius: 3px; + font-size: 25rpx; + padding: 0 60rpx; + color: #fff; + background: #ab2b2b; +} \ No newline at end of file diff --git a/pages/assemble_detail/index.js b/pages/assemble_detail/index.js new file mode 100644 index 0000000..e879384 --- /dev/null +++ b/pages/assemble_detail/index.js @@ -0,0 +1,99 @@ +// pages/coupon/index.js +const app = getApp(); +var WxParse = require('../../plugins/wxParse/wxParse.js'); +// var curl = 'https://miniapp.shopdz.cn/'; +const curl = require('../../config').host; +Page({ + + /** + * 页面的初始数据 + */ + data: { + tabIndex:1, + list:[], + img:[], + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log(options.goods_id) + var self = this; + if (options.goods_id){ + self.not_used(options.goods_id); + } + }, + //未使用 + not_used: function (goods_id){ + var self = this; + var goods_id = goods_id; + var key = wx.getStorageSync('key'); + wx.request({ + url: curl +'api.php/plugin/index/code/group/action/detail', + data: { key:key, active_id:goods_id}, + method:'GET', + success:function(res){ + if(res.data.code == 0){ + console.log(list); + var list = res.data.data.group; + var img = res.data.data.goods; + console.log(list); + WxParse.wxParse('article', 'html', img.goods_detail, self, 5); + self.setData({ + list:list, + img:img, + }); + } + + } + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/assemble_detail/index.json b/pages/assemble_detail/index.json new file mode 100644 index 0000000..3ccc48c --- /dev/null +++ b/pages/assemble_detail/index.json @@ -0,0 +1,3 @@ +{ +"navigationBarTitleText": "优惠券" +} \ No newline at end of file diff --git a/pages/assemble_detail/index.wxml b/pages/assemble_detail/index.wxml new file mode 100644 index 0000000..2bc162a --- /dev/null +++ b/pages/assemble_detail/index.wxml @@ -0,0 +1,52 @@ + + + + + + + + 3人团 + + + + + {{list.goods_name}} + {{list.group_content}} + + 十五格 + + 限时图标 + 组团时限:24小时 + + + + + + + + 拼团玩法 + + + 1选择商品 + 2支付开团 + 3邀请好友 + 4拼团成功 + + 支付开团并邀请3人参团,人数不足自动退款,详情点击上方拼团玩法 + + + + 商品详情 + + +