Commit f50543b3 Harvey

no message

1 个父辈 3dd8211d
//const baseUrl = 'https://app.ydniu.com/graphql' //const baseUrl = 'https://app.ydniu.com/graphql'
//const baseUrl = '/test_graphql' const baseUrl = '/test_graphql'
const baseUrl = '/graphql' //const baseUrl = '/graphql'
function request(options = {}) { function request(options = {}) {
let header = Object.assign({ let header = Object.assign({
"Accept": "application/json" "Accept": "application/json",
"ydn-cookie":'connect.sid=s%3AXYMD32sp1XaZ80WfkFHUCXY3TWDWwVFS.8vXF9rK5dFqcejYW6J15Gu%2F1woUNKrBTIwWKizrcA20'
}, options.header) }, options.header)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -53,10 +54,14 @@ async function graphql(options = {}) { ...@@ -53,10 +54,14 @@ async function graphql(options = {}) {
res = res.data.data[opts.name] res = res.data.data[opts.name]
if (res.Error == '未登录') { if (res.Error == '未登录') {
uni.navigateTo({ try{
url: `/login?from=${encodeURIComponent(getCurrentPages()[0].__page__.fullPath)}` Android.webGoBack("")
}) }catch(e){
uni.navigateTo({
url: `/login?from=${encodeURIComponent(getCurrentPages()[0].__page__.fullPath)}`
})
}
return return
} }
......
...@@ -14,17 +14,17 @@ ...@@ -14,17 +14,17 @@
"name": "center", "name": "center",
"style": { "style": {
"navigationBarTitleText": "用户中心", "navigationBarTitleText": "用户中心",
"navigationStyle": "default" "navigationStyle": "default",
"navigationBarBackgroundColor":"#F1F1F1"
} }
}, },
{ {
"path": "pages/tv/list", "path": "pages/tv/list",
"aliasPath": "/tv/list", "aliasPath": "/tv/list",
"name": "tv_list", "name": "tv_list",
"desc": "彩店走势图",
"style": { "style": {
"navigationBarTitleText": "彩店走势图", "navigationBarTitleText": "彩店走势图",
"navigationStyle": "custom" "navigationStyle": "default"
} }
}, },
{ {
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
name: 'lottery_shop_get_my_shop_info' name: 'lottery_shop_get_my_shop_info'
}) })
if (!(res && res.length > 1)) return if (!(res && res.length > 0)) return
const data = res[0]
this.data = res[0] this.data.addr = data.addr
}, },
methods: { methods: {
......
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('@/static/font/uni.ttf') format('truetype');
}
.uni-font {
font-family: uniicons;
font-size: 24px;
font-weight: normal;
font-style: normal;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
}
\ No newline at end of file \ No newline at end of file
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!