| title | 淘宝天猫的单点登陆如何做到的? |
|---|
在开始之前我就在 login.taobao.com 登陆了自己的淘宝账户
之后打开 tmall 看
淘宝将认证 token 存放在 taobao.com 域名下
| Uncaught TypeError: $(...).splitPane is not a function | |
| at eval (main.ts:11) | |
| at Object../src/main.ts (main.js:formatted:295) | |
| at __webpack_require__ (main.js:formatted:37) | |
| at main.js:formatted:181 | |
| at main.js:formatted:186 |
| 'use strict' | |
| import { config, edit } from 'ace-builds' | |
| import store from './store' | |
| import Vue from 'vue' | |
| import eventBus from './eventbus.js' | |
| class IDE { | |
| constructor (id) { | |
| config.set('basePath', 'static/js/ace') | |
| this.aceEditor = edit(id) | |
| this.aceSession = this.aceEditor.session |
| FROM debian:jessie-20180831 as builder | |
| ENV BUILD_DEPS "curl git" | |
| ENV CGO_ENABLED=0 | |
| # install golang | |
| ENV GOLANG_VERSION 1.11.1 | |
| RUN apt-get update && apt-get install wget git ca-certificates -y --no-install-recommends;\ | |
| wget -O go.tgz https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz > /dev/null;\ | |
| tar -C /usr/local -xzf go.tgz > /dev/null;\ | |
| rm go.tgz; \ |
| const cheerio = require('cheerio') | |
| const { promises: fs } = require('fs') | |
| const axios = require('axios').default.create({ | |
| proxy: false, | |
| headers: { | |
| 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36', | |
| 'Referer': 'https://book.douban.com/subject/1322455/comments/hot?p=3', | |
| 'Accept': 'application/json, text/javascript, */*; q=0.01', | |
| 'Accept-Encoding': 'gzip, deflate, br', | |
| 'Host': 'book.douban.com', |
| ! function (e) { | |
| var t = {}; | |
| function n(r) { | |
| if (t[r]) return t[r].exports; | |
| var u = t[r] = { | |
| i: r, | |
| l: !1, | |
| exports: {} | |
| }; |
| [{ | |
| "type": "k", | |
| "z": "eJzVVs1y2zYQfpUd9tKOqUSSZcfRqbbsJnZtxzGd5hBlMhAJkYhJgAZAyazrezvTJ+iz5J3yCv0ASJTiyaHX2kP87C4Wu9/+QB8eItvWPBpHt1GMb/wQpdF4GEfpMhp/2N0fxbu7o49xlGH3oR/34+g9F5OCKXrfTOVUngnJJL2TYsG1EbalRmZc55plDbPcSUzlK2GLZjYmyv3iWaqq54JVy2XquEelyr9++YdSKHVfznPuRBzvSqvPPLVT+UaWQvJUZXy9JrfBUNWi5Hoq353SUgtruaSjln5rOJ0ZYjKjk5JXXNp3p7iKpbcnIG0JvlIxNYbTsUpvuSarSBhVwnTSjbSi4sTlQmglnY6pvGiTt+c0UdIy2KCpUpDiGR0zy2YMeqDgtTKQvG6kE9iIplhpVa5vOma8UnDxpuAaTh1KwgrX1WoJQuZse83vFZ0lU/l+Ze+spasmP0u8X8kkSajWvNYq5cYo7eDiC8GXU1lYW5vx8+ffw/RNzfGZqTythHWO2gK3anXfwnjYt9xcthhq1jp8hMy92FzpitSc6rLJe0LGVCqWrZma3zXCmQ5lVqVQxdJU6cBXXgQYzEXeaGaFkjRH5EDWqsmLDm7N5yVCDv4zBBWIHp4kn15NLj4NhgfEDMKR6rb251mZKxhbwK2jRpQWFlECdM3elglASlhDailJ1aZjTGWVXW2QO7w6JcP1QqTczwgQfCUDgERKSz5DbnPKOQLJrDvgLszchQ4KTKY1llcxbCppzpltNIet9wAyc0gGKYB+zVlGmi2pYvo2g1Uh/VAwba9iAF7TKqAUtjjzKlzL1+YUtipXQXFaeDaVCYzi/vIa2WdISCB+oWSujo+m8uQeVE5vG65bcq6Gw78qNgwV6nLCOOSABF11uWC2k8FVSs20FawkUdWhqkIgkREuuk+xd5pR5L3GitKMsTWq8iWLxCdHdP1i3kgfbUOlmGmm269f/sz4DHWV8thnh7UlVsJMSm |
| let b = Function.prototype.bind | |
| Function.prototype.bind = Function.prototype.bind || function bind(ctx) { | |
| let that = this | |
| let slice = Array.prototype.slice | |
| let bindArgs = slice.call(arguments,1) | |
| // bind可以传递参数,返回的被绑定的函数同样可以传参,所以这里先保存第一次bind的参数,忽略ctx,从 index 1 开始 | |
| // 后面将调用时的参数传递进去,concat成一个array | |
| return function b(args) { | |
| // slice.call 将 arguments 转换为 Array | |
| that.apply(ctx,bindArgs.concat(slice.call(arguments))) |
| ;(function(){ | |
| const match = /(=g[^=]*=)*/g | |
| function transform(s) { | |
| /* code */ | |
| let res = s.match(match) | |
| return Object.keys(res).reduce((prev,next) => { | |
| let curr = res[next] | |
| if(curr){ | |
| prev.push(`<g>${curr.substring(2,curr.length - 1)}</g>`) | |
| } |
| title | 淘宝天猫的单点登陆如何做到的? |
|---|
在开始之前我就在 login.taobao.com 登陆了自己的淘宝账户
之后打开 tmall 看
淘宝将认证 token 存放在 taobao.com 域名下
| import React, { Component } from 'react'; | |
| import { Output, Switch, Button } from './widgets' | |
| import evernote from '@/static/evernote.png' | |
| import '@/src/assets/scss/switch.scss' | |
| function apiFetch(url) { | |
| let xhr = new XMLHttpRequest() | |
| xhr.open('GET', url, true) | |
| return function send(data) { | |
| xhr.send(data) |