From e47bb875580e91df1b14c712a7251d2589f5dd47 Mon Sep 17 00:00:00 2001
From: pplokijuhyg <1162963624@qq.com>
Date: Fri, 13 Dec 2019 10:29:54 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 4 +
app.json | 3 +-
app.wxss | 359 +++++++++++++++++++++++++++++++++++++++--
pages/index/index.js | 54 +------
pages/index/index.scss | 11 ++
pages/index/index.wxml | 18 +--
pages/index/index.wxss | 22 +--
pages/logs/logs.js | 15 --
pages/logs/logs.json | 4 -
pages/logs/logs.wxml | 6 -
pages/logs/logs.wxss | 8 -
utils/bin.js | 31 ++++
12 files changed, 406 insertions(+), 129 deletions(-)
create mode 100644 README.md
create mode 100644 pages/index/index.scss
delete mode 100644 pages/logs/logs.js
delete mode 100644 pages/logs/logs.json
delete mode 100644 pages/logs/logs.wxml
delete mode 100644 pages/logs/logs.wxss
create mode 100644 utils/bin.js
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e563bc6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+# 德国代购小程序
+
+### 目录结构
+
diff --git a/app.json b/app.json
index 3429189..0733811 100644
--- a/app.json
+++ b/app.json
@@ -1,7 +1,6 @@
{
"pages": [
- "pages/index/index",
- "pages/logs/logs"
+ "pages/index/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/app.wxss b/app.wxss
index 06c6fc9..b6eb821 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,10 +1,349 @@
-/**app.wxss**/
-.container {
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- padding: 200rpx 0;
- box-sizing: border-box;
-}
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+ ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+ html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+ ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+ margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+ border-style: none;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 1 */
+ line-height: 1.15; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+ text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/* Interactive
+ ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+ display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+ display: list-item;
+}
+
+/* Misc
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+ display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+ display: none;
+}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 608a282..bfd65c2 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,54 +1,8 @@
-//index.js
-//获取应用实例
-const app = getApp()
-
Page({
- data: {
- motto: 'Hello World',
- userInfo: {},
- hasUserInfo: false,
- canIUse: wx.canIUse('button.open-type.getUserInfo')
+ data:{
+
},
- //事件处理函数
- bindViewTap: function() {
- wx.navigateTo({
- url: '../logs/logs'
- })
- },
- onLoad: function () {
- if (app.globalData.userInfo) {
- this.setData({
- userInfo: app.globalData.userInfo,
- hasUserInfo: true
- })
- } else if (this.data.canIUse){
- // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
- // 所以此处加入 callback 以防止这种情况
- app.userInfoReadyCallback = res => {
- this.setData({
- userInfo: res.userInfo,
- hasUserInfo: true
- })
- }
- } else {
- // 在没有 open-type=getUserInfo 版本的兼容处理
- wx.getUserInfo({
- success: res => {
- app.globalData.userInfo = res.userInfo
- this.setData({
- userInfo: res.userInfo,
- hasUserInfo: true
- })
- }
- })
- }
- },
- getUserInfo: function(e) {
- console.log(e)
- app.globalData.userInfo = e.detail.userInfo
- this.setData({
- userInfo: e.detail.userInfo,
- hasUserInfo: true
- })
+ onLoad(){
+
}
})
diff --git a/pages/index/index.scss b/pages/index/index.scss
new file mode 100644
index 0000000..4cd6588
--- /dev/null
+++ b/pages/index/index.scss
@@ -0,0 +1,11 @@
+.box{
+ border-top: #eaeaea solid 1rpx;
+ width: 750rpx;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ .search{
+ width: 613px;
+ height: 76px;
+ }
+}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 0243bda..91079d2 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,13 +1,5 @@
-
-
-
-
-
-
- {{userInfo.nickName}}
-
-
-
- {{motto}}
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index ce30de0..e1a3214 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -1,21 +1 @@
-/**index.wxss**/
-.userinfo {
- display: flex;
- flex-direction: column;
- align-items: center;
-}
-
-.userinfo-avatar {
- width: 128rpx;
- height: 128rpx;
- margin: 20rpx;
- border-radius: 50%;
-}
-
-.userinfo-nickname {
- color: #aaa;
-}
-
-.usermotto {
- margin-top: 200px;
-}
\ No newline at end of file
+.box{border-top:#eaeaea solid 1rpx;width:750rpx;overflow:hidden;display:flex;flex-direction:column}.box .search{width:613px;height:76px}
diff --git a/pages/logs/logs.js b/pages/logs/logs.js
deleted file mode 100644
index b2b967d..0000000
--- a/pages/logs/logs.js
+++ /dev/null
@@ -1,15 +0,0 @@
-//logs.js
-const util = require('../../utils/util.js')
-
-Page({
- data: {
- logs: []
- },
- onLoad: function () {
- this.setData({
- logs: (wx.getStorageSync('logs') || []).map(log => {
- return util.formatTime(new Date(log))
- })
- })
- }
-})
diff --git a/pages/logs/logs.json b/pages/logs/logs.json
deleted file mode 100644
index 3ee76c1..0000000
--- a/pages/logs/logs.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "查看启动日志",
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml
deleted file mode 100644
index b5a85ac..0000000
--- a/pages/logs/logs.wxml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- {{index + 1}}. {{log}}
-
-
diff --git a/pages/logs/logs.wxss b/pages/logs/logs.wxss
deleted file mode 100644
index 94d4b88..0000000
--- a/pages/logs/logs.wxss
+++ /dev/null
@@ -1,8 +0,0 @@
-.log-list {
- display: flex;
- flex-direction: column;
- padding: 40rpx;
-}
-.log-item {
- margin: 10rpx;
-}
diff --git a/utils/bin.js b/utils/bin.js
new file mode 100644
index 0000000..27bdf03
--- /dev/null
+++ b/utils/bin.js
@@ -0,0 +1,31 @@
+//请求接口
+let request = function (obj){
+ let {
+ url,
+ method,
+ header,
+ dataType,
+ responseType,
+ complete
+ } = obj
+ return new Promise((res,rej)=>{
+ Wx.request({
+ url,
+ method,
+ header,
+ dataType,
+ responseType,
+ success(data){
+ res(data)
+ },
+ fail(data){
+ rej(data)
+ },
+ complete
+ })
+ })
+}
+
+module.exports = {
+ request
+}
\ No newline at end of file
From 1fee50156029cbc427857a62ed2bea2b2892bf30 Mon Sep 17 00:00:00 2001
From: pplokijuhyg <1162963624@qq.com>
Date: Fri, 13 Dec 2019 11:43:02 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.wxss | 4 +-
components/index/list/commodity/index.js | 8 ++++
components/index/list/commodity/index.json | 3 ++
components/index/list/commodity/index.scss | 49 ++++++++++++++++++++++
components/index/list/commodity/index.wxml | 13 ++++++
components/index/list/commodity/index.wxss | 1 +
components/index/list/index.js | 8 ++++
components/index/list/index.json | 6 +++
components/index/list/index.scss | 12 ++++++
components/index/list/index.wxml | 4 ++
components/index/list/index.wxss | 1 +
components/index/search/index.js | 8 ++++
components/index/search/index.json | 3 ++
components/index/search/index.scss | 23 ++++++++++
components/index/search/index.wxml | 4 ++
components/index/search/index.wxss | 1 +
pages/index/index.json | 5 ++-
pages/index/index.scss | 20 ++++-----
pages/index/index.wxml | 5 +--
pages/index/index.wxss | 2 +-
20 files changed, 162 insertions(+), 18 deletions(-)
create mode 100644 components/index/list/commodity/index.js
create mode 100644 components/index/list/commodity/index.json
create mode 100644 components/index/list/commodity/index.scss
create mode 100644 components/index/list/commodity/index.wxml
create mode 100644 components/index/list/commodity/index.wxss
create mode 100644 components/index/list/index.js
create mode 100644 components/index/list/index.json
create mode 100644 components/index/list/index.scss
create mode 100644 components/index/list/index.wxml
create mode 100644 components/index/list/index.wxss
create mode 100644 components/index/search/index.js
create mode 100644 components/index/search/index.json
create mode 100644 components/index/search/index.scss
create mode 100644 components/index/search/index.wxml
create mode 100644 components/index/search/index.wxss
diff --git a/app.wxss b/app.wxss
index b6eb821..eee4054 100644
--- a/app.wxss
+++ b/app.wxss
@@ -9,7 +9,7 @@
*/
html {
- line-height: 1.15; /* 1 */
+ line-height: 1; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
@@ -164,7 +164,7 @@ select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
- line-height: 1.15; /* 1 */
+ line-height: 1; /* 1 */
margin: 0; /* 2 */
}
diff --git a/components/index/list/commodity/index.js b/components/index/list/commodity/index.js
new file mode 100644
index 0000000..035c745
--- /dev/null
+++ b/components/index/list/commodity/index.js
@@ -0,0 +1,8 @@
+Component({
+ properties: {
+ },
+ data: {
+ },
+ methods: {
+ }
+ })
\ No newline at end of file
diff --git a/components/index/list/commodity/index.json b/components/index/list/commodity/index.json
new file mode 100644
index 0000000..fba482a
--- /dev/null
+++ b/components/index/list/commodity/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/components/index/list/commodity/index.scss b/components/index/list/commodity/index.scss
new file mode 100644
index 0000000..bcb00be
--- /dev/null
+++ b/components/index/list/commodity/index.scss
@@ -0,0 +1,49 @@
+.commodity {
+ width: 623rpx;
+ height: 143rpx;
+ margin-top: 32rpx;
+ display: flex;
+ align-items: center;
+ .content {
+ width: 614rpx;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ box-shadow: 0 0 24rpx 0 rgba(227, 227, 227, 0.4);
+ .imgthumb {
+ width: 105rpx;
+ height: 105rpx;
+ margin-left: 40rpx;
+ background-color: #333;
+ }
+ .introduce {
+ width: 410rpx;
+ margin-left: 40rpx;
+ display: flex;
+ flex-direction: column;
+ > text {
+ font-size: 26rpx;
+ 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;
+ }
+ }
+ }
+ }
+ .decorate {
+ width: 9rpx;
+ height: 102rpx;
+ background-color: #3fb66e;
+ }
+ }
\ No newline at end of file
diff --git a/components/index/list/commodity/index.wxml b/components/index/list/commodity/index.wxml
new file mode 100644
index 0000000..6c27b73
--- /dev/null
+++ b/components/index/list/commodity/index.wxml
@@ -0,0 +1,13 @@
+
+
+
+
+ 产品名称产品名称产品名称产品名称产品名称产品名称产品名称
+
+ ¥657
+ 加入购物车
+
+
+
+
+
\ No newline at end of file
diff --git a/components/index/list/commodity/index.wxss b/components/index/list/commodity/index.wxss
new file mode 100644
index 0000000..8647b14
--- /dev/null
+++ b/components/index/list/commodity/index.wxss
@@ -0,0 +1 @@
+.commodity{width:623rpx;height:143rpx;margin-top:32rpx;display:flex;align-items:center}.commodity .content{width:614rpx;height:100%;display:flex;align-items:center;box-shadow:0 0 24rpx 0 rgba(227,227,227,0.4)}.commodity .content .imgthumb{width:105rpx;height:105rpx;margin-left:40rpx;background-color:#333}.commodity .content .introduce{width:410rpx;margin-left:40rpx;display:flex;flex-direction:column}.commodity .content .introduce>text{font-size:26rpx;color:#333;margin-bottom:22rpx}.commodity .content .introduce>view{display:flex;align-items:center;justify-content:space-between}.commodity .content .introduce>view>text:first-child{font-size:30rpx;color:#dec499}.commodity .content .introduce>view>text:last-child{font-size:22rpx;color:#999}.commodity .decorate{width:9rpx;height:102rpx;background-color:#3fb66e}
diff --git a/components/index/list/index.js b/components/index/list/index.js
new file mode 100644
index 0000000..035c745
--- /dev/null
+++ b/components/index/list/index.js
@@ -0,0 +1,8 @@
+Component({
+ properties: {
+ },
+ data: {
+ },
+ methods: {
+ }
+ })
\ No newline at end of file
diff --git a/components/index/list/index.json b/components/index/list/index.json
new file mode 100644
index 0000000..7f8058e
--- /dev/null
+++ b/components/index/list/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "commodity":"./commodity/index"
+ }
+}
\ No newline at end of file
diff --git a/components/index/list/index.scss b/components/index/list/index.scss
new file mode 100644
index 0000000..aae32e5
--- /dev/null
+++ b/components/index/list/index.scss
@@ -0,0 +1,12 @@
+.list {
+ width: 623rpx;
+ margin-top: 36rpx;
+ .title {
+ font-size: 30rpx;
+ color: #333;
+ font-weight: bold;
+ margin-left: 32rpx;
+ // margin-bottom: 32rpx;
+ }
+
+ }
\ No newline at end of file
diff --git a/components/index/list/index.wxml b/components/index/list/index.wxml
new file mode 100644
index 0000000..7983d11
--- /dev/null
+++ b/components/index/list/index.wxml
@@ -0,0 +1,4 @@
+
+ 热门商品
+
+
\ No newline at end of file
diff --git a/components/index/list/index.wxss b/components/index/list/index.wxss
new file mode 100644
index 0000000..1704712
--- /dev/null
+++ b/components/index/list/index.wxss
@@ -0,0 +1 @@
+.list{width:623rpx;margin-top:36rpx}.list .title{font-size:30rpx;color:#333;font-weight:bold;margin-left:32rpx}
diff --git a/components/index/search/index.js b/components/index/search/index.js
new file mode 100644
index 0000000..035c745
--- /dev/null
+++ b/components/index/search/index.js
@@ -0,0 +1,8 @@
+Component({
+ properties: {
+ },
+ data: {
+ },
+ methods: {
+ }
+ })
\ No newline at end of file
diff --git a/components/index/search/index.json b/components/index/search/index.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/components/index/search/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/components/index/search/index.scss b/components/index/search/index.scss
new file mode 100644
index 0000000..76978b2
--- /dev/null
+++ b/components/index/search/index.scss
@@ -0,0 +1,23 @@
+.search{
+ width: 613rpx;
+ height: 76rpx;
+ margin-top: 30rpx;
+ box-sizing: border-box;
+ border-radius: 15rpx;
+ display: flex;
+ border:1rpx solid rgba(198,198,198,1);
+ >image{
+ width: 42rpx;
+ height: 42rpx;
+ background-color: #000;
+ margin-left: 40rpx;
+ margin-top: 17rpx;
+ }
+ >input{
+ height: 30rpx;
+ width: 480rpx;
+ margin-top: 25rpx;
+ margin-left: 17rpx;
+ font-size: 30rpx;
+ }
+}
\ No newline at end of file
diff --git a/components/index/search/index.wxml b/components/index/search/index.wxml
new file mode 100644
index 0000000..3129295
--- /dev/null
+++ b/components/index/search/index.wxml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/components/index/search/index.wxss b/components/index/search/index.wxss
new file mode 100644
index 0000000..e899d3f
--- /dev/null
+++ b/components/index/search/index.wxss
@@ -0,0 +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}
diff --git a/pages/index/index.json b/pages/index/index.json
index 8835af0..bb6644d 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -1,3 +1,6 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "search":"../components/index/search/index",
+ "list":"../components/index/list/index"
+ }
}
\ No newline at end of file
diff --git a/pages/index/index.scss b/pages/index/index.scss
index 4cd6588..912df96 100644
--- a/pages/index/index.scss
+++ b/pages/index/index.scss
@@ -1,11 +1,9 @@
-.box{
- border-top: #eaeaea solid 1rpx;
- width: 750rpx;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- .search{
- width: 613px;
- height: 76px;
- }
-}
\ No newline at end of file
+.box {
+ border-top: #eaeaea solid 1rpx;
+ width: 750rpx;
+ // overflow: hidden;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+
+}
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 91079d2..6797ad1 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,5 +1,4 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index e1a3214..3b5be87 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -1 +1 @@
-.box{border-top:#eaeaea solid 1rpx;width:750rpx;overflow:hidden;display:flex;flex-direction:column}.box .search{width:613px;height:76px}
+.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column}
From b107928a0ff60b22b13d5fb7103753aab49934b2 Mon Sep 17 00:00:00 2001
From: pplokijuhyg <1162963624@qq.com>
Date: Fri, 13 Dec 2019 11:53:03 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 13 ++++++++++++-
doc/bin.md | 22 ++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 doc/bin.md
diff --git a/README.md b/README.md
index e563bc6..9a04395 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,15 @@
# 德国代购小程序
### 目录结构
-
+- commponents 组件
+ - index 首页组件
+- page 页面
+ - index 首页
+- utils 插件
+ - [bin.js](./doc/bin.md)
+## 页面路由
+- pages/index/index 首页
+ 组件
+ - index/search 顶部搜索框
+ - index/list 商品列表
+ - index/lsit/commodity 商品单条
diff --git a/doc/bin.md b/doc/bin.md
new file mode 100644
index 0000000..69141be
--- /dev/null
+++ b/doc/bin.md
@@ -0,0 +1,22 @@
+# bin.js
+## 引入方式
+模块导入
+## request 方法
+request(object)
+返回值类型 promise
+```
+request({
+ url,访问地址
+ method,请求方式
+ header,附加header头
+ dataType,返回类型
+ responseType,类型
+ complete 成功失败都执行的回调函数
+}).then((res)=>{
+ 请求成功执行方法
+},(rej)=>{
+ 请求失败执行方法
+}).catch((ree)=>{
+ 执行错误时调用方法
+})
+```
From 39e828cc3f86a2c6c7b42bdeac9416752da85c31 Mon Sep 17 00:00:00 2001
From: pplokijuhyg <1162963624@qq.com>
Date: Fri, 13 Dec 2019 11:56:56 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
doc/bin.md | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/bin.md b/doc/bin.md
index 69141be..51d7a7e 100644
--- a/doc/bin.md
+++ b/doc/bin.md
@@ -2,16 +2,24 @@
## 引入方式
模块导入
## request 方法
+对于wx.request()的简单封装
request(object)
返回值类型 promise
+除url必须 其余都为可选 详细参数查阅 [微信开发者文档](https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html)
```
-request({
- url,访问地址
+object
+{
+ url,访问地址 必须
method,请求方式
header,附加header头
dataType,返回类型
responseType,类型
complete 成功失败都执行的回调函数
+}
+````
+```
+request({
+
}).then((res)=>{
请求成功执行方法
},(rej)=>{
From fafcd5de267561d1de69432d273938cfb092a6c0 Mon Sep 17 00:00:00 2001
From: pplokijuhyg <1162963624@qq.com>
Date: Fri, 13 Dec 2019 11:58:33 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dreadme?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 9a04395..3bd6c41 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,7 @@
- index 首页
- utils 插件
- [bin.js](./doc/bin.md)
+
## 页面路由
- pages/index/index 首页
组件