Browse Source

Merge branch 'dev_password'

master
jiazhipeng 1 year ago
parent
commit
1dd02e17e2
  1. 5
      app.json
  2. 4
      miniprogram_npm/chinese-workday/index.js
  3. 144
      miniprogram_npm/crypto-js/index.js
  4. 2
      miniprogram_npm/crypto-js/index.js.map
  5. 4
      miniprogram_npm/dayjs/index.js
  6. 230
      pages/order/pay/index.js
  7. 54
      pages/order/pay/index.wxml
  8. 108
      pages/order/pay/index.wxss
  9. 15
      pages/user/profile/index.js
  10. 7
      pages/user/profile/index.wxml
  11. 2
      project.private.config.json
  12. 111
      subPackages/password/overview/overview.js
  13. 5
      subPackages/password/overview/overview.json
  14. 20
      subPackages/password/overview/overview.wxml
  15. 29
      subPackages/password/overview/overview.wxss
  16. 270
      subPackages/password/setting/setting.js
  17. 5
      subPackages/password/setting/setting.json
  18. 50
      subPackages/password/setting/setting.wxml
  19. 91
      subPackages/password/setting/setting.wxss
  20. 2
      utils/jsencrypt.min.js
  21. 57
      utils/passwordEncode.js

5
app.json

@ -188,6 +188,7 @@
"pages/order/showOrderNew/index",
"pages/user/order/showOrderInfo/index",
"pages/user/suggest/suggest"
],
"subpackages": [
{
@ -201,7 +202,9 @@
"postSearch/index",
"gwcOrder/index",
"indexGQ/index",
"transferPage/transferPage"
"transferPage/transferPage",
"password/overview/overview",
"password/setting/setting"
]
}
],

4
miniprogram_npm/chinese-workday/index.js

@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1734585676993, function(require, module, exports) {
__DEFINE__(1739326742649, function(require, module, exports) {
// from
// - 2018 https://www.gov.cn/zhengce/content/2017-11/30/content_5243579.htm
// - 2019 https://www.gov.cn/zhengce/content/2018-12/06/content_5346276.htm
@ -320,7 +320,7 @@ function formatDate(day) {
}
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1734585676993);
return __REQUIRE__(1739326742649);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

144
miniprogram_npm/crypto-js/index.js

@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1734585676994, function(require, module, exports) {
__DEFINE__(1739326742650, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -23,8 +23,8 @@ __DEFINE__(1734585676994, function(require, module, exports) {
return CryptoJS;
}));
}, function(modId) {var map = {"./core":1734585676995,"./x64-core":1734585676996,"./lib-typedarrays":1734585676997,"./enc-utf16":1734585676998,"./enc-base64":1734585676999,"./enc-base64url":1734585677000,"./md5":1734585677001,"./sha1":1734585677002,"./sha256":1734585677003,"./sha224":1734585677004,"./sha512":1734585677005,"./sha384":1734585677006,"./sha3":1734585677007,"./ripemd160":1734585677008,"./hmac":1734585677009,"./pbkdf2":1734585677010,"./evpkdf":1734585677011,"./cipher-core":1734585677012,"./mode-cfb":1734585677013,"./mode-ctr":1734585677014,"./mode-ctr-gladman":1734585677015,"./mode-ofb":1734585677016,"./mode-ecb":1734585677017,"./pad-ansix923":1734585677018,"./pad-iso10126":1734585677019,"./pad-iso97971":1734585677020,"./pad-zeropadding":1734585677021,"./pad-nopadding":1734585677022,"./format-hex":1734585677023,"./aes":1734585677024,"./tripledes":1734585677025,"./rc4":1734585677026,"./rabbit":1734585677027,"./rabbit-legacy":1734585677028,"./blowfish":1734585677029}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676995, function(require, module, exports) {
}, function(modId) {var map = {"./core":1739326742651,"./x64-core":1739326742652,"./lib-typedarrays":1739326742653,"./enc-utf16":1739326742654,"./enc-base64":1739326742655,"./enc-base64url":1739326742656,"./md5":1739326742657,"./sha1":1739326742658,"./sha256":1739326742659,"./sha224":1739326742660,"./sha512":1739326742661,"./sha384":1739326742662,"./sha3":1739326742663,"./ripemd160":1739326742664,"./hmac":1739326742665,"./pbkdf2":1739326742666,"./evpkdf":1739326742667,"./cipher-core":1739326742668,"./mode-cfb":1739326742669,"./mode-ctr":1739326742670,"./mode-ctr-gladman":1739326742671,"./mode-ofb":1739326742672,"./mode-ecb":1739326742673,"./pad-ansix923":1739326742674,"./pad-iso10126":1739326742675,"./pad-iso97971":1739326742676,"./pad-zeropadding":1739326742677,"./pad-nopadding":1739326742678,"./format-hex":1739326742679,"./aes":1739326742680,"./tripledes":1739326742681,"./rc4":1739326742682,"./rabbit":1739326742683,"./rabbit-legacy":1739326742684,"./blowfish":1739326742685}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742651, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -833,7 +833,7 @@ __DEFINE__(1734585676995, function(require, module, exports) {
}));
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676996, function(require, module, exports) {
__DEFINE__(1739326742652, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1138,8 +1138,8 @@ __DEFINE__(1734585676996, function(require, module, exports) {
return CryptoJS;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676997, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742653, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1216,8 +1216,8 @@ __DEFINE__(1734585676997, function(require, module, exports) {
return CryptoJS.lib.WordArray;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676998, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742654, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1367,8 +1367,8 @@ __DEFINE__(1734585676998, function(require, module, exports) {
return CryptoJS.enc.Utf16;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676999, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742655, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1505,8 +1505,8 @@ __DEFINE__(1734585676999, function(require, module, exports) {
return CryptoJS.enc.Base64;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677000, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742656, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1655,8 +1655,8 @@ __DEFINE__(1734585677000, function(require, module, exports) {
return CryptoJS.enc.Base64url;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677001, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742657, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1925,8 +1925,8 @@ __DEFINE__(1734585677001, function(require, module, exports) {
return CryptoJS.MD5;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677002, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742658, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -2077,8 +2077,8 @@ __DEFINE__(1734585677002, function(require, module, exports) {
return CryptoJS.SHA1;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677003, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742659, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -2278,8 +2278,8 @@ __DEFINE__(1734585677003, function(require, module, exports) {
return CryptoJS.SHA256;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677004, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742660, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -2360,8 +2360,8 @@ __DEFINE__(1734585677004, function(require, module, exports) {
return CryptoJS.SHA224;
}));
}, function(modId) { var map = {"./core":1734585676995,"./sha256":1734585677003}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677005, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./sha256":1739326742659}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742661, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -2688,8 +2688,8 @@ __DEFINE__(1734585677005, function(require, module, exports) {
return CryptoJS.SHA512;
}));
}, function(modId) { var map = {"./core":1734585676995,"./x64-core":1734585676996}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677006, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./x64-core":1739326742652}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742662, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -2773,8 +2773,8 @@ __DEFINE__(1734585677006, function(require, module, exports) {
return CryptoJS.SHA384;
}));
}, function(modId) { var map = {"./core":1734585676995,"./x64-core":1734585676996,"./sha512":1734585677005}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677007, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./x64-core":1739326742652,"./sha512":1739326742661}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742663, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -3101,8 +3101,8 @@ __DEFINE__(1734585677007, function(require, module, exports) {
return CryptoJS.SHA3;
}));
}, function(modId) { var map = {"./core":1734585676995,"./x64-core":1734585676996}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677008, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./x64-core":1739326742652}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742664, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -3370,8 +3370,8 @@ __DEFINE__(1734585677008, function(require, module, exports) {
return CryptoJS.RIPEMD160;
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677009, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742665, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -3515,8 +3515,8 @@ __DEFINE__(1734585677009, function(require, module, exports) {
}));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677010, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742666, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -3662,8 +3662,8 @@ __DEFINE__(1734585677010, function(require, module, exports) {
return CryptoJS.PBKDF2;
}));
}, function(modId) { var map = {"./core":1734585676995,"./sha256":1734585677003,"./hmac":1734585677009}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677011, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./sha256":1739326742659,"./hmac":1739326742665}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742667, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -3798,8 +3798,8 @@ __DEFINE__(1734585677011, function(require, module, exports) {
return CryptoJS.EvpKDF;
}));
}, function(modId) { var map = {"./core":1734585676995,"./sha1":1734585677002,"./hmac":1734585677009}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677012, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./sha1":1739326742658,"./hmac":1739326742665}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742668, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4695,8 +4695,8 @@ __DEFINE__(1734585677012, function(require, module, exports) {
}));
}, function(modId) { var map = {"./core":1734585676995,"./evpkdf":1734585677011}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677013, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./evpkdf":1739326742667}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742669, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4777,8 +4777,8 @@ __DEFINE__(1734585677013, function(require, module, exports) {
return CryptoJS.mode.CFB;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677014, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742670, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4837,8 +4837,8 @@ __DEFINE__(1734585677014, function(require, module, exports) {
return CryptoJS.mode.CTR;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677015, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742671, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4955,8 +4955,8 @@ __DEFINE__(1734585677015, function(require, module, exports) {
return CryptoJS.mode.CTRGladman;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677016, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742672, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5011,8 +5011,8 @@ __DEFINE__(1734585677016, function(require, module, exports) {
return CryptoJS.mode.OFB;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677017, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742673, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5053,8 +5053,8 @@ __DEFINE__(1734585677017, function(require, module, exports) {
return CryptoJS.mode.ECB;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677018, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742674, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5104,8 +5104,8 @@ __DEFINE__(1734585677018, function(require, module, exports) {
return CryptoJS.pad.Ansix923;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677019, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742675, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5150,8 +5150,8 @@ __DEFINE__(1734585677019, function(require, module, exports) {
return CryptoJS.pad.Iso10126;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677020, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742676, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5192,8 +5192,8 @@ __DEFINE__(1734585677020, function(require, module, exports) {
return CryptoJS.pad.Iso97971;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677021, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742677, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5241,8 +5241,8 @@ __DEFINE__(1734585677021, function(require, module, exports) {
return CryptoJS.pad.ZeroPadding;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677022, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742678, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5273,8 +5273,8 @@ __DEFINE__(1734585677022, function(require, module, exports) {
return CryptoJS.pad.NoPadding;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677023, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742679, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5341,8 +5341,8 @@ __DEFINE__(1734585677023, function(require, module, exports) {
return CryptoJS.format.Hex;
}));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677024, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742680, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5577,8 +5577,8 @@ __DEFINE__(1734585677024, function(require, module, exports) {
return CryptoJS.AES;
}));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677025, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742681, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6358,8 +6358,8 @@ __DEFINE__(1734585677025, function(require, module, exports) {
return CryptoJS.TripleDES;
}));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677026, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742682, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6499,8 +6499,8 @@ __DEFINE__(1734585677026, function(require, module, exports) {
return CryptoJS.RC4;
}));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677027, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742683, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6693,8 +6693,8 @@ __DEFINE__(1734585677027, function(require, module, exports) {
return CryptoJS.Rabbit;
}));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677028, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742684, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6885,8 +6885,8 @@ __DEFINE__(1734585677028, function(require, module, exports) {
return CryptoJS.RabbitLegacy;
}));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677029, function(require, module, exports) {
}, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1739326742685, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -7358,8 +7358,8 @@ __DEFINE__(1734585677029, function(require, module, exports) {
return CryptoJS.Blowfish;
}));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1734585676994);
}, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1739326742650);
})()
//miniprogram-npm-outsideDeps=["crypto"]
//# sourceMappingURL=index.js.map

2
miniprogram_npm/crypto-js/index.js.map

File diff suppressed because one or more lines are too long

4
miniprogram_npm/dayjs/index.js

File diff suppressed because one or more lines are too long

230
pages/order/pay/index.js

@ -1,6 +1,7 @@
// pages/order/pay/index.js
import commonApi from "../../../utils/https/common"
import util from "../../../utils/util"
import pwEncode from "../../../utils/passwordEncode"
let timer;
Page({
@ -27,6 +28,25 @@ Page({
showTipMaskSecond: 3,
MTTip: 0,
SBMask: false, // 数币支付密码弹窗
isFoucs: true,
vcode: '',
haveSBPassword: false, // 是否设置密码
inputData: {
phone: '',
code: '',
password: '',
confirmPassword: '',
},
canSubmit: false,
code:"",
buttonText:"获取验证码",
sendFlag:true,
regToken:null,
codeId:null,
inputAreaHeight: 0,
heightTimer: null,
},
/**
@ -253,14 +273,15 @@ Page({
})
},
// 电子钱包支付
walletPay:function(){
walletPay:function(otherData){
let item = this.data.payList[this.data.numIndex];
commonApi.user_post("order/pay",{
order_id:this.data.id,
pay_method:"SUBWALLET",
pay_platform:"MINI",
app_name:"WxXcxConfig",
ins_no:item.ins_no
ins_no:item.ins_no,
...otherData
}).then(res=>{
let data = res.data?JSON.parse(res.data):{};
if(data && data.RESULT && data.RESULT=='Y'){
@ -319,6 +340,211 @@ Page({
}
},
// 数币密码确认
showPassword () {
// 请求是否设置密码
commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{
// 设置过密码
if (res.data) {
this.setData({
SBMask: true,
haveSBPassword: true,
vcode: '',
isFoucs: true
})
} else {
let userinfo = wx.getStorageSync('jstrip_userInfo')
let inputData = {phone: '',code: '',password: '',confirmPassword: ''}
if (userinfo && userinfo.mobile) {
inputData.phone = userinfo.mobile
}
this.setData({
SBMask: true,
inputData: inputData,
haveSBPassword: false,
})
}
})
},
hideSBMask(){
this.setData({
SBMask:false,
})
},
passwordChange: function (e) {
let val = e.detail.value
this.setData({
vcode: val
})
if (val.length==6) {
let password = pwEncode.handleEncrypt(val)
// 验证密码
commonApi.user_post("pay_password/verifyPassword",{password:password}).then(res =>{
// 密码校验成功
if (res.code == 1) {
this.setData({vcode: '',SBMask: false})
commonApi.user_post('pay_password/getNonce',{}).then(nonceRes =>{
if (nonceRes.code == 1) {
let pwSign = pwEncode.getPWSignature(password, nonceRes.data)
pwSign.password = password
pwSign.type = 1
this.walletPay(pwSign)
}
})
} else {
this.setData({
vcode: '',
})
}
})
}
},
handleFoucs() {
this.setData({
isFoucs: true
})
},
inputChange:function(e){
let inputData = this.data.inputData
let keyname =e.currentTarget.dataset.keyname;
inputData[keyname] = e.detail.value
this.setData({
inputData: inputData
})
let canSubmit = false
if (inputData.phone && inputData.code && inputData.password && inputData.confirmPassword) {
canSubmit = true
}
this.setData({canSubmit: canSubmit})
},
// 获取验证码
getCode:function(){
// 如果已经在发送则不能继续发送验证码
if (!this.data.sendFlag){
return false;
}
if(!this.data.inputData.phone){
wx.showToast({
title: '请输入手机号',
icon:"none"
})
return false;
}
if(!util.isTel(this.data.inputData.phone)){
wx.showToast({
title: '请输入正确的手机号码',
icon: "none"
})
return false;
}
// 获取验证码则需要改变按钮的文字
this.setData({
buttonText:"发送中...",
sendFlag:false
})
commonApi.user_post("uservice/user/getMobileCodeForResetPayPass",{mobile:this.data.inputData.phone}).then(res=>{
if(res.code==1){
// 发送成功 即接口调用成功
this.setData({
buttonText: "发送成功",
sendFlag: false,
codeId: res.data.smsCodeId
})
// 获取成功之后需要马上改变成倒计时
let time = 59;
var timer = setInterval(() => {
// 倒计时结束需要重置可发送验证码状态和按钮文字
if (time < 0) {
// 清除定时器
clearInterval(timer)
this.setData({
buttonText: "重新发送",
sendFlag: true
})
return false;
}
this.setData({
buttonText: time + "秒后重新发送"
})
time--;
}, 1000)
}
else {
this.setData({
buttonText: "重新发送",
sendFlag: true
})
}
}).catch(e=>{
this.setData({
buttonText: "重新发送",
sendFlag: true
})
})
},
// 绑定
submit:function(){
if (!this.data.canSubmit) {
return
}
if(!this.data.inputData.code){
wx.showToast({
title: '请输入验证码',
icon: "none"
})
return false;
}
let data={
code:this.data.inputData.code,
mobile:this.data.inputData.phone,
smsCodeId:this.data.codeId,
password: pwEncode.handleEncrypt(this.data.inputData.password),
confirm_password:pwEncode.handleEncrypt(this.data.inputData.confirmPassword)
}
let service = "pay_password/set"
commonApi.user_post(service,data).then(res=>{
if(res.code==1){
wx.showToast({
title: '密码设置成功',
icon: 'none'
})
this.setData({
haveSBPassword: true,
isFoucs: true,
vcode: '',
})
}
})
},
inputfocus: function () {
clearTimeout(this.data.heightTimer)
this.setData({inputAreaHeight: 600})
},
inputblur: function () {
let _this = this
this.data.heightTimer = setTimeout(()=>{
_this.setData({inputAreaHeight: 0})
},300)
},
goReset: function () {
commonApi.user_post("pay_password/checkLocked",{}).then(res=>{
if (res.code!=1) {
return
} else {
wx.navigateTo({
url: '/subPackages/password/setting/setting?type='+type,
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/

54
pages/order/pay/index.wxml

@ -61,7 +61,9 @@
</view>
<view class="iconfont {{numIndex==index?'icon-iconfontoptionbutton':'icon-quan'}}"></view>
</view>
<view class="btn" bindtap="walletPay" style="margin:25rpx">立即付款</view>
<!-- <view class="btn" bindtap="walletPay" style="margin:25rpx">立即付款</view> -->
<view class="btn" bindtap="showPassword" style="margin:25rpx">立即付款</view>
</view>
</view>
@ -113,5 +115,55 @@
</view>
</view>
</view>
<view class="mask" style="align-items:flex-end" wx:if="{{SBMask}}">
<view class="mask-bg"></view>
<view class="mask-content" style="text-align:center;width:100%;border-radius:0;min-height: 500rpx;padding: 46rpx 26rpx;">
<view class="password-title">
<view>{{haveSBPassword?'输入':'设置'}}支付密码</view>
<view class="iconfont icon-close" style="position: absolute;right: 0;top: 4rpx;" bindtap="hideSBMask"></view>
</view>
<view wx:if="{{haveSBPassword}}">
<view class="passward-box-container">
<input type="number" value="{{vcode}}" password="true" maxlength="6" focus="{{isFoucs}}"
bindinput="passwordChange" class="passward-box" cursor-spacing="100"/>
<input type="number" password="true" class="show-code" wx:for="{{6}}" disabled
wx:key="index" value="{{vcode[index]}}" catch:tap="handleFoucs"/>
</view>
<view class="resetPassword">
<view bind:tap="goReset" url="/subPackages/password/setting/setting?type=reset">忘记密码</view>
</view>
</view>
<view wx:else style="min-height: {{inputAreaHeight}}px;">
<view class="bind-box" >
<view class="bind-item" >
<view class="bind-item-left">手机号</view>
<input type="number" bindinput="inputChange" bindfocus="inputfocus" bindblur="inputblur" value="{{inputData.phone}}" data-keyname="phone" class="weui-input" disabled placeholder="请输入您的手机号" />
</view>
<view class="bind-item" >
<view class="bind-item-left">验证码</view>
<input type="number" bindinput="inputChange" bindfocus="inputfocus" bindblur="inputblur" data-keyname="code" class="weui-input" placeholder="请输入验证码" />
<button class="vaild-number" type="primary" size="mini" bindtap="getCode">{{buttonText}}</button>
</view>
<view class="bind-item" >
<view class="bind-item-left">设置支付密码</view>
<input type="number" password="true" maxlength="6" bindfocus="inputfocus" bindblur="inputblur" bindinput="inputChange" data-keyname="password" class="weui-input" placeholder="请设置您的支付密码" />
</view>
<view class="bind-item">
<view class="bind-item-left">再次填写密码</view>
<input type="number" password="true" maxlength="6" bindfocus="inputfocus" bindblur="inputblur" bindinput="inputChange" data-keyname="confirmPassword" class="weui-input" placeholder="再次填写您的支付密码" />
</view>
</view>
<view class="btn {{canSubmit?'':'disabled'}}" bindtap="submit">确 定</view>
</view>
</view>
</view>

108
pages/order/pay/index.wxss

@ -91,4 +91,110 @@ page {
height: 22rpx;
bottom: -12rpx;
left: 0;
}
}
.password-title{
text-align: center;
font-weight: bold;
font-size: 31rpx;
color: #000000;
position: relative;
}
.passward-box-container{
width: 697rpx;
height: 93rpx;
margin: 68rpx auto 0;
position: relative;
border-radius: 7rpx;
border: 1px solid #999999;
display: flex;
box-sizing: border-box;
padding: 16rpx 0;
}
.show-code{
flex: 1;
height: 100%;
border-right: 1px solid #999999;
text-align: center;
font-size: 20rpx;
}
.show-code:last-of-type {
border: none;
}
.passward-box{
border: none;
/* opacity: 0; */
color: rgba(0,0,0,0);
width: 100%;
height: 100%;
top: 0;
position: absolute;
caret-color: transparent;
text-indent: -999em; /*文本向左缩进*/
margin-left: -100%; /*输入框光标起始点向左左移*/
width: 200%; /*输入框增大一倍*/
text-align: left;
}
.resetPassword{
width: 160rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 27rpx;
color: #0C898F;
margin: 30rpx 0 0 auto;
text-align: right;
}
.bind-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 120rpx;
line-height: 120rpx;
font-size: 28rpx;
border-bottom: 1rpx solid #EEE;
text-align: left;
}
.bind-item .weui-input {
flex: 1;
}
.bind-item-left {
width: 249rpx;
}
.bind-item image {
width: 200rpx;
height: 60rpx;
}
.btn {
margin:0rpx auto;
margin-top: 74rpx;
width: 697rpx;
height: 73rpx;
background: #D62829;
border-radius: 37rpx;
line-height: 73rpx;
font-weight: bold;
font-size: 35rpx;
color: #FFFFFF;
text-align: center;
}
.btn.disabled{
background: #CCCCCC;
}
.vaild-number{
width: 207rpx !important;
height: 53rpx !important;
font-size: 27rpx !important;
color: #0C898F !important;
background: none !important;
line-height: 53rpx !important;
padding: 0 !important;
text-align: center;
border: 1px solid #0C898F;
border-radius: 27rpx;
font-weight: 500 !important;
}

15
pages/user/profile/index.js

@ -159,6 +159,19 @@ Page({
})
},
goOverview () {
if (this.data.info && this.data.info.mobile) {
wx.navigateTo({
url: '/subPackages/password/overview/overview',
})
} else {
wx.showToast({
title: '请先绑定手机号',
icon: 'none'
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -181,6 +194,8 @@ Page({
sexIndex:1
})
}
console.log(this.data.info)
})
},

7
pages/user/profile/index.wxml

@ -23,7 +23,7 @@
</navigator>
<navigator url="../bindtel/index" class="profile-item" wx:if="{{info}}">
<text>手机号</text>
<view class="info">{{info.mobile}}</view>
<view class="info">{{info.mobile?info.mobile:''}}</view>
<view class="iconfont icon-you"></view>
</navigator>
<view class="profile-item">
@ -48,6 +48,11 @@
</view>
<view class="iconfont icon-you"></view>
</view>
<view bind:tap="goOverview" url="/subPackages/password/overview/overview" class="profile-item">
<text>支付密码</text>
<view class="info"></view>
<view class="iconfont icon-you"></view>
</view>
<navigator url="../logout/index" class="profile-item">
<text>注销账号</text>
<view class="info">注销后账号无法恢复,请谨慎操作</view>

2
project.private.config.json

@ -112,5 +112,5 @@
},
"projectname": "%E8%8B%8F%E5%B7%9E%E6%96%87%E6%97%85",
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.30.0"
"libVersion": "development"
}

111
subPackages/password/overview/overview.js

@ -0,0 +1,111 @@
// pages/user/profile/index.js
let app = getApp();
import util from "../../../utils/util"
import commonApi from "../../../utils/https/common"
Page({
/**
* 页面的初始数据
*/
data: {
havePassword:false,
isLock: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
goSetting (e) {
let type = e.currentTarget.dataset.type;
if (type == 'add' && this.data.havePassword) {
return
}
if (type !='add' && !this.data.havePassword){
wx.showToast({
title: '请先设置密码',
icon: "none",
})
return
}
if (type == 'reset') {
commonApi.user_post("pay_password/checkLocked",{}).then(res=>{
if (res.code!=1) {
return
} else {
wx.navigateTo({
url: '/subPackages/password/setting/setting?type='+type,
})
}
})
} else {
wx.navigateTo({
url: '/subPackages/password/setting/setting?type='+type,
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{
this.setData({
havePassword:res.data,
})
if (res.data) {
commonApi.user_post("pay_password/checkLocked",{}).then(res=>{
this.setData({
isLock: !res.data
})
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

5
subPackages/password/overview/overview.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
}
}

20
subPackages/password/overview/overview.wxml

@ -0,0 +1,20 @@
<!--pages/user/profile/index.wxml-->
<title title="支付密码"></title>
<view bindtap="goSetting" data-type="add" class="profile-item" >
<text>设置支付密码</text>
<view class="info" wx:if="{{havePassword}}">已设置</view>
<view class="iconfont icon-you" wx:else></view>
</view>
<view bindtap="goSetting" data-type="edit" class="profile-item" wx:if="{{havePassword&&!isLock}}">
<text>修改密码</text>
<view class="info"></view>
<view class="iconfont icon-you"></view>
</view>
<view bindtap="goSetting" data-type="reset" class="profile-item" wx:if="{{havePassword&&!isLock}}">
<text>忘记密码</text>
<view class="info"></view>
<view class="iconfont icon-you"></view>
</view>

29
subPackages/password/overview/overview.wxss

@ -0,0 +1,29 @@
/* pages/user/profile/index.wxss */
.profile-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
color: #333;
height: 118rpx;
margin: 0 30rpx;
border-bottom: 1rpx solid #D8D8D8;
}
.profile-item text {
font-weight: 500;
flex-shrink: 0;
}
.profile-item .info {
flex: 1;
text-align: right;
}
.profile-item .iconfont {
flex-shrink: 0;
}
.profile-item .info image {
display: inline-block;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}

270
subPackages/password/setting/setting.js

@ -0,0 +1,270 @@
import util from "../../../utils/util.js"
import commonApi from "../../../utils/https/common"
import pwEncode from "../../../utils/passwordEncode"
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
type:'add',
title: '',
editConfrim: false,
vcode: '',//验证码内容
isFoucs: true,
inputData: {
phone: '',
code: '',
password: '',
confirmPassword: '',
},
canSubmit: false,
code:"",
buttonText:"获取验证码",
sendFlag:true,
regToken:null,
codeId:null,
isApproval: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
type: options.type||'add',
title: options.type=='reset'?'忘记密码':options.type=='edit'?'修改密码':'设置支付密码',
editConfrim: options.type == 'edit'?true:false
})
},
// 编辑时输入原密码
passwordChange: function (e) {
let _this = this
let val = e.detail.value
console.log("passwordChange")
this.setData({
vcode: val
})
if (val.length==6) {
// 验证密码
let password = pwEncode.handleEncrypt(val)
// 验证密码
commonApi.user_post("pay_password/verifyPassword",{password:password})
.then(res=>{
// 密码校验成功
if (res.code == 1) {
_this.setData({editConfrim: false})
} else {
_this.setData({
vcode: '',
isFoucs: true
})
}
})
// this.setData({editConfrim: false})
}
},
handleFoucs() {
this.setData({
isFoucs: true
})
console.log("focus")
},
// 输入框
inputChange:function(e){
let inputData = this.data.inputData
let keyname =e.currentTarget.dataset.keyname;
inputData[keyname] = e.detail.value
this.setData({
inputData: inputData
})
let canSubmit = false
if (this.data.type == 'edit' && inputData.password && inputData.confirmPassword) {
canSubmit = true
}
if (this.data.type != 'edit' && inputData.phone && inputData.code && inputData.password && inputData.confirmPassword) {
canSubmit = true
}
this.setData({canSubmit: canSubmit})
},
// 获取验证码
getCode:function(){
// 如果已经在发送则不能继续发送验证码
if (!this.data.sendFlag){
return false;
}
if(!this.data.inputData.phone){
wx.showToast({
title: '请输入手机号',
icon:"none"
})
return false;
}
if(!util.isTel(this.data.inputData.phone)){
wx.showToast({
title: '请输入正确的手机号码',
icon: "none"
})
return false;
}
// 获取验证码则需要改变按钮的文字
this.setData({
buttonText:"发送中...",
sendFlag:false
})
commonApi.user_post("uservice/user/getMobileCodeForResetPayPass",{mobile:this.data.inputData.phone}).then(res=>{
if(res.code==1){
// 发送成功 即接口调用成功
this.setData({
buttonText: "发送成功",
sendFlag: false,
codeId: res.data.smsCodeId
})
// 获取成功之后需要马上改变成倒计时
let time = 59;
var timer = setInterval(() => {
// 倒计时结束需要重置可发送验证码状态和按钮文字
if (time < 0) {
// 清除定时器
clearInterval(timer)
this.setData({
buttonText: "重新发送",
sendFlag: true
})
return false;
}
this.setData({
buttonText: time + "秒后重新发送"
})
time--;
}, 1000)
}
else {
this.setData({
buttonText: "重新发送",
sendFlag: true
})
}
}).catch(e=>{
this.setData({
buttonText: "重新发送",
sendFlag: true
})
})
},
// 绑定
submit:function(){
if (!this.data.canSubmit) {
return
}
if(this.data.type!='edit'&&!this.data.inputData.code){
wx.showToast({
title: '请输入验证码',
icon: "none"
})
return false;
}
let data={
code:this.data.inputData.code,
mobile:this.data.inputData.phone,
smsCodeId:this.data.codeId,
password: pwEncode.handleEncrypt(this.data.inputData.password),
confirm_password:pwEncode.handleEncrypt(this.data.inputData.confirmPassword)
}
let service = "pay_password/set"
if (this.data.type == 'reset') service = 'pay_password/reset'
if (this.data.type == 'edit') {
service = "pay_password/modify"
data.old_password = pwEncode.handleEncrypt(this.data.vcode)
}
console.log(data)
commonApi.user_post(service,data).then(res=>{
if(res.code==1){
wx.showToast({
title: '密码设置成功',
icon: 'none'
})
setTimeout(()=>{
wx.navigateBack({
delta:1
})
},500)
// if(this.data.regToken){
// https.set_logininfo(res);
// }
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
commonApi.user_post("uservice/user/getMyInfo",{}).then(res=>{
let userinfo = res.data
if (userinfo && userinfo.mobile) {
this.data.inputData.phone = userinfo.mobile
this.setData({
inputData: this.data.inputData
})
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

5
subPackages/password/setting/setting.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title-header": "/pages/component/TitleHeader"
}
}

50
subPackages/password/setting/setting.wxml

@ -0,0 +1,50 @@
<!--pages/user/bindtel/index.wxml-->
<view>
<title-header title="{{title}}"></title-header>
<view wx:if="{{editConfrim}}">
<view class="edit-tip">输入支付密码</view>
<view class="passward-box-container">
<input type="number" password="true" class="show-code" wx:for="{{6}}" disabled
wx:key="index" value="{{vcode[index]}}" catch:tap="handleFoucs"/>
</view>
<input value="{{vcode}}" type="number" password="true" maxlength="6" focus="{{isFoucs}}" bindinput="passwordChange" class="passward-box" />
</view>
<view wx:else>
<view class="bind-box">
<view class="bind-item" wx:if="{{type!='edit'}}">
<view class="bind-item-left">手机号</view>
<input type="number" bindinput="inputChange" disabled value="{{inputData.phone}}" data-keyname="phone" class="weui-input" placeholder="请输入您的手机号" />
</view>
<view class="bind-item" wx:if="{{type!='edit'}}">
<view class="bind-item-left">验证码</view>
<input type="number" bindinput="inputChange" data-keyname="code" class="weui-input" placeholder="请输入验证码" />
<button class="vaild-number" type="primary" size="mini" bindtap="getCode">{{buttonText}}</button>
</view>
<view class="bind-item" wx:if="{{type=='reset'}}">
<view class="bind-item-left">修改支付密码</view>
<input type="number" password="true" maxlength="6" bindinput="inputChange" data-keyname="password" class="weui-input" placeholder="请设置新的支付密码" />
</view>
<view class="bind-item" wx:if="{{type=='add'}}">
<view class="bind-item-left">设置支付密码</view>
<input type="number" password="true" maxlength="6" bindinput="inputChange" data-keyname="password" class="weui-input" placeholder="请设置您的支付密码" />
</view>
<view class="bind-item" wx:if="{{type=='edit'}}">
<view class="bind-item-left">输入新密码</view>
<input type="number" password="true" maxlength="6" bindinput="inputChange" data-keyname="password" class="weui-input" placeholder="请设置新的支付密码" />
</view>
<view class="bind-item">
<view class="bind-item-left">再次填写密码</view>
<input type="number" password="true" maxlength="6" bindinput="inputChange" data-keyname="confirmPassword" class="weui-input" placeholder="再次填写您的支付密码" />
</view>
</view>
<view class="btn {{canSubmit?'':'disabled'}}" bindtap="submit">确 定</view>
</view>
</view>

91
subPackages/password/setting/setting.wxss

@ -0,0 +1,91 @@
/* pages/user/bindtel/index.wxss */
.bind-box {
background: white;
}
.bind-item {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 20rpx;
height: 120rpx;
line-height: 120rpx;
font-size: 28rpx;
border-bottom: 1rpx solid #EEE;
}
.bind-item .weui-input {
flex: 1;
}
.bind-item-left {
width: 249rpx;
}
.bind-item image {
width: 200rpx;
height: 60rpx;
}
.btn {
margin:0rpx auto;
margin-top: 74rpx;
width: 697rpx;
height: 73rpx;
background: #D62829;
border-radius: 37rpx;
line-height: 73rpx;
font-weight: bold;
font-size: 35rpx;
color: #FFFFFF;
text-align: center;
}
.btn.disabled{
background: #CCCCCC;
}
.vaild-number{
width: 207rpx !important;
height: 53rpx !important;
font-size: 27rpx !important;
color: #0C898F !important;
background: none !important;
line-height: 53rpx !important;
padding: 0 !important;
text-align: center;
border: 1px solid #0C898F;
border-radius: 27rpx;
font-weight: 500 !important;
}
.edit-tip{
padding: 66rpx 0;
text-align: center;
font-weight: bold;
font-size: 31rpx;
color: #000000;
}
.passward-box-container{
width: 697rpx;
height: 93rpx;
margin: 0 auto;
position: relative;
border-radius: 7rpx;
border: 1px solid #999999;
display: flex;
box-sizing: border-box;
padding: 16rpx 0;
}
.show-code{
flex: 1;
height: 100%;
border-right: 1px solid #999999;
text-align: center;
font-size: 20rpx;
}
.show-code:last-of-type {
border: none;
}
.passward-box{
width: 0;
height: 0;
border: none;
opacity: 0;
color: rgba(0,0,0,0);
}

2
utils/jsencrypt.min.js

File diff suppressed because one or more lines are too long

57
utils/passwordEncode.js

@ -0,0 +1,57 @@
const JSEncrypt = require('./jsencrypt.min.js');
import CryptoJS from "crypto-js";
// 支付密码加密
// 公钥
const keyPub = "-----BEGIN PUBLIC KEY-----\n" +
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1yLtKwRwC/Uv35920h7X4on8/\n"+
"hR8AuYnWOsyDCGbepY+1cMhSX2zOu8BUINk5UcwIbm62Ki7xZIWT9+1Wn0y7dfJb\n"+
"kub5O6/lM3oHuY7eT9alYs5kw8EWsznT/zeE9sapTJyPVDhRuFwslEayzPhx6lVR\n"+
"6lwfQTK/gfUtz8gbxwIDAQAB\n"+
"-----END PUBLIC KEY-----\n"
const handleEncrypt = (str) => {
const jsencrypt = new JSEncrypt();
jsencrypt.setPublicKey(keyPub); // 设置公钥
return jsencrypt.encrypt(str); // 对数据进行加密
}
// 生成支付加密参数
const getPWSignature = (password,nonce) => {
const salt = generateRandomSalt(16)
// 使用 PBKDF2 派生密钥
const iterations = 10000;
const keySize = 256 / 32; // 256 位密钥
const clientKey = CryptoJS.PBKDF2(password, salt, {
keySize: keySize,
iterations: iterations
}).toString(CryptoJS.enc.Base64);
// 生成 signature
const signature = CryptoJS.HmacSHA256(nonce, clientKey).toString(CryptoJS.enc.Base64)
return {
// nonce: nonce,
signature: signature,
client_salt: salt,
// clientKey: clientKey,
}
}
// 生成指定长度的随机 Salt
const generateRandomSalt = (length)=> {
const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let salt = '';
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * charset.length);
salt += charset.charAt(randomIndex);
}
return salt;
}
module.exports = {
handleEncrypt: handleEncrypt,
getPWSignature: getPWSignature
}
Loading…
Cancel
Save