Browse Source

设计修改

wangyong 6 years ago
parent
commit
ce4624dc50

+ 2 - 1
app.json

@@ -86,7 +86,8 @@
     "pages/eachGiftInfor/eachGiftInfor",
     "pages/eachGiftInfor/eachGiftInfor",
     "pages/midAutumnFestival/midAutumnFestival",
     "pages/midAutumnFestival/midAutumnFestival",
     "components/component-made/made-solid",
     "components/component-made/made-solid",
-    "components/data-none/data-none"
+    "components/data-none/data-none",
+    "components/divider/divider"
   ],
   ],
   "subpackages": [
   "subpackages": [
     {
     {

+ 66 - 0
components/divider/divider.js

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

+ 3 - 0
components/divider/divider.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 5 - 0
components/divider/divider.wxml

@@ -0,0 +1,5 @@
+<!--components/divider/divider.wxml-->
+<view class='divider'>
+  已经到底了~
+</view>
+

+ 5 - 0
components/divider/divider.wxss

@@ -0,0 +1,5 @@
+.divider{
+  margin:40rpx;
+  font-size:28rpx;
+  text-align: center;
+}

+ 1 - 1
customized/pages/accounts/accounts.js

@@ -118,7 +118,7 @@ Page({
         wx.requestPayment({
         wx.requestPayment({
           timeStamp: res.timeStamp,
           timeStamp: res.timeStamp,
           nonceStr: res.nonceStr,
           nonceStr: res.nonceStr,
-          package: res.pkg,
+          package: res.package,
           signType: res.signType,
           signType: res.signType,
           paySign: res.sign,
           paySign: res.sign,
           success(res){
           success(res){

+ 6 - 0
customized/pages/car/car.js

@@ -89,6 +89,9 @@ Page({
     that.totalPrice(that)
     that.totalPrice(that)
   },
   },
   getCarlist(that){
   getCarlist(that){
+    wx.showLoading({
+      title: '加载中...',
+    })
     wx.request({
     wx.request({
       url: host +'/queryShopCar',
       url: host +'/queryShopCar',
       method:'post',
       method:'post',
@@ -111,6 +114,9 @@ Page({
           carList: carList
           carList: carList
         })
         })
         console.log(that.data.carList,"carListcarList")
         console.log(that.data.carList,"carListcarList")
+      },
+      complete(){
+        wx.hideLoading()
       }
       }
     })
     })
   },
   },

+ 4 - 4
customized/pages/made/comb/comb.js

@@ -9,10 +9,10 @@ Page({
    */
    */
   data: {
   data: {
     dataPositionObj: { //正面数据
     dataPositionObj: { //正面数据
-      top: 156,
-      left: 286,
-      width: 270,
-      height: 270
+      top: 182,
+      left: 312,
+      width: 218,
+      height: 218,
     },
     },
     imgTouch: {
     imgTouch: {
       isActive: "1",
       isActive: "1",

+ 5 - 5
customized/pages/made/comb/comb.wxss

@@ -7,8 +7,8 @@ page{
  height:588rpx;
  height:588rpx;
 }
 }
 .comb-img,.comb-font{
 .comb-img,.comb-font{
-  width:270rpx;
-  height:270rpx;
+  width:218rpx;
+  height:218rpx;
 }
 }
 .comb-img,.comb-img3{
 .comb-img,.comb-img3{
   background:rgb(255, 176, 29);
   background:rgb(255, 176, 29);
@@ -18,11 +18,11 @@ page{
 }
 }
 .comb-img3,.comb-font3{
 .comb-img3,.comb-font3{
   width:70rpx;
   width:70rpx;
-  height:268rpx;
+  height:248rpx;
 }
 }
 .comb-img4,.comb-font4{
 .comb-img4,.comb-font4{
-  width:265rpx;
-  height:265rpx;
+  width:218rpx;
+  height:218rpx;
 }
 }
 .comb-view-img .pause{
 .comb-view-img .pause{
   width:39%;
   width:39%;

+ 8 - 8
customized/pages/made/made.js

@@ -7,16 +7,16 @@ Page({
    */
    */
   data: {
   data: {
     dataPositionObj: { //正面数据
     dataPositionObj: { //正面数据
-      top: 156,
-      left: 286,
-      width: 270,
-      height: 270,
+      top: 182,
+      left: 312,
+      width: 218,
+      height: 218,
     },
     },
     propSize: {
     propSize: {
-      top: '8cm',
-      right: '8cm',
-      bottom: '8cm',
-      left: '8cm',
+      top: '5cm',
+      right: '5cm',
+      bottom: '5cm',
+      left: '5cm',
     },
     },
     isActive: '1', // 默认是正面
     isActive: '1', // 默认是正面
     obverseImgObject: {
     obverseImgObject: {

+ 11 - 4
customized/pages/order/order.js

@@ -64,7 +64,10 @@ Page({
    */
    */
   onReachBottom: function () {
   onReachBottom: function () {
     if(this.data.requestState){
     if(this.data.requestState){
-      this.getOrderList(this,this.data.state,this.data.rows + 1)
+      this.setData({
+        rows: this.data.rows + 1
+      })
+      this.getOrderList(this,this.data.state,this.data.rows)
     }
     }
     console.log('到底了')
     console.log('到底了')
   },
   },
@@ -94,10 +97,14 @@ Page({
       },
       },
       success(res){
       success(res){
         console.log(res,"orderList")
         console.log(res,"orderList")
-        orderList.push(...res.data)
-        if(res.data.length < 10){
+        let data = res.data;
+        data.forEach(el=>{
+          el['imgArray'] = el.orderCustomGoodsList[0].customGoodsImg ? el.orderCustomGoodsList[0].customGoodsImg.split(',') : [];
+        })
+        orderList.push(...data)
+        if(res.data.length < 10 && rows !==1){
           that.setData({
           that.setData({
-            requestState:false,
+            requestState:false
           })
           })
         }
         }
         that.setData({
         that.setData({

+ 2 - 1
customized/pages/order/order.json

@@ -1,5 +1,6 @@
 {
 {
  "usingComponents": {
  "usingComponents": {
-  "data-none": "/components/data-none/data-none"
+  "data-none": "/components/data-none/data-none",
+  "divider": "/components/divider/divider"
   }
   }
 }
 }

+ 3 - 2
customized/pages/order/order.wxml

@@ -9,7 +9,7 @@
     </view>      
     </view>      
       <!-- 图片list -->
       <!-- 图片list -->
     <view class='f-box goods-img-list'>
     <view class='f-box goods-img-list'>
-      <image wx:for="{{item.orderCustomGoodsList}}" wx:for-item="imageItem" wx:if="imageItem !='null'" src='{{host}}{{imageItem.imgList}}' mode="aspectFit"></image>
+      <image wx:for="{{item.imgArray}}" wx:for-item="imageItem" wx:if="imageItem !='null'" src='{{host}}{{imageItem}}' mode="aspectFit"></image>
     </view>
     </view>
     <!-- 操作按钮 -->
     <!-- 操作按钮 -->
     <view class='f-box f-justify-content-end pad-t20 pad-b20 f-s30'>
     <view class='f-box f-justify-content-end pad-t20 pad-b20 f-s30'>
@@ -19,4 +19,5 @@
     </view>
     </view>
   </view>
   </view>
 </view>
 </view>
-<data-none wx:else></data-none>
+<divider wx:if="{{!requestState}}"></divider>
+<data-none wx:if="{{orderList.length === 0}}"></data-none>

+ 29 - 29
utils/util.js

@@ -23,60 +23,60 @@ function changeCup(e) {
     case '1':
     case '1':
       // console.log('正面')
       // console.log('正面')
       dataPositionObj = { // 正面数据
       dataPositionObj = { // 正面数据
-        top: 156,
-        left: 286,
-        width: 270,
-        height: 270
+        top: 182,
+        left: 312,
+        width: 218,
+        height: 218
       };
       };
       propSize = {
       propSize = {
-        top: '8cm',
-        right: '8cm',
-        bottom: '8cm',
-        left: '8cm',
+        top: '5cm',
+        right: '5cm',
+        bottom: '5cm',
+        left: '5cm',
       };
       };
       break;
       break;
     case '2':
     case '2':
-      dataPositionObj = { // 面数据
-        top: 156,
-        left: 180,
-        width: 270,
-        height: 270
+      dataPositionObj = { // 面数据
+        top: 182,
+        left: 206,
+        width: 218,
+        height: 218
       };
       };
       propSize = {
       propSize = {
-        top: '8cm',
-        right: '8cm',
-        bottom: '8cm',
-        left: '8cm',
+        top: '5cm',
+        right: '5cm',
+        bottom: '5cm',
+        left: '5cm',
       };
       };
       // console.log('背面');
       // console.log('背面');
       break;
       break;
     case '3':
     case '3':
       dataPositionObj = { // 正面数据
       dataPositionObj = { // 正面数据
-        top: 150,
+        top: 166,
         left: 348,
         left: 348,
         width: 70,
         width: 70,
-        height: 268
+        height: 248
       };
       };
       propSize = {
       propSize = {
         top: '1cm',
         top: '1cm',
-        right: '6cm',
+        right: '5cm',
         bottom: '1cm',
         bottom: '1cm',
-        left: '6cm',
+        left: '5cm',
       };
       };
       // console.log('手柄');
       // console.log('手柄');
       break;
       break;
     case '4':
     case '4':
       dataPositionObj = { // 正面数据
       dataPositionObj = { // 正面数据
-        top: 160,
-        left: 190,
-        width: 265,
-        height: 265
+        top: 174,
+        left: 224,
+        width: 218,
+        height: 218
       };
       };
       propSize = {
       propSize = {
-        top: '6cm',
-        right: '6cm',
-        bottom: '6cm',
-        left: '6cm',
+        top: '5cm',
+        right: '5cm',
+        bottom: '5cm',
+        left: '5cm',
       };
       };
       // console.log('杯底');
       // console.log('杯底');
       break;
       break;