diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 1bef9a7..9bae9a3 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -16,7 +16,7 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.1.12:4601', + // baseUrl: 'http://192.168.1.5:4601', // baseUrl: 'http://192.168.2.75:4601', baseUrl: 'https://fd.ccttiot.com/prod-api', loadingText: '努力加载中~', diff --git a/page_user/daolan.vue b/page_user/daolan.vue index 331e6ae..19fd154 100644 --- a/page_user/daolan.vue +++ b/page_user/daolan.vue @@ -3,7 +3,7 @@ - + diff --git a/page_user/sousuo/index.vue b/page_user/sousuo/index.vue new file mode 100644 index 0000000..11148af --- /dev/null +++ b/page_user/sousuo/index.vue @@ -0,0 +1,338 @@ + + + + + \ No newline at end of file diff --git a/page_user/sousuo/sousuocont.vue b/page_user/sousuo/sousuocont.vue new file mode 100644 index 0000000..ada9c58 --- /dev/null +++ b/page_user/sousuo/sousuocont.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 02d2500..0c61831 100644 --- a/pages.json +++ b/pages.json @@ -76,6 +76,20 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } + },{ + "path": "sousuo/index", + "style": { + "navigationBarTitleText": "上传", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + },{ + "path": "sousuo/sousuocont", + "style": { + "navigationBarTitleText": "上传", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } },{ "path": "daolan", "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 6952cb6..2bd0694 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -10,15 +10,15 @@ - + - + @@ -58,7 +58,7 @@ - + @@ -75,10 +75,10 @@ :scroll-with-animation="true" show-scrollbar="false"> - + @@ -306,6 +306,7 @@ } }, onLoad() { + this.getinfo() this.gethome() this.getlunbo() this.addRandomData() @@ -413,6 +414,42 @@ } }, methods: { + // 点击进行搜索 + btnsousuo(){ + uni.navigateTo({ + url:'/page_user/sousuo/index' + }) + }, + // 请求个人信息 + getinfo(){ + this.$u.get("/getInfo").then(res =>{ + if(res.code == 200){ + + }else if(res.code == 401){ + this.getlogo() + } + }) + }, + // 静默登录 + getlogo(){ + let taht = this + wx.login({ + success(res) { + if (res.code) { + let data = { + loginCode: res.code, + appId:taht.$store.state.appid + } + taht.$u.post('/wxLogin', data).then(res => { + if (res.code == 200) { + uni.setStorageSync('token', res.token) + taht.getinfo() + } + }) + } + }, + }) + }, // 请求首页景区 gethome(){ this.$u.get(`/app/home`).then(res =>{ diff --git a/pages/myorder/returned/index.vue b/pages/myorder/returned/index.vue index 625d94b..74ddda9 100644 --- a/pages/myorder/returned/index.vue +++ b/pages/myorder/returned/index.vue @@ -469,8 +469,9 @@ } else { console.error('WebSocket重连次数已达上限,停止重连') uni.showToast({ - title: '网络连接异常', - icon: 'none' + title: '建立连接异常', + icon: 'none', + duration:3000 }) } },