diff --git a/pages/create-supply/index.js b/pages/create-supply/index.js index 1b23439..d086001 100644 --- a/pages/create-supply/index.js +++ b/pages/create-supply/index.js @@ -23,6 +23,15 @@ Page({ // 页面加载时的初始化 }, + /** + * 返回上一页 + */ + onBackTap: function () { + wx.navigateBack({ + delta: 1 + }); + }, + /** * 品种输入处理 */ diff --git a/pages/create-supply/index.json b/pages/create-supply/index.json index e738d1c..634563f 100644 --- a/pages/create-supply/index.json +++ b/pages/create-supply/index.json @@ -2,5 +2,6 @@ "navigationBarTitleText": "创建新货源", "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black", + "navigationStyle": "custom", "usingComponents": {} } \ No newline at end of file diff --git a/pages/create-supply/index.wxml b/pages/create-supply/index.wxml index 3526824..80ef419 100644 --- a/pages/create-supply/index.wxml +++ b/pages/create-supply/index.wxml @@ -1,5 +1,14 @@ + + + + + + 创建新货源 + + + 品种 * diff --git a/pages/create-supply/index.wxss b/pages/create-supply/index.wxss index 9aa5f0d..cd045cc 100644 --- a/pages/create-supply/index.wxss +++ b/pages/create-supply/index.wxss @@ -1,8 +1,56 @@ /* pages/create-supply/index.wxss */ +page { + height: 100vh; + background-color: #f5f5f5; +} + .create-supply-container { background-color: #f5f5f5; min-height: 100vh; padding: 20rpx; + padding-top: 100rpx; /* 为自定义导航栏留出空间 */ + box-sizing: border-box; +} + +/* 自定义导航栏样式 */ +.custom-nav-bar { + position: fixed; + top: 0; + left: 0; + right: 0; + height: 88rpx; + background-color: #fff; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 20rpx; + box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); + z-index: 1000; +} + +.nav-left { + width: 60rpx; + height: 88rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.back-icon { + font-size: 36rpx; + color: #333; +} + +.nav-title { + font-size: 32rpx; + font-weight: 500; + color: #333; + text-align: center; + flex: 1; +} + +.nav-right { + width: 60rpx; } .form-container {