From ea71069f7a5ec9fa802206d27fc255b3dc4aa6e1 Mon Sep 17 00:00:00 2001 From: "1263428893@qq.com" Date: Sun, 29 Dec 2024 14:05:21 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=8C=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api.js | 9 ++- common/config.js | 1 + manifest.json | 12 ++-- pages.json | 11 ++++ pages/auth/index.vue | 39 ++++++++---- pages/home/index.vue | 54 ++++++++++++++++- pages/index/index.vue | 24 ++++++++ pages/login/index.vue | 80 ++++++++++++++----------- pages/reservation/index.vue | 11 +++- pages/user/index.vue | 15 +++-- pages_subpack/business/index.vue | 33 +++++++---- pages_subpack/category/index.vue | 45 ++++++++++++-- pages_subpack/detail/index.vue | 121 +++++++++++++++++++++++++++++++++++++- pages_subpack/invite/index.vue | 63 ++++++++++++++++++-- pages_subpack/person/index.vue | 4 +- pages_subpack/recommend/index.vue | 41 ++++++++++--- 16 files changed, 462 insertions(+), 101 deletions(-) create mode 100644 pages/index/index.vue diff --git a/common/api.js b/common/api.js index ea1b729..669f56c 100644 --- a/common/api.js +++ b/common/api.js @@ -14,7 +14,7 @@ export const wxLogin = (params) => http.get('/api/login/login', {params:params}) // 微信登录接口 export const appletLogin = (params) => http.get('/carrent-admin/api/login/login', {params:params}) // 用户信息 -export const getInfo = (params) => http.post('/carrent-admin/api/user/queryUser', params) +export const getInfo = (params) => http.get('/carrent-admin/api/user/queryUser', {params:params}) // 用户注册 export const addUser = (params) => http.post('/carrent-admin/api/user/addUser', params) // 企业注册 @@ -68,6 +68,13 @@ export const queryCategoryTwoList = (params) => http.get('/carrent-admin/api/con // 我的推荐-获取个人邀请码 export const getInviteCode = (params) => http.get('/carrent-admin/api/recommend/getInviteCode', {params:params}) + // 我的推荐-获取推荐用户信息 export const getInviteUser = (params) => http.get('/carrent-admin/api/recommend/getInviteUser', {params:params}) +// 配置信息-获取公里数列表 +export const queryMileageList = (params) => http.get('/carrent-admin/api/config/queryMileageList', {params:params}) + +export const bindPhone = (params) => http.get('/carrent-admin/api/login/bindPhone', {params:params}) + +export const updateUser = (params) => http.post('/carrent-admin/api/user/updateUser', params) diff --git a/common/config.js b/common/config.js index 6484b90..d9e3ee2 100644 --- a/common/config.js +++ b/common/config.js @@ -3,4 +3,5 @@ module.exports = { // baseUrl: 'http://augcl.natapp1.cc/employ-api' baseUrl:"https://carrentadmin.augcl.com" // baseUrl:"http://augcl.natapp1.cc" + } diff --git a/manifest.json b/manifest.json index 3090e06..70714d7 100644 --- a/manifest.json +++ b/manifest.json @@ -97,12 +97,12 @@ "quickapp" : {}, "mp-weixin" : { "appid" : "wx1c95690b8180a150", - "permission" : { - "scope.userLocation" : { - "desc" : "将获取你的具体位置信息,用于帮助用户浏览所在位置的零活信息" - } - }, - "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], + "permission" : { + "scope.userLocation" : { + "desc" : "将获取你的具体位置信息,用于帮助用户浏览所在位置的零活信息" + } + }, + "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], "setting" : { "urlCheck" : false, "es6" : false, diff --git a/pages.json b/pages.json index 8ece54c..926f5e7 100644 --- a/pages.json +++ b/pages.json @@ -6,6 +6,17 @@ "navigationBarTitleText": "环卫车", "navigationStyle":"default", "navigationBarBackgroundColor": "#669A32", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": true, + "onReachBottomDistance": 100 + } + }, + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "index", + "navigationStyle":"default", + "navigationBarBackgroundColor": "#669A32", "navigationBarTextStyle": "white" } }, diff --git a/pages/auth/index.vue b/pages/auth/index.vue index d103e67..686e89c 100644 --- a/pages/auth/index.vue +++ b/pages/auth/index.vue @@ -99,7 +99,7 @@ iv:event.detail.iv, nickName:event.detail.userInfo.nickName, session_key:"", - shareId:uni.getStorageSync('userId'), + shareId:uni.getStorageSync('shareId'), vid:"" } appletLogin(params).then((response) => { @@ -108,19 +108,34 @@ uni.setStorageSync('token', response.result.token) uni.setStorageSync('sessionKey', response.result.userInfo.sessionKey) uni.setStorageSync('userInfo', response.result.userInfo) + // that.commit('setUserInfo',{userInfo:response.result.userInfo,token:response.result.token}) getInfo({id:response.result.userInfo.id}).then(result=>{ - // console.info('resultresult',result) - uni.navigateTo({ - url:"/pages/login/index" - }) - // if(result.result.nickName){ - // uni.switchTab({ - // url:"/pages/home/index" - // }) - // }else{ - - // } + uni.setStorageSync("companyAuthenticationStatus",result.result.companyAuthenticationStatus) + uni.setStorageSync("personAuthenticationStatus",result.result.personAuthenticationStatus) + console.info('resultresult',result) + // uni.navigateTo({ + // url:"/pages/login/index" + // }) + if(!result.result.memberInfo.phone){ + uni.navigateTo({ + url:"/pages/login/index" + }) + }else{ + if(result.result.companyAuthenticationStatus==-1 && result.result.personAuthenticationStatus==-1){ + uni.navigateTo({ + url:"/pages/identity/index" + }) + }else{ + uni.switchTab({ + url:"/pages/home/index" + }) + } + } + + + + }).catch(err=>{ }) diff --git a/pages/home/index.vue b/pages/home/index.vue index d00034e..6e1a196 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -43,7 +43,7 @@ - + {{ items.goodsName }} @@ -120,6 +120,13 @@ } }, onLoad(options) { + wx.showShareMenu({ + withShareTicket: true, + menus: ['shareAppMessage', 'shareTimeline'] + }); + if(options.shareId){ + uni.setStorageSync('shareId',options.shareId) + } this.onPageList() this.getLocation() this.onQueryBannerList() @@ -135,6 +142,19 @@ that.pageNo = that.pageNo + 1 that.onPageList() }, + onShareAppMessage() { + let share = { + path:"/pages/home/index?shareId="+uni.getStorageSync('userInfo').id, + success:(res) => { + console.info(res) + }, + fail:(err)=>{ + console.info(err) + } + } + console.info(share) + return share + }, methods:{ onSearch(){ uni.navigateTo({ @@ -196,6 +216,38 @@ } queryGoodsList(params).then((response) => { console.info('queryGoodsList',response) + response.result.records.forEach((items,indexs)=>{ + if(items.image){ + items.images = items.image.split(',') + }else{ + items.images = [] + } + if(items.imageBack){ + items.imageBacks = items.imageBack.split(',') + }else{ + items.imageBacks = [] + } + if(items.imageCab){ + items.imageCabs = items.imageCab.split(',') + }else{ + items.imageCabs = [] + } + if(items.imageFront){ + items.imageFronts = items.imageFront.split(',') + }else{ + items.imageFronts = [] + } + if(items.imageLeft){ + items.imageLefts = items.imageLeft.split(',') + }else{ + items.imageLefts = [] + } + if(items.imageRight){ + items.imageRights = items.imageRight.split(',') + }else{ + items.imageRights = [] + } + }) that.list = that.list.concat(response.result.records) }).catch((error) =>{ diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..de797ea --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,24 @@ + + + \ No newline at end of file diff --git a/pages/login/index.vue b/pages/login/index.vue index 48e8365..194271e 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -40,7 +40,7 @@