k.zhang 3 anos atrás
pai
commit
32d2df612f

+ 2 - 2
app.js

@@ -31,8 +31,8 @@ App({
   },
   globalData: {
     userInfo: null,
-    //url:"http://127.0.0.1:8081"
+    url:"http://127.0.0.1:8081"
     //url:"http://www.tao1024.com:8081"
-    url:"https://www.shisanmiao.com"
+    //url:"https://www.shisanmiao.com"
   }
 })

+ 2 - 1
app.json

@@ -8,7 +8,8 @@
     "pages/order/order",
     "pages/search-details/earch-details",
     "pages/friends/friends",
-    "pages/friends-list/friends-list"
+    "pages/friends-list/friends-list",
+    "pages/trans/trans"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 55 - 32
pages/index/index.js

@@ -39,22 +39,38 @@ Page({
     //   text: '扫一扫'
     // }, 
   ],
-    // grids2: [{
-    //   image: 'cart',
-    //   text: '我的购物车'
-    // }, {
-    //   image: 'help',
-    //   text: '帮助中心'
-    // }, {
-    //   image: 'address',
-    //   text: '地址管理'
-    // }, {
-    //   image: 'order',
-    //   text: '我的订单'
-    // }, {
-    //   image: 'customer-service',
-    //   text: '联系客服'
-    // }, ],
+  grids2: [{
+    image: 'order',
+    text: '我的订单'
+  }, {
+    image: 'user',
+    text: '好友列表'
+  }, {
+    image: 'help',
+    text: '帮助中心'
+  }, {
+    image: 'add',
+    text: '邀请好友'
+  }, {
+    image: 'to-top',
+    text: '手动同步订单'
+  }, {
+    image: 'customer-service',
+    text: '联系客服'
+  }, {
+    image: 'setting',
+    text: '设置'
+  },
+   {
+    image: 'success',
+    text: '提现'
+  }, 
+  {
+    image: 'phone',
+    text: '管理员'
+  }, 
+   
+],
     motto: 'Hello World',
     userInfo: {},
     hasUserInfo: false,
@@ -69,6 +85,11 @@ Page({
     })
   },
   onLoad() {
+   
+
+
+  },
+  onShow() {
     var that = this
     var opneId = wx.getStorageSync('openId')
     var nickName = wx.getStorageSync('nickName')
@@ -96,7 +117,7 @@ Page({
      }) 
      
      console.log(nickName)
-     if (nickName == ''){
+    //  if (nickName == ''){
       wx.request( { 
         url: link + "/v1/user/open.id/get", 
         header: { 
@@ -108,18 +129,23 @@ Page({
           console.log(res)
           wx.setStorageSync('nickName', res.data.data.user.nickName)  
           wx.setStorageSync('userId', res.data.data.user.id) 
+          var admin = false
+          if (res.data.data.user.admin >= 1){
+            admin = true
+          }
           that.setData({
-            userId: res.data.data.user.id
+            userId: res.data.data.user.id,
+            admin:admin
            })
         }
        }) 
-    } else{
-      var userId = wx.getStorageSync('userId')
-      console.log(userId)
-      that.setData({
-        userId: userId
-       })
-    }
+    // } else{
+    //   var userId = wx.getStorageSync('userId')
+    //   console.log(userId)
+    //   that.setData({
+    //     userId: userId
+    //    })
+    // }
 
 
   },
@@ -168,10 +194,9 @@ Page({
 
     }
      else if (e.detail.cell.text == "提现") {
-      wx.showToast({
-        title: "结算金额:0元",
-        icon: 'none'
-      });
+      wx.navigateTo({
+        url:"/pages/trans/trans"
+      })
 
     } else if (e.detail.cell.text == "邀请好友"){
       console.log('邀请好友')
@@ -182,9 +207,7 @@ Page({
       wx.navigateTo({
         url:"/pages/friends-list/friends-list"
       })
-    }
-    
-    else {
+    } else {
        wx.showToast({
         title: "功能开发中...",
         icon: 'none'

+ 9 - 1
pages/index/index.wxml

@@ -51,7 +51,15 @@
     </content-card> -->
 
     <content-card class="content" name="功能">
-      <view class="view-container">
+      <view class="view-container" wx:if="{{admin}}">
+        <l-grid show-border="{{true}}">
+          <l-grid-item wx:for="{{grids2}}" wx:key="index" key="{{index}}" slot="{{index}}" bind:linitemtap="getUserProfile" cell="{{item}}" l-grid-item="grid-item">
+            <l-icon name="{{item.image}}" />
+            <view class="text">{{item.text}}</view>
+          </l-grid-item>
+        </l-grid>
+      </view>
+      <view class="view-container" wx:else>
         <l-grid show-border="{{true}}">
           <l-grid-item wx:for="{{grids1}}" wx:key="index" key="{{index}}" slot="{{index}}" bind:linitemtap="getUserProfile" cell="{{item}}" l-grid-item="grid-item">
             <l-icon name="{{item.image}}" />

+ 66 - 0
pages/trans/trans.js

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

+ 3 - 0
pages/trans/trans.json

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

+ 68 - 0
pages/trans/trans.wxml

@@ -0,0 +1,68 @@
+<!--pages/trans/trans.wxml-->
+<content-card class="content" name="提现">
+      <view class="view-container">
+        <l-grid>
+          <l-grid-item key="one" slot="one">
+            <view class="num">{{wallet.wallet.availableAmount}}</view>
+            <!-- <button style="width:6vw" >提现</button> -->
+            <l-tag size="mini"  height="45" shape="circle" bindtap="tixian">提现</l-tag>
+            <!-- <view class="text">待提现金额</view> -->
+          </l-grid-item>
+          <l-grid-item key="two" slot="two">
+            <view class="num">{{wallet.reviewAmount}}</view>
+            <view class="text">审核中金额</view>
+            <!-- <l-tag size="mini"  height="40" plain="{{true}}" shape="circle">审核中金额</l-tag> -->
+          </l-grid-item>
+          <l-grid-item key="three" slot="three">
+            <view class="num">{{wallet.completedAmount}}</view>
+            <!-- <l-tag size="mini"  height="40" plain="{{true}}" shape="circle">已提现金额</l-tag> -->
+            <view class="text">已提现金额</view>
+          </l-grid-item>
+        </l-grid>
+      </view>
+    </content-card>
+
+
+ 
+
+    <content-card class="content" name="提现账户">
+            <view >
+                <view class="list-title">
+                    <view class="text" >点击编辑填写提现账户</view>
+                    <button class="right" size="mini" bindtap="update"> 编辑</button>
+                   
+                </view>
+                <view class="list-title">
+                    <view class="text" >客服微信:lixiaofei111028</view>
+                   
+                    <button class="right"  size="mini"> 复制</button>
+                   
+                </view>
+               
+            </view>
+        </content-card>
+
+
+ <view wx:for="{{transList}}" wx:key="msg">
+
+  <l-card  type="primary" l-img-class="right-card" plaintext="true"  full="true" >
+
+    <view class="containertag">
+      <l-tag plain="{{true}}" font-color="#d81e06" shape="circle" size="medium"  l-class="tag" class="describe" >提现</l-tag>
+      <l-tag plain="{{true}}" font-color="#d81e06" shape="circle" size="medium"  l-class="tag"  class="fanli">¥{{item.amount}}</l-tag>
+     
+    </view>
+    <view class="price-v">
+     <text class="price">{{item.createTime}}</text> <text class="yprice">{{item.transStatus == 1 ? '审核中' : item.transStatus == 2 ? '审核失败' : '提现成功'  }}  </text>  
+    </view>
+   
+  </l-card>
+</view>
+
+
+
+<l-loadmore show="{{true}}" end-text="我是有底线的~" type="{{lType}}">
+  <!-- <view slot="content">
+    我是有底线的~
+  </view> -->
+</l-loadmore>

+ 1 - 0
pages/trans/trans.wxss

@@ -0,0 +1 @@
+/* pages/trans/trans.wxss */

+ 4 - 4
project.config.json

@@ -4,7 +4,7 @@
     "ignore": []
   },
   "setting": {
-    "urlCheck": true,
+    "urlCheck": false,
     "es6": true,
     "enhance": true,
     "postcss": true,
@@ -21,9 +21,9 @@
     "checkSiteMap": true,
     "uploadWithSourceMap": true,
     "compileHotReLoad": false,
-    "useMultiFrameRuntime": false,
-    "useApiHook": false,
-    "useApiHostProcess": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],