Commit b4b49cddb42ab3bb8526b2351443b3372afd95c6
Merge branch 'master' of http://39.98.150.180/webapp/GreenwayWeb
Showing
7 changed files
with
200 additions
and
20 deletions
lvdao-miniapp/pages.json
| @@ -414,6 +414,14 @@ | @@ -414,6 +414,14 @@ | ||
| 414 | "navigationBarBackgroundColor": "#FFFFFF", | 414 | "navigationBarBackgroundColor": "#FFFFFF", |
| 415 | "navigationBarTitleText": "商品详情" | 415 | "navigationBarTitleText": "商品详情" |
| 416 | } | 416 | } |
| 417 | + }, | ||
| 418 | + { | ||
| 419 | + "path" : "pages/my/remove", | ||
| 420 | + "style" : | ||
| 421 | + { | ||
| 422 | + "navigationBarBackgroundColor": "#FFFFFF", | ||
| 423 | + "navigationBarTitleText": "修改资料" | ||
| 424 | + } | ||
| 417 | } | 425 | } |
| 418 | ], | 426 | ], |
| 419 | "subpackages": [{ | 427 | "subpackages": [{ |
lvdao-miniapp/pages/my/my.vue
| @@ -34,8 +34,8 @@ | @@ -34,8 +34,8 @@ | ||
| 34 | </view> | 34 | </view> |
| 35 | </view> | 35 | </view> |
| 36 | </view> | 36 | </view> |
| 37 | - <view class="user-right"> | ||
| 38 | - <!-- <image :src="$imgUrl('/right1.png')"></image> --> | 37 | + <view class="user-right" @click="gopath('/pages/my/remove')"> |
| 38 | + <image :src="$imgUrl('/right1.png')"></image> | ||
| 39 | </view> | 39 | </view> |
| 40 | </view> | 40 | </view> |
| 41 | <!-- 我的服务 --> | 41 | <!-- 我的服务 --> |
| @@ -286,18 +286,21 @@ | @@ -286,18 +286,21 @@ | ||
| 286 | }; | 286 | }; |
| 287 | }, | 287 | }, |
| 288 | onload() { | 288 | onload() { |
| 289 | - | 289 | + |
| 290 | }, | 290 | }, |
| 291 | onShow() { | 291 | onShow() { |
| 292 | const isLogin = uni.getStorageSync('token'); | 292 | const isLogin = uni.getStorageSync('token'); |
| 293 | - this.user = uni.getStorageSync('user') | 293 | + // this.user = uni.getStorageSync('user') |
| 294 | if (isLogin == '') { | 294 | if (isLogin == '') { |
| 295 | // 如果未登录,跳转到登录页面 | 295 | // 如果未登录,跳转到登录页面 |
| 296 | uni.navigateTo({ | 296 | uni.navigateTo({ |
| 297 | url: '/pages/login/login' | 297 | url: '/pages/login/login' |
| 298 | }) | 298 | }) |
| 299 | } else { | 299 | } else { |
| 300 | - | 300 | + this.$http.sendRequest('/business/getUserDetails', 'GET', {}).then(res => { |
| 301 | + | ||
| 302 | + this.user = res.data.data | ||
| 303 | + }) | ||
| 301 | this.$http.sendRequest('/cerePlatformMerchant/queryByPage', 'POST',{pageSize:10,pageNumber:0,phone:uni.getStorageSync('user').phone},1).then(res => { | 304 | this.$http.sendRequest('/cerePlatformMerchant/queryByPage', 'POST',{pageSize:10,pageNumber:0,phone:uni.getStorageSync('user').phone},1).then(res => { |
| 302 | if(res.data.data.content.length>0) { | 305 | if(res.data.data.content.length>0) { |
| 303 | let c1 = res.data.data.content[0] | 306 | let c1 = res.data.data.content[0] |
lvdao-miniapp/pages/my/remove.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view> | ||
| 3 | + <view class="user-wrap"> | ||
| 4 | + <view class="user-group"> | ||
| 5 | + <text class="nick-name">头像</text> | ||
| 6 | + <button class="choose-avatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" style="width: 80rpx;padding: 0;margin: 0;"> | ||
| 7 | + <image class="user-avatar" :src="arr1.avatar?arr1.avatar:$imgUrl('/img/head.jpg')" mode="aspectFill"></image> | ||
| 8 | + </button> | ||
| 9 | + </view> | ||
| 10 | + <view class="user-group"> | ||
| 11 | + <text class="nick-name">昵称</text> | ||
| 12 | + <input class="choose-nickname" type="nickname" v-model="arr1.name" @change="nickNameChange"/> | ||
| 13 | + </view> | ||
| 14 | + <view class="user-group"> | ||
| 15 | + <text class="nick-name">性别</text> | ||
| 16 | + <picker mode="selector" @change="bindPickerChange1" :value="arr1.sex" :range="range" :range-key="'text'"> | ||
| 17 | + <text>{{arr1.sex}}</text> | ||
| 18 | + <uni-icons type="right" size="15"></uni-icons> | ||
| 19 | + </picker> | ||
| 20 | + </view> | ||
| 21 | + <view class="confirm-user" @tap="backToCenter" > | ||
| 22 | + 确认 | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | +</template> | ||
| 27 | + | ||
| 28 | +<script> | ||
| 29 | + export default { | ||
| 30 | + data() { | ||
| 31 | + return { | ||
| 32 | + arr1:{ | ||
| 33 | + name:'', | ||
| 34 | + avatar:'', | ||
| 35 | + mobilePhone:'', | ||
| 36 | + sex:'', | ||
| 37 | + birthday:'', | ||
| 38 | + occupation:'', | ||
| 39 | + hobby:'', | ||
| 40 | + workAddress:'' | ||
| 41 | + }, | ||
| 42 | + range: [ | ||
| 43 | + { | ||
| 44 | + value: '男', | ||
| 45 | + text: "男" | ||
| 46 | + }, | ||
| 47 | + { | ||
| 48 | + value: '女', | ||
| 49 | + text: "女" | ||
| 50 | + }, | ||
| 51 | + | ||
| 52 | + ], | ||
| 53 | + } | ||
| 54 | + }, | ||
| 55 | + onShow() { | ||
| 56 | + this.gain() | ||
| 57 | + }, | ||
| 58 | + methods: { | ||
| 59 | + gain() { | ||
| 60 | + let that =this | ||
| 61 | + that.$http.sendRequest('/business/getUserDetails', 'GET', {}).then(res => { | ||
| 62 | + | ||
| 63 | + that.arr1 = res.data.data | ||
| 64 | + console.log({...that.arr1}) | ||
| 65 | + }) | ||
| 66 | + }, | ||
| 67 | + open() { | ||
| 68 | + this.$refs.calendar.open(); | ||
| 69 | + }, | ||
| 70 | + confirm(e) { | ||
| 71 | + console.log(e); | ||
| 72 | + this.arr1.birthday = e.fulldate | ||
| 73 | + }, | ||
| 74 | + bindPickerChange1(e) { | ||
| 75 | + this.arr1.sex =this.range[Number(e.detail.value)].value | ||
| 76 | + console.log(this.arr1.sex) | ||
| 77 | + }, | ||
| 78 | + uploadFilePromise(url) { | ||
| 79 | + console.log(url) | ||
| 80 | + return new Promise((resolve, reject) => { | ||
| 81 | + let a = uni.uploadFile({ | ||
| 82 | + url: this.$upload, // 仅为示例,非真实的接口地址 | ||
| 83 | + filePath: url, | ||
| 84 | + name: 'file', // 后端接收的文件参数名 | ||
| 85 | + formData: { | ||
| 86 | + filePath: 'user', // 其他表单数据 | ||
| 87 | + }, | ||
| 88 | + success: (res) => { | ||
| 89 | + this.arr1.avatar = this.$img+ JSON.parse(res.data).data | ||
| 90 | + resolve(JSON.parse(res.data).data) | ||
| 91 | + } | ||
| 92 | + }); | ||
| 93 | + }) | ||
| 94 | + }, | ||
| 95 | + async onChooseAvatar(e) { | ||
| 96 | + console.log(e.detail) | ||
| 97 | + this.arr1.avatar = e.detail.avatarUrl; | ||
| 98 | + await this.uploadFilePromise(this.arr1.avatar) | ||
| 99 | + }, | ||
| 100 | + nickNameChange(e) { | ||
| 101 | + this.arr1.name = e.detail.value | ||
| 102 | + }, | ||
| 103 | + async backToCenter() { | ||
| 104 | + console.log({...this.arr1}) | ||
| 105 | + this.$http.sendRequest('/business/updateAvatar', 'POST', this.arr1).then(res => { | ||
| 106 | + if(res.data.code == 200) { | ||
| 107 | + uni.showToast({ | ||
| 108 | + icon: 'none', | ||
| 109 | + title: "修改成功", | ||
| 110 | + }) | ||
| 111 | + setTimeout(() => { | ||
| 112 | + uni.reLaunch({ | ||
| 113 | + url:'/pages/my/my' | ||
| 114 | + }) | ||
| 115 | + }, 500) | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + console.log(res) | ||
| 119 | + }) | ||
| 120 | + } | ||
| 121 | + }, | ||
| 122 | + } | ||
| 123 | +</script> | ||
| 124 | + | ||
| 125 | +<style> | ||
| 126 | + .user-wrap { | ||
| 127 | + padding: 0 30rpx; | ||
| 128 | + background: #fff; | ||
| 129 | + font-size: 26rpx; | ||
| 130 | + /* margin-top: 50rpx; */ | ||
| 131 | + } | ||
| 132 | + .user-group { | ||
| 133 | + display: flex; | ||
| 134 | + justify-content: space-between; | ||
| 135 | + align-items: center; | ||
| 136 | + height: 100rpx; | ||
| 137 | + border-bottom: 2rpx solid #ccc; | ||
| 138 | + } | ||
| 139 | + .nick-name { | ||
| 140 | + font-weight: 700; | ||
| 141 | + } | ||
| 142 | + .choose-avatar { | ||
| 143 | + height: 80rpx; | ||
| 144 | + border-radius: 80rpx; | ||
| 145 | + } | ||
| 146 | + .user-avatar { | ||
| 147 | + width: 100%; | ||
| 148 | + height: 100%; | ||
| 149 | + } | ||
| 150 | + .choose-nickname { | ||
| 151 | + text-align: right; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + .confirm-user { | ||
| 155 | + background-color: #19be6b; | ||
| 156 | + color: #fff; | ||
| 157 | + text-align: center; | ||
| 158 | + width: 90%; | ||
| 159 | + margin: 0 auto; | ||
| 160 | + height: 80rpx; | ||
| 161 | + border-radius: 30rpx; | ||
| 162 | + line-height: 80rpx; | ||
| 163 | + font-size: 32rpx; | ||
| 164 | + position: fixed; | ||
| 165 | + bottom: 30rpx; | ||
| 166 | + left: 5%; | ||
| 167 | + | ||
| 168 | + } | ||
| 169 | +</style> |
lvdao-miniapp/pages/workbench/workbench.vue
| @@ -318,8 +318,8 @@ | @@ -318,8 +318,8 @@ | ||
| 318 | "page": 1, | 318 | "page": 1, |
| 319 | "pageSize": 1 | 319 | "pageSize": 1 |
| 320 | }, 1).then(res => { | 320 | }, 1).then(res => { |
| 321 | - if (res.data.data.list.length > 0) { | ||
| 322 | - uni.setStorageSync('shopId', res.data.data.list[0].shopId); | 321 | + if (res.data.data.content.length > 0) { |
| 322 | + uni.setStorageSync('shopId', res.data.data.content[0].shopId); | ||
| 323 | } else { | 323 | } else { |
| 324 | // uni.show | 324 | // uni.show |
| 325 | uni.setStorageSync('shopId', ''); | 325 | uni.setStorageSync('shopId', ''); |
lvdao-miniapp/pagesA/rentPay/rentPay.vue
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | <view class="cart-add"> | 51 | <view class="cart-add"> |
| 52 | 合计:<view class="price"><u-icon name="rmb" style="font-size: 24rpx;" />{{payAll}}</view> | 52 | 合计:<view class="price"><u-icon name="rmb" style="font-size: 24rpx;" />{{payAll}}</view> |
| 53 | </view> | 53 | </view> |
| 54 | - <u-button type="success" class="buttons" @click="joinShow" size="mini">去支付</u-button> | 54 | + <u-button type="success" class="buttons" @click="joinShow">去支付</u-button> |
| 55 | </view> | 55 | </view> |
| 56 | </view> | 56 | </view> |
| 57 | <!-- <u-loading :show="true" size="60" style="position: absolute; top:80%;left: ;" color="red"></u-loading> --> | 57 | <!-- <u-loading :show="true" size="60" style="position: absolute; top:80%;left: ;" color="red"></u-loading> --> |
| @@ -208,7 +208,7 @@ | @@ -208,7 +208,7 @@ | ||
| 208 | 208 | ||
| 209 | const msg = JSON.stringify(this.list1[this.ListIndex]) | 209 | const msg = JSON.stringify(this.list1[this.ListIndex]) |
| 210 | uni.navigateTo({ | 210 | uni.navigateTo({ |
| 211 | - url: `/pagesA/rentPay/rentPayDetails?msg=${msg}&merchants=${this.relatedMerchants}` | 211 | + url: `/pagesA/rentPay/rentPayDetails?msg=${encodeURIComponent(msg)}&merchants=${encodeURIComponent(this.relatedMerchants)}` |
| 212 | }) | 212 | }) |
| 213 | }, | 213 | }, |
| 214 | async joinShow() { | 214 | async joinShow() { |
| @@ -236,10 +236,7 @@ | @@ -236,10 +236,7 @@ | ||
| 236 | }) | 236 | }) |
| 237 | 237 | ||
| 238 | // return | 238 | // return |
| 239 | - const payId = this.$http.sendRequest('/order/rentAggregatePayment', 'POST', arr, 3).then(res => { | ||
| 240 | - console.log(res.data) | ||
| 241 | - console.log(JSON.parse(res.data.data).payUrl) | ||
| 242 | - | 239 | + const payId = await this.$http.sendRequest('/order/rentAggregatePayment', 'POST', arr, 3).then(res => { |
| 243 | if (res.data.data) { | 240 | if (res.data.data) { |
| 244 | let payUrl = JSON.parse(res.data.data).payUrl | 241 | let payUrl = JSON.parse(res.data.data).payUrl |
| 245 | let c1 = payUrl.split('=')[1] | 242 | let c1 = payUrl.split('=')[1] |
lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | </view> | 34 | </view> |
| 35 | </view> | 35 | </view> |
| 36 | </view> | 36 | </view> |
| 37 | - <view v-if="dataList.length === 0" class="nonemsg"> | 37 | + <view v-if="dataList.length === 0" class="nonemsg" style="font-size: 24rpx;"> |
| 38 | 暂无数据 | 38 | 暂无数据 |
| 39 | </view> | 39 | </view> |
| 40 | </view> | 40 | </view> |
| @@ -57,10 +57,12 @@ | @@ -57,10 +57,12 @@ | ||
| 57 | this.pageIndex.time = this.getCurrentYear() | 57 | this.pageIndex.time = this.getCurrentYear() |
| 58 | }, | 58 | }, |
| 59 | onLoad(options) { | 59 | onLoad(options) { |
| 60 | + console.error(options) | ||
| 60 | if (options.msg && options.merchants) { | 61 | if (options.msg && options.merchants) { |
| 61 | this.allPay = 0 | 62 | this.allPay = 0 |
| 62 | - let receivedMsg = JSON.parse(options.msg) | ||
| 63 | - this.merchants = options.merchants | 63 | + let receivedMsg = JSON.parse(decodeURIComponent(options.msg)) |
| 64 | + this.merchants = decodeURIComponent(options.merchants) | ||
| 65 | + console.error(this.merchants) | ||
| 64 | this.getAll(receivedMsg.list) | 66 | this.getAll(receivedMsg.list) |
| 65 | } | 67 | } |
| 66 | }, | 68 | }, |
| @@ -145,6 +147,7 @@ | @@ -145,6 +147,7 @@ | ||
| 145 | paymentTimeStart: firstDay, | 147 | paymentTimeStart: firstDay, |
| 146 | paymentTimeEnd: lastDay | 148 | paymentTimeEnd: lastDay |
| 147 | }, 1).then(res => { | 149 | }, 1).then(res => { |
| 150 | + console.log(res) | ||
| 148 | if (res.data.data.length > 0) { | 151 | if (res.data.data.length > 0) { |
| 149 | this.getAll(res.data.data[0].cerePropertyOrderList) | 152 | this.getAll(res.data.data[0].cerePropertyOrderList) |
| 150 | } else { | 153 | } else { |
| @@ -176,7 +179,7 @@ | @@ -176,7 +179,7 @@ | ||
| 176 | const minutes = String(date.getMinutes()).padStart(2, '0'); | 179 | const minutes = String(date.getMinutes()).padStart(2, '0'); |
| 177 | 180 | ||
| 178 | // 按照所需格式拼接并返回结果 | 181 | // 按照所需格式拼接并返回结果 |
| 179 | - return `${month}.${day} ${hours}:${minutes}`; | 182 | + return `${month}月${day}日 ${hours}:${minutes}`; |
| 180 | }, | 183 | }, |
| 181 | formatDate(dateStr) { | 184 | formatDate(dateStr) { |
| 182 | // 使用 split 方法将日期字符串按 - 分割成数组 | 185 | // 使用 split 方法将日期字符串按 - 分割成数组 |
lvdao-miniapp/utils/request.js
| @@ -21,7 +21,7 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { | @@ -21,7 +21,7 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { | ||
| 21 | // bases = 'https://zhgw.028wlkj.com:20443/cdwlMall/meserver/admin-server' + url; | 21 | // bases = 'https://zhgw.028wlkj.com:20443/cdwlMall/meserver/admin-server' + url; |
| 22 | // bases = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server' + url; | 22 | // bases = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server' + url; |
| 23 | 23 | ||
| 24 | - // bases = 'http://128.10.249.41:9003'+ url; | 24 | + // bases = 'http://128.10.249.23:9003'+ url; |
| 25 | // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/admin-server' + url; | 25 | // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/admin-server' + url; |
| 26 | 26 | ||
| 27 | bases = c1 + 'cdwlMall/meserver/admin-server' + url; | 27 | bases = c1 + 'cdwlMall/meserver/admin-server' + url; |
| @@ -30,7 +30,7 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { | @@ -30,7 +30,7 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { | ||
| 30 | // bases = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' + url; | 30 | // bases = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' + url; |
| 31 | // bases = 'https://zhgw.028wlkj.com:20443/cdwlMall/meserver/api' + url; | 31 | // bases = 'https://zhgw.028wlkj.com:20443/cdwlMall/meserver/api' + url; |
| 32 | // bases = 'http://128.10.249.22:9003:9007' + url; | 32 | // bases = 'http://128.10.249.22:9003:9007' + url; |
| 33 | - // bases = 'http://128.10.249.41:9007' + url; | 33 | + // bases = 'http://128.10.249.23:9007' + url; |
| 34 | bases = c1 + 'cdwlMall/meserver/api' + url; | 34 | bases = c1 + 'cdwlMall/meserver/api' + url; |
| 35 | 35 | ||
| 36 | }else{ | 36 | }else{ |
| @@ -39,7 +39,7 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { | @@ -39,7 +39,7 @@ const sendRequest = (url, method = 'GET', data = {}, baseUrl,contentType) => { | ||
| 39 | // bases = 'http://172.16.61.123/cdwlMall/business-server' + url; | 39 | // bases = 'http://172.16.61.123/cdwlMall/business-server' + url; |
| 40 | // bases = 'https://jy.scjysm.asia:18086/cdwlMall/business-server' + url; | 40 | // bases = 'https://jy.scjysm.asia:18086/cdwlMall/business-server' + url; |
| 41 | // bases = 'https://zhgw.028wlkj.com:20443/cdwlMall/business-server' + url; | 41 | // bases = 'https://zhgw.028wlkj.com:20443/cdwlMall/business-server' + url; |
| 42 | - // bases = 'http://128.10.249.41:9004' + url; | 42 | + // bases = 'http://128.10.249.23:9004' + url; |
| 43 | // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/business-server' + url; | 43 | // bases = 'https://zhld.028wlkj.com:49008/cdwlMall/business-server' + url; |
| 44 | bases = c1 + 'cdwlMall/business-server' + url; | 44 | bases = c1 + 'cdwlMall/business-server' + url; |
| 45 | 45 |