Jelajahi Sumber

first commit

fxy 2 tahun lalu
melakukan
1468f46b88
100 mengubah file dengan 2294 tambahan dan 0 penghapusan
  1. 13 0
      .gitignore
  2. 40 0
      app.js
  3. 86 0
      app.json
  4. 25 0
      app.wxss
  5. TEMPAT SAMPAH
      images/add-1.png
  6. TEMPAT SAMPAH
      images/add-2.png
  7. TEMPAT SAMPAH
      images/add-img.png
  8. TEMPAT SAMPAH
      images/avatar-2.png
  9. TEMPAT SAMPAH
      images/avatar-3.png
  10. TEMPAT SAMPAH
      images/avatar.png
  11. TEMPAT SAMPAH
      images/back-icon.png
  12. TEMPAT SAMPAH
      images/back-icon2.png
  13. TEMPAT SAMPAH
      images/back-icon3.png
  14. TEMPAT SAMPAH
      images/back-icon4.png
  15. TEMPAT SAMPAH
      images/back-icon5.png
  16. TEMPAT SAMPAH
      images/bg-10.png
  17. TEMPAT SAMPAH
      images/bg-2.png
  18. TEMPAT SAMPAH
      images/bg-3.png
  19. TEMPAT SAMPAH
      images/bg-4.png
  20. TEMPAT SAMPAH
      images/bg-5.png
  21. TEMPAT SAMPAH
      images/bg-6.png
  22. TEMPAT SAMPAH
      images/bg-7.png
  23. TEMPAT SAMPAH
      images/bg-8.png
  24. TEMPAT SAMPAH
      images/bg-9.png
  25. TEMPAT SAMPAH
      images/bg-login.png
  26. TEMPAT SAMPAH
      images/bg.png
  27. TEMPAT SAMPAH
      images/circle-active.png
  28. TEMPAT SAMPAH
      images/circle.png
  29. TEMPAT SAMPAH
      images/close-icon.png
  30. TEMPAT SAMPAH
      images/close-icon2.png
  31. TEMPAT SAMPAH
      images/foot-1.png
  32. TEMPAT SAMPAH
      images/foot-1active.png
  33. TEMPAT SAMPAH
      images/foot-2.png
  34. TEMPAT SAMPAH
      images/foot-2active.png
  35. TEMPAT SAMPAH
      images/foot-3.png
  36. TEMPAT SAMPAH
      images/foot-3active.png
  37. TEMPAT SAMPAH
      images/foot-4.png
  38. TEMPAT SAMPAH
      images/foot-4active.png
  39. TEMPAT SAMPAH
      images/head-bg.png
  40. TEMPAT SAMPAH
      images/icon-10.png
  41. TEMPAT SAMPAH
      images/icon-11.png
  42. TEMPAT SAMPAH
      images/icon-12.png
  43. TEMPAT SAMPAH
      images/icon-13.png
  44. TEMPAT SAMPAH
      images/icon-14.png
  45. TEMPAT SAMPAH
      images/icon-15.png
  46. TEMPAT SAMPAH
      images/icon-17.png
  47. TEMPAT SAMPAH
      images/icon-18.png
  48. TEMPAT SAMPAH
      images/icon-19.png
  49. TEMPAT SAMPAH
      images/icon-2.png
  50. TEMPAT SAMPAH
      images/icon-20.png
  51. TEMPAT SAMPAH
      images/icon-3.png
  52. TEMPAT SAMPAH
      images/icon-4.png
  53. TEMPAT SAMPAH
      images/icon-5.png
  54. TEMPAT SAMPAH
      images/icon-6.png
  55. TEMPAT SAMPAH
      images/icon-8.png
  56. TEMPAT SAMPAH
      images/icon-9.png
  57. TEMPAT SAMPAH
      images/icon.png
  58. TEMPAT SAMPAH
      images/index-menu1.png
  59. TEMPAT SAMPAH
      images/index-menu2.png
  60. TEMPAT SAMPAH
      images/index-menu3.png
  61. TEMPAT SAMPAH
      images/index-menu4.png
  62. TEMPAT SAMPAH
      images/index-menu5.png
  63. TEMPAT SAMPAH
      images/location-icon.png
  64. TEMPAT SAMPAH
      images/nav-1.png
  65. TEMPAT SAMPAH
      images/nav-10.png
  66. TEMPAT SAMPAH
      images/nav-11.png
  67. TEMPAT SAMPAH
      images/nav-12.png
  68. TEMPAT SAMPAH
      images/nav-2.png
  69. TEMPAT SAMPAH
      images/nav-3.png
  70. TEMPAT SAMPAH
      images/nav-4.png
  71. TEMPAT SAMPAH
      images/nav-5.png
  72. TEMPAT SAMPAH
      images/nav-6.png
  73. TEMPAT SAMPAH
      images/nav-7.png
  74. TEMPAT SAMPAH
      images/nav-8.png
  75. TEMPAT SAMPAH
      images/nav-9.png
  76. TEMPAT SAMPAH
      images/normal.png
  77. TEMPAT SAMPAH
      images/open.png
  78. TEMPAT SAMPAH
      images/return.png
  79. TEMPAT SAMPAH
      images/sanjiao.png
  80. TEMPAT SAMPAH
      images/search-icon.png
  81. TEMPAT SAMPAH
      images/search-icon2.png
  82. TEMPAT SAMPAH
      images/selected.png
  83. TEMPAT SAMPAH
      images/title.png
  84. 105 0
      pages/activity-rule/activity-rule.js
  85. 3 0
      pages/activity-rule/activity-rule.json
  86. 26 0
      pages/activity-rule/activity-rule.wxml
  87. 114 0
      pages/activity-rule/activity-rule.wxss
  88. 235 0
      pages/apply-to-be-an-employee/apply-to-be-an-employee.js
  89. 3 0
      pages/apply-to-be-an-employee/apply-to-be-an-employee.json
  90. 35 0
      pages/apply-to-be-an-employee/apply-to-be-an-employee.wxml
  91. 181 0
      pages/apply-to-be-an-employee/apply-to-be-an-employee.wxss
  92. 511 0
      pages/authentication-information/authentication-information.js
  93. 3 0
      pages/authentication-information/authentication-information.json
  94. 127 0
      pages/authentication-information/authentication-information.wxml
  95. 297 0
      pages/authentication-information/authentication-information.wxss
  96. 120 0
      pages/balance-details/balance-details.js
  97. 3 0
      pages/balance-details/balance-details.json
  98. 47 0
      pages/balance-details/balance-details.wxml
  99. 215 0
      pages/balance-details/balance-details.wxss
  100. 105 0
      pages/balance-rules/balance-rules.js

+ 13 - 0
.gitignore

@@ -0,0 +1,13 @@
+# uniapp
+/unpackage
+
+# Node.js
+/node_modules
+
+.idea
+
+dist
+
+.hbuilderx
+
+*.zip

+ 40 - 0
app.js

@@ -0,0 +1,40 @@
+App({
+  onLaunch: function () {
+    let updateManager = wx.getUpdateManager()
+    updateManager.onCheckForUpdate(function (res) {
+      console.log(res.hasUpdate)
+    })
+
+    updateManager.onUpdateReady(function () {
+      wx.showModal({
+        title: '更新提示',
+        content: '新版本已经准备好,是否重启应用?',
+        success(res) {
+          if (res.confirm) {
+            updateManager.applyUpdate()
+          }
+        }
+      })
+    })
+    updateManager.onUpdateFailed(function () {
+      wx.showToast({
+        title: '更新失败',
+        icon: 'none'
+      })
+    })
+
+  },
+  config: require('utils/config.js'), //全局配置信息
+  api: require('utils/api.js'), //接口文档
+  db: require('utils/db.js'), //本地存储
+  common: require('utils/common.js'),
+  globalData: {
+    userInfo: null,
+    // navHeight: 0
+    music: '',
+    code: '', // 登录注册用
+    user_id: 0,
+    upload_image_url: 'https://ydxcx.mufengnet.com/api/up_files/upload_image'
+  }
+}) 
+ 

+ 86 - 0
app.json

@@ -0,0 +1,86 @@
+{
+    "pages": [ 
+        "pages/index/index",
+        "pages/balance-rules/balance-rules",
+        "pages/look-results/look-results",
+        "pages/order-details/order-details",
+        "pages/confirm-order/confirm-order",
+        "pages/exchange-record/exchange-record",
+        "pages/feedback-radio/feedback-radio",
+        "pages/exchange-details-page/exchange-details-page",
+        "pages/other-features/other-features",
+        "pages/commission-exchange/commission-exchange",
+        "pages/authentication-information/authentication-information",
+        "pages/real-name-authentication-msg/real-name-authentication-msg",
+        "pages/real-name-authentication/real-name-authentication",
+        "pages/invoice-information/invoice-information",
+        "pages/integral-rules/integral-rules",
+        "pages/feedback/feedback",
+        "pages/confirm-change/confirm-change",
+        "pages/integral-mall/integral-mall",
+        "pages/referees/referees",
+        "pages/invite-friends/invite-friends",
+        "pages/release-requirements/release-requirements",
+        "pages/apply-to-be-an-employee/apply-to-be-an-employee",
+        "pages/modify-mine/modify-mine",
+        "pages/points-details/points-details",
+        "pages/balance-details/balance-details",
+        "pages/historical-progress/historical-progress",
+        "pages/withdraw/withdraw",
+        "pages/common-problem/common-problem",
+        "pages/search/search",
+        "pages/product-details/product-details",
+        "pages/more-categories/more-categories", 
+        "pages/order/order",
+        "pages/my/my",
+        "pages/activity-rule/activity-rule",
+        "pages/successful-application/successful-application"
+    ],
+    "window": {
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "",
+        "navigationBarTextStyle": "black",
+        "backgroundTextStyle": "light"
+      }, 
+    "tabBar": {
+        "color": "#333333",
+        "selectedColor": "#333333",
+        "backgroundColor": "#fff",
+        "borderStyle": "white",
+        "position": "bottom",
+        "list": [{
+                "iconPath": "/images/foot-1.png",
+                "selectedIconPath": "/images/foot-1active.png",
+                "pagePath": "pages/index/index",
+                "text": "首页"
+            },
+            {
+                "iconPath": "/images/foot-2.png",
+                "selectedIconPath": "/images/foot-2active.png",
+                "pagePath": "pages/release-requirements/release-requirements",
+                "text": "发布"
+            },
+            {
+                "iconPath": "/images/foot-3.png",
+                "selectedIconPath": "/images/foot-3active.png",
+                "pagePath": "pages/order/order",
+                "text": "订单"
+            }, 
+            {
+                "iconPath": "/images/foot-4.png",
+                "selectedIconPath": "/images/foot-4active.png",
+                "pagePath": "pages/my/my",
+                "text": "我的"
+            }
+        ]
+    },
+    "permission": {
+        "scope.userLocation": {
+            "desc": "用于获取地址信息"
+        }
+    },
+    "sitemapLocation": "sitemap.json",
+    "useExtendedLib": {
+        "weui": true
+    }
+}

+ 25 - 0
app.wxss

@@ -0,0 +1,25 @@
+/**app.wxss**/
+button {
+  width: unset;
+  line-height: 1;
+  background: initial;
+  padding: 0;
+  margin: 0;
+}
+
+button::after {
+  border: none;
+  outline: 0;
+}
+
+.button-hover {
+  background-color: transparent;
+}
+
+.container {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  padding: 50rpx;
+  box-sizing: border-box;
+}

TEMPAT SAMPAH
images/add-1.png


TEMPAT SAMPAH
images/add-2.png


TEMPAT SAMPAH
images/add-img.png


TEMPAT SAMPAH
images/avatar-2.png


TEMPAT SAMPAH
images/avatar-3.png


TEMPAT SAMPAH
images/avatar.png


TEMPAT SAMPAH
images/back-icon.png


TEMPAT SAMPAH
images/back-icon2.png


TEMPAT SAMPAH
images/back-icon3.png


TEMPAT SAMPAH
images/back-icon4.png


TEMPAT SAMPAH
images/back-icon5.png


TEMPAT SAMPAH
images/bg-10.png


TEMPAT SAMPAH
images/bg-2.png


TEMPAT SAMPAH
images/bg-3.png


TEMPAT SAMPAH
images/bg-4.png


TEMPAT SAMPAH
images/bg-5.png


TEMPAT SAMPAH
images/bg-6.png


TEMPAT SAMPAH
images/bg-7.png


TEMPAT SAMPAH
images/bg-8.png


TEMPAT SAMPAH
images/bg-9.png


TEMPAT SAMPAH
images/bg-login.png


TEMPAT SAMPAH
images/bg.png


TEMPAT SAMPAH
images/circle-active.png


TEMPAT SAMPAH
images/circle.png


TEMPAT SAMPAH
images/close-icon.png


TEMPAT SAMPAH
images/close-icon2.png


TEMPAT SAMPAH
images/foot-1.png


TEMPAT SAMPAH
images/foot-1active.png


TEMPAT SAMPAH
images/foot-2.png


TEMPAT SAMPAH
images/foot-2active.png


TEMPAT SAMPAH
images/foot-3.png


TEMPAT SAMPAH
images/foot-3active.png


TEMPAT SAMPAH
images/foot-4.png


TEMPAT SAMPAH
images/foot-4active.png


TEMPAT SAMPAH
images/head-bg.png


TEMPAT SAMPAH
images/icon-10.png


TEMPAT SAMPAH
images/icon-11.png


TEMPAT SAMPAH
images/icon-12.png


TEMPAT SAMPAH
images/icon-13.png


TEMPAT SAMPAH
images/icon-14.png


TEMPAT SAMPAH
images/icon-15.png


TEMPAT SAMPAH
images/icon-17.png


TEMPAT SAMPAH
images/icon-18.png


TEMPAT SAMPAH
images/icon-19.png


TEMPAT SAMPAH
images/icon-2.png


TEMPAT SAMPAH
images/icon-20.png


TEMPAT SAMPAH
images/icon-3.png


TEMPAT SAMPAH
images/icon-4.png


TEMPAT SAMPAH
images/icon-5.png


TEMPAT SAMPAH
images/icon-6.png


TEMPAT SAMPAH
images/icon-8.png


TEMPAT SAMPAH
images/icon-9.png


TEMPAT SAMPAH
images/icon.png


TEMPAT SAMPAH
images/index-menu1.png


TEMPAT SAMPAH
images/index-menu2.png


TEMPAT SAMPAH
images/index-menu3.png


TEMPAT SAMPAH
images/index-menu4.png


TEMPAT SAMPAH
images/index-menu5.png


TEMPAT SAMPAH
images/location-icon.png


TEMPAT SAMPAH
images/nav-1.png


TEMPAT SAMPAH
images/nav-10.png


TEMPAT SAMPAH
images/nav-11.png


TEMPAT SAMPAH
images/nav-12.png


TEMPAT SAMPAH
images/nav-2.png


TEMPAT SAMPAH
images/nav-3.png


TEMPAT SAMPAH
images/nav-4.png


TEMPAT SAMPAH
images/nav-5.png


TEMPAT SAMPAH
images/nav-6.png


TEMPAT SAMPAH
images/nav-7.png


TEMPAT SAMPAH
images/nav-8.png


TEMPAT SAMPAH
images/nav-9.png


TEMPAT SAMPAH
images/normal.png


TEMPAT SAMPAH
images/open.png


TEMPAT SAMPAH
images/return.png


TEMPAT SAMPAH
images/sanjiao.png


TEMPAT SAMPAH
images/search-icon.png


TEMPAT SAMPAH
images/search-icon2.png


TEMPAT SAMPAH
images/selected.png


TEMPAT SAMPAH
images/title.png


+ 105 - 0
pages/activity-rule/activity-rule.js

@@ -0,0 +1,105 @@
+const util = require('../../utils/util');
+const app = getApp()
+const WxParse = require('../../wxParse/wxParse.js')
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        navbarHeight: 0,
+        content: ''
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            navbarHeight: util.getNavbarHeight(),
+        })
+        //改变头部电量条背景色
+        wx.setNavigationBarColor({
+            frontColor: '#ffffff',
+            backgroundColor: '#ffffff',
+        });
+        wx.getSystemInfo({
+            success: (res) => {
+                this.setData({
+                    screenWidth: res.screenWidth
+                });
+            }
+        })
+        this.getUserActivityRule()
+    },
+    /**
+     * 返回上一页
+     */
+    back() {
+        wx.navigateBack({
+            delta: 1,
+        });
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 获取活动规则
+     */
+    getUserActivityRule: function () {
+        let page = this
+        app.api.getUserActivityRule("", function (res) {
+            if (res.code > 0) {
+                let article = res.data
+                WxParse.wxParse('article', 'html', article, page,5);
+                page.setData({
+                    content: res.data
+                })
+            } else {
+                wx.showToast({
+                  title: res.msg,
+                  icon: 'none'
+                })
+            }
+        })
+    }
+})

+ 3 - 0
pages/activity-rule/activity-rule.json

@@ -0,0 +1,3 @@
+{
+  "navigationStyle": "custom"
+}

+ 26 - 0
pages/activity-rule/activity-rule.wxml

@@ -0,0 +1,26 @@
+<!--活动规则-->
+<image src="../../images/head-bg.png" class="head-bg" style="height: {{navbarHeight + 7}}px;" />
+<view class="wrap" style="height: {{navbarHeight + 7}}px;">
+    <view class="return" bindtap="back">
+        <image src="../../images/return.png" mode="widthFix" class="back-icon" />
+    </view>
+    <view class="title">活动规则</view>
+</view>
+<view class="container-wrap" style="margin-top: {{navbarHeight + 7}}px;">
+    <view class="module">
+        <!-- <view class="item">
+            <view class="item-title">什么是余额?</view>
+            <view class="item-msg">积分是元素魔方积分商城中的一种有价货币值,用户可以用
+                自己的积分在积分商城中兑换上面的物品或者服务。</view>
+        </view> -->
+        <view class="item" wx:if="{{content.length>0}}">
+            <import src="../../wxParse/wxParse.wxml"/>
+            <template is="wxParse" data="{{wxParseData:article.nodes}}"/>
+        </view>
+        <!-- 无内容时显示 -->
+        <view class="normal-box" wx:if="{{content.length==0}}">
+            <image src="../../images/normal.png" mode="widthFix"></image>
+            <text>暂无内容</text>
+        </view>
+    </view>
+</view>

+ 114 - 0
pages/activity-rule/activity-rule.wxss

@@ -0,0 +1,114 @@
+/* pages/activity-rule/activity-rule.wxss */
+@import '../../wxParse/wxParse.wxss';
+page {
+    background-color: #F5F6FA;
+}
+
+.head-bg {
+    width: 100%;
+    overflow: hidden;
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1;
+}
+
+.wrap {
+    width: 100%;
+    position: fixed;
+    left: 0;
+    top: 0;
+    background-color: rgba(0, 0, 0, 0);
+    z-index: 999999999;
+    display: flex;
+    align-items: center;
+}
+
+.title {
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 16px;
+    color: #fff;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+}
+
+.return {
+    height: 30px;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 12px;
+    box-sizing: border-box;
+    z-index: 9999999999;
+}
+
+.back-icon {
+    width: 10px;
+}
+
+.container-wrap {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+}
+
+.module {
+    width: 100%;
+    padding: 0 30rpx;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    background-color: #fff;
+    margin: 20rpx 0;
+    padding: 22rpx 30rpx;
+    box-sizing: border-box;
+}
+
+.item {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    margin-bottom: 20rpx;
+}
+
+.item:last-child {
+    margin-bottom: 0;
+}
+
+.item-title {
+    color: #333333;
+    font-size: 30rpx;
+    margin-bottom: 10rpx;
+}
+
+.item-msg {
+    width: 100%;
+    color: #999999;
+    font-size: 26rpx;
+}
+.normal-box {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    font-size: 30rpx;
+    color: #999999;
+    padding: 280rpx 0;
+}
+
+.normal-box>image {
+    width: 420rpx;
+}
+
+.normal-box>text {
+    margin-top: -56rpx;
+}

+ 235 - 0
pages/apply-to-be-an-employee/apply-to-be-an-employee.js

@@ -0,0 +1,235 @@
+const util = require('../../utils/util');
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        navbarHeight: 0,
+        info: {
+            id: 0,
+            receiving_name: '',
+            receiving_phone: '',
+            code: '',
+            skill_introduction: ''
+        },
+        lock: false,
+        time: 60,
+        lock_code: false,
+        btn_desc: '获取验证码'
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        let page = this
+        page.setData({
+            navbarHeight: util.getNavbarHeight(),
+        })
+        //改变头部电量条背景色
+        wx.setNavigationBarColor({
+            frontColor: '#ffffff',
+            backgroundColor: '#ffffff',
+        });
+        wx.getSystemInfo({
+            success: (res) => {
+                page.setData({
+                    screenWidth: res.screenWidth
+                });
+            }
+        })
+
+        let uid = app.db.get('element_uid'), info = page.data.info
+        info.id = uid
+        this.setData({
+            info: info
+        })
+    },
+    /**
+     * 返回上一页
+     */
+    back() {
+        wx.navigateBack({
+            delta: 1,
+        });
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+        
+    },
+
+    /**
+     * 发送验证码
+     */
+    sendCode: function () {
+        let page = this, mobile = page.data.info.receiving_phone, lock_code = page.data.lock_code
+        if (!/^1[3456789]\d{9}$/.test(mobile)) {
+            wx.showToast({
+              title: '请输入正确格式的手机号',
+              icon: 'none'
+            })
+            return
+        }
+        if (lock_code) {
+            return
+        }
+        app.api.senSmsCode ({phone: mobile}, function (res) {
+console.log(res)            
+            if (res.code > 0) {
+                wx.showToast({
+                  title: res.msg,
+                })
+                page.timeOut()
+            } else {
+                wx.showToast({
+                  title: res.msg,
+                  icon: 'none'
+                })
+            }
+        })
+    },
+
+    /**
+     * 倒计时
+     */
+    timeOut: function () {
+        let page = this, time = page.data.time
+        if (time > 1) {
+            time--
+            page.setData({
+                lock_code: true,
+                time: time,
+                btn_desc: time+' s'
+            })
+            page.timeOutSingle = setTimeout (function () {
+                page.timeOut()
+            },1000)
+        } else {
+            page.setData({
+                lock_code: false,
+                time: 60,
+                btn_desc: '获取验证码'
+            })
+            clearTimeout(page.timeOutSingle)
+        }
+    },
+
+    /**
+     * 输入框
+     */
+    setInputValue: function (e) {
+        let name = e.currentTarget.dataset.name, value = e.detail.value, info = this.data.info
+        info[name] = value
+        this.setData({
+            info: info
+        })
+    },
+
+    //提交申请
+    setAction: function () {
+        let page = this, info = page.data.info, lock = page.data.lock
+        if (!info.receiving_name) {
+            wx.showToast({
+              title: '请输入姓名',
+              icon: 'none'
+            })
+            return
+        }
+        if (!info.receiving_phone) {
+            wx.showToast({
+              title: '请输入联系电话',
+              icon: 'none'
+            })
+            return
+        }
+        if (!/^1[3456789]\d{9}$/.test(info.receiving_phone)) {
+            wx.showToast({
+              title: '手机号格式错误',
+              icon: 'none'
+            })
+            return
+        }
+        if (!info.code) {
+            wx.showToast({
+              title: '请输入验证码',
+              icon: 'none'
+            })
+            return
+        }
+        if (!info.skill_introduction) {
+            wx.showToast({
+              title: '请输入技能介绍',
+              icon: 'none'
+            })
+            return
+        }
+        if (lock) {
+            return
+        }
+        page.setData({
+            lock: true
+        })
+
+        console.log(info)
+        app.api.applyStaff(info, function (res) {
+            page.setData({
+                lock: false
+            })
+            console.log(res)
+            if (res.code > 0) {
+                wx.showToast({
+                  title: res.msg,
+                })
+                setTimeout(function () {
+                    wx.navigateBack({
+                      delta: 1,
+                    })    
+                },1500)
+            } else {
+                wx.showToast({
+                  title: res.msg,
+                  icon: 'none'
+                })
+            }
+        })
+    }
+})

+ 3 - 0
pages/apply-to-be-an-employee/apply-to-be-an-employee.json

@@ -0,0 +1,3 @@
+{
+  "navigationStyle": "custom"
+}

+ 35 - 0
pages/apply-to-be-an-employee/apply-to-be-an-employee.wxml

@@ -0,0 +1,35 @@
+<!-- 申请成为员工 -->
+<image src="../../images/head-bg.png" class="head-bg" style="height: {{navbarHeight + 7}}px;" />
+<view class="wrap" style="height: {{navbarHeight + 7}}px;">
+    <view class="return" bindtap="back">
+        <image src="../../images/return.png" mode="widthFix" class="back-icon" />
+    </view>
+    <view class="title">元素魔方</view>
+</view>
+<view class="container-wrap" style="margin-top: {{navbarHeight + 7}}px;">
+    <view class="module">
+        <view class="module-label">申请成为正式员工</view>
+        <view class="form-box">
+            <view class="apply-label">请填写申请信息</view>
+            <view class="row">
+                <view class="row-label">姓名</view>
+                <input type="text" class="row-input" placeholder-class="placeholder" placeholder="请填写您的姓名" bindinput="setInputValue" data-name="receiving_name"/>
+            </view>
+            <view class="row">
+                <view class="row-label">联系电话</view>
+                <input type="number" class="row-input" placeholder-class="placeholder" placeholder="请填写联系电话" bindinput="setInputValue" data-name="receiving_phone"/>
+            </view>
+            <view class="row">
+                <view class="row-label">验证码</view>
+                <input type="number" class="row-input" placeholder-class="placeholder" placeholder="请输入验证码" bindinput="setInputValue" data-name="code"/>
+                <button class="get-code" bindtap="sendCode">{{btn_desc}}</button>
+            </view>
+            <view class="box">
+                <textarea name="" class="textarea" placeholder="技能介绍" placeholder-class="placeholder" bindinput="setInputValue" data-name="skill_introduction"></textarea>
+            </view>
+        </view>
+    </view>
+    <view class="btn-box">
+        <button bindtap="setAction">提交申请</button>
+    </view>
+</view>

+ 181 - 0
pages/apply-to-be-an-employee/apply-to-be-an-employee.wxss

@@ -0,0 +1,181 @@
+/* pages/balance-details/balance-details.wxss */
+page {
+    background-color: #F5F6FA;
+}
+
+.head-bg {
+    width: 100%;
+    overflow: hidden;
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1;
+}
+
+.wrap {
+    width: 100%;
+    position: fixed;
+    left: 0;
+    top: 0;
+    background-color: rgba(0, 0, 0, 0);
+    z-index: 999999999;
+    display: flex;
+    align-items: center;
+}
+
+.title {
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 16px;
+    color: #fff;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+}
+
+.return {
+    height: 30px;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 12px;
+    box-sizing: border-box;
+    z-index: 9999999999;
+}
+
+.back-icon {
+    width: 10px;
+}
+
+.container-wrap {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+}
+
+.module {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    padding: 40rpx 25rpx 28rpx;
+    box-sizing: border-box;
+    background-color: #fff;
+    margin: 20rpx 0;
+}
+
+.module-label {
+    width: 100%;
+    font-size: 32rpx;
+    color: #333333;
+    padding: 0 29rpx;
+    box-sizing: border-box;
+    position: relative;
+    margin-bottom: 60rpx;
+}
+
+.module-label::after {
+    content: "";
+    position: absolute;
+    left: 0;
+    top: 50%;
+    transform: translate(0, -50%);
+    width: 9rpx;
+    height: 48rpx;
+    background-color: #4784F5;
+}
+
+.form-box {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    padding: 0 20rpx;
+    box-sizing: border-box;
+}
+
+.apply-label {
+    width: 100%;
+    color: #333333;
+    font-size: 30rpx;
+    font-weight: 500;
+    border-bottom: 1px solid #AFAFAF;
+    box-sizing: border-box;
+    padding: 10rpx 0;
+    margin-bottom: 30rpx;
+}
+
+.row {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    margin-bottom: 35rpx;
+}
+
+.row-label {
+    width: 25%;
+    color: #202020;
+    font-size: 32rpx;
+}
+
+.row-input {
+    flex: 1;
+    font-size: 32rpx;
+}
+
+.placeholder {
+    color: #919191;
+}
+
+.box {
+    width: 100%;
+    height: 265rpx;
+    border: 1px solid #E2E2E2;
+    box-sizing: border-box;
+    padding: 30rpx;
+}
+
+.textarea {
+    width: 100%;
+    height: 100%;
+    font-size: 30rpx;
+}
+
+.btn-box {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 80rpx 0;
+}
+
+.btn-box button {
+    width: 248rpx;
+    height: 76rpx;
+    line-height: 76rpx;
+    background-color: #2B86FF;
+    border-radius: 12rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 36rpx;
+    font-weight: 500;
+    color: #fff;
+}
+.get-code{
+    padding: 0 20rpx;
+    height: 50rpx;
+    line-height: 50rpx;
+    background-color: #2B86FF;
+    border-radius: 12rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 24rpx;
+    color: #fff;
+}

+ 511 - 0
pages/authentication-information/authentication-information.js

@@ -0,0 +1,511 @@
+const util = require('../../utils/util');
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        navbarHeight: 0,
+        //选项卡
+        tabActiveId: 1,
+        array: [], //身份
+        array2: [], //证件
+        //省市区
+        region: [],
+        regionString: '',
+        //上传
+        shenfenZ: '',
+        shenfenF: '',
+        data: {
+            identity_information: 1,
+            username: '',  
+            region: '',
+            workname: '',
+            working_direction: '',
+            identity: '',
+            certificates: '',
+            tutor: '',
+            email: '',
+            QQ: '',
+            front_certificate: ''  ,
+            reverse_certificate: '',
+            working_address: '',
+            enterprise_number: ''
+        },
+        config: {},
+        disabled: false,
+        isAuth: false,
+        authId: 0
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            navbarHeight: util.getNavbarHeight(),
+            disabled: options.status == 2 ? true : false,
+            isAuth: options.status == 2 ? true : false
+        })
+        //改变头部电量条背景色
+        wx.setNavigationBarColor({
+            frontColor: '#ffffff',
+            backgroundColor: '#ffffff',
+        });
+        wx.getSystemInfo({
+            success: (res) => {
+                this.setData({
+                    screenWidth: res.screenWidth
+                });
+            }
+        })
+        this.getAuthIdentityInfo()
+        this.getCertInfo()
+        this.getUploadConfig()
+        this.getUserIdentifyInfo()
+    },
+
+    /**
+     * 获取上传配置
+     */
+    getUploadConfig: function () {
+        let page = this
+        app.api.getUploadConfig("", function (res) {
+            if (res.code > 0) {
+                page.setData({
+                    config: res.data
+                })
+            }
+        })
+    },
+
+    /**
+     * 获取身份信息
+     */
+    getAuthIdentityInfo: function () {
+        let page = this, array = []
+        app.api.getAuthIdentityInfo("", function (res) {
+            if (res.code > 0) {
+                for (let i=0; i<res.data.length; i++) {
+                    array.push(res.data[i].title)
+                }
+                page.setData({
+                    array: array
+                })
+            }
+        })
+    },  
+
+    /**
+     * 获取证件信息
+     */
+    getCertInfo: function () {
+        let page = this, array2 = []
+        app.api.getCertInfo("", function (res) {
+            if (res.code > 0) {
+                for (let i=0; i<res.data.length; i++) {
+                    array2.push(res.data[i].title)
+                }
+                page.setData({
+                    array2: array2
+                })
+            }
+        })
+    },
+
+    /**
+     * 获取用户填写的信息
+     */
+    getUserIdentifyInfo: function () {
+        let page = this, data = page.data.data
+        app.api.getUserIdentifyInfo("", function (res) {
+            console.log(res)
+            if (res.code > 0) {
+                if (res.data.hasOwnProperty('authentication_status')) {
+                    data.identity_information = res.data.type 
+                    data.username = res.data.username
+                    data.region = res.data.region
+                    if (res.data.hasOwnProperty('workname')) {
+                        data.workname = res.data.workname
+                    }
+                    if (res.data.hasOwnProperty('working_direction')) {
+                        data.working_direction = res.data.working_direction
+                    }
+                    if (res.data.hasOwnProperty('identity')) {
+                        data.identity = res.data.identity
+                    }
+                    data.certificates = res.data.certificates
+                    if (res.data.hasOwnProperty('tutor')) {
+                        data.tutor = res.data.tutor
+                    }
+                    data.email = res.data.email
+                    data.QQ = res.data.QQ
+                    if (res.data.hasOwnProperty('working_address')) {
+                        data.working_address = res.data.working_address
+                    }
+                    if (res.data.hasOwnProperty('enterprise_number')) {
+                        data.enterprise_number = res.data.enterprise_number
+                    }
+
+                    let array = page.data.array, array2 = page.data.array2
+                    let index = '', index2 = ''
+                    if (res.data.hasOwnProperty('identity')) {
+                        for (let i=0; i<array.length; i++) {
+                            if (array[i] == res.data.identity) {
+                                index = i
+                            }
+                        }
+                    }
+                    for (let k=0; k<array2.length; k++) {
+                        if (array2[k] == res.data.certificates) {
+                            index2 = k
+                        }
+                    }
+                    page.setData({
+                        data: data,
+                        regionString: res.data.region,
+                        index: index,
+                        index2: index2,
+                        authId: res.data.id,
+                        tabActiveId: res.data.type
+                    })
+                }
+            }
+        })
+    },
+
+    /**
+     * 选项卡
+     */
+    tabClick(e) {
+        let page = this, data = page.data.data, d = e.currentTarget.dataset, isAuth = page.data.isAuth;
+        if (data.identity_information == d.id) {
+            return
+        }
+        if (isAuth) {
+            wx.showToast({
+              title: '已认证,不可切换',
+              icon: 'none'
+            })
+            return
+        }
+        // data.identity_information = d.id
+        this.setData({
+            tabActiveId: d.id,
+            [`data.identity_information`]: d.id
+        })
+    },
+    /**
+     * 身份 
+     */
+    bindPickerChange: function (e) {
+        let page = this, array = page.data.array, isAuth = page.data.isAuth
+        if (isAuth) {
+            wx.showToast({
+                title: '已认证,不可修改',
+                icon: 'none'
+              })
+              return
+        }
+        page.setData({
+            index: e.detail.value,
+            [`data.identity`]: array[e.detail.value]
+        })
+    },
+    /**
+     * 证件 
+     */
+    bindCertificateChange: function (e) {
+        let page = this, array2 = page.data.array2, isAuth = page.data.isAuth
+        if (isAuth) {
+            wx.showToast({
+                title: '已认证,不可修改',
+                icon: 'none'
+              })
+              return
+        }
+        page.setData({
+            index2: e.detail.value,
+            [`data.certificates`]: array2[e.detail.value]
+        })
+    },
+
+    /**
+     * 省市区
+     */
+    bindRegionChange: function (e) {
+        let region = e.detail.value;
+        let regionString = region[0] + '-' + region[1] + '-' + region[2];
+        if (this.data.isAuth) {
+            wx.showToast({
+                title: '已认证,不可修改',
+                icon: 'none'
+              })
+              return
+        }
+        this.setData({
+            region: e.detail.value,
+            regionString: regionString,
+            [`data.region`]: region[0]+region[1]+region[2]
+        })
+    },
+    /**
+     * 上传照片
+     */
+    uploadImg(e) {
+        let page = this, dataPost = page.data.data, certType = e.currentTarget.dataset.key, config = page.data.config;
+
+        if (!config.hasOwnProperty('policy')) {
+            wx.showToast({
+              title: '上传配置错误',
+              icon: 'none'
+            })
+            return
+        }
+        wx.chooseImage({
+            count: 1,
+            sizeType: ['original', 'compressed'],
+            sourceType: ['album', 'camera'],
+            success(res) {
+                let item = res.tempFilePaths[0];
+                let key = "image/" + new Date().getTime() + Math.floor(Math.random() * 150) + '.png'
+                wx.showLoading({
+                    title: '上传中...',
+                    icon: 'loading',
+                    mask: true
+                })
+                wx.uploadFile({
+                    url: config.host,
+                    filePath: item,
+                    name: 'file',
+                    formData: {
+                        key: key,
+                        policy: config.policy, // 输入你获取的的policy
+        
+                        OSSAccessKeyId: config.OSSAccessKeyId, // 输入你的AccessKeyId
+        
+                        success_action_status: '200', // 让服务端返回200,不然,默认会返回204
+        
+                        signature: config.Signature, // 输入你获取的的signature
+        
+                    },
+                    success(res) {
+                        console.log(res)
+                        wx.hideLoading();
+                        if (res.statusCode == 200) {
+                            dataPost[certType] = config.host + '/' + key
+                            page.setData({
+                                data: dataPost
+                            })
+                        }
+                    }
+                })
+            },
+            fail(res) {
+                wx.showToast({
+                    title: '选择图片失败',
+                    icon: 'none'
+                })
+            }
+        })
+    },
+    /**
+     * 返回上一页
+     */
+    back() {
+        wx.navigateBack({
+            delta: 1,
+        });
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 输入框输入
+     */
+    setInputValue: function (e) {
+        let page = this, data = page.data.data, name = e.currentTarget.dataset.name
+        data[name] = e.detail.value
+        page.setData({
+            data: data
+        })
+    },
+
+    /**
+     * 提交认证
+     */
+    authAction: function () {
+        let page = this, data = page.data.data, isAuth = page.data.isAuth, authId = page.data.authId
+        if (isAuth) {
+            app.api.userAuthDataModifyOnlyABle({id: authId,tutor: data.tutor,email: data.email,QQ: data.QQ}, function (res) {
+                if (res.code > 0) {
+                    wx.showToast({
+                      title: res.msg,
+                    })
+                    setTimeout(function () {
+                        wx.navigateBack({
+                          delta: 1,
+                        })
+                    },1000)
+                } else {
+                    wx.showToast({
+                      title: res.msg,
+                      icon: 'none'
+                    })
+                }
+            })
+        } else {
+            if (!data.username) {
+                wx.showToast({
+                  title: '请输入姓名',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.region) {
+                wx.showToast({
+                  title: '请选择地区',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.workname) {
+                wx.showToast({
+                  title: '请输入'+['','学校名称','科研院所名称','企业名称'][data.identity_information],
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.working_direction && data.identity_information < 3) {
+                wx.showToast({
+                  title: '请输入'+['','所在院系','从事方向',''][data.identity_information],
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.identity && data.identity_information < 3) {
+                wx.showToast({
+                  title: '请选择身份',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.working_address && data.identity_information == 3) {
+                wx.showToast({
+                  title: '请输入工作地址',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.enterprise_number && data.identity_information == 3) {
+                wx.showToast({
+                  title: '请输入企业税号',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.certificates) {
+                wx.showToast({
+                  title: '请选择证件',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.tutor && data.identity_information < 3) {
+                wx.showToast({
+                  title: '请输入导师信息',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.email) {
+                // wx.showToast({
+                //   title: '请输入邮箱',
+                //   icon: 'none'
+                // })
+                // return
+            }
+            if (!data.QQ) {
+                // wx.showToast({
+                //   title: '请输入QQ',
+                //   icon: 'none'
+                // })
+                // return
+            }
+            if (!data.front_certificate) {
+                wx.showToast({
+                  title: '请上传正面照',
+                  icon: 'none'
+                })
+                return
+            }
+            if (!data.reverse_certificate) {
+                wx.showToast({
+                  title: '请上传反面照',
+                  icon: 'none'
+                })
+                return
+            }
+            console.log(data)
+            app.api.userIdentityAuthAction(data, function (res) {
+                console.log(res)
+                if (res.code > 0) {
+                    wx.showToast({
+                      title: res.msg,
+                    })
+                    app.db.set('element_point_change',1)
+                    setTimeout(function () {
+                        wx.navigateBack({
+                          delta: 1,
+                        })
+                    },1000)
+                } else {
+                    wx.showToast({
+                      title: res.msg,
+                      icon: 'none'
+                    })
+                }
+            })
+        }
+    }
+})

+ 3 - 0
pages/authentication-information/authentication-information.json

@@ -0,0 +1,3 @@
+{
+  "navigationStyle": "custom"
+}

+ 127 - 0
pages/authentication-information/authentication-information.wxml

@@ -0,0 +1,127 @@
+<!--认证信息/企业/科研院所/高校用户-->
+<image src="../../images/head-bg.png" class="head-bg" style="height: {{navbarHeight + 7}}px;" />
+<view class="wrap" style="height: {{navbarHeight + 7}}px;">
+    <view class="return" bindtap="back">
+        <image src="../../images/return.png" mode="widthFix" class="back-icon" />
+    </view>
+    <view class="title">元素魔方</view>
+</view>
+<view class="container-wrap" style="margin-top: {{navbarHeight + 7}}px;">
+    <view class="column">
+        <view class="module">
+            <view class="module-label">认证信息</view>
+            <view class="module-box">
+                <view class="module-box-label">用户选择</view>
+                <view class="tab-list">
+                    <view class="{{tabActiveId == 1 ? 'active' : ''}} child" bindtap="tabClick" data-id="1">
+                        高校用户
+                    </view>
+                    <view class="{{tabActiveId == 2 ? 'active' : ''}} child" bindtap="tabClick" data-id="2">
+                        科研院所
+                    </view>
+                    <view class="{{tabActiveId == 3 ? 'active' : ''}} child" bindtap="tabClick" data-id="3">
+                        企业开发部门
+                    </view>
+                </view>
+            </view>
+            <view class="form-box">
+                <view class="form-box-label">个人资料</view>
+                <view class="form-row">
+                    <view class="form-label">姓名*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入您的姓名"
+                        placeholder-class="placeholder" bindinput="setInputValue" data-name="username" value="{{data.username}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row">
+                    <view class="form-label" wx:if="{{tabActiveId != 3}}">所在地区*</view>
+                    <view class="form-label" wx:if="{{tabActiveId == 3}}">企业所在地区*</view>
+                    <picker class="picker" mode="region" bindchange="bindRegionChange" value="{{region}}">
+                        <view class="{{regionString.length > 0 ? 'active' : ''}} gray">
+                            {{regionString.length > 0 ? regionString :'选择地区'}}
+                        </view>
+                        <view class="sanjiao-box">
+                            <image src="../../images/sanjiao.png" class="sanjiao"></image>
+                        </view>
+                    </picker>
+                </view> 
+                <view class="form-row" wx:if="{{tabActiveId == 1}}">
+                    <view class="form-label">学校*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="workname" value="{{data.workname}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId == 1}}">
+                    <view class="form-label" >所在院系*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="working_direction" value="{{data.working_direction}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId == 2}}">
+                    <view class="form-label">科研院所*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="workname" value="{{data.workname}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId == 2}}">
+                    <view class="form-label">从事方向*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="working_direction" value="{{data.working_direction}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId == 3}}">
+                    <view class="form-label">企业名称*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="workname" value="{{data.workname}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId == 3}}">
+                    <view class="form-label">工作地址*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="working_address" value="{{data.working_address}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId == 3}}">
+                    <view class="form-label">企业税号*</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="enterprise_number" value="{{data.enterprise_number}}" disabled="{{disabled}}"/>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId != 3}}">
+                    <view class="form-label">身份*</view>
+                    <picker class="picker" bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
+                        <view class="{{array[index].length > 0 ? 'active' : ''}} gray">
+                            {{array[index].length > 0 ? array[index]: '请选择'}}
+                        </view>
+                        <view class="sanjiao-box">
+                            <image src="../../images/sanjiao.png" class="sanjiao"></image>
+                        </view>
+                    </picker>
+                </view>
+                <view class="form-row">
+                    <view class="form-label">证件*</view>
+                    <picker class="picker" bindchange="bindCertificateChange" value="{{index2}}" range="{{array2}}">
+                        <view class="{{array2[index2].length > 0 ? 'active' : ''}} gray">
+                            {{array2[index2].length > 0 ? array2[index2]: '请选择'}}
+                        </view>
+                        <view class="sanjiao-box">
+                            <image src="../../images/sanjiao.png" class="sanjiao"></image>
+                        </view>
+                    </picker>
+                </view>
+                <view class="form-row" wx:if="{{tabActiveId != 3}}">
+                    <view class="form-label">导师</view>
+                    <input type="text" value="" class="form-input" placeholder="请输入" placeholder-class="placeholder" bindinput="setInputValue" data-name="tutor" value="{{data.tutor}}"/>
+                </view>
+                <view class="form-row">
+                    <view class="form-label">邮箱</view>
+                    <input type="text" value="" class="form-input" placeholder="选填" placeholder-class="placeholder" bindinput="setInputValue" data-name="email" value="{{data.email}}"/>
+                </view>
+                <view class="form-row">
+                    <view class="form-label">QQ</view>
+                    <input type="text" value="" class="form-input" placeholder="选填" placeholder-class="placeholder" bindinput="setInputValue" data-name="QQ" value="{{data.QQ}}"/>
+                </view>
+                <view class="upload-module" wx:if="{{!isAuth}}">
+                    <view class="upload-module-label">上传证件</view>
+                    <view class="upload">
+                        <view class="upload-item">
+                            <image data-key="front_certificate" bindtap="uploadImg"
+                                src="{{data.front_certificate.length > 0 ? data.front_certificate : '../../images/add-1.png'}}"></image>
+                        </view>
+                        <view class="upload-item">
+                            <image data-key="reverse_certificate" bindtap="uploadImg"
+                                src="{{data.reverse_certificate.length > 0 ? data.reverse_certificate : '../../images/add-2.png'}}"></image>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view class="btn-box">
+            <button bindtap="authAction">{{!isAuth ? '提交认证' : '保存信息'}}</button>
+        </view>
+    </view>
+</view>

+ 297 - 0
pages/authentication-information/authentication-information.wxss

@@ -0,0 +1,297 @@
+/* pages/modify-mine/modify-mine.wxss */
+page {
+    background-color: #F5F6FA;
+}
+
+.head-bg {
+    width: 100%;
+    overflow: hidden;
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1;
+}
+
+.wrap {
+    width: 100%;
+    position: fixed;
+    left: 0;
+    top: 0;
+    background-color: rgba(0, 0, 0, 0);
+    z-index: 999999999;
+    display: flex;
+    align-items: center;
+}
+
+.title {
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 16px;
+    color: #fff;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+}
+
+.return {
+    height: 30px;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 12px;
+    box-sizing: border-box;
+    z-index: 9999999999;
+}
+
+.back-icon {
+    width: 10px;
+}
+
+.container-wrap {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+}
+
+.column {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    padding-top: 20rpx;
+}
+
+.module {
+    width: 100%;
+    padding: 0 30rpx;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    background-color: #fff;
+    margin-bottom: 20rpx;
+}
+
+.module-label {
+    width: 100%;
+    height: 92rpx;
+    line-height: 92rpx;
+    font-weight: bold;
+    color: #333333;
+    font-size: 32rpx;
+    position: relative;
+    padding-left: 22rpx;
+    box-sizing: border-box;
+    margin-bottom: 10rpx;
+}
+
+.module-label>text {
+    margin-left: 8rpx;
+    font-size: 26rpx;
+    color: #666666;
+    font-weight: normal;
+}
+
+.module-label::after {
+    content: "";
+    position: absolute;
+    left: 0;
+    top: 50%;
+    transform: translate(0, -50%);
+    width: 8rpx;
+    height: 48rpx;
+    background-color: #4784F5;
+}
+
+.btn-box {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 40rpx 30rpx;
+    box-sizing: border-box;
+}
+
+.btn-box button {
+    width: 100%;
+    height: 84rpx;
+    line-height: 84rpx;
+    background-color: #2B86FF;
+    border-radius: 8rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 34rpx;
+    font-weight: 500;
+    color: #fff;
+}
+
+.tab-list {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    margin-left: 16rpx;
+}
+
+.child {
+    height: 52rpx;
+    line-height: 52rpx;
+    display: flex;
+    align-items: center;
+    padding: 0 18rpx;
+    background-color: #FFFFFF;
+    border-radius: 8rpx;
+    color: #999999;
+    font-size: 26rpx;
+    margin-right: 16rpx;
+}
+
+.child:last-child {
+    margin-right: 0;
+}
+
+.child.active {
+    background-color: #2B86FF;
+    color: #fff;
+}
+
+.module-box {
+    width: 100%;
+    height: 88rpx;
+    display: flex;
+    align-items: center;
+    background-color: #F5F5F5;
+    border-radius: 12rpx;
+    margin-bottom: 20rpx;
+}
+
+.module-box-label {
+    width: 146rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: #555555;
+    font-size: 28rpx;
+}
+
+.form-box {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+}
+
+.form-box-label {
+    width: 100%;
+    margin-bottom: 20rpx;
+    color: #333333;
+    font-weight: bold;
+    font-size: 28rpx;
+}
+
+.form-row {
+    width: 100%;
+    height: 80rpx;
+    border: 1px solid #C9C9C9;
+    border-radius: 12rpx;
+    margin-bottom: 16rpx;
+    display: flex;
+    align-items: center;
+    padding-right: 24rpx;
+    box-sizing: border-box;
+}
+
+.form-label {
+    width: 230rpx;
+    padding-left: 30rpx;
+    box-sizing: border-box;
+    font-size: 28rpx;
+    color: #333333;
+}
+
+.form-input {
+    flex: 1;
+    font-size: 28rpx;
+}
+
+.placeholder {
+    color: #C6C6C6;
+}
+
+.picker {
+    width: calc(100% - 230rpx);
+    height: 80rpx;
+    line-height: 80rpx;
+    font-size: 28rpx;
+    color: #333333;
+    display: block;
+}
+
+.gray {
+    float: left;
+    width: calc(100% - 20rpx);
+    text-align: left;
+    display: block;
+    height: 80rpx;
+    line-height: 80rpx;
+    font-size: 28rpx;
+    color: #C6C6C6;
+}
+
+.gray.active {
+    color: #333333
+}
+
+.sanjiao-box {
+    width: 20rpx;
+    height: 80rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    float: left;
+    text-align: right;
+}
+
+.sanjiao {
+    width: 20rpx;
+    height: 12rpx;
+    vertical-align: middle;
+}
+
+.upload-module {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    margin-top: 6rpx;
+}
+
+.upload-module-label {
+    width: 100%;
+    color: #333333;
+    font-size: 28rpx;
+    font-weight: bold;
+    margin-bottom: 20rpx;
+}
+
+.upload {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    padding-bottom: 16rpx;
+}
+
+.upload-item {
+    width: calc(50% - 11rpx);
+    height: 200rpx;
+    margin-bottom: 22rpx;
+}
+
+.upload-item image {
+    width: 100%;
+    height: 100%;
+}

+ 120 - 0
pages/balance-details/balance-details.js

@@ -0,0 +1,120 @@
+const util = require('../../utils/util');
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        navbarHeight: 0,
+        money: 0,
+        list: []
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            navbarHeight: util.getNavbarHeight()
+        })
+        //改变头部电量条背景色
+        wx.setNavigationBarColor({
+            frontColor: '#ffffff',
+            backgroundColor: '#ffffff',
+        });
+        wx.getSystemInfo({
+            success: (res) => {
+                this.setData({
+                    screenWidth: res.screenWidth
+                });
+            }
+        })
+        this.usersBalanceList()
+    },
+    /**
+     * 返回上一页
+     */
+    back() {
+        wx.navigateBack({
+            delta: 1,
+        });
+    },
+    //跳转提现
+    withdraw() {
+        wx.navigateTo({
+            url: '../withdraw/withdraw?money='+this.data.money,
+        })
+    },
+    //跳转余额规则
+    balanceRules() {
+        wx.navigateTo({
+            url: '../balance-rules/balance-rules',
+        })
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        let page = this, element_point_change = app.db.get('element_point_change')
+        if (element_point_change) {
+            page.usersBalanceList()
+        }
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 获取数据
+     */
+    usersBalanceList: function () {
+        let page = this
+        app.api.usersBalanceList("", function (res) {
+            console.log(res)
+            if (res.code > 0) {
+                page.setData({
+                    list: res.data.detailed_list,
+                    money: res.data.balance
+                })
+            } else {
+                wx.showToast({
+                  title: res.msg,
+                  icon: 'none'
+                })
+            }
+        })
+    }
+})

+ 3 - 0
pages/balance-details/balance-details.json

@@ -0,0 +1,3 @@
+{
+  "navigationStyle": "custom"
+}

+ 47 - 0
pages/balance-details/balance-details.wxml

@@ -0,0 +1,47 @@
+<!--余额明细-->
+<image src="../../images/head-bg.png" class="head-bg" style="height: {{navbarHeight + 7}}px;" />
+<view class="wrap" style="height: {{navbarHeight + 7}}px;">
+    <view class="return" bindtap="back">
+        <image src="../../images/return.png" mode="widthFix" class="back-icon" />
+    </view>
+    <view class="title">元素魔方</view>
+</view>
+<view class="container-wrap" style="margin-top: {{navbarHeight + 7}}px;">
+    <view class="module">
+        <view class="module-label">我的资产</view>
+        <view class="card">
+            <image src="../../images/bg-10.png" class="card-bg"></image>
+            <view class="card-container">
+                <view class="num">{{money}}</view>
+                <view class="btn" bindtap="withdraw">立即提现</view>
+            </view>
+            <view class="card-label" bindtap="balanceRules">
+                <image src="../../images/icon-14.png"></image>
+                余额规则
+            </view>
+        </view>
+    </view>
+    <view class="module">
+        <view class="module-label">余额明细</view>
+        <view class="list">
+            <view class="item" wx:if="{{list.length>0}}" wx:for="{{list}}" wx:key="l">
+                <view class="row-between">
+                    <text class="font-1">{{item.detailed}}</text>
+                    <text class="font-2">{{item.create_time}}</text>
+                </view>
+                <view class="row-between">
+                    <text class="font-3">交易号:{{item.transaction_number}}</text>
+                </view>
+                <view class="row-between">
+                    <text class="font-3">余额:{{item.remaining_balance}}</text>
+                    <text class="font-3">{{item.transaction_amount}}</text>
+                </view>
+            </view>
+            <!-- 无内容时显示 -->
+            <view class="normal-box" wx:if="{{list.length==0}}">
+                <image src="../../images/normal.png" mode="widthFix"></image>
+                <text>暂无内容</text>
+            </view>
+        </view>
+    </view>
+</view>

+ 215 - 0
pages/balance-details/balance-details.wxss

@@ -0,0 +1,215 @@
+/* pages/balance-details/balance-details.wxss */
+page {
+    background-color: #F5F6FA;
+}
+
+.head-bg {
+    width: 100%;
+    overflow: hidden;
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 1;
+}
+
+.wrap {
+    width: 100%;
+    position: fixed;
+    left: 0;
+    top: 0;
+    background-color: rgba(0, 0, 0, 0);
+    z-index: 999999999;
+    display: flex;
+    align-items: center;
+}
+
+.title {
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 16px;
+    color: #fff;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+}
+
+.return {
+    height: 30px;
+    position: absolute;
+    bottom: 12px;
+    left: 0;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 12px;
+    box-sizing: border-box;
+    z-index: 9999999999;
+}
+
+.back-icon {
+    width: 10px;
+}
+
+.container-wrap {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+}
+
+.module {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    padding: 40rpx 25rpx 28rpx;
+    box-sizing: border-box;
+    background-color: #fff;
+    margin-top: 20rpx;
+}
+
+.module-label {
+    width: 100%;
+    font-size: 32rpx;
+    font-weight: bold;
+    color: #333333;
+    padding: 0 29rpx;
+    box-sizing: border-box;
+    position: relative;
+    margin-bottom: 50rpx;
+}
+
+.module-label::after {
+    content: "";
+    position: absolute;
+    left: 0;
+    top: 50%;
+    transform: translate(0, -50%);
+    width: 9rpx;
+    height: 48rpx;
+    background-color: #4784F5;
+}
+
+.card {
+    width: 100%;
+    height: 236rpx;
+    position: relative;
+}
+
+.card-bg {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 10;
+}
+
+.card-container {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 100;
+    padding: 40rpx 28rpx;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+}
+
+.num {
+    color: #FFFFFF;
+    font-size: 38rpx;
+}
+
+.btn {
+    width: fit-content;
+    color: #FFFFFF;
+    font-size: 34rpx;
+    border-bottom: 1px solid #A6A4F7;
+    box-sizing: border-box;
+    margin-top: 15rpx;
+}
+
+.card-label {
+    position: absolute;
+    right: 24rpx;
+    top: 40rpx;
+    z-index: 100;
+    font-size: 26rpx;
+    display: flex;
+    align-items: center;
+    color: #fff;
+}
+
+.card-label>image {
+    width: 26rpx;
+    height: 26rpx;
+    margin-right: 10rpx;
+}
+
+.list {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+}
+
+.item {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    margin-bottom: 46rpx;
+}
+
+.row-between {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 3rpx;
+}
+
+.row-between:first-child {
+    margin-bottom: 13rpx;
+}
+
+.row-between:last-child {
+    margin-bottom: 0;
+}
+
+.font-1 {
+    color: #333333;
+    font-size: 30rpx;
+    font-weight: bold;
+}
+
+.font-2 {
+    color: #C6C6C6;
+    font-size: 30rpx;
+}
+
+.font-3 {
+    color: #C6C6C6;
+    font-size: 26rpx;
+}
+
+.normal-box {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    font-size: 30rpx;
+    color: #999999;
+    padding: 280rpx 0;
+}
+
+.normal-box>image {
+    width: 420rpx;
+}
+
+.normal-box>text {
+    margin-top: -56rpx;
+}

+ 105 - 0
pages/balance-rules/balance-rules.js

@@ -0,0 +1,105 @@
+const util = require('../../utils/util');
+const app = getApp()
+const WxParse = require('../../wxParse/wxParse.js')
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        navbarHeight: 0,
+        content: ''
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            navbarHeight: util.getNavbarHeight(),
+        })
+        //改变头部电量条背景色
+        wx.setNavigationBarColor({
+            frontColor: '#ffffff',
+            backgroundColor: '#ffffff',
+        });
+        wx.getSystemInfo({
+            success: (res) => {
+                this.setData({
+                    screenWidth: res.screenWidth
+                });
+            }
+        })
+        this.getUserBalanceRule()
+    },
+    /**
+     * 返回上一页
+     */
+    back() {
+        wx.navigateBack({
+            delta: 1,
+        });
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 获取余额规则
+     */
+    getUserBalanceRule: function () {
+        let page = this
+        app.api.getUserBalanceRule("", function (res) {
+            if (res.code > 0) {
+                let article = res.data
+                WxParse.wxParse('article', 'html', article, page,5);
+                page.setData({
+                    content: res.data
+                })
+            } else {
+                wx.showToast({
+                  title: res.msg,
+                  icon: 'none'
+                })
+            }
+        })
+    }
+})

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini