diff --git a/.gitignore b/.gitignore index 62d68fe..6828190 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /dist package-lock.json /unpackage -/unpackage/dist \ No newline at end of file +/unpackage/dist +/doc \ No newline at end of file diff --git a/components/LocationListSheet.vue b/components/LocationListSheet.vue new file mode 100644 index 0000000..8160253 --- /dev/null +++ b/components/LocationListSheet.vue @@ -0,0 +1,234 @@ + + + + + + diff --git a/components/MapComponent.vue b/components/MapComponent.vue index 063a973..f588f3b 100644 --- a/components/MapComponent.vue +++ b/components/MapComponent.vue @@ -3,11 +3,13 @@ - + @markertap="onMapMarkerTap" @callouttap="onCalloutTap" @updated="onMapUpdated" @error="onMapError"> + + + @@ -22,11 +24,9 @@ - + - - @@ -39,15 +39,15 @@ + + + + diff --git a/config/user.js b/config/user.js index 10ff5e3..ff513ff 100644 --- a/config/user.js +++ b/config/user.js @@ -249,6 +249,33 @@ export const uploadOssResource = (filePath) => { }) } +// 上传并更新用户头像(后端接口) +export const uploadUserAvatar = (filePath) => { + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: URL + '/app/user/uploadAvatar', + filePath, + name: 'file', + header: { + 'appid': appid, + 'Authorization': 'Bearer ' + uni.getStorageSync('token'), + 'Clientid': uni.getStorageSync('client_id') + }, + success: (res) => { + try { + const parsed = typeof res.data === 'string' ? JSON.parse(res.data) : res.data + resolve(parsed) + } catch (e) { + reject(e) + } + }, + fail: (err) => { + reject(err) + } + }) + }) +} + // 获取系统配置(预留接口) // 期望后端返回形如:{ code: 200, data: { expressReturnCountdownSeconds: number } } export const getSystemConfig = () => { diff --git a/pages.json b/pages.json index a8291fa..306a6d0 100644 --- a/pages.json +++ b/pages.json @@ -43,9 +43,19 @@ { "path": "pages/my/index", "style": { - "navigationBarTitleText": "个人中心" + "navigationBarTitleText": "个人中心", + "navigationBarBackgroundColor": "#D1FFE1", + "navigationBarTextStyle": "black" } }, + { + "path": "pages/setting/index", + "style": { + "navigationBarTitleText": "设置", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, { "path": "pages/deposit/index", "style": { @@ -125,6 +135,14 @@ "navigationBarTextStyle": "black" } }, + { + "path": "pages/order/detail", + "style": { + "navigationBarTitleText": "订单详情", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, { "path": "pages/expressReturn/index", "style": { @@ -140,6 +158,14 @@ "navigationBarTextStyle": "black" } }, + { + "path": "pages/search/index", + "style": { + "navigationBarTitleText": "查找设备", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, { "path": "pages/waiting/index", "style": { diff --git a/pages/device/detail.vue b/pages/device/detail.vue index 5070336..e67e2a5 100644 --- a/pages/device/detail.vue +++ b/pages/device/detail.vue @@ -1,44 +1,19 @@