|
|
@ -1,50 +1,11 @@ |
|
|
|
首页 |
|
|
|
工单管理 |
|
|
|
合并请求 |
|
|
|
里程碑 |
|
|
|
探索 |
|
|
|
通知 |
|
|
|
创建… |
|
|
|
个人信息和配置 |
|
|
|
Augcl / teambuy-front |
|
|
|
生成自 hly/uniapp-shop-templates |
|
|
|
关注 |
|
|
|
1 |
|
|
|
点赞 |
|
|
|
0 |
|
|
|
派生 |
|
|
|
0 |
|
|
|
代码 |
|
|
|
工单 |
|
|
|
0 |
|
|
|
合并请求 |
|
|
|
0 |
|
|
|
项目 |
|
|
|
0 |
|
|
|
版本发布 |
|
|
|
0 |
|
|
|
百科 |
|
|
|
动态 |
|
|
|
敢为人鲜小程序前端代码仓库 |
|
|
|
58 提交 |
|
|
|
2 分支 |
|
|
|
57 MiB |
|
|
|
分支: hfll |
|
|
|
teambuy-front/pages_order/mine/team.vue |
|
|
|
335 行 |
|
|
|
8.7 KiB |
|
|
|
原始文件 |
|
|
|
永久链接 |
|
|
|
Blame |
|
|
|
文件历史 |
|
|
|
|
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
<!-- 导航栏 --> |
|
|
|
<navbar title="团长申请" leftClick @leftClick="$utils.navigateBack" bgColor="#019245" color="#fff" /> |
|
|
|
<navbar :title="`${ !identity ? '团长申请' : '团长信息' }`" leftClick @leftClick="$utils.navigateBack" bgColor="#019245" |
|
|
|
color="#fff" /> |
|
|
|
|
|
|
|
<!-- 顶部图片区域 --> |
|
|
|
<view class="banner"> |
|
|
|
<view class="banner" v-if="!identity"> |
|
|
|
<image src="/static/image/红烧肉.png" mode="aspectFill" class="banner-image"></image> |
|
|
|
</view> |
|
|
|
|
|
|
@ -53,11 +14,12 @@ Blame |
|
|
|
<view class="section-title">送餐点照片</view> |
|
|
|
<view class="section-block"> |
|
|
|
<view class="upload-container"> |
|
|
|
<view class="upload-area" @click="chooseImage" v-if="!locationImage"> |
|
|
|
<view class="upload-area" @tap="chooseImage" v-if="!formData.locationImage"> |
|
|
|
<view class="plus">+</view> |
|
|
|
<view class="upload-text">添加图片</view> |
|
|
|
</view> |
|
|
|
<image v-else :src="locationImage" mode="aspectFill" class="upload-area" @click="chooseImage" /> |
|
|
|
<image v-else :src="formData.locationImage" mode="aspectFill" class="upload-area" |
|
|
|
@tap="chooseImage" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -72,7 +34,7 @@ Blame |
|
|
|
</view> |
|
|
|
<view class="form-item"> |
|
|
|
<text class="label">您的姓名</text> |
|
|
|
<input class="input" type="text" v-model="formData.contactName" placeholder="请输入您的姓名" |
|
|
|
<input class="input" type="nickname" v-model="formData.contactName" placeholder="请输入您的姓名" |
|
|
|
placeholder-class="placeholder" /> |
|
|
|
</view> |
|
|
|
<view class="form-item"> |
|
|
@ -80,7 +42,7 @@ Blame |
|
|
|
<input class="input" type="number" v-model="formData.contactPhone" placeholder="请输入您的手机号" |
|
|
|
placeholder-class="placeholder" /> |
|
|
|
</view> |
|
|
|
<view class="form-item region-item" @click="showRegionPicker"> |
|
|
|
<view class="form-item region-item" @tap="showRegionPicker"> |
|
|
|
<text class="label">所在地区</text> |
|
|
|
<view class="region-value"> |
|
|
|
<text :class="{ 'placeholder': !formData.region }" style="color: #000;">{{ formData.region || |
|
|
@ -97,8 +59,12 @@ Blame |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 提交按钮 --> |
|
|
|
<view class="submit-btn" @click="submitApplication"> |
|
|
|
提交申请 |
|
|
|
<view v-if="!this.beModify" class="submit-btn" @tap="submitApplication"> |
|
|
|
{{ !identity ? '提交申请' : '提交保存' }} |
|
|
|
</view> |
|
|
|
<view v-else class="submit-btn-container"> |
|
|
|
<view class="submit-btn-modify" @tap="submitApplication">修改</view> |
|
|
|
<view class="submit-btn-save" @tap="submitApplication">保存</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -106,21 +72,25 @@ Blame |
|
|
|
|
|
|
|
<script> |
|
|
|
import navbar from '@/components/base/navbar.vue' |
|
|
|
import shareConfig from '@/mixins/configList.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
navbar |
|
|
|
}, |
|
|
|
mixins: [shareConfig], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
locationImage: '', // 上传的送餐点照片 |
|
|
|
formData: { |
|
|
|
locationImage: '', // 上传的送餐点照片 |
|
|
|
name: '', // 送餐点名称 |
|
|
|
contactName: '', // 联系人姓名 |
|
|
|
contactPhone: '', // 联系电话 |
|
|
|
region: '', // 所在地区 |
|
|
|
address: '' // 详细地址 |
|
|
|
} |
|
|
|
}, |
|
|
|
identity: uni.getStorageSync('identity'), |
|
|
|
beModify: false // 为团员并且可以修改的模式 |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -133,7 +103,7 @@ export default { |
|
|
|
success: (res) => { |
|
|
|
// 这里可以添加图片上传到服务器的逻辑 |
|
|
|
// 暂时只展示选择的图片 |
|
|
|
this.locationImage = res.tempFilePaths[0] |
|
|
|
this.formData.locationImage = res.tempFilePaths[0] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -153,7 +123,7 @@ export default { |
|
|
|
// 提交申请 |
|
|
|
submitApplication() { |
|
|
|
// 表单验证 |
|
|
|
if (!this.locationImage) { |
|
|
|
if (!this.formData.locationImage) { |
|
|
|
return uni.showToast({ |
|
|
|
title: '请上传送餐点照片', |
|
|
|
icon: 'none' |
|
|
@ -211,14 +181,20 @@ export default { |
|
|
|
setTimeout(() => { |
|
|
|
uni.hideLoading() |
|
|
|
|
|
|
|
if (this.identity) { |
|
|
|
// 如果是团长 保存表单信息 直接返回了 |
|
|
|
this.saveInfo() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
uni.showModal({ |
|
|
|
title: '提交成功!', |
|
|
|
content: '我们的工作人员会及时与您联系,\n请保持电话畅通!~', |
|
|
|
content: '我们的工作人员会及时与您联系,\n请保持电话畅通!', |
|
|
|
showCancel: false, |
|
|
|
confirmColor: '#019245', |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
// 延迟返回上一页 |
|
|
|
// 如果是团员 延迟返回上一页 |
|
|
|
setTimeout(() => { |
|
|
|
this.$utils.navigateBack() |
|
|
|
}, 500) |
|
|
@ -226,6 +202,27 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 1000) |
|
|
|
}, |
|
|
|
|
|
|
|
// 保存信息 针对团长端 |
|
|
|
saveInfo() { |
|
|
|
uni.setStorageSync('team_form_data', JSON.stringify(this.formData)) |
|
|
|
uni.showToast({ |
|
|
|
title: '保存成功!', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
if (this.identity) { |
|
|
|
// 如果是团员 才去获取团长信息 |
|
|
|
const addData = uni.getStorageSync('team_form_data') |
|
|
|
if (addData) { |
|
|
|
this.beModify = true |
|
|
|
this.formData = JSON.parse(addData) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -372,6 +369,35 @@ export default { |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
border-radius: 50rpx; |
|
|
|
// margin-top: 60rpx; |
|
|
|
} |
|
|
|
.submit-btn-container { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
margin: 40rpx auto 0; |
|
|
|
width: 74%; |
|
|
|
.submit-btn-modify { |
|
|
|
width: 45%; |
|
|
|
height: 90rpx; |
|
|
|
background-color: #fff; |
|
|
|
color: $uni-color; |
|
|
|
font-size: 32rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
border-radius: 50rpx; |
|
|
|
border: 4rpx solid $uni-color; |
|
|
|
} |
|
|
|
.submit-btn-save { |
|
|
|
width: 45%; |
|
|
|
height: 90rpx; |
|
|
|
background-color: $uni-color; |
|
|
|
color: #fff; |
|
|
|
font-size: 32rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
border-radius: 50rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |