瀏覽代碼

Merge branch 'pink' of http://39.105.160.25:10880/sifu-gogs/delivery-customer into pink

LiShiwei 2 年之前
父節點
當前提交
c6f2bd0328

+ 6 - 3
app.json

@@ -3,7 +3,9 @@
     "pages/index/index",
     "pages/search/index",
     "pages/me/me",
-    "pages/exchange/exchange"
+    "pages/address/index",
+    "pages/confirm/confirm",
+    "pages/information/information"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -27,9 +29,10 @@
         "iconPath": "/images/icon/me.png",
         "selectedIconPath": "/images/icon/me-select .png"
       }
-    ],
+    ]
+  },
   "usingComponents": {
     "van-button": "@vant/weapp/button"
   },
   "sitemapLocation": "sitemap.json"
-}}
+}

二進制
images/confirm/canting.png


+ 69 - 0
pages/address/index.js

@@ -0,0 +1,69 @@
+// pages/address/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    checked: true,
+  },
+  onChange({ detail }) {
+    // 需要手动对 checked 状态进行更新
+    this.setData({ checked: detail });
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 15 - 0
pages/address/index.json

@@ -0,0 +1,15 @@
+{
+  "usingComponents": {
+    "van-field": "@vant/weapp/field/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-radio": "@vant/weapp/radio/index",
+    "van-radio-group": "@vant/weapp/radio-group/index",
+    "van-switch": "@vant/weapp/switch/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-row": "@vant/weapp/row/index",
+    "van-col": "@vant/weapp/col/index"
+  },
+  "navigationBarTitleText": "修改地址"
+}

+ 55 - 0
pages/address/index.wxml

@@ -0,0 +1,55 @@
+<view class="box">
+  <view class="content">
+    <van-cell-group>
+      <van-field
+        value="{{ name }}"
+        clearable
+        label="姓名"
+        placeholder="请填写姓名"
+      />
+      <van-field
+        value="{{ phone }}"
+        label="手机号"
+        placeholder="请填写手机号"
+        type="number"
+      />
+      <van-cell title="性别" value="{{ sex }}" title-width="100px" class="simulate-field">
+        <van-radio-group v-model="chargeType" direction="horizontal"  bind:change="onChange">
+            <van-radio name="0" checked-color="#F88300">男</van-radio>
+            <van-radio name="1" checked-color="#F88300">女</van-radio>
+        </van-radio-group>
+      </van-cell>
+      <van-field
+        value="{{ address }}"
+        label="收货地址"
+        placeholder="请点击选择地址"
+        is-link
+        bind:click-icon="selectaddress"
+      />
+      <van-field
+        value="{{ number }}"
+        label="门牌号"
+        placeholder="例:1号公寓2门312"
+      />
+      <van-cell title="设置默认" value="{{ default }}" 
+       size="small" >
+        <van-switch checked="{{ checked }}" 
+        bind:change="onChange"   size="20px"
+        active-color="#0D9C2B"
+        inactive-color="fff"
+        checked="{{checked}}"
+        />
+      </van-cell>
+    </van-cell-group>
+  </view>
+  <view class="button">
+    <van-row>
+      <van-col span="9" offset="2">
+        <van-button round type="info" block color="#999999"  size="small">删除</van-button>
+      </van-col>
+      <van-col span="9" offset="2">
+        <van-button round type="info" block color="#F88300"  size="small">保存</van-button>
+      </van-col>
+    </van-row>
+  </view>
+</view>

+ 13 - 0
pages/address/index.wxss

@@ -0,0 +1,13 @@
+Page{
+  background-color: #F4F4F4;
+}
+.box{
+  color: white;
+  padding-top: 10rpx;
+  padding-left: 10rpx;
+}
+.button{
+  position: fixed;
+  bottom: 20px;
+  width: 100%;
+}

+ 66 - 0
pages/confirm/confirm.js

@@ -0,0 +1,66 @@
+// pages/confirm/confirm.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 12 - 0
pages/confirm/confirm.json

@@ -0,0 +1,12 @@
+{
+  "usingComponents": {
+    "van-button": "@vant/weapp/button/index",
+    "van-nav-bar": "@vant/weapp/nav-bar/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-row": "@vant/weapp/row/index",
+    "van-col": "@vant/weapp/col/index",
+    "van-image": "@vant/weapp/image/index"
+  }
+}

+ 65 - 0
pages/confirm/confirm.wxml

@@ -0,0 +1,65 @@
+<view class="confirm-top1">
+  <view class="address">
+    <!-- <van-cell-group inset> -->
+      <van-cell title="哈尔滨师范大学第一公寓2门312室" label="吴迪(先生)182****2898" />
+    <!-- </van-cell-group> -->
+  </view>
+
+  <view class="products">
+      <view class="products-top">      
+        <van-cell >
+          <text class="text0">二楼麻辣烫、麻辣香锅、麻辣拌饭</text>
+        </van-cell>
+        <van-cell border="{{true}}">
+          <image class='img-1' src='/images/confirm/canting.png' slot="icon"></image>
+          <text class="text1">麻辣烫微辣微麻</text>
+          <text class="text2">¥10.98+40积分</text>
+          <text class="text3">*2</text>
+          <text class="text4">¥28.80</text>
+        </van-cell>
+      </view>
+      <view class="products-content">
+        <van-cell 
+        value="¥0" 
+        label="包装费"
+        value-class="cell-value1"/>
+      </view>
+      <view class="products-bottom">
+        <van-cell value="¥3" label="付款费" value-class="cell-value1" />
+      </view>
+      <view class="products-bottom2">
+        <van-cell value="" label=""  border="{{false}}"/>
+      </view>
+  </view>
+
+  <view class="remark">
+      <view class="remark-left">备注</view>
+      <view class="remark-right">不要香菜</view>
+  </view>
+  
+  <view class="message">
+      <view class="message-left">订单编号:</view>
+      <view class="message-right">203266522255666</view>
+  </view>
+  <view class="message">
+      <view class="message-left">交易时间:</view>
+      <view class="message-right">2022-06-03 13:19:08</view>
+  </view>
+  <view class="message">
+      <view class="message-left">积分抵扣:</view>
+      <view class="message-right">40积分</view>
+  </view>
+  <view class="message">
+      <view class="message-left" value-class="cell-value1">实付金额:</view>
+      <view class="message-right2">¥21.80</view>
+  </view>
+  
+  <view class="kong">
+      <van-cell value="" label=""  border="{{false}}"/>
+      <van-cell value="" label=""  border="{{false}}"/>
+      <van-cell value="" label=""  border="{{false}}"/>
+      <van-cell value="" label=""  border="{{false}}"/>
+      <van-cell value="" label=""  border="{{false}}"/>
+  </view>
+   
+</view>

+ 107 - 0
pages/confirm/confirm.wxss

@@ -0,0 +1,107 @@
+/* pages/confirm/confirm.wxss */
+page{
+  background-color: rgb(243, 241, 241) ;
+}
+
+.products{
+  padding-top: 10rpx;
+}
+.text0{
+  float: left;
+  font-size: 26rpx;
+  color: #000;
+  height: 40rpx;
+}
+.img-1{
+  width: 180rpx;
+  height: 110rpx;
+  padding-right: 20rpx;
+}
+.text1{
+  float: left;
+  font-size: 26rpx;
+  color: #000;
+}
+.text2{
+  float: right;
+  font-size: 26rpx;
+  color: red;
+}
+.text3{
+  float: left;
+  padding-top: 24rpx;
+  margin-right: 100rpx;
+  font-size: 26rpx;
+}
+.text4{
+  float: right;
+  font-size: 24rpx;
+  text-decoration: line-through;
+}
+.products-bottom2{
+height: 70rpx;
+background-color: white;
+margin-bottom: 10rpx;
+}
+.cell-value1{
+  color: red !important;
+  font-size: 24rpx !important;
+}
+.cell-value2{
+  font-size: 24rpx !important;
+}
+.remark{
+ padding-top: 10rpx;
+ padding-bottom: 10rpx;
+ height: 60rpx;
+ background: white;
+ margin-bottom: 10rpx;
+}
+/* 使用伪类添加边框 */
+/* .remark::after {
+    content: '';
+    width: 90%;
+    height: 10px;
+    display: block;
+    margin: 0 auto;
+    border-bottom: 1px solid red;
+} */
+.remark-left{
+  padding-top: 12rpx;
+  padding-left: 30rpx;
+  font-size: 24rpx;
+}
+.remark-right{
+  margin-top: -32rpx;
+  padding-left: 110rpx;
+  font-size: 24rpx;
+  padding-top: -30rpx;
+  color: #a5a5a5;
+}
+.message{
+  padding-top: 10rpx;
+  padding-left: 30rpx;
+  padding-bottom: -10rpx;
+  height: 56rpx;
+  background: white;
+  /* border-bottom: 5px solid red; */
+}
+.message-left{
+  padding-top: 12rpx;
+  font-size: 24rpx;
+}
+.message-right{
+  margin-top: -30rpx;
+  padding-left: 115rpx;
+  font-size: 24rpx;
+  color: #a5a5a5;
+} 
+.message-right2{
+  margin-top: -30rpx;
+  padding-left: 115rpx;
+  font-size: 24rpx;
+  color: red;
+}
+.kong{
+  padding-top: 10rpx;
+}

+ 173 - 0
pages/information/information.js

@@ -0,0 +1,173 @@
+const options = [
+  {
+    text: '学生',
+    value: '330000',
+  },
+  {
+    text: '老师',
+    value: '320000',
+  }];
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {  
+    show: false,
+    options,
+    fieldValue: '',
+    cascaderValue: '',
+    gender:'',
+    index:'',
+    date: '',
+    minDate: new Date(2010, 0, 1).getTime(),
+    maxDate: new Date(2024, 0, 31).getTime(),
+    showtime: false,
+        // 专业选择器
+        showproject:false,     //控制弹出层是否弹出的值
+        columns2: ['计算机科学与技术','计算机类','数据科学与大数据技术'],   //选择器中的值
+        project:'',  //选择身份之后的值进行页面显示
+    
+        // 美食偏好
+        showhobby:false,
+        columns3: ['地三鲜','烤冷面','炸薯条','鸡米花'],   //选择器中的值
+        hobby:'',  //选择身份之后的值进行页面显示
+  },
+
+
+  onDisplay() {
+    this.setData({ showtime: true });
+  },
+  onClose2() {
+    this.setData({ showtime: false });
+  },
+  formatDate(date) {
+    date = new Date(date);
+    return `${date.getMonth() + 1}/${date.getDate()}`;
+  },
+  onConfirm(event) {
+    this.setData({
+      showtime: false,
+      date: this.formatDate(event.detail),
+    });
+  },
+
+    // 专业选择器
+    showProject(p){    
+      this.setData({showproject:true})
+     //  this.setData({show:true})
+    },
+  // 美食偏好
+  showHobby(h){    
+    this.setData({showhobby:true})
+   //  this.setData({show:true})
+  },
+  onClick() {
+    this.setData({
+      show: true,
+    });
+  },
+
+  onClose() {
+    this.setData({
+      show: false,
+    });
+  },
+
+  onFinish(e) {
+    const { selectedOptions, value } = e.detail;
+    const fieldValue = selectedOptions
+        .map((option) => option.text || option.name)
+        .join('/');
+    this.setData({
+      fieldValue,
+      cascaderValue: value,
+    })
+  },
+  showPopup() {
+    this.setData({ show: true });
+  },
+
+  onClose1() {     //点击空白处开闭弹出层(选择器)及选择器左上角的取消
+    this.setData({ show: false });
+    this.setData({showproject:false});
+    this.setData({showhobby:false});
+  },
+  onConfirm2(p){    //选择器右上角的确定,点击确定获取值
+    this.setData({
+      project:p.detail.value,
+      showproject:false
+    });
+  },
+  onConfirm3(h){    //选择器右上角的确定,点击确定获取值
+    this.setData({
+      hobby:h.detail.value,
+      showhobby:false
+    });
+  },
+  submitNewStuInfo(e){
+    //表单输入框提交的内容包含在e参数中
+  },
+  submitNewStuInfo(p){
+    //表单输入框提交的内容包含在e参数中
+  },
+  submitNewStuInfo(h){
+    //表单输入框提交的内容包含在e参数中
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 13 - 0
pages/information/information.json

@@ -0,0 +1,13 @@
+{
+  "usingComponents": {
+    "van-cascader": "@vant/weapp/cascader/index",
+    "van-button": "@vant/weapp/button",
+    "van-field": "@vant/weapp/field/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-calendar": "@vant/weapp/calendar/index",
+    "van-popup": "@vant/weapp/popup/index",
+    "van-picker": "@vant/weapp/picker/index",
+    "van-divider": "@vant/weapp/divider/index"
+  }
+}

+ 125 - 0
pages/information/information.wxml

@@ -0,0 +1,125 @@
+<text class="topic">完善信息</text>
+<view class="topic-1">请填写以下个人信息</view>
+<view class="topic-2-1">
+  <van-cell-group>
+  <van-field
+    value="{{ username }}"
+    required
+    clearable
+    label="姓名"
+    icon="question-o"
+    placeholder="请输入姓名"
+    bind:click-icon="onClickIcon"
+    size="large"
+  />
+
+  <van-field
+    value="{{ number }}"
+    type="number"
+    label="手机号"
+    placeholder="请输入手机号"
+    required
+    size="large"
+  />
+  <van-field
+    value="{{ number }}"
+    type="number"
+    label="身份证号"
+    placeholder="请输入身份证号"
+    required
+    size="large"
+  />
+ 
+</van-cell-group>
+</view>
+<view class="topic-5" >
+  <van-field
+  value="{{ fieldValue }}"
+  is-link
+  readonly
+  required
+  label="请选择身份"
+  placeholder="请选择身份"
+  bind:tap="onClick"
+  input-align="right"
+  title-width="5em"
+  size="large"
+/>
+<van-popup show="{{ show }}" round position="bottom">
+  <van-cascader
+    wx:if="{{ show }}"
+    value="{{ cascaderValue }}"
+    title="请选择身份"
+    options="{{ options }}"
+    bind:close="onClose1"
+    bind:finish="onFinish"
+  />
+</van-popup>
+</view>
+<view class="topic-4">
+  <van-cell-group>
+  <van-field
+    value="{{ value }}"
+    label="学校"
+    placeholder="请填写学校全称"
+    bind:change="onChange"
+    size="large"
+  />
+</van-cell-group>
+</view>
+<view class="topic-6">
+  <van-cell-group>
+    <van-cell title="入学时间" value="{{ date }}"
+    size="large"
+     bind:click="onDisplay" />
+     <van-calendar show="{{ showtime }}" 
+     min-date="{{ minDate }}"
+  max-date="{{ maxDate }}"
+  bind:close="onClose2" bind:confirm="onConfirm" />
+
+    <view bindtap="showProject">
+    <van-field
+      label="专业"
+      title-width="5em"
+      input-align="right"
+      placeholder="请选择"
+      value="{{project}}"
+      size="large"
+      required
+      readonly
+      is-link
+    />
+    </view>
+
+    <view bindtap="showHobby">
+    <van-field
+      label="美食偏好"
+      title-width="5em"
+      input-align="right"
+      placeholder="请选择"
+      value="{{hobby}}"  
+      size="large"   
+      readonly
+      is-link
+
+    />
+    </view>
+  </van-cell-group>
+</view>
+
+<!-- 选择专业 -->
+<van-popup show="{{ showproject }}" bind:close="onClose1"  position="bottom"
+  custom-style="height: 40%">
+    <van-picker title="选择专业" show-toolbar columns="{{ columns2 }}"  bind:cancel="onClose"
+  bind:confirm="onConfirm2"/>
+</van-popup>
+
+<!-- 美食偏好 -->
+<van-popup show="{{ showhobby }}" bind:close="onClose1"  position="bottom"
+  custom-style="height: 40%">
+    <van-picker title="选择偏好" show-toolbar columns="{{ columns3 }}"  bind:cancel="onClose"
+  bind:confirm="onConfirm3"/>
+</van-popup>
+<view class="but">
+  <van-button type="primary" block round color="grey" >提交</van-button>
+</view>

+ 32 - 0
pages/information/information.wxss

@@ -0,0 +1,32 @@
+
+.topic{
+  font-size: 25px;
+  padding-left: 15px;
+}
+.topic-1{
+  color: grey;
+  padding-left: 15px;
+  padding-top: 10px;
+}
+
+.topic-2-1{
+  position: absolute;
+  top: 90px;
+}
+.topic-4{
+  position: absolute;
+  top: 275px;
+}
+.topic-5{
+  position: absolute;
+  top: 230px;
+}
+.but{
+  position: absolute;
+  top: 480px;
+  width: 375px;
+}
+.topic-6{
+  position: absolute;
+  top: 315px;
+}

+ 66 - 0
pages/success/success.js

@@ -0,0 +1,66 @@
+// pages/success/success.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
pages/success/success.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "支付成功"
+}

+ 14 - 0
pages/success/success.wxml

@@ -0,0 +1,14 @@
+<!-- <van-empty description=""/> -->
+<van-row type="flex" justify="center">
+  <van-col span="7" offset="4">
+    <van-button round type="default">
+      返回首页
+    </van-button>
+  </van-col>
+  <van-col span="7" offset="4">
+    <van-button round type="warning">
+      查看订单
+    </van-button>
+  </van-col>
+</van-row>
+<image src=".\order.jpg" mode=""/>

+ 9 - 0
pages/success/success.wxss

@@ -0,0 +1,9 @@
+/* pages/success/success.wxss */
+image{
+  border: 1px solid red;
+  display: flex;
+  justify-content: center;
+  margin-left: 50px;
+  margin-top: 10px;
+}
+

+ 10 - 11
project.config.json

@@ -1,9 +1,5 @@
 {
   "description": "项目配置文件",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
   "setting": {
     "bundle": false,
     "userConfirmedBundleSwitch": false,
@@ -24,8 +20,6 @@
     "nodeModules": false,
     "enhance": true,
     "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
     "showShadowRootInWxmlPanel": true,
     "packNpmManually": true,
     "enableEngineNative": false,
@@ -43,15 +37,20 @@
       "disablePlugins": [],
       "outputPath": ""
     },
-    "condition": false
+    "condition": false,
+    "ignoreUploadUnusedFiles": true
   },
   "compileType": "miniprogram",
-  "libVersion": "2.19.4",
-  "appid": "wxc06fe0355f1e6452",
-  "projectname": "miniprogram-92",
   "condition": {},
   "editorSetting": {
     "tabIndent": "insertSpaces",
     "tabSize": 2
-  }
+  },
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "appid": "wx00b296c6fce7bfcb",
+  "projectname": "delivery-customer",
+  "libVersion": "2.19.6"
 }

+ 19 - 1
project.private.config.json

@@ -5,7 +5,21 @@
       "list": [
         {
           "name": "",
-          "pathName": "pages/index/index",
+          "pathName": "pages/confirm/confirm",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/address/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/information/information",
           "query": "",
           "launchMode": "default",
           "scene": null
@@ -19,5 +33,9 @@
         }
       ]
     }
+  },
+  "projectname": "delivery-customer",
+  "setting": {
+    "compileHotReLoad": true
   }
 }