Przeglądaj źródła

图片裁剪完成

allen 2 lat temu
rodzic
commit
f2a15f39dc

+ 2 - 1
app.json

@@ -46,7 +46,8 @@
     "pages/fund/withdrawAccount",
     "pages/fund/withdrawApply",
     "pages/fund/withdrawAccountEdit",
-    "pages/fund/addWithdrawApply"
+    "pages/fund/addWithdrawApply",
+    "pages/image/resize"
   ],
   "window": {
     "backgroundTextStyle": "light",

Plik diff jest za duży
+ 1118 - 0
image-cropper/image-cropper.js


+ 3 - 0
image-cropper/image-cropper.json

@@ -0,0 +1,3 @@
+{
+	"component": true
+}

+ 24 - 0
image-cropper/image-cropper.wxml

@@ -0,0 +1,24 @@
+<view class='image-cropper' catchtouchmove='_preventTouchMove'>
+    <view class='main' bindtouchend="_cutTouchEnd" bindtouchstart="_cutTouchStart" bindtouchmove="_cutTouchMove" bindtap="_click">
+        <view class='content'>
+            <view class='content_top bg_gray {{_flag_bright?"":"bg_black"}}' style="height:{{cut_top}}px;transition-property:{{_cut_animation?'':'background'}}"></view>
+            <view class='content_middle' style="height:{{height}}px;">
+                <view class='content_middle_left bg_gray {{_flag_bright?"":"bg_black"}}' style="width:{{cut_left}}px;transition-property:{{_cut_animation?'':'background'}}"></view>
+                <view class='content_middle_middle' style="width:{{width}}px;height:{{height}}px;transition-duration: .3s;transition-property:{{_cut_animation?'':'background'}};">
+                    <view class="border border-top-left"></view>
+                    <view class="border border-top-right"></view>
+                    <view class="border border-right-top"></view>
+                    <view class="border border-right-bottom"></view>
+                    <view class="border border-bottom-right"></view>
+                    <view class="border border-bottom-left"></view>
+                    <view class="border border-left-bottom"></view>
+                    <view class="border border-left-top"></view>
+                </view>
+                <view class='content_middle_right bg_gray {{_flag_bright?"":"bg_black"}}' style="transition-property:{{_cut_animation?'':'background'}}"></view>
+            </view>
+            <view class='content_bottom bg_gray {{_flag_bright?"":"bg_black"}}' style="transition-property:{{_cut_animation?'':'background'}}"></view>
+        </view>
+        <image bindload="imageLoad" bindtouchstart="_start" bindtouchmove="_move" bindtouchend="_end" style="width:{{img_width ? img_width + 'px' : 'auto'}};height:{{img_height ? img_height + 'px' : 'auto'}};transform:translate3d({{_img_left-img_width/2}}px,{{_img_top-img_height/2}}px,0) scale({{scale}}) rotate({{angle}}deg);transition-duration:{{_cut_animation?.4:0}}s;" class='img' src='{{imgSrc}}'></image>
+    </view>
+    <canvas canvas-id='image-cropper' disable-scroll="true" style="width:{{_canvas_width * export_scale}}px;height:{{_canvas_height * export_scale}}px;left:{{canvas_left}}px;top:{{canvas_top}}px" class='image-cropper-canvas'></canvas>
+</view>

+ 143 - 0
image-cropper/image-cropper.wxss

@@ -0,0 +1,143 @@
+.image-cropper {
+    background: rgba(14, 13, 13, .8);
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100vw;
+    height: 100vh;
+    z-index: 1;
+}
+
+.image-cropper .main {
+    position: absolute;
+    width: 100vw;
+    height: 100vh;
+    overflow: hidden;
+}
+
+.image-cropper .content {
+    z-index: 9;
+    position: absolute;
+    width: 100vw;
+    height: 100vh;
+    display: flex;
+    flex-direction: column;
+    pointer-events: none;
+}
+
+.image-cropper .bg_black {
+    background: rgba(0, 0, 0, 0.8) !important;
+}
+
+.image-cropper .bg_gray {
+    background: rgba(0, 0, 0, 0.45);
+    transition-duration: .35s;
+}
+
+.image-cropper .content>.content_top {
+    pointer-events: none;
+}
+
+.image-cropper .content>.content_middle {
+    display: flex;
+    height: 200px;
+    width: 100%;
+}
+
+.image-cropper .content_middle_middle {
+    width: 200px;
+    box-sizing: border-box;
+    position: relative;
+    transition-duration: .3s;
+}
+
+.image-cropper .content_middle_right {
+    flex: auto;
+}
+
+.image-cropper .content>.content_bottom {
+    flex: auto;
+}
+
+.image-cropper .img {
+    z-index: 2;
+    top: 0;
+    left: 0;
+    position: absolute;
+    border: none;
+    width: 100%;
+    backface-visibility: hidden;
+    transform-origin: center;
+}
+
+.image-cropper .image-cropper-canvas {
+    position: fixed;
+    background: white;
+    width: 150px;
+    height: 150px;
+    z-index: 10;
+    top: -200%;
+    pointer-events: none;
+}
+
+.image-cropper .border {
+    background: white;
+    pointer-events: auto;
+    position: absolute;
+}
+
+.image-cropper .border-top-left {
+    left: -2.5px;
+    top: -2.5px;
+    height: 2.5px;
+    width: 33rpx;
+}
+
+.image-cropper .border-top-right {
+    right: -2.5px;
+    top: -2.5px;
+    height: 2.5px;
+    width: 33rpx;
+}
+
+.image-cropper .border-right-top {
+    top: -1px;
+    width: 2.5px;
+    height: 30rpx;
+    right: -2.5px;
+}
+
+.image-cropper .border-right-bottom {
+    width: 2.5px;
+    height: 30rpx;
+    right: -2.5px;
+    bottom: -1px;
+}
+
+.image-cropper .border-bottom-left {
+    height: 2.5px;
+    width: 33rpx;
+    bottom: -2.5px;
+    left: -2.5px;
+}
+
+.image-cropper .border-bottom-right {
+    height: 2.5px;
+    width: 33rpx;
+    bottom: -2.5px;
+    right: -2.5px;
+}
+
+.image-cropper .border-left-top {
+    top: -1px;
+    width: 2.5px;
+    height: 30rpx;
+    left: -2.5px;
+}
+
+.image-cropper .border-left-bottom {
+    width: 2.5px;
+    height: 30rpx;
+    left: -2.5px;
+    bottom: -1px;
+}

+ 41 - 4
pages/goods/edit.js

@@ -40,13 +40,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function(options) {
-    let shop = app.globalData.sellerShop
-    console.log(shop)
+    let shop = app.globalData.sellerShop    
     if(shop.shop_type==='2'){
       this.getCategorys(0)
     }else{
       this.getCategory(-1)
-    }
+    }    
     
     var that = this
     /** 获取商品id参数 */
@@ -74,7 +73,30 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function() {
-
+    // console.log("onshow",app.globalData.goodsImg);
+    //清理 fileList
+    if (app.globalData.goodsImg){
+      let fileList = this.data.fileList
+      let goodsImg = app.globalData.goodsImg;
+      console.log(goodsImg);
+      if (goodsImg.idx == -1){
+        fileList.push({
+          url: goodsImg.src,
+          uid: guid(),
+          status: 'done'
+        })
+      } else {
+        fileList[goodsImg.idx] = {
+          url: goodsImg.src,
+          uid: guid(),
+          status: 'done'
+        }
+      }
+      this.setData({
+        fileList: fileList
+      })
+      app.globalData.goodsImg = "";
+    }
   },
 
   /**
@@ -261,6 +283,21 @@ Page({
 
     wx.hideLoading()
   },
+  navToResize(e){
+    console.log(e);
+    if (e.currentTarget.dataset.action == "edit"){
+      let fileList = this.data.fileList;
+      let index = e.currentTarget.dataset.index;
+      let imgFile = fileList[index];
+      wx.navigateTo({
+        url: '/pages/image/resize?imgSrc=' + imgFile.url + '&idx=' + index,
+      })
+    } else {
+      wx.navigateTo({
+        url: '/pages/image/resize',
+      })
+    }
+  },
   onFileRemove(e) {
     const {
       file,

+ 15 - 3
pages/goods/edit.wxml

@@ -12,10 +12,22 @@
   </wux-cell>
   <wux-cell title="商品图片" hover-class="none">
     <view style="margin-top:20rpx">
-      <wux-upload listType="picture-card" controlled fileList="{{fileList}}" showUploadList max="4" url="{{uploadUrl}}" bind:change="onFileChange" bind:success="onFileUploadSuccess" bind:fail="onFail" bind:complete="onFileComplete" bind:preview="onPreview"
+      <!-- <wux-upload listType="picture-card" controlled fileList="{{fileList}}" showUploadList max="4" url="{{uploadUrl}}" bind:change="onFileChange" bind:success="onFileUploadSuccess" bind:fail="onFail" bind:complete="onFileComplete" bind:preview="onPreview"
         bind:remove="onFileRemove">
-        <van-icon name="plus" size="20px" />
-      </wux-upload>
+      </wux-upload> -->
+        <view wx:if="{{fileList.length>0}}" >
+          <block class="image_upload" wx:for="{{fileList}}"  >
+            <image data-action="edit" data-index="{{index}}" bindtap="navToResize" mode="aspectFit" src="{{item.url}}"></image>
+            <van-icon class="image_close" name="close" size="20px"/>
+          </block>
+          <view data-action="add" class="image_upload" bindtap="navToResize">
+            <van-icon name="plus" size="20px" />
+          </view>
+        </view>        
+        <view wx:else data-action="add" class="image_upload" bindtap="navToResize">
+          <van-icon name="plus" size="20px" />
+        </view>
+        
     </view>
   </wux-cell>
 

+ 13 - 0
pages/goods/edit.wxss

@@ -8,4 +8,17 @@
     background-color: #fff;
     -webkit-user-select: none;
     user-select: none;
+}
+.image_upload{
+  width: 150rpx;
+  height: 150rpx;
+  display: flex;
+  justify-content: center;
+  border: 1rpx solid #333;
+  position: relative;
+}
+.image_close{
+  position:absolute;
+  top: 5rpx;
+  left: 5rpx;
 }

+ 280 - 0
pages/image/resize.js

@@ -0,0 +1,280 @@
+// pages/image/resize.js
+//获取应用实例
+const app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    uploadUrl: app.globalData.api_domain.api_base + 'uploaders?scene=goods',
+    action: 'add',
+    idx: -1,
+    src: '',
+    width: 250, //宽度
+    height: 250, //高度
+    max_width: 300,
+    max_height: 300,
+    disable_rotate: true, //是否禁用旋转
+    disable_ratio: false, //锁定比例
+    limit_move: true, //是否限制移动
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.cropper = this.selectComponent("#image-cropper");
+    this.setData({
+        src: options.imgSrc        
+    });
+    console.log(this.data, options);
+    if(!options.imgSrc){
+      this.cropper.upload(); //上传图片
+    } else {
+      this.setData({
+        action: 'edit',
+        idx: parseInt(options.idx) 
+      });
+    }
+  },
+
+  cropperload(e) {
+      console.log('cropper加载完成');
+  },
+  loadimage(e) {
+      wx.hideLoading();
+      this.cropper.imgReset();
+      this.setData({
+        src: e.detail.path
+      })
+      // console.log(this.data);
+  },
+  clickcut(e) {
+      // console.log(e.detail);
+      //图片预览
+      wx.previewImage({
+          current: e.detail.url, // 当前显示图片的http链接
+          urls: [e.detail.url] // 需要预览的图片http链接列表
+      })
+  },
+  upload() {
+      let that = this;
+      console.log(that);
+      wx.chooseImage({
+          count: 1,
+          sizeType: ['original', 'compressed'],
+          sourceType: ['album', 'camera'],
+          success(res) {
+              wx.showLoading({
+                  title: '加载中',
+              })
+              console.log(res);
+              const tempFilePaths = res.tempFilePaths[0];
+              //重置图片角度、缩放、位置
+              that.cropper.imgReset();
+              that.setData({
+                  src: tempFilePaths
+              });
+          }
+      })
+  },
+  setWidth(e) {
+      this.setData({
+          width: e.detail.value < 10 ? 10 : e.detail.value
+      });
+      this.setData({
+          cut_left: this.cropper.data.cut_left
+      });
+  },
+  setHeight(e) {
+      this.setData({
+          height: e.detail.value < 10 ? 10 : e.detail.value
+      });
+      this.setData({
+          cut_top: this.cropper.data.cut_top
+      });
+  },
+  switchChangeDisableRatio(e) {
+      //设置宽度之后使剪裁框居中
+      this.setData({
+          disable_ratio: e.detail.value
+      });
+  },
+  setCutTop(e) {
+      this.setData({
+          cut_top: e.detail.value
+      });
+      this.setData({
+          cut_top: this.cropper.data.cut_top
+      });
+  },
+  setCutLeft(e) {
+      this.setData({
+          cut_left: e.detail.value
+      });
+      this.setData({
+          cut_left: this.cropper.data.cut_left
+      });
+  },
+  switchChangeDisableRotate(e) {
+      //开启旋转的同时不限制移动
+      if (!e.detail.value) {
+          this.setData({
+              limit_move: false,
+              disable_rotate: e.detail.value
+          });
+      } else {
+          this.setData({
+              disable_rotate: e.detail.value
+          });
+      }
+  },
+  switchChangeLimitMove(e) {
+      //限制移动的同时锁定旋转
+      if (e.detail.value) {
+          this.setData({
+              disable_rotate: true
+          });
+      }
+      this.cropper.setLimitMove(e.detail.value);
+  },
+  switchChangeDisableWidth(e) {
+      this.setData({
+          disable_width: e.detail.value
+      });
+  },
+  switchChangeDisableHeight(e) {
+      this.setData({
+          disable_height: e.detail.value
+      });
+  },
+  submit(e) {
+      this.cropper.getImg((obj) => {
+        let that = this;
+        wx.uploadFile({
+          filePath: obj.url,
+          url: that.data.uploadUrl,
+          name: 'file',
+          success:res=>{            
+            let json = JSON.parse(res.data);
+            // console.log(json);
+            app.globalData.goodsImg = {
+              src: json.url,
+              action: that.data.action,
+              idx: that.data.idx
+            };
+            wx.navigateBack({
+                delta: -1
+              })
+          },
+          fail: err=>{
+            console.log(err);
+          }
+        })
+          // app.globalData.imgSrc = obj.url;
+          // wx.navigateBack({
+          //     delta: -1
+          // })
+          // console.log("ok");
+      });
+  },
+  rotate() {
+      //在用户旋转的基础上旋转90°
+      this.cropper.setAngle(this.cropper.data.angle += 90);
+  },
+  top() {
+      this.data.top = setInterval(() => {
+          this.cropper.setTransform({
+              y: -3
+          });
+      }, 1000 / 60)
+  },
+  bottom() {
+      this.data.bottom = setInterval(() => {
+          this.cropper.setTransform({
+              y: 3
+          });
+      }, 1000 / 60)
+  },
+  left() {
+      this.data.left = setInterval(() => {
+          this.cropper.setTransform({
+              x: -3
+          });
+      }, 1000 / 60)
+  },
+  right() {
+      this.data.right = setInterval(() => {
+          this.cropper.setTransform({
+              x: 3
+          });
+      }, 1000 / 60)
+  },
+  narrow() {
+      this.data.narrow = setInterval(() => {
+          this.cropper.setTransform({
+              scale: -0.02
+          });
+      }, 1000 / 60)
+  },
+  enlarge() {
+      this.data.enlarge = setInterval(() => {
+          this.cropper.setTransform({
+              scale: 0.02
+          });
+      }, 1000 / 60)
+  },
+  end(e) {
+      clearInterval(this.data[e.currentTarget.dataset.type]);
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 10 - 0
pages/image/resize.json

@@ -0,0 +1,10 @@
+{
+  "navigationBarTitleText": "图片裁剪",
+  "disableScroll": true,
+  "navigationBarBackgroundColor": "#292929",
+  "navigationBarTextStyle": "white",
+  "backgroundColor": "#292929",
+  "usingComponents": {
+    "image-cropper":"../../image-cropper/image-cropper"
+  }
+}

+ 32 - 0
pages/image/resize.wxml

@@ -0,0 +1,32 @@
+<!--pages/image/resize.wxml-->
+<view style="width:100%;height:500rpx;">
+    <image-cropper id="image-cropper" bindload="cropperload" bindimageload="loadimage" bindtapcut="clickcut" limit_move="{{limit_move}}" disable_rotate="{{disable_rotate}}" width="{{width}}" height="{{height}}" imgSrc="{{src}}" angle="{{angle}}" disable_width="{{disable_width}}" max_width="{{max_width}}" max_height="{{max_height}}" disable_height="{{disable_height}}" disable_ratio="{{disable_ratio}}">
+    </image-cropper>
+</view>
+<text class="hint">点击中间裁剪框可查看裁剪后的图片</text>
+<view class='bottom'>
+    <!-- <text style='color:white;margin-right:5rpx;'>锁定裁剪框宽</text>
+    <switch checked='{{disable_width?true:false}}' bindchange="switchChangeDisableWidth" />
+    <text style='color:white;margin-right:5rpx;'>锁定裁剪框高</text>
+    <switch checked='{{disable_height?true:false}}' bindchange="switchChangeDisableHeight" />
+    <button bindtap='submit'>确定</button>
+    <text style='color:white;margin-right:5rpx;'>锁定比例</text>
+    <switch checked='{{disable_ratio?true:false}}' bindchange="switchChangeDisableRatio" />
+    <text></text>
+    <text style='color:white;margin-right:5rpx;'>锁定旋转</text>
+    <switch checked='{{disable_rotate?true:false}}' bindchange="switchChangeDisableRotate" />
+    <text style='color:white;margin-right:5rpx;'>限制移动</text>
+    <switch checked='{{limit_move?true:false}}' bindchange="switchChangeLimitMove" /> -->
+    <button class="button" catchtouchstart='top' catchtouchend='end' data-type="top">上</button>
+    <button class="button" catchtouchstart='bottom' catchtouchend='end' data-type="bottom">下</button>
+    <button class="button" catchtouchstart='left' catchtouchend='end' data-type="left">左</button>
+    <button class="button" catchtouchstart='right' catchtouchend='end' data-type="right">右</button>
+    <button class="button" catchtouchstart='enlarge' catchtouchend='end' data-type="enlarge">放大</button>
+    <button class="button" catchtouchstart='narrow' catchtouchend='end' data-type="narrow">缩小</button>
+    <button class="button" catchtouchstart='rotate' catchtouchend='end' data-type="rotate">旋转</button>
+
+  <view>
+    <wux-button block type="light" bindtap='submit'>确定</wux-button>
+  </view>
+    
+</view>

+ 75 - 0
pages/image/resize.wxss

@@ -0,0 +1,75 @@
+/* pages/image/resize.wxss */
+.top {
+  position: absolute;
+  width: 100%;
+  top: 10rpx;
+  display: flex;
+  flex-flow: wrap;
+  z-index: 10;
+  color: white;
+  justify-content: space-around;
+}
+
+.hint {
+  position: absolute;
+  top: 10rpx;
+  width: 100%;
+  font-size: 33rpx;
+  text-align: center;
+  color: white;
+  z-index: 10;
+}
+
+page {
+  background: white;
+  height: 100%;
+}
+
+view {
+  font-size: 30rpx;
+}
+
+.bottom {
+  position: absolute;
+  width: 100%;
+  bottom: 150rpx;
+  display: flex;
+  z-index: 10;
+  justify-content: center;
+  align-items: center;
+  flex-wrap: wrap;
+  height: 210rpx;
+}
+
+button {
+  font-size: 27rpx;
+  z-index: 2;
+  padding: 0 20rpx;
+  height: 60rpx;
+  min-width: 70rpx;
+  margin: 0 4rpx;
+}
+
+.input {
+  display: flex;
+  height: 50rpx;
+  width: 50%;
+}
+
+.input>.label {
+  min-width: 150rpx;
+  font-size: 30rpx;
+  height: 50rpx;
+  line-height: 50rpx;
+}
+
+.input>input {
+  margin-left: 10rpx;
+  text-align: center;
+  max-width: 160rpx;
+  border: 1px solid rgb(255, 255, 255);
+  height: 50rpx;
+  line-height: 50rpx;
+  min-height: 50rpx;
+  box-sizing: border-box;
+}

+ 219 - 265
project.config.json

@@ -1,267 +1,221 @@
 {
-	"description": "项目配置文件",
-	"packOptions": {
-		"ignore": []
-	},
-	"setting": {
-		"urlCheck": false,
-		"es6": false,
-		"enhance": true,
-		"postcss": true,
-		"preloadBackgroundData": false,
-		"minified": true,
-		"newFeature": true,
-		"coverView": true,
-		"nodeModules": true,
-		"autoAudits": false,
-		"showShadowRootInWxmlPanel": true,
-		"scopeDataCheck": false,
-		"uglifyFileName": false,
-		"checkInvalidKey": true,
-		"checkSiteMap": true,
-		"uploadWithSourceMap": true,
-		"compileHotReLoad": false,
-		"babelSetting": {
-			"ignore": [],
-			"disablePlugins": [],
-			"outputPath": ""
-		},
-		"useIsolateContext": true,
-		"useCompilerModule": false,
-		"userConfirmedUseCompilerModuleSwitch": false
-	},
-	"compileType": "miniprogram",
-	"libVersion": "2.8.1",
-	"appid": "wxe95ca6dc3c58aed4",
-	"projectname": "B2b2cSeller",
-	"debugOptions": {
-		"hidedInDevtools": []
-	},
-	"isGameTourist": false,
-	"simulatorType": "wechat",
-	"simulatorPluginLibVersion": {},
-	"condition": {
-		"search": {
-			"current": -1,
-			"list": []
-		},
-		"conversation": {
-			"current": -1,
-			"list": []
-		},
-		"plugin": {
-			"current": -1,
-			"list": []
-		},
-		"game": {
-			"currentL": -1,
-			"list": []
-		},
-		"gamePlugin": {
-			"current": -1,
-			"list": []
-		},
-		"miniprogram": {
-			"current": 12,
-			"list": [
-				{
-					"id": 0,
-					"name": "pages/login/login",
-					"pathName": "pages/login/login",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "店铺",
-					"pathName": "pages/store/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": 2,
-					"name": "pages/index/index",
-					"pathName": "pages/index/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "产品",
-					"pathName": "pages/goods/goods-list",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "产品编辑",
-					"pathName": "pages/goods/edit",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "申请店铺",
-					"pathName": "pages/shop/shop-apply",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "我的店铺",
-					"pathName": "pages/shop/myshop-list",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "营业时间",
-					"pathName": "pages/store/businessSetting",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "店铺设置",
-					"pathName": "pages/shop/shop-edit",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "会员",
-					"pathName": "pages/member/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "截图",
-					"pathName": "pages/cropper/cropper",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "店铺",
-					"pathName": "pages/store/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "售后",
-					"pathName": "pages/aftersale/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "统计图表",
-					"pathName": "pages/statistic/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "没有店铺",
-					"pathName": "pages/noshop/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": 15,
-					"name": "pages/welcome/index",
-					"pathName": "pages/welcome/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/store/index",
-					"pathName": "pages/store/index",
-					"query": "",
-					"scene": 1036,
-					"referrerInfo": {}
-				},
-				{
-					"id": 17,
-					"name": "pages/welcome/index",
-					"pathName": "pages/welcome/index",
-					"query": "",
-					"scene": 1036,
-					"referrerInfo": {}
-				},
-				{
-					"id": -1,
-					"name": "pages/goods/edit",
-					"pathName": "pages/goods/edit",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/statistic/dateRange",
-					"pathName": "pages/statistic/dateRange",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/statistic/index",
-					"pathName": "pages/statistic/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/statistic/statisticNav",
-					"pathName": "pages/statistic/statisticNav",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/bill/index",
-					"pathName": "pages/bill/index",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/bill/billdetail",
-					"pathName": "pages/bill/billDetail",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/fund/withdrawApply",
-					"pathName": "pages/fund/withdrawApply",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/fund/withdrawAccount",
-					"pathName": "pages/fund/withdrawAccount",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/fund/withdrawAccountEdit",
-					"pathName": "pages/fund/withdrawAccountEdit",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "pages/fund/addWithdrawApply",
-					"pathName": "pages/fund/addWithdrawApply",
-					"scene": null
-				}
-			]
-		}
-	}
+  "description": "项目配置文件",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "setting": {
+    "urlCheck": false,
+    "es6": true,
+    "enhance": true,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": true,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "useIsolateContext": true,
+    "useCompilerModule": false,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "condition": false
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.8.1",
+  "appid": "wxe95ca6dc3c58aed4",
+  "projectname": "B2b2cSeller",
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "pages/login/login",
+          "pathName": "pages/login/login",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "店铺",
+          "pathName": "pages/store/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/index/index",
+          "pathName": "pages/index/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "产品",
+          "pathName": "pages/goods/goods-list",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "产品编辑",
+          "pathName": "pages/goods/edit",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "申请店铺",
+          "pathName": "pages/shop/shop-apply",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "我的店铺",
+          "pathName": "pages/shop/myshop-list",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "营业时间",
+          "pathName": "pages/store/businessSetting",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "店铺设置",
+          "pathName": "pages/shop/shop-edit",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "会员",
+          "pathName": "pages/member/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "截图",
+          "pathName": "pages/cropper/cropper",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "店铺",
+          "pathName": "pages/store/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "售后",
+          "pathName": "pages/aftersale/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "统计图表",
+          "pathName": "pages/statistic/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "没有店铺",
+          "pathName": "pages/noshop/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/welcome/index",
+          "pathName": "pages/welcome/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/store/index",
+          "pathName": "pages/store/index",
+          "query": "",
+          "scene": 1036,
+          "referrerInfo": {}
+        },
+        {
+          "name": "pages/welcome/index",
+          "pathName": "pages/welcome/index",
+          "query": "",
+          "scene": 1036,
+          "referrerInfo": {}
+        },
+        {
+          "name": "pages/goods/edit",
+          "pathName": "pages/goods/edit",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/statistic/dateRange",
+          "pathName": "pages/statistic/dateRange",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/statistic/index",
+          "pathName": "pages/statistic/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/statistic/statisticNav",
+          "pathName": "pages/statistic/statisticNav",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/bill/index",
+          "pathName": "pages/bill/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/bill/billdetail",
+          "pathName": "pages/bill/billDetail",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/fund/withdrawApply",
+          "pathName": "pages/fund/withdrawApply",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/fund/withdrawAccount",
+          "pathName": "pages/fund/withdrawAccount",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/fund/withdrawAccountEdit",
+          "pathName": "pages/fund/withdrawAccountEdit",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/fund/addWithdrawApply",
+          "pathName": "pages/fund/addWithdrawApply",
+          "query": "",
+          "scene": null
+        }
+      ]
+    }
+  },
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  }
 }

+ 7 - 0
project.private.config.json

@@ -0,0 +1,7 @@
+{
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "projectname": "B2b2cSeller",
+  "setting": {
+    "compileHotReLoad": true
+  }
+}