1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{"1bfe":function(e,t,r){"use strict";var n=r("8402"),o=r.n(n);o.a},"1da1":function(e,t,r){"use strict";function n(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function u(e){n(i,o,a,u,c,"next",e)}function c(e){n(i,o,a,u,c,"throw",e)}u(void 0)}))}}r("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},"308f":function(e,t,r){"use strict";var n=r("4ea4");r("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r("96cf");var o=n(r("1da1")),a=(n(r("e143")),n(r("dcb3"))),i=(0,a.default)({timeout:123456,baseURL:"http://api.app.cliu.cc/api",header:{"content-type":"application/json"}});function u(e,t){return new Promise((function(e,r){uni.login({success:function(r){var n=r.code;wx.getLocation({success:function(r){var o=r.latitude,a=r.longitude;wecatLogin({openid:"",avatar:uni.getStorageSync("userInfo").avatar,nickname:uni.getStorageSync("userInfo").nickname,code:n,longitude:a,latitude:o}).then((function(r){200==r.code&&(uni.setStorageSync("token",r.data.token),i.get(t).then((function(r){200==r.code&&("/user/get_info"==t&&uni.setStorageSync("userInfo",r.data),e(r))}))),300==r.code&&uni.switchTab({url:"../index/index?isPhone="+!0})})).catch((function(e){}))},fail:function(e){uni.showModal({content:"不授权将无法获取到您的位置信息",showCancel:!1})}})}})}))}i.interceptors.request.use((function(e){return uni.showLoading({title:"加载中",mask:!0}),e.header.Authorization="Bearer "+uni.getStorageSync("token"),e})),i.interceptors.response.use(function(){var e=(0,o.default)(regeneratorRuntime.mark((function e(t){var r=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(uni.hideLoading(),5e4!==t.data.code||!uni.getStorageSync("userInfo")){e.next=8;break}return e.next=4,u(t,r.length<=2?void 0:r[2]);case 4:return t=e.sent,e.abrupt("return",t);case 8:if(5e4!==t.data.code||uni.getStorageSync("userInfo")){e.next=13;break}uni.removeStorageSync("token"),uni.switchTab({url:"/pages/index/index"}),e.next=18;break;case 13:if(200!==t.data.code&&300!==t.data.code){e.next=17;break}return e.abrupt("return",t);case 17:return e.abrupt("return",t);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),i.onerror=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.log(t),uni.hideLoading(),uni.showModal({title:"请求失败",content:"网络出错",showCancel:!1}),Promise.reject(t)};var c=i;t.default=c},5449:function(e,t,r){"use strict";r.r(t);var n=r("f5ac"),o=r("9e90");for(var a in o)"default"!==a&&function(e){r.d(t,e,(function(){return o[e]}))}(a);r("1bfe");var i,u=r("f0c5"),c=Object(u["a"])(o["default"],n["b"],n["c"],!1,null,"65160754",null,!1,n["a"],i);t["default"]=c.exports},"5abd":function(e,t,r){"use strict";var n=r("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.getOpenId=void 0;var o=n(r("308f")),a=function(e){return o.default.get("/login/get_openid",e)};t.getOpenId=a},8402:function(e,t,r){var n=r("b2a1");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=r("4f06").default;o("ae656966",n,!0,{sourceMap:!1,shadowMode:!1})},9092:function(e,t,r){"use strict";r("99af"),r("4d63"),r("ac1f"),r("25f0"),r("466d"),r("841c"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;r("5abd");var n={data:function(){return{}},onLoad:function(){var e=window.location.href,t=this.getUrlParam("code");if(t)window.location="http://fangw.jiuweiyun.cn/api/scan/scancode?id="+t;else{var r="wx5224793b7dc7f7b7",n=encodeURIComponent(e),o="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".concat(r,"&redirect_uri=").concat(n,"&response_type=code&scope=snsapi_base&state=123#wechat_redirect");window.location.href=o}},methods:{getToken:function(e){},toWxchatLogin:function(e,t){e=e||"/pages/index/index",t=t||"cli";var r="https://open.weixin.qq.com/connect/oauth2/authorize",n="wx5224793b7dc7f7b7",o=encodeURIComponent("http://fangw.jiuweiyun.cn/api/scanCode#".concat(e));console.log(o);var a=function(){return window.location.href="".concat(r,"?appid=").concat(n,"&redirect_uri=").concat(o,"&response_type=code&scope=snsapi_userinfo&state=").concat(t,"#wechat_redirect")};a()},getUrlParam:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=window.location.search.substr(1).match(t);return null!=r?decodeURIComponent(r[2]):null}}};t.default=n},"96cf":function(e,t){!function(t){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",s="object"===typeof e,f=t.regeneratorRuntime;if(f)s&&(e.exports=f);else{f=t.regeneratorRuntime=s?e.exports:{},f.wrap=b;var l="suspendedStart",d="suspendedYield",h="executing",p="completed",v={},g={};g[i]=function(){return this};var w=Object.getPrototypeOf,m=w&&w(w(q([])));m&&m!==n&&o.call(m,i)&&(g=m);var y=R.prototype=k.prototype=Object.create(g);L.prototype=y.constructor=R,R.constructor=L,R[c]=L.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===L||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,R):(e.__proto__=R,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(y),e},f.awrap=function(e){return{__await:e}},_(E.prototype),E.prototype[u]=function(){return this},f.AsyncIterator=E,f.async=function(e,t,r,n){var o=new E(b(e,t,r,n));return f.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},_(y),y[c]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){while(t.length){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},f.values=q,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return u.type="throw",u.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:q(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function b(e,t,r,n){var o=t&&t.prototype instanceof k?t:k,a=Object.create(o.prototype),i=new T(n||[]);return a._invoke=P(e,r,i),a}function x(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function k(){}function L(){}function R(){}function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function E(e){function t(r,n,a,i){var u=x(e[r],e,n);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"===typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then((function(e){t("next",e,a,i)}),(function(e){t("throw",e,a,i)})):Promise.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return t("throw",e,a,i)}))}i(u.arg)}var r;function n(e,n){function o(){return new Promise((function(r,o){t(e,n,r,o)}))}return r=r?r.then(o,o):o()}this._invoke=n}function P(e,t,r){var n=l;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw a;return C()}r.method=o,r.arg=a;while(1){var i=r.delegate;if(i){var u=S(i,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=x(e,t,r);if("normal"===c.type){if(n=r.done?p:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}function S(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,S(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,v):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function q(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){while(++n<e.length)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:r,done:!0}}}(function(){return this||"object"===typeof self&&self}()||Function("return this")())},"9e90":function(e,t,r){"use strict";r.r(t);var n=r("9092"),o=r.n(n);for(var a in n)"default"!==a&&function(e){r.d(t,e,(function(){return n[e]}))}(a);t["default"]=o.a},b2a1:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.loginBtn[data-v-65160754]{width:%?530?%;height:%?88?%;line-height:%?88?%;text-align:center;margin:0 auto;background:-webkit-linear-gradient(357deg,#a080ff,#5d6bff);background:linear-gradient(93deg,#a080ff,#5d6bff);opacity:1;border-radius:%?44?%;font-size:%?30?%;color:#fff;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}',""]),e.exports=t},dcb3:function(e,t,r){"use strict";var n=r("4ea4");r("d3b7"),r("5d41"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(r("5530"));r("96cf");var a=n(r("1da1"));function i(e){var t=e.baseURL,r=e.timeout,n=e.header;return{get:function(e,t){return this.request("GET",e,t)},post:function(e,t){return this.request("POST",e,t)},put:function(e,t){return this.request("PUT",e,t)},delete:function(e,t){return this.request("DELETE",e,t)},connect:function(e,t){return this.request("CONNECT",e,t)},head:function(e,t){return this.request("HEAD",e,t)},options:function(e,t){return this.request("OPTIONS",e,t)},reace:function(e,t){return this.request("TRACE",e,t)},uploadFile:function(e,t){return this.file("uploadFile",e,t||{})},downloadFile:function(e,t){return this.file("downloadFile",e,t||{})},onerror:[],file:function(e,n,i){var u,c,s,f=this,l=!1,d=function(){l=!0,c&&c.abort()},h=function(e){return s=e};return new Proxy(new Promise((function(d,h){f.interceptors.request.intercept({header:i.header||{},body:i.formData||{}},e,n,i).then(function(){var p=(0,a.default)(regeneratorRuntime.mark((function p(v){var g,w;return regeneratorRuntime.wrap((function(p){while(1)switch(p.prev=p.next){case 0:if(g=v.header,w=v.body,!l){p.next=5;break}return p.next=4,f.onerror(e,n,i,"网络请求失败:主动取消");case 4:return p.abrupt("return",h("网络请求失败:主动取消"));case 5:c=uni[e]({url:"/"===n[0]?t+n:n,name:i.name,header:g,filePath:i.filePath,formData:w,success:function(){var t=(0,a.default)(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(clearTimeout(u),200===r.statusCode){t.next=6;break}return t.next=4,f.onerror(e,n,i,"网络请求异常:服务器响应异常:状态码:".concat(r.statusCode));case 4:t.next=7;break;case 6:case 7:f.interceptors.response.intercept(200===r.statusCode?d:h,(0,o.default)({success:200===r.statusCode},r),e,n,i);case 8:case"end":return t.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}(),fail:function(){var t=(0,a.default)(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return clearTimeout(u),t.next=3,f.onerror(e,n,i,l?"网络请求失败:主动取消":"网络请求失败:(URL无效|无网络|DNS解析失败)");case 3:h(l?"网络请求失败:主动取消":"网络请求失败:(URL无效|无网络|DNS解析失败)");case 4:case"end":return t.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()}),c.onProgressUpdate(s),u=setTimeout((0,a.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return c.abort(),t.next=3,f.onerror(e,n,i,"网络请求失败:超时取消");case 3:h("网络请求时间超时");case 4:case"end":return t.stop()}}),t)}))),r||12345);case 8:case"end":return p.stop()}}),p)})));return function(e){return p.apply(this,arguments)}}())})),{get:function(e,t){return"abort"===t?d:"onProgressUpdate"===t?h:Reflect.get(e,t).bind(e)}})},request:function(e,i,u){var c,s,f=this,l=!1,d=function(){l=!0,s&&s.abort()};return new Proxy(new Promise((function(d,h){f.interceptors.request.intercept({header:n||{},body:u||{}},e,i,u).then(function(){var n=(0,a.default)(regeneratorRuntime.mark((function n(u){var p,v;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(p=u.header,v=u.body,!l){n.next=5;break}return n.next=4,f.onerror(e,i,v,"网络请求失败:主动取消");case 4:return n.abrupt("return",h("网络请求失败:主动取消"));case 5:s=uni.request({url:"/"===i[0]?t+i:i,data:v,method:e,header:p,success:function(){var t=(0,a.default)(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(clearTimeout(c),200===r.statusCode){t.next=6;break}return t.next=4,f.onerror(e,i,v,"网络请求异常:服务器响应异常:状态码:".concat(r.statusCode));case 4:t.next=7;break;case 6:case 7:f.interceptors.response.intercept(200===r.statusCode?d:h,(0,o.default)({success:200===r.statusCode},r),e,i,v);case 8:case"end":return t.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}(),fail:function(){var t=(0,a.default)(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return clearTimeout(c),t.next=3,f.onerror(e,i,v,l?"网络请求失败:主动取消":"网络请求失败:(URL无效|无网络|DNS解析失败)");case 3:h(l?"网络请求失败:主动取消":"网络请求失败:(URL无效|无网络|DNS解析失败)");case 4:case"end":return t.stop()}}),t)})));function r(e){return t.apply(this,arguments)}return r}()}),c=setTimeout((0,a.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return s.abort(),t.next=3,f.onerror(e,i,v,"网络请求失败:超时取消");case 3:h("网络请求时间超时");case 4:case"end":return t.stop()}}),t)}))),r||12345);case 7:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())})),{get:function(e,t){return"abort"===t?d:Reflect.get(e,t).bind(e)}})},interceptors:{request:{interceptors:[],use:function(e){this.interceptors.push(e)},intercept:function(e,t,r,n){var o=this;return(0,a.default)(regeneratorRuntime.mark((function a(){var i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:i=0;case 1:if(!(i<o.interceptors.length)){a.next=8;break}return a.next=4,o.interceptors[i](e,t,r,n);case 4:e=a.sent;case 5:i++,a.next=1;break;case 8:return a.abrupt("return",e);case 9:case"end":return a.stop()}}),a)})))()}},response:{interceptors:[],use:function(e){this.interceptors.push(e)},intercept:function(e,t,r,n,o){var i=this;return(0,a.default)(regeneratorRuntime.mark((function a(){var u;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:u=0;case 1:if(!(u<i.interceptors.length)){a.next=8;break}return a.next=4,i.interceptors[u](t,r,n,o);case 4:t=a.sent;case 5:u++,a.next=1;break;case 8:if(!t.success){a.next=18;break}return a.prev=9,a.abrupt("return",e("string"===typeof t.data?JSON.parse(t.data):t.data));case 13:return a.prev=13,a.t0=a["catch"](9),a.abrupt("return",e(t.data));case 16:a.next=20;break;case 18:return delete t.success,a.abrupt("return",e(t,r,n,o));case 20:case"end":return a.stop()}}),a,null,[[9,13]])})))()}}}}}},f5ac:function(e,t,r){"use strict";var n;r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return n}));var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-uni-view",[r("v-uni-view",{staticClass:"loginBtn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.login.apply(void 0,arguments)}}},[e._v("登录")])],1)},a=[]}}]);
|