Browse Source

本地联调基本完成

hfll
hflllll 3 weeks ago
parent
commit
c2c2e27daa
10 changed files with 224 additions and 142 deletions
  1. +1
    -1
      api/model/login.js
  2. +24
    -21
      api/model/my.js
  3. +7
    -0
      api/model/order.js
  4. +1
    -1
      components/order/OrderItem.vue
  5. +6
    -6
      config.js
  6. +5
    -0
      pages/index/category.vue
  7. +8
    -3
      pages_order/mine/myTeam.vue
  8. +51
    -49
      pages_order/mine/team.vue
  9. +32
    -14
      pages_order/mine/unbindTeam.vue
  10. +89
    -47
      pages_order/order/afterSale.vue

+ 1
- 1
api/model/login.js View File

@ -7,7 +7,7 @@ const api = {
method: 'GET',
limit: 500,
},
// 获取绑定手机号码
// 绑定手机号码
bindPhone: {
url: '/teambuy/login/bindPhone',
method: 'GET',


+ 24
- 21
api/model/my.js View File

@ -22,12 +22,6 @@ const api = {
limit: 500
},
// 我的-修改个人信息
// updateUser: {
// url: '/teambuy/userInfo/updateUser',
// method: 'POST'
// },
// 我的-团长申请
addLeader: {
url: '/teambuy/leader/addLeader',
@ -35,19 +29,13 @@ const api = {
limit: 500
},
// 我的- 解绑团长
// 我的-解绑团长
deleteLeader: {
url: '/teambuy/leader/deleteLeader',
method: 'POST',
limit: 500
},
// 我的-查询团长列表
queryLeaderList: {
url: '/teambuy/leader/queryLeaderList',
method: 'POST',
limit: 500
},
// 我的-更换团长
updateLeader: {
@ -56,19 +44,33 @@ const api = {
limit: '500'
},
// 我的-查询团长列表
queryLeaderList : {
url: '/teambuy/leader/queryLeaderList',
method: 'POST',
limit: 500
},
// 我的-查询团长列表(下单选择地址)
queryLeaderList: {
url: '/teambuy/leader/queryLeaderList',
method: 'GET',
limit: 500
},
// 我的-查询团长信息
queryLeaderInfo: {
url: '/teambuy/leader/queryLeaderInfo',
method: 'GET',
limit: 500
},
// 我的-我的团员
queryMemberList: {
url: '/teambuy/leader/queryMemberList',
method: 'GET',
limit: 500
},
// 我的-修改团长信息
updateLeaderInfo: {
url: '/teambuy/leader/updateLeaderInfo',
method: 'POST',
limit: 500
},
// 钱包-充值回调
CashNotify: {
@ -89,7 +91,8 @@ const api = {
url: '/teambuy/amount/queryAmountLog',
method: 'POST',
limit: 500
}
},
}

+ 7
- 0
api/model/order.js View File

@ -110,6 +110,13 @@ const api = {
url: '/teambuy/order/informOrderOne',
method: 'POST',
limit: 500
},
// 订单-订单售后
addAfterService: {
url: '/teambuy/afterservice/addAfterService',
method: 'POST',
limit: 500
}
}

+ 1
- 1
components/order/OrderItem.vue View File

@ -91,7 +91,7 @@ export default {
},
gotoSale() {
this.$utils.navigateTo({
url: '/pages_order/order/afterSale?id=' + this.order.id
url: '/pages_order/order/afterSale?id=' + this.order.id + '&userId=' + this.order.userId + '&orderId=' + this.order.orderLeaderId
})
},
//


+ 6
- 6
config.js View File

@ -28,19 +28,19 @@ const config = {
// 默认配置
const defaultConfig = {
mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
mapKey: 'N4JBZ-JAXCL-PR7P5-EZQGJ-N7EVH-BDF3M',
aliOss: {
url: 'https://image.hhlm1688.com/',
url: 'https://img.gwrx666.com/',
config: {
//桶的地址
region: 'oss-cn-guangzhou',
//id
accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
accessKeyId: 'LTAI5tH9gsQGSmDE3TtLzCqe',
//密钥
accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
accessKeySecret: 'iPBIWop0GOYKew65TJvEcKFOISlPUs',
//桶的名字
bucket: 'hanhaiimage',
endpoint: 'oss-cn-shenzhen.aliyuncs.com',
bucket: 'gwrx666',
endpoint: 'oss-cn-guangzhou.aliyuncs.com',
}
},
}


+ 5
- 0
pages/index/category.vue View File

@ -121,6 +121,11 @@ export default {
})
}
},
onShow() {
this.mixinsListApi = 'queryGoodsList'
this.queryParams.categoryId = this.category[this.currentChildren].id
this.getData()
},
methods: {
change(e) {
this.currentChildren = e


+ 8
- 3
pages_order/mine/myTeam.vue View File

@ -35,7 +35,7 @@
<script>
import navbar from '@/components/base/navbar.vue'
import { teamData } from '@/static/js/mockTeamData.js'
// import { teamData } from '@/static/js/mockTeamData.js'
import shareConfig from '@/mixins/configList.js'
export default {
@ -49,8 +49,13 @@ export default {
}
},
onLoad() {
this.teamData = teamData
// this.teamData = teamData
this.$api('queryMemberList', {} , res => {
if (res.code === 200){
teamData = res.result
}
})
//
this.Gshare = {
...this.Gshare,


+ 51
- 49
pages_order/mine/team.vue View File

@ -171,63 +171,65 @@ export default {
title: '提交中...'
})
//
setTimeout(() => {
//
this.$api('updateLeaderInfo', {
...this.formData,
}, res => {
uni.hideLoading()
if (this.identity) {
//
this.saveInfo()
return
}
console.log(this.formData);
//
this.$api('addLeader', {
...this.formData,
}, res => {
if (res.code == 200) {
uni.showModal({
title: '提交成功!',
content: '我们的工作人员会及时与您联系,\n请保持电话畅通!',
showCancel: false,
confirmColor: '#019245',
success: (res) => {
if (res.confirm) {
//
setTimeout(() => {
this.$utils.navigateBack()
}, 500)
}
if (res.code == 200) {
uni.showModal({
title: '提交成功!',
content: '我们的工作人员会及时与您联系,\n请保持电话畅通!',
showCancel: false,
confirmColor: '#019245',
success: (res) => {
if (res.confirm) {
//
this.$utils.navigateBack()
}
})
}
})
}
})
}
})
}, 1000)
},
//
saveInfo() {
uni.setStorageSync('team_form_data', JSON.stringify(this.formData))
uni.showToast({
title: '保存成功!',
icon: 'none',
duration: 2000
})
//
assign(data) {
this.formData.address = data.address
this.formData.area = data.area
this.formData.name = data.name
this.formData.phone = data.phone
this.formData.spotImage = data.spotImage
this.formData.spotName = data.spotName
this.formData.id = data.id
}
},
onLoad() {
if (this.identity) {
//
const addData = uni.getStorageSync('team_form_data')
if (addData) {
this.beModify = true
this.formData = JSON.parse(addData)
}
if (!this.identity) {
this.$api('queryLeaderInfo', {}, res => {
if (res.code == 200){
this.assign(res.result)
if (this.formData.remark){
if (this.formData.status != 0){
uni.showModal({
title: `${ this.formData.status == 1 ? '审核通过' : '审核不通过' }`,
content: this.formData.remark,
showCancel: false,
confirmColor: '#019245',
})
}else {
uni.showModal({
title: `还在审核中 请稍等`,
content: this.formData.remark,
showCancel: false,
confirmColor: '#019245',
})
}
}
}
})
}
}
}


+ 32
- 14
pages_order/mine/unbindTeam.vue View File

@ -8,15 +8,15 @@
<view class="section-title">当前取餐点</view>
<view class="pickup-item" v-if="currentPickupPoint">
<view class="pickup-image">
<image :src="currentPickupPoint.image" mode="aspectFill"></image>
<image :src="currentPickupPoint.spotImage" mode="aspectFill"></image>
</view>
<view class="pickup-info">
<view class="pickup-name">{{ currentPickupPoint.name }}</view>
<view class="pickup-name">{{ currentPickupPoint.spotName }}</view>
<view class="pickup-address">
<view class="pickup-address-icon">
<uv-icon name="map-fill" color="#019245" size="24"></uv-icon>
</view>
<text>{{ currentPickupPoint.address }}</text>
<text>{{ currentPickupPoint.area }}{{ currentPickupPoint.address }}</text>
</view>
<view class="pickup-phone">
<uv-icon name="phone-fill" color="#019245" size="24"></uv-icon>
@ -96,20 +96,33 @@ export default {
uni.showLoading({
title: '提交中...'
})
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '申请已提交,等待平台审核',
icon: 'none',
})
setTimeout(() => {
this.$utils.navigateBack()
}, 1400)
}, 1000)
//
this.$api('deleteLeader',{
leaderUpdateId: point.id
}, res => {
if (res.code === 200){
this.updateLeader(point)
}
})
}
}
})
},
updateLeader(point) {
this.$api('updateLeader', {
id: point.id
}, res => {
if (res.code == 200) {
uni.hideLoading()
uni.showToast({
title: '申请已提交,等待平台审核',
icon: 'success',
})
setTimeout(() => {
this.$utils.navigateBack()
}, 1000)
}
})
}
},
onLoad() {
@ -119,6 +132,11 @@ export default {
this.nearbyPickupPoints = res.result.records
}
})
// this.$api('queryLeaderInfo', {}, res => {
// if (res.code == 200){
// this.currentPickupPoint = res.result
// }
// })
}
}
</script>


+ 89
- 47
pages_order/order/afterSale.vue View File

@ -8,7 +8,7 @@
<!-- 问题描述区域 -->
<view class="form-section">
<view class="section-title">
<view class="title-indicator"></view>
<view class="title-indicator" />
<text>请描述具体问题</text>
</view>
<view class="text-area-container">
@ -20,20 +20,20 @@
<!-- 图片上传区域 -->
<view class="form-section">
<view class="section-title">
<view class="title-indicator"></view>
<view class="title-indicator" />
<text>请提供相关问题的截图或图片</text>
</view>
<view class="upload-area">
<view class="image-grid">
<view class="image-item" v-for="(image, index) in uploadedImages" :key="'img-'+index">
<image :src="image" mode="aspectFill" class="preview-image"></image>
<image :src="image" mode="aspectFill" class="preview-image" />
<view class="delete-icon" @tap="deleteImage(index)">
<uv-icon name="close" color="#fff" size="24rpx"></uv-icon>
<uv-icon name="close" color="#fff" size="24rpx" />
</view>
</view>
<view class="upload-button" @tap="chooseImage" v-if="uploadedImages.length < 9">
<uv-icon name="plus" size="60rpx" color="#019245"></uv-icon>
<uv-icon name="plus" size="60rpx" color="#019245" />
<text>添加图片</text>
</view>
</view>
@ -43,11 +43,11 @@
<!-- 联系方式 -->
<view class="form-section">
<view class="section-title">
<view class="title-indicator"></view>
<view class="title-indicator" />
<text>联系方式</text>
</view>
<view class="contact-info">
<input class="contact-tip" placeholder="留下联系方式,方便我们向您回复" />
<input class="contact-tip" placeholder="留下联系方式,方便我们向您回复" v-model="contactInfo" placeholder-style="color: #999;" />
</view>
</view>
</view>
@ -71,8 +71,9 @@
orderId: '',
problemDescription: '',
uploadedImages: [],
contactInfo: '15070023168', //
orderDetail: null
contactInfo: '', //
orderDetail: null,
idObject:{}
}
},
onLoad(options) {
@ -88,32 +89,48 @@
uni.navigateBack()
},
//
getOrderDetail(id) {
//
const pages = getCurrentPages()
const prevPage = pages[pages.length - 2]
// //
// getOrderDetail(id) {
// //
// const pages = getCurrentPages()
// const prevPage = pages[pages.length - 2]
if (prevPage && prevPage.route.includes('order')) {
// ID
const foundOrder = prevPage.$vm.orderList.find(order => order.id === id)
if (foundOrder) {
this.orderDetail = foundOrder
}
}
},
// if (prevPage && prevPage.route.includes('order')) {
// // ID
// const foundOrder = prevPage.$vm.orderList.find(order => order.id === id)
// if (foundOrder) {
// this.orderDetail = foundOrder
// </span><span class="err"> pan> }
// }
// },
//
chooseImage() {
uni.chooseImage({
count: 9 - this.uploadedImages.length,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
// uni.chooseImage({
// count: 9 - this.uploadedImages.length,
// sizeType: ['compressed'], //
// sourceType: ['album', 'camera'], //
// success: (res) => {
// console.log('',res);
//
this.uploadedImages = [...this.uploadedImages, ...res.tempFilePaths]
// this.uploadedImages = [...this.uploadedImages, ...res.tempFilePaths]
this.$Oss.ossUploadImage({
key: '', //
folder: '', // 使
compressed: true,
success: (url) => {
this.uploadedImages.push(url)
},
fail: (err) => {
uni.showToast({
title: `上传失败${err}`,
icon: 'error'
})
}
})
// }
// })
},
//
@ -127,7 +144,7 @@
if (!this.problemDescription.trim()) {
uni.showToast({
title: '请描述您的问题',
icon: 'none'
icon: 'error'
})
return
}
@ -136,25 +153,45 @@
uni.showLoading({
title: '正在提交...'
})
//
setTimeout(() => {
//
setTimeout(() => {
uni.hideLoading()
uni.showToast({
this.$api('addAfterService', {
...this.idObject,
phone: this.contactInfo,
content: this.problemDescription,
images: this.uploadedImages
}, res => {
uni.hideLoading()
if (res.code == 200) {
uni.showModal({
title: '提交成功',
icon: 'success',
duration: 2000
content: '您的售后申请已提交,请等待审核',
confirmColor: '#019245',
showCancel: false,
success: () => {
uni.navigateBack()
}
})
//
setTimeout(() => {
this.navigateBack()
}, 1500)
}, 1000)
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'error'
})
}
})
},
},
onLoad(arg) {
if (arg.orderId && arg.userId && arg.id){
this.idObject = {
...arg
}
}else {
uni.showToast({
title: '数据不足',
icon: 'error'
})
this.$util.navigateBack()
}
}
}
@ -268,9 +305,14 @@
.contact-tip {
font-size: 26rpx;
color: #999;
// margin-bottom: 10rpx;
color: black ;
// margin-bottom: 10rpx;
display: block;
}
.contact-placeholder {
color: #999;
}
.contact-value {
font-size: 28rpx;


Loading…
Cancel
Save