Browse Source

修改接口参数

文杰 2 weeks ago
parent
commit
a9218a03f5

+ 3 - 5
app.json

@@ -17,7 +17,6 @@
     "pages/search-prod-show/search-prod-show",
     "pages/prod/prod",
     "pages/login/login",
-    "pages/recent-news/recent-news",
     "pages/news-detail/news-detail",
     "pages/my-users/my-users",
     "pages/income-details/income-details",
@@ -36,7 +35,6 @@
     "pages/chooseRefundWay/chooseRefundWay",
     "pages/writeReturnLogistics/writeReturnLogistics",
     "pages/groupConfirmOrder/groupConfirmOrder",
-    "pages/openAShop/openAShop",
     "pages/accountSettings/accountSettings",
     "pages/shopPage/shopPage",
     "pages/shopProds/shopProds",
@@ -87,9 +85,9 @@
   },
   "window": {
     "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#006CE8",
-    "navigationBarTitleText": "星闪豹",
-    "navigationBarTextStyle": "white"
+    "navigationBarBackgroundColor": "#FFF",
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "星闪豹"
   },
   "tabBar": {
     "selectedColor": "#04358D",

+ 6 - 1
pages/category/category.js

@@ -239,8 +239,13 @@ Page({
     //加载分类列表
     var params = {
       // url: "/category/categoryInfo",
-      url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      // url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      url: "/category/listCategoryForUser",
       method: "GET",
+      data:{
+        shopId:this.data.testShopId||shopid,
+        channelId:wx.getStorageSync('channelId')||3,
+      },
       callBack: function (res) {
         ths.setData({
           categoryList: res,

+ 7 - 2
pages/category1/category.js

@@ -289,9 +289,14 @@ Page({
     let that = this
     //加载分类列表
     var params = {
-      // url: "/category/categoryInfo",
-      url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+     // url: "/category/categoryInfo",
+      // url: "/category/listCategoryForUser/"+(this.data.testShopId||shopid),
+      url: "/category/listCategoryForUser",
       method: "GET",
+      data:{
+        shopId:this.data.testShopId||shopid,
+        channelId:wx.getStorageSync('channelId')||3,
+      },
       callBack: function (res) {
         ths.setData({
           categoryList: res,

+ 4 - 1
pages/index/index.js

@@ -504,7 +504,7 @@ Page({
     var shopid = e.currentTarget.dataset.shopid;
     if (prodid) {
       wx.navigateTo({
-        url: `/pages/prod/prod?prodid=${prodid}&shopid=${shopid}`,
+        url: `/pages/prod/prod?prodid=${prodid}&shopid=${this.data.shop_id}`,
       })
     }
   },
@@ -836,6 +836,9 @@ Page({
     }, 1000)
   },
   getAllData() {
+    this.setData({
+      current:1
+    })
     http.getCartCount(); //重新计算购物车总数量
     this.getIndexImgs();
     this.get_neighborShop()

+ 3 - 1
pages/locationAdd/locationAdd.js

@@ -115,7 +115,9 @@ Page({
             delta: 1,
             success: function (e) { // 成功的回调
               if (prevPage == undefined || prevPage == null) return;
-              prevPage.go_update(); // 调用A页面的方法, 并将值传过去
+              // prevPage.go_update(); // 调用A页面的方法, 并将值传过去
+              prevPage.getAllData(); // 调用A页面的方法, 并将值传过去
+              
             }
           })
         }, 500)

+ 0 - 213
pages/myCoupon/myCoupon.js

@@ -1,213 +0,0 @@
-// pages/myCoupon/myCoupon.js
-var http = require("../../utils/http.js");
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    type: 1,
-    couponList: [],
-    unUseCount: 0,
-    useCount: 0,
-    expiredCount: 0,
-    pages: 0,
-    current: 1,
-    size: 10
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    this.couponCount()
-    this.loadMyCouponData(1)
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-    if (this.data.current < this.data.pages) {
-      this.loadOrderData(this.data.sts, this.data.current + 1);
-    }
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-    if (this.data.current < this.data.pages) {
-      this.setData({
-        current: this.data.current + 1
-      })
-      this.loadMyCouponData(this.data.type)
-    }
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  },
-
-  /**
-   * 获取我的优惠券列表
-   */
-  loadMyCouponData(type) {
-    // 我的优惠券状态(0:过期 1:可用 2:已用)
-    let status;
-    if (type == 1) {
-      status = 2
-    } else if (type == 0) {
-      status = 1
-    } else if (type == 2) {
-      status = 0
-    }
-    var params = {
-      url: "/p/myCoupon/getCouponList",
-      method: "GET",
-      data: {
-        status: status,
-        current: this.data.current,
-        size: this.data.size
-      },
-      callBack: (res) => {
-        let list = []
-        if (res.current == 1) {
-          list = res.records
-        } else {
-          list = this.data.couponList
-          list = list.concat(res.records)
-        }
-        this.setData({
-          couponList: list,
-          pages: res.pages
-        })
-
-        if (status == 0) {
-          // 已过期数量
-          this.setData({
-            expiredCount: res.total
-          });
-        } else if (status == 1) {
-          // 可用数量
-          this.setData({
-            unUseCount: res.total
-          });
-
-        } else if (status == 2) {
-          // 使用过总数量
-          this.setData({
-            useCount: res.total
-          });
-        }
-      }
-    };
-    http.request(params);
-  },
-
-  /**
-   *  标签切换事件
-   */
-  changeTab(e) {
-    this.setData({
-      current: 1,
-      type: e.currentTarget.dataset.type,
-      couponList: []
-    });
-    this.loadMyCouponData(this.data.type)
-  },
-
-  /**
-   *  获取各个状态下优惠券数量
-   */
-  couponCount() {
-    var ths = this
-    var params = {
-      url: "/p/myCoupon/getMyCouponsStatusCount",
-      method: "GET",
-      data: {},
-      callBack: function(res) {
-        ths.setData({
-          unUseCount: res.unUseCount,
-          expiredCount: res.expiredCount,
-          useCount: res.useCount,
-        })
-      }
-    }
-    http.request(params);
-  },
-
-  /**
-   * 删除优惠券
-   */
-  delCouponHandle(e) {
-    let couponUserId = e.currentTarget.dataset.couponuserid
-    let ths = this
-    wx.showModal({
-      title: '',
-      content: '确定要删除此优惠券吗?',
-      confirmColor: "#eb2444",
-      success(res) {
-        if (res.confirm) {
-          wx.showLoading();
-          let params = {
-            url: "/p/myCoupon/delCoupon/" + couponUserId,
-            method: "DELETE",
-            data: {},
-            callBack: function(res) {
-              wx.hideLoading();
-              ths.setData({
-                current: 1,
-                pages: 0
-              })
-              wx.showToast({
-                title: res,
-                duration: 1000
-              })
-              setTimeout(() => {
-                ths.loadMyCouponData(ths.data.type)
-              },1000)
-            }
-          }
-          http.request(params);
-        } else if (res.cancel) {
-          console.log('用户点击取消')
-        }
-      }
-    })
-  }
-})

+ 0 - 7
pages/myCoupon/myCoupon.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-    "coupon": "/components/coupon/coupon"
-  },
-  "navigationBarTitleText": "我的优惠券",
-  "onReachBottomDistance": 0
-}

+ 0 - 23
pages/myCoupon/myCoupon.wxml

@@ -1,23 +0,0 @@
-<!-- 我的优惠券 -->
-<view class="container">
-  <view class="h-tabs">
-    <view class="h-tab {{type==0?'on':''}}" data-type="0" bindtap='changeTab'>未使用({{unUseCount}})</view>
-    <view class="h-tab {{type==1?'on':''}}" data-type="1" bindtap='changeTab'>使用记录({{useCount}})</view>
-    <view class="h-tab {{type==2?'on':''}}" data-type="2" bindtap='changeTab'>已过期({{expiredCount}})</view>
-  </view>
-  <view class="coupons">
-    <block wx:for="{{couponList}}" wx:key="id">
-      <coupon bindlongtap="delCouponHandle" data-couponuserid="{{item.couponUserId}}" canUse="{{type == 0}}" item="{{item}}" type="{{type}}"></coupon>
-    </block>
-  </view>
-
-  <!-- <view class="empty" wx:if="{{!couponList.length}}">这里还没有任何东西~</view> -->
-  <!-- 空 -->
-  <view class="empty" wx:if="{{!couponList.length}}">
-    <view class="empty-icon">
-      <image src="../../images/icon/empty.png"></image>
-    </view>
-    <view class="empty-text">这里还没有相关优惠券~</view>
-  </view>
-
-</view>

+ 0 - 54
pages/myCoupon/myCoupon.wxss

@@ -1,54 +0,0 @@
-.h-tabs {
-  border-bottom: 1px solid #f2f2f2;
-  display: flex;
-  justify-content: space-around;
-  font-size: 14px;
-  position: fixed;
-  top: 0;
-  z-index: 1000;
-  width: 100%;
-  background: #fff;
-}
-
-.h-tab {
-  padding: 8px 0;
-}
-
-.h-tab.on {
-  border-bottom: 3px solid #006CE8;
-  font-weight: bold;
-}
-
-.coupons {
-  margin-top: 50px;
-  padding: 0 10px;
-}
-
-/* .empty {
-  text-align: center;
-  padding-top: 50rpx;
-  color: #999999;
-  font-size: 28rpx;
-} */
-/* 列表为空 */
-.empty {
-  margin-top: 200rpx;
-  text-align: cneter;
-}
-.empty-icon {
-  display: block;
-  width: 80rpx;
-  height: 80rpx;
-  margin: 0 auto;
-  margin-bottom: 20rpx;
-}
-.empty-icon > image {
-  width: 100%;
-  height: 100%;
-}
-.empty-text {
-  font-size: 28rpx;
-  text-align: center;
-  color: #999;
-  line-height: 2em;
-}

+ 0 - 643
pages/openAShop/openAShop.js

@@ -1,643 +0,0 @@
-// pages/openAShop/openAShop.js
-var http = require('../../utils/http.js');
-var config = require("../../utils/config.js");
-const util = require('../../utils/util.js');
-var index = [18, 0, 0];
-
-var t = 0;
-var show = false;
-var moveY = 200;
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    logoImg: {},
-    idcardFrontImg: {},
-    idcardBackImg: {},
-    bussLicenImg: {},
-    value: [0, 0, 0],
-    provArray: [],
-    cityArray: [],
-    areaArray: [],
-    province: "",
-    city: "",
-    area: "",
-    provinceId: 0,
-    cityId: 0,
-    areaId: 0,
-    latitude: '', //经度
-    longitude: '', //纬度
-    mapAddress: '', //地图定位详细地址
-    mapAddrName: '', //地图上的地址名称
-    shopNameValue: '', //店铺名字
-    shopDescribeValue: '', //店铺描述
-    shopAddrValue: '', //详细地址
-    shopOwnerValue: '', //店主姓名
-    shopOwnerPhoneValue: '', //店主联系电话
-    auditRemarks: ""
-  },
-
-  /**
-   * 请求接口传数据
-   */
-  submitApply: function() {
-    if (this.data.shopNameValue.trim().length < 2 || this.data.shopNameValue.trim().length > 10) {
-      wx.showToast({
-        title: '请输入正确的店铺名称',
-        icon: "none"
-      })
-    } else if (this.data.shopDescribeValue.trim().length < 10 || this.data.shopDescribeValue.trim().length > 200) {
-      wx.showToast({
-        title: '请输入正确店铺描述',
-        icon: "none"
-      })
-    } else if (!this.data.logoImg.path) {
-      wx.showToast({
-        title: '请上传店铺LOGO',
-        icon: "none"
-      })
-    } else if (this.data.shopAddrValue.trim().length < 5) {
-      wx.showToast({
-        title: '请输入正确的详细地址:不得少于5字',
-        icon: "none"
-      })
-    } else if (this.data.latitude == '') {
-      wx.showToast({
-        title: '请选择地理位置',
-        icon: "none"
-      })
-    } else if (this.data.shopOwnerPhoneValue.trim().length < 7) {
-      wx.showToast({
-        title: '请输入正确的联系电话',
-        icon: "none"
-      })
-    } else if (!this.data.bussLicenImg.path) {
-      wx.showToast({
-        title: '请上传营业执照',
-        icon: "none"
-      })
-    } else if (!this.data.idcardFrontImg.path || !this.data.idcardBackImg.path) {
-      wx.showToast({
-        title: '请上传身份证正反两面',
-        icon: "none"
-      })
-    } else {
-      wx.showLoading();
-      var params = {
-        url: "/p/shop/apply",
-        method: "POST",
-        data: {
-          "area": this.data.area,
-          "areaId": this.data.areaId,
-          "businessLicense": this.data.bussLicenImg.path,
-          "city": this.data.city,
-          "cityId": this.data.cityId,
-          "identityCardFront": this.data.idcardFrontImg.path,
-          "identityCardLater": this.data.idcardBackImg.path,
-          "intro": this.data.shopDescribeValue.trim(),
-          "province": this.data.province,
-          "provinceId": this.data.provinceId,
-          "shopAddress": this.data.shopAddrValue,
-          "shopLogo": this.data.logoImg.path,
-          "shopName": this.data.shopNameValue.trim(),
-          "shopPhotos": "",
-          "tel": this.data.shopOwnerPhoneValue.trim(),
-          "shopLat": this.data.latitude,
-          "shopLng": this.data.longitude,
-        },
-        callBack: function(res) {
-          wx.hideLoading();
-          wx.showModal({
-            title: '提交成功,等待审核',
-            content: '',
-            showCancel: false,
-            success: function() {
-              wx.switchTab({
-                url: '/pages/user/user',
-              })
-            }
-          })
-
-        }
-      }
-      http.request(params);
-    }
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    if (options.shopAuditStatus == -1) {
-      wx.showModal({
-        title: '提示',
-        content: '您的开店申请审核未通过,请您修改申请信息后再次提交开店申请',
-        success: (res) => {
-          if (res.confirm) {
-            console.log('用户点击确定')
-            wx.showLoading();
-            var params = {
-              url: "/p/shop",
-              method: "GET",
-              data: {},
-              callBack: (res) => {
-                wx.hideLoading();
-                this.setData({
-                  logoImg: {
-                    url: res.shopLogo,
-                    path: res.shopLogo.indexOf(config.picDomain) > -1 ? res.shopLogo.replace(config.picDomain,'') : res.shopLogo
-                  },
-                  idcardFrontImg: {
-                    url: res.identityCardFront,
-                    path: res.identityCardFront.indexOf(config.picDomain) > -1 ? res.identityCardFront.replace(config.picDomain,'') : res.identityCardFront
-                  },
-                  idcardBackImg: {
-                    url: res.identityCardLater,
-                    path: res.identityCardLater.indexOf(config.picDomain) > -1 ? res.identityCardLater.replace(config.picDomain,'') : res.identityCardLater
-                  },
-                  bussLicenImg: {
-                    url: res.businessLicense,
-                    path: res.businessLicense.indexOf(config.picDomain) > -1 ? res.businessLicense.replace(config.picDomain,'') : res.businessLicense
-                  },
-                  province: res.province,
-                  city: res.city,
-                  area: res.area,
-                  provinceId: res.provinceId,
-                  cityId: res.cityId,
-                  areaId: res.areaId,
-                  latitude: res.shopLat,
-                  longitude: res.shopLng,
-                  shopNameValue: res.shopName, //店铺名字
-                  shopDescribeValue: res.intro, //店铺描述
-                  shopAddrValue: res.shopAddress, //详细地址
-                  shopOwnerPhoneValue: res.tel
-                });
-                this.initCityData(this.data.provinceId, this.data.cityId, this.data.areaId);
-                this.getAuditMsg();
-              }
-            }
-          } else if (res.cancel) {
-            console.log('用户点击取消')
-            wx.switchTab({
-              url: '/pages/user/user',
-            })
-          }
-          http.request(params);
-        }
-      })
-    } else {
-      this.initCityData(this.data.provinceId, this.data.cityId, this.data.areaId);
-    }
-  },
-
-  getAuditMsg() {
-    http.request({
-      url: "/p/shop/shopAudit",
-      method: "GET",
-      data: {},
-      callBack: (res) => {
-        this.setData({
-          auditRemarks: res.remarks
-        });
-      }
-    });
-  },
-
-  /**
-   * 获取经纬度
-   */
-  chooseLocation: function(e) {
-    var that = this
-    wx.chooseLocation({
-      success: function (res) {
-        console.log('succes1')
-        console.log(res)
-        that.setMapData(res)
-      },
-      fail: function () {
-        wx.getSetting({
-          success(res) {
-            if (!res.authSetting['scope.userLocation']) {
-              console.log("f1")
-              wx.authorize({
-                scope: 'scope.userLocation',
-                success() {
-                  wx.chooseLocation({
-                    success: function (res) {
-                      that.setMapData(res)
-                    },
-                  })
-                  console.log('success2')
-                },
-                fail() {
-                  wx.showToast({
-                    title: '请在「右上角」 - 「关于」 - 「右上角」 - 「设置」授予获取位置信息的权限',
-                    icon: 'none'
-                  })
-                }
-              })
-            }
-          }
-        })
-      }
-    })
-  },
-  setMapData(res) {
-    var latitude = res.latitude
-    var longitude = res.longitude
-    var address = res.address
-    var name = res.name
-    console.log("经度:" + latitude, "纬度:" + longitude, "详细地址:" + address)
-    this.setData({
-      latitude: latitude,
-      longitude: longitude,
-      mapAddress: address,
-      mapAddrName: name
-    })
-  },
-  /**
-   * 获取input数据
-   */
-  bindShopNameInt: function(e) {
-    this.setData({
-      shopNameValue: e.detail.value
-    })
-  },
-  bindShopDescribeInt: function(e) {
-    this.setData({
-      shopDescribeValue: e.detail.value
-    })
-  },
-  bindShopAddrInt: function(e) {
-    this.setData({
-      shopAddrValue: e.detail.value
-    })
-  },
-  bindShopOwnerInt: function(e) {
-    this.setData({
-      shopOwnerValue: e.detail.value
-    })
-  },
-  bindShopOwnerPhoneInt: function(e) {
-    this.setData({
-      shopOwnerPhoneValue: e.detail.value
-    })
-  },
-
-
-  /**
-   * 上传图片
-   */
-  getUploadImg: function(e) {
-    const type = e.target.dataset.type
-
-    console.log(type);
-    var ths = this;
-    wx.chooseImage({
-      count: 1, // 默认9
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success: function(res) {
-        // 图片的本地临时文件路径列表
-        var tempFilePaths = res.tempFilePaths;
-        wx.showLoading({
-          mask: true
-        })
-        var params = {
-          url: "/p/file/upload",
-          filePath: tempFilePaths[0],
-          name: 'file',
-          callBack: function(res2) {
-            wx.hideLoading();
-            var img = {};
-            img.path = JSON.parse(res2).filePath;
-            img.url = JSON.parse(res2).resourcesUrl + JSON.parse(res2).filePath;
-            if (type == 'bussLicenImg') {
-              ths.setData({
-                bussLicenImg: img
-              })
-            } else if (type == 'logoImg') {
-              ths.setData({
-                logoImg: img
-              })
-            } else if (type == 'idcardFrontImg') {
-              ths.setData({
-                idcardFrontImg: img
-              })
-            } else if (type == 'idcardBackImg') {
-              ths.setData({
-                idcardBackImg: img
-              })
-            }
-          }
-        };
-        http.upload(params);
-      }
-    })
-  },
-
-  /**
-   * 删除图片
-   */
-  removeImage: function(e) {
-    const type = e.target.dataset.type
-    if (type == 'logoImg') {
-      this.setData({
-        logoImg: {}
-      });
-    } else if (type == 'idcardFrontImg') {
-      this.setData({
-        idcardFrontImg: {}
-      });
-    } else if (type == 'idcardBackImg') {
-      this.setData({
-        idcardBackImg: {}
-      });
-    } else if (type == 'bussLicenImg') {
-      this.setData({
-        bussLicenImg: {}
-      });
-    }
-    console.log('删除图片')
-  },
-
-
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-    // 底部弹框动画
-    this.animation = wx.createAnimation({
-      transformOrigin: "50% 50%",
-      duration: 0,
-      timingFunction: "ease",
-      delay: 0
-    })
-    this.animation.translateY(200 + 'vh').step();
-    this.setData({
-      animation: this.animation.export(),
-      show: show
-    })
-  },
-
-  /**
-   * 获取省市区
-   */
-  initCityData: function(provinceId, cityId, areaId) {
-    var ths = this;
-    wx.showLoading();
-    var params = {
-      url: "/p/area/listByPid",
-      method: "GET",
-      data: {
-        pid: 0
-      },
-      callBack: function(res) {
-        //console.log(res)
-        ths.setData({
-          provArray: res
-        });
-        if (provinceId) {
-          for (var index in res) {
-            if (res[index].areaId == provinceId) {
-              ths.setData({
-                value: [index, ths.data.value[1], ths.data.value[2]]
-              });
-            }
-          }
-        }
-        ths.getCityArray(provinceId ? provinceId : res[0].areaId, cityId, areaId);
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-
-
-  /**
-   * 滑动事件
-   */
-  bindChange: function(e) {
-    var ths = this;
-    var val = e.detail.value
-
-    //判断滑动的是第几个column
-    //若省份column做了滑动则定位到地级市和区县第一位
-    if (index[0] != val[0]) {
-      val[1] = 0;
-      val[2] = 0;
-      //更新数据
-      ths.getCityArray(this.data.provArray[val[0]].areaId); //获取地级市数据
-    } else { //若省份column未做滑动,地级市做了滑动则定位区县第一位
-      if (index[1] != val[1]) {
-        val[2] = 0;
-        //更新数据
-        ths.getAreaArray(this.data.cityArray[val[1]].areaId); //获取区县数据
-      } else {
-
-      }
-    }
-    index = val;
-    this.setData({
-      value: [val[0], val[1], val[2]],
-    })
-    ths.setData({
-      province: ths.data.provArray[ths.data.value[0]].areaName,
-      city: ths.data.cityArray[ths.data.value[1]].areaName,
-      area: ths.data.areaArray[ths.data.value[2]].areaName,
-      provinceId: ths.data.provArray[ths.data.value[0]].areaId,
-      cityId: ths.data.cityArray[ths.data.value[1]].areaId,
-      areaId: ths.data.areaArray[ths.data.value[2]].areaId
-    })
-  },
-
-
-  /**
-   * 根据省份ID获取 城市数据
-   */
-  getCityArray: function(provinceId, cityId, areaId) {
-    var ths = this;
-    var params = {
-      url: "/p/area/listByPid",
-      method: "GET",
-      data: {
-        pid: provinceId
-      },
-      callBack: function(res) {
-        //console.log(res)
-        ths.setData({
-          cityArray: res
-        });
-        if (cityId) {
-          for (var index in res) {
-            if (res[index].areaId == cityId) {
-              ths.setData({
-                value: [ths.data.value[0], index, ths.data.value[2]]
-              });
-            }
-          }
-        }
-        ths.getAreaArray(cityId ? cityId : res[0].areaId, areaId);
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-
-  /**
-   * 根据城市ID获取 区数据
-   */
-  getAreaArray: function(cityId, areaId) {
-    var ths = this;
-    var params = {
-      url: "/p/area/listByPid",
-      method: "GET",
-      data: {
-        pid: cityId
-      },
-      callBack: function(res) {
-        //console.log(res)
-        ths.setData({
-          areaArray: res
-        });
-        if (areaId) {
-
-          for (var _index in res) {
-            if (res[_index].areaId == areaId) {
-              ths.setData({
-                value: [ths.data.value[0], ths.data.value[1], _index]
-              });
-            }
-          }
-
-          index = ths.data.value;
-
-          ths.setData({
-            province: ths.data.province,
-            city: ths.data.city,
-            area: ths.data.area,
-            provinceId: ths.data.provinceId,
-            cityId: ths.data.cityId,
-            areaId: ths.data.areaId
-          })
-
-        } else {
-          ths.setData({
-            province: ths.data.provArray[ths.data.value[0]].areaName,
-            city: ths.data.cityArray[ths.data.value[1]].areaName,
-            area: ths.data.areaArray[ths.data.value[2]].areaName,
-            provinceId: ths.data.provArray[ths.data.value[0]].areaId,
-            cityId: ths.data.cityArray[ths.data.value[1]].areaId,
-            areaId: ths.data.areaArray[ths.data.value[2]].areaId
-          })
-        }
-
-        wx.hideLoading();
-      }
-    }
-    http.request(params);
-  },
-
-
-  /**
-   * 移动按钮点击事件
-   */
-  translate: function(e) {
-    if (t == 0) {
-      moveY = 0;
-      show = false;
-      t = 1;
-    } else {
-      moveY = 200;
-      show = true;
-      t = 0;
-    }
-    this.setData({
-      show: true
-    });
-    // this.animation.translate(arr[0], arr[1]).step();
-    this.animationEvents(this, moveY, show);
-
-  },
-
-
-  /**
-   * 隐藏弹窗浮层
-   */
-  hiddenFloatView(e) {
-    //console.log(e);
-    moveY = 200;
-    show = true;
-    t = 0;
-    this.animationEvents(this, moveY, show);
-
-  },
-
-
-  /**
-   * 动画事件
-   */
-  animationEvents: function(that, moveY, show) {
-    //console.log("moveY:" + moveY + "\nshow:" + show);
-    that.animation = wx.createAnimation({
-      transformOrigin: "50% 50%",
-      duration: 400,
-      timingFunction: "ease",
-      delay: 0
-    })
-    that.animation.translateY(moveY + 'vh').step()
-
-    that.setData({
-      animation: that.animation.export()
-    })
-
-  },
-
-
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  }
-})

+ 0 - 4
pages/openAShop/openAShop.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText": "申请开店"
-}

+ 0 - 186
pages/openAShop/openAShop.wxml

@@ -1,186 +0,0 @@
-<!-- 申请开店 -->
-<!--pages/openAShop/openAShop.wxml-->
-
-<view class="apple-for-ashop">
-  <view wx:if="{{auditRemarks}}" class="audit-remark">审核失败:{{auditRemarks}}</view>
-  <!-- 店铺信息 -->
-  <form class="msg-box">
-    <view class="msg-tit">
-      <view class="shop-icon">
-        <image src="../../images/icon/shop-icon.png"></image>
-      </view>
-      <view class="shop-msg-tit">店铺信息</view>
-    </view>
-    <!-- 店铺名称 -->
-    <view class="msg-cont-box">
-      <label class="cont-txt">
-        <text class="red">*</text>店铺名称</label>
-      <input type="text" class="cont-int" bindinput="bindShopNameInt" value="{{shopNameValue}}" maxlength="10" placeholder="输入店铺名称,2-10字"></input>
-    </view>
-
-    <!-- 店铺描述 -->
-    <view class="msg-cont-box">
-      <label class="cont-txt align-top">
-        <text class="red">*</text>店铺描述</label>
-      <textarea type="text" bindinput="bindShopDescribeInt" value="{{shopDescribeValue}}" class="cont-int cont-textarea" maxlength="200" placeholder="填写店铺描述,10-200字"></textarea>
-    </view>
-    <!-- logo -->
-    <view class="msg-cont-box">
-      <label class="cont-txt">
-        <text class="red">*</text>店铺Logo</label>
-      <!-- 上传文件 -->
-      <view class="upload-files align-top">
-        <view class="upload-tips">上传店铺Logo</view>
-        <!-- 预览图片 -->
-        <view class="preview-img-box preview-logo" wx:if="{{logoImg.url}}">
-          <image class="preview-img" src="{{logoImg.url}}" mode="aspectFill" data-idx="{{idx}}"></image>
-          <!-- 删除 -->
-          <image bindtap="removeImage" class="preview-img-del" data-type="logoImg" src="../../images/icon/close2.png"></image>
-        </view>
-        <!-- 上传 -->
-        <view class="upload-icon upload-logo" wx:if="{{!logoImg.url}}" bindtap="getUploadImg" data-type="logoImg">+</view>
-      </view>
-      <!-- 上传文件end -->
-    </view>
-
-    <!-- 店铺地址 -->
-    <view class="msg-cont-box addr" bindtap="translate">
-      <label class="cont-txt">
-        <text class="red">*</text>所在地区</label>
-      <!-- 展示 -->
-      <view class="pca">{{province}} {{city}} {{area}}</view>
-      <!-- <view class="pca">广东省 广州市 番禺区</view> -->
-      <view class='arrow'>
-        <image src='../../images/icon/more.png'></image>
-      </view>
-      <!-- 弹框 -->
-      <view class="animation-element-wrapper" animation="{{animation}}" style="visibility:{{show ? 'visible':'hidden'}}" catchtap="hiddenFloatView">
-        <view class="animation-element" catchtap="nono">
-          <text class="right-bt" catchtap="hiddenFloatView">确定</text>
-          <view class="line"></view>
-          <picker-view indicator-style="height: 50rpx;" value="{{value}}" bindchange="bindChange" catchtap="nono">
-            <!--省-->
-            <picker-view-column>
-              <view wx:for="{{provArray}}" wx:key="index">
-                {{item.areaName}}
-              </view>
-            </picker-view-column>
-            <!--地级市-->
-            <picker-view-column>
-              <view wx:for="{{cityArray}}" wx:key="index">
-                {{item.areaName}}
-              </view>
-            </picker-view-column>
-            <!--区县-->
-            <picker-view-column>
-              <view wx:for="{{areaArray}}" wx:key="index">
-                {{item.areaName}}
-              </view>
-            </picker-view-column>
-          </picker-view>
-        </view>
-      </view>
-
-    </view>
-
-    <!-- 详细地址 -->
-    <view class="msg-cont-box">
-      <label class="cont-txt">
-        <text class="red">*</text>详细地址</label>
-      <input type="text" bindinput="bindShopAddrInt" value="{{shopAddrValue}}" class="cont-int" placeholder="请手动填写详细地址,不得少于5字"></input>
-    </view>
-
-    <!-- 经纬度(调用微信地图获取) -->
-    <view class="msg-cont-box wx-map clearfix">
-      <view class="cont-txt ">
-        <text class="red">*</text>地理位置</view>
-      <!-- <view class="show-location" wx:if="{{latitude}}">{{'纬度:' + latitude + ' 经度:' + longitude}}</view> -->
-      <view class="show-location" wx:if="{{latitude}}">
-        <view>{{ mapAddress}}</view>
-      </view>
-      <view class="map" bindtap="chooseLocation">点击获取位置</view>
-    </view>
-
-    <!-- 店铺联系电话 -->
-    <view class="msg-cont-box">
-      <text class="cont-txt" space="emsp"><text class="red">*</text>店铺电话</text>
-      <input type="text" bindinput="bindShopOwnerPhoneInt" value="{{shopOwnerPhoneValue}}" class="cont-int" placeholder="请填写店铺联系电话"></input>
-    </view>
-
-    <!-- 店铺营业执照(选填) -->
-    <view class="msg-cont-box">
-      <label class="cont-txt"><text class="red">*</text>营业执照</label>
-      <view class="upload-files">
-        <view class="upload-tips">上传营业执照</view>
-        <!-- 预览图片 -->
-        <view class="preview-img-box" wx:if="{{bussLicenImg.url}}">
-          <image class="preview-img" src="{{bussLicenImg.url}}" mode="aspectFill"></image>
-          <!-- 删除 -->
-          <image bindtap="removeImage" class="preview-img-del" data-type="bussLicenImg" src="../../images/icon/close2.png"></image>
-        </view>
-        <!-- 上传 -->
-        <view class="upload-icon" wx:if="{{!bussLicenImg.url}}" bindtap="getUploadImg" data-type="bussLicenImg">+</view>
-      </view>
-    </view>
-
-    <!-- 申请人身份证正反面 -->
-    <view class="msg-cont-box">
-      <text class="cont-txt" space="emsp"><text class="red">*</text>身份证件</text>
-      <view class="upload-files">
-        <view class="upload-tips">上传身份证正反两面</view>
-        <!-- 正面预览图片 -->
-        <view class="card-upload">
-          <view class="preview-img-box" wx:if="{{idcardFrontImg.url}}">
-            <image class="preview-img" src="{{idcardFrontImg.url}}" mode="aspectFill" data-idx="{{idx}}"></image>
-            <!-- 删除 -->
-            <image bindtap="removeImage" class="preview-img-del" data-type="idcardFrontImg" src="../../images/icon/close2.png"></image>
-          </view>
-          <!-- 上传 -->
-          <view class="upload-icon" wx:if="{{!idcardFrontImg.url}}" bindtap="getUploadImg" data-type="idcardFrontImg">+</view>
-          <view class="card-txt">正面</view>
-        </view>
-
-        <!-- 反面预览图片 -->
-        <view class="card-upload">
-          <view class="preview-img-box" wx:if="{{idcardBackImg.url}}">
-            <image class="preview-img" src="{{idcardBackImg.url}}" mode="aspectFill" data-idx="{{idx}}"></image>
-            <!-- 删除 -->
-            <image bindtap="removeImage" class="preview-img-del" data-type="idcardBackImg" src="../../images/icon/close2.png"></image>
-          </view>
-          <!-- 上传 -->
-          <view class="upload-icon" wx:if="{{!idcardBackImg.url}}" bindtap="getUploadImg" data-type="idcardBackImg">+</view>
-          <view class="card-txt">反面</view>
-        </view>
-
-      </view>
-    </view>
-
-  </form>
-
-
-  <!-- 申请人信息 -->
-  <!-- <form class="msg-box">
-    <view class="msg-tit">
-      <view class="shop-icon"><image src="../../images/icon/user-icon.png"></image></view>
-      <view class="shop-msg-tit">店主信息</view>
-    </view>
-    <!-- 申请人姓名 -->
-  <!-- <view class="msg-cont-box">
-      <text class="cont-txt"space="emsp"><text class="red">*</text>姓  名</text>
-      <input type="text" bindinput="bindShopOwnerInt" class="cont-int" placeholder="请填写申请人姓名"></input>
-    </view> -->
-
-  <!-- </form> -->
-
-
-
-  <!-- 提交申请 -->
-  <view class="apply-btn">
-    <view class="btn" bindtap="submitApply">
-      提交申请
-    </view>
-    <view class="foot-tips">
-      <text class="red">*</text>为必填信息。申请人必须保证以上所填信息的真实性。如有虚假信息,因此而产生的所有后果均由申请人承担。</view>
-  </view>
-
-</view>

+ 0 - 258
pages/openAShop/openAShop.wxss

@@ -1,258 +0,0 @@
-/* pages/openAShop/openAShop.wxss */
-image {
-  width: 100%;
-  height: 100%;
-}
-.red {
-  color: red;
-}
-
-.apple-for-ashop {
-  background: #f7f7f7;
-  width: 100%;
-  height: 100%;
-  overflow: auto;
-}
-.msg-box {
-  display: block;
-  background: #fff;
-  margin-bottom: 15rpx;
-  width: 100%;
-  height: 100%;
-}
-.msg-tit {
-  padding: 20rpx;
-  border-bottom: 1rpx solid #f2f2f2;
-}
-.shop-icon {
-  display: inline-block;
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 15rpx;
-  vertical-align: middle;
-}
-.shop-icon > image {
-  display: block;
-  width: 100%;
-  height: 100%;
-}
-.shop-msg-tit {
-  display: inline-block;
-  font-size: 32rpx;
-  font-weight: bold;
-  vertical-align: middle;
-}
-.msg-cont-box {
-  font-size: 30rpx;
-  padding: 25rpx 0;
-  margin: 0 20rpx;
-  border-bottom: 1rpx solid #f2f2f2;
-}
-.cont-txt {
-  display: inline-block;
-  margin-right: 50rpx;
-  vertical-align: middle;
-}
-.cont-int {
-  display: inline-block;
-  vertical-align: middle;
-  width: 70%;
-}
-.align-top {
-  vertical-align: top;
-}
-.cont-textarea {
-  box-sizing: border-box;
-  vertical-align: top;
-  line-height: 1.5em;
-  border: 1rpx solid #ececec;
-  border-radius: 8rpx;
-  padding: 10rpx 15rpx;
-}
-
-/* 地址 */
-.addr {
-  position: relative;
-}
-.pca {
-  display: inline-block;
-  width: 70%;
-  /* padding: 0 20rpx; */
-  vertical-align: middle;
-}
-.arrow {
-  position: absolute;
-  right: 20rpx;
-  top: 50%;
-  transform: translateY(-50%);
-  width: 25rpx;
-  height: 25rpx;
-}
-.arrow image {
-  width: 100%;
-  height: 100%;
-  vertical-align: top;
-}
-.animation-element-wrapper {
-  display: flex;
-  position: fixed;
-  left: 0;
-  top: 0;
-  height: 100%;
-  width: 100%;
-  background-color: rgba(0, 0, 0, 0.6);
-  z-index: 999;
-}
-.animation-element {
-  display: flex;
-  position: fixed;
-  width: 100%;
-  height: 470rpx;
-  bottom: 0;
-  background-color: rgba(255, 255, 255, 1);
-}
-.right-bt {
-  right: 20rpx;
-  top: 20rpx;
-  position: absolute;
-  width: 80rpx !important;
-}
-.line {
-  display: block;
-  position: fixed;
-  height: 2rpx;
-  width: 100%;
-  margin-top: 89rpx;
-  background-color: #eee;
-}
-picker-view {
-  background-color: white;
-  padding: 0;
-  width: 100%;
-  height: 380rpx;
-  bottom: 0;
-  position: fixed;
-}
-picker-view-column view {
-  vertical-align: middle;
-  font-size: 28rpx;
-  line-height: 28rpx;
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-
-/* 经纬度 */
-.show-location {
-  display: inline-block;
-  vertical-align: middle;
-  font-size: 30rpx;
-  line-height: 1.5em;
-  width: 45%;
-}
-.map {
-  float: right;
-  color:#ffffff;
-  background: #e43130;
-  font-size: 25rpx;
-  line-height: 1em;
-  padding: 18rpx 15rpx 20rpx 15rpx;
-  border-radius: 8rpx;
-  /* margin-right: 20rpx; */
-  vertical-align: middle;
-}
-/* 清除浮动 */
-.clearfix::after {
-  display: block;
-  height: 0;
-  overflow: hidden;
-  content: '';
-  clear: both;
-}
-
-
-/* 上传 */
-.upload-files {
-  display: inline-block;
-  vertical-align: top;
-}
-.upload-tips {
-  font-size: 26rpx;
-  color: #888888;
-  line-height: 2em;
-  margin-bottom: 15rpx;
-}
-/* 预览 */
-.preview-img-box {
-  position: relative;
-  width: 120rpx;
-  height: 120rpx;
-  display: inline-block;
-  margin-bottom: 15rpx;
-  background: #eee;
-}
-.preview-logo{
-  width: 120rpx;
-  height: 120rpx;
-}
-image.preview-img {
-  width: 100%;
-  height: 100%;
-}
-.preview-img-del {
-  position: absolute;
-  top: -5rpx;
-  right: -5rpx;
-  width: 28rpx;
-  height: 28rpx;
-}
-.card-upload {
-  display: inline-block;
-  margin-right: 50rpx;
-}
-.card-txt {
-  font-size: 24rpx;
-  text-align: center;
-  color: #777;
-}
-.upload-icon {
-  display: inline-block;
-  width: 120rpx;
-  height: 120rpx;
-  line-height: 110rpx;
-  text-align: center;
-  border: 1rpx solid #e0e0e0;
-  vertical-align: top;
-  font-size: 90rpx;
-  color: #ddd;
-  margin-bottom: 15rpx;
-}
-
-/* 提交申请 */
-.apply-btn {
-  padding: 100rpx 30rpx 150rpx 30rpx;
-}
-.btn {
-  font-size: 30rpx;
-  text-align: center;
-  background: #e43130;
-  padding-top: 20rpx;
-  padding-bottom: 20rpx;
-  color: #fff;
-  border-radius: 8rpx;
-}
-.foot-tips {
-  font-size: 28rpx;
-  color: #aaa;
-  /* padding: 0 20rpx; */
-  line-height: 1.5em;
-  margin-top: 20rpx;
-}
-.audit-remark{
-  font-size: 26rpx;
-  background: #ffffcd;
-  color:#333;
-  padding:20rpx;
-}

+ 79 - 9
pages/prod/prod.js

@@ -11,6 +11,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    active:0,
+    opacity:0,
     tab:0,
     list:[],//相似商品和一起买
     shopId: 1,
@@ -209,6 +211,47 @@ Page({
     }else{
       this.getOften()
     }
+  },
+
+  handleFixed(e){
+    let active = e.currentTarget.dataset.active
+    if(active == this.data.active) return
+    const query = wx.createSelectorQuery().in(this);
+    if(active == 0){
+      wx.pageScrollTo({
+        scrollTop:0
+      })
+    }else if(active == 1){
+      query.select('.container .content .cmt-wrap').boundingClientRect(rect => { 
+        if (!rect) return; // 容错:元素未找到时直接返回
+        wx.pageScrollTo({
+          scrollTop:rect.top - 20
+        })
+      }).exec()
+    }else if(active == 2){
+      query.select('.container .content .prod-detail').boundingClientRect(rect => { 
+        if (!rect) return; // 容错:元素未找到时直接返回
+        wx.pageScrollTo({
+          scrollTop:rect.top - 20
+        })
+      }).exec()
+
+    }else if(active == 3){
+      query.select('.container .content .prod-content').boundingClientRect(rect => { 
+        if (!rect) return; // 容错:元素未找到时直接返回
+        wx.pageScrollTo({
+          scrollTop:rect.top - 20
+        })
+      }).exec()
+
+
+    }
+    this.setData({
+      active
+    })
+
+   
+
   },
   /**
    * 分销绑定用户
@@ -381,19 +424,19 @@ Page({
           this.getVideoInfo()
         }
         // 团购商品
-        if (res.prodType === 1) {
-          this.setData({
-            groupActivityId: res.activityId
-          });
-          this.getGroupActivity();
-          this.getJoinGroupList();
-        }
+        // if (res.prodType === 1) {
+        //   this.setData({
+        //     groupActivityId: res.activityId
+        //   });
+        //   this.getGroupActivity();
+        //   this.getJoinGroupList();
+        // }
         // 获取优惠券
-        this.getCouponList();
+        // this.getCouponList();
         // 组装sku
         res.skuList&&this.groupSkuProp(res.skuList);
 
-        this.getShopInfo();
+        // this.getShopInfo();
 
         wx.hideLoading();
       },
@@ -1454,6 +1497,33 @@ Page({
         showBacktop: false
       })
     }
+
+    if(e.scrollTop > 400){
+      let active = 1
+      if(e.scrollTop<659){
+        active = 1
+      }else if(e.scrollTop>659){
+        active = 2
+      }
+      this.setData({
+        opacity:1,
+        active
+      })
+    }else {
+      let opacity = 1
+
+      if(e.scrollTop < 400&&e.scrollTop > 300){
+        opacity = .6
+      }else if(e.scrollTop < 300&&e.scrollTop > 100){
+        opacity = .4
+      }else{
+        opacity = 0
+      }
+      this.setData({
+        opacity,
+        active:0
+      })
+    }
   },
 
   closeEarn: function () {

+ 1 - 0
pages/prod/prod.json

@@ -3,4 +3,5 @@
    "comm-star": "/components/commStar/commStar"
   },
   "navigationBarTitleText": "商品详情"
+  
 }

+ 6 - 0
pages/prod/prod.wxml

@@ -1,5 +1,11 @@
 <!-- 商品详情 -->
 <view class="container ">
+  <view class="fixed-box" style="opacity: {{opacity}};">
+    <view class="fixed-item {{active == 0?'active':''}}" data-active="0" catch:tap="handleFixed">商品</view>
+    <view class="fixed-item {{active == 1?'active':''}}" data-active="1" catch:tap="handleFixed">评价</view>
+    <view class="fixed-item {{active == 2?'active':''}}" data-active="2" catch:tap="handleFixed">详情</view>
+    <view class="fixed-item {{active == 3?'active':''}}" data-active="3" catch:tap="handleFixed">推荐</view>
+  </view>
   <!-- 轮播图 -->
   <view class="swiper-con">
     <view class="video-container" wx:if="{{video && isPlaying}}">

+ 34 - 0
pages/prod/prod.wxss

@@ -2,6 +2,40 @@ page {
   background: #f4f4f4;
   height: 100%;
 }
+.fixed-box{
+  display: flex;
+  justify-content: space-between;
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  padding: 16rpx 24rpx;
+  box-sizing: border-box;
+  z-index: 9;
+}
+
+.fixed-box .fixed-item{
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #AAAAAA;
+}
+.fixed-box .fixed-item.active{
+  color: #222222;
+  position: relative;
+}
+.fixed-box .fixed-item.active::after{
+  display: block;
+  content: '';
+  position: absolute;
+  bottom: -12rpx;
+  left: calc(50% - 20rpx);
+  width: 40rpx;
+  height: 8rpx;
+  background: #006CE8;
+  border-radius: 6rpx 6rpx 6rpx 6rpx;
+
+}
 
 image {
   width: 100%;

+ 0 - 121
pages/recent-news/recent-news.js

@@ -1,121 +0,0 @@
-// pages/recent-news/recent-news.js
-var http = require("../../utils/http.js");
-var config = require("../../utils/config.js");
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    news: [],
-    distNews: [] // 分销公告
-  },
-
-
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-    console.log(options)
-    this.setData({
-      isDist: options.isDist
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-    var ths = this;
-    if (this.data.isDist == 'true') {
-      // 加载分销的公告
-      var params = {
-        url: "/p/distribution/msg/page",
-        method: "GET",
-        data: {},
-        callBack: function(res) {
-          console.log(res);
-          ths.setData({
-            distNews: res.records,
-          });
-        }
-      };
-      http.request(params);
-    } else {
-      //加载普通公告
-      var params = {
-        url: "/shop/notice/noticeList/0",
-        method: "GET",
-        data: {},
-        callBack: function(res) {
-          // console.log(res);
-          ths.setData({
-            news: res.records,
-          });
-        }
-      };
-      http.request(params);
-    }
-
-  },
-
-  // 跳转公告详情页
-  toNewsDetail: function(e) {
-    console.log(e)
-    var id = e.currentTarget.dataset.id
-    var type = e.currentTarget.dataset.type
-    if (type == 'dist') {
-      wx.navigateTo({
-        url: '/pages/news-detail/news-detail?id=' + e.currentTarget.dataset.id + '&type=' + type,
-      })
-    } else {
-      wx.navigateTo({
-        url: '/pages/news-detail/news-detail?id=' + e.currentTarget.dataset.id,
-      })
-    }
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  }
-})

+ 0 - 4
pages/recent-news/recent-news.json

@@ -1,4 +0,0 @@
-{
-  "backgroundTextStyle": "light",
-  "navigationBarTitleText": "最新公告"
-}

+ 0 - 23
pages/recent-news/recent-news.wxml

@@ -1,23 +0,0 @@
-<!--pages/recent-news/recent-news.wxml-->
-<view class='container'>
-  <view class='recent-news'>
-
-    <block wx:for='{{distNews}}' wx:key='index'>
-      <view class='news-item' bindtap='toNewsDetail' data-id="{{item.msgId}}" data-type="dist">
-        <view class='news-item-title'>{{item.msgTitle}}</view>
-        <view class='news-item-date'>
-          {{item.startTime}}
-        </view>
-      </view>
-    </block>
-
-    <block wx:for='{{news}}' wx:key='index'>
-      <view class='news-item' bindtap='toNewsDetail' data-id="{{item.id}}">
-        <view class='news-item-title'>{{item.title}}</view>
-        <view class='news-item-date'>
-          {{item.publishTime}}
-        </view>
-      </view>
-    </block>
-  </view>
-</view>

+ 0 - 33
pages/recent-news/recent-news.wxss

@@ -1,33 +0,0 @@
-/* pages/recent-news/recent-news.wxss */
-
-.recent-news {
-  background: #fff;
-}
-
-.recent-news .news-item {
-  padding: 20rpx 20rpx 0 20rpx;
-  position: relative;
-}
-
-.recent-news .news-item::after {
-  content: " ";
-  width: 100%;
-  height: 2rpx;
-  background-color: #e1e1e1;
-  left: 20rpx;
-  display: block;
-  position: absolute;
-}
-
-.recent-news .news-item .news-item-title {
-  font-size: 28rpx;
-  text-align: left;
-}
-
-.recent-news .news-item .news-item-date {
-  font-size: 24rpx;
-  color: #999;
-  text-align: right;
-  margin-top: 10rpx;
-  margin-bottom: 20rpx;
-}

+ 0 - 21
pages/user/user.js

@@ -382,27 +382,6 @@ Page({
     })
   },
 
-  /**
-   * 跳转到申请开店
-   */
-  applyAShop: function() {
-    if (!this.data.isAuthInfo) {
-      wx.navigateTo({
-        url: '/pages/login/login',
-      })
-      return
-    }
-    if (this.data.shopAuditStatus == 0) {
-      wx.showToast({
-        title: '开店申请审核中',
-        icon: "none"
-      })
-    } else {
-      wx.navigateTo({
-        url: '/pages/openAShop/openAShop?shopAuditStatus=' + this.data.shopAuditStatus,
-      })
-    }
-  },
 
 
   /**

+ 2 - 1
utils/config.js

@@ -4,7 +4,8 @@
 
 var domain = "https://shop.api.zswlgz.com"; //统一接口域名,测试环境 
 var wsDomain = "wss://shop-h5.dev.zswllife.cn/api"; //统一接口域名,测试环境 
-// var domain = "http://47.109.84.152:8112"; //统一接口域名,正式环境 
+var domain = "http://47.109.84.152:8112"; //统一接口域名,正式环境 
+// https://5d2f568f.r36.cpolar.top
 // var wsDomain = "wss://shop.haimamart.com/api"; //统一接口域名,正式环境 
 
 // var domain = "http://192.168.1.206:8112"; //统一接口域名,测试环境

+ 1 - 1
utils/http.js

@@ -22,7 +22,7 @@ function request(params, isGetTonken) {
     dataType: 'json',
     responseType: params.responseType == undefined ? 'text' : params.responseType,
     success: function (res) {
-      console.log(`接口地址${config.domain + params.url}:成功返回`,res);
+      // console.log(`接口地址${config.domain + params.url}:成功返回`,res);
       if (res.statusCode == 200) {
         //如果有定义了params.callBack,则调用 params.callBack(res.data)
         if (params.callBack) {