tanyanfei 4 年之前
當前提交
3aa8d21888
共有 68 個文件被更改,包括 4773 次插入0 次删除
  1. 11 0
      app.js
  2. 54 0
      app.json
  3. 9 0
      app.wxss
  4. 250 0
      ec-canvas/ec-canvas.js
  5. 4 0
      ec-canvas/ec-canvas.json
  6. 4 0
      ec-canvas/ec-canvas.wxml
  7. 4 0
      ec-canvas/ec-canvas.wxss
  8. 16 0
      ec-canvas/echarts.js
  9. 121 0
      ec-canvas/wx-canvas.js
  10. 66 0
      pages/aboutus/aboutus.js
  11. 3 0
      pages/aboutus/aboutus.json
  12. 6 0
      pages/aboutus/aboutus.wxml
  13. 21 0
      pages/aboutus/aboutus.wxss
  14. 111 0
      pages/day/day.js
  15. 3 0
      pages/day/day.json
  16. 18 0
      pages/day/day.wxml
  17. 54 0
      pages/day/day.wxss
  18. 105 0
      pages/detail/detail.js
  19. 3 0
      pages/detail/detail.json
  20. 33 0
      pages/detail/detail.wxml
  21. 87 0
      pages/detail/detail.wxss
  22. 96 0
      pages/game/game.js
  23. 3 0
      pages/game/game.json
  24. 5 0
      pages/game/game.wxml
  25. 18 0
      pages/game/game.wxss
  26. 156 0
      pages/gameDetail/gameDetail.js
  27. 6 0
      pages/gameDetail/gameDetail.json
  28. 20 0
      pages/gameDetail/gameDetail.wxml
  29. 69 0
      pages/gameDetail/gameDetail.wxss
  30. 二進制
      pages/images/1.png
  31. 二進制
      pages/images/2.png
  32. 二進制
      pages/images/3.png
  33. 二進制
      pages/images/about.png
  34. 二進制
      pages/images/bank.png
  35. 二進制
      pages/images/home_0.png
  36. 二進制
      pages/images/home_1.png
  37. 二進制
      pages/images/my_0.png
  38. 二進制
      pages/images/my_1.png
  39. 二進制
      pages/images/my_bg.png
  40. 二進制
      pages/images/order_0.png
  41. 二進制
      pages/images/order_1.png
  42. 二進制
      pages/images/right_icon.png
  43. 二進制
      pages/images/up_0.png
  44. 二進制
      pages/images/up_1.png
  45. 二進制
      pages/images/upload.png
  46. 158 0
      pages/index/index.js
  47. 6 0
      pages/index/index.json
  48. 29 0
      pages/index/index.wxml
  49. 102 0
      pages/index/index.wxss
  50. 66 0
      pages/list/list.js
  51. 3 0
      pages/list/list.json
  52. 27 0
      pages/list/list.wxml
  53. 64 0
      pages/list/list.wxss
  54. 66 0
      pages/rank/rank.js
  55. 3 0
      pages/rank/rank.json
  56. 95 0
      pages/rank/rank.wxml
  57. 63 0
      pages/rank/rank.wxss
  58. 244 0
      pages/upload/upload.js
  59. 3 0
      pages/upload/upload.json
  60. 40 0
      pages/upload/upload.wxml
  61. 87 0
      pages/upload/upload.wxss
  62. 165 0
      pages/user/user.js
  63. 3 0
      pages/user/user.json
  64. 24 0
      pages/user/user.wxml
  65. 62 0
      pages/user/user.wxss
  66. 2044 0
      pages/utils/wxcharts.js
  67. 56 0
      project.config.json
  68. 7 0
      sitemap.json

+ 11 - 0
app.js

@@ -0,0 +1,11 @@
+// app.js
+App({
+  onLaunch() {
+   
+  },
+  globalData: {
+    userInfo: null,
+    host: 'https://test.scxjc.club',
+    openid: '',
+  }
+})

+ 54 - 0
app.json

@@ -0,0 +1,54 @@
+{
+  "pages":[
+    "pages/index/index",
+    "pages/upload/upload",
+    "pages/user/user",
+    
+    "pages/gameDetail/gameDetail",
+    "pages/game/game",
+    "pages/day/day",
+    
+    "pages/rank/rank",
+    
+    "pages/detail/detail",
+    "pages/list/list",
+    "pages/aboutus/aboutus"
+  ],
+  "window":{
+    "backgroundTextStyle":"light",
+    "navigationBarBackgroundColor": "#FF5151",
+    "navigationBarTextStyle":"white"
+  },
+  "tabBar": {
+    "selectedColor": "#FF583D",
+    "color": "#333333",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath":"pages/images/home_0.png",
+        "selectedIconPath": "pages/images/home_1.png",
+        "text": "持仓"
+      },
+      {
+        "pagePath": "pages/rank/rank",
+        "iconPath": "pages/images/order_0.png",
+        "selectedIconPath": "pages/images/order_1.png",
+        "text": "排名"
+      },
+      {
+        "pagePath": "pages/upload/upload",
+        "iconPath": "pages/images/up_0.png",
+        "selectedIconPath": "pages/images/up_1.png",
+        "text": "上传"
+      },
+      {
+        "pagePath": "pages/user/user",
+        "iconPath": "pages/images/my_0.png",
+        "selectedIconPath": "pages/images/my_1.png",
+        "text": "我的"
+      }
+    ]
+  },
+  "style": "v2",
+  "sitemapLocation": "sitemap.json"
+}

+ 9 - 0
app.wxss

@@ -0,0 +1,9 @@
+/**app.wxss**/
+view,text{
+  box-sizing: border-box;
+  color: #333;
+  font-size: 28rpx;
+}
+input,form,page{
+  box-sizing: border-box;
+}

+ 250 - 0
ec-canvas/ec-canvas.js

@@ -0,0 +1,250 @@
+import WxCanvas from './wx-canvas';
+import * as echarts from './echarts';
+
+let ctx;
+
+function compareVersion(v1, v2) {
+  v1 = v1.split('.')
+  v2 = v2.split('.')
+  const len = Math.max(v1.length, v2.length)
+
+  while (v1.length < len) {
+    v1.push('0')
+  }
+  while (v2.length < len) {
+    v2.push('0')
+  }
+
+  for (let i = 0; i < len; i++) {
+    const num1 = parseInt(v1[i])
+    const num2 = parseInt(v2[i])
+
+    if (num1 > num2) {
+      return 1
+    } else if (num1 < num2) {
+      return -1
+    }
+  }
+  return 0
+}
+
+Component({
+  properties: {
+    canvasId: {
+      type: String,
+      value: 'ec-canvas'
+    },
+
+    ec: {
+      type: Object
+    },
+
+    forceUseOldCanvas: {
+      type: Boolean,
+      value: false
+    }
+  },
+
+  data: {
+    isUseNewCanvas: false
+  },
+
+  ready: function () {
+    // Disable prograssive because drawImage doesn't support DOM as parameter
+    // See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
+    echarts.registerPreprocessor(option => {
+      if (option && option.series) {
+        if (option.series.length > 0) {
+          option.series.forEach(series => {
+            series.progressive = 0;
+          });
+        }
+        else if (typeof option.series === 'object') {
+          option.series.progressive = 0;
+        }
+      }
+    });
+
+    if (!this.data.ec) {
+      console.warn('组件需绑定 ec 变量,例:<ec-canvas id="mychart-dom-bar" '
+        + 'canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>');
+      return;
+    }
+
+    if (!this.data.ec.lazyLoad) {
+      this.init();
+    }
+  },
+
+  methods: {
+    init: function (callback) {
+      const version = wx.getSystemInfoSync().SDKVersion
+
+      const canUseNewCanvas = compareVersion(version, '2.9.0') >= 0;
+      const forceUseOldCanvas = this.data.forceUseOldCanvas;
+      const isUseNewCanvas = canUseNewCanvas && !forceUseOldCanvas;
+      this.setData({ isUseNewCanvas });
+
+      if (forceUseOldCanvas && canUseNewCanvas) {
+        console.warn('开发者强制使用旧canvas,建议关闭');
+      }
+
+      if (isUseNewCanvas) {
+        // console.log('微信基础库版本大于2.9.0,开始使用<canvas type="2d"/>');
+        // 2.9.0 可以使用 <canvas type="2d"></canvas>
+        this.initByNewWay(callback);
+      } else {
+        const isValid = compareVersion(version, '1.9.91') >= 0
+        if (!isValid) {
+          console.error('微信基础库版本过低,需大于等于 1.9.91。'
+            + '参见:https://github.com/ecomfe/echarts-for-weixin'
+            + '#%E5%BE%AE%E4%BF%A1%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82');
+          return;
+        } else {
+          console.warn('建议将微信基础库调整大于等于2.9.0版本。升级后绘图将有更好性能');
+          this.initByOldWay(callback);
+        }
+      }
+    },
+
+    initByOldWay(callback) {
+      // 1.9.91 <= version < 2.9.0:原来的方式初始化
+      ctx = wx.createCanvasContext(this.data.canvasId, this);
+      const canvas = new WxCanvas(ctx, this.data.canvasId, false);
+
+      echarts.setCanvasCreator(() => {
+        return canvas;
+      });
+      // const canvasDpr = wx.getSystemInfoSync().pixelRatio // 微信旧的canvas不能传入dpr
+      const canvasDpr = 1
+      var query = wx.createSelectorQuery().in(this);
+      query.select('.ec-canvas').boundingClientRect(res => {
+        if (typeof callback === 'function') {
+          this.chart = callback(canvas, res.width, res.height, canvasDpr);
+        }
+        else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
+          this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr);
+        }
+        else {
+          this.triggerEvent('init', {
+            canvas: canvas,
+            width: res.width,
+            height: res.height,
+            canvasDpr: canvasDpr // 增加了dpr,可方便外面echarts.init
+          });
+        }
+      }).exec();
+    },
+
+    initByNewWay(callback) {
+      // version >= 2.9.0:使用新的方式初始化
+      const query = wx.createSelectorQuery().in(this)
+      query
+        .select('.ec-canvas')
+        .fields({ node: true, size: true })
+        .exec(res => {
+          const canvasNode = res[0].node
+          this.canvasNode = canvasNode
+
+          const canvasDpr = wx.getSystemInfoSync().pixelRatio
+          const canvasWidth = res[0].width
+          const canvasHeight = res[0].height
+
+          const ctx = canvasNode.getContext('2d')
+
+          const canvas = new WxCanvas(ctx, this.data.canvasId, true, canvasNode)
+          echarts.setCanvasCreator(() => {
+            return canvas
+          })
+
+          if (typeof callback === 'function') {
+            this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr)
+          } else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
+            this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr)
+          } else {
+            this.triggerEvent('init', {
+              canvas: canvas,
+              width: canvasWidth,
+              height: canvasHeight,
+              dpr: canvasDpr
+            })
+          }
+        })
+    },
+    canvasToTempFilePath(opt) {
+      if (this.data.isUseNewCanvas) {
+        // 新版
+        const query = wx.createSelectorQuery().in(this)
+        query
+          .select('.ec-canvas')
+          .fields({ node: true, size: true })
+          .exec(res => {
+            const canvasNode = res[0].node
+            opt.canvas = canvasNode
+            wx.canvasToTempFilePath(opt)
+          })
+      } else {
+        // 旧的
+        if (!opt.canvasId) {
+          opt.canvasId = this.data.canvasId;
+        }
+        ctx.draw(true, () => {
+          wx.canvasToTempFilePath(opt, this);
+        });
+      }
+    },
+
+    touchStart(e) {
+      if (this.chart && e.touches.length > 0) {
+        var touch = e.touches[0];
+        var handler = this.chart.getZr().handler;
+        handler.dispatch('mousedown', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.dispatch('mousemove', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.processGesture(wrapTouch(e), 'start');
+      }
+    },
+
+    touchMove(e) {
+      if (this.chart && e.touches.length > 0) {
+        var touch = e.touches[0];
+        var handler = this.chart.getZr().handler;
+        handler.dispatch('mousemove', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.processGesture(wrapTouch(e), 'change');
+      }
+    },
+
+    touchEnd(e) {
+      if (this.chart) {
+        const touch = e.changedTouches ? e.changedTouches[0] : {};
+        var handler = this.chart.getZr().handler;
+        handler.dispatch('mouseup', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.dispatch('click', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.processGesture(wrapTouch(e), 'end');
+      }
+    }
+  }
+});
+
+function wrapTouch(event) {
+  for (let i = 0; i < event.touches.length; ++i) {
+    const touch = event.touches[i];
+    touch.offsetX = touch.x;
+    touch.offsetY = touch.y;
+  }
+  return event;
+}

+ 4 - 0
ec-canvas/ec-canvas.json

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

+ 4 - 0
ec-canvas/ec-canvas.wxml

@@ -0,0 +1,4 @@
+<!-- 新的:接口对其了H5 -->
+<canvas wx:if="{{isUseNewCanvas}}" type="2d" class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
+<!-- 旧的 -->
+<canvas wx:else class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>

+ 4 - 0
ec-canvas/ec-canvas.wxss

@@ -0,0 +1,4 @@
+.ec-canvas {
+  width: 100%;
+  height: 100%;
+}

File diff suppressed because it is too large
+ 16 - 0
ec-canvas/echarts.js


+ 121 - 0
ec-canvas/wx-canvas.js

@@ -0,0 +1,121 @@
+export default class WxCanvas {
+  constructor(ctx, canvasId, isNew, canvasNode) {
+    this.ctx = ctx;
+    this.canvasId = canvasId;
+    this.chart = null;
+    this.isNew = isNew
+    if (isNew) {
+      this.canvasNode = canvasNode;
+    }
+    else {
+      this._initStyle(ctx);
+    }
+
+    // this._initCanvas(zrender, ctx);
+
+    this._initEvent();
+  }
+
+  getContext(contextType) {
+    if (contextType === '2d') {
+      return this.ctx;
+    }
+  }
+
+  // canvasToTempFilePath(opt) {
+  //   if (!opt.canvasId) {
+  //     opt.canvasId = this.canvasId;
+  //   }
+  //   return wx.canvasToTempFilePath(opt, this);
+  // }
+
+  setChart(chart) {
+    this.chart = chart;
+  }
+
+  attachEvent() {
+    // noop
+  }
+
+  detachEvent() {
+    // noop
+  }
+
+  _initCanvas(zrender, ctx) {
+    zrender.util.getContext = function () {
+      return ctx;
+    };
+
+    zrender.util.$override('measureText', function (text, font) {
+      ctx.font = font || '12px sans-serif';
+      return ctx.measureText(text);
+    });
+  }
+
+  _initStyle(ctx) {
+    var styles = ['fillStyle', 'strokeStyle', 'globalAlpha',
+      'textAlign', 'textBaseAlign', 'shadow', 'lineWidth',
+      'lineCap', 'lineJoin', 'lineDash', 'miterLimit', 'fontSize'];
+
+    styles.forEach(style => {
+      Object.defineProperty(ctx, style, {
+        set: value => {
+          if (style !== 'fillStyle' && style !== 'strokeStyle'
+            || value !== 'none' && value !== null
+          ) {
+            ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
+          }
+        }
+      });
+    });
+
+    ctx.createRadialGradient = () => {
+      return ctx.createCircularGradient(arguments);
+    };
+  }
+
+  _initEvent() {
+    this.event = {};
+    const eventNames = [{
+      wxName: 'touchStart',
+      ecName: 'mousedown'
+    }, {
+      wxName: 'touchMove',
+      ecName: 'mousemove'
+    }, {
+      wxName: 'touchEnd',
+      ecName: 'mouseup'
+    }, {
+      wxName: 'touchEnd',
+      ecName: 'click'
+    }];
+
+    eventNames.forEach(name => {
+      this.event[name.wxName] = e => {
+        const touch = e.touches[0];
+        this.chart.getZr().handler.dispatch(name.ecName, {
+          zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
+          zrY: name.wxName === 'tap' ? touch.clientY : touch.y
+        });
+      };
+    });
+  }
+
+  set width(w) {
+    if (this.canvasNode) this.canvasNode.width = w
+  }
+  set height(h) {
+    if (this.canvasNode) this.canvasNode.height = h
+  }
+
+  get width() {
+    if (this.canvasNode)
+      return this.canvasNode.width
+    return 0
+  }
+  get height() {
+    if (this.canvasNode)
+      return this.canvasNode.height
+    return 0
+  }
+}

+ 66 - 0
pages/aboutus/aboutus.js

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

+ 3 - 0
pages/aboutus/aboutus.json

@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "关于我们"
+}

+ 6 - 0
pages/aboutus/aboutus.wxml

@@ -0,0 +1,6 @@
+<view class="bg">
+  <image style="width:100%;" mode="widthFix" src="../images/about.png"></image>
+  <view>
+    这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍这里是比赛的介绍
+  </view>
+</view>

+ 21 - 0
pages/aboutus/aboutus.wxss

@@ -0,0 +1,21 @@
+/* pages/aboutus/aboutus.wxss */
+page{
+  background: #F4F6F8;
+}
+.bg{
+  padding: 24rpx;
+}
+.bg image{
+  position: relative;
+  z-index: 3;
+}
+.bg view{
+  padding:48rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  line-height: 48rpx;
+  border-radius: 16px;
+  position: relative;
+  top: -30rpx;
+  z-index: 2;
+}

+ 111 - 0
pages/day/day.js

@@ -0,0 +1,111 @@
+// pages/day/day.js
+const app = getApp();
+var host = app.globalData.host;
+var id;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    id = options.id
+    this.setData({
+      id: id
+    })
+    wx.showNavigationBarLoading()
+    /**获取token */
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        this.setData({
+          userInfo: res.data
+        })
+        this.getData(options.id);
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  getData(id) {
+    wx.request({
+      url: host + '/api/wx/player/match/record/list',
+      data: { id: id },
+      header: {
+        'Authorization': this.data.userInfo.token
+      },
+      success: res => {
+        console.log(res)
+        this.setData({
+          datas: res.data.data
+        })
+        wx.hideNavigationBarLoading()
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/day/day.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "每日持股"
+}

+ 18 - 0
pages/day/day.wxml

@@ -0,0 +1,18 @@
+
+<navigator  class="part" wx:for='{{datas.list}}' url="../detail/detail?id={{item.id}}"> 
+    <view class="item">
+        <text class="tag">日期</text>{{item.stock_date}}
+    </view>
+    <view class="item">
+        <text class="tag red">资产</text>{{item.today_fund}} 
+         <text class="tag border">当日收益</text><text>{{item.today_income}}</text>  
+         <text class="tag border">总收益</text><text>{{item.today_income}}</text>
+    </view>
+    <view class="item">
+        <text class="tag blue">持仓</text>
+        <view class="list">
+            <view wx:for='{{item.today_stock}}' wx:for-item='stock'>
+            {{stock.name}}  <text>{{stock.fund}}</text></view>
+        </view>
+    </view>
+</navigator>

+ 54 - 0
pages/day/day.wxss

@@ -0,0 +1,54 @@
+/* pages/day/day.wxss */
+page{
+  background: #F4F6F8;
+}
+.part{
+  background: #fff;
+  padding: 30rpx 28rpx;
+  margin-bottom: 16rpx;
+}
+.item{
+  margin-bottom: 20rpx;
+  font-weight: 500;
+}
+.item text{
+  font-weight: 400;
+  margin-right: 20rpx;
+}
+.item .tag{
+  display: inline-block;
+  color: #FFF;
+  font-size: 20rpx;
+  background: #333;
+  border-radius: 4rpx;
+  padding: 0 3px;
+  
+}
+.item .red{
+  background: #FF5151;
+}
+.item .blue{
+  background: #4587FF;
+}
+.item .border{
+  background: #fff;
+  border: 1px solid #333;
+  color: #333;
+}
+.list{
+  display: inline-block;
+  width: 88%;
+  vertical-align: top;
+}
+.list view{
+  display: inline-block;
+  padding: 16rpx;
+  background: #F4F6F8;
+  border-radius: 8rpx;
+  margin-bottom: 10rpx;
+  margin-right: 10rpx;
+}
+.list text{
+  display: block;
+  color: #999;
+}

+ 105 - 0
pages/detail/detail.js

@@ -0,0 +1,105 @@
+// pages/detail/detail.js
+const app = getApp();
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    datas:{}
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    wx.showNavigationBarLoading()
+    /**获取token */
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        this.setData({
+          userInfo: res.data
+        })
+        this.getData(options.id);
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  getData(id) {
+    wx.request({
+      url: host + '/api/wx/player/record',
+      data:{id:id},
+      header: {
+        'Authorization': this.data.userInfo.token
+      },
+      success: res => {
+        console.log(res)
+        this.setData({
+          datas: res.data.data
+        })
+        wx.hideNavigationBarLoading()
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/detail/detail.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "详情"
+}

+ 33 - 0
pages/detail/detail.wxml

@@ -0,0 +1,33 @@
+<view class="part top">
+    <image mode="widthFix" src="../images/bank.png"></image>
+    <view class="rank"> <text>{{datas.cur_rank?datas.cur_rank:''}}</text>当前排名 </view>  
+
+    <view class='label'>
+      日期  <text>{{datas.stock_date}}</text>
+    </view>
+    <view class='label'>
+      分组  <text>{{datas.match_group}}</text>
+    </view>
+</view>
+
+<view class="info">
+    <view> <text>{{datas.init_fund}}</text>初始资产  </view>
+    <view> <text>{{datas.today_fund}}</text>今日资产  </view>
+    <view> <text style="color:#3FB35B;">{{datas.today_income}}</text>当日收益  </view>
+    <view> <text style="color:#FF5151;">{{datas.total_income}}</text>总收益  </view>
+</view>
+
+<view class="part">
+  <text class="tag blue">昨日持股</text>
+  <view class="list">
+      <view wx:for='{{datas.yesterday_stock}}' wx:for-item='stock'>
+            {{stock.name}}  <text>{{stock.fund}}</text>
+      </view>
+  </view>
+  <text class="tag blue">今日持股</text>
+  <view class="list">
+      <view wx:for='{{datas.today_stock}}' wx:for-item='stock'>
+            {{stock.name}}  <text>{{stock.fund}}</text>
+      </view>
+  </view>
+</view>

+ 87 - 0
pages/detail/detail.wxss

@@ -0,0 +1,87 @@
+/* pages/detail/detail.wxss */
+page{
+  background: #F4F6F8;
+}
+.part{
+  background: #fff;
+  padding: 30rpx;
+  margin-bottom: 16rpx;
+}
+.top image{
+  position: absolute;
+  right: 0;
+  top: 20rpx;
+  width: 210rpx;
+}
+.rank{
+  position: absolute;
+  top: 18rpx;
+  right: 0rpx;
+  color: #FF5151;
+  padding-right: 24rpx;
+}
+.rank text{
+  font-size: 48rpx;
+  margin-right: 20rpx;
+  color: #FF5151;
+  position: relative;
+  top: 6rpx;
+}
+.label{
+    font-size: 32rpx;
+    color: #999;
+    padding: 10rpx 0;
+}
+.label text{
+    color: #333;
+    margin-left: 16rpx;
+    font-size: 32rpx;
+}
+.info{
+  display: flex;
+  flex-wrap: wrap;
+  background: #fff;
+   margin-bottom: 16rpx;
+}
+.info view{
+  width: 50%;
+  color: #999;
+  padding: 16rpx 32rpx;
+}
+.info view:first-child{
+  border-right: 1px solid #F6F6F6;
+  border-bottom: 1px solid #F6F6F6
+}
+.info view:last-child{
+  border-left: 1px solid #F6F6F6;
+  border-top: 1px solid #F6F6F6
+}
+.info text{
+  display: block;
+  font-size: 40rpx;
+  font-weight: 500;
+}
+
+.tag{
+  display: inline-block;
+  color: #FFF;
+  font-size: 24rpx;
+  background: #4587FF;
+  border-radius: 4rpx;
+  padding:2px 4px;
+}
+.list{
+  margin:24rpx 0 40rpx;
+}
+.list view{
+  display: inline-block;
+  padding: 16rpx;
+  background: #F4F6F8;
+  border-radius: 8rpx;
+  margin-bottom: 16rpx;
+  margin-right: 16rpx;
+}
+.list text{
+  display: block;
+  color: #999;
+}

+ 96 - 0
pages/game/game.js

@@ -0,0 +1,96 @@
+// pages/game/game.js
+const app = getApp();
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    wx.showNavigationBarLoading()
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        this.setData({
+          userInfo: res.data
+        })
+        wx.request({
+          url: host + '/api/wx/player/match/list',
+          header: {
+            'Authorization': this.data.userInfo.token
+          },
+          success: res => {
+            console.log(res)
+            this.setData({
+              datas: res.data.data
+            })
+            wx.hideNavigationBarLoading()
+          }
+        })
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+    
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/game/game.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "实盘大赛"
+}

+ 5 - 0
pages/game/game.wxml

@@ -0,0 +1,5 @@
+<view>
+      <navigator wx:for="{{datas}}" class="item" url="../gameDetail/gameDetail?id={{item.id}}">
+          {{item.name}}  <image mode="widthFix" src="../images/right_icon.png"></image>
+      </navigator>
+</view>

+ 18 - 0
pages/game/game.wxss

@@ -0,0 +1,18 @@
+/* pages/game/game.wxss */
+page{
+  background: #F4F6F8;
+}
+view{
+  background: #fff;
+}
+.item{
+  padding: 0 48rpx;
+  line-height: 108rpx;
+  font-size: 32rpx;
+  border-bottom: 1px solid #F6F6F6;
+}
+.item image{
+  width: 32rpx;
+  float: right;
+  margin-top: 38rpx;
+}

+ 156 - 0
pages/gameDetail/gameDetail.js

@@ -0,0 +1,156 @@
+import * as echarts from '../../ec-canvas/echarts';
+
+const app = getApp();
+var host = app.globalData.host;
+var id;
+
+Page({
+  onShareAppMessage: function (res) {
+    return {
+      title: 'ECharts 可以在微信小程序中使用啦!',
+      path: '/pages/index/index',
+      success: function () { },
+      fail: function () { }
+    }
+  },
+  data: {
+    ec: {
+      onInit: initChart
+    }
+  },
+
+  onLoad(options) {
+    id=options.id
+    this.setData({
+      id:id
+    })
+    wx.showNavigationBarLoading()
+    /**获取token */
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        this.setData({
+          userInfo: res.data
+        })
+        this.getData(options.id);
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  getData(id) {
+    wx.request({
+      url: host + '/api/wx/player/match',
+      data: { id: id },
+      header: {
+        'Authorization': this.data.userInfo.token
+      },
+      success: res => {
+        console.log(res)
+        this.setData({
+          datas: res.data.data
+        })
+        wx.hideNavigationBarLoading()
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+});
+
+/**折线图 */
+function initChart(canvas, width, height, dpr) {
+
+  wx.getStorage({
+    key: 'userInfo',
+    success: res => {
+      var info = res.data
+      wx.request({
+        url: host + '/api/wx/player/match',
+        data:{id:id},
+        header: {
+          'Authorization': info.token
+        },
+        success: res => {
+          var records = res.data.data.records, xdata = [], ydata = [];
+          for (let i = 0; i < records.length; i++) {
+            let date = records[i].stock_date.split('-');
+            xdata.push(date[1] + '/' + date[2])
+            ydata.push(records[i].today_fund)
+          }
+          const chart = echarts.init(canvas, null, {
+            width: width,
+            height: height,
+            devicePixelRatio: dpr // new
+          });
+          canvas.setChart(chart);
+          var option = {
+            legend: {
+              show: false
+            },
+            grid: {
+              x: 35,
+              y: 40,
+              x2: 10,
+              y2: 35
+            },
+            tooltip: {
+              show: true,
+              trigger: 'axis'
+            },
+            xAxis: {
+              type: 'category',
+              data: xdata,
+              axisLabel: {
+                interval: 0,
+                rotate: 40,
+                color: '#999999'
+              }
+            },
+            yAxis: {
+              axisLine: {
+                show: true
+              },
+              type: 'value',
+              name: '收益曲线',
+            },
+            series: [{
+              name: 'A',
+              type: 'line',
+              smooth: true,
+              symbolSize: 8,
+              lineStyle: {
+                color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
+                  offset: 0,
+                  color: '#FF2D68'
+                }, {
+                  offset: 1,
+                  color: '#4C4BFF'
+                }]),
+              },
+              itemStyle: {
+                borderWidth: 5,
+                borderColor: '#FFAD52',
+                color: '#FFAD52'
+              },
+              data: ydata
+            }]
+          };
+
+          chart.setOption(option);
+          return chart;
+        }
+      })
+    },
+  })
+
+
+}

+ 6 - 0
pages/gameDetail/gameDetail.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "参数资料",
+  "usingComponents": {
+    "ec-canvas": "../../ec-canvas/ec-canvas"
+  }
+}

+ 20 - 0
pages/gameDetail/gameDetail.wxml

@@ -0,0 +1,20 @@
+<view class="part detail">
+    <view><text>参赛名称</text>{{datas.match.name}}</view>
+    <view><text>参赛日期</text>{{datas.match.start_time}}-{{datas.match.end_time}}</view>
+    <!-- <view><text>参赛名</text>{{datas.match.start_time}}</view> -->
+    <view><text>参赛组</text>{{datas.match.groups}}</view>
+</view>
+<view class="part info">
+    <view> <text>{{datas.today_record.rank}}</text>排名  </view>
+    <view> <text style="color:#FF5151;">{{datas.today_record.today_income}}</text>盈亏  </view>
+    <view> <text>{{datas.today_record.init_fund}}</text>初始资产(万)  </view>
+    <view> <text >{{datas.today_record.today_fund}}</text>今日资产(万)  </view>
+</view>
+
+<view class="part">
+  <view class="container">
+      <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec }}">
+      </ec-canvas>
+  </view>
+  <navigator url="../day/day?id={{id}}" class="per">每日持股</navigator>
+</view>

+ 69 - 0
pages/gameDetail/gameDetail.wxss

@@ -0,0 +1,69 @@
+/* pages/gameDetail/gameDetail.wxss */
+page{
+  background: #F4F6F8;
+}
+.part{
+  background: #fff;
+  margin-bottom: 16rpx;
+  padding: 16rpx 32rpx;
+}
+.detail view{
+  padding: 8rpx;
+}
+.detail text{
+  color: #999;
+  display: inline-block;
+  width: 150rpx;
+}
+.info{
+  display: flex;
+  flex-wrap: wrap;
+  background: #fff;
+   margin-bottom: 16rpx;
+}
+.info view{
+  width: 50%;
+  color: #999;
+  padding: 16rpx 32rpx;
+}
+.info view:first-child{
+  border-right: 1px solid #F6F6F6;
+  border-bottom: 1px solid #F6F6F6
+}
+.info view:last-child{
+  border-left: 1px solid #F6F6F6;
+  border-top: 1px solid #F6F6F6
+}
+.info text{
+  display: block;
+  font-size: 40rpx;
+  font-weight: 500;
+}
+
+.container {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  box-sizing: border-box; 
+  height: 50vh;
+} 
+
+ec-canvas {
+  width: 100%;
+  height: 100%;
+}
+
+.per{
+  background: #FF5151;
+  width: 80%;
+  display: block;
+  color: #fff;
+  font-size: 28rpx;
+  border-radius: 16rpx;
+  line-height: 88rpx;
+  text-align: center;
+  margin: 60rpx auto;
+
+}

二進制
pages/images/1.png


二進制
pages/images/2.png


二進制
pages/images/3.png


二進制
pages/images/about.png


二進制
pages/images/bank.png


二進制
pages/images/home_0.png


二進制
pages/images/home_1.png


二進制
pages/images/my_0.png


二進制
pages/images/my_1.png


二進制
pages/images/my_bg.png


二進制
pages/images/order_0.png


二進制
pages/images/order_1.png


二進制
pages/images/right_icon.png


二進制
pages/images/up_0.png


二進制
pages/images/up_1.png


二進制
pages/images/upload.png


+ 158 - 0
pages/index/index.js

@@ -0,0 +1,158 @@
+import * as echarts from '../../ec-canvas/echarts';
+
+const app = getApp();
+var host = app.globalData.host;
+Page({
+  onShareAppMessage: function (res) {
+    return {
+      title: 'ECharts 可以在微信小程序中使用啦!',
+      path: '/pages/index/index',
+      success: function () { },
+      fail: function () { }
+    }
+  },
+  data: {
+    ec: {
+      onInit: initChart
+    },
+    datas:{},
+    userInfo:{}
+  },
+  onLoad(){
+    wx.showNavigationBarLoading()
+    /**获取token */
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        this.setData({
+          userInfo: res.data
+        })
+        this.getData();
+      },
+      fail:error=>{
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  onShow(){
+    console.log(233)
+    if (!this.data.userInfo.token) {
+      this.onLoad()
+    }
+  },
+  getData(){
+    wx.request({
+      url: host + '/api/wx/index',
+      header: {
+        'Authorization': this.data.userInfo.token
+      },
+      success: res=> {
+        console.log(res)
+        this.setData({
+          datas: res.data.data
+        })
+       wx.hideNavigationBarLoading()
+      },
+      fail: error => {
+        //跳转到登陆页面
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  onReady() {
+  }
+});
+
+
+/**折线图 */
+function initChart(canvas, width, height, dpr) {
+  
+  wx.getStorage({
+    key: 'userInfo',
+    success: res => {
+      var info = res.data
+      wx.request({
+        url: host + '/api/wx/index',
+        header: {
+          'Authorization': info.token
+        },
+        success: res => {
+          var records = res.data.data.records, xdata=[],ydata=[];
+          for (let i = 0; i < records.length; i++) {
+            let date = records[i].stock_date.split('-');
+            xdata.push(date[1] + '/' + date[2])
+            ydata.push(records[i].today_fund)
+          }
+          const chart = echarts.init(canvas, null, {
+            width: width,
+            height: height,
+            devicePixelRatio: dpr // new
+          });
+          canvas.setChart(chart);
+          var option = {
+            legend: {
+              show: false
+            },
+            grid: {
+              x: 35,
+              y: 40,
+              x2: 10,
+              y2: 35
+            },
+            tooltip: {
+              show: true,
+              trigger: 'axis'
+            },
+            xAxis: {
+              type: 'category',
+              data: xdata,
+              axisLabel: {
+                interval: 0,
+                rotate: 40,
+                color: '#999999'
+              }
+            },
+            yAxis: {
+              axisLine: {
+                show: true
+              },
+              type: 'value',
+              name: '收益曲线',
+            },
+            series: [{
+              name: 'A',
+              type: 'line',
+              smooth: true,
+              symbolSize: 8,
+              lineStyle: {
+                color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
+                  offset: 0,
+                  color: '#FF2D68'
+                }, {
+                  offset: 1,
+                  color: '#4C4BFF'
+                }]),
+              },
+              itemStyle: {
+                borderWidth: 5,
+                borderColor: '#FFAD52',
+                color: '#FFAD52'
+              },
+              data: ydata
+            }]
+          };
+
+          chart.setOption(option);
+          return chart;
+        }
+      })
+    },
+  })
+  
+  
+}

+ 6 - 0
pages/index/index.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "持仓",
+  "usingComponents": {
+    "ec-canvas": "../../ec-canvas/ec-canvas"
+  }
+}

+ 29 - 0
pages/index/index.wxml

@@ -0,0 +1,29 @@
+<!--index.wxml-->
+<view class="part" wx:if='{{userInfo.token}}'>
+  <view class="title">
+    {{datas.match_name}}    
+    <image mode="widthFix" src="../images/bank.png"></image>
+    <view class="rank"> <text>{{datas.cur_rank?datas.cur_rank:''}}</text>当前排名 </view>  
+  </view>
+  <view class="container">
+    <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}">
+    </ec-canvas>
+  </view>
+</view>
+<navigator  class="part part1" wx:for='{{datas.records}}' url="../detail/detail?id={{item.id}}"> 
+    <view class="item">
+        <text class="tag">日期</text>{{item.stock_date}}
+    </view>
+    <view class="item">
+        <text class="tag red">资产</text>{{item.today_fund}} 
+         <text class="tag border">当日收益</text><text>{{item.today_income?item.today_income:''}}</text>  
+         <text class="tag border">总收益</text><text>{{item.today_income?item.today_income:''}}</text>
+    </view>
+    <view class="item">
+        <text class="tag blue">持仓</text>
+        <view class="list">
+            <view wx:for='{{item.today_stock}}' wx:for-item='stock'>
+            {{stock.name}}  <text>{{stock.fund}}</text></view>
+        </view>
+    </view>
+</navigator>

+ 102 - 0
pages/index/index.wxss

@@ -0,0 +1,102 @@
+/**index.wxss**/
+page{
+  background: #F4F6F8;
+}
+.container {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  box-sizing: border-box; 
+} 
+
+ec-canvas {
+  width: 100%;
+  height: 50vh;
+}
+.title{
+  border-left: 4px solid #FF5151;
+  color: #FF5151;
+  font-size: 32rpx;
+  font-weight: 500;
+  padding-left: 20rpx;
+  padding-right: 40rpx;
+  margin-bottom: 20rpx;
+  position: relative;
+}
+.part{
+  background: #fff;
+  padding: 30rpx 0;
+  margin-bottom: 16rpx;
+}
+.title image{
+  position: absolute;
+  right: 0;
+  top: -15rpx;
+  width: 210rpx;
+}
+.rank{
+  position: absolute;
+  top: -15rpx;
+  right: 0rpx;
+  color: #FF5151;
+  padding-right: 24rpx;
+}
+.rank text{
+  font-size: 48rpx;
+  margin-right: 20rpx;
+  color: #FF5151;
+  position: relative;
+  top: 6rpx;
+}
+
+.part1{
+  padding: 30rpx;
+  margin-bottom: 1px;
+}
+.item{
+  margin-bottom: 20rpx;
+  font-weight: 500;
+}
+.item text{
+  font-weight: 400;
+  margin-right: 20rpx;
+}
+.item .tag{
+  display: inline-block;
+  color: #FFF;
+  font-size: 20rpx;
+  background: #333;
+  border-radius: 4rpx;
+  padding: 0 3px;
+  
+}
+.item .red{
+  background: #FF5151;
+}
+.item .blue{
+  background: #4587FF;
+}
+.item .border{
+  background: #fff;
+  border: 1px solid #333;
+  color: #333;
+}
+.list{
+  display: inline-block;
+  width: 85%;
+  vertical-align: top;
+}
+.list view{
+  display: inline-block;
+  padding: 16rpx;
+  background: #F4F6F8;
+  border-radius: 8rpx;
+  margin-bottom: 10rpx;
+  margin-right: 10rpx;
+}
+.list text{
+  display: block;
+  color: #999;
+}

+ 66 - 0
pages/list/list.js

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

+ 3 - 0
pages/list/list.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "千万组"
+}

+ 27 - 0
pages/list/list.wxml

@@ -0,0 +1,27 @@
+<view class="top">
+    <text>排名</text><text>选手</text><text>初始资产</text>
+    <text>今日资产</text><text>总盈亏</text>
+</view>
+<view class="list">
+    <view class="item">
+        <image mode="widthFix" src="../images/1.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/2.png"></image>
+        <text class="name">北京炒家北京炒家北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/3.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+</view>

+ 64 - 0
pages/list/list.wxss

@@ -0,0 +1,64 @@
+/* pages/list/list.wxss */
+/* pages/rank/rank.wxss */
+page{
+  background: #F4F6F8;
+}
+.top{
+  display: flex;
+  font-size: 28rpx;
+  padding: 24rpx 32rpx;
+  background: #fff;
+  margin-bottom: 20rpx;
+  justify-content: space-between;
+}
+.item{
+  display: flex;
+  justify-content: space-between;
+  font-size: 28rpx;
+  padding: 16rpx 32rpx;
+}
+.item text{
+  color: #333;
+}
+.item .red{
+  color: #FF5151;
+}
+.top text{
+  color: #999;
+}
+.item image{
+  width: 36rpx;
+}
+.title image{
+  width: 32rpx;
+  position: relative;
+  top: 7rpx;
+}
+.list{
+  background: #fff;
+  padding: 40rpx 0;
+  margin-bottom: 20rpx;
+}
+.title{
+  border-left: 4px solid #FF5151;
+  color: #FF5151;
+  font-size: 32rpx;
+  font-weight: 500;
+  padding-left: 20rpx;
+  padding-right: 40rpx;
+  margin-bottom: 20rpx;
+}
+.title navigator{
+  float: right;
+  color: #999;
+  font-size: 28rpx;
+}
+.item text{
+  display: block;
+}
+.name{
+  width: 112rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}

+ 66 - 0
pages/rank/rank.js

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

+ 3 - 0
pages/rank/rank.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "第42届湖南顽主杯实盘大赛"
+}

+ 95 - 0
pages/rank/rank.wxml

@@ -0,0 +1,95 @@
+<!--pages/rank/rank.wxml-->
+<view class="top">
+    <text>排名</text><text>选手</text><text>初始资产</text>
+    <text>今日资产</text><text>总盈亏</text>
+</view>
+<view class="list">
+    <view class="title">
+        千万组
+        <navigator url="../list/list">
+          查看更多  <image mode="widthFix" src="../images/right_icon.png"></image>
+        </navigator>
+    </view> 
+    <view class="item">
+        <image mode="widthFix" src="../images/1.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/2.png"></image>
+        <text class="name">北京炒家北京炒家北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/3.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+</view>
+
+<view class="list">
+    <view class="title">
+        百万组
+        <navigator url="../list/list">
+          查看更多  <image mode="widthFix" src="../images/right_icon.png"></image>
+        </navigator>
+    </view> 
+    <view class="item">
+        <image mode="widthFix" src="../images/1.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/2.png"></image>
+        <text class="name">北京炒家北京炒家北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/3.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+</view>
+
+
+<view class="list">
+    <view class="title">
+        十万组
+        <navigator url="../list/list">
+          查看更多  <image mode="widthFix" src="../images/right_icon.png"></image>
+        </navigator>
+    </view> 
+    <view class="item">
+        <image mode="widthFix" src="../images/1.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/2.png"></image>
+        <text class="name">北京炒家北京炒家北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+    <view class="item">
+        <image mode="widthFix" src="../images/3.png"></image>
+        <text class="name">北京炒家</text>
+        <text>1232w</text>
+        <text>899w</text>
+        <text class="red">35.87%</text>
+    </view>
+</view>

+ 63 - 0
pages/rank/rank.wxss

@@ -0,0 +1,63 @@
+/* pages/rank/rank.wxss */
+page{
+  background: #F4F6F8;
+}
+.top{
+  display: flex;
+  font-size: 28rpx;
+  padding: 24rpx 32rpx;
+  background: #fff;
+  margin-bottom: 20rpx;
+  justify-content: space-between;
+}
+.item{
+  display: flex;
+  justify-content: space-between;
+  font-size: 28rpx;
+  padding: 16rpx 32rpx;
+}
+.item text{
+  color: #333;
+}
+.item .red{
+  color: #FF5151;
+}
+.top text{
+  color: #999;
+}
+.item image{
+  width: 36rpx;
+}
+.title image{
+  width: 32rpx;
+  position: relative;
+  top: 7rpx;
+}
+.list{
+  background: #fff;
+  padding: 40rpx 0;
+  margin-bottom: 20rpx;
+}
+.title{
+  border-left: 4px solid #FF5151;
+  color: #FF5151;
+  font-size: 32rpx;
+  font-weight: 500;
+  padding-left: 20rpx;
+  padding-right: 40rpx;
+  margin-bottom: 20rpx;
+}
+.title navigator{
+  float: right;
+  color: #999;
+  font-size: 28rpx;
+}
+.item text{
+  display: block;
+}
+.name{
+  width: 112rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}

+ 244 - 0
pages/upload/upload.js

@@ -0,0 +1,244 @@
+// pages/upload/upload.js
+const app = getApp()
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    open:true,
+    stock_date: new Date().getFullYear() + '-' + Number(new Date().getMonth() + 1) + '-' + new Date().getDate(),
+    stock:[{label:'',name:'',code:'',fund:''}],
+    stockList:[],
+    today_stock_img:[],
+    value:[-1],
+    is_markt:0,
+    today_fund:''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onShow(){
+    console.log(233)
+    if (!this.data.userInfo.token) {
+      wx.switchTab({
+        url: '../user/user',
+      })
+    }
+  },
+  onLoad: function (options) {
+    wx.getStorage({
+      key: 'userInfo',
+      success: res => {
+        this.setData({
+          userInfo: res.data
+        })
+        this.getData();
+      },
+      fail:error=>{
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  getData() {
+    wx.request({
+      url: host + '/api/wx/stock/search',
+      header: {
+        'Authorization': this.data.userInfo.token
+      },
+      success: res => {
+        this.setData({
+          stockList:res.data.data
+        })
+      },
+      fail: error => {
+        //失败重新登陆
+        wx.switchTab({
+          url: '../user/user',
+        })
+      }
+    })
+  },
+  /**添加持股 */
+  add(){
+    var stock = this.data.stock;
+    var value=this.data.value;
+    stock.push({ name: '', fund: '' })
+    value.push(-1)
+    this.setData({
+      stock: stock,
+      value: value
+    })
+  },
+  del(e){
+    var i = e.target.dataset.id;
+    var stock = this.data.stock;
+    var value = this.data.value; 
+    stock.splice(i,1)
+    value.splice(i,1)
+    this.setData({
+      stock: stock,
+      value: value
+    })
+  },
+  bindPickerChange(e){
+    var i=e.target.dataset.id;
+    var v = e.detail.value
+    var stock=this.data.stock;
+    var list=this.data.stockList; 
+    var value=this.data.value;  
+    value[i] =v;
+    stock[i]={
+      name: list[v].name,
+      code:list[v].code,
+      label: list[v].name +"("+list[v].code+")"
+    }
+    this.setData({
+      stock: stock,
+      value: value
+    })
+  },
+  fundChange(e){
+    var i = e.target.dataset.id;
+    var v = e.detail.value
+    var stock = this.data.stock;
+    stock[i].fund=v;
+    this.setData({
+      stock: stock
+    })
+  },
+  fundChange1(e) {
+    var v = e.detail.value
+    this.setData({
+      today_fund: v
+    })
+  },
+  switch1Change(e){
+      this.setData({
+        is_markt: Number(e.detail.value)
+      })
+  },
+  upload(){
+    var today_stock_img = this.data.today_stock_img;
+    wx.chooseImage({
+      success: res=> {
+        const tempFilePaths = res.tempFilePaths
+        wx.uploadFile({
+          url: host+'/api/wx/uploadfile', 
+          filePath: tempFilePaths[0],
+          name: 'file',
+          success: res=> {
+            const data = JSON.parse(res.data)
+            today_stock_img.push(data.data.url)
+            this.setData({
+              today_stock_img: today_stock_img
+            })
+          }
+        })
+      }
+    })
+
+  },
+  del1(e) {
+    var i = e.target.dataset.id;
+    var today_stock_img = this.data.today_stock_img;
+    today_stock_img.splice(i, 1)
+    this.setData({
+      today_stock_img: today_stock_img
+    })
+  },
+  post(){
+    var parm={
+      stock_date: this.data.stock_date,
+      today_stock:this.data.stock,
+      is_markt: this.data.is_markt,
+      today_stock_img: this.data.today_stock_img,
+      today_fund: this.data.today_fund
+    }
+    wx.showLoading({
+      title: '正在提交',
+    })
+    wx.request({
+      url: host + '/api/wx/player/record',
+      data:parm,
+      header: {
+        'Authorization': this.data.userInfo.token
+      },
+      method:'POST',
+      success: res => {
+        wx.hideLoading()
+        wx.showToast({
+          title: '提交成功',
+        })
+        setTimeout(()=>{
+          this.setData({
+            stock: [{ label: '', name: '', code: '', fund: '' }],
+            stockList: [],
+            today_stock_img: [],
+            value: [-1],
+            is_markt: 0,
+            today_fund: ''
+          })
+          wx.switchTab({
+            url: '../index/index',
+          })
+        },200)
+      },
+      fail: error => {
+        wx.hideLoading()
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/upload/upload.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "上传"
+}

+ 40 - 0
pages/upload/upload.wxml

@@ -0,0 +1,40 @@
+<form>
+    <view class="label" style="margin-bottom:32rpx">持仓日期   {{stock_date}}</view>
+    <view class="label">今日净资产</view>
+    <input bindinput="fundChange1" placeholder="请输入今日净资产"></input>
+    <view class="label">今日持股</view>
+    <view class="info" wx:for='{{stock}}'>
+      <!-- <input placeholder="请输入名称"></input> -->
+      <picker  bindchange="bindPickerChange" data-id='{{index}}' value="{{value[index]}}" range-key='name' range="{{stockList}}">
+        <view class="picker">
+          <text wx:if='{{value[index]<0}}' style="color:#999;">请选择股票</text>
+          {{stockList[value[index]].name}}
+        </view>
+      </picker>
+      <input bindinput="fundChange" data-id='{{index}}' value="{{item.fund}}" placeholder="请输入资金额"></input>
+      <text>w</text>
+      <view bindtap="add" wx:if='{{index==stock.length-1}}' class="add">添加持股</view>
+      <view   wx:else style="width:28%;">
+        <icon bindtap="del" data-id='{{index}}' style="margin-top:20rpx;" class="icon-small" type="cancel" size="23"></icon>
+      </view>
+    </view>
+    <view class="openmarket">  
+        开超市  
+        <switch checked="{{is_markt}}" bindchange="switch1Change"/>
+    </view> 
+    <view class="label">账户截图</view>
+    <view wx:for='{{today_stock_img}}'>
+        <image style="width:220rpx;" mode="widthFix" src="{{item}}"></image>
+        <icon bindtap="del1" data-id='{{index}}' class="icon-small" type="cancel" size="23"></icon>
+    </view>
+    <image bindtap="upload" class="upload" mode="widthFix" src="../images/upload.png"></image>
+    <view class="tips">
+        <text>注意</text>
+        <text>1、当天下午3:30点以前提交作业,逾期不候。</text>
+        <text>2、有特殊情况和资金进出,请联系副主编QQ。</text>
+        <text>3、当天持股在6只以上,可以选择开超市。</text>
+        <text>4、账户截图请屏蔽股东账户-开户名等个人信息,每日仅公布前三选手交割单,其余保密。</text>
+    </view>
+
+    <button bindtap="post">提交</button>
+</form>

+ 87 - 0
pages/upload/upload.wxss

@@ -0,0 +1,87 @@
+/* pages/upload/upload.wxss */
+page{
+  padding:0 32rpx 32rpx;
+}
+.label{
+  font-size: 28rpx;
+  font-weight: 500;
+  margin: 32rpx 0 16rpx;
+}
+input,.picker{
+  height: 88rpx;
+  background: #F4F6F8;
+  border-radius: 16rpx;
+  padding: 0 20rpx;
+  font-size: 28rpx;
+  max-width: 100%;
+  border: 1px solid #EEEEEE;
+}
+picker{
+  width: 30%;
+}
+.picker{
+  line-height: 88rpx;
+}
+.info{
+  display: flex;
+  margin-bottom: 15rpx;
+  justify-content: space-between;
+}
+.info input{
+  width: 30%;
+  display: inline-block;
+}
+.info text{
+  display: inline-block;
+  line-height: 88rpx;
+  vertical-align: top;
+}
+.add{
+  background: #FF5151;
+  width: 28%;
+  /* display: inline-block; */
+  color: #fff;
+  font-size: 28rpx;
+  border-radius: 16rpx;
+  line-height: 88rpx;
+  text-align: center;
+  vertical-align: top;
+}
+.openmarket{
+  height: 88rpx;
+  background: #F4F6F8;
+  border-radius: 16rpx;
+  padding: 0 20rpx;
+  font-size: 28rpx;
+  border: 1px solid #EEEEEE;
+  margin: 16rpx 0;
+  line-height: 88rpx;
+}
+.openmarket switch{
+  float: right;
+  position: relative;
+  top: -4rpx;
+}
+.tips{
+  margin-top: 32rpx;
+}
+.tips text{
+  display: block;
+  color: #666;
+  font-size: 24rpx;
+  line-height: 40rpx;
+}
+form button:not([size='mini']){
+  background: #FF5151;
+  color: #fff;
+  width: 80%;
+  height: 88rpx;
+  line-height: 88rpx;
+  padding: 0;
+  font-size: 32rpx;
+  border-radius: 16rpx;
+  margin-top: 50rpx;
+}
+.upload{
+  width: 220rpx;
+}

+ 165 - 0
pages/user/user.js

@@ -0,0 +1,165 @@
+// pages/user/user.js
+const app = getApp()
+var host = app.globalData.host;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    usercode:'',
+    openid:'',
+    info:{},
+    userInfo:{},  //登陆成功的信息
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+      wx.getStorage({
+        key: 'userInfo',
+        success:res=>{
+          this.setData({
+            userInfo:res.data
+          })
+          this.getUserData();
+        }
+      })
+  },
+  getUserData(){
+      wx.request({
+        url: host+'/api/wx/authinfo',
+        header:{
+          'Authorization':this.data.userInfo.token
+        },
+        success:res=>{
+          this.setData({
+            usercode: res.data.data.usercode
+          })
+        },
+        fail:error=>{
+          //失败重新登陆
+          this.setData({
+            userInfo: {}
+          })
+        }
+      })
+  },
+  inputchange(e){
+    this.setData({
+      usercode:e.detail.value
+    })
+  },
+  /**登陆 */
+  login:function(){
+    var _this=this;
+    if(!this.data.usercode){
+        wx.showToast({
+          icon:'none',
+          title: '请输入用户代码',
+        })
+        return;
+    }
+    wx.showLoading({
+      title: '正在登陆',
+    })
+    wx.getUserInfo({
+      success(res){
+        //获取基本信息
+        var data={
+          nickName: res.userInfo.nickName,
+          avatarUrl: res.userInfo.avatarUrl,
+          usercode: _this.data.usercode
+        }
+        wx.login({
+          success(res) {
+            //获取code
+            wx.request({
+              url: host + '/api/wx/openid',
+              data: {
+                code: res.code
+              },
+              success(res) {
+                //获取openid
+                data.openid=res.data.data.openid
+                wx.request({
+                  url: host + '/api/wx/login',
+                  method:'POST',
+                  data: data,
+                  success(res){
+                      //登陆成功
+                      wx.hideLoading();
+                    console.log(res.data.data)
+                      _this.setData({
+                        userInfo : res.data.data
+                      })
+                      wx.setStorage({
+                        key: 'userInfo',
+                        data: res.data.data,
+                      })
+                  },
+                  fail(){
+                    wx.hideLoading();
+                  }
+                })
+              },
+              fail() {
+                wx.hideLoading();
+              }
+            })
+          }
+        })
+      }
+    })
+    
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/user/user.json

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

+ 24 - 0
pages/user/user.wxml

@@ -0,0 +1,24 @@
+<view class="bg">
+    <image style="width:100%;" mode="widthFix" src="../images/my_bg.png"></image>
+      <view class="info">
+        <view class='avatar'>
+            <open-data  type="userAvatarUrl"></open-data>
+        </view>
+        <view class="name">
+            <open-data  type="userNickName"></open-data>
+            <view  wx:if='{{userInfo.id}}'>代码:{{usercode}}</view>
+            <view wx:else style="margin-top:20rpx;">欢迎来到湖南顽主杯实盘大赛</view>
+        </view>
+      </view>
+      <navigator wx:if='{{userInfo.id}}' class="item" url="../game/game">
+          参赛数据  <image mode="widthFix" src="../images/right_icon.png"></image>
+      </navigator>
+      <navigator  wx:if='{{userInfo.id}}' class="item" url="../aboutus/aboutus">
+          关于我们  <image mode="widthFix" src="../images/right_icon.png"></image>
+      </navigator>
+
+      <view class="login"  wx:if='{{!userInfo.id}}' >
+        <input bindinput='inputchange' placeholder="请输入您的代码" value="{{usercode}}"></input>
+        <button bindtap="login">登录</button>
+      </view>
+</view>

+ 62 - 0
pages/user/user.wxss

@@ -0,0 +1,62 @@
+/* pages/user/user.wxss */
+page{
+  background: #F4F6F8;
+  position: fixed;
+}
+.bg{
+  background: #fff;
+}
+.avatar{
+  width: 140rpx;
+  height: 140rpx;
+  border-radius: 100%;
+  overflow: hidden;
+  margin:0  auto 20rpx;
+}
+.name{
+  text-align: center;
+  font-size: 40rpx;
+  font-weight: 500;
+}
+.name view{
+  font-size: 32rpx;
+}
+.info{
+  position: relative;
+  top: -80rpx;
+}
+.item{
+  padding: 0 48rpx;
+  line-height: 108rpx;
+  font-size: 32rpx;
+}
+.item image{
+  width: 32rpx;
+  float: right;
+  margin-top: 38rpx;
+}
+
+.login{
+  padding: 150rpx 120rpx 0;
+  height: 100vh;
+}
+.login input{
+  width: 100%;
+  text-align: center;
+  height: 108rpx;
+  background: #F4F6F8;
+  font-size: 32rpx;
+  border-radius: 16rpx;
+  border: 1px solid #EEEEEE;
+}
+.login button:not([size='mini']){
+  background: #FF5151;
+  color: #fff;
+  width: 100%;
+  margin-top: 48rpx;
+  height: 108rpx;
+  line-height: 108rpx;
+  padding: 0;
+  font-size: 32rpx;
+  border-radius: 16rpx;
+}

File diff suppressed because it is too large
+ 2044 - 0
pages/utils/wxcharts.js


+ 56 - 0
project.config.json

@@ -0,0 +1,56 @@
+{
+	"description": "ECharts 图表示例",
+	"setting": {
+		"urlCheck": false,
+		"es6": true,
+		"enhance": false,
+		"postcss": false,
+		"minified": false,
+		"newFeature": true,
+		"coverView": true,
+		"nodeModules": false,
+		"autoAudits": false,
+		"showShadowRootInWxmlPanel": true,
+		"scopeDataCheck": false,
+		"uglifyFileName": false,
+		"checkInvalidKey": true,
+		"checkSiteMap": true,
+		"uploadWithSourceMap": true,
+		"babelSetting": {
+			"ignore": [],
+			"disablePlugins": [],
+			"outputPath": ""
+		},
+		"bundle": false,
+		"preloadBackgroundData": false,
+		"compileHotReLoad": false,
+		"useMultiFrameRuntime": true,
+		"useApiHook": true,
+		"useApiHostProcess": false,
+		"enableEngineNative": false,
+		"useIsolateContext": true,
+		"useCompilerModule": true,
+		"userConfirmedUseCompilerModuleSwitch": false,
+		"userConfirmedBundleSwitch": false,
+		"packNpmManually": false,
+		"packNpmRelationList": [],
+		"minifyWXSS": true
+	},
+	"compileType": "miniprogram",
+	"libVersion": "2.15.0",
+	"appid": "wx2938132b773c7b5a",
+	"projectname": "wanzhubei",
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
+	"condition": {
+		"search": {
+			"list": []
+		},
+		"conversation": {
+			"list": []
+		},
+		"miniprogram": {
+			"list": []
+		}
+	}
+}

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}