Handy_Cao 3 năm trước cách đây
mục cha
commit
4e02b5cd97
86 tập tin đã thay đổi với 1124 bổ sung828 xóa
  1. 0 1
      GuangZuan/miniprogram/app.json
  2. 1 4
      GuangZuan/miniprogram/config/index.ts
  3. 55 0
      GuangZuan/miniprogram/config/proto/mtp.proto
  4. 3 1
      GuangZuan/miniprogram/mHome/pages/bond/detail/index.ts
  5. 12 7
      GuangZuan/miniprogram/mHome/pages/bond/list/index.ts
  6. 1 1
      GuangZuan/miniprogram/mHome/pages/bond/list/index.wxml
  7. 16 8
      GuangZuan/miniprogram/mHome/pages/bond/payment/index.ts
  8. 16 8
      GuangZuan/miniprogram/mHome/pages/bond/prepayment/index.ts
  9. 3 3
      GuangZuan/miniprogram/mHome/pages/calculator/index.wxml
  10. 2 2
      GuangZuan/miniprogram/mHome/pages/cerserach/index.ts
  11. 3 3
      GuangZuan/miniprogram/mHome/pages/cerserach/index.wxml
  12. 18 6
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts
  13. 1 1
      GuangZuan/miniprogram/mHome/pages/inspection/detail/index.ts
  14. 1 1
      GuangZuan/miniprogram/mHome/pages/inspection/list/index.less
  15. 16 13
      GuangZuan/miniprogram/mHome/pages/inspection/list/index.ts
  16. 1 1
      GuangZuan/miniprogram/mHome/pages/inspection/list/index.wxml
  17. 17 9
      GuangZuan/miniprogram/mHome/pages/inspection/payment/index.ts
  18. 17 9
      GuangZuan/miniprogram/mHome/pages/inspection/prepayment/index.ts
  19. 1 1
      GuangZuan/miniprogram/mHome/pages/jewelry/list/index.ts
  20. 1 1
      GuangZuan/miniprogram/mHome/pages/msg/msglist/index.ts
  21. 6 6
      GuangZuan/miniprogram/mHome/pages/msg/msglist/index.wxml
  22. 2 2
      GuangZuan/miniprogram/mHome/pages/search/index.wxml
  23. 1 1
      GuangZuan/miniprogram/mMine/pages/address/list/index.ts
  24. 3 3
      GuangZuan/miniprogram/mMine/pages/address/list/index.wxml
  25. 30 25
      GuangZuan/miniprogram/mMine/pages/address/operate/index.ts
  26. 6 6
      GuangZuan/miniprogram/mMine/pages/address/operate/index.wxml
  27. 4 0
      GuangZuan/miniprogram/mMine/pages/bank/index.less
  28. 40 29
      GuangZuan/miniprogram/mMine/pages/bank/index.ts
  29. 5 4
      GuangZuan/miniprogram/mMine/pages/bank/index.wxml
  30. 58 45
      GuangZuan/miniprogram/mMine/pages/inoutgold/index.ts
  31. 4 4
      GuangZuan/miniprogram/mMine/pages/inoutgold/index.wxml
  32. 1 1
      GuangZuan/miniprogram/mMine/pages/invoice/list/index.ts
  33. 31 18
      GuangZuan/miniprogram/mMine/pages/invoice/operate/index.ts
  34. 6 6
      GuangZuan/miniprogram/mMine/pages/invoice/operate/index.wxml
  35. 99 2
      GuangZuan/miniprogram/mMine/pages/modifypwd/index.ts
  36. 4 5
      GuangZuan/miniprogram/mMine/pages/modifypwd/index.wxml
  37. 1 1
      GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.ts
  38. 1 1
      GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.wxml
  39. 1 1
      GuangZuan/miniprogram/mMine/pages/myorders/his/index.ts
  40. 1 1
      GuangZuan/miniprogram/mMine/pages/myorders/his/index.wxml
  41. 26 23
      GuangZuan/miniprogram/mMine/pages/myorders/list/index.ts
  42. 5 5
      GuangZuan/miniprogram/mMine/pages/myorders/list/index.wxml
  43. 11 9
      GuangZuan/miniprogram/mMine/pages/myorders/mydelistingapplydetail/index.ts
  44. 10 8
      GuangZuan/miniprogram/mMine/pages/myperformance/breach/index.ts
  45. 19 15
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts
  46. 3 3
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.wxml
  47. 1 1
      GuangZuan/miniprogram/mMine/pages/myperformance/his/index.ts
  48. 2 2
      GuangZuan/miniprogram/mMine/pages/myperformance/his/index.wxml
  49. 1 1
      GuangZuan/miniprogram/mMine/pages/myperformance/list/index.ts
  50. 2 2
      GuangZuan/miniprogram/mMine/pages/myperformance/list/index.wxml
  51. 10 7
      GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.ts
  52. 30 0
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.less
  53. 69 17
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.ts
  54. 17 1
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.wxml
  55. 10 8
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts
  56. 6 6
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml
  57. 92 51
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.less
  58. 13 9
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts
  59. 34 31
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.wxml
  60. 28 1
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.less
  61. 6 2
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.ts
  62. 3 3
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.wxml
  63. 1 1
      GuangZuan/miniprogram/pages/circle/index.less
  64. 12 10
      GuangZuan/miniprogram/pages/circle/index.ts
  65. 1 1
      GuangZuan/miniprogram/pages/circle/index.wxml
  66. 2 2
      GuangZuan/miniprogram/pages/forgetpwd/index.wxml
  67. 32 8
      GuangZuan/miniprogram/pages/home/index.less
  68. 11 14
      GuangZuan/miniprogram/pages/home/index.ts
  69. 5 5
      GuangZuan/miniprogram/pages/home/index.wxml
  70. 24 12
      GuangZuan/miniprogram/pages/login/index.ts
  71. 2 3
      GuangZuan/miniprogram/pages/login/index.wxml
  72. 54 9
      GuangZuan/miniprogram/pages/mine/index.ts
  73. 0 9
      GuangZuan/miniprogram/pages/register/index.json
  74. 0 22
      GuangZuan/miniprogram/pages/register/index.less
  75. 0 142
      GuangZuan/miniprogram/pages/register/index.ts
  76. 0 49
      GuangZuan/miniprogram/pages/register/index.wxml
  77. 13 11
      GuangZuan/miniprogram/pages/trade/index.ts
  78. 3 3
      GuangZuan/miniprogram/pages/trade/index.wxml
  79. 8 0
      GuangZuan/miniprogram/services/api/account/index.ts
  80. 5 0
      GuangZuan/miniprogram/services/api/common/index.ts
  81. 16 0
      GuangZuan/miniprogram/services/utils.ts
  82. 10 1
      GuangZuan/miniprogram/utils/websocket/crypto.ts
  83. 2 79
      GuangZuan/project.private.config.json
  84. 9 0
      GuangZuan/typings/types/model/account.d.ts
  85. 25 1
      GuangZuan/typings/types/model/common.d.ts
  86. 2 0
      GuangZuan/typings/types/model/trade.d.ts

+ 0 - 1
GuangZuan/miniprogram/app.json

@@ -2,7 +2,6 @@
   "pages": [
     "pages/login/index",
     "pages/home/index",
-    "pages/register/index",
     "pages/circle/index",
     "pages/trade/index",
     "pages/mine/index",

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

@@ -1,7 +1,4 @@
 export const appConfig = {
   version: '1.0.0',
-  apiUrl: 'http://218.17.158.45:23015/cfg?key=test_201',
-  aes_des_key: 'F7A72DE7D6264530F01BA49BC73EB873',
-  macKey: 'B0FB83E39A5EBFAABE471362A58393FF',
-  macIV: 'D951DBE037C82325'
+  apiUrl: 'http://218.17.158.45:23015/cfg?key=test_201'
 }

+ 55 - 0
GuangZuan/miniprogram/config/proto/mtp.proto

@@ -2440,4 +2440,59 @@ message ZSSellOrderListingRsp {
   optional uint64 FreezeQty = 7; // 冻结数量
   optional string OrderTime = 8; // 接收委托交易的时间
   optional string ClientSerialNo = 9; // 客户端流水号
+}
+// 入金请求
+message t2bBankDepositReq {
+	optional MessageHead Header = 1;
+  required uint64 ExtOperatorID = 2; // 外部操作流水号
+  required string CusBankID = 3; // 托管银行编号
+  optional string ExchId = 4; // 交易所编号
+  optional string TradeDate = 5; // 交易日
+  optional string ExchTicket = 6; // 交易所流水号
+  required string AccountCode = 7; // 资金账户
+  optional string BusinessNo = 8; // 银行业务编号
+  optional string BankChildAccount = 9; // 银行子账号
+  optional string BankChildAccountName = 10; // 银行子账号名
+  optional string OldTaPWD = 11; // 资金密码
+  required double Amount = 12; // 金额
+  required string Currency = 13; // 币种
+  optional string Remark = 14; // 备注
+  optional string OpenCardBankId = 15; // 银行卡行号
+  optional string BankAccoutNum = 16; // 银行卡号
+  optional string BankAccoutName = 17; // 银行卡户名
+  optional string extend_info = 18; // 扩展信息(JSON串,参考配置要求进行填充)
+}
+// 入金应答
+message t2bBankDepositRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+  optional uint64 ExtOperatorID = 4; // 外部操作流水号
+  optional int32 Status = 5; // 状态(0成功,其他数值参考银行服务的错误码)
+  required string ExchTicket = 6; // 交易所流水号
+  optional string ExchId = 7; // 交易所编号
+  optional string TradeDate = 8; // 交易日
+  optional string CenterTicket = 9; // 中心流水号
+  optional string CenterErrCode = 10; // 中心返回码
+  optional string CenterErrMsg = 11; // 中心返回结果说明
+  optional string CerterCheckDate = 12; // 中心对账日期
+  optional string NetAddr = 13; // 网络地址(当这里有网址时,应自动跳转网页)
+}
+// 账户资金信息请求
+message AccountFundInfoReq {
+	optional MessageHead Header = 1;
+		optional uint64 OrderId = 2; // 查询委托单号
+		optional uint64 AccountId = 3; // 查询资金账号
+		optional uint32 QueryBitMask = 4; // 查询位掩码
+}
+// 账户资金信息响应
+message AccountFundInfoRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+  optional uint64 OrderId = 4; // 查询委托单号
+  optional uint64 AccountId = 5; // 查询资金账号
+  optional double AvailableMargin = 6; // 可用保证金,查询位掩码:1
+  optional double AvailableOutMoney = 7; // 可出资金,查询位掩码:2
+  optional int32 IsCleanAccount = 8; // 是否是干净账户,查询位掩码:4
 }

+ 3 - 1
GuangZuan/miniprogram/mHome/pages/bond/detail/index.ts

@@ -9,6 +9,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    /// 底部安全区域
+    safeBottom: getApp().globalData.safeBottom,
     /// 列头
     titles: [['净重(ct)| 净重(g)| 毛重(g)| 总量(USD)| 单价(USD/ct)'], 
              ['内容 | 备注 | 彩钻颜色']],
@@ -71,7 +73,7 @@ Page({
         },
         fail: (emsg) => {
           /// hideLoading
-          hideLoading(() => {}, '加载失败,原因:'+emsg)
+          hideLoading(() => {}, emsg)
         },
         complete: () => {
           /// 停止下拉刷新

+ 12 - 7
GuangZuan/miniprogram/mHome/pages/bond/list/index.ts

@@ -1,9 +1,10 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryGZBSFWOrder } from "../../../../services/api/trade/index"
-import { clientType, getExecutestatus, isEncrypted, loginCode, loginid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { clientType, getErrorMsg, getExecutestatus, isEncrypted, loginCode, loginid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading } from "../../../../utils/message/index"
 import { isnullstr } from "../../../../utils/util"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -11,6 +12,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    /// 底部安全区域
+    safeBottom: getApp().globalData.safeBottom,
     /// tabs
     tabs: [{id: 0, name: '待处理'}, {id: 1, name: '进行中'}, {id: 2, name: '已结束'}],
     /// tab索引
@@ -131,7 +134,7 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         UserID: userid(),
         OperateID: loginid(),
         ClientType: clientType,
@@ -140,18 +143,20 @@ Page({
         OrderID: orderid,
         OperateType: operator,
         Header: protoHeader(FunCode.BSFWMemberOperateReq, 66201)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.BSFWMemberOperateReq,
           funCodeRsp: FunCode.BSFWMemberOperateRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作申请失败, 原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -162,7 +167,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作申请失败, 原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '操作请求中.....')

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/bond/list/index.wxml

@@ -8,7 +8,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs>  
   </view>

+ 16 - 8
GuangZuan/miniprogram/mHome/pages/bond/payment/index.ts

@@ -1,8 +1,9 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryFworderoperate } from "../../../../services/api/trade/index"
-import { userid, loginid, clientType, timetample, loginCode, protoHeader, isEncrypted, taAccount, accountid } from "../../../../services/utils"
+import { userid, loginid, clientType, timetample, loginCode, protoHeader, isEncrypted, taAccount, accountid, getErrorMsg } from "../../../../services/utils"
 import { showModel, showLoading, hideLoading } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -45,7 +46,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(() => {}, '加载失败,原因:'+emsg)
+          hideLoading(() => {}, emsg, 'error')
         }
       })
     })
@@ -60,7 +61,7 @@ Page({
       /// showLoading
       showLoading(() => {
         /// 参数信息
-        const params = {
+        const info = JSON.stringify({
           UserID: userid(),
           OperateID: loginid(),
           ClientType: clientType,
@@ -69,18 +70,25 @@ Page({
           OrderID: this.data.order.orderid,
           OperateType: 4,
           Header: protoHeader(FunCode.BSFWMemberOperateReq, 66201)
-        }
+        })
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeReq: FunCode.BSFWMemberOperateReq,
             funCodeRsp: FunCode.BSFWMemberOperateRsp,
             isEncrypted: isEncrypted()
           },
           success: (res) => {
-            if (res.code != 0) {
-              hideLoading(() => {}, '请求失败,原因:'+res.msg)
+            /// 请求失败
+            if (res.code ! = 0) {
+              hideLoading(() => {}, res.msg, 'error')
+              return
+            }
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
               return
             }
             hideLoading(() => {
@@ -93,7 +101,7 @@ Page({
             hideLoading(() => {
               /// 返回上层视图
               wx.navigateBack()
-            }, '操作失败,原因:'+emsg, 'error')
+            }, emsg, 'error')
           }
         })
       },  '请求中.....')

+ 16 - 8
GuangZuan/miniprogram/mHome/pages/bond/prepayment/index.ts

@@ -1,8 +1,9 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
-import { accountid, clientType, isEncrypted, loginCode, loginid, protoHeader, taAccount, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, loginCode, loginid, protoHeader, taAccount, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
 import { queryFworderoperate } from "../../../../services/api/trade/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -45,7 +46,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(() => {}, '加载失败,原因:'+emsg)
+          hideLoading(() => {}, emsg, 'error')
         }
       })
     })
@@ -60,7 +61,7 @@ Page({
       /// showLoading
       showLoading(() => {
         /// 参数信息
-        const params = {
+        const info = JSON.stringify({
           UserID: userid(),
           OperateID: loginid(),
           ClientType: clientType,
@@ -69,18 +70,25 @@ Page({
           OrderID: this.data.order.orderid,
           OperateType: 3,
           Header: protoHeader(FunCode.BSFWMemberOperateReq, 66201)
-        }
+        })
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeReq: FunCode.BSFWMemberOperateReq,
             funCodeRsp: FunCode.BSFWMemberOperateRsp,
             isEncrypted: isEncrypted()
           },
           success: (res) => {
-            if (res.code != 0) {
-              hideLoading(() => {}, '请求失败,原因:'+res.msg)
+            /// 请求失败
+            if (res.code ! = 0) {
+              hideLoading(() => {}, res.msg, 'error')
+              return
+            }
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
               return
             }
             hideLoading(() => {
@@ -93,7 +101,7 @@ Page({
             hideLoading(() => {
               /// 返回上层视图
               wx.navigateBack()
-            }, '操作失败,原因:'+emsg, 'error')
+            }, emsg, 'error')
           }
         })
       },  '请求中.....')

+ 3 - 3
GuangZuan/miniprogram/mHome/pages/calculator/index.wxml

@@ -33,7 +33,7 @@
   <view class="cell-view weight"> 
     <text>重量</text>
     <view class="content weight">
-      <van-field model:value="{{ weight }}" clearable placeholder="请输入重量" type="number" border="{{ false }}"/>
+      <van-field model:value="{{ weight }}" clearable placeholder="请输入重量" type="number" adjust-position />
     </view>
   </view>
 
@@ -41,7 +41,7 @@
   <view class="cell-view rate"> 
     <text>汇率</text>
     <view class="content rate">
-      <van-field model:value="{{ dayrate }}" clearable placeholder="请输入汇率" type="number" border="{{ false }}"/>
+      <van-field model:value="{{ dayrate }}" clearable placeholder="请输入汇率" type="digit" adjust-position adjust-position />
     </view>
   </view>
 
@@ -49,7 +49,7 @@
   <view class="cell-view discount"> 
     <text>折扣</text>
     <view class="content discount">
-      <van-field model:value="{{ discount }}" clearable placeholder="请输入折扣" type="number" border="{{ false }}"/>
+      <van-field model:value="{{ discount }}" clearable placeholder="请输入折扣" type="digit" adjust-position />
     </view>
   </view>
 

+ 2 - 2
GuangZuan/miniprogram/mHome/pages/cerserach/index.ts

@@ -96,7 +96,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '参数加载失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -124,7 +124,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '证书地址参数加载失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })

+ 3 - 3
GuangZuan/miniprogram/mHome/pages/cerserach/index.wxml

@@ -6,7 +6,7 @@
 
 <!-- tabs -->
 <view class="tab-view">
-  <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+  <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
     <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
   </van-tabs>  
 </view>
@@ -22,11 +22,11 @@
     <!-- 英文名称 -->
     <text class="label">{{config.orgenname}}</text>
     <!-- 请输入证书号 -->
-    <view class="field-view"><van-field model:value="{{ certno }}" input-align="center" placeholder="请输入证书号"></van-field></view>
+    <view class="field-view"><van-field model:value="{{ certno }}" input-align="center" adjust-position placeholder="请输入证书号" /></view>
     <!-- 中文名称 -->
     <text class="label">{{config.orgcnname}}</text>
     <!-- 请输入防伪码 -->
-    <view class="field-view"><van-field model:value="{{ securityCode }}" input-align="center" placeholder="请输入防伪码"></van-field></view>
+    <view class="field-view"><van-field model:value="{{ securityCode }}" input-align="center" adjust-position placeholder="请输入防伪码" /></view>
     <!-- 证书类型 -->
     <text class="label">{{config.certtype}}证书数据来源于官网,所有权归NGDTC所有。</text>
     <!-- 证书查询地址 -->

+ 18 - 6
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts

@@ -2,8 +2,9 @@ import { FunCode } from "../../../constants/enum/funcode"
 import { EOrderSrc } from "../../../constants/enum/index"
 import { sendMsgToMQ } from "../../../services/api/common/index"
 import { getGoods } from "../../../services/api/orders/index"
-import { accountid, clientType, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index"
+import { encryptBody } from "../../../utils/websocket/crypto"
 
 Page({
 
@@ -45,7 +46,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading( ()=> {}, '数据请求失败,原因:'+emsg)
+          hideLoading( ()=> {}, emsg, 'error')
         }
       })
     })
@@ -59,7 +60,7 @@ Page({
       /// showLoding....
       showLoading(() => {
         /// 构建参数信息
-        const params = {
+        const info = JSON.stringify({
           Header: protoHeader(FunCode.ZSBuyOrderDestingReq),
           UserID: userid(),
           AccountID: accountid(),
@@ -70,17 +71,28 @@ Page({
           ClientType: clientType(),
           OperatorID: loginid(),
           MarketID: marketid()
-        }
+        })
 
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeReq: FunCode.ZSBuyOrderDestingReq,
             funCodeRsp: FunCode.ZSBuyOrderDestingRsp,
             isEncrypted: isEncrypted(),
           },
-          success: () => {
+          success: (res) => {
+            /// 请求失败
+            if (res.code ! = 0) {
+              hideLoading(() => {}, res.msg, 'error')
+              return
+            }
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+              return
+            }
             /// 请求成功
             hideLoading(() => {
               wx.navigateBack()

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/inspection/detail/index.ts

@@ -69,7 +69,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 停止下拉刷新

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/inspection/list/index.less

@@ -102,7 +102,7 @@
 }
 
 .buttom_view {
-  position: fixed;
+  position: sticky;
   bottom: 10px;
   z-index: 999;
   display: flex;

+ 16 - 13
GuangZuan/miniprogram/mHome/pages/inspection/list/index.ts

@@ -1,9 +1,10 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryGZCJJCOrder } from "../../../../services/api/trade/index"
-import { userid, getExecutestatus, isEncrypted, protoHeader, loginid, clientType, timetample, loginCode } from "../../../../services/utils"
+import { userid, getExecutestatus, isEncrypted, protoHeader, loginid, clientType, timetample, loginCode, getErrorMsg } from "../../../../services/utils"
 import { hideLoading, showLoading } from "../../../../utils/message/index"
 import { isnullstr } from "../../../../utils/util"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -44,7 +45,7 @@ Page({
     let id = (<string> e.target.id).split(' ')[0]
     const index = <number> <unknown>ids[1]
     /// 单号
-    const orderid = this.data.orders[index].orderid
+    const { orderidstr } = this.data.orders[index]
 
     switch (id) {
       case 'detail':     /// 详情
@@ -53,13 +54,13 @@ Page({
         })
         break;
       case 'cancel':            /// 撤销
-        this.doCJJCOperator(1, orderid)
+        this.doCJJCOperator(1, orderidstr)
         break;
       case 'confirmsend':       /// 确认发货
-        this.doCJJCOperator(2, orderid)
+        this.doCJJCOperator(2, orderidstr)
         break;
       case 'confirmresult':     /// 确认检测结果
-        this.doCJJCOperator(3, orderid)
+        this.doCJJCOperator(3, orderidstr)
         break;
       case 'confirmprepayment':  /// 确认预付款
         wx.navigateTo({
@@ -124,7 +125,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '加载失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 停止下拉刷新
@@ -137,11 +138,11 @@ Page({
   /**
    * 出境检测操作请求
    */
-  doCJJCOperator(operator: number, orderid: number) {
+  doCJJCOperator(operator: number, orderid: string) {
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         UserID: userid(),
         OperateID: loginid(),
         ClientType: clientType,
@@ -150,18 +151,20 @@ Page({
         OrderID: orderid.toString(),
         OperateType: operator,
         Header: protoHeader(FunCode.CJJCMemberOperateReq, 66201)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.CJJCMemberOperateReq,
           funCodeRsp: FunCode.CJJCMemberOperateRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作申请失败, 原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -172,7 +175,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作申请失败, 原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '操作请求中.....')

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/inspection/list/index.wxml

@@ -8,7 +8,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs>  
   </view>

+ 17 - 9
GuangZuan/miniprogram/mHome/pages/inspection/payment/index.ts

@@ -1,8 +1,9 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryGzcjjcorderoperate } from "../../../../services/api/trade/index"
-import { userid, loginid, clientType, timetample, loginCode, protoHeader, isEncrypted, taAccount, accountid } from "../../../../services/utils"
+import { userid, loginid, clientType, timetample, loginCode, protoHeader, isEncrypted, taAccount, accountid, getErrorMsg } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -45,7 +46,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(() => {}, '加载失败,原因:'+emsg)
+          hideLoading(() => {}, emsg, 'error')
         }
       })
     })
@@ -59,27 +60,34 @@ Page({
     showModel(() => {
       showLoading(()=>{
         /// 参数信息
-        const params = {
+        const info = JSON.stringify({
           UserID: userid(),
           OperateID: loginid(),
           ClientType: clientType,
           ClientSerialNo: timetample().toString,
           OperateAccount: loginCode(),
-          OrderID: this.data.order.orderid,
+          OrderID: this.data.order.orderidstr,
           OperateType: 5,
           Header: protoHeader(FunCode.CJJCMemberOperateReq, 66201)
-        }
+        })
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeReq: FunCode.CJJCMemberOperateReq,
             funCodeRsp: FunCode.CJJCMemberOperateRsp,
             isEncrypted: isEncrypted()
           },
           success: (res) => {
-            if (res.code != 0) {
-              hideLoading(()=>{}, '操作申请失败, 原因:'+res.msg, 'error')
+            /// 请求失败
+            if (res.code ! = 0) {
+              hideLoading(() => {}, res.msg, 'error')
+              return
+            }
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
               return
             }
             hideLoading(()=>{
@@ -88,7 +96,7 @@ Page({
             }, '操作成功', 'success')
           },
           fail: (emsg) => {
-            hideLoading(()=>{}, '操作失败,原因:'+emsg, 'error')
+            hideLoading(()=>{}, emsg, 'error')
           }
         })
       })

+ 17 - 9
GuangZuan/miniprogram/mHome/pages/inspection/prepayment/index.ts

@@ -1,8 +1,9 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryGzcjjcorderoperate } from "../../../../services/api/trade/index"
-import { userid, loginid, clientType, timetample, loginCode, protoHeader, isEncrypted, taAccount, accountid } from "../../../../services/utils"
+import { userid, loginid, clientType, timetample, loginCode, protoHeader, isEncrypted, taAccount, accountid, getErrorMsg } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -45,7 +46,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(() => {}, '加载失败,原因:'+emsg)
+          hideLoading(() => {}, emsg)
         }
       })
     })
@@ -59,27 +60,34 @@ Page({
     showModel(() => {
       showLoading(()=>{
         /// 参数信息
-        const params = {
+        const info = JSON.stringify({
           UserID: userid(),
           OperateID: loginid(),
           ClientType: clientType,
           ClientSerialNo: timetample().toString,
           OperateAccount: loginCode(),
-          OrderID: this.data.order.orderid,
+          OrderID: this.data.order.orderidstr,
           OperateType: 4,
           Header: protoHeader(FunCode.CJJCMemberOperateReq, 66201)
-        }
+        })
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeReq: FunCode.CJJCMemberOperateReq,
             funCodeRsp: FunCode.CJJCMemberOperateRsp,
             isEncrypted: isEncrypted()
           },
           success: (res) => {
-            if (res.code != 0) {
-              hideLoading(()=>{}, '操作申请失败, 原因:'+res.msg, 'error')
+            /// 请求失败
+            if (res.code ! = 0) {
+              hideLoading(() => {}, res.msg, 'error')
+              return
+            }
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
               return
             }
             hideLoading(()=>{
@@ -88,7 +96,7 @@ Page({
             }, '操作成功', 'success')
           },
           fail: (emsg) => {
-            hideLoading(()=>{}, '操作失败,原因:'+emsg, 'error')
+            hideLoading(()=>{}, emsg, 'error')
           }
         })
       })

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/jewelry/list/index.ts

@@ -84,7 +84,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '加载失败,原因:'+emsg)
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/msg/msglist/index.ts

@@ -64,7 +64,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '请求失败, 原因:'+emsg)
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })

+ 6 - 6
GuangZuan/miniprogram/mHome/pages/msg/msglist/index.wxml

@@ -5,18 +5,18 @@
 </van-nav-bar>
 
 <!-- tabs -->
-<van-tabs animated bind:change="onChange">
-  <van-tab wx:for="{{tabs}}" wx:key="id" title="{{item.title}}"></van-tab>
+<van-tabs animated bind:change="onChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+  <van-tab wx:for="{{ tabs }}" wx:key="id" title="{{ item.title }}"></van-tab>
 </van-tabs>
 
 <van-cell-group>
-  <van-cell custom-class="msg-item" wx:for="{{msgs}}" wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{idx}}" bind:click="goToMsgDetail">
+  <van-cell custom-class="msg-item" wx:for="{{ msgs }}" wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{ idx }}" bind:click="goToMsgDetail">
     <view solt="title" class="view_top_content">
-      <text class="msg_title" user-select>{{itm.title}}</text>
-      <text class="msg_date" user-select>{{itm.scheduletime}}</text>
+      <text class="msg_title" user-select>{{ itm.title }}</text>
+      <text class="msg_date" user-select>{{ itm.scheduletime }}</text>
     </view>
     <view class="content">
-      <text user-select>{{itm.content}}</text>
+      <text user-select>{{ itm.content }}</text>
     </view>
   </van-cell>
 </van-cell-group>

+ 2 - 2
GuangZuan/miniprogram/mHome/pages/search/index.wxml

@@ -10,8 +10,8 @@
 
     <!-- tabs -->
     <view class="tab-view">
-      <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
-        <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
+      <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+        <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
       </van-tabs>  
     </view>
   </view>

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/address/list/index.ts

@@ -42,7 +42,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 结束下拉刷新

+ 3 - 3
GuangZuan/miniprogram/mMine/pages/address/list/index.wxml

@@ -1,7 +1,7 @@
 <!-- 导航栏 -->
-<van-nav-bar custom-style="background-color: #E92020">
-  <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-  <text slot="title" style="color: white;">收货地址管理</text>
+<van-nav-bar custom-style="background-color: #fff">
+  <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+  <text slot="title" style="color: #333;">收货地址管理</text>
 </van-nav-bar>
 
 <view class="container" style="padding-bottom: {{safeBottom}}px;">

+ 30 - 25
GuangZuan/miniprogram/mMine/pages/address/operate/index.ts

@@ -1,9 +1,10 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
-import { divisions, isEncrypted, protoHeader, userid, timetample } from '../../../../services/utils'
+import { divisions, isEncrypted, protoHeader, userid, timetample, getErrorMsg } from '../../../../services/utils'
 import { areaList } from '@vant/area-data';
 import Toast from "../../../../miniprogram_npm/@vant/weapp/toast/toast";
 import { hideLoading, showLoading } from "../../../../utils/message/index";
+import { encryptBody } from "../../../../utils/websocket/crypto";
 
 /// regions
 const regions = divisions()
@@ -141,23 +142,24 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const userInfo = { 
+      const info = JSON.stringify({ 
         ReceiveInfoId: this.data.autoid, 
         Header: protoHeader(FunCode.DelUserReceiveInfoReq)  
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(userInfo),
+          data: encryptBody(info),
           funCodeReq: FunCode.DelUserReceiveInfoReq,
           funCodeRsp: FunCode.DelUserReceiveInfoRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          /// 操作失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '删除操作失败,原因:'+res.msg, 'error')
-            return 
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+            return
           }
           /// 操作成功
           hideLoading(()=>{
@@ -167,7 +169,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '删除操作失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '删除操作请求中.....')
@@ -180,24 +182,25 @@ Page({
     /// loding.....
     showLoading(()=> {
       /// 参数信息
-      const data = { 
+      const info = JSON.stringify({ 
         AutoId: this.data.autoid, 
         UserId: userid(),
         Header: protoHeader(FunCode.UserReceiveIsDefaultReq)  
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(data),
+          data: encryptBody(info),
           funCodeReq: FunCode.UserReceiveIsDefaultReq,
           funCodeRsp: FunCode.UserReceiveIsDefaultRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          /// 操作失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作失败,原因:'+res.msg, 'error')
-            return 
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+            return
           }
           hideLoading(()=>{
             /// 返回上层视图
@@ -206,7 +209,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -221,7 +224,8 @@ Page({
     /// loding.....
     showLoading(()=> {
       /// 参数信息
-      const userInfo = { ClientSerialID: timetample(), 
+      const info = JSON.stringify({ 
+        ClientSerialID: timetample(), 
         UserID: userid(),
         ReceiverName: this.data.username,
         CardTypeID: 0,
@@ -235,20 +239,21 @@ Page({
         TakeRemark: '',
         ReceiveInfoId: this.data.autoid,
         Header: protoHeader(FunCode.UserReceiveInfoReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(userInfo),
+          data: encryptBody(info),
           funCodeReq: FunCode.UserReceiveInfoReq,
           funCodeRsp: FunCode.UserReceiveInfoRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          /// 操作失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作失败,原因:'+res.msg, 'error')
-            return 
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+            return
           }
           /// 操作失败
           hideLoading(()=>{
@@ -258,7 +263,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '操作请求中......')

+ 6 - 6
GuangZuan/miniprogram/mMine/pages/address/operate/index.wxml

@@ -1,14 +1,14 @@
 <!-- 导航栏 -->
-<van-nav-bar custom-style="background-color: #E92020">
-  <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-  <text slot="title" style="color: white;">收货地址管理</text>
+<van-nav-bar custom-style="background-color: #fff">
+  <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+  <text slot="title" style="color: #333;">收货地址管理</text>
 </van-nav-bar>
 
 <van-cell-group>
   <!-- 收货人 --> 
-  <van-field model:value="{{ username }}" required clearable label="收货人" placeholder="请输入收货人" />
+  <van-field model:value="{{ username }}" adjust-position required clearable label="收货人" placeholder="请输入收货人" />
   <!-- 联系电话 --> 
-  <van-field model:value="{{ mobile }}" type="number" required clearable label="联系电话" placeholder="请输入收货人联系电话"/>
+  <van-field model:value="{{ mobile }}" adjust-position type="number" required clearable label="联系电话" placeholder="请输入收货人联系电话"/>
   <!-- 收货地区 --> 
   <view class="region">
     <text class="label">*收货地区</text>
@@ -22,7 +22,7 @@
   </view>
 
   <!-- 详细地址 --> 
-  <van-field model:value="{{ detailAddress }}" required clearable autosize label="详细地址" placeholder="请输入详细地址"/>
+  <van-field model:value="{{ detailAddress }}" adjust-position required clearable autosize label="详细地址" placeholder="请输入详细地址"/>
 </van-cell-group>
 
 <!--  底部视图  -->

+ 4 - 0
GuangZuan/miniprogram/mMine/pages/bank/index.less

@@ -1,4 +1,8 @@
 .button-view {
   margin: 20px;
   border-radius: 10px;
+
+  .submit {
+    margin-bottom: 10px;
+  }
 }

+ 40 - 29
GuangZuan/miniprogram/mMine/pages/bank/index.ts

@@ -2,8 +2,9 @@ import { FunCode } from "../../../constants/enum/funcode"
 import Toast from "../../../miniprogram_npm/@vant/weapp/toast/toast"
 import { queryBankAccountSign, queryCusBankSignBank } from "../../../services/api/account/index"
 import { sendMsgToMQ } from "../../../services/api/common/index"
-import { accountid, isEncrypted, loginQuery, protoHeader, timetample, userid } from "../../../services/utils"
-import { hideLoading, showLoading } from "../../../utils/message/index"
+import { accountid, getErrorMsg, isEncrypted, loginQuery, protoHeader, timetample, userid } from "../../../services/utils"
+import { hideLoading, showLoading, showModel } from "../../../utils/message/index"
+import { encryptBody } from "../../../utils/websocket/crypto"
 
 Page({
 
@@ -94,7 +95,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '托管银行请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -119,21 +120,24 @@ Page({
           }
           /// hideLoading
           hideLoading(()=>{
+            const sign = res.data.filter(obj => {
+              return obj.signstatus === 2 || obj.signstatus === 3 || obj.signstatus === 4
+            })[0]
             /// 数据赋值
             this.setData({ 
-              bankAccountSign: res.data[0],
-              bankName: res.data[0].bankname,
-              bankNo: res.data[0].cardno,
-              accountName: res.data[0].bankaccountname,
-              branchBankName: res.data[0].branchbankname,
+              bankAccountSign: sign,
+              bankName: sign.bankname,
+              bankNo: sign.cardno,
+              accountName: sign.bankaccountname,
+              branchBankName: sign.branchbankname,
               bankInfo: this.data.bankInfos.filter(obj => {
-                return obj.bankid === res.data[0].bankid
+                return obj.bankid === sign.bankid
               })[0],
             })
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '用户签约信息请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -145,10 +149,14 @@ Page({
   onButtonPressed(e: any) {
     switch (e.currentTarget.id) {
       case 'submit':   /// 签约提交
-        this.doBankAccountSign()
+        showModel(() => {
+          this.doBankAccountSign()
+        }, '提示', '确定要申请签约吗?')
         break;
       case 'cancel':  /// 解约请求
-        this.doCancelBankAccountSign()
+        showModel(() => {
+          this.doCancelBankAccountSign()
+        }, '提示', '确定要申请解约吗?')
         break
       default:
         break;
@@ -168,7 +176,7 @@ Page({
       /// 银行卡号
       const bankid = this.data.bankAccountSign ? this.data.bankAccountSign.bankid : this.data.bankInfo.bankid
       /// 参数信息
-      const param = { 
+      const info = JSON.stringify({ 
         /// 扩展信息(JSON串,参考配置要求进行填充)
         extend_info: JSON.stringify({ "sex" : 1 }),
         /// 交易所业务日期
@@ -211,20 +219,21 @@ Page({
         CertType: userinfo.cardtypeid.toString(),
         /// 头部
         Header: protoHeader(FunCode.T2bBankSignReq)  
-      }
+      })
       
       /// 发送请求
       sendMsgToMQ({
         data: {
           funCodeReq: FunCode.T2bBankSignReq,
-          funCodeRsp: FunCode.T2bBankSignReq,
+          funCodeRsp: FunCode.T2bBankSignRsp,
           isEncrypted: isEncrypted(),
-          data: JSON.stringify(param)
+          data: encryptBody(info)
         },
         success: (res) => {
-          /// 请求失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 请求成功
@@ -234,7 +243,7 @@ Page({
           }, '签约请求成功', 'success')
         }, 
         fail: (emsg) => {
-          hideLoading(()=>{}, '操作请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '操作请求中.....')
@@ -247,11 +256,11 @@ Page({
     /// loading
     showLoading(()=>{
       /// 参数信息
-      const param = {
+      const info = JSON.stringify({
         /// 头部
         Header: protoHeader(FunCode.T2bBankCancelSignReq),  
         /// 外部操作流水号
-        ExtOperatorID: timetample(),
+        ExtOperatorID: timetample().toString(),
         /// 账户
         AccountCode: this.data.bankAccountSign.accountcode,
         /// 托管银行编号
@@ -261,24 +270,25 @@ Page({
         /// 交易所业务日期
         TradeDate: this.data.cusBankInfo.tradedate,
         /// 是否强制
-        isForce: 0,
+        IsForce: 0,
         /// 银行子账号
         BankChildAcc: this.data.bankAccountSign.bankaccountno,
         /// 银行子账号名
         BankChildAccName: this.data.bankAccountSign.bankaccountname
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
           isEncrypted: isEncrypted(),
           funCodeReq: FunCode.T2bBankCancelSignReq,
           funCodeRsp: FunCode.T2bBankCancelSignRsp,
-          data: JSON.stringify(param)
+          data: encryptBody(info)
         },
         success: (res) => {
-          /// 请求失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '解约请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 请求成功
@@ -288,7 +298,8 @@ Page({
           }, '解约请求成功', 'success')
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '解约请求失败,原因:'+emsg, 'error')
+          debugger
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '解约请求中.....')

+ 5 - 4
GuangZuan/miniprogram/mMine/pages/bank/index.wxml

@@ -9,19 +9,20 @@
 <!-- 内容 -->
 <van-cell-group>
   <!-- 开户银行 -->
-  <van-field model:value="{{ bankName }}" is-link label="开户银行" required clearable placeholder="请选择开户银行" bind:click-input="showBankInfos">
+  <van-field model:value="{{ bankName }}" adjust-position is-link label="开户银行" required clearable placeholder="请选择开户银行" bind:click-input="showBankInfos">
   </van-field>
   <!-- 银行卡号 -->
-  <van-field model:value="{{ bankNo }}" type="number" label="银行卡号" required clearable placeholder="请输入银行卡号"/>
+  <van-field model:value="{{ bankNo }}" adjust-position type="number" label="银行卡号" required clearable placeholder="请输入银行卡号"/>
   <!-- 姓名 -->
-  <van-field model:value="{{ accountName }}" label="姓名" required clearable placeholder="请输入姓名"/>
+  <van-field model:value="{{ accountName }}" adjust-position label="姓名" required clearable placeholder="请输入姓名"/>
   <!-- 支行名称 -->
-  <van-field model:value="{{ branchBankName }}" label="支行名称" required clearable placeholder="请填写开户支行名称"/>
+  <van-field model:value="{{ branchBankName }}" adjust-position label="支行名称" required clearable placeholder="请填写开户支行名称"/>
 </van-cell-group>
 
 <!-- 按钮 -->
 <view class="button-view">
   <van-button custom-class="submit" id="submit" round color="linear-gradient(to right, #4bb0ff, #6149f6)" block bind:click="onButtonPressed">提交</van-button>
+  <van-button wx:if="{{ bankAccountSign }}" custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #D91D34)" block bind:click="onButtonPressed">解约</van-button>
 </view>
 
 <!-- 选择开户行 -->

+ 58 - 45
GuangZuan/miniprogram/mMine/pages/inoutgold/index.ts

@@ -3,11 +3,11 @@ import Toast from "../../../miniprogram_npm/@vant/weapp/toast/toast"
 import services from "../../../services/index"
 import { queryBankAccountSign } from "../../../services/api/account/index"
 import { sendMsgToMQ } from "../../../services/api/common/index"
-import { accountid, isEncrypted, loginQuery, protoHeader, timetample, userid } from "../../../services/utils"
+import { accountid, getErrorMsg, isEncrypted, loginQuery, protoHeader, timetample, userid } from "../../../services/utils"
 import { formatDate, isnullstr } from "../../../utils/util"
-import { hideLoading, showLoading } from "../../../utils/message/index"
+import { hideLoading, showLoading, showModel } from "../../../utils/message/index"
+import { encryptBody } from "../../../utils/websocket/crypto"
 
-// mMine/pages/inoutgold/index.ts
 Page({
 
   /**
@@ -58,7 +58,15 @@ Page({
   onButtonPressed(e: any) {
     switch (e.currentTarget.id) {
       case "submit":  /// 提交申请
-        this.data.active == 0 ? this.doInMoneyApply() : this.doOutMoneyApply()
+        if (this.data.active == 0) {
+          showModel(() => {
+            this.doInMoneyApply()
+          }, '提示', '确定要进行入金操作吗?')
+        } else {
+          showModel(() => {
+            this.doOutMoneyApply()
+          }, '提示', '确定要进行出金操作吗?')
+        }
         break;
       default:      /// 全部
         this.setData({ outamount: this.data.enableOutAmount })
@@ -117,22 +125,23 @@ Page({
             return
           }
           hideLoading(() => {
+            const sign = res.data.filter(obj => {
+              return obj.signstatus === 2 || obj.signstatus === 3 || obj.signstatus === 4
+            })[0]
             /// 数据赋值
             this.setData({ 
-              bankAccountSign: res.data[0],
-              sign: res.data.map(obj=>{
-                return {
-                  bankname: obj.bankname,
-                  cardno: isnullstr(obj.cardno),
-                  bankaccountname: isnullstr(obj.bankaccountname),
-                  branchbankname: isnullstr(obj.branchbankname)
-                }
-              })[0]
+              bankAccountSign: sign,
+              sign: {
+                bankname: sign.bankname,
+                cardno: isnullstr(sign.cardno),
+                bankaccountname: isnullstr(sign.bankaccountname),
+                branchbankname: isnullstr(sign.branchbankname)
+              }
             })
           })
         },
         fail: (emsg) => {
-          hideLoading(() => {}, '托管银行请求失败,原因:'+emsg)
+          hideLoading(() => {}, emsg, 'error')
         },
         complete: () => {}
       })
@@ -144,31 +153,32 @@ Page({
     /// loding....
     showLoading(()=>{
       /// 参数信息
-      const param = {
+      const info = JSON.stringify({
         /// 头部
         Header: protoHeader(FunCode.AccountFundInfoReq),
         /// uint32 查询位掩码
         QueryBitMask: 2,
         /// uint64 查询资金账号
         AccountId: accountid(),
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
           isEncrypted: isEncrypted(),
           funCodeReq: FunCode.AccountFundInfoReq,
-          funCodeRsp: FunCode.AccountFundInfoReq,
-          data: JSON.stringify(param)
+          funCodeRsp: FunCode.AccountFundInfoRsp,
+          data: encryptBody(info)
         },
         success: (res) => {
-          /// 请求失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '账户资金信息请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
         }, 
         fail: (emsg) => {
-          hideLoading(()=>{}, '账户资金信息请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '账户资金信息请求中......')
@@ -181,15 +191,15 @@ Page({
     /// showLoading
     showLoading(()=>{
       /// 参数信息
-      const param = {
+      const info = JSON.stringify({
         /// 头部
         Header: protoHeader(FunCode.T2bBankDepositReq),
         /// 外部操作流水号
-        ExtOperatorID: timetample(),
+        ExtOperatorID: timetample().toString(),
         /// 托管银行编号
         CusBankID: this.data.bankAccountSign.cusbankid,
         /// 金额
-        Amount: this.data.inamount,
+        Amount: Number(this.data.inamount),
         /// 币种
         Currency: this.data.bankAccountSign.currency,
         /// 银行卡号
@@ -199,20 +209,21 @@ Page({
         /// 资金账户
         AccountCode: this.data.bankAccountSign.accountcode,
         /// 扩展信息(JSON串,参考配置要求进行填充)
-        Extend_Info: {"sex": 1, "certificate_photo_url": this.data.filePath},
-      }
+        extend_info: JSON.stringify({"sex": 1, "certificate_photo_url": this.data.filePath}),
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
           isEncrypted: isEncrypted(),
           funCodeReq: FunCode.T2bBankDepositReq,
           funCodeRsp: FunCode.T2bBankDepositRsp,
-          data: JSON.stringify(param)
+          data: encryptBody(info)
         },
         success: (res) => {
-          /// 请求失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '入金申请请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.Status != 0) {
+            hideLoading(() => {}, getErrorMsg(data.Status), 'error')
             return
           }
           /// 请求成功
@@ -222,7 +233,7 @@ Page({
           }, '入金申请请求成功', 'success')
         }, 
         fail: (emsg) => {
-          hideLoading(()=>{}, '入金申请请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '入金请求中......')
@@ -235,15 +246,15 @@ Page({
     /// loding....
     showLoading(()=>{
       /// 参数信息
-      const param = {
+      const info = JSON.stringify({
         /// 头部
         Header: protoHeader(FunCode.T2bBankWithdrawReq),
         /// 外部操作流水号
-        ExtOperatorID: timetample(),
+        ExtOperatorID: timetample().toString(),
         /// 托管银行编号
         CusBankID: this.data.bankAccountSign.cusbankid,
         /// 金额
-        Amount: this.data.outamount,
+        Amount: Number(this.data.outamount),
         /// 币种
         Currency: this.data.bankAccountSign.currency,
         /// 银行卡号
@@ -253,7 +264,7 @@ Page({
         /// 资金账户
         AccountCode: this.data.bankAccountSign.accountcode,
         /// 扩展信息(JSON串,参考配置要求进行填充)
-        Extend_Info: {"sex": 1},
+        extend_info: JSON.stringify({"sex": 1}),
         /// 银行卡行号
         OpenCardBankId: this.data.bankAccountSign.bankid,
         /// 收款支行名称
@@ -262,19 +273,20 @@ Page({
         AppDateTime: formatDate(new Date()),
         /// 账户类型
         AccountType: 0
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
           isEncrypted: isEncrypted(),
           funCodeReq: FunCode.T2bBankWithdrawReq,
           funCodeRsp: FunCode.T2bBankWithdrawRsp,
-          data: JSON.stringify(param)
+          data: encryptBody(info)
         },
         success: (res) => {
-          /// 请求失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '出金申请请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.Status != 0) {
+            hideLoading(() => {}, getErrorMsg(data.Status), 'error')
             return
           }
           /// 请求成功
@@ -284,7 +296,7 @@ Page({
           }, '出金申请请求成功', 'success')
         }, 
         fail: (emsg) => {
-          hideLoading(()=>{}, '出金申请请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '出金请求中......')
@@ -333,7 +345,7 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad() {
+  onLoad(options: any) {
     /// 查询账户签约信息
     this.queryBankAccountSign()
     /// 资金账户查询
@@ -342,8 +354,9 @@ Page({
     const start = loginQuery().systemParams.filter(obj => { return obj.paramcode === "012" })[0].paramvalue
     /// 开始结束时间
     const end = loginQuery().systemParams.filter(obj => { return obj.paramcode === "013" })[0].paramvalue
+    const id = options.id
     /// 显示时间
-    this.setData({ time: start+'-'+end })
+    this.setData({ time: start+'-'+end, active: id })
   },
 
   /**
@@ -357,7 +370,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-
+    this.setData({ active: this.data.active })
   },
 
   /**

+ 4 - 4
GuangZuan/miniprogram/mMine/pages/inoutgold/index.wxml

@@ -8,8 +8,8 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
-      <van-tab wx:for="{{tabs}}" active="{{active}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
+    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+      <van-tab wx:for="{{ tabs }}" active="{{ active }}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs>  
   </view>
 </view>
@@ -21,7 +21,7 @@
     <!-- 充值金额 -->
     <view class="item amount">
       <text class="title">充值金额</text>
-      <van-field id="into-amount-field" model:value="{{inamount}}" type="number" border="{{false}}" placeholder="请输入充值金额"></van-field>
+      <van-field id="into-amount-field" model:value="{{inamount}}" clearable type="digit" adjust-position border="{{false}}" placeholder="请输入充值金额"></van-field>
     </view>
 
     <!-- 凭证 -->
@@ -41,7 +41,7 @@
     <view class="item out-amount" id="item-out-amount">
       <text class="title">提现金额</text>
       <view class="out-amount-view">
-        <van-field id="out-amount-field" model:value="{{outamount}}" type="number" border="{{false}}" placeholder="请输入提现金额"></van-field>
+        <van-field id="out-amount-field" model:value="{{outamount}}" clearable type="digit" adjust-position border="{{false}}" placeholder="请输入提现金额"></van-field>
         <view class="enable-out-amount-view">
           <text class="enable-out-amount">可提现金额:{{enableOutAmount}}</text>
           <van-button id="allamount" color="#F7A657" round type="mini" bind:click="onButtonPressed">全部</van-button>

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/invoice/list/index.ts

@@ -66,7 +66,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '数据加载失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 结束下拉刷新

+ 31 - 18
GuangZuan/miniprogram/mMine/pages/invoice/operate/index.ts

@@ -1,7 +1,8 @@
 import { FunCode } from "../../../../constants/enum/funcode"
-import { protoHeader, userid, isEncrypted, timetample } from "../../../../services/utils"
+import { protoHeader, userid, isEncrypted, timetample, getErrorMsg } from "../../../../services/utils"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { hideLoading, showLoading, showToast } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -71,7 +72,8 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const userInfo = { ClientSerialID: timetample(), 
+      const info = JSON.stringify({ 
+        ClientSerialID: timetample(), 
         UserID: userid(),
         UserName: this.data.inname,
         ReceiptType: this.data.type,
@@ -82,20 +84,26 @@ Page({
         ReceiptInfoId: this.data.autoid,
         ContactInfo: this.data.inmobile,
         Header: protoHeader(FunCode.UserReceiptInfoReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-        data: JSON.stringify(userInfo),
+        data: encryptBody(info),
         funCodeReq: FunCode.UserReceiptInfoReq,
         funCodeRsp: FunCode.UserReceiptInfoReq,
         isEncrypted: isEncrypted()
       },
       success: (res) => {
-        /// 操作失败
-        if (res.code != 0) {
-          hideLoading(()=>{}, '请求失败,原因:'+res.msg, 'error')
-          return 
+        /// 请求失败
+        if (res.code ! = 0) {
+          hideLoading(() => {}, res.msg, 'error')
+          return
+        }
+        /// 解析对象
+        const data = JSON.parse(res.data.data)
+        if (data.RetCode != 0) {
+          hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+          return
         }
         /// 操作成功
         hideLoading(()=>{
@@ -105,7 +113,7 @@ Page({
       },
       fail: (emsg) => {
         /// 操作失败
-        hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+        hideLoading(()=>{}, emsg, 'error')
       },
     })
     }, '操作请求中......')
@@ -118,24 +126,29 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-    const userInfo = { 
+    const info = JSON.stringify({ 
       ReceiptInfoId: this.data.autoid, 
       Header: protoHeader(FunCode.DelUserReceiptInfoReq)  
-    }
+    })
     /// 发送请求
     sendMsgToMQ({
       data: {
-        data: JSON.stringify(userInfo),
+        data: encryptBody(info),
         funCodeReq: FunCode.DelUserReceiptInfoReq,
         funCodeRsp: FunCode.DelUserReceiptInfoRsp,
         isEncrypted: isEncrypted()
       },
       success: (res) => {
-        /// 操作失败
-        if (res.code != 0) {
-          /// 操作失败
-          hideLoading(()=>{}, '删除操作请求失败,原因:'+res.msg, 'error')
-          return 
+        /// 请求失败
+        if (res.code ! = 0) {
+          hideLoading(() => {}, res.msg, 'error')
+          return
+        }
+        /// 解析对象
+        const data = JSON.parse(res.data.data)
+        if (data.RetCode != 0) {
+          hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+          return
         }
         /// 操作成功
         hideLoading(()=>{
@@ -145,7 +158,7 @@ Page({
       },
       fail: (emsg) => {
         /// 操作失败
-        hideLoading(()=>{}, '删除操作请求失败,原因:'+emsg, 'error')
+        hideLoading(()=>{}, emsg, 'error')
       }
     })
     }, '删除操作请求中......')

+ 6 - 6
GuangZuan/miniprogram/mMine/pages/invoice/operate/index.wxml

@@ -14,22 +14,22 @@
   </view>
 
   <!-- 发票抬头 --> 
-  <van-field model:value="{{ inname }}" clearable label="发票抬头" placeholder="抬头名称" />
+  <van-field model:value="{{ inname }}" adjust-position clearable label="发票抬头" placeholder="抬头名称" />
 
   <!-- 税号 --> 
-  <van-field wx:if="{{type != 1}}" model:value="{{ inno }}" type="number" clearable label="税号" placeholder="纳税人识别号"/>
+  <van-field wx:if="{{type != 1}}" model:value="{{ inno }}" adjust-position clearable label="税号" placeholder="纳税人识别号"/>
 
   <!-- 开户银行 --> 
-  <van-field wx:if="{{type != 1}}" model:value="{{ bankname }}" type="number" clearable label="开户银行" placeholder="选填"/>
+  <van-field wx:if="{{type != 1}}" model:value="{{ bankname }}" adjust-position clearable label="开户银行" placeholder="选填"/>
 
   <!-- 银行账号 --> 
-  <van-field wx:if="{{type != 1}}" model:value="{{ bankno }}" type="number" clearable label="银行账号" placeholder="选填"/>
+  <van-field wx:if="{{type != 1}}" model:value="{{ bankno }}" adjust-position type="number" clearable label="银行账号" placeholder="选填"/>
 
   <!-- 企业地址 --> 
-  <van-field wx:if="{{type != 1}}" model:value="{{ inaddress }}" type="number" clearable label="企业地址" placeholder="选填"/>
+  <van-field wx:if="{{type != 1}}" model:value="{{ inaddress }}" adjust-position clearable label="企业地址" placeholder="选填"/>
 
   <!-- 企业电话 --> 
-  <van-field wx:if="{{type != 1}}" model:value="{{ inmobile }}" type="number" clearable autosize label="企业电话" placeholder="选填"/>
+  <van-field wx:if="{{type != 1}}" model:value="{{ inmobile }}" type="number" adjust-position clearable autosize label="企业电话" placeholder="选填"/>
 
 </van-cell-group>
 

+ 99 - 2
GuangZuan/miniprogram/mMine/pages/modifypwd/index.ts

@@ -1,3 +1,9 @@
+import { FunCode } from "../../../constants/enum/funcode"
+import { sendMsgToMQ } from "../../../services/api/common/index"
+import { getErrorMsg, isEncrypted, loginid, protoHeader } from "../../../services/utils"
+import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index"
+import { encryptBody } from "../../../utils/websocket/crypto"
+
 Page({
 
   /**
@@ -20,11 +26,102 @@ Page({
     wx.navigateBack()
   },
 
+  /**
+   * 修改密码
+   */
+  doModifyPwd() {
+    /// 合规性校验
+    if (!this.check()) {
+      return
+    }
+    // /// showModel
+    // showModel(() => {
+    //   /// showLoading
+    //   showLoading(() => {
+        /// 参数信息
+        const info = JSON.stringify({
+          Header: protoHeader(FunCode.ModifyPwdReq),
+          ModifyPwdType: 1,
+          ModifyPwdID: loginid(),
+          OldPwd: encryptBody(this.data.oldpwd, true),
+          NewPwd: encryptBody(this.data.newpwd, true)
+        })
+        /// 发送请求
+        sendMsgToMQ({
+          data: {
+            isEncrypted: isEncrypted(),
+            funCodeReq: FunCode.ModifyPwdReq,
+            funCodeRsp: FunCode.ModifyPwdRsp,
+            data: encryptBody(info)
+          },
+          success: (res) => {
+            /// 请求失败
+            if (res.code ! = 0) {
+              hideLoading(() => {}, res.msg, 'error')
+              return
+            }
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+              return
+            }
+            hideLoading(()=> {
+              /// 系统登出响应
+              this.onLoginOut()
+            }, '修改成功', 'success')
+          },
+          fail: (emsg) => {
+            hideLoading(() => {}, emsg, 'error')
+          }
+        })
+  //     }, '修改中')
+  //   }, '提示', '确定要修改密码吗?')
+  },
+
    /**
-   * 按钮点击响应事件
+   * 系统登出响应
    */
-  onButtonPressed() {
+  onLoginOut() {
+    /// 清楚所有的缓存数据
+    wx.clearStorage()
+    /// loding....
+    showLoading(()=>{
+      /// 登出
+      setTimeout(function () {
+        hideLoading(()=>{
+          // on confirm
+          wx.reLaunch({ url: '/pages/login/index' })
+        }, '登出成功', 'success')
+      }, 3000)
+    }, '登出中....')
+  },
 
+  check(): boolean {
+    /// 请输入原密码!
+    if (this.data.oldpwd === '') {
+      showToast('请输入原密码!')
+      return false
+    }
+
+    /// 请输入新密码!
+    if (this.data.newpwd === '') {
+      showToast('请输入新密码!')
+      return false
+    }
+
+    /// 请输入原密码!
+    if (this.data.confirmpwd === '') {
+      showToast('请再次确认新密码!')
+      return false
+    }
+
+    /// 两次输入的密码不一样!
+    if (this.data.confirmpwd != this.data.newpwd) {
+      showToast('两次输入的密码不一样!')
+      return false
+    }
+    return true
   },
 
   /**

+ 4 - 5
GuangZuan/miniprogram/mMine/pages/modifypwd/index.wxml

@@ -6,20 +6,19 @@
   </van-nav-bar>
 </view>
 
-
  <!-- 内容 -->
 <van-cell-group>
   <!-- 原密码 -->
-  <van-field model:value="{{ oldpwd }}" label="原密码" required clearable placeholder="请输入原密码">
+  <van-field model:value="{{ oldpwd }}" label="原密码" password required clearable placeholder="请输入原密码" adjust-position>
     <navigator slot="button" style="font-size: 12px; color: #666;" url="/pages/forgetpwd/index">忘记密码?</navigator>
   </van-field>
   <!-- 新密码 -->
-  <van-field model:value="{{ newpwd }}" label="新密码" required clearable placeholder="请输入6-20个字符的新密码"/>
+  <van-field model:value="{{ newpwd }}" label="新密码" password adjust-position required clearable placeholder="请输入6-20个字符的新密码"/>
   <!-- 确认新密码 -->
-  <van-field model:value="{{ confirmpwd }}" label="确认新密码" required clearable placeholder="请再次确认新密码"/>
+  <van-field model:value="{{ confirmpwd }}" label="确认新密码" password required clearable adjust-position placeholder="请再次确认新密码"/>
 </van-cell-group>
 
 <!-- 按钮 -->
 <view class="button-view">
-  <van-button custom-class="submit" color="linear-gradient(to right, #4bb0ff, #6149f6)" block bind:click="onButtonPressed">提交</van-button>
+  <van-button custom-class="submit" round color="linear-gradient(to right, #4bb0ff, #6149f6)" block bind:click="doModifyPwd">提交</van-button>
 </view>

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.ts

@@ -129,7 +129,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 停止下拉刷新

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.wxml

@@ -7,7 +7,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{tabs}}" active="{{active}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs>  
   </view>

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myorders/his/index.ts

@@ -122,7 +122,7 @@ Page({
         })
       },
       fail: (emsg) => {
-        hideLoading(()=>{}, '请求失败,原因:'+emsg)
+        hideLoading(()=>{}, emsg, 'error')
       },
       complete: () => { 
         /// 停止下拉刷新

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myorders/his/index.wxml

@@ -7,7 +7,7 @@
 
   <!-- 过滤条件 -->
   <view class="result-view" style="background-color: white;">
-    <van-tabs custom-class="buyOrSell" type="card" sticky animated bind:change="onDTabChange" line-height="0px" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs custom-class="buyOrSell" type="card" sticky animated bind:change="onDTabChange" line-height="0px" color="#2270D9" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{['买', '卖']}}" wx:for-item="itm" wx:for-index="idx" wx:key="idx" active="{{idx}}" title="{{itm}}"/>
     </van-tabs>  
     <text>从</text>

+ 26 - 23
GuangZuan/miniprogram/mMine/pages/myorders/list/index.ts

@@ -2,9 +2,10 @@ import { FunCode } from "../../../../constants/enum/funcode"
 import { EOrderSrc } from "../../../../constants/enum/index"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryMyBuyOrder, queryMyDeListing, queryMyDelistingApply, queryMySellOrder } from "../../../../services/api/orders/index"
-import { accountid, clientType, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
 import { isnullstr } from "../../../../utils/util"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -45,7 +46,7 @@ Page({
     /// 是否显示日期
     show: false,
     /// 左滑的宽度
-    width: 50
+    width: 100
   },
 
   /**
@@ -257,7 +258,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => { 
           /// 停止下拉刷新
@@ -309,7 +310,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => { 
           /// 停止下拉刷新
@@ -366,7 +367,7 @@ Page({
       },
       fail: (emsg) => {
         /// 加载失败
-        hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+        hideLoading(()=>{}, emsg, 'error')
       },
       complete: () => { 
         /// 停止下拉刷新
@@ -432,7 +433,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => { 
           /// 停止下拉刷新
@@ -447,29 +448,30 @@ Page({
     /// loading
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
+        ClientSerialNo: timetample().toString(),
         UserID: userid(),
         AccountID: accountid(),
         OldWRTradeOrderID: wrtradeorderid,
         OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
-        ClientType: clientType,
-        ClientSerialNo: timetample().toString,
+        ClientType: clientType(),
         OperatorID: loginid(),
         BuyOrSell: buyorsell,
         Header: protoHeader(FunCode.WRListingCancelOrderReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
           funCodeReq: FunCode.WRListingCancelOrderReq,
           funCodeRsp: FunCode.WRListingCancelOrderRsp,
           isEncrypted: isEncrypted(),
-          data: JSON.stringify(params)
+          data: encryptBody(info)
         },
         success: (res) => {
-          if (res.code != 0) {
-            /// 加载失败
-            hideLoading(()=>{}, '请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -480,10 +482,10 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '下架请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
-    }, '下架请求中....')
+    }, '请求中....')
   },
 
   /// 我的询价撤销
@@ -491,7 +493,7 @@ Page({
     /// loading
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         UserID: userid(),
         AccountID: accountid(),
         SellDelistingApplyID: SellDelistingApplyID,
@@ -502,7 +504,7 @@ Page({
         ClientType: clientType,
         ClientSerialNo: timetample().toString(),
         Header: protoHeader(FunCode.ZSSellOrderDestingApplyOperateReq)
-      }
+      })
 
       /// 发送请求
       sendMsgToMQ({
@@ -510,12 +512,13 @@ Page({
           funCodeReq: FunCode.ZSSellOrderDestingApplyOperateReq,
           funCodeRsp: FunCode.ZSSellOrderDestingApplyOperateReq,
           isEncrypted: isEncrypted(),
-          data: JSON.stringify(params)
+          data: encryptBody(info)
         },
         success: (res) => {
-          if (res.code != 0) {
-            /// 加载失败
-            hideLoading(()=>{}, '操作请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -526,7 +529,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '操作请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, msg, 'error')
         }
       })
     }, '撤销请求中....')

+ 5 - 5
GuangZuan/miniprogram/mMine/pages/myorders/list/index.wxml

@@ -7,14 +7,14 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{ tabs }}" active="{{ active }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs>  
   </view>
 
   <!-- 我的摘牌 -->
   <view class="dtab-view" wx:if="{{ active == 2 }}">
-    <van-tabs swipeable bind:change="onDTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs swipeable bind:change="onDTabChange" color="#2270D9" line-width="20px"title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{dtabs}}" active="{{active}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs> 
     <view id="his" bindtap="onButtonPressed">历史订单</view>
@@ -50,9 +50,9 @@
       </view>
     </view>
     <view slot="right" class="van-swipe-cell__right">
-      <view class="item detail" id="detail {{idx}}" style="background-color: yellowgreen; color: white;" bindtap="onButtonPressed">详情</view>
-      <view wx:if="{{active === 0}}" class="item shelves" id="shelves {{idx}}" style="background-color: rebeccapurple; color: white;" bindtap="onButtonPressed">下架</view>
-      <view wx:if="{{active === 1 || active === 3}}" class="item cancel" id="cancel {{idx}}" style="background-color: forestgreen; color: white;" bindtap="onButtonPressed">撤销</view>
+      <view class="item detail" id="detail {{ idx }}" style="background-color: yellowgreen; color: white;" bindtap="onButtonPressed">详情</view>
+      <view wx:if="{{ active === 0 }}" class="item shelves" id="shelves {{ idx }}" style="background-color: rebeccapurple; color: white;" bindtap="onButtonPressed">下架</view>
+      <view wx:if="{{ active === 1 || active === 3 }}" class="item cancel" id="cancel {{ idx }}" style="background-color: forestgreen; color: white;" bindtap="onButtonPressed">撤销</view>
     </view>
   </van-swipe-cell>
 </scroll-view>

+ 11 - 9
GuangZuan/miniprogram/mMine/pages/myorders/mydelistingapplydetail/index.ts

@@ -1,11 +1,11 @@
-import Long from "long"
 import { FunCode } from "../../../../constants/enum/funcode"
 import { EOrderSrc } from "../../../../constants/enum/index"
 import Dialog from "../../../../miniprogram_npm/@vant/weapp/dialog/dialog"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryWrPerformancePlanStep } from "../../../../services/api/orders/index"
-import { accountid, clientType, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
 
@@ -64,7 +64,7 @@ Page({
     showLoading(()=>{
       const { selldelistingapplyid } = this.data.item
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         UserID: userid(),
         AccountID: accountid(),
         SellDelistingApplyID: selldelistingapplyid,
@@ -75,18 +75,20 @@ Page({
         ClientType: clientType,
         ClientSerialNo: timetample().toString(),
         Header: protoHeader(FunCode.ZSSellOrderDestingApplyOperateReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
           funCodeReq: FunCode.ZSSellOrderDestingApplyOperateReq,
           funCodeRsp: FunCode.ZSSellOrderDestingApplyOperateReq,
           isEncrypted: isEncrypted(),
-          data: JSON.stringify(params)
+          data: encryptBody(info)
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '拒绝申请失败, 原因:'+res.msg)
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -97,7 +99,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作失败,原因:'+emsg)
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -117,7 +119,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })

+ 10 - 8
GuangZuan/miniprogram/mMine/pages/myperformance/breach/index.ts

@@ -1,9 +1,9 @@
 import { sendMsgToMQ } from "../../../../services/api/common/index"
-import Toast from "../../../../miniprogram_npm/@vant/weapp/toast/toast";
 import { FunCode } from "../../../../constants/enum/funcode"
-import { accountid, isEncrypted, protoHeader, userid } from "../../../../services/utils";
+import { accountid, getErrorMsg, isEncrypted, protoHeader, userid } from "../../../../services/utils";
 import services from "../../../../services/index"
 import { hideLoading, showLoading, showToast } from "../../../../utils/message/index";
+import { encryptBody } from "../../../../utils/websocket/crypto";
 
 Page({
 
@@ -63,24 +63,26 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         PerformancePlanID: this.data.order.performanceplanid,
         BreachType: this.data.order.buyaccountid === accountid() ? 2 : 1,
         ApplyRemark: this.data.remark,
         Applicant: userid(),
         Header: protoHeader(FunCode.PerformanceContractedApplyReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.PerformanceContractedApplyReq,
           funCodeRsp: FunCode.PerformanceContractedApplyRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作申请请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -91,7 +93,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作申请请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '违约申请请求中.....')

+ 19 - 15
GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts

@@ -1,11 +1,11 @@
 
 import { sendMsgToMQ } from "../../../../services/api/common/index"
-import Toast from "../../../../miniprogram_npm/@vant/weapp/toast/toast";
 import { FunCode } from "../../../../constants/enum/funcode"
-import { accountid, getPerformancestatus, getStepStatus, getSteptype, isEncrypted, protoHeader, userid } from "../../../../services/utils";
+import { accountid, getErrorMsg, getPerformancestatus, getStepStatus, getSteptype, isEncrypted, protoHeader, userid } from "../../../../services/utils";
 import { queryWrPerformancePlanStep } from "../../../../services/api/orders/index";
 import { formatDateString, isnullstr } from "../../../../utils/util";
 import { hideLoading, showLoading, showToast } from "../../../../utils/message/index";
+import { encryptBody } from "../../../../utils/websocket/crypto";
 
 Page({
 
@@ -56,25 +56,27 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         PerformancePlanStepID: this.data.order.curstepid,
         delaydays: this.data.delaydays,
         applyremark: this.data.remark,
         applicant: userid(),
         Header: protoHeader(FunCode.PerformanceDelayApplyReq)
-      }
+      })
 
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.PerformanceDelayApplyReq,
           funCodeRsp: FunCode.PerformanceDelayApplyReq,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作申请失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -85,7 +87,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作申请失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '延期申请请求中.....')
@@ -101,24 +103,26 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         PerformancePlanStepID: this.data.order.curstepid,
         PerformanceExecuteSide: this.data.order.buyaccountid === accountid() ? 1 : 2,
         StepRemark: this.data.remark,
         Header: protoHeader(FunCode.PerformanceManualConfirmReq)
-      }
+      })
 
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.PerformanceManualConfirmReq,
           funCodeRsp: FunCode.PerformanceManualConfirmRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '操作申请请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -129,7 +133,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '操作申请请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '立即执行请求中.....')
@@ -203,7 +207,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })

+ 3 - 3
GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.wxml

@@ -87,13 +87,13 @@
 
 <!-- 是否申请延期 -->
 <van-dialog use-slot title="是否申请延期?" show="{{ showDelay }}" show-cancel-button  bind:close="onClose" bind:getuserinfo="doDelay">
-  <van-field label="天数:" model:value="{{delaydays}}" placeholder="请输入申请延期天数" type="number" border="{{ false }}"/>
-  <van-field label="备注:" model:value="{{remark}}" autosize placeholder="请输入备注信息" border="{{ false }}"/>
+  <van-field label="天数:" model:value="{{ delaydays }}" placeholder="请输入申请延期天数" type="number" adjust-position />
+  <van-field label="备注:" model:value="{{ remark }}" adjust-position autosize placeholder="请输入备注信息" />
 </van-dialog>
 
 <!-- 是否申请延期 -->
 <van-dialog use-slot title="是否手动执行当前步骤?" show="{{ showExculate }}" show-cancel-button  bind:close="onClose" bind:getuserinfo="doExculpate">
-  <van-field label="备注:" model:value="{{remark}}" autosize placeholder="请输入备注信息" border="{{ false }}"/>
+  <van-field label="备注:" model:value="{{ remark }}" adjust-position autosize placeholder="请输入备注信息" />
 </van-dialog>
 
 <!-- toast --> 

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myperformance/his/index.ts

@@ -67,7 +67,7 @@ Page({
         },
         fail: (emsg) => {
           /// showToast
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: ()=>{
           /// 停止下拉刷新

+ 2 - 2
GuangZuan/miniprogram/mMine/pages/myperformance/his/index.wxml

@@ -7,8 +7,8 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs  color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
-      <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" active="{{itm.id}}" title="{{itm.name}}"/>
+    <van-tabs animated color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" active="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs>  
   </view>
 

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myperformance/list/index.ts

@@ -67,7 +67,7 @@ Page({
         },
         fail: (emsg) => {
           /// showToast
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 停止下拉刷新

+ 2 - 2
GuangZuan/miniprogram/mMine/pages/myperformance/list/index.wxml

@@ -7,8 +7,8 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
-      <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" active="{{itm.id}}" title="{{itm.name}}"/>
+    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" active="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs>  
   </view>
 

+ 10 - 7
GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.ts

@@ -1,7 +1,8 @@
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { FunCode } from "../../../../constants/enum/funcode"
-import { accountid, isEncrypted, protoHeader } from "../../../../services/utils";
+import { accountid, getErrorMsg, isEncrypted, protoHeader } from "../../../../services/utils";
 import { hideLoading, showLoading, showToast } from "../../../../utils/message/index";
+import { encryptBody } from "../../../../utils/websocket/crypto";
 
 Page({
 
@@ -40,23 +41,25 @@ Page({
         ContactInfo: `ContactInfo:${this.data.contract}`+`ReceiveInfo:${this.data.address}`+`ReceiptInfo:${this.data.invoice}`
       }
       /// 参数信息
-      const params = {
+      const info = JSON.stringify({
         PerformancePlanID: this.data.order.performanceplanid,
         AccountID: accountid(),
         ContactInfo: JSON.stringify(json),
         Header: protoHeader(FunCode.PerformanceModifyContactReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.PerformanceModifyContactReq,
           funCodeRsp: FunCode.PerformanceModifyContactRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          if (res.code != 0) {
-            hideLoading(()=>{}, '修改申请失败, 原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 操作成功
@@ -67,7 +70,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '修改申请失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '修改申请请求中.....')

+ 30 - 0
GuangZuan/miniprogram/mTrade/pages/delistingsell/index.less

@@ -63,6 +63,31 @@
       flex-direction: column;
       padding: 5px 10px;
       border: 1px solid #ddd;
+
+      &__step {
+        display: flex;
+        flex-direction: row;
+        justify-content: start;
+        align-items: center;
+        align-content: center;
+        margin-left: 5px;
+        width: 100%;
+  
+        &__item {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          align-content: center;
+          padding-top: 10px;
+  
+          text {
+            font-size: 13px;
+            padding: 2.5px;
+            width: 100px;
+            text-align: center;
+          }
+        }
+      }
     
       .item-view-up, .item-view-dwn {
         display: flex;
@@ -111,12 +136,17 @@
     }
   }
 
+  &__operator {
+    width: 95%;
+  }
+
   .button-view {
     display: flex;
     justify-content: space-between;
     margin: 10px;
     justify-content: center;
     justify-items: center;
+    width: 100%;
 
     van-button {
       height: 40px;

+ 69 - 17
GuangZuan/miniprogram/mTrade/pages/delistingsell/index.ts

@@ -1,9 +1,10 @@
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { queryMyWRPosition } from "../../../services/api/orders/index";
-import { accountid, clientType, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
-import { hideLoading, showLoading, showModel } from "../../../utils/message/index";
+import { queryMyWRPosition, queryPermancePlanTmp } from "../../../services/api/orders/index";
+import { accountid, clientType, getErrorMsg, isEncrypted, loginQuery, marketid, protoHeader, timetample, userid } from "../../../services/utils";
+import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index";
 import { isnullstr } from "../../../utils/util";
+import { encryptBody } from "../../../utils/websocket/crypto";
 
 Page({
 
@@ -11,6 +12,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    /// 底部安全区域
+    safeBottom: getApp().globalData.safeBottom,
     /// 单据信息
     order: <GuangZuan.BuyOrder>({}),
     /// 我的库存
@@ -21,15 +24,21 @@ Page({
     remark: '',
     /// 申请价格
     applyPrice: 0.0,
+    /// 汇率
+    rate: loginQuery().exchangeRateConfigs[0].exchangerate,
     /// 列头
     titles: [['重量', '形状', '尺寸', '编号'], 
              ['颜色 | 净度 | 切工 | 对称 | 抛光 | 荧光 | 证书', '价格']],
     // 显示的值
     values: [{ up: [''], dwn: [''], isChecked: false }],
+    /// 选中履约模板
+    tmp: <GuangZuan.PermancePlanTmp>({}),
     /// 数据是否为空
     isEmpty: false,
     /// 单据显示
     orderValue: { up: [''], dwn: ['']},
+    /// 颜色
+    colors: ['rebeccapurple', 'green', 'yellow', 'orange', 'darkgoldenrod']
   },
 
   /**
@@ -56,42 +65,68 @@ Page({
     })
   },
 
+  /// 获取履约模板信息
+  queryPermancePlanTmp() {
+    /// showLoading
+    showLoading(() => {
+      queryPermancePlanTmp({
+        data: {
+          marketid: marketid()
+        },
+        success: (res) => {
+          /// 获取数据
+          this.setData({ 
+            tmps: res.data,
+            tmp: res.data[0],
+            actions: res.data.map(obj => { return obj.templatename })
+           })
+        },
+        complete: () => {
+          /// hideLoading
+          hideLoading()
+        }
+      })
+    })
+  },
+
   /// 摘买
   doDelistingBuy() {
+    if (!this.check()) { return }
     /// showModel
     showModel(() => {
       /// showLoading
       showLoading(() => {
         /// 参数信息
-        const params = {
+        const info = JSON.stringify({
           Header: protoHeader(FunCode.ZSSellOrderDestingApplyReq),
           UserID: userid(),
           AccountID: accountid(),
-          BuyWRTradeOrderID: '',
-          WRStandardID: '',
+          BuyWRTradeOrderID: this.data.wrPositon.wrtradeorderid,
+          WRStandardID: this.data.wrPositon.wrstandardid,
           WRFactorTypeID: 0,
-          ApplyQty: 0,
+          ApplyQty: this.data.wrPositon.ftotalqty,
           ApplyPrice: this.data.applyPrice,
-          LadingBillID: '',
-          SubNum: 0,
+          LadingBillID: this.data.wrPositon.ladingbillid,
+          SubNum: this.data.wrPositon.subnum,
           ApplyRemark: this.data.remark,
           ClientType: clientType(),
-          ClientSerialNo: timetample(),
+          ClientSerialNo: timetample().toString(),
           MarketID: marketid()
-        }
+        })
         
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeRsp: FunCode.ZSSellOrderDestingApplyRsp,
             funCodeReq: FunCode.ZSSellOrderDestingApplyReq,
             isEncrypted: isEncrypted()
           },
           success: (res) => {
-            /// 请求失败
-            if (res.code != 0) {
-              hideLoading(()=>{}, '摘牌请失败,原因:'+res.msg, 'error')
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
               return
             }
             /// 求购发布请求成功
@@ -100,13 +135,28 @@ Page({
             }, '摘牌请成功', 'success')
           },
           fail: (emsg) => {
-            hideLoading(()=>{}, '摘牌请求失败,原因:'+emsg, 'error')
+            hideLoading(()=>{}, emsg, 'error')
           }
         })
       }, '摘牌请求中.....')
     }, '提示', '确认要摘牌吗?')
   },
 
+  check(): boolean {
+    /// 请选择仓单数据
+    if (this.data.wrPositon.ladingbillid === "" ) {
+      showToast('请选择仓单数据!')
+      return false
+    }
+
+    /// 请输入价格
+    if (this.data.applyPrice === 0) {
+      showToast('请输入价格!')
+      return false
+    }
+    return true
+  },
+
   /// 查询我的库存
   queryMyWRPosition() {
     /// showLoading
@@ -144,7 +194,7 @@ Page({
           })
         },
         fail: (emsg) => {
-          hideLoading(() => {}, '库存请求失败,原因:'+emsg, 'error')
+          hideLoading(() => {}, emsg, 'error')
         }
       })
     })
@@ -176,6 +226,8 @@ Page({
       }
       /// 查询我的库存
       this.queryMyWRPosition()
+      /// 查询履约模板信息
+      this.queryPermancePlanTmp()
     } catch (error) {
       console.log(error)
     }

+ 17 - 1
GuangZuan/miniprogram/mTrade/pages/delistingsell/index.wxml

@@ -5,6 +5,7 @@
     <text slot="title" style="color: #333;">求购信息</text>
   </van-nav-bar>
 
+  <!-- 我的仓单 -->
   <view class="wrPostionList">
     <!-- 数据 --> 
     <van-swipe-cell>
@@ -15,6 +16,12 @@
         <view class="item-view-dwn">
           <text wx:for="{{ orderValue.dwn }}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{ data }}</text>
         </view>
+        <view class="item-view__step">
+          <view class="item-view__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
+            <text style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
+            <text>{{ itm.stepdate }}</text>
+          </view>
+        </view>
       </view>
     </van-swipe-cell>
 
@@ -42,8 +49,17 @@
     </van-swipe-cell>
   </view>
 
+  <!-- 操作视图 -->
+  <view class="container__operator">
+    <van-cell-group in>
+      <van-field label="汇率:" readonly value="{{ rate }}" />
+      <van-field label="价格(¥)" type="digit" clearable required adjust-position placeholder="请输入价格" model:value="{{ applyPrice }}" />
+      <van-field label="备注:" clearable adjust-position placeholder="请输入备注信息" model:value="{{ remark }}" />
+    </van-cell-group>
+  </view>
+
   <!-- 提交按钮视图 -->
-  <view class="button-view">
+  <view class="button-view" style="padding-bottom: {{ safeBottom}}px;">
     <van-button id="close" block round color="#7232dd" bind:click="doDelistingBuy">确认摘牌</van-button>
   </view>
 </view>

+ 10 - 8
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts

@@ -1,9 +1,10 @@
 import { EOrderSrc } from "../../../constants/enum/index";
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { accountid, clientType, getEnumList, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getEnumList, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index";
 import { queryPermancePlanTmp } from "../../../services/api/orders/index";
+import { encryptBody } from "../../../utils/websocket/crypto";
 
 Page({
 
@@ -194,7 +195,7 @@ Page({
         ZSCZColor1Type: [this.data.color1, this.data.color2],
       }
       /// 请求参数
-      const params = {
+      const info = JSON.stringify({
         Header: protoHeader(FunCode.ZSBuyOrderListingReq),
         UserID: userid(),
         AccountID: accountid(),
@@ -204,19 +205,20 @@ Page({
         OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
         ClientType: clientType(),
         ClientSerialNo: timetample().toString()
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(params),
+          data: encryptBody(info),
           funCodeReq: FunCode.ZSBuyOrderListingReq,
           funCodeRsp: FunCode.ZSBuyOrderListingRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          /// 请求失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '求购请求失败,原因:'+res.msg, 'error')
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
             return
           }
           /// 求购发布请求成功
@@ -225,7 +227,7 @@ Page({
           }, '求购发布请求成功', 'success')
         },
         fail: (emsg) => {
-          hideLoading(()=>{}, '求购请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     }, '求购请求中....')

+ 6 - 6
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml

@@ -1,5 +1,5 @@
 <!-- 内容 -->
-<view class="container" style="padding-bottom: {{ safeBottom }}px;">
+<view class="container" style="padding-bottom: {{ safeBottom+44 }}px;">
   <!-- 导航栏 -->
   <van-nav-bar custom-style="background-color: #fff">
     <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
@@ -8,7 +8,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs>  
   </view>
@@ -112,11 +112,11 @@
       </van-dropdown-menu>
     </view>
   </view>
+</view>
 
-  <!-- 提交按钮视图 -->
-  <view class="button-view">
-    <van-button id="close" block round color="#7232dd" bind:click="doListingBuy">发布求购</van-button>
-  </view>
+<!-- 提交按钮视图 -->
+<view class="button-view" style="width: 100%; position: sticky; bottom: {{ safeBottom }}px; z-index: 999;">
+  <van-button id="close" block round color="#7232dd" bind:click="doListingBuy">发布求购</van-button>
 </view>
 
 <!-- toast -->

+ 92 - 51
GuangZuan/miniprogram/mTrade/pages/listingsell/index.less

@@ -1,73 +1,111 @@
 .container {
   display: flex;
   flex-direction: column;
+  width: 100%;
 
-  .tmp_view {
-
-    &__step {
-      display: flex;
-      flex-direction: row;
-      justify-content: start;
-      align-items: center;
-      align-content: center;
+  .top-view {
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    position: sticky;
+    top: 0;
+    z-index: 999;
 
-      &__item {
+    .tmp_view {
+      &__step {
         display: flex;
-        flex-direction: column;
+        flex-direction: row;
+        justify-content: start;
         align-items: center;
         align-content: center;
-        margin: 10px 0px;
-        padding: 0px 10px;
-
-        text {
-          font-size: 13px;
-          padding: 2.5px;
+        margin-left: 15px;
+  
+        &__item {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          align-content: center;
+          padding-top: 10px;
+  
+          text {
+            font-size: 13px;
+            padding: 2.5px;
+            width: 100px;
+            text-align: center;
+          }
         }
       }
     }
-  }
 
-  .title-view {
-    margin: 10px;
-    background-color: #f0f0f0;
-    border-radius: 10px;
-    display: flex;
-    align-items: center;
-    align-content: center;
-    flex-direction: column;
-    padding: 5px 10px;
+    .tmp_view {
+
+      &__step {
+        display: flex;
+        flex-direction: row;
+        justify-content: start;
+        align-items: center;
+        align-content: center;
+        margin-left: 15px;
   
-    .title-view-up, .title-view-dwn {
+        &__item {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          align-content: center;
+          padding-top: 10px;
+  
+          text {
+            font-size: 13px;
+            padding: 2.5px;
+            width: 100px;
+            text-align: center;
+          }
+        }
+      }
+    }
+
+    .title-view {
+      margin: 10px;
+      background-color: #f0f0f0;
+      border-radius: 10px;
       display: flex;
-      flex-direction: row;
-      justify-content: space-between;
       align-items: center;
-      width: 100%;
       align-content: center;
-      height: 25px;
+      flex-direction: column;
+      padding: 5px 10px;
+    
+      .title-view-up, .title-view-dwn {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        width: 100%;
+        align-content: center;
+        height: 25px;
+    
+        text {
+          color: #666;
+          font-size: 13px;
+          text-align: center;
+        }
   
-      text {
-        color: #666;
-        font-size: 13px;
-        text-align: center;
-      }
-
-      :first-child {
-        text-align: left;
+        :first-child {
+          text-align: left;
+        }
+  
+        :last-child {
+          text-align: right;
+        }
       }
-
-      :last-child {
-        text-align: right;
+    
+      .title-view-up {
+        border-bottom: 1px solid #ddd;
+        padding-bottom: 5px;
       }
-    }
   
-    .title-view-up {
-      border-bottom: 1px solid #ddd;
-      padding-bottom: 5px;
-    }
-
-    .title-view-mid {
-      padding: 5px 0px;
+      .title-view-mid {
+        padding: 5px 0px;
+      }
     }
   }
 
@@ -141,10 +179,13 @@
     margin: 10px;
     justify-content: center;
     justify-items: center;
-
+    width: 100%;
+  
     van-button {
       height: 40px;
       width: 80%;
     }
   }
 }
+
+

+ 13 - 9
GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts

@@ -1,10 +1,11 @@
 import { EOrderSrc, EValidType } from "../../../constants/enum/index";
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { accountid, clientType, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel } from "../../../utils/message/index";
 import { isnullstr } from "../../../utils/util";
 import { queryMySellOrder, queryPermancePlanTmp } from "../../../services/api/orders/index";
+import { encryptBody } from "../../../utils/websocket/crypto";
 
 Page({
 
@@ -39,6 +40,8 @@ Page({
     show: false,
     /// 显示信息
     actions: [''],
+    /// 颜色
+    colors: ['rebeccapurple', 'green', 'yellow', 'orange', 'darkgoldenrod']
   },
 
   /**
@@ -160,7 +163,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => { 
           /// 停止下拉刷新
@@ -179,7 +182,7 @@ Page({
         const { wrstandardid, wrfactortypeid, selledqty } = this.data.sellorder
         const { autoid } = this.data.tmp
         /// 请求参数
-        const params = {
+        const info = JSON.stringify({
           Header: protoHeader(FunCode.ZSSellOrderListingReq),
           UserID: userid(),
           AccountID: accountid(),
@@ -192,20 +195,21 @@ Page({
           ClientSerialNo: timetample().toString(),
           ClientType: clientType(),
           MarketID: marketid(),
-        }
+        })
 
         /// 发送请求
         sendMsgToMQ({
           data: {
-            data: JSON.stringify(params),
+            data: encryptBody(info),
             funCodeReq: FunCode.ZSSellOrderListingReq,
             funCodeRsp: FunCode.ZSSellOrderListingRsp,
             isEncrypted: isEncrypted()
           },
           success: (res) => {
-            /// 请求失败
-            if (res.code != 0) {
-              hideLoading(()=>{}, '出售请求失败,原因:'+res.msg, 'error')
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
               return
             }
             /// 求购发布请求成功
@@ -214,7 +218,7 @@ Page({
             }, '出售发布请求成功', 'success')
           },
           fail: (emsg) => {
-            hideLoading(()=>{}, '出售请求失败,原因:'+emsg, 'error')
+            hideLoading(()=>{}, emsg, 'error')
           }
         })
       }, '出售请求中....')

+ 34 - 31
GuangZuan/miniprogram/mTrade/pages/listingsell/index.wxml

@@ -1,40 +1,43 @@
-<view class="container" style="padding-bottom: {{ safeBottom }}px;">
-  <!-- 导航栏 -->
-  <van-nav-bar custom-style="background-color: #fff">
-    <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
-    <text slot="title" style="color: #333;">我要出售</text>
-  </van-nav-bar>
+<view class="container">
+  <!-- top-view --> 
+  <view class="top-view">
+   <!-- 导航栏 -->
+   <van-nav-bar custom-style="background-color: #fff">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+      <text slot="title" style="color: #333;">我要出售</text>
+    </van-nav-bar>
 
-  <view class="tmp_view">
-    <van-cell-group>
-      <van-field label="履约模板:" value="{{ tmp.templatename }}" readonly is-link bind:click-input="showPlanTmps"></van-field>
-    </van-cell-group>
-    <view class="tmp_view__step">
-      <view class="tmp_view__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
-        <text>{{ itm.stepinfo }}</text>
-        <text>{{ itm.stepdate }}</text>
-      </view>
+    <!-- tabs -->
+    <view class="tab-view">
+      <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+        <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
+      </van-tabs>  
     </view>
-  </view>
-
-  <!-- tabs -->
-  <view class="tab-view">
-    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
-      <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
-    </van-tabs>  
-  </view>
 
-  <!-- 列头 --> 
-  <view class="title-view">
-    <view class="title-view-up">
-      <text wx:for="{{ titles[0] }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{ itm }}</text>
+    <!-- 履约模板 -->
+    <view class="tmp_view" style="background-color: white;">
+      <van-cell-group>
+        <van-field label="履约模板:" value="{{ tmp.templatename }}" readonly is-link bind:click-input="showPlanTmps" />
+      </van-cell-group>
+      <view class="tmp_view__step">
+        <view class="tmp_view__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
+          <text style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
+          <text>{{ itm.stepdate }}</text>
+        </view>
+      </view>
     </view>
-    <view class="title-view-dwn">
-      <text wx:for="{{ titles[1] }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{ itm }}</text>
+
+    <!-- 列头 --> 
+    <view class="title-view">
+      <view class="title-view-up">
+        <text wx:for="{{ titles[0] }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{ itm }}</text>
+      </view>
+      <view class="title-view-dwn">
+        <text wx:for="{{ titles[1] }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{ itm }}</text>
+      </view>
     </view>
   </view>
 
-  <!-- 数据 --> 
   <van-swipe-cell wx:for="{{ values }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx" bind:click="onSelectItem" id="{{ idx }}">
     <view class="item-view {{ values[idx].isChecked ? 'active' : '' }}">
       <view class="item-view-up">
@@ -47,7 +50,7 @@
   </van-swipe-cell>
 
   <!-- 提交按钮视图 -->
-  <view class="button-view">
+  <view class="button-view" style="padding-bottom: {{ safeBottom }}px;">
     <van-button id="close" block round color="#7232dd" bind:click="doListingSell">确认出售</van-button>
   </view>
 </view>

+ 28 - 1
GuangZuan/miniprogram/mTrade/pages/orderdetail/index.less

@@ -21,7 +21,7 @@
       font-size: 20px;
     }
 
-    .attribute-info__item, .content__item{
+    .attribute-info__item, .content__item {
       width: 100%;
       padding-left: 15px;
       height: 50px;
@@ -32,6 +32,29 @@
       align-items: center;
       align-content: center;
 
+      &__step {
+        display: flex;
+        flex-direction: row;
+        justify-content: start;
+        align-items: center;
+        align-content: center;
+        padding: 10px 0px;
+  
+        &__item {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          align-content: center;
+  
+          text {
+            font-size: 13px;
+            padding: 2.5px;
+            width: 100px;
+            text-align: center;
+          }
+        }
+      }
+
       .title {
         font-size: 14px;
         width: 80px;
@@ -55,6 +78,10 @@
         padding-left: 5px;
       }
 
+      &__item:nth-last-child(1) {
+        height: 50px;
+      }
+
       .title {
         font-size: 14px;
         width: 70px;

+ 6 - 2
GuangZuan/miniprogram/mTrade/pages/orderdetail/index.ts

@@ -1,6 +1,6 @@
-import { queryPermancePlanTmp } from "../../../services/api/orders"
+import { queryPermancePlanTmp } from "../../../services/api/orders/index"
 import { marketid } from "../../../services/utils"
-import { hideLoading, showLoading } from "../../../utils/message"
+import { hideLoading, showLoading } from "../../../utils/message/index"
 
 Page({
 
@@ -12,6 +12,8 @@ Page({
     order: <GuangZuan.BuyOrder>({}),
     /// 选中履约模板
     tmp: <GuangZuan.PermancePlanTmp>({}),
+    /// 颜色
+    colors: ['rebeccapurple', 'green', 'yellow', 'orange', 'darkgoldenrod']
   },
 
   /**
@@ -67,6 +69,8 @@ Page({
     } catch (error) {
       console.log(error)
     }
+    /// 获取履约模板信息
+    this.queryPermancePlanTmp()
   },
 
   /**

+ 3 - 3
GuangZuan/miniprogram/mTrade/pages/orderdetail/index.wxml

@@ -19,9 +19,9 @@
       </view>
       <view class="content__item">
         <text class="title">履约规则:</text>
-        <view class="tmp_view__step">
-          <view class="tmp_view__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
-            <text>{{ itm.stepinfo }}</text>
+        <view class="content__item__step">
+          <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
+            <text style="background-color: {{ colors[idx] }}; color: white;">{{ itm.stepinfo }}</text>
             <text>{{ itm.stepdate }}</text>
           </view>
         </view>

+ 1 - 1
GuangZuan/miniprogram/pages/circle/index.less

@@ -128,7 +128,7 @@
 }
 
 .buttom_view {
-  position: fixed;
+  position: sticky;
   bottom: 10px;
   z-index: 999;
   display: flex;

+ 12 - 10
GuangZuan/miniprogram/pages/circle/index.ts

@@ -1,10 +1,11 @@
 import { queryMyFavorite } from "../../services/api/orders/index"
 import Toast from "../../miniprogram_npm/@vant/weapp/toast/toast"
-import { clientType, isEncrypted, marketid, protoHeader, userid, timetample } from "../../services/utils";
+import { clientType, isEncrypted, marketid, protoHeader, userid, timetample, getErrorMsg } from "../../services/utils";
 import { sendMsgToMQ } from "../../services/api/common/index";
 import { FunCode } from "../../constants/enum/funcode";
 import { isnullstr } from "../../utils/util";
 import { hideLoading, showLoading } from "../../utils/message/index";
+import { encryptBody } from "../../utils/websocket/crypto";
 
 Page({
 
@@ -84,7 +85,7 @@ Page({
       const wrtradeorderid = this.data.favorites[index].wrtradeorderid
 
       /// 参数信息
-      const info = { 
+      const info = JSON.stringify({ 
         UserID: userid(),
         OperateType: 2,
         ClientType: clientType(),
@@ -92,21 +93,22 @@ Page({
         ClientSerialNo: timetample().toString(),
         WRTradeOrderID: wrtradeorderid,
         Header: protoHeader(FunCode.GoodsFavoriteOperateReq)
-      }
+      })
 
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(info),
+          data: encryptBody(info),
           funCodeReq: FunCode.GoodsFavoriteOperateReq,
           funCodeRsp: FunCode.GoodsFavoriteOperateRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          /// 操作失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '请求失败,原因:'+res.msg, 'error')
-            return 
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+            return
           }
           /// 操作成功
           hideLoading(()=>{
@@ -116,7 +118,7 @@ Page({
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -163,7 +165,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 停止下拉刷新

+ 1 - 1
GuangZuan/miniprogram/pages/circle/index.wxml

@@ -5,7 +5,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs sticky animated bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs>  
   </view>

+ 2 - 2
GuangZuan/miniprogram/pages/forgetpwd/index.wxml

@@ -9,11 +9,11 @@
  <!-- 内容 -->
  <van-cell-group>
   <!-- 手机号码 -->
-  <van-field model:value="{{ mobile }}" type="number" label="手机号码" required clearable placeholder="请输入手机号码">
+  <van-field model:value="{{ mobile }}" type="number" label="手机号码" required clearable adjust-position placeholder="请输入手机号码">
     <van-button slot="button" size="small" type="primary" bind:click="onButtonPressed">获取验证码</van-button >
   </van-field>
   <!-- 短信验证码 -->
-  <van-field model:value="{{ code }}" label="短信验证码" required clearable placeholder="请输入短信验证码"/>
+  <van-field model:value="{{ code }}" label="短信验证码" required adjust-position clearable placeholder="请输入短信验证码"/>
 </van-cell-group>
 
 <!-- 按钮 -->

+ 32 - 8
GuangZuan/miniprogram/pages/home/index.less

@@ -19,15 +19,39 @@
   box-shadow: 5px 5px 5px #aaa;
 
   .statistics-item {
-    display: grid;
+    display: flex;
+    flex-direction: column;
     justify-content: center;
-    text-align: center;
-  }
+    width: 100%;
+
+    text:nth-child(1) {
+      color: #333;
+      font-size: 30rpx;
+      font-weight: bold;
+      text-align: center;
+      padding-right: 10px;
+    }
 
-  text {
-    margin-top: 5px;
-    font-size: 26rpx;
-    color: #fff;
+    text:nth-child(2) {
+      color: #333;
+      font-size: 24rpx;
+      text-align: center;
+      padding-right: 10px;
+    }
+
+    .exchangerate:nth-child(1) {
+      color: #fff;
+      font-size: 30rpx;
+      font-weight: bold;
+      text-align: center;
+      padding-left: 10px;
+    }
+    .exchangerate:nth-child(2) {
+      font-size: 22rpx;
+      color: #fff;
+      text-align: center;
+      padding-left: 10px;
+    }
   }
 }
 
@@ -55,7 +79,7 @@
     }
 
     &__title {
-      color: #333;
+      color: #4D565D;
       font-size: 24rpx;
       width: 100%;
       text-align: center;

+ 11 - 14
GuangZuan/miniprogram/pages/home/index.ts

@@ -23,13 +23,7 @@ Page({
             {id: 4, icon: 'home-cjjc', title: '出境检测', path: '/mHome/pages/inspection/list/index'}, 
             {id: 5, icon: 'home-bsfw', title: '保税服务', path: '/mHome/pages/bond/list/index'}],
     /// 统计
-    statistics: [{id: 1, title: '出售中', value: 0}, 
-                 {id: 2, title: '求购中', value: 0}, 
-                 {id: 3, title: '已购买', value: 0}, 
-                 {id: 4, title: '已出售', value: 0}, 
-                 {id: 5, title: '今日汇率', value: 0}],
-    /// 首页数据
-    homedata: [0, 0, 0, 0, 0],
+    statistics: [{id: 1, title: '出售中', value: 0, class: ''}],
     /// tabs
     tabs:[{id: 1, title: '公告'}, {id: 2, title: '消息'}],
     /// 公告消息
@@ -67,12 +61,15 @@ Page({
       data: { userid: userid() },
       success:(res) => {
         /// 数据设置
-        var array = [res.data.transactionssold, 
-                     res.data.transactioninpurchase, 
-                     res.data.purchasedtransactions, 
-                     res.data.transactionsonsale, 
-                     loginQuery().exchangeRateConfigs[0].exchangerate]
-        this.setData({ homedata: array })
+        this.setData({ 
+          statistics: [
+            { id: 1, title: '出售中', value: res.data.transactionssold, class: 'transactionssold' },
+            { id: 2, title: '求购中', value: res.data.transactioninpurchase, class: 'transactioninpurchase' },
+            { id: 3, title: '已购买', value: res.data.purchasedtransactions, class: 'purchasedtransactions' },
+            { id: 4, title: '已出售', value: res.data.transactionsonsale, class: 'transactionsonsale' },
+            { id: 5, title: '今日汇率', value: loginQuery().exchangeRateConfigs[0].exchangerate, class: 'exchangerate' },
+          ] 
+        })
       }
     })
   },
@@ -106,7 +103,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '公告消息请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })

+ 5 - 5
GuangZuan/miniprogram/pages/home/index.wxml

@@ -15,17 +15,17 @@
   <van-notice-bar wx:if="{{msgs.length != 0}}" left-icon="volume-o" mode="link" bind:click="goToMsg" color="#333" background="#f3f3f3" text="{{notice.title}}" scrollable></van-notice-bar>
 
   <!-- 统计 -->
-  <view class="statistics" style="background-color: firebrick;">
-    <view class="statistics-item" wx:for="{{statistics}}" wx:key="id" wx:for-index="idx" wx:for-item="itm">
-      <text>{{itm.title}}</text>
-      <text>{{homedata[idx]}}</text>
+  <view class="statistics" style="background-image: url('../../images/huilv_bg.png'); background-size: 105%;">
+    <view class="statistics-item" wx:for="{{ statistics }}" wx:key="id" wx:for-index="idx" wx:for-item="itm">
+      <text class="{{ itm.class }}">{{ itm.value }}</text>
+      <text class="{{ itm.class }}">{{ itm.title }}</text>
     </view>
   </view>
 
   <!-- 功能菜单 -->
   <view class="gird-view">
     <view class="gird-view__item" wx:for="{{ menus }}" wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{ itm.id }}" data-url="{{ itm.path }}" bindtap="onGirdClick">
-      <image class="gird-view__item__icon" mode="widthFix" src="../../images/{{ itm.icon }}.png"></image>
+      <image class="gird-view__item__icon" mode="aspectFit" src="../../images/{{ itm.icon }}.png"></image>
       <text class="gird-view__item__title">{{ itm.title }}</text>
     </view>
   </view>

+ 24 - 12
GuangZuan/miniprogram/pages/login/index.ts

@@ -1,10 +1,10 @@
-// pages/login/index.ts
-import {login, loginQuery} from '../../services/api/account/index'
+import { login, loginQuery } from '../../services/api/account/index'
 import { appConfig } from '../../config/index'
-import { getDivisions, loginid, setAllEnums, taAccounts } from '../../services/utils'
+import { getDivisions, loginid, setAllEnums, setAllErrors, taAccounts } from '../../services/utils'
 import Toast from '../../miniprogram_npm/@vant/weapp/toast/toast'
-import { getAllEnums } from '../../services/api/common/index'
+import { getAllEnums, queryErrorInfos } from '../../services/api/common/index'
 import { hideLoading, showLoading } from '../../utils/message/index'
+import { encryptBody } from '../../utils/websocket/crypto'
 
 Page({
 
@@ -17,7 +17,7 @@ Page({
     /// 姓名
     username: '110000000001',
     /// 密码
-    pwd: 'BgAAAPir1cgH1bw5xgrywoXpw8l/s5auAXn8MA==',
+    pwd: '123456',
     /// 版本号
     version: appConfig.version,
     /// 是否loding
@@ -50,13 +50,14 @@ Page({
     if (!this.check()) return
     /// loding.....
     this.setData({ isLoding: true })
+  
     /// loding......
     showLoading(() => {
       /// 进行账户登录
       login({
         data: {
           userName: this.data.username,
-          password: this.data.pwd,
+          password: encryptBody(this.data.pwd, true),
           clientType: 5
         }, 
         enableAuthorization: false,
@@ -66,7 +67,6 @@ Page({
             if (res.code != 0) { 
               /// isLoding
               this.setData({ isLoding: false }) 
-              Toast('登录失败,原因:'+res.msg)
               return 
             }
 
@@ -84,10 +84,10 @@ Page({
           })
         },
         fail: (emsg) => { 
-          Toast('登录失败,原因:'+emsg)
-          /// isLoding
-          this.setData({ isLoding: false }) 
-          hideLoading(()=> {}, '登录失败,原因:'+emsg)
+          /// hideLoading
+          hideLoading(()=> {
+            this.setData({ isLoding: false }) 
+          }, emsg, 'error')
         }
       })
     }, '登录中.....')
@@ -107,6 +107,8 @@ Page({
           wx.setStorageSync('MarketID', res.data.markets[0].marketid)
           /// 获取所有的枚举值
           this.getAllEnums()
+          /// 获取所有的错误码
+          this.getAllErrors()
           
           /// 登录失败
           if (res.code != 200) { 
@@ -122,7 +124,7 @@ Page({
         },
         fail: (emsg) => {
           /// showToast
-          hideLoading(()=>{}, '数据查询失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// isLoding
@@ -132,6 +134,16 @@ Page({
     })
   },
 
+  /// 获取所有的错误码
+  getAllErrors() {
+    /// 获取错误码
+    queryErrorInfos({
+      success: (res) => {
+        setAllErrors(res.data)
+      }
+    })
+  },
+
   /// 获取所有的枚举值
   getAllEnums() {
     /// 发送请求

+ 2 - 3
GuangZuan/miniprogram/pages/login/index.wxml

@@ -5,13 +5,12 @@
 
 <!--  用户名  用户密码 -->
 <van-cell-group>
-  <van-field class="username" model:value="{{username}}" left-icon="friends-o" placeholder="请输入用户名"/>
-  <van-field class="pwd" model:value="{{pwd}}" left-icon="bag-o" placeholder="请输入用户密码"/>
+  <van-field class="username" model:value="{{ username }}" adjust-position clearable left-icon="friends-o" placeholder="请输入用户名"/>
+  <van-field class="pwd" password model:value="{{ pwd }}" password adjust-position clearable left-icon="bag-o" placeholder="请输入用户密码"/>
 </van-cell-group>
 
 <!--  用户注册  忘记密码 -->
 <view class="btn-view">
-  <navigator url="/pages/register/index">用户注册</navigator>
   <navigator url="/pages/forgetpwd/index">忘记密码</navigator>
 </view>
 

+ 54 - 9
GuangZuan/miniprogram/pages/mine/index.ts

@@ -1,6 +1,7 @@
 import Dialog from  '../../miniprogram_npm/@vant/weapp/dialog/dialog'
-import { accountid, loginid, loginQuery, taAccount } from '../../services/utils';
-import { hideLoading, showLoading } from '../../utils/message/index';
+import { queryBankAccountSign } from '../../services/api/account/index';
+import { accountid, loginid, loginQuery, taAccount, userid } from '../../services/utils';
+import { hideLoading, showLoading, showToast } from '../../utils/message/index';
 
 Page({
 
@@ -30,7 +31,9 @@ Page({
     /// 登录账号
     loginid: loginid(),
     /// 是否脱敏显示
-    isOpenEye: false
+    isOpenEye: false,
+    /// 签约信息
+    sign: <GuangZuan.BankAccountSign>({})
   },
 
   onEye() {
@@ -43,14 +46,22 @@ Page({
    * 按钮点击响应事件
    */
   onButtonPressed(e: any) {
-    switch (e.target.id) {
+    /// 出入金操作
+    this.goToInOutGold(e.target.id)
+  },
+
+  /// 出入金操作
+  goToInOutGold(id: string) {
+    if (this.data.sign === undefined) {
+      showToast('当前未查询到签约信息,请先签约!')
+      return
+    }
+    switch (id) {
       case 'into-gold':  /// 充值
-        wx.navigateTo({ url: '/mMine/pages/inoutgold/index' })
+        wx.navigateTo({ url: '/mMine/pages/inoutgold/index?id=0' })
         break;
-      case 'out-gold':   /// 提现
-        wx.navigateTo({ url: '/mMine/pages/inoutgold/index' })
-        break;
-      default:
+      default:   /// 提现
+        wx.navigateTo({ url: '/mMine/pages/inoutgold/index?id=1' })
         break;
     }
   },
@@ -77,6 +88,40 @@ Page({
       /// 设置账户信息
       ta: taAccount(accountid())
     })
+    /// 查询签约信息
+    this.queryBankAccountSign()
+  },
+
+  /**
+   * 查询用户已签约信息
+   */
+  queryBankAccountSign() {
+    /// loding.....
+    showLoading(() => {
+      /// 发送请求
+      queryBankAccountSign({
+        data: {
+          userid: userid()
+        },
+        success: (res) => {
+          /// 请求失败
+          if (res.code != 200) {
+            hideLoading(() => {}, '用户签约信息请求失败,原因:'+res.msg)
+            return
+          }
+          hideLoading(() => {
+            const sign = res.data.filter(obj => {
+              return obj.signstatus === 2 || obj.signstatus === 3 || obj.signstatus === 4
+            })[0]
+            /// 数据赋值
+            this.setData({  sign: sign })
+          })
+        },
+        fail: (emsg) => {
+          hideLoading(() => {}, emsg, 'error')
+        }
+      })
+    })
   },
 
   /**

+ 0 - 9
GuangZuan/miniprogram/pages/register/index.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "van-area": "@vant/weapp/area/index", 
-    "van-uploader": "@vant/weapp/uploader/index",
-    "van-popup": "@vant/weapp/popup/index"
-  },
-  "navigationBarTitleText": "会员注册",
-  "enablePullDownRefresh": false
-}

+ 0 - 22
GuangZuan/miniprogram/pages/register/index.less

@@ -1,22 +0,0 @@
-Page {
-  display: grid;
-
-  .upload {
-    display: flex;
-    justify-content: center;
-    height: 120px;
-    align-items: center;
-  }
-
-  .register {
-    margin-top: 40rpx;
-    font-size: 28rpx;
-    background-color: #7232dd;
-    width: 90%;
-    color: white;
-  }
-}
-
-
-
- 

+ 0 - 142
GuangZuan/miniprogram/pages/register/index.ts

@@ -1,142 +0,0 @@
-// pages/register/index.ts
-
-import { areaList } from '@vant/area-data';
-
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    /// 公司名称
-    companyname: '',
-    /// 公司地址
-    address: '',
-    /// 姓名
-    username: '',
-    /// 手机号码
-    mobile: '',
-    /// 验证码
-    captchacode: '',
-    /// 密码
-    pwd: '',
-    /// 确认密码
-    confirmpwd: '',
-    /// 是否显示区域
-    isShowArea: false,
-    /// 省市区数据
-    areaList,
-    /// 地区
-    area: '',
-    /// 验证码信息
-    msg: '发送验证码',
-    /// 倒计时
-    count: 60,
-  },
-
-  /**
-   * 返回上层视图
-   */
-  backToParent() {
-    /// 返回上层视图
-    wx.navigateBack()
-  },
-
-  /**
-   * 立即注册
-   */
-  registerNow() {
-    
-  },
-
-  /**
-   * 输入合规性校验
-   */
-  check(): boolean {
-    return true
-  },
-
-  /**
-   * 获取手机短信验证码
-   */
-  getCaptchaCode() {
-
-  },
-
-  /**
-   * 获取地区信息
-   */
-  getAreaAddress() {
-    this.setData({ isShowArea: true })
-  },
-
-  /// 关闭地址选择组件
-  cancelArea() {
-    /// 关闭
-    this.setData({ isShowArea: false })
-  },
-
-  changeArea() {},
-
-  /// 显示地址选择组件
-  showArea() {
-    /// 显示地区
-    this.setData({ isShowArea: true })
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-    
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 0 - 49
GuangZuan/miniprogram/pages/register/index.wxml

@@ -1,49 +0,0 @@
-<view class="top-view">
-  <!-- 导航栏 -->
-  <van-nav-bar custom-style="background-color: #fff">
-    <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
-    <text slot="title" style="color: #333;">会员注册</text>
-  </van-nav-bar>
-</view>
-
-<van-cell-group style="padding-top: 40px;">
-  <!-- 营业执照图片 -->
-  <view class="upload">
-    <van-uploader></van-uploader>
-  </view>
-
-  <!-- 公司名称 -->
-  <van-field class="companyname" title-width="100" value="{{ companyname }}" label="公司名称:" placeholder="请输入公司名称" ></van-field>
-  <!-- 公司地址 -->
-  <van-field lass="companyaddress" title-width="100" value="{{ address }}" label="公司地址:" placeholder="请输入详细地址">
-    <van-button class="address" slot="button" size="small" type="primary" bindtap="getAreaAddress">
-      选择地区
-    </van-button>
-  </van-field>
-  <!-- 姓名 -->
-  <van-field class="username" title-width="100" value="{{ username }}" label="姓名:" placeholder="请输入公司的注册人(开户人)" ></van-field>
-  <!-- 手机号码 -->
-  <van-field class="mobile" title-width="100" value="{{ mobile }}" label="手机号:" placeholder="请输入手机号码">
-    <van-button class="getcaptchacode" slot="button" size="small" type="primary" bindtap="getCaptchaCode">
-      {{msg}}
-    </van-button>
-  </van-field>
-  <!-- 验证码 -->
-  <van-field class="captchacode" title-width="100" value="{{ captchacode }}" label="验证码:" placeholder="请输入验证码" ></van-field>
-  <!-- 登录密码 -->
-  <van-field class="pwd" title-width="100" value="{{ pwd }}" label="登录密码:" placeholder="请输入登录密码" ></van-field>
-  <!-- 确认密码 -->
-  <van-field class="confirmpwd" title-width="100" value="{{ confirmpwd }}" label="确认密码:" placeholder="请再次确认登录密码" ></van-field>
-</van-cell-group>
-
-<!-- 注册按钮 -->
-<button class="register" bindtap="registerNow">立即注册</button>
-
-<!-- 地区选择 -->
-<van-popup show="{{ isShowArea }}" position="bottom" custom-style="height: 45%" bind:click-overlay="cancelArea">
-  <van-area area-list="{{ areaList }}" value="110101" title="地区选择" bind:cancel="cancelArea" bind:confirm="cancelArea" bind:change="changeArea"/>
-</van-popup>
-
-<!-- toast -->
-<van-toast id="van-toast" />
-

+ 13 - 11
GuangZuan/miniprogram/pages/trade/index.ts

@@ -1,9 +1,10 @@
 import { queryBuyOrder, queryDiamond } from "../../services/api/orders/index"
-import { clientType, isEncrypted, marketid, protoHeader, userid, timetample, getEnumList } from "../../services/utils";
+import { clientType, isEncrypted, marketid, protoHeader, userid, timetample, getEnumList, getErrorMsg } from "../../services/utils";
 import { FunCode } from "../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../services/api/common/index";
 import { isnullstr } from "../../utils/util";
 import { hideLoading, showLoading, showToast } from "../../utils/message/index";
+import { encryptBody } from "../../utils/websocket/crypto";
 
 Page({
 
@@ -166,7 +167,7 @@ Page({
       /// 委托单号
       const wrtradeorderid = this.data.sellOrders[index].wrtradeorderid
       /// 参数信息
-      const info = { 
+      const info = JSON.stringify({ 
         UserID: userid(),
         OperateType: 1,
         ClientType: clientType(),
@@ -174,27 +175,28 @@ Page({
         ClientSerialNo: timetample().toString(),
         WRTradeOrderID: wrtradeorderid,
         Header: protoHeader(FunCode.GoodsFavoriteOperateReq)
-      }
+      })
       /// 发送请求
       sendMsgToMQ({
         data: {
-          data: JSON.stringify(info),
+          data: encryptBody(info),
           funCodeReq: FunCode.GoodsFavoriteOperateReq,
           funCodeRsp: FunCode.GoodsFavoriteOperateRsp,
           isEncrypted: isEncrypted()
         },
         success: (res) => {
-          /// 操作失败
-          if (res.code != 0) {
-            hideLoading(()=>{}, '请求失败,原因:'+res.msg, 'error')
-            return 
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+            return
           }
           /// 操作成功
           hideLoading(()=>{}, '请求成功'+res.msg, 'success')
         },
         fail: (emsg) => {
           /// 操作失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         }
       })
     })
@@ -264,7 +266,7 @@ Page({
       },
       fail: (emsg) => {
         /// 加载失败
-        showToast('请求失败,原因:'+emsg)
+        showToast(emsg, 'error')
       },
       complete: () => {
         /// 停止下拉刷新
@@ -312,7 +314,7 @@ Page({
         },
         fail: (emsg) => {
           /// 加载失败
-          hideLoading(()=>{}, '请求失败,原因:'+emsg, 'error')
+          hideLoading(()=>{}, emsg, 'error')
         },
         complete: () => {
           /// 停止下拉刷新

+ 3 - 3
GuangZuan/miniprogram/pages/trade/index.wxml

@@ -5,7 +5,7 @@
 
   <!-- tabs -->
   <view class="tab-view">
-    <van-tabs custom-class="van-tabs" sticky animated bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
+    <van-tabs custom-class="van-tabs" sticky animated bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
       <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
     </van-tabs>  
     <image id="listing-buy" style="width: 25px; height: 25px;" src="../../images/trade-listingbuy.png" bindtap="onIconClick"/>
@@ -23,8 +23,8 @@
   </van-dropdown-menu>
 
   <!-- 搜索框 -->
-  <van-search model:value="{{ zsallproperties }}" use-action-slot="{{ true }}" wx:if="{{ active != 0 }}" shape="round" input-align="center" background="#999" placeholder="请输入商品属性 支持模糊查询">
-    <view slot="action" style="color: white;" bind:tap="onClick">搜索</view>
+  <van-search model:value="{{ zsallproperties }}" use-action-slot="{{ true }}" wx:if="{{ active != 0 }}" shape="round" input-align="center" background="#E6F1FF" placeholder="请输入商品属性 支持模糊查询">
+    <view slot="action" style="color: #333;" bind:tap="onClick">搜索</view>
   </van-search>
 
   <!-- 列头 --> 

+ 8 - 0
GuangZuan/miniprogram/services/api/account/index.ts

@@ -56,4 +56,12 @@ export function queryQhjUserCollectConfig(params: HttpRequest<{req: GuangZuan.Qu
  */
 export function queryBankAccountSign(params: HttpRequest<{req: GuangZuan.QueryUserReceiveInfoReq, rsp: GuangZuan.BankAccountSign[]}>) {
   return httpRequest(service.config.goCommonSearchUrl+'/Qhj/QueryBankAccountSign', 'GET', params)
+}
+
+/**
+ * 获取登录ID
+ * 
+ */
+export function getLoginID(params: HttpRequest<{req: GuangZuan.GetLoginIDReq, rsp: GuangZuan.GetLoginIDRsp}>) {
+  return httpRequest(service.config.goCommonSearchUrl+'/User/GetLoginID', 'GET', params)
 }

+ 5 - 0
GuangZuan/miniprogram/services/api/common/index.ts

@@ -40,4 +40,9 @@ export function sendMsgToMQ(params: HttpRequest<{req: GuangZuan.SendMsgToMQReq,
 /* 获取所有枚举信息 */
 export function getAllEnums(params: HttpRequest<{req: GuangZuan.AllEnumsReq, rsp: GuangZuan.AllEnums[]}>) {
   return httpRequest(service.config.goCommonSearchUrl+'/Common/GetAllEnums', 'GET', params)
+}
+
+/* 获取数据库错误信息*/
+export function queryErrorInfos(params: HttpRequest<{req: GuangZuan.ErrorReq, rsp: GuangZuan.Error[]}>) {
+  return httpRequest(service.config.goCommonSearchUrl+'/Common/QueryErrorInfos', 'GET', params)
 }

+ 16 - 0
GuangZuan/miniprogram/services/utils.ts

@@ -278,4 +278,20 @@ export function getEnumdicValue(enumdiccode: string, enumdicname: string): numbe
     })[0].enumitemname
   }
   return 0
+}
+
+/// 缓存所有的错误码信息
+export function setAllErrors(errors: GuangZuan.Error[]) {
+  wx.setStorageSync('AllErrors', errors)
+}
+
+export function getAllErrors(): GuangZuan.Error[] {
+  return <[GuangZuan.Error]>wx.getStorageSync('AllErrors')
+}
+
+export function getErrorMsg(retcode: number): string {
+  const errors = getAllErrors()
+  return errors.filter(obj => {
+    return retcode.toString() === obj.errorcode
+  })[0].description
 }

+ 10 - 1
GuangZuan/miniprogram/utils/websocket/crypto.ts

@@ -1,4 +1,5 @@
 import CryptoJS from 'crypto-js';
+import { isEncrypted } from '../../services/utils';
 
 /** AES密钥 */
 const aeskey: CryptoJS.lib.WordArray = CryptoJS.enc.Utf8.parse('F7A72DE7D6264530F01BA49BC73EB873');
@@ -22,7 +23,7 @@ const desOption = {
  * 将Uint8Array数据转化为WordArray数据的方法
  * @param arr Uint8Array数据
  */
-function uint8ArrayToWordArray(arr: Uint8Array): CryptoJS.lib.WordArray {
+export function uint8ArrayToWordArray(arr: Uint8Array): CryptoJS.lib.WordArray {
     const word = [];
     for (let i = 0; i < arr.length; i += 4) {
         word.push((arr[i] << 24) | (arr[i + 1] << 16) | (arr[i + 2] << 8) | (arr[i + 3] << 0));
@@ -186,3 +187,11 @@ export function Uint8ArrayToString(fileData: Uint8Array){
   }
   return dataString
 }
+
+/// body加密
+export const encryptBody = (json: string, ec: boolean=isEncrypted()) => {
+  const data = toUint8Array(json)
+  const encrypt = encrypt50(data)
+  const base =  CryptoJS.enc.Base64.stringify(uint8ArrayToWordArray(encrypt!))
+  return ec ? base : json
+}

+ 2 - 79
GuangZuan/project.private.config.json

@@ -17,85 +17,8 @@
           "scene": null
         },
         {
-          "name": "证书查询",
-          "pathName": "mHome/pages/cerserach/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "出入金",
-          "pathName": "mMine/pages/inoutgold/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "保税详情",
-          "pathName": "mHome/pages/bond/detail/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "出境检测",
-          "pathName": "mHome/pages/inspection/list/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "出境详情",
-          "pathName": "mHome/pages/inspection/detail/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "我要出售",
-          "pathName": "mTrade/pages/listingsell/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "我要求购",
-          "pathName": "mTrade/pages/listingbuy/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "履约修改",
-          "pathName": "mMine/pages/myperformance/modify/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "违约申请",
-          "pathName": "mMine/pages/myperformance/breach/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "商品详情",
-          "pathName": "mHome/pages/goodsdetail/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": " 确认付款",
-          "pathName": "mHome/pages/inspection/payment/index",
-          "query": "item=%7B%22orderid%22%3A801000001%2C%22userid%22%3A1000%2C%22accountid%22%3A250000000001%2C%22ordersn%22%3A%22%22%2C%22orderno%22%3A%22%22%2C%22gzcjaccounttype%22%3A1%2C%22gzcjaccount%22%3A%221234512345%22%2C%22companynamecn%22%3A%22%E4%B8%AD%E4%B8%AD%E4%B8%AD%E4%B8%AD%E4%B8%AD%E4%B8%AD%E4%B8%AD%22%2C%22companynameen%22%3A%22ENENENENENEN%22%2C%22addresscn%22%3A%22%E5%9C%B0%E5%9D%80%E5%9C%B0%E5%9D%80%E5%9C%B0%E5%9D%80%E5%9C%B0%E5%9D%80%22%2C%22addressen%22%3A%22ENADdress%22%2C%22contactname%22%3A%22%E5%BC%A0%E4%B8%89%22%2C%22contactposition%22%3A%22AAAA%22%2C%22contactphoneno%22%3A%2213899998888%22%2C%22email%22%3A%22aaa%40abc.com%22%2C%22gzcjcategorytype%22%3A1%2C%22processingcountry%22%3A%22%E4%B8%AD%E5%9B%BD%22%2C%22zsorigin%22%3A%22%E5%8D%97%E9%9D%9E%22%2C%22gzcjdeliverytype%22%3A1%2C%22gzcjstatus%22%3A1%2C%22totalnumber%22%3A5%2C%22totalweight%22%3A15.5%2C%22totalamount%22%3A1340000%2C%22createtime%22%3A%222022-11-01T14%3A16%3A03%2B08%3A00%22%2C%22advanceamount%22%3A0%2C%22settleamount%22%3A0%2C%22handlestatus%22%3A0%2C%22executestatus%22%3A1%2C%22servicefeesum%22%3A0%2C%22realservicefee%22%3A0%2C%22totalweightgm%22%3A0%2C%22totalgrossweight%22%3A0%2C%22origincountry%22%3A%22%22%2C%22invoiceremark%22%3A%22%22%2C%22weightrange%22%3A%22%22%2C%22shaperange%22%3A%22%22%2C%22colorrange%22%3A%22%22%2C%22gzcjcategorytypedisplay%22%3A%22%E5%A4%A9%E7%84%B6%E6%88%90%E5%93%81%E9%92%BB%E7%9F%B3%22%2C%22gzcjdeliverytypedisplay%22%3A%22%E5%88%B0%E5%8D%97%E6%B2%99%E8%87%AA%E6%8F%90%22%2C%22gzcjstatusdisplay%22%3A%22%E5%BE%85%E5%AE%A1%E6%A0%B8%22%7D",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "挂牌大厅",
-          "pathName": "pages/trade/index",
+          "name": "钻石圈",
+          "pathName": "pages/circle/index",
           "query": "",
           "launchMode": "default",
           "scene": null

+ 9 - 0
GuangZuan/typings/types/model/account.d.ts

@@ -879,5 +879,14 @@ declare namespace GuangZuan {
     /// 更新时间(签解约更新时间)
     updatetime: string
   }
+
+  /// 获取登录ID - 请求
+  interface GetLoginIDReq {
+    /// 登录代码
+    username: string
+  }
+
+  /// 获取登录ID - 回应
+  interface GetLoginIDRsp {}
 }
 

+ 25 - 1
GuangZuan/typings/types/model/common.d.ts

@@ -196,7 +196,10 @@ declare namespace GuangZuan {
   }
 
   interface SendMsgToMQRsp {
-    
+    /// 内容题
+    data: ''
+    funcode: number,
+    isEncrypted: boolean
   }
 
   /// 获取所有枚举信息-请求
@@ -230,4 +233,25 @@ declare namespace GuangZuan {
     /// 备注
     remark: string, 
   }
+
+  /// 获取数据库错误信息
+  interface ErrorReq {
+    /// 起始行号前索引
+    rowNumber?: string
+  }
+
+  interface Error {
+    /// 异常描述
+    description: string
+    /// 异常代码
+    errorcode: string
+    /// 异常ID
+    errorid: number
+    /// 所属模块
+    modulecode: string
+    /// 所属操作
+    operatecode: string
+    /// 行号
+    rownumber: string
+  }
 }

+ 2 - 0
GuangZuan/typings/types/model/trade.d.ts

@@ -267,6 +267,8 @@ declare namespace GuangZuan {
     invoiceremark: string
     /// 单据ID(801+Unix秒时间戳(10位)+xxxxxx)
     orderid: number
+    /// 单据ID(801+Unix秒时间戳(10位)+xxxxxx)
+    orderidstr: string
     /// 单据编号 - 合同编号:GZDECJJC+单据流水号
     orderno: string
     /// 单据流水号 - yymm000 - yy表示年份,mm表示月份,年份、月份以两位数表示;000表示流水序号,序号不足三位以0补全