Commit 08146f69 by 梁建民

js

parent 11c3af23
......@@ -91,6 +91,9 @@ const actions = {
} else if (data.err_code == 10001 || data.err_code == 10002) {
state.formImgShow = true;
state.countDown = false;
Toast({
message: data.err_msg,
duration: 2000
......@@ -98,6 +101,7 @@ const actions = {
} else {
Toast({
message: data.err_msg,
duration: 3000
......@@ -107,6 +111,9 @@ const actions = {
}).catch(function (err) {
});
},
countDownflag({commit}, payload) {
state.countDown = false;
}
}
......
......@@ -12,7 +12,7 @@
<input type="text" placeholder="怎么称呼您" class="inp" v-model="user_name"/>
</div>
<div class="inpt-wrap">
<input type="number" placeholder="请输入联系手机号" class="inp" v-model="account"/>
<input type="number" placeholder="请输入手机号" class="inp" v-model="account"/>
</div>
<div class="inpt-wrap fx" v-if="formImgShow">
<input type="text" placeholder="请输入图形验证码" class="inps" v-model="verify"/>
......@@ -20,7 +20,7 @@
<img :src="imgSrc" alt="">
</a>
</div>
<div class="inpt-wrap fx">
<div class="inpt-wrap fx" v-if="codeshow">
<input type="number" placeholder="输入验证码" class="inps" v-model="sms_verify"/>
<input type="button" :value="codetext" :class="{'codebtndisabled':codeactive}" :disabled="disabled" @click="codeFn" class="codebtn lineBlock">
</div>
......@@ -57,17 +57,24 @@
codetext: '发送验证码',
disabled: false,
codeactive: false,
codeshow: false
}
},
created() {
if(Util.isUerAgent() == 'pc'){
window.location.href=productionUrlPc+'/v3/home/risk';
if (Util.isUerAgent() == 'pc') {
window.location.href = productionUrlPc + '/v3/home/risk';
}
this.imgSrc = productionUrlPc + 'public/verify';
},
watch: {
formImgShow(val) {
if (!val) {
account(val) {
var reg_mobile = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
if (reg_mobile.test(val)) {
this.codeshow = true;
}
},
countDown(val) {
if (val) {
this.timeNum();
}
}
......
......@@ -121,7 +121,7 @@
],
[
{
'text_1': '史诗型巨',
'text_1': '史诗型巨',
'text_2': '客户虐我千百遍,我待客户如初恋!',
'text_3': 'http://img.ichunt.com/images/ichunt/minProgram/61565cb8f1ed21365366297300e546e8.png'
},
......
......@@ -4326,7 +4326,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.2.7@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.9.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n formImgShow: false,\n countDown: false\n};\nvar mutations = {\n getfileuploadbanner: function getfileuploadbanner(state, payload) {\n state.getfileuploadbanner = payload.data;\n },\n articleShowData: function articleShowData(state, payload) {\n state.articleShowData = payload.data;\n }\n};\nvar actions = {\n actionLogins: function actionLogins(_ref, payload) {\n var commit = _ref.commit;\n var toast = vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n forbidClick: true\n }); //IC信用贷\n\n if (payload.from == 'risk') {\n var params = {\n com_name: payload.com_name,\n user_name: payload.user_name,\n account: payload.account,\n sms_verify: payload.sms_verify,\n \"ptag\": 'edcp'\n };\n } else {\n var params = {\n account: payload.account,\n sms_verify: payload.sms_verify\n };\n }\n\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].actionLogins(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n setTimeout(function () {\n toast.clear();\n\n if (payload.from == 'risk') {\n window.location.href = \"/h5/view/#/creditestsuccess\";\n } else {\n window.location.href = \"/\";\n }\n }, 1000);\n } else {\n toast.clear();\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\n },\n smsVerifys: function smsVerifys(_ref2, payload) {\n var commit = _ref2.commit;\n var params = {\n mobile: payload.mobile,\n verify: payload.verify,\n channel: 1\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].smsVerifys(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n state.formImgShow = false;\n state.countDown = true;\n } else if (data.err_code == 10001 || data.err_code == 10002) {\n state.formImgShow = true;\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/special/index.js?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/_vue@2.6.10@vue/dist/vue.runtime.esm.js\");\n/* harmony import */ var vant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vant */ \"./node_modules/_vant@2.2.7@vant/es/index.js\");\n/* harmony import */ var _api_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/index */ \"./src/api/index.js\");\n\n\n\n\nvar qs = __webpack_require__(/*! qs */ \"./node_modules/_qs@6.9.0@qs/lib/index.js\");\n\nvue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"]);\nvar state = {\n formImgShow: false,\n countDown: false\n};\nvar mutations = {\n getfileuploadbanner: function getfileuploadbanner(state, payload) {\n state.getfileuploadbanner = payload.data;\n },\n articleShowData: function articleShowData(state, payload) {\n state.articleShowData = payload.data;\n }\n};\nvar actions = {\n actionLogins: function actionLogins(_ref, payload) {\n var commit = _ref.commit;\n var toast = vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"].loading({\n forbidClick: true\n }); //IC信用贷\n\n if (payload.from == 'risk') {\n var params = {\n com_name: payload.com_name,\n user_name: payload.user_name,\n account: payload.account,\n sms_verify: payload.sms_verify,\n \"ptag\": 'edcp'\n };\n } else {\n var params = {\n account: payload.account,\n sms_verify: payload.sms_verify\n };\n }\n\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].actionLogins(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n setTimeout(function () {\n toast.clear();\n\n if (payload.from == 'risk') {\n window.location.href = \"/h5/view/#/creditestsuccess\";\n } else {\n window.location.href = \"/\";\n }\n }, 1000);\n } else {\n toast.clear();\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {\n state.loading = false;\n });\n },\n smsVerifys: function smsVerifys(_ref2, payload) {\n var commit = _ref2.commit;\n var params = {\n mobile: payload.mobile,\n verify: payload.verify,\n channel: 1\n };\n _api_index__WEBPACK_IMPORTED_MODULE_2__[\"services\"].smsVerifys(qs.stringify(params)).then(function (res) {\n var data = res.data;\n\n if (data.err_code == 0) {\n state.formImgShow = false;\n state.countDown = true;\n } else if (data.err_code == 10001 || data.err_code == 10002) {\n state.formImgShow = true;\n state.countDown = false;\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 2000\n });\n } else {\n Object(vant__WEBPACK_IMPORTED_MODULE_1__[\"Toast\"])({\n message: data.err_msg,\n duration: 3000\n });\n }\n }).catch(function (err) {});\n },\n countDownflag: function countDownflag(_ref3, payload) {\n var commit = _ref3.commit;\n state.countDown = false;\n }\n};\nvar getters = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n state: state,\n mutations: mutations,\n actions: actions,\n getters: getters\n});\n\n//# sourceURL=webpack:///./src/store/modules/special/index.js?");
/***/ }),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment