sunshine1130 4 years ago
parent
commit
ebe9cc20c8

+ 1 - 1
api/user.js

@@ -17,7 +17,7 @@ class store extends request{
     }
 
     static async updateUserInfo(name,birthday,avatar,sex){
-        const res = await this.getRequest(`${this.BASE_URL}User/editUser?name=${name}&birthday=${birthday}&avatar=${avatar}&sex=${sex}`)
+        const res = await this.postRequest(`${this.BASE_URL}User/editUser?name=${name}&birthday=${birthday}&avatar=${avatar}&sex=${sex}`)
     }
     static async getUserById(userId){
         const res = await this.getRequest(`${this.BASE_URL}User/read?id=${userId}`)

+ 2 - 2
app.json

@@ -16,8 +16,8 @@
   
   ],
   "window":{
-    "navigationBarBackgroundColor": "#343434",
-    "navigationBarTextStyle": "white",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTextStyle": "black",
     "navigationBarTitleText": "首页",
     "backgroundColor": "#fff",
     "backgroundTextStyle": "light"

+ 2 - 2
pages/appointment/appointment.json

@@ -3,8 +3,8 @@
     "mp-icon": "weui-miniprogram/icon/icon",
     "mp-tabs": "/componets/tabs/index"
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "提交订单",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/commentinfo/commentinfo.json

@@ -4,8 +4,8 @@
     "mp-dialog": "weui-miniprogram/dialog/dialog"
     
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "发表评论",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/comments/comments.json

@@ -3,8 +3,8 @@
     "comments":"../../componets/comments/index",
     "mp-icon": "weui-miniprogram/icon/icon"
    },
-   "navigationBarBackgroundColor": "#343434",
-   "navigationBarTextStyle": "white",
+   "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
    "navigationBarTitleText": "全部评论",
    "backgroundColor": "#fff",
    "backgroundTextStyle": "light"

+ 2 - 2
pages/index/index.json

@@ -3,8 +3,8 @@
     "mp-icon": "weui-miniprogram/icon/icon",
     "mp-tabs": "/componets/tabs/index"
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "首页",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 8 - 3
pages/index/index.scss

@@ -12,9 +12,13 @@ Page {
 
   /* 门店的标题 */
   .shop {
-    background-color: #fff;
+
     border-top: 1rpx solid #ECECEC;
-    margin-top: 20rpx;
+    width: 100%;
+    background-color: #F7F7F7;
+    padding-top: 20rpx;
+    position: fixed;
+    z-index: 99;
 
     >.title {
       display: flex;
@@ -22,6 +26,7 @@ Page {
       padding: 0 40rpx;
       height: 80rpx;
       line-height: 80rpx;
+      background-color: #fff;
     }
     .shop-info {
       width: 100%;
@@ -123,7 +128,7 @@ Page {
 
   .product {
     overflow-y: auto;
-
+    padding-top: 320rpx;
     /* .weui-tabs {
       .weui-tabs-bar__wrp {
         .weui-tabs-bar__content {

+ 7 - 2
pages/index/index.wxss

@@ -13,9 +13,12 @@ Page {
 }
 
 .container .shop {
-  background-color: #fff;
   border-top: 1rpx solid #ECECEC;
-  margin-top: 20rpx;
+  width: 100%;
+  background-color: #F7F7F7;
+  padding-top: 20rpx;
+  position: fixed;
+  z-index: 99;
   /* 未获得授权时显示获取授权按钮 */
 }
 
@@ -25,6 +28,7 @@ Page {
   padding: 0 40rpx;
   height: 80rpx;
   line-height: 80rpx;
+  background-color: #fff;
 }
 
 .container .shop .shop-info {
@@ -119,6 +123,7 @@ Page {
 
 .container .product {
   overflow-y: auto;
+  padding-top: 320rpx;
   /* .weui-tabs {
       .weui-tabs-bar__wrp {
         .weui-tabs-bar__content {

+ 2 - 2
pages/order/order.json

@@ -4,8 +4,8 @@
     "mp-icon": "weui-miniprogram/icon/icon",
     "mp-tabs": "/componets/tabs/index"
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "订单详细",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/person/person.json

@@ -1,7 +1,7 @@
 {
   "usingComponents": {},
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "个人",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/person/person.wxml

@@ -1,9 +1,9 @@
 <!--pages/person/person.wxml-->
 <view class="container">
-    <view class="person card" wx:if="{{hasUserInfo}}">
+    <view class="person card" wx:if="{{hasUserInfo}}" bindtap = "gotoPersonInfo">
         <view class="person-info">
             <view class="user-name f18 c-202020" bindtap = "gotoPersonInfo">{{userInfo.name}}
-                <image class="next" src="../../images/icons/next.png" bindtap = "gotoPersonInfo">
+                <image class="next" src="../../images/icons/next.png" >
                 </image>
             </view>
             <view class="tel c-707070 fw300">{{userInfo.mobile}}</view>

+ 2 - 1
pages/personinfo/personinfo.js

@@ -92,6 +92,8 @@ Page({
     var birthDay = this.data.birth;
     var avatar = this.data.imgUrl;
     var sex = this.data.sex;
+    
+    await userApi.updateUserInfo(name, birthDay, avatar, sex);
     var userInfo = await app.getWxUserInfo();
     userInfo.name = name;
     userInfo.birthday = birthDay;
@@ -101,7 +103,6 @@ Page({
       data: userInfo,
       key: 'userInfo',
     })
-    await userApi.updateUserInfo(name, birthDay, avatar, sex);
     wx.showToast({
       title: '修改成功',
       icon: 'success',

+ 2 - 2
pages/personinfo/personinfo.json

@@ -5,8 +5,8 @@
    
     
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "个人",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/personorder/personorder.json

@@ -4,8 +4,8 @@
     "mp-icon": "weui-miniprogram/icon/icon",
     "mp-tabs": "/componets/tabs/index"
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "订单",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/product/product.json

@@ -3,8 +3,8 @@
     "comments":"../../componets/comments/index",
     "mp-icon": "weui-miniprogram/icon/icon"
    },
-   "navigationBarBackgroundColor": "#343434",
-   "navigationBarTextStyle": "white",
+   "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
    "navigationBarTitleText": "商品",
    "backgroundColor": "#fff",
    "backgroundTextStyle": "light"

+ 2 - 2
pages/shop/shop.json

@@ -2,8 +2,8 @@
   "usingComponents": {
     "shop":"/componets/shop/index"
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "门店",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"

+ 2 - 2
pages/shopinfo/shopinfo.json

@@ -3,8 +3,8 @@
    "comments":"../../componets/comments/index",
    "mp-icon": "weui-miniprogram/icon/icon"
   },
-  "navigationBarBackgroundColor": "#343434",
-  "navigationBarTextStyle": "white",
+  "navigationBarBackgroundColor": "#fff",
+  "navigationBarTextStyle": "black",
   "navigationBarTitleText": "门店",
   "backgroundColor": "#fff",
   "backgroundTextStyle": "light"