diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index ee5be77..07d9281 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -1,20 +1,23 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
- // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
- "version": "0.0",
- "configurations": [{
- "app-plus" :
- {
- "launchtype" : "local"
- },
- "default" :
- {
- "launchtype" : "local"
- },
- "mp-weixin" :
- {
- "launchtype" : "local"
- },
- "type" : "uniCloud"
- }
+{
+ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+ // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+ "version" : "0.0",
+ "configurations" : [
+ {
+ "app-plus" : {
+ "launchtype" : "local"
+ },
+ "default" : {
+ "launchtype" : "local"
+ },
+ "mp-weixin" : {
+ "launchtype" : "local"
+ },
+ "type" : "uniCloud"
+ },
+ {
+ "playground" : "standard",
+ "type" : "uni-app:app-android"
+ }
]
}
diff --git a/common/api.js b/common/api.js
index 28dfaeb..c3cfca2 100644
--- a/common/api.js
+++ b/common/api.js
@@ -40,6 +40,8 @@ export const addShare = (params, config = {}) => http.post('/wx_article_share/ad
export const logout = (params, config = {custom: { auth: true }}) => http.post('/user/logout', params, config);
//文章列表
export const articalList = (params, config = {}) => http.post('/wx_article/index', params, config);
+//获取菜单下栏目
+export const getNavList = (params, config = {}) => http.get('/wx_menu/nav', {params}, config);
diff --git a/common/auth.js b/common/auth.js
index 56bcd22..964baac 100644
--- a/common/auth.js
+++ b/common/auth.js
@@ -44,7 +44,8 @@ export function getUserInfo() {
* 删除用户相关缓存信息
*/
export function removeAll() {
- uni.removeStorageSync(USER_TOKEN)
+ uni.clearStorageSync()
+ uni.removeStorage(USER_TOKEN)
uni.removeStorageSync(USER_INFO)
}
diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index 95c75d9..b6d0e7c 100644
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -1,42 +1,65 @@
-
-
-
-
-
- 详情
+
+
+
+
+
+
+
+
+ 详情
+
+
+
+
+
+
+
+ {{titleInfo.title}}
+ {{titleInfo.sectitle}}
+
+
+
+
+ {{item.name}}
+
-
-
-
- {{titleInfo.title}}
-
-
-
- {{titleInfo.updatetime}}
+
+
+ {{activeText}}
-
-
-
-
- 收藏
+
+
+ {{titleInfo.updatetime}}
-
-
- 分享
+
+
+
+
+ 收藏
+
+
+
+ 分享
+
+
-
+
+
@@ -51,26 +74,47 @@
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 17efb04..78f3a90 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -33,7 +33,7 @@
-
+
@@ -88,6 +88,7 @@
// #endif
},
click(name) {
+ console.log(name)
uni.navigateTo({
url:'/pages/index/searchPage?id='+name.id+'&typedata='+name.typedata
})
@@ -98,9 +99,10 @@
})
},
godetails(item){
+ console.log(item,"000")
uni.navigateTo({
// url:'/pages/detail/detail?id='+item.id
- url:'/pages/detail/detail?id='+item.wx_category_id
+ url:'/pages/detail/detail?id='+item.wx_category_id+'&menu_id='+item.wxcategory.wx_menu_id+'&logo='+item.wxcategory.logo
})
},
getFormatDate(time) {
@@ -208,6 +210,7 @@
overflow: hidden;
&>image{
width:100%;
+ height:100%;
}
}
.right{
diff --git a/pages/index/searchPage.vue b/pages/index/searchPage.vue
index 026a4cc..b6e4bdf 100644
--- a/pages/index/searchPage.vue
+++ b/pages/index/searchPage.vue
@@ -60,10 +60,10 @@
-
+
{{item.name}}
- Massachusetts Institute of Technology
+
{{item.subName}}
@@ -115,14 +115,16 @@ export default{
methods:{
getContent(val){
this.catagoryName = val;
- this.page=1
+ this.page=1;
+ this.contentList = []
this.getListData(this.catagoryId)
},
searchHandle(){
- this.page=1
+ this.page=1;
+ this.contentList = []
this.getListData(this.catagoryId)
},
- getListData(id){
+ getListData(id,isAdd){
let params={
wx_menu_id:id,
typedata:this.typedata,
@@ -141,40 +143,13 @@ export default{
}).then(res=>{
if(res.searchList.length==0){
this.noSearch = true;
- this.contentList = res.rows
- }else{
- this.tagList = res.searchList
- this.noSearch = false;
- this.contentList = res.rows;
- this.originListRow = res.rows;
- this.total = res.total;
- this.contentList.forEach(item=>{
- let subobj = res.searchList.filter(i=>{
- return item.wx_category_id==i.id
- })
- this.$set(item,'subName',subobj[0].name)
- })
- }
- })
- },
- getListData1(id){
- let params={
- wx_menu_id:id,
- typedata:this.typedata,
- name:this.catagoryName,
- page:this.page,
- limit:this.limit,
- wx_category_id:this.wx_category_id
- }
- listData(params).then(res=>{
- if(res.searchList.length==0){
- this.noSearch = true;
- this.contentList = res.rows
+ this.contentList.push(...res.rows)
}else{
this.tagList = res.searchList
this.noSearch = false;
this.contentList.push(...res.rows);
this.originListRow = res.rows;
+ this.total = res.total;
this.contentList.forEach(item=>{
let subobj = res.searchList.filter(i=>{
return item.wx_category_id==i.id
@@ -184,8 +159,36 @@ export default{
}
})
},
+ // getListData1(id){
+ // let params={
+ // wx_menu_id:id,
+ // typedata:this.typedata,
+ // name:this.catagoryName,
+ // page:this.page,
+ // limit:this.limit,
+ // wx_category_id:this.wx_category_id
+ // }
+ // listData(params).then(res=>{
+ // if(res.searchList.length==0){
+ // this.noSearch = true;
+ // this.contentList = res.rows
+ // }else{
+ // this.tagList = res.searchList
+ // this.noSearch = false;
+ // this.contentList.push(...res.rows);
+ // this.originListRow = res.rows;
+ // this.contentList.forEach(item=>{
+ // let subobj = res.searchList.filter(i=>{
+ // return item.wx_category_id==i.id
+ // })
+ // this.$set(item,'subName',subobj[0].name)
+ // })
+ // }
+ // })
+ // },
clickSearchItem(item,index){
console.log(item,index,"--==")
+ this.contentList = []
this.page = 1
if(this.active==index){
this.options[0].header = '国家地区选择'
@@ -218,8 +221,9 @@ export default{
},
goNextSection(item){
+ console.log(item,"iii")
uni.navigateTo({
- url:'/pages/detail/detail?id='+item.id
+ url:'/pages/detail/detail?id='+item.id+'&menu_id='+this.catagoryId+'&logo='+item.logo
// url:'/pages/detail/detail?id='+item.wx_category_id
})
}
@@ -228,7 +232,7 @@ export default{
console.log('已触底');
if(this.contentList.length
+
{{item.wxcategory.name}}
@@ -39,7 +40,7 @@ export default{
godetails(item){
uni.navigateTo({
// url:'/pages/detail/detail?id='+item.id
- url:'/pages/detail/detail?id='+item.wx_category_id
+ url:'/pages/detail/detail?id='+item.wx_category_id+'&menu_id='+item.wxcategory.wx_menu_id+'&logo='+item.wxcategory.logo
})
},
collectRecord(){
@@ -73,6 +74,14 @@ export default{
padding:29upx 22upx;
background-color: #ffffff;
margin-bottom:20upx;
+ display: flex;
+ align-items: center;
+ image{
+ width:120upx;
+ height:120upx;
+ border-radius:50%;
+ margin-right:20upx;
+ }
}
}
.empty{
diff --git a/pages/my/look.vue b/pages/my/look.vue
index a0566b6..b727990 100644
--- a/pages/my/look.vue
+++ b/pages/my/look.vue
@@ -17,6 +17,7 @@
+
{{item.wxcategory.name}}
@@ -39,7 +40,7 @@ export default{
godetails(item){
uni.navigateTo({
// url:'/pages/detail/detail?id='+item.id
- url:'/pages/detail/detail?id='+item.wx_category_id
+ url:'/pages/detail/detail?id='+item.wx_category_id+'&menu_id='+item.wxcategory.wx_menu_id+'&logo='+item.wxcategory.logo
})
},
shareRecord(){
@@ -73,6 +74,14 @@ export default{
padding:29upx 22upx;
background-color: #ffffff;
margin-bottom:20upx;
+ display: flex;
+ align-items: center;
+ image{
+ width:120upx;
+ height:120upx;
+ border-radius:50%;
+ margin-right:20upx;
+ }
}
}
.empty{
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 2a65edc..5a75c8a 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -110,9 +110,15 @@
})
},
layoutHandle(){
+ uni.removeStorageSync('userInfo')
+ uni.removeStorage({
+ key: 'userInfo'
+ })
+ uni.clearStorageSync()
+ this.$store.commit('logout')
logout({ custom: { auth: true }}).then(res=>{
console.log("success")
- this.$store.commit('logout')
+
uni.switchTab({
url:'/pages/index/index'
})
diff --git a/pages/my/share.vue b/pages/my/share.vue
index 0bc4210..e8e2e2e 100644
--- a/pages/my/share.vue
+++ b/pages/my/share.vue
@@ -17,6 +17,7 @@
+
{{item.wxcategory.name}}
@@ -39,7 +40,7 @@ export default{
godetails(item){
uni.navigateTo({
// url:'/pages/detail/detail?id='+item.id
- url:'/pages/detail/detail?id='+item.wx_category_id
+ url:'/pages/detail/detail?id='+item.wx_category_id+'&menu_id='+item.wxcategory.wx_menu_id+'&logo='+item.wxcategory.logo
})
},
shareRecord(){
@@ -73,6 +74,14 @@ export default{
padding:29upx 22upx;
background-color: #ffffff;
margin-bottom:20upx;
+ display: flex;
+ align-items: center;
+ image{
+ width:120upx;
+ height:120upx;
+ border-radius:50%;
+ margin-right:20upx;
+ }
}
}
.empty{
diff --git a/store/index.js b/store/index.js
index 46a470d..5679a5d 100644
--- a/store/index.js
+++ b/store/index.js
@@ -27,6 +27,7 @@ const store = new Vuex.Store({
uni.removeStorage({
key: 'userInfo'
})
+ uni.clearStorageSync()
},
shareHandle(state,value){
state.share = value;