Browse Source

支付密码

master
jiazhipeng 1 year ago
parent
commit
2d0508e1c2
  1. 4
      miniprogram_npm/chinese-workday/index.js
  2. 144
      miniprogram_npm/crypto-js/index.js
  3. 2
      miniprogram_npm/crypto-js/index.js.map
  4. 4
      miniprogram_npm/dayjs/index.js
  5. 152
      pages/order/pay/index.js
  6. 13
      pages/order/pay/index.wxml
  7. 5
      pages/order/pay/index.wxss
  8. 30
      subPackages/password/overview/overview.js
  9. 4
      subPackages/password/overview/overview.wxml
  10. 140
      subPackages/password/setting/setting.js
  11. 4
      subPackages/password/setting/setting.wxml
  12. 2
      subPackages/password/setting/setting.wxss
  13. 2
      utils/jsencrypt.min.js
  14. 21
      utils/passwordEncode.js

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__ = 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_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; }; 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 // from
// - 2018 https://www.gov.cn/zhengce/content/2017-11/30/content_5243579.htm // - 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 // - 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); }) }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1734585676993); return __REQUIRE__(1739326742649);
})() })()
//miniprogram-npm-outsideDeps=[] //miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map //# 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__ = 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_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; }; 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) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -23,8 +23,8 @@ __DEFINE__(1734585676994, function(require, module, exports) {
return CryptoJS; 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); }) }, 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__(1734585676995, function(require, module, exports) { __DEFINE__(1739326742651, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -833,7 +833,7 @@ __DEFINE__(1734585676995, function(require, module, exports) {
})); }));
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676996, function(require, module, exports) { __DEFINE__(1739326742652, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -1138,8 +1138,8 @@ __DEFINE__(1734585676996, function(require, module, exports) {
return CryptoJS; return CryptoJS;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676997, function(require, module, exports) { __DEFINE__(1739326742653, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -1216,8 +1216,8 @@ __DEFINE__(1734585676997, function(require, module, exports) {
return CryptoJS.lib.WordArray; return CryptoJS.lib.WordArray;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676998, function(require, module, exports) { __DEFINE__(1739326742654, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -1367,8 +1367,8 @@ __DEFINE__(1734585676998, function(require, module, exports) {
return CryptoJS.enc.Utf16; return CryptoJS.enc.Utf16;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585676999, function(require, module, exports) { __DEFINE__(1739326742655, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -1505,8 +1505,8 @@ __DEFINE__(1734585676999, function(require, module, exports) {
return CryptoJS.enc.Base64; return CryptoJS.enc.Base64;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677000, function(require, module, exports) { __DEFINE__(1739326742656, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -1655,8 +1655,8 @@ __DEFINE__(1734585677000, function(require, module, exports) {
return CryptoJS.enc.Base64url; return CryptoJS.enc.Base64url;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677001, function(require, module, exports) { __DEFINE__(1739326742657, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -1925,8 +1925,8 @@ __DEFINE__(1734585677001, function(require, module, exports) {
return CryptoJS.MD5; return CryptoJS.MD5;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677002, function(require, module, exports) { __DEFINE__(1739326742658, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -2077,8 +2077,8 @@ __DEFINE__(1734585677002, function(require, module, exports) {
return CryptoJS.SHA1; return CryptoJS.SHA1;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677003, function(require, module, exports) { __DEFINE__(1739326742659, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -2278,8 +2278,8 @@ __DEFINE__(1734585677003, function(require, module, exports) {
return CryptoJS.SHA256; return CryptoJS.SHA256;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677004, function(require, module, exports) { __DEFINE__(1739326742660, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -2360,8 +2360,8 @@ __DEFINE__(1734585677004, function(require, module, exports) {
return CryptoJS.SHA224; return CryptoJS.SHA224;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./sha256":1734585677003}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./sha256":1739326742659}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677005, function(require, module, exports) { __DEFINE__(1739326742661, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -2688,8 +2688,8 @@ __DEFINE__(1734585677005, function(require, module, exports) {
return CryptoJS.SHA512; return CryptoJS.SHA512;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./x64-core":1734585676996}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./x64-core":1739326742652}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677006, function(require, module, exports) { __DEFINE__(1739326742662, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -2773,8 +2773,8 @@ __DEFINE__(1734585677006, function(require, module, exports) {
return CryptoJS.SHA384; return CryptoJS.SHA384;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./x64-core":1734585676996,"./sha512":1734585677005}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./x64-core":1739326742652,"./sha512":1739326742661}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677007, function(require, module, exports) { __DEFINE__(1739326742663, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -3101,8 +3101,8 @@ __DEFINE__(1734585677007, function(require, module, exports) {
return CryptoJS.SHA3; return CryptoJS.SHA3;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./x64-core":1734585676996}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./x64-core":1739326742652}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677008, function(require, module, exports) { __DEFINE__(1739326742664, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -3370,8 +3370,8 @@ __DEFINE__(1734585677008, function(require, module, exports) {
return CryptoJS.RIPEMD160; return CryptoJS.RIPEMD160;
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677009, function(require, module, exports) { __DEFINE__(1739326742665, function(require, module, exports) {
;(function (root, factory) { ;(function (root, factory) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -3515,8 +3515,8 @@ __DEFINE__(1734585677009, function(require, module, exports) {
})); }));
}, function(modId) { var map = {"./core":1734585676995}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677010, function(require, module, exports) { __DEFINE__(1739326742666, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -3662,8 +3662,8 @@ __DEFINE__(1734585677010, function(require, module, exports) {
return CryptoJS.PBKDF2; return CryptoJS.PBKDF2;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./sha256":1734585677003,"./hmac":1734585677009}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./sha256":1739326742659,"./hmac":1739326742665}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677011, function(require, module, exports) { __DEFINE__(1739326742667, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -3798,8 +3798,8 @@ __DEFINE__(1734585677011, function(require, module, exports) {
return CryptoJS.EvpKDF; return CryptoJS.EvpKDF;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./sha1":1734585677002,"./hmac":1734585677009}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./sha1":1739326742658,"./hmac":1739326742665}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677012, function(require, module, exports) { __DEFINE__(1739326742668, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -4695,8 +4695,8 @@ __DEFINE__(1734585677012, function(require, module, exports) {
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./evpkdf":1734585677011}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./evpkdf":1739326742667}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677013, function(require, module, exports) { __DEFINE__(1739326742669, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -4777,8 +4777,8 @@ __DEFINE__(1734585677013, function(require, module, exports) {
return CryptoJS.mode.CFB; return CryptoJS.mode.CFB;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677014, function(require, module, exports) { __DEFINE__(1739326742670, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -4837,8 +4837,8 @@ __DEFINE__(1734585677014, function(require, module, exports) {
return CryptoJS.mode.CTR; return CryptoJS.mode.CTR;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677015, function(require, module, exports) { __DEFINE__(1739326742671, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -4955,8 +4955,8 @@ __DEFINE__(1734585677015, function(require, module, exports) {
return CryptoJS.mode.CTRGladman; return CryptoJS.mode.CTRGladman;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677016, function(require, module, exports) { __DEFINE__(1739326742672, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5011,8 +5011,8 @@ __DEFINE__(1734585677016, function(require, module, exports) {
return CryptoJS.mode.OFB; return CryptoJS.mode.OFB;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677017, function(require, module, exports) { __DEFINE__(1739326742673, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5053,8 +5053,8 @@ __DEFINE__(1734585677017, function(require, module, exports) {
return CryptoJS.mode.ECB; return CryptoJS.mode.ECB;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677018, function(require, module, exports) { __DEFINE__(1739326742674, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5104,8 +5104,8 @@ __DEFINE__(1734585677018, function(require, module, exports) {
return CryptoJS.pad.Ansix923; return CryptoJS.pad.Ansix923;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677019, function(require, module, exports) { __DEFINE__(1739326742675, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5150,8 +5150,8 @@ __DEFINE__(1734585677019, function(require, module, exports) {
return CryptoJS.pad.Iso10126; return CryptoJS.pad.Iso10126;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677020, function(require, module, exports) { __DEFINE__(1739326742676, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5192,8 +5192,8 @@ __DEFINE__(1734585677020, function(require, module, exports) {
return CryptoJS.pad.Iso97971; return CryptoJS.pad.Iso97971;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677021, function(require, module, exports) { __DEFINE__(1739326742677, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5241,8 +5241,8 @@ __DEFINE__(1734585677021, function(require, module, exports) {
return CryptoJS.pad.ZeroPadding; return CryptoJS.pad.ZeroPadding;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677022, function(require, module, exports) { __DEFINE__(1739326742678, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5273,8 +5273,8 @@ __DEFINE__(1734585677022, function(require, module, exports) {
return CryptoJS.pad.NoPadding; return CryptoJS.pad.NoPadding;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677023, function(require, module, exports) { __DEFINE__(1739326742679, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5341,8 +5341,8 @@ __DEFINE__(1734585677023, function(require, module, exports) {
return CryptoJS.format.Hex; return CryptoJS.format.Hex;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677024, function(require, module, exports) { __DEFINE__(1739326742680, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -5577,8 +5577,8 @@ __DEFINE__(1734585677024, function(require, module, exports) {
return CryptoJS.AES; return CryptoJS.AES;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677025, function(require, module, exports) { __DEFINE__(1739326742681, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -6358,8 +6358,8 @@ __DEFINE__(1734585677025, function(require, module, exports) {
return CryptoJS.TripleDES; return CryptoJS.TripleDES;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677026, function(require, module, exports) { __DEFINE__(1739326742682, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -6499,8 +6499,8 @@ __DEFINE__(1734585677026, function(require, module, exports) {
return CryptoJS.RC4; return CryptoJS.RC4;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677027, function(require, module, exports) { __DEFINE__(1739326742683, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -6693,8 +6693,8 @@ __DEFINE__(1734585677027, function(require, module, exports) {
return CryptoJS.Rabbit; return CryptoJS.Rabbit;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677028, function(require, module, exports) { __DEFINE__(1739326742684, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -6885,8 +6885,8 @@ __DEFINE__(1734585677028, function(require, module, exports) {
return CryptoJS.RabbitLegacy; return CryptoJS.RabbitLegacy;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734585677029, function(require, module, exports) { __DEFINE__(1739326742685, function(require, module, exports) {
;(function (root, factory, undef) { ;(function (root, factory, undef) {
if (typeof exports === "object") { if (typeof exports === "object") {
// CommonJS // CommonJS
@ -7358,8 +7358,8 @@ __DEFINE__(1734585677029, function(require, module, exports) {
return CryptoJS.Blowfish; return CryptoJS.Blowfish;
})); }));
}, function(modId) { var map = {"./core":1734585676995,"./enc-base64":1734585676999,"./md5":1734585677001,"./evpkdf":1734585677011,"./cipher-core":1734585677012}; return __REQUIRE__(map[modId], modId); }) }, function(modId) { var map = {"./core":1739326742651,"./enc-base64":1739326742655,"./md5":1739326742657,"./evpkdf":1739326742667,"./cipher-core":1739326742668}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1734585676994); return __REQUIRE__(1739326742650);
})() })()
//miniprogram-npm-outsideDeps=["crypto"] //miniprogram-npm-outsideDeps=["crypto"]
//# sourceMappingURL=index.js.map //# 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

152
pages/order/pay/index.js

@ -1,6 +1,7 @@
// pages/order/pay/index.js // pages/order/pay/index.js
import commonApi from "../../../utils/https/common" import commonApi from "../../../utils/https/common"
import util from "../../../utils/util" import util from "../../../utils/util"
import pwEncode from "../../../utils/passwordEncode"
let timer; let timer;
Page({ Page({
@ -28,10 +29,10 @@ Page({
MTTip: 0, MTTip: 0,
SBMask: true, // 数币支付密码弹窗 SBMask: false, // 数币支付密码弹窗
isFoucs: true, isFoucs: true,
vcode: '', vcode: '',
haveSBPassword: false, haveSBPassword: false, // 是否设置密码
inputData: { inputData: {
phone: '', phone: '',
code: '', code: '',
@ -270,14 +271,16 @@ Page({
}) })
}, },
// 电子钱包支付 // 电子钱包支付
walletPay:function(){ walletPay:function(password){
let item = this.data.payList[this.data.numIndex]; let item = this.data.payList[this.data.numIndex];
commonApi.user_post("order/pay",{ commonApi.user_post("order/pay",{
order_id:this.data.id, order_id:this.data.id,
pay_method:"SUBWALLET", pay_method:"SUBWALLET",
pay_platform:"MINI", pay_platform:"MINI",
app_name:"WxXcxConfig", app_name:"WxXcxConfig",
ins_no:item.ins_no ins_no:item.ins_no,
password: password,
type: 1,
}).then(res=>{ }).then(res=>{
let data = res.data?JSON.parse(res.data):{}; let data = res.data?JSON.parse(res.data):{};
if(data && data.RESULT && data.RESULT=='Y'){ if(data && data.RESULT && data.RESULT=='Y'){
@ -337,8 +340,34 @@ 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,
})
}
})
},
hideSBMask(){ hideSBMask(){
this.setData({SBMask:false}) this.setData({
SBMask:false,
})
}, },
passwordChange: function (e) { passwordChange: function (e) {
let val = e.detail.value let val = e.detail.value
@ -346,8 +375,23 @@ Page({
vcode: val vcode: val
}) })
if (val.length==6) { 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,
})
this.walletPay(password)
} else {
this.setData({
vcode: '',
})
}
})
} }
}, },
handleFoucs() { handleFoucs() {
@ -371,11 +415,107 @@ Page({
}, },
// 获取验证码 // 获取验证码
getCode:function(){ 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(){ 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: '',
})
}
})
}, },
/** /**

13
pages/order/pay/index.wxml

@ -61,7 +61,9 @@
</view> </view>
<view class="iconfont {{numIndex==index?'icon-iconfontoptionbutton':'icon-quan'}}"></view> <view class="iconfont {{numIndex==index?'icon-iconfontoptionbutton':'icon-quan'}}"></view>
</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>
</view> </view>
@ -118,8 +120,8 @@
<view class="mask" style="align-items:flex-end" wx:if="{{SBMask}}"> <view class="mask" style="align-items:flex-end" wx:if="{{SBMask}}">
<view class="mask-bg" bindtap="hideSBMask"></view> <view class="mask-bg"></view>
<view class="mask-content" style="text-align:center;width:100%;border-radius:0;min-height: 448rpx;padding: 46rpx 26rpx;"> <view class="mask-content" style="text-align:center;width:100%;border-radius:0;min-height: 500rpx;padding: 46rpx 26rpx;">
<view class="password-title"> <view class="password-title">
<view>{{haveSBPassword?'输入':'设置'}}支付密码</view> <view>{{haveSBPassword?'输入':'设置'}}支付密码</view>
<view class="iconfont icon-close" style="position: absolute;right: 0;top: 4rpx;" bindtap="hideSBMask"></view> <view class="iconfont icon-close" style="position: absolute;right: 0;top: 4rpx;" bindtap="hideSBMask"></view>
@ -130,7 +132,8 @@
<input type="number" password="true" class="show-code" wx:for="{{6}}" disabled <input type="number" password="true" class="show-code" wx:for="{{6}}" disabled
wx:key="index" value="{{vcode[index]}}" catch:tap="handleFoucs"/> wx:key="index" value="{{vcode[index]}}" catch:tap="handleFoucs"/>
</view> </view>
<input type="number" password="true" maxlength="6" focus="{{isFoucs}}" bindinput="passwordChange" class="passward-box" /> <input type="number" value="{{vcode}}" password="true" maxlength="6" focus="{{isFoucs}}"
bindinput="passwordChange" class="passward-box" />
<view class="resetPassword"> <view class="resetPassword">
<navigator url="/subPackages/password/setting/setting?type=reset">忘记密码</navigator> <navigator url="/subPackages/password/setting/setting?type=reset">忘记密码</navigator>
</view> </view>
@ -140,7 +143,7 @@
<view class="bind-box"> <view class="bind-box">
<view class="bind-item" > <view class="bind-item" >
<view class="bind-item-left">手机号</view> <view class="bind-item-left">手机号</view>
<input type="number" bindinput="inputChange" data-keyname="phone" class="weui-input" auto-focus placeholder="请输入您的手机号" /> <input type="number" bindinput="inputChange" value="{{inputData.phone}}" data-keyname="phone" class="weui-input" auto-focus placeholder="请输入您的手机号" />
</view> </view>
<view class="bind-item" > <view class="bind-item" >
<view class="bind-item-left">验证码</view> <view class="bind-item-left">验证码</view>

5
pages/order/pay/index.wxss

@ -130,12 +130,13 @@ page {
color: rgba(0,0,0,0); color: rgba(0,0,0,0);
} }
.resetPassword{ .resetPassword{
width: 106rpx; width: 160rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 27rpx; font-size: 27rpx;
color: #0C898F; color: #0C898F;
margin: 0 0 0 auto; margin: 0 0 0 auto;
text-align: right;
} }
@ -178,7 +179,7 @@ page {
} }
.vaild-number{ .vaild-number{
width: 197rpx !important; width: 207rpx !important;
height: 53rpx !important; height: 53rpx !important;
font-size: 27rpx !important; font-size: 27rpx !important;
color: #0C898F !important; color: #0C898F !important;

30
subPackages/password/overview/overview.js

@ -1,12 +1,8 @@
// pages/user/profile/index.js // pages/user/profile/index.js
let app = getApp(); let app = getApp();
import util from "../../../utils/util" import util from "../../../utils/util"
import WeCropper from '../../../we-cropper/we-cropper.min.js'; import commonApi from "../../../utils/https/common"
import userApi from "../../../utils/https/user"
let device = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); // 获取设备信息
const width = device.windowWidth // 示例为一个与屏幕等宽的正方形裁剪框
let menuHeight = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
let height = device.windowHeight - menuHeight;
Page({ Page({
/** /**
@ -14,7 +10,7 @@ Page({
*/ */
data: { data: {
info:null, havePassword:false,
}, },
@ -27,6 +23,16 @@ Page({
goSetting (e) { goSetting (e) {
let type = e.currentTarget.dataset.type; 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
}
wx.navigateTo({ wx.navigateTo({
url: '/subPackages/password/setting/setting?type='+type, url: '/subPackages/password/setting/setting?type='+type,
}) })
@ -44,11 +50,11 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
// userApi.user_post("user/getMyInfo",{}).then(res=>{ commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{
// this.setData({ this.setData({
// info:res.data, havePassword:res.data,
// }) })
// }) })
}, },
/** /**

4
subPackages/password/overview/overview.wxml

@ -4,8 +4,8 @@
<view bindtap="goSetting" data-type="add" class="profile-item" > <view bindtap="goSetting" data-type="add" class="profile-item" >
<text>设置支付密码</text> <text>设置支付密码</text>
<view class="info" wx:if="{{info&&info.password}}">已设置</view> <view class="info" wx:if="{{havePassword}}">已设置</view>
<view class="iconfont icon-you"></view> <view class="iconfont icon-you" wx:else></view>
</view> </view>
<view bindtap="goSetting" data-type="edit" class="profile-item" > <view bindtap="goSetting" data-type="edit" class="profile-item" >
<text>修改密码</text> <text>修改密码</text>

140
subPackages/password/setting/setting.js

@ -1,7 +1,8 @@
import util from "../../../utils/util.js" import util from "../../../utils/util.js"
import user from "../../../utils/https/user.js" import commonApi from "../../../utils/https/common"
import https from "../../../utils/https.js" import pwEncode from "../../../utils/passwordEncode"
var app = getApp(); var app = getApp();
Page({ Page({
@ -43,23 +44,48 @@ Page({
title: options.type=='reset'?'忘记密码':options.type=='edit'?'修改密码':'设置支付密码', title: options.type=='reset'?'忘记密码':options.type=='edit'?'修改密码':'设置支付密码',
editConfrim: options.type == 'edit'?true:false editConfrim: options.type == 'edit'?true:false
}) })
let userinfo = wx.getStorageSync('jstrip_userInfo')
if (userinfo && userinfo.mobile) {
this.data.inputData.phone = userinfo.mobile
this.setData({
inputData: this.data.inputData
})
}
}, },
// 编辑输入原密码 // 编辑输入原密码
passwordChange: function (e) { passwordChange: function (e) {
let _this = this
let val = e.detail.value let val = e.detail.value
console.log("passwordChange")
this.setData({ this.setData({
vcode: val vcode: val
}) })
if (val.length==6) { if (val.length==6) {
// 验证密码 // 验证密码
this.setData({editConfrim: false}) 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() { handleFoucs() {
this.setData({ this.setData({
isFoucs: true isFoucs: true
}) })
console.log("focus")
}, },
// 输入框 // 输入框
@ -108,55 +134,55 @@ Page({
buttonText:"发送中...", buttonText:"发送中...",
sendFlag:false sendFlag:false
}) })
let service = "user/getMobileCodeForChange",data={
mobile:this.data.inputData.phone, commonApi.user_post("uservice/user/getMobileCodeForResetPayPass",{mobile:this.data.inputData.phone}).then(res=>{
},api = user.user_post; if(res.code==1){
if(this.data.regToken){ // 发送成功 即接口调用成功
service="user/getMobileCodeForBind"; this.setData({
data.openid = this.data.regToken buttonText: "发送成功",
api = user._post sendFlag: false,
} codeId: res.data.smsCodeId
api(service, data).then(res=>{ })
console.log('sendmsg',res) // 获取成功之后需要马上改变成倒计时
if(res.code==1){ let time = 59;
// 发送成功 即接口调用成功 var timer = setInterval(() => {
this.setData({ // 倒计时结束需要重置可发送验证码状态和按钮文字
buttonText: "发送成功", if (time < 0) {
sendFlag: false, // 清除定时器
codeId: res.data.id clearInterval(timer)
}) this.setData({
// 获取成功之后需要马上改变成倒计时 buttonText: "重新发送",
let time = 59; sendFlag: true
var timer = setInterval(() => { })
// 倒计时结束需要重置可发送验证码状态和按钮文字 return false;
if (time < 0) { }
// 清除定时器 this.setData({
clearInterval(timer) buttonText: time + "秒后重新发送"
})
time--;
}, 1000)
}
else {
this.setData({ this.setData({
buttonText: "重新发送", buttonText: "重新发送",
sendFlag: true sendFlag: true
}) })
return false;
} }
this.setData({ }).catch(e=>{
buttonText: time + "秒后重新发送"
})
time--;
}, 1000)
}
else {
this.setData({ this.setData({
buttonText: "重新发送", buttonText: "重新发送",
sendFlag: true sendFlag: true
}) })
}
}) })
}, },
// 绑定 // 绑定
submit:function(){ submit:function(){
if(!this.data.inputData.code){ if (!this.data.canSubmit) {
return
}
if(this.data.type!='edit'&&!this.data.inputData.code){
wx.showToast({ wx.showToast({
title: '请输入验证码', title: '请输入验证码',
icon: "none" icon: "none"
@ -164,21 +190,27 @@ Page({
return false; return false;
} }
let service = "user/changeMobile" let data={
let data={smsCode:this.data.inputData.code,mobile:this.data.inputData.phone,smsCodeId:this.data.codeId} code:this.data.inputData.code,
let api = user.user_post; mobile:this.data.inputData.phone,
if(this.data.regToken){ smsCodeId:this.data.codeId,
service = "user/wxBindPhoneAndLogin" password: pwEncode.handleEncrypt(this.data.inputData.password),
data.openid = this.data.regToken confirm_password:pwEncode.handleEncrypt(this.data.inputData.confirmPassword)
data.fromSource = "WECHATXCX"
if(app.globalData.category_id){
data.category_id = app.globalData.category_id;
}
api = user._post
} }
api(service,data).then(res=>{
if(res.code==1){
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(()=>{ setTimeout(()=>{
wx.navigateBack({ wx.navigateBack({
delta:1 delta:1

4
subPackages/password/setting/setting.wxml

@ -9,7 +9,7 @@
wx:key="index" value="{{vcode[index]}}" catch:tap="handleFoucs"/> wx:key="index" value="{{vcode[index]}}" catch:tap="handleFoucs"/>
</view> </view>
<input type="number" password="true" maxlength="6" focus="{{isFoucs}}" bindinput="passwordChange" class="passward-box" /> <input value="{{vcode}}" type="number" password="true" maxlength="6" focus="{{isFoucs}}" bindinput="passwordChange" class="passward-box" />
</view> </view>
@ -17,7 +17,7 @@
<view class="bind-box"> <view class="bind-box">
<view class="bind-item" wx:if="{{type!='edit'}}"> <view class="bind-item" wx:if="{{type!='edit'}}">
<view class="bind-item-left">手机号</view> <view class="bind-item-left">手机号</view>
<input type="number" bindinput="inputChange" data-keyname="phone" class="weui-input" auto-focus placeholder="请输入您的手机号" /> <input type="number" bindinput="inputChange" value="{{inputData.phone}}" data-keyname="phone" class="weui-input" auto-focus placeholder="请输入您的手机号" />
</view> </view>
<view class="bind-item" wx:if="{{type!='edit'}}"> <view class="bind-item" wx:if="{{type!='edit'}}">
<view class="bind-item-left">验证码</view> <view class="bind-item-left">验证码</view>

2
subPackages/password/setting/setting.wxss

@ -40,7 +40,7 @@
} }
.vaild-number{ .vaild-number{
width: 197rpx !important; width: 207rpx !important;
height: 53rpx !important; height: 53rpx !important;
font-size: 27rpx !important; font-size: 27rpx !important;
color: #0C898F !important; color: #0C898F !important;

2
utils/jsencrypt.min.js

File diff suppressed because one or more lines are too long

21
utils/passwordEncode.js

@ -0,0 +1,21 @@
const JSEncrypt = require('./jsencrypt.min.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); // 对数据进行加密
}
module.exports = {
handleEncrypt: handleEncrypt,
}
Loading…
Cancel
Save