提交 0a3e301b 编写于 作者: huangwensu's avatar huangwensu

修改token名称

上级 3db4b7cd
{
"presets": [
[
"@babel/preset-env",
{
"modules": false
}
]
]
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ var axios = _interopDefault(require('axios')); ...@@ -7,7 +7,7 @@ var axios = _interopDefault(require('axios'));
// 时间处理 // 时间处理
Date.prototype.format = function (fmt) { Date.prototype.format = function (fmt) {
// author: meizz // author: meizz
let o = { var o = {
'M+': this.getMonth() + 1, 'M+': this.getMonth() + 1,
// 月份 // 月份
'd+': this.getDate(), 'd+': this.getDate(),
...@@ -24,7 +24,7 @@ Date.prototype.format = function (fmt) { ...@@ -24,7 +24,7 @@ Date.prototype.format = function (fmt) {
}; };
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
for (let k in o) { for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) { if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)); fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
} }
...@@ -33,19 +33,19 @@ Date.prototype.format = function (fmt) { ...@@ -33,19 +33,19 @@ Date.prototype.format = function (fmt) {
return fmt; return fmt;
}; };
let axiosInstance = axios.create(); var axiosInstance = axios.create();
axiosInstance.interceptors.request.use(config => { axiosInstance.interceptors.request.use(function (config) {
// if (config.withCredentials) { // if (config.withCredentials) {
// config.headers.token = getItem('token'); // config.headers.token = getItem('token');
// } // }
return config; return config;
}); });
axiosInstance.interceptors.response.use(response => { axiosInstance.interceptors.response.use(function (response) {
let data = response.data == undefined ? response.request.responseText : response.data; var data = response.data == undefined ? response.request.responseText : response.data;
return data; return data;
}); });
function request(options) { function request(options) {
const axiosConfig = { var axiosConfig = {
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
...@@ -56,10 +56,10 @@ function request(options) { ...@@ -56,10 +56,10 @@ function request(options) {
method: 'get' method: 'get'
}; };
options = Object.assign(axiosConfig, options); options = Object.assign(axiosConfig, options);
return new Promise((resolve, reject) => { return new Promise(function (resolve, reject) {
axiosInstance(options).then(res => { axiosInstance(options).then(function (res) {
resolve(res); resolve(res);
}).catch(error => { }).catch(function (error) {
reject(error); reject(error);
}); });
}); });
...@@ -72,13 +72,24 @@ function request(options) { ...@@ -72,13 +72,24 @@ function request(options) {
* @return {[type]} 协议类型 2:云鹊医用户协议 3:云鹊医隐私协议 * @return {[type]} 协议类型 2:云鹊医用户协议 3:云鹊医隐私协议
*/ */
const signAgreementApi = async data => { var signAgreementApi = function signAgreementApi(data) {
return request({ return regeneratorRuntime.async(function signAgreementApi$(_context) {
method: 'post', while (1) {
headers: { switch (_context.prev = _context.next) {
token: data.token case 0:
}, return _context.abrupt("return", request({
url: `${data.baseUrl}/smartcontract/protocol/sign?type=${data.type}` method: 'post',
headers: {
token: data.token
},
url: "".concat(data.baseUrl, "/smartcontract/protocol/sign?type=").concat(data.type)
}));
case 1:
case "end":
return _context.stop();
}
}
}); });
}; };
...@@ -103,44 +114,37 @@ var script = { ...@@ -103,44 +114,37 @@ var script = {
default: false default: false
} }
}, },
data: function data() {
data() {
return {}; return {};
}, },
created: function created() {},
created() {},
methods: { methods: {
readAndAgree() { readAndAgree: function readAndAgree() {
const _this = this; var _this = this;
const data = { var data = {
baseUrl: _this.baseUrl, baseUrl: _this.baseUrl,
token: _this.agreementToken, token: _this.agreementToken,
type: 3 type: 3
}; };
signAgreementApi(data).then(res => { signAgreementApi(data).then(function (res) {
if (res.code == '000000') { if (res.code == '000000') {
_this.$emit('hasSignAgreement'); _this.$emit('hasSignAgreement');
} }
}); });
}, },
gotoAgreement: function gotoAgreement() {
gotoAgreement() {
//https://dev-scale.yunqueyi.com //https://dev-scale.yunqueyi.com
window.location.href = `${this.agreementPageUrl}/loginAgreement?token=${this.agreementToken}&pageUrl=${window.location.href}`; window.location.href = "".concat(this.agreementPageUrl, "/loginAgreement?agreementToken=").concat(this.agreementToken, "&pageUrl=").concat(window.location.href);
} }
} }
}; };
function styleInject(css, ref) { function styleInject(css, ref) {
if (ref === void 0) ref = {}; if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt; var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { if (!css || typeof document === 'undefined') { return; }
return;
}
var head = document.head || document.getElementsByTagName('head')[0]; var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style'); var style = document.createElement('style');
...@@ -163,7 +167,7 @@ function styleInject(css, ref) { ...@@ -163,7 +167,7 @@ function styleInject(css, ref) {
} }
} }
var css = ".pica-h5-agreement-container[data-v-1c3d08a4] {\n width: 8rem;\n background: #fff;\n border-radius: 0.08rem;\n font-family: PingFangSC-Semibold;\n box-shadow: 0 0 0.13333rem #ededed;\n -webkit-user-select: none;\n user-select: none;\n}\n.pica-h5-agreement-container .agreement-title[data-v-1c3d08a4] {\n color: #333;\n font-size: 0.48rem;\n padding: 0.8rem 0 0.37333rem;\n text-align: center;\n}\n.pica-h5-agreement-container .agreement-content[data-v-1c3d08a4] {\n color: #676869;\n font-size: 0.37333rem;\n padding: 0 0.8rem 0.21333rem;\n line-height: 0.56rem;\n}\n.pica-h5-agreement-container .agreement-content span[data-v-1c3d08a4] {\n color: #449284;\n text-decoration: underline;\n}\n.pica-h5-agreement-container .agreement-btn[data-v-1c3d08a4] {\n color: #449284;\n font-size: 0.45333rem;\n text-align: center;\n padding: 0.32rem 0;\n border: 1PX solid #F0F1F2;\n}\n"; var css = ".pica-h5-agreement-container[data-v-430a9a0e] {\n width: 8rem;\n background: #fff;\n border-radius: 0.08rem;\n font-family: PingFangSC-Semibold;\n box-shadow: 0 0 0.13333rem #ededed;\n -webkit-user-select: none;\n user-select: none;\n}\n.pica-h5-agreement-container .agreement-title[data-v-430a9a0e] {\n color: #333;\n font-size: 0.48rem;\n padding: 0.8rem 0 0.37333rem;\n text-align: center;\n}\n.pica-h5-agreement-container .agreement-content[data-v-430a9a0e] {\n color: #676869;\n font-size: 0.37333rem;\n padding: 0 0.8rem 0.21333rem;\n line-height: 0.56rem;\n}\n.pica-h5-agreement-container .agreement-content span[data-v-430a9a0e] {\n color: #449284;\n text-decoration: underline;\n}\n.pica-h5-agreement-container .agreement-btn[data-v-430a9a0e] {\n color: #449284;\n font-size: 0.45333rem;\n text-align: center;\n padding: 0.32rem 0;\n border: 1PX solid #F0F1F2;\n}\n";
styleInject(css); styleInject(css);
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
...@@ -176,7 +180,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla ...@@ -176,7 +180,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
} // Vue.extend constructor export interop. } // Vue.extend constructor export interop.
const options = typeof script === 'function' ? script.options : script; // render functions var options = typeof script === 'function' ? script.options : script; // render functions
if (template && template.render) { if (template && template.render) {
options.render = template.render; options.render = template.render;
...@@ -193,11 +197,11 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla ...@@ -193,11 +197,11 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
options._scopeId = scopeId; options._scopeId = scopeId;
} }
let hook; var hook;
if (moduleIdentifier) { if (moduleIdentifier) {
// server build // server build
hook = function (context) { hook = function hook(context) {
// 2.3 injection // 2.3 injection
context = context || // cached call context = context || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful this.$vnode && this.$vnode.ssrContext || // stateful
...@@ -223,8 +227,8 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla ...@@ -223,8 +227,8 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
options._ssrRegister = hook; options._ssrRegister = hook;
} else if (style) { } else if (style) {
hook = shadowMode ? function (context) { hook = shadowMode ? function () {
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
} : function (context) { } : function (context) {
style.call(this, createInjector(context)); style.call(this, createInjector(context));
}; };
...@@ -233,7 +237,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla ...@@ -233,7 +237,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
if (hook) { if (hook) {
if (options.functional) { if (options.functional) {
// register for functional component in vue file // register for functional component in vue file
const originalRender = options.render; var originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) { options.render = function renderWithStyleInjection(h, context) {
hook.call(context); hook.call(context);
...@@ -241,7 +245,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla ...@@ -241,7 +245,7 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
}; };
} else { } else {
// inject component registration as beforeCreate hook // inject component registration as beforeCreate hook
const existing = options.beforeCreate; var existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
} }
} }
...@@ -249,11 +253,13 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla ...@@ -249,11 +253,13 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
return script; return script;
} }
var normalizeComponent_1 = normalizeComponent;
/* script */ /* script */
const __vue_script__ = script; var __vue_script__ = script;
/* template */ /* template */
var __vue_render__ = function () { var __vue_render__ = function __vue_render__() {
var _vm = this; var _vm = this;
var _h = _vm.$createElement; var _h = _vm.$createElement;
...@@ -282,29 +288,29 @@ var __vue_staticRenderFns__ = []; ...@@ -282,29 +288,29 @@ var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true; __vue_render__._withStripped = true;
/* style */ /* style */
const __vue_inject_styles__ = undefined; var __vue_inject_styles__ = undefined;
/* scoped */ /* scoped */
const __vue_scope_id__ = "data-v-1c3d08a4"; var __vue_scope_id__ = "data-v-430a9a0e";
/* module identifier */ /* module identifier */
const __vue_module_identifier__ = undefined; var __vue_module_identifier__ = undefined;
/* functional template */ /* functional template */
const __vue_is_functional_template__ = false; var __vue_is_functional_template__ = false;
/* style inject */ /* style inject */
/* style inject SSR */ /* style inject SSR */
/* style inject shadow dom */ /* style inject shadow dom */
var PicaH5Agreement = normalizeComponent({ var __vue_component__ = normalizeComponent_1({
render: __vue_render__, render: __vue_render__,
staticRenderFns: __vue_staticRenderFns__ staticRenderFns: __vue_staticRenderFns__
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
PicaH5Agreement.install = function (Vue) { __vue_component__.install = function (Vue) {
Vue.component(PicaH5Agreement.name, PicaH5Agreement); Vue.component(__vue_component__.name, __vue_component__);
}; };
module.exports = PicaH5Agreement; module.exports = __vue_component__;
{ {
"name": "pica-h5-agreement", "name": "pica-h5-agreement",
"version": "1.0.4", "version": "1.0.6",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
...@@ -930,9 +930,9 @@ ...@@ -930,9 +930,9 @@
} }
}, },
"@vue/component-compiler": { "@vue/component-compiler": {
"version": "4.1.0", "version": "4.2.0",
"resolved": "http://192.168.110.93:4873/@vue%2fcomponent-compiler/-/component-compiler-4.1.0.tgz", "resolved": "http://192.168.110.93:4873/@vue%2fcomponent-compiler/-/component-compiler-4.2.0.tgz",
"integrity": "sha512-20S7mm7CYP94m2Morw2ftz1tqoBu1nX7KYiqo5rlgKPZ0dlY7VZX7wAL/etN3s4HD0PBeenr1pUUCBIgGSaB2g==", "integrity": "sha512-bxFNxUpKzLfHDoGTsAe2w7gEz4OwII7tp5m7sAXES1DApbpYglH4YSpYxdZRZ4GN/wj2fPD0u72QRJXd4UPvFQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@vue/component-compiler-utils": "^3.0.0", "@vue/component-compiler-utils": "^3.0.0",
...@@ -6110,12 +6110,12 @@ ...@@ -6110,12 +6110,12 @@
} }
}, },
"rollup-plugin-vue": { "rollup-plugin-vue": {
"version": "5.1.1", "version": "5.0.0",
"resolved": "http://192.168.110.93:4873/rollup-plugin-vue/-/rollup-plugin-vue-5.1.1.tgz", "resolved": "http://192.168.110.93:4873/rollup-plugin-vue/-/rollup-plugin-vue-5.0.0.tgz",
"integrity": "sha512-lSIiiaNfwOWpbAN7Z1ZQzY0WUIa6+6cVopZrICBlrSKqGpmlkHm2+cgCtv1PsY5EkR0ZasHoeNNQn5b2B8HvkA==", "integrity": "sha1-nGDTIkzXsK0bGpIiWCZiyCKrj4U=",
"dev": true, "dev": true,
"requires": { "requires": {
"@vue/component-compiler": "^4.1.0", "@vue/component-compiler": "^4.0.0",
"@vue/component-compiler-utils": "^3.0.0", "@vue/component-compiler-utils": "^3.0.0",
"debug": "^4.1.1", "debug": "^4.1.1",
"hash-sum": "^1.0.2", "hash-sum": "^1.0.2",
...@@ -6123,7 +6123,7 @@ ...@@ -6123,7 +6123,7 @@
"querystring": "^0.2.0", "querystring": "^0.2.0",
"rollup-pluginutils": "^2.4.1", "rollup-pluginutils": "^2.4.1",
"source-map": "0.7.3", "source-map": "0.7.3",
"vue-runtime-helpers": "^1.1.1" "vue-runtime-helpers": "1.0.0"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
...@@ -6178,9 +6178,9 @@ ...@@ -6178,9 +6178,9 @@
"optional": true "optional": true
}, },
"sass": { "sass": {
"version": "1.23.3", "version": "1.23.7",
"resolved": "http://192.168.110.93:4873/sass/-/sass-1.23.3.tgz", "resolved": "http://192.168.110.93:4873/sass/-/sass-1.23.7.tgz",
"integrity": "sha512-1DKRZxJMOh4Bme16AbWTyYeJAjTlrvw2+fWshHHaepeJfGq2soFZTnt0YhWit+bohtDu4LdyPoEj6VFD4APHog==", "integrity": "sha512-cYgc0fanwIpi0rXisGxl+/wadVQ/HX3RhpdRcjLdj2o2ye/sxUTpAxIhbmJy3PLQgRFbf6Pn8Jsrta2vdXcoOQ==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
...@@ -6951,9 +6951,9 @@ ...@@ -6951,9 +6951,9 @@
"dev": true "dev": true
}, },
"vue-runtime-helpers": { "vue-runtime-helpers": {
"version": "1.1.2", "version": "1.0.0",
"resolved": "http://192.168.110.93:4873/vue-runtime-helpers/-/vue-runtime-helpers-1.1.2.tgz", "resolved": "http://192.168.110.93:4873/vue-runtime-helpers/-/vue-runtime-helpers-1.0.0.tgz",
"integrity": "sha512-pZfGp+PW/IXEOyETE09xQHR1CKkR9HfHZdnMD/FVLUNI+HxYTa82evx5WrF6Kz4s82qtqHvMZ8MZpbk2zT2E1Q==", "integrity": "sha512-DgwCNgIXkq1GJsWwtFOjA/K2nxpjyon/QqAut0EiwrMHBatAPbfdqksDdRoK15b5YrSJRa59rx3pc0L6V4udUA==",
"dev": true "dev": true
}, },
"vue-template-compiler": { "vue-template-compiler": {
......
{ {
"name": "pica-h5-agreement", "name": "pica-h5-agreement",
"version": "1.0.6", "version": "1.0.9",
"description": "vue h5 agreement component", "description": "vue h5 agreement component",
"author": "pica", "author": "pica",
"private": false, "private": false,
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
"rollup-plugin-postcss": "^2.0.3", "rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-terser": "^4.0.1", "rollup-plugin-terser": "^4.0.1",
"rollup-plugin-url": "^2.2.1", "rollup-plugin-url": "^2.2.1",
"rollup-plugin-vue": "^5.1.1", "rollup-plugin-vue": "^5.0.0",
"vue": "^2.5.17", "vue": "^2.5.17",
"vue-template-compiler": "^2.5.17" "vue-template-compiler": "^2.5.17"
}, },
......
...@@ -9,6 +9,7 @@ import pxtorem from 'postcss-pxtorem'; ...@@ -9,6 +9,7 @@ import pxtorem from 'postcss-pxtorem';
import postcss from 'rollup-plugin-postcss'; import postcss from 'rollup-plugin-postcss';
import url from 'postcss-url'; import url from 'postcss-url';
import purl from "rollup-plugin-url" import purl from "rollup-plugin-url"
import json from 'rollup-plugin-json';
export default { export default {
input: './index.js', input: './index.js',
...@@ -45,10 +46,12 @@ export default { ...@@ -45,10 +46,12 @@ export default {
}), }),
babel({ babel({
runtimeHelpers: true, runtimeHelpers: true,
// sourceMap: false, sourceMap: false,
extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.vue'] extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.vue'],
exclude: 'node_modules/**' // 只编译我们的源代码
}), }),
resolve(), resolve(),
commonjs() commonjs(),
json()
] ]
}; };
\ No newline at end of file
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
}) })
}, },
gotoAgreement() { //https://dev-scale.yunqueyi.com gotoAgreement() { //https://dev-scale.yunqueyi.com
window.location.href = `${this.agreementPageUrl}/loginAgreement?token=${this.agreementToken}&pageUrl=${window.location.href}`; window.location.href = `${this.agreementPageUrl}/loginAgreement?agreementToken=${this.agreementToken}&pageUrl=${window.location.href}`;
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册