Przeglądaj źródła

代码提交;

Handy_Cao 3 lat temu
rodzic
commit
5ba825b94a

+ 3 - 1
GuangZuan/miniprogram/app.json

@@ -48,7 +48,9 @@
         "pages/news/news",
         "pages/goodsdetail/goodsdetail",
         "pages/cerserach/cerserach",
-        "pages/jewelry/jewelry"
+        "pages/jewelry/jewelry",
+        "pages/bonddetail/bonddetail",
+        "pages/inspectiondetail/inspectiondetail"
       ]
     },
     {

+ 1 - 1
GuangZuan/miniprogram/config/index.ts

@@ -1,4 +1,4 @@
 export const appConfig = {
   version: '1.0.0',
-  apiUrl: 'http://192.168.31.201:8080/cfg?key=test_201'
+  apiUrl: 'http://218.17.158.45:23015/cfg?key=test_201'
 }

+ 3 - 0
GuangZuan/miniprogram/mHome/pages/bonddetail/bonddetail.json

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

+ 1 - 0
GuangZuan/miniprogram/mHome/pages/bonddetail/bonddetail.less

@@ -0,0 +1 @@
+/* mHome/pages/bonddetail/bonddetail.wxss */

+ 66 - 0
GuangZuan/miniprogram/mHome/pages/bonddetail/bonddetail.ts

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

+ 2 - 0
GuangZuan/miniprogram/mHome/pages/bonddetail/bonddetail.wxml

@@ -0,0 +1,2 @@
+<!--mHome/pages/bonddetail/bonddetail.wxml-->
+<text>mHome/pages/bonddetail/bonddetail.wxml</text>

+ 3 - 0
GuangZuan/miniprogram/mHome/pages/inspectiondetail/inspectiondetail.json

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

+ 1 - 0
GuangZuan/miniprogram/mHome/pages/inspectiondetail/inspectiondetail.less

@@ -0,0 +1 @@
+/* mHome/pages/inspectiondetail/inspectiondetail.wxss */

+ 66 - 0
GuangZuan/miniprogram/mHome/pages/inspectiondetail/inspectiondetail.ts

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

+ 2 - 0
GuangZuan/miniprogram/mHome/pages/inspectiondetail/inspectiondetail.wxml

@@ -0,0 +1,2 @@
+<!--mHome/pages/inspectiondetail/inspectiondetail.wxml-->
+<text>mHome/pages/inspectiondetail/inspectiondetail.wxml</text>

+ 1 - 2
GuangZuan/miniprogram/mHome/pages/jewelry/jewelry.less

@@ -42,5 +42,4 @@ Page {
       margin: 10px 0px 20px 10px;
     }
   }
-}
-
+}

+ 2 - 3
GuangZuan/miniprogram/mMine/pages/myperformance/myperformance.ts

@@ -8,8 +8,7 @@ Page({
     /// tab激活索引
     active: 0,
     /// tabs
-    tabs: [{id: 1, name: '买履约'}, 
-           {id: 2, name: '卖履约'}],
+    tabs: [{id: 1, name: '买履约'},  {id: 2, name: '卖履约'}],
     /// 列头
     titles: ['成交单号', '付款方式', '总金额', '已付金额', '履约冻结金额', '约剩余冻结', '卖方', '履约状态', '当前步骤', '剩余天数'],
     /// 列表总宽度
@@ -24,7 +23,7 @@ Page({
     selectRow: -1,
   },
 
-  /**
+  /**  
    * tabbar点击事件
    */
   onTabChange(e: any) {

+ 39 - 44
GuangZuan/miniprogram/pages/login/login.ts

@@ -1,5 +1,6 @@
 // pages/login/login.ts
-// import {login} from '../../services/api/account/index'
+import {login} from '../../services/api/account/index'
+import { appConfig } from '../../config/index'
 
 Page({
 
@@ -14,7 +15,7 @@ Page({
     /// 密码
     pwd: 'BgAAAPir1cgH1bw5xgrywoXpw8l/s5auAXn8MA==',
     /// 版本号
-    version: '1.0.00',
+    version: appConfig.version,
     /// 是否loding
     isLoding: false,
   },
@@ -41,50 +42,44 @@ Page({
    * 用户登录请求方法
    */
   onLogin() {
-    // /// 合规性校验
-    // if (!this.check()) return
-    // /// loding.....
-    // this.setData({ isLoding: true })
-
-    // /// 进行账户登录
-    // login({
-    //   data: {
-    //     userName: this.data.username,
-    //     password: this.data.pwd,
-    //     clientType: 5
-    //   },
-    //   enableAuthorization: false,
-      // success: (res) => {
-      //   console.log(res)
-      //   /// 登录失败
-      //   if (res.code != 0) { 
-      //     wx.showToast({icon: 'error', title: '登录失败,原因:'+res.msg})
-      //     return 
-      //   }
-
-      //   /// 存储Token以及Loginid
-      //   wx.setStorageSync('Authorization', res.data.token)
-      //   wx.setStorageSync('LoginID', res.data.loginId)
-      //   wx.setStorageSync('UserId', res.data.userId)
-
-      wx.setStorageSync('Authorization', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJMb2dpbklEIjoxMTAwMDAwMDAwMDEsIkdyb3VwIjo1LCJTZXNzaW9uSUQiOjkwMDAxLCJCdWZmZXJUaW1lIjo4NjQwMCwiaXNzIjoiTXVjaGluZm8iLCJleHAiOjE2NjI1MjA3NzUsIm5iZiI6MTY2MjUyMDc3NSwiaWF0IjoxNjYyNTIwNzc1fQ.-k95mFfW6b-WAdpg3chtW1-2RJKd4gGHtsIuSLKLAjo')
-      wx.setStorageSync('LoginID', '110000000001')
-      wx.setStorageSync('UserId', '1000')
-
-      //   /// showToast
-      //   wx.showToast({
-      //     title: '登录成功',
-      //     complete: () => {
+    /// 合规性校验
+    if (!this.check()) return
+    /// loding.....
+    this.setData({ isLoding: true })
+
+    /// 进行账户登录
+    login({
+      data: {
+        userName: this.data.username,
+        password: this.data.pwd,
+        clientType: 5
+      },
+      enableAuthorization: false,
+      success: (res) => {
+        console.log(res)
+        /// 登录失败
+        if (res.code != 0) { 
+          wx.showToast({icon: 'error', title: '登录失败,原因:'+res.msg})
+          return 
+        }
+
+        /// 存储token以及loginId、userId
+        wx.setStorageSync('Authorization', res.data.token)
+        wx.setStorageSync('LoginID', res.data.loginId)
+        wx.setStorageSync('UserId', res.data.userId)
+
+        /// showToast
+        wx.showToast({
+          title: '登录成功',
+          complete: () => {
             /// 跳转到首页
             wx.reLaunch({ url: '/pages/home/home' })
-    //       }
-    //     })
-    //   },
-    //   fail: () => {
-    //     wx.showToast({icon: 'error', title: '登录失败,原因:网络请求失败'})
-    //   },
-    //   complete: () => { this.setData({ isLoding: false }) }
-    // })
+          }
+        })
+      },
+      fail: () => { wx.showToast({icon: 'error', title: '登录失败,原因:网络请求失败'}) },
+      complete: () => { this.setData({ isLoding: false }) }
+    })
   },
 
   /**

+ 0 - 1
GuangZuan/miniprogram/pages/register/register.ts

@@ -1,7 +1,6 @@
 // pages/register/register.ts
 
 import { areaList } from '@vant/area-data';
-import Toast from '@vant/weapp/toast/toast';
 
 Page({
 

+ 2 - 2
GuangZuan/miniprogram/services/api/account/index.ts

@@ -1,11 +1,11 @@
 import { httpRequest } from '../../../services/http/index'
 import { HttpRequest } from '../../../services/http/interface'
-// import service from '../../../services'
+import service from '../../../services'
 
 /**
  * 用户登录
  * 
  */
 export function login(params: HttpRequest<{req: GuangZuan.LoginReq, rsp: GuangZuan.LoginRsp}>) {
-  return httpRequest('http://192.168.31.201:8888/api'+'/Account/Login', 'POST', params)
+  return httpRequest(service.config.goAccess+'/Account/Login', 'POST', params)
 }

+ 0 - 3
GuangZuan/miniprogram/services/index.ts

@@ -1,6 +1,5 @@
 import { appConfig } from '../config/index'
 import { httpRequest } from './http/index'
-// import socket from './socket/index'
 
 export default new (class {
   /** 服务配置信息 */
@@ -19,8 +18,6 @@ export default new (class {
     tradeUrl: '',
     uploadUrl: '',
     oem: '',
-    pcNewsUrl: '',
-    pcMangerUrl: '',
     goAccess: ''
   }