lmj 2 gadi atpakaļ
vecāks
revīzija
90bb68370f

+ 18 - 56
pages/order_submit/order_submit.js

@@ -1,66 +1,28 @@
 // pages/order_submit/order_submit.js
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
-
-  },
-  
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
+    value: '',
+    radio: '1',
+    checked: true,
+    show: false,
   },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
+  showPopup() {
+    this.setData({ show: true });
   },
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
+  onClose() {
+    this.setData({ show: false });
   },
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
+  onChange(event) {
+    // event.detail 为当前输入的值
+    console.log(event.detail);
+    this.setData({
+      radio: event.detail,
+    });
   },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
+  onChange({ detail }) {
+    // 需要手动对 checked 状态进行更新
+    this.setData({ checked: detail });
   },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})
+});

+ 34 - 3
pages/order_submit/order_submit.wxml

@@ -4,9 +4,40 @@
 <!-- 收货地址 -->
 <view class="ad">
   <view class="ad-box">
-    <image src="../image/dizhi.png" mode="" />
-    <text class="ad-text01">请选择收货地址</text>
-    <text class="ad-text02">></text>
+    
+    <van-cell title="收货地址" value="请点击选择地址" is-link bind:click="showPopup" />
+    <van-icon name="location-o" class="dz"/>
+    <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>
+
   </view>
 </view>
 <!-- 商品信息 -->

+ 5 - 3
pages/order_submit/order_submit.wxss

@@ -6,11 +6,13 @@
   width: 90%;
   margin: 18rpx 38rpx;
   /* border-bottom: 5px rgb(228, 227, 227) solid; */
+  position: relative;
 }
-.ad-box image{
-  width: 40rpx;
-  height: 40rpx;
+.dz{
   float: left;
+  position: absolute;
+  top: 13px;
+  left: -5px;
 }
 .ad-text01{
   font-size: 32rpx;