Browse Source

修改创建货源页面为全屏展示

pull/1/head
徐飞洋 3 months ago
parent
commit
40ea4e7d6c
  1. 9
      pages/create-supply/index.js
  2. 1
      pages/create-supply/index.json
  3. 9
      pages/create-supply/index.wxml
  4. 48
      pages/create-supply/index.wxss

9
pages/create-supply/index.js

@ -23,6 +23,15 @@ Page({
// 页面加载时的初始化 // 页面加载时的初始化
}, },
/**
* 返回上一页
*/
onBackTap: function () {
wx.navigateBack({
delta: 1
});
},
/** /**
* 品种输入处理 * 品种输入处理
*/ */

1
pages/create-supply/index.json

@ -2,5 +2,6 @@
"navigationBarTitleText": "创建新货源", "navigationBarTitleText": "创建新货源",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationStyle": "custom",
"usingComponents": {} "usingComponents": {}
} }

9
pages/create-supply/index.wxml

@ -1,5 +1,14 @@
<!-- pages/create-supply/index.wxml --> <!-- pages/create-supply/index.wxml -->
<view class="create-supply-container"> <view class="create-supply-container">
<!-- 自定义导航栏 -->
<view class="custom-nav-bar">
<view class="nav-left" bindtap="onBackTap">
<text class="back-icon">←</text>
</view>
<view class="nav-title">创建新货源</view>
<view class="nav-right"></view>
</view>
<view class="form-container"> <view class="form-container">
<view class="form-item"> <view class="form-item">
<text class="label">品种 *</text> <text class="label">品种 *</text>

48
pages/create-supply/index.wxss

@ -1,8 +1,56 @@
/* pages/create-supply/index.wxss */ /* pages/create-supply/index.wxss */
page {
height: 100vh;
background-color: #f5f5f5;
}
.create-supply-container { .create-supply-container {
background-color: #f5f5f5; background-color: #f5f5f5;
min-height: 100vh; min-height: 100vh;
padding: 20rpx; 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 { .form-container {

Loading…
Cancel
Save