lmj пре 2 година
родитељ
комит
4895f947c7

+ 8 - 2
app.json

@@ -15,7 +15,9 @@
     "pages/order_confirm/order_confirm",
     "pages/order_confirm/order_confirm",
     "pages/order_submit/order_submit",
     "pages/order_submit/order_submit",
     "pages/integral/integral",
     "pages/integral/integral",
-    "pages/detail/detail"
+    "pages/detail/detail",
+    "pages/modifyAddress/modifyAddress",
+    "pages/address/address"
   ],
   ],
   "window": {
   "window": {
     "backgroundTextStyle": "light",
     "backgroundTextStyle": "light",
@@ -60,7 +62,11 @@
     "van-calendar": "@vant/weapp/calendar/index",
     "van-calendar": "@vant/weapp/calendar/index",
     "van-cell": "@vant/weapp/cell/index",
     "van-cell": "@vant/weapp/cell/index",
     "van-cell-group": "@vant/weapp/cell-group/index",
     "van-cell-group": "@vant/weapp/cell-group/index",
-    "van-image": "@vant/weapp/image/index"
+    "van-image": "@vant/weapp/image/index",
+    "van-radio": "@vant/weapp/radio/index",
+    "van-radio-group": "@vant/weapp/radio-group/index",
+    "van-switch": "@vant/weapp/switch/index",
+    "van-popup": "@vant/weapp/popup/index"
 
 
 
 
   }
   }

+ 27 - 0
pages/address/address.js

@@ -0,0 +1,27 @@
+Page({
+  data: {
+    value: '',
+    radio: '1',
+    checked: true,
+    show: false,
+  },
+  showPopup() {
+    this.setData({ show: true });
+  },
+
+  onClose() {
+    this.setData({ show: false });
+  },
+
+  onChange(event) {
+    // event.detail 为当前输入的值
+    console.log(event.detail);
+    this.setData({
+      radio: event.detail,
+    });
+  },
+  onChange({ detail }) {
+    // 需要手动对 checked 状态进行更新
+    this.setData({ checked: detail });
+  },
+});

+ 4 - 0
pages/address/address.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "新增地址"
+}

+ 83 - 0
pages/address/address.wxml

@@ -0,0 +1,83 @@
+<view class="as">
+  <van-cell-group>
+    <van-field value="{{ value }}" label="姓名" placeholder="请填写姓名" border="{{ false }}" bind:change="onChange" />
+  </van-cell-group>
+
+  <van-cell-group>
+    <van-field value="{{ value }}" label="手机号" placeholder="请填写手机号" border="{{ false }}" bind:change="onChange" />
+  </van-cell-group>
+
+  <van-cell-group>
+    <view class="text">
+      <view class="sex">
+        <van-field value="{{ value }}" label="性别" border="{{ false }}" bind:change="onChange" />
+      </view>
+      <view class="select">
+        <van-radio-group value="{{ radio }}" bind:change="onChange" direction="horizontal">
+          <van-radio name="1" checked-color="#FF8700">男</van-radio>
+          <van-radio name="2" checked-color="#FF8700">女</van-radio>
+        </van-radio-group>
+      </view>
+    </view>
+  </van-cell-group>
+
+  <!-- <van-cell-group>
+    <van-field value="{{ value }}" label="收货地址" placeholder="请点击选择地址" border="{{ false }}" bind:change="onChange" is-link />
+  </van-cell-group> -->
+
+  <van-cell title="收货地址" value="请点击选择地址" is-link bind:click="showPopup" />
+  <!-- 弹出窗内容 -->
+    <van-popup show="{{ show }}" position="bottom" custom-style="height: 90%;" bind:close="onClose">
+      <view class="tan">
+         请选择收货地址
+      </view>
+      <!-- <van-cell icon="location-o" title="哈尔滨师范大学第一公寓2门312室"  size="large" label="吴迪(先生)182****2898" >
+        <van-radio-group value="{{ radio }}" bind:change="onChange">
+          <van-radio name="1">单选框 1</van-radio>
+        </van-radio-group>
+      </van-cell> -->
+      <view class="a">
+        <van-cell label="吴迪(先生)182****2898">
+          <view slot="title">
+            <van-radio-group value="{{ radio }}" bind:change="onChange" >
+              <van-radio name="0" checked-color="#FF8700">
+                <view class="van-cell-text" >哈尔滨师范大学第一公寓2门312室
+                  <van-tag type="danger" style="margin-left: 8px;">默认</van-tag>
+                </view>
+                <!-- <view class="van-cell-text">吴迪(先生)182****2898</view> -->
+      
+              </van-radio>
+            </van-radio-group>
+          </view>
+          <view class="xiugai">
+            <van-icon name="edit" color="#9E9E9E" size="20px"/>
+            <text >编辑</text>
+          </view>
+        </van-cell>
+      </view>
+<!-- 弹出窗内容--结束 -->
+    </van-popup>
+
+
+  <van-cell-group>
+    <van-field value="{{ value }}" label="门牌号" placeholder="例:1号公寓2门312" border="{{ false }}" bind:change="onChange" />
+  </van-cell-group>
+
+  <van-cell-group>
+    <view class="setUp">
+      <view class="set">
+        <van-field value="{{ value }}" label="设置默认" border="{{ false }}" bind:change="onChange" />
+      </view>
+      <view class="button">
+        <van-switch checked="{{ checked }}" bind:change="onChange" size="18px" active-color="#0D9C2B" />
+      </view>
+    </view>
+  </van-cell-group>
+</view>
+
+<!-- 新增地址页面 保存按钮 -->
+<view class="but">
+  <van-button type="primary" block round="true" size="small" color="#FF8700">保存</van-button>
+</view>
+
+

+ 77 - 0
pages/address/address.wxss

@@ -0,0 +1,77 @@
+.as {
+
+  margin: 15rpx 15rpx 0rpx 18rpx;
+
+}
+
+.text {
+  display: flex;
+  flex-direction: row;
+  background: #FFFFFF;
+}
+
+.sex {
+  width: 30%;
+}
+
+.select {
+  align-self: center;
+}
+
+.setUp {
+  display: flex;
+  flex-direction: row;
+  background: #FFFFFF;
+
+}
+
+.button {
+  align-self: center;
+  /* background: red; */
+}
+/* position: fixed;
+  bottom: 15rpx; */
+
+
+.but {
+  margin: 575rpx 35rpx 35rpx 35rpx;
+} 
+
+
+.but2{
+  display: flex;
+  margin: 575rpx 35rpx 35rpx 35rpx;
+  /* background: red; */
+}
+.f{
+  /* background: royalblue; */
+  width: 150px;
+  margin-left: 15px;
+}
+.t{
+  /* background: rgb(90, 205, 148); */
+  width: 150px;
+  margin-left: 15px;
+}
+.tan{
+  display: inline-block;
+  text-align: center;
+  /* background: tomato; */
+  width: 100%;
+  /* height: 15px; */
+  margin-top: 10px;
+}
+
+.xiugai{
+  /* background: red; */
+  width: 50px;
+  float: right;
+  margin-top:20px;
+}
+.a{
+  /* display: flex; */
+}
+.van-cell-text{
+  /* background: rgb(138, 22, 22); */
+  width: 260px;
+}

+ 27 - 0
pages/modifyAddress/modifyAddress.js

@@ -0,0 +1,27 @@
+Page({
+  data: {
+    value: '',
+    radio: '1',
+    checked: true,
+    show: false,
+  },
+  showPopup() {
+    this.setData({ show: true });
+  },
+
+  onClose() {
+    this.setData({ show: false });
+  },
+
+  onChange(event) {
+    // event.detail 为当前输入的值
+    console.log(event.detail);
+    this.setData({
+      radio: event.detail,
+    });
+  },
+  onChange({ detail }) {
+    // 需要手动对 checked 状态进行更新
+    this.setData({ checked: detail });
+  },
+});

+ 4 - 0
pages/modifyAddress/modifyAddress.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "修改地址"
+}

+ 90 - 0
pages/modifyAddress/modifyAddress.wxml

@@ -0,0 +1,90 @@
+
+<view class="as">
+  <van-cell-group>
+    <van-field value="{{ value }}" label="姓名" placeholder="请填写姓名" border="{{ false }}" bind:change="onChange" />
+  </van-cell-group>
+
+  <van-cell-group>
+    <van-field value="{{ value }}" label="手机号" placeholder="请填写手机号" border="{{ false }}" bind:change="onChange" />
+  </van-cell-group>
+
+  <van-cell-group>
+    <view class="text">
+      <view class="sex">
+        <van-field value="{{ value }}" label="性别" border="{{ false }}" bind:change="onChange" />
+      </view>
+      <view class="select">
+        <van-radio-group value="{{ radio }}" bind:change="onChange" direction="horizontal">
+          <van-radio name="1" checked-color="#FF8700">男</van-radio>
+          <van-radio name="2" checked-color="#FF8700">女</van-radio>
+        </van-radio-group>
+      </view>
+    </view>
+  </van-cell-group>
+
+  <!-- <van-cell-group>
+    <van-field value="{{ value }}" label="收货地址" placeholder="请点击选择地址" border="{{ false }}" bind:change="onChange" is-link />
+  </van-cell-group> -->
+
+  <van-cell title="收货地址" value="请点击选择地址" is-link bind:click="showPopup" />
+  <!-- 弹出窗内容 -->
+    <van-popup show="{{ show }}" position="bottom" custom-style="height: 90%;" bind:close="onClose">
+      <view class="tan">
+         请选择收货地址
+      </view>
+      <!-- <van-cell icon="location-o" title="哈尔滨师范大学第一公寓2门312室"  size="large" label="吴迪(先生)182****2898" >
+        <van-radio-group value="{{ radio }}" bind:change="onChange">
+          <van-radio name="1">单选框 1</van-radio>
+        </van-radio-group>
+      </van-cell> -->
+      <view class="a">
+        <van-cell label="吴迪(先生)182****2898">
+          <view slot="title">
+            <van-radio-group value="{{ radio }}" bind:change="onChange" >
+              <van-radio name="0" checked-color="#FF8700">
+                <view class="van-cell-text" >哈尔滨师范大学第一公寓2门312室
+                  <van-tag type="danger" style="margin-left: 8px;">默认</van-tag>
+                </view>
+                <!-- <view class="van-cell-text">吴迪(先生)182****2898</view> -->
+      
+              </van-radio>
+            </van-radio-group>
+          </view>
+          <view class="xiugai">
+            <van-icon name="edit" color="#9E9E9E" size="20px"/>
+            <text >编辑</text>
+          </view>
+        </van-cell>
+      </view>
+<!-- 弹出窗内容--结束 -->
+    </van-popup>
+
+
+  <van-cell-group>
+    <van-field value="{{ value }}" label="门牌号" placeholder="例:1号公寓2门312" border="{{ false }}" bind:change="onChange" />
+  </van-cell-group>
+
+  <van-cell-group>
+    <view class="setUp">
+      <view class="set">
+        <van-field value="{{ value }}" label="设置默认" border="{{ false }}" bind:change="onChange" />
+      </view>
+      <view class="button">
+        <van-switch checked="{{ checked }}" bind:change="onChange" size="18px" active-color="#0D9C2B" />
+      </view>
+    </view>
+  </van-cell-group>
+</view>
+
+
+
+
+<!-- 修改地址页面 删除 保存按钮 -->
+<view class="but2">
+  <view class="f">
+    <van-button type="primary" block size="small" color="#999999" round="true">删除</van-button>
+  </view>
+  <view class="t">
+    <van-button type="primary" block size="small" color="#FF8700" round="true">保存</van-button>
+  </view>
+</view>

+ 77 - 0
pages/modifyAddress/modifyAddress.wxss

@@ -0,0 +1,77 @@
+.as {
+
+  margin: 15rpx 15rpx 0rpx 18rpx;
+
+}
+
+.text {
+  display: flex;
+  flex-direction: row;
+  background: #FFFFFF;
+}
+
+.sex {
+  width: 30%;
+}
+
+.select {
+  align-self: center;
+}
+
+.setUp {
+  display: flex;
+  flex-direction: row;
+  background: #FFFFFF;
+
+}
+
+.button {
+  align-self: center;
+  /* background: red; */
+}
+/* position: fixed;
+  bottom: 15rpx; */
+
+
+/* .but {
+  margin: 575rpx 35rpx 35rpx 35rpx;
+}  */
+
+
+.but2{
+  display: flex;
+  margin: 575rpx 35rpx 35rpx 35rpx;
+  /* background: red; */
+}
+.f{
+  /* background: royalblue; */
+  width: 150px;
+  margin-left: 15px;
+}
+.t{
+  /* background: rgb(90, 205, 148); */
+  width: 150px;
+  margin-left: 15px;
+}
+.tan{
+  display: inline-block;
+  text-align: center;
+  /* background: tomato; */
+  width: 100%;
+  /* height: 15px; */
+  margin-top: 10px;
+}
+
+.xiugai{
+  /* background: red; */
+  width: 50px;
+  float: right;
+  margin-top:20px;
+}
+.a{
+  /* display: flex; */
+}
+.van-cell-text{
+  /* background: rgb(138, 22, 22); */
+  width: 260px;
+}

+ 2 - 1
pages/select-history/select-history.json

@@ -1,3 +1,4 @@
 {
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText": "外卖小程序"
 }
 }

+ 2 - 1
pages/select-nothing/select-nothing.json

@@ -1,3 +1,4 @@
 {
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText": "外卖小程序"
 }
 }

+ 2 - 1
pages/select-shopping/select-shopping.json

@@ -1,3 +1,4 @@
 {
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText": "外卖小程序"
 }
 }

+ 2 - 1
pages/zhuye/zhuye.json

@@ -1,3 +1,4 @@
 {
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText": "主页"
 }
 }

+ 14 - 0
project.private.config.json

@@ -104,6 +104,20 @@
           "query": "",
           "query": "",
           "launchMode": "default",
           "launchMode": "default",
           "scene": null
           "scene": null
+        },
+        {
+          "name": "修改",
+          "pathName": "pages/modifyAddress/modifyAddress",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "添加",
+          "pathName": "pages/address/address",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
         }
       ]
       ]
     }
     }