Browse Source

商家端

lmj 2 years ago
parent
commit
f3e73c0cfe

+ 44 - 5
app.json

@@ -1,9 +1,12 @@
 {
   "pages": [
-    "pages/logon/logon",
     "pages/index/index",
-    "pages/logs/logs"
-    
+    "pages/logon/logon",
+    "pages/order/order",
+    "pages/me/me",
+    "pages/message/message",
+
+    "pages/total/total"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -11,11 +14,47 @@
     "navigationBarTitleText": "登录",
     "navigationBarTextStyle": "black"
   },
+  "tabBar": {
+    "color": "#000000",
+    "selectedColor": "#ea9518",
+    "list": [
+      {
+        "pagePath": "pages/order/order",
+        "text": "订单",
+        "iconPath": "./image/dingdan_icon.png",
+        "selectedIconPath": "./image/dingdan_active_icon.png"
+      },
+      {
+        "pagePath": "pages/message/message",
+        "text": "信息",
+        "iconPath": "./image/xiaoxi_icon .png",
+        "selectedIconPath": "./image/xiaoxi_active_icon.png"
+      },
+      {
+        "pagePath": "pages/me/me",
+        "text": "我的",
+        "iconPath": "./image/wode_icon.png",
+        "selectedIconPath": "./image/wode_active_icon.png"
+      }
+    ]
+  },
   "sitemapLocation": "sitemap.json",
   "usingComponents": {
     "van-button": "@vant/weapp/button/index",
-    "van-icon": "@vant/weapp/icon/index",
     "van-field": "@vant/weapp/field/index",
-    "van-image": "@vant/weapp/image/index"
+    "van-image": "@vant/weapp/image/index",
+    "van-card": "@vant/weapp/card/index",
+    "van-action-sheet": "@vant/weapp/action-sheet/index",
+    "van-search": "@vant/weapp/search/index",
+    "van-tab": "@vant/weapp/tab/index",
+    "van-tabs": "@vant/weapp/tabs/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-icon": "@vant/weapp/icon/index",
+    "van-panel": "@vant/weapp/panel/index",
+    "van-divider": "@vant/weapp/divider/index",
+    "van-grid": "@vant/weapp/grid/index",
+    "van-grid-item": "@vant/weapp/grid-item/index",
+    "van-calendar": "@vant/weapp/calendar/index"
   }
 }

BIN
image/dingdan_active_icon.png


BIN
image/dingdan_icon.png


BIN
image/wode_active_icon.png


BIN
image/wode_icon.png


BIN
image/xiaoxi_active_icon.png


BIN
image/xiaoxi_icon .png


+ 2 - 1
pages/logon/logon.json

@@ -1,3 +1,4 @@
 {
-  "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText": "登录"
 }

+ 4 - 1
pages/logon/logon.wxss

@@ -9,6 +9,9 @@
 }
 .button{
   display: block;
-  margin-left:125px ;
+  margin-left:45px ;
   margin-top:50px ;
+}
+.van-button--info {
+  width: 230px;
 }

+ 0 - 18
pages/logs/logs.js

@@ -1,18 +0,0 @@
-// logs.js
-const util = require('../../utils/util.js')
-
-Page({
-  data: {
-    logs: []
-  },
-  onLoad() {
-    this.setData({
-      logs: (wx.getStorageSync('logs') || []).map(log => {
-        return {
-          date: util.formatTime(new Date(log)),
-          timeStamp: log
-        }
-      })
-    })
-  }
-})

+ 0 - 4
pages/logs/logs.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "查看启动日志",
-  "usingComponents": {}
-}

+ 0 - 6
pages/logs/logs.wxml

@@ -1,6 +0,0 @@
-<!--logs.wxml-->
-<view class="container log-list">
-  <block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
-    <text class="log-item">{{index + 1}}. {{log.date}}</text>
-  </block>
-</view>

+ 0 - 8
pages/logs/logs.wxss

@@ -1,8 +0,0 @@
-.log-list {
-  display: flex;
-  flex-direction: column;
-  padding: 40rpx;
-}
-.log-item {
-  margin: 10rpx;
-}

+ 88 - 0
pages/me/me.js

@@ -0,0 +1,88 @@
+// pages/me/me.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    imgURL:"https://img1.baidu.com/it/u=2786612148,3670057522&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=663",
+    show: false,
+    actions: [
+      {
+        name: '商品管理',
+      },
+      {
+        name: '选项',
+      },
+      {
+        name: '选项',
+        subname: '描述信息',
+        openType: 'share',
+      },
+    ],
+
+
+  },
+  onClose() {
+    this.setData({ show: false });
+  },
+
+  onSelect(event) {
+    console.log(event.detail);
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
pages/me/me.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+  },
+  "navigationBarTitleText": "商家端"
+}

+ 26 - 0
pages/me/me.wxml

@@ -0,0 +1,26 @@
+
+<van-card
+  desc="营业时间 8:00- 19:00"
+  title="二餐一楼麻辣烫"
+  thumb="{{imgURL}}"
+/>
+<block>
+<van-cell
+  icon="cart-circle-o" 
+  is-link
+  title="商品管理"
+  link-type="navigateTo"
+  url=""
+/>
+<van-cell
+icon="balance-list-o"
+  is-link
+  title="账单统计"
+  link-type="navigateTo"
+  url="../total/total"
+/> 
+</block>
+
+
+
+

+ 0 - 0
pages/me/me.wxss


+ 66 - 0
pages/message/message.js

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

+ 4 - 0
pages/message/message.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "商家端"
+}

+ 16 - 0
pages/message/message.wxml

@@ -0,0 +1,16 @@
+<van-panel class="total" title="订单编号:898989898"status="详细>">
+        <view><van-cell class="name" title="姓名:吴迪(先生)" value="已送达" value-class="cell-value" border="{{ false }}"/></view>
+        <view class="mess1">手机号:1389091919</view>
+        <view class="mess1">地址:哈尔滨师范大学公寓2号楼1门</view>
+        <view class="mess1">下单时间:2022-08-18 13:18:34</view>
+        <view class="mess1">配送人:冯传宇</view>
+
+      </van-panel>
+      <van-panel class="total" title="订单编号:898989898"status="详细>">
+        <view><van-cell class="name" title="姓名:吴迪(先生)" value="已送达" value-class="cell-value" border="{{ false }}"/></view>
+        <view class="mess1">手机号:1389091919</view>
+        <view class="mess1">地址:哈尔滨师范大学公寓2号楼1门</view>
+        <view class="mess1">下单时间:2022-08-18 13:18:34</view>
+        <view class="mess1">配送人:冯传宇</view>
+
+      </van-panel>

+ 23 - 0
pages/message/message.wxss

@@ -0,0 +1,23 @@
+.name{
+  display: block;
+  color: #706868;
+  font-size: 12px;
+  
+}
+.total{
+  display: block;
+  margin-top: 5px;
+
+}
+.mess1{
+  margin-left: 15px;
+  display: block;
+  color: #706868;
+  font-size: 15px;
+  margin-bottom: 8px;
+  margin-top: -2px;
+  font-size: 15px;
+}
+.cell-value{
+  color: rgb(228, 112, 18)!important;
+}

+ 77 - 0
pages/order/order.js

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

+ 6 - 0
pages/order/order.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+   
+  },
+   "navigationBarTitleText": "商家端"
+}

+ 42 - 0
pages/order/order.wxml

@@ -0,0 +1,42 @@
+<van-search
+  value="{{ value }}"
+  placeholder="搜索用户手机号"
+  use-action-slot
+  bind:change="onChange"
+  bind:search="onSearch"
+>
+  <view slot="action" bind:tap="onClick">搜索</view>
+</van-search>
+<van-tabs active="a">
+  <van-tab title="待送达" name="a">
+      <van-panel class="total" title="订单编号:898989898"status="详细>">
+        <view><van-cell class="name" title="姓名:吴迪(先生)" value="待送达" value-class="cell-value" border="{{ false }}"/></view>
+        <view class="mess1">手机号:1389091919</view>
+        <view class="mess1">地址:哈尔滨师范大学公寓2号楼1门</view>
+        <view class="mess1">下单时间:2022-08-18 13:18:34</view>
+        <view class="b1">
+          <van-button size="mini" type="warning">重新打印</van-button>
+        </view>
+      </van-panel>
+      <van-panel class="total" title="订单编号:898989898"status="详细>">
+        <view><van-cell class="name" title="姓名:吴迪(先生)" value="待送达" value-class="cell-value" border="{{ false }}"/></view>
+        <view class="mess1">手机号:1389091919</view>
+        <view class="mess1">地址:哈尔滨师范大学公寓2号楼1门</view>
+        <view class="mess1">下单时间:2022-08-18 13:18:34</view>
+        <view class="b1">
+          <van-button size="mini" type="warning">重新打印</van-button>
+        </view>
+      </van-panel>
+  </van-tab>
+  <van-tab title="已送达" name="b"> <van-panel class="total" title="订单编号:898989898"status="详细>">
+        <view><van-cell class="name" title="姓名:吴迪(先生)" value="待送达" border="{{ false }}"/></view>
+        <view class="mess1">手机号:1389091919</view>
+        <view class="mess1">地址:哈尔滨师范大学公寓2号楼1门</view>
+        <view class="mess1">下单时间:2022-08-18 13:18:34</view>
+        <view class="b1">
+          <van-button size="mini" type="warning">重新打印</van-button>
+        </view>
+      </van-panel></van-tab>
+  <van-tab title="已退款" name="c">内容</van-tab>
+</van-tabs>
+

+ 29 - 0
pages/order/order.wxss

@@ -0,0 +1,29 @@
+.mess1{
+  margin-left: 15px;
+  display: block;
+  color: #706868;
+  font-size: 15px;
+  margin-bottom: 8px;
+  margin-top: -2px;
+  font-size: 15px;
+}
+.b1{
+  float: right;
+  display: inline;
+  margin-top: -30px;
+  margin-right: 10px;
+}
+.name{
+  display: block;
+  color: #706868;
+  font-size: 12px;
+  
+}
+.total{
+  display: block;
+  margin-top: 5px;
+
+}
+.cell-value{
+  color: rgb(228, 112, 18)!important;
+}

+ 85 - 0
pages/total/total.js

@@ -0,0 +1,85 @@
+// pages/total/total.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    date: '',
+    show: false,
+  },
+
+  onDisplay() {
+    this.setData({ show: true });
+  },
+  onClose() {
+    this.setData({ show: false });
+  },
+  formatDate(date) {
+    date = new Date(date);
+    return `${date.getMonth() + 1}/${date.getDate()}`;
+  },
+  onConfirm(event) {
+    const [start, end] = event.detail;
+    this.setData({
+      show: false,
+      date: `${this.formatDate(start)} - ${this.formatDate(end)}`,
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
pages/total/total.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "账单统计"
+}

+ 65 - 0
pages/total/total.wxml

@@ -0,0 +1,65 @@
+<view class="total">
+<view class="day">
+  <view>
+    今日账单
+  </view>
+  <view class="money">
+    入账金额: ¥<view class="shuzi"> 
+      9909
+    </view>.98 元
+  </view>
+</view>  
+</view>
+
+<view class="fill">
+  <view class="sum">
+    <View class="first">¥<view class="big">
+      340
+    </view> .14元</View>
+     <view class="first1">包装费</view>
+  </view>
+  <view class="sum">
+    <View class="first">¥<view class="big">
+      298
+    </view> .00元</View>
+     <view class="first1">配送费</view>
+  </view>
+  <view class="">
+    <View class="first">¥<view class="big">
+      50
+    </view> .00元</View>
+     <view class="first1">包装费</view>
+  </view>
+</view>
+<van-cell title="累计账单"  value="{{ date }}" bind:click="onDisplay" />
+<van-calendar
+  show="{{ show }}"
+  type="range"
+  bind:close="onClose"
+  bind:confirm="onConfirm"
+/>
+<van-grid direction="horizontal" column-num="2" >
+  
+  <van-grid-item icon="after-sale" text="入账金额"/>
+  <view class="into">
+  ¥1,9899.00元
+  </view>
+  <van-grid-item icon="point-gift-o" text="包装费" />
+  <view class="into1">
+  ¥1,9899.00元
+  </view>
+  <van-grid-item icon="logistics" text="配送费" />
+  <view class="into2">
+  ¥1,9899.00元
+  </view>
+  <van-grid-item icon="cash-back-record" text="退款费" />
+  <view class="into3">
+  ¥1,9899.00元
+  </view>
+</van-grid>
+
+
+
+
+
+

+ 71 - 0
pages/total/total.wxss

@@ -0,0 +1,71 @@
+.total{
+  width: 320px;
+  background-color: #ee8036;
+}
+.day{
+  margin: 100px 100px 50px 50px ;
+  font-size: x-large;
+  display: inline-block;
+  color: aliceblue;
+}
+.money{
+  font-size: small;
+  display: inline-block;
+}
+.shuzi{
+  display: inline-block;
+  font-size: x-large;
+}
+.fill{
+  height: 100px;
+  width: 320px;
+  background-color: #f59251;
+  color: aliceblue;
+
+}
+.sum{
+  width: 107px;
+  height: 95px;
+  border-right: 1px solid rgb(133, 131, 131);
+  float: left;
+}
+
+.first{
+  display: inline-block;
+  margin-top: 35px;
+  margin-left: 10px;
+}
+.first1{
+  display: inline-block;
+  margin-top: 0px;
+  margin-left: 25px;
+}
+.big{
+  display: inline-block;
+  font-size: large;
+}
+.into{
+ position: absolute;
+ top: 5px;
+ left: 60px;
+ font-size: small;
+}
+.into1{
+  position: absolute;
+  top: 5px;
+  left: 230px;
+  font-size: small;
+ }
+ .into2{
+  position: absolute;
+  top: 64px;
+  left: 55px;
+  font-size: small;
+ }
+ .into3{
+  position: absolute;
+  top: 64px;
+  left: 230px;
+  font-size: small;
+ }
+ 

+ 14 - 0
project.private.config.json

@@ -13,6 +13,20 @@
           "query": "logon",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "商家端",
+          "pathName": "pages/order/order",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "账单统计",
+          "pathName": "pages/total/total",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }