Browse Source

'最终修改版本-添加报名表和个人信息页面的真实姓名与宿集区'

main
hflllll 1 week ago
parent
commit
12e319c9eb
73 changed files with 343 additions and 174 deletions
  1. +7
    -0
      api/modules/config.js
  2. +1
    -1
      config/index.js
  3. +16
    -4
      stores/index.js
  4. +16
    -32
      subPages/index/components/SignUpForm.vue
  5. +14
    -0
      subPages/login/userInfo.vue
  6. +51
    -16
      subPages/my/myProfile.vue
  7. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  8. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  9. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/GlobalPopup.js.map
  10. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/HomePageNav.js.map
  11. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/Search.js.map
  12. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/RecommendedActivities.js.map
  13. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/VolunteerFeatures.js.map
  14. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/VolunteerHeader.js.map
  15. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/VolunteerRanking.js.map
  16. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/shop/PointsCard.js.map
  17. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/shop/ShopContent.js.map
  18. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/activity.js.map
  19. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/community.js.map
  20. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  21. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/my.js.map
  22. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/shop.js.map
  23. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/community/publishPost.js.map
  24. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/activityCalendar.js.map
  25. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/activityDetail.js.map
  26. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/announcement.js.map
  27. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/announcementDetail.js.map
  28. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/components/SignUpForm.js.map
  29. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/organizationIntroduction.js.map
  30. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/ranking.js.map
  31. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/volunteerApply.js.map
  32. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/login/login.js.map
  33. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/login/userInfo.js.map
  34. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/activityCheckin.js.map
  35. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/activityFavorites.js.map
  36. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/checkinCode.js.map
  37. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/exchangeDetail.js.map
  38. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/exchangeRecord.js.map
  39. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/myActivityDetail.js.map
  40. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/myProfile.js.map
  41. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/myRegistrations.js.map
  42. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/productFavorites.js.map
  43. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/signupSuccess.js.map
  44. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/shop/goodsDetail.js.map
  45. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/subPages/shop/pointsDetail.js.map
  46. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-button/components/uv-button/uv-button.js.map
  47. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-empty/components/uv-empty/uv-empty.js.map
  48. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-form/components/uv-form-item/uv-form-item.js.map
  49. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-icon/components/uv-icon/uv-icon.js.map
  50. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-input/components/uv-input/uv-input.js.map
  51. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-line/components/uv-line/uv-line.js.map
  52. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.js.map
  53. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-modal/components/uv-modal/uv-modal.js.map
  54. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-overlay/components/uv-overlay/uv-overlay.js.map
  55. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-picker/components/uv-picker/uv-picker.js.map
  56. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-popup/components/uv-popup/uv-popup.js.map
  57. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.js.map
  58. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-safe-bottom/components/uv-safe-bottom/uv-safe-bottom.js.map
  59. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-search/components/uv-search/uv-search.js.map
  60. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-status-bar/components/uv-status-bar/uv-status-bar.js.map
  61. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-swiper/components/uv-swiper-indicator/uv-swiper-indicator.js.map
  62. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-swiper/components/uv-swiper/uv-swiper.js.map
  63. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-textarea/components/uv-textarea/uv-textarea.js.map
  64. +1
    -1
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-toolbar/components/uv-toolbar/uv-toolbar.js.map
  65. +64
    -18
      unpackage/dist/dev/mp-weixin/common/vendor.js
  66. +2
    -2
      unpackage/dist/dev/mp-weixin/pages/components/index/VolunteerHeader.json
  67. +2
    -2
      unpackage/dist/dev/mp-weixin/pages/components/shop/PointsCard.json
  68. +14
    -27
      unpackage/dist/dev/mp-weixin/subPages/index/components/SignUpForm.js
  69. +1
    -1
      unpackage/dist/dev/mp-weixin/subPages/index/components/SignUpForm.wxml
  70. +27
    -7
      unpackage/dist/dev/mp-weixin/subPages/login/userInfo.js
  71. +66
    -4
      unpackage/dist/dev/mp-weixin/subPages/my/myProfile.js
  72. +3
    -1
      unpackage/dist/dev/mp-weixin/subPages/my/myProfile.json
  73. +1
    -1
      unpackage/dist/dev/mp-weixin/subPages/my/myProfile.wxml

+ 7
- 0
api/modules/config.js View File

@ -44,4 +44,11 @@ export default {
}) })
}, },
async queryDormitoryList() {
return http({
url: '/config/queryDormitoryList',
method: 'GET',
noToken: true
})
},
} }

+ 1
- 1
config/index.js View File

@ -6,7 +6,7 @@
* aliOSSConfig 阿里云配置 * aliOSSConfig 阿里云配置
* debounceConfig 防抖相关配置 * debounceConfig 防抖相关配置
*/ */
const env = 'production'
const env = 'development'
// 全局配置 // 全局配置


+ 16
- 4
stores/index.js View File

@ -11,7 +11,9 @@ const store = new Vuex.Store({
careerList: [], careerList: [],
qualificationList: [], qualificationList: [],
categoryGoodsList: [], categoryGoodsList: [],
categoryActivityList: []
categoryActivityList: [],
// 宿集区列表
areaList: []
}, },
mutations: { mutations: {
@ -29,7 +31,10 @@ const store = new Vuex.Store({
}, },
setCategoryActivityList(state, data) { setCategoryActivityList(state, data) {
state.categoryActivityList = data state.categoryActivityList = data
}
},
setAreaList(state, data) {
state.areaList = data
},
}, },
actions: { actions: {
// 查询配置列表 // 查询配置列表
@ -81,10 +86,16 @@ const store = new Vuex.Store({
commit('setCategoryActivityList', res.result.records) commit('setCategoryActivityList', res.result.records)
}, },
// 查询宿集区列表
async getAreaList({ commit }) {
const res = await api.config.queryDormitoryList()
commit('setAreaList', res.result.records)
},
// 初始化数据 // 初始化数据
async initData({ dispatch, state }) { async initData({ dispatch, state }) {
// 检查是否已初始化 // 检查是否已初始化
if (state.configList.length > 0 && state.careerList.length > 0 && state.qualificationList.length > 0 && state.categoryGoodsList.length > 0 && state.categoryActivityList.length > 0) {
if (state.configList.length > 0 && state.careerList.length > 0 && state.qualificationList.length > 0 && state.categoryGoodsList.length > 0 && state.categoryActivityList.length > 0 && state.areaList.length > 0) {
console.log('配置数据已初始化,无需重复初始化') console.log('配置数据已初始化,无需重复初始化')
return return
@ -96,7 +107,8 @@ const store = new Vuex.Store({
dispatch('getCareer'), dispatch('getCareer'),
dispatch('getQualification'), dispatch('getQualification'),
dispatch('getCategoryGoodsList'), dispatch('getCategoryGoodsList'),
dispatch('getCategoryActivityList')
dispatch('getCategoryActivityList'),
dispatch('getAreaList')
]) ])
console.log('所有配置数据初始化完成') console.log('所有配置数据初始化完成')
} catch (error) { } catch (error) {


+ 16
- 32
subPages/index/components/SignUpForm.vue View File

@ -69,10 +69,10 @@
<!-- 所在地区 --> <!-- 所在地区 -->
<view class="form-item"> <view class="form-item">
<view class="input-container" @click="chooseLocation">
<text class="input-label">所在</text>
<view class="input-container" @click="openAreaPicker">
<text class="input-label">所在宿集</text>
<view class="picker-input"> <view class="picker-input">
<text class="picker-text" :class="{ placeholder: !formData.area }">{{ formData.area || '请选择地址' }}</text>
<text class="picker-text" :class="{ placeholder: !formData.area }">{{ formData.area || '请选择宿集区' }}</text>
<uv-icon name="arrow-right" size="14" color="#999"></uv-icon> <uv-icon name="arrow-right" size="14" color="#999"></uv-icon>
</view> </view>
</view> </view>
@ -112,7 +112,7 @@
@cancel="onGenderCancel" @cancel="onGenderCancel"
@close="onGenderCancel" @close="onGenderCancel"
></uv-picker> ></uv-picker>
<uv-picker ref="areaPicker" :columns="columns" @confirm="onAreaConfirm"></uv-picker>
</view> </view>
</template> </template>
@ -145,7 +145,11 @@ export default {
} }
} }
}, },
computed:{
columns(){
return [[...this.$store.state.areaList.map(item => item.title)]]
}
},
methods: { methods: {
handleClose() { handleClose() {
this.$emit('close') this.$emit('close')
@ -156,38 +160,18 @@ export default {
this.$refs.genderPicker.open() this.$refs.genderPicker.open()
}, },
chooseLocation() {
uni.chooseLocation({
success: (res) => {
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
console.log('经度:' + res.longitude)
//
this.formData.area = res.address || res.name
//
if (!this.formData.address && res.name) {
this.formData.address = res.name
}
},
fail: (err) => {
console.log('选择位置失败:', err)
uni.showToast({
title: '获取位置失败',
icon: 'none'
})
}
})
openAreaPicker() {
//
this.$refs.areaPicker.open()
}, },
onGenderConfirm(value) { onGenderConfirm(value) {
this.formData.sex = value.value[0] this.formData.sex = value.value[0]
}, },
onGenderCancel() {
//
onAreaConfirm(value) {
this.formData.area = value.value[0]
}, },


+ 14
- 0
subPages/login/userInfo.vue View File

@ -207,6 +207,20 @@ export default {
}); });
return; return;
} }
if (!this.userInfo.name.trim()) {
uni.showToast({
title: '请输入真实姓名',
icon: 'none'
});
return;
}
if (!this.userInfo.area.trim()) {
uni.showToast({
title: '请输入所在宿集区',
icon: 'none'
});
return;
}
if (!this.userInfo.phone.trim()) { if (!this.userInfo.phone.trim()) {
uni.showToast({ uni.showToast({


+ 51
- 16
subPages/my/myProfile.vue View File

@ -28,6 +28,16 @@
</view> </view>
<!-- 昵称 --> <!-- 昵称 -->
<view class="info-item">
<text class="label">真实姓名</text>
<view class="value-container">
<input
class="nickname-input"
v-model="userInfo.name"
placeholder="请输入"
/>
</view>
</view>
<view class="info-item"> <view class="info-item">
<text class="label">昵称</text> <text class="label">昵称</text>
<view class="value-container"> <view class="value-container">
@ -55,6 +65,19 @@
</view> </view>
</view> </view>
<!-- 宿集区选择器 -->
<view class="info-item">
<text class="label">宿集区</text>
<view class="value-container">
<view class="picker-display" @click="showPicker">
<text class="picker-text" :class="{placeholder: !userInfo.area}">{{ userInfo.area || '请选择宿集区' }}</text>
<!-- <text class="picker-arrow">></text> -->
</view>
</view>
</view>
<view class="info-item"> <view class="info-item">
<text class="label">地址</text> <text class="label">地址</text>
<view class="value-container"> <view class="value-container">
@ -68,18 +91,6 @@
</view> </view>
</view> </view>
<!-- 地址 -->
<!-- <view class="info-item">
<text class="label">地址</text>
<view class="value-container" @click="openMap">
<text class="address-input">
{{ userInfo.address || '请选择地址' }}
</text>
<text class="address-input" v-else>
请选择地址
</text>
</view>
</view> -->
</view> </view>
<!-- 保存按钮 --> <!-- 保存按钮 -->
@ -88,6 +99,7 @@
保存 保存
</button> </button>
</view> </view>
<uv-picker ref="picker" :columns="columns" @confirm="confirm"></uv-picker>
</view> </view>
</template> </template>
@ -100,11 +112,27 @@ export default {
headImage: '', headImage: '',
nickName: '', nickName: '',
phone: '', phone: '',
address: ''
address: '',
area: '',
name: ''
} }
} }
}, },
computed: {
columns() {
return [[...this.$store.state.areaList?.map(item => item.title)]] || [[]]
}
},
methods: { methods: {
showPicker(){
this.$refs.picker.open()
},
confirm(e){
console.log('我是地区列表',this.columns);
// this.selectedAreaText = e.detail.value[0]
this.userInfo.area = e.value[0]
},
// //
goBack() { goBack() {
uni.navigateBack(); uni.navigateBack();
@ -168,7 +196,9 @@ export default {
nickName: this.userInfo.nickName, nickName: this.userInfo.nickName,
phone: this.userInfo.phone, phone: this.userInfo.phone,
headImage: this.userInfo.headImage, headImage: this.userInfo.headImage,
address: this.userInfo.address
address: this.userInfo.address,
name: this.userInfo.name,
area: this.userInfo.area
}) })
if (res.code === 200) { if (res.code === 200) {
uni.showToast({ uni.showToast({
@ -185,11 +215,16 @@ export default {
async getUserInfo() { async getUserInfo() {
const res = await this.$api.user.queryUser() const res = await this.$api.user.queryUser()
this.userInfo = {...this.userInfo, ...res.result} this.userInfo = {...this.userInfo, ...res.result}
// this.userInfo = res.result
} }
}, },
onLoad() { onLoad() {
this.getUserInfo();
if (uni.getStorageSync('token')) {
this.getUserInfo();
}else {
uni.redirectTo({
url: '/subPages/login/login'
})
}
} }
} }
</script> </script>


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/GlobalPopup.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/HomePageNav.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/Search.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/RecommendedActivities.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/VolunteerFeatures.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/VolunteerHeader.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/index/VolunteerRanking.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/shop/PointsCard.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/components/shop/ShopContent.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/activity.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/community.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/my.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/shop.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/community/publishPost.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/activityCalendar.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/activityDetail.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/announcement.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/announcementDetail.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/components/SignUpForm.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/organizationIntroduction.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/ranking.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/index/volunteerApply.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/login/login.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/login/userInfo.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/activityCheckin.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/activityFavorites.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/checkinCode.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/exchangeDetail.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/exchangeRecord.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/myActivityDetail.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/myProfile.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/myRegistrations.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/productFavorites.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/my/signupSuccess.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/shop/goodsDetail.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/subPages/shop/pointsDetail.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-button/components/uv-button/uv-button.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-empty/components/uv-empty/uv-empty.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-form/components/uv-form-item/uv-form-item.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-icon/components/uv-icon/uv-icon.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-input/components/uv-input/uv-input.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-line/components/uv-line/uv-line.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-modal/components/uv-modal/uv-modal.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-overlay/components/uv-overlay/uv-overlay.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-picker/components/uv-picker/uv-picker.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-popup/components/uv-popup/uv-popup.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-safe-bottom/components/uv-safe-bottom/uv-safe-bottom.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-search/components/uv-search/uv-search.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-status-bar/components/uv-status-bar/uv-status-bar.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-swiper/components/uv-swiper-indicator/uv-swiper-indicator.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-swiper/components/uv-swiper/uv-swiper.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-textarea/components/uv-textarea/uv-textarea.js.map
File diff suppressed because it is too large
View File


+ 1
- 1
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uv-toolbar/components/uv-toolbar/uv-toolbar.js.map
File diff suppressed because it is too large
View File


+ 64
- 18
unpackage/dist/dev/mp-weixin/common/vendor.js View File

@ -15043,7 +15043,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
* aliOSSConfig 阿里云配置 * aliOSSConfig 阿里云配置
* debounceConfig 防抖相关配置 * debounceConfig 防抖相关配置
*/ */
var env = 'production';
var env = 'development';
// 全局配置 // 全局配置
var config = { var config = {
@ -15903,6 +15903,25 @@ var _default = {
} }
}, _callee5); }, _callee5);
}))(); }))();
},
queryDormitoryList: function queryDormitoryList() {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
return _regenerator.default.wrap(function _callee6$(_context6) {
while (1) {
switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", (0, _http.default)({
url: '/config/queryDormitoryList',
method: 'GET',
noToken: true
}));
case 1:
case "end":
return _context6.stop();
}
}
}, _callee6);
}))();
} }
}; };
exports.default = _default; exports.default = _default;
@ -19211,7 +19230,9 @@ var store = new _vuex.default.Store({
careerList: [], careerList: [],
qualificationList: [], qualificationList: [],
categoryGoodsList: [], categoryGoodsList: [],
categoryActivityList: []
categoryActivityList: [],
// 宿集区列表
areaList: []
}, },
mutations: { mutations: {
setConfigList: function setConfigList(state, data) { setConfigList: function setConfigList(state, data) {
@ -19228,6 +19249,9 @@ var store = new _vuex.default.Store({
}, },
setCategoryActivityList: function setCategoryActivityList(state, data) { setCategoryActivityList: function setCategoryActivityList(state, data) {
state.categoryActivityList = data; state.categoryActivityList = data;
},
setAreaList: function setAreaList(state, data) {
state.areaList = data;
} }
}, },
actions: { actions: {
@ -19358,39 +19382,61 @@ var store = new _vuex.default.Store({
}, _callee5); }, _callee5);
}))(); }))();
}, },
// 初始化数据
initData: function initData(_ref6) {
// 查询宿集区列表
getAreaList: function getAreaList(_ref6) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
var dispatch, state;
var commit, res;
return _regenerator.default.wrap(function _callee6$(_context6) { return _regenerator.default.wrap(function _callee6$(_context6) {
while (1) { while (1) {
switch (_context6.prev = _context6.next) { switch (_context6.prev = _context6.next) {
case 0: case 0:
dispatch = _ref6.dispatch, state = _ref6.state;
if (!(state.configList.length > 0 && state.careerList.length > 0 && state.qualificationList.length > 0 && state.categoryGoodsList.length > 0 && state.categoryActivityList.length > 0)) {
_context6.next = 4;
commit = _ref6.commit;
_context6.next = 3;
return api.config.queryDormitoryList();
case 3:
res = _context6.sent;
commit('setAreaList', res.result.records);
case 5:
case "end":
return _context6.stop();
}
}
}, _callee6);
}))();
},
// 初始化数据
initData: function initData(_ref7) {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
var dispatch, state;
return _regenerator.default.wrap(function _callee7$(_context7) {
while (1) {
switch (_context7.prev = _context7.next) {
case 0:
dispatch = _ref7.dispatch, state = _ref7.state;
if (!(state.configList.length > 0 && state.careerList.length > 0 && state.qualificationList.length > 0 && state.categoryGoodsList.length > 0 && state.categoryActivityList.length > 0 && state.areaList.length > 0)) {
_context7.next = 4;
break; break;
} }
console.log('配置数据已初始化,无需重复初始化'); console.log('配置数据已初始化,无需重复初始化');
return _context6.abrupt("return");
return _context7.abrupt("return");
case 4: case 4:
_context6.prev = 4;
_context6.next = 7;
return Promise.all([dispatch('getConfig'), dispatch('getCareer'), dispatch('getQualification'), dispatch('getCategoryGoodsList'), dispatch('getCategoryActivityList')]);
_context7.prev = 4;
_context7.next = 7;
return Promise.all([dispatch('getConfig'), dispatch('getCareer'), dispatch('getQualification'), dispatch('getCategoryGoodsList'), dispatch('getCategoryActivityList'), dispatch('getAreaList')]);
case 7: case 7:
console.log('所有配置数据初始化完成'); console.log('所有配置数据初始化完成');
_context6.next = 13;
_context7.next = 13;
break; break;
case 10: case 10:
_context6.prev = 10;
_context6.t0 = _context6["catch"](4);
console.error('配置数据初始化失败:', _context6.t0);
_context7.prev = 10;
_context7.t0 = _context7["catch"](4);
console.error('配置数据初始化失败:', _context7.t0);
case 13: case 13:
case "end": case "end":
return _context6.stop();
return _context7.stop();
} }
} }
}, _callee6, null, [[4, 10]]);
}, _callee7, null, [[4, 10]]);
}))(); }))();
} }
} }


+ 2
- 2
unpackage/dist/dev/mp-weixin/pages/components/index/VolunteerHeader.json View File

@ -1,7 +1,7 @@
{ {
"component": true,
"usingComponents": { "usingComponents": {
"uv-swiper": "/uni_modules/uv-swiper/components/uv-swiper/uv-swiper", "uv-swiper": "/uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
"uv-icon": "/uni_modules/uv-icon/components/uv-icon/uv-icon" "uv-icon": "/uni_modules/uv-icon/components/uv-icon/uv-icon"
}
},
"component": true
} }

+ 2
- 2
unpackage/dist/dev/mp-weixin/pages/components/shop/PointsCard.json View File

@ -1,4 +1,4 @@
{ {
"usingComponents": {},
"component": true
"component": true,
"usingComponents": {}
} }

+ 14
- 27
unpackage/dist/dev/mp-weixin/subPages/index/components/SignUpForm.js View File

@ -151,10 +151,12 @@ __webpack_require__.r(__webpack_exports__);
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) { /* WEBPACK VAR INJECTION */(function(uni) {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports.default = void 0;
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
// //
// //
// //
@ -299,6 +301,13 @@ var _default = {
} }
}; };
}, },
computed: {
columns: function columns() {
return [(0, _toConsumableArray2.default)(this.$store.state.areaList.map(function (item) {
return item.title;
}))];
}
},
methods: { methods: {
handleClose: function handleClose() { handleClose: function handleClose() {
this.$emit('close'); this.$emit('close');
@ -307,37 +316,15 @@ var _default = {
showGenderPicker: function showGenderPicker() { showGenderPicker: function showGenderPicker() {
this.$refs.genderPicker.open(); this.$refs.genderPicker.open();
}, },
chooseLocation: function chooseLocation() {
var _this = this;
uni.chooseLocation({
success: function success(res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
// 设置选中的地址
_this.formData.area = res.address || res.name;
// 如果详细地址为空,也可以自动填充
if (!_this.formData.address && res.name) {
_this.formData.address = res.name;
}
},
fail: function fail(err) {
console.log('选择位置失败:', err);
uni.showToast({
title: '获取位置失败',
icon: 'none'
});
}
});
openAreaPicker: function openAreaPicker() {
// 打开选择器
this.$refs.areaPicker.open();
}, },
onGenderConfirm: function onGenderConfirm(value) { onGenderConfirm: function onGenderConfirm(value) {
this.formData.sex = value.value[0]; this.formData.sex = value.value[0];
}, },
onGenderCancel: function onGenderCancel() {
// 性别选择器取消时的处理
onAreaConfirm: function onAreaConfirm(value) {
this.formData.area = value.value[0];
}, },
validateForm: function validateForm() { validateForm: function validateForm() {
if (!this.formData.name.trim()) { if (!this.formData.name.trim()) {


+ 1
- 1
unpackage/dist/dev/mp-weixin/subPages/index/components/SignUpForm.wxml View File

@ -1 +1 @@
<view class="data-v-72d8ad3b"><uv-popup vue-id="2f8509aa-1" mode="bottom" border-radius="20" data-ref="popup" data-event-opts="{{[['^close',[['handleClose']]]]}}" bind:close="__e" class="data-v-72d8ad3b vue-ref" bind:__l="__l" vue-slots="{{['default']}}"><view class="signup-form data-v-72d8ad3b"><view class="form-header data-v-72d8ad3b"><text class="form-title data-v-72d8ad3b">我要报名</text></view><view class="form-content data-v-72d8ad3b"><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label required data-v-72d8ad3b">姓名</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-2')+','+('2f8509aa-1')}}" placeholder="请输入您的姓名" border="none" custom-style="{{inputStyle}}" value="{{formData.name}}" data-event-opts="{{[['^input',[['__set_model',['$0','name','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view><view class="form-item data-v-72d8ad3b"><view data-event-opts="{{[['tap',[['showGenderPicker',['$event']]]]]}}" class="input-container data-v-72d8ad3b" bindtap="__e"><text class="input-label required data-v-72d8ad3b">性别</text><view class="picker-input data-v-72d8ad3b"><text class="{{['picker-text','data-v-72d8ad3b',(!formData.sex)?'placeholder':'']}}">{{formData.sex||'请选择'}}</text><uv-icon vue-id="{{('2f8509aa-3')+','+('2f8509aa-1')}}" name="arrow-right" size="14" color="#999" class="data-v-72d8ad3b" bind:__l="__l"></uv-icon></view></view></view><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label required data-v-72d8ad3b">年龄</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-4')+','+('2f8509aa-1')}}" placeholder="请输入您的年龄" type="number" border="none" custom-style="{{inputStyle}}" value="{{formData.age}}" data-event-opts="{{[['^input',[['__set_model',['$0','age','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label required data-v-72d8ad3b">手机号</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-5')+','+('2f8509aa-1')}}" placeholder="请输入您的手机号" type="number" border="none" custom-style="{{inputStyle}}" value="{{formData.phone}}" data-event-opts="{{[['^input',[['__set_model',['$0','phone','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view><view class="form-item data-v-72d8ad3b"><view data-event-opts="{{[['tap',[['chooseLocation',['$event']]]]]}}" class="input-container data-v-72d8ad3b" bindtap="__e"><text class="input-label data-v-72d8ad3b">所在区</text><view class="picker-input data-v-72d8ad3b"><text class="{{['picker-text','data-v-72d8ad3b',(!formData.area)?'placeholder':'']}}">{{formData.area||'请选择地址'}}</text><uv-icon vue-id="{{('2f8509aa-6')+','+('2f8509aa-1')}}" name="arrow-right" size="14" color="#999" class="data-v-72d8ad3b" bind:__l="__l"></uv-icon></view></view></view><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label data-v-72d8ad3b">详细地址</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-7')+','+('2f8509aa-1')}}" placeholder="请输入详细地址" border="none" custom-style="{{inputStyle}}" value="{{formData.address}}" data-event-opts="{{[['^input',[['__set_model',['$0','address','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view></view><view class="form-footer data-v-72d8ad3b"><uv-button vue-id="{{('2f8509aa-8')+','+('2f8509aa-1')}}" type="primary" text="提交报名" custom-style="{{buttonStyle}}" data-event-opts="{{[['^click',[['submitForm']]]]}}" bind:click="__e" class="data-v-72d8ad3b" bind:__l="__l"></uv-button></view></view></uv-popup><uv-picker vue-id="2f8509aa-9" columns="{{genderOptions}}" data-ref="genderPicker" data-event-opts="{{[['^confirm',[['onGenderConfirm']]],['^cancel',[['onGenderCancel']]],['^close',[['onGenderCancel']]]]}}" bind:confirm="__e" bind:cancel="__e" bind:close="__e" class="data-v-72d8ad3b vue-ref" bind:__l="__l"></uv-picker></view>
<view class="data-v-72d8ad3b"><uv-popup vue-id="2f8509aa-1" mode="bottom" border-radius="20" data-ref="popup" data-event-opts="{{[['^close',[['handleClose']]]]}}" bind:close="__e" class="data-v-72d8ad3b vue-ref" bind:__l="__l" vue-slots="{{['default']}}"><view class="signup-form data-v-72d8ad3b"><view class="form-header data-v-72d8ad3b"><text class="form-title data-v-72d8ad3b">我要报名</text></view><view class="form-content data-v-72d8ad3b"><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label required data-v-72d8ad3b">姓名</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-2')+','+('2f8509aa-1')}}" placeholder="请输入您的姓名" border="none" custom-style="{{inputStyle}}" value="{{formData.name}}" data-event-opts="{{[['^input',[['__set_model',['$0','name','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view><view class="form-item data-v-72d8ad3b"><view data-event-opts="{{[['tap',[['showGenderPicker',['$event']]]]]}}" class="input-container data-v-72d8ad3b" bindtap="__e"><text class="input-label required data-v-72d8ad3b">性别</text><view class="picker-input data-v-72d8ad3b"><text class="{{['picker-text','data-v-72d8ad3b',(!formData.sex)?'placeholder':'']}}">{{formData.sex||'请选择'}}</text><uv-icon vue-id="{{('2f8509aa-3')+','+('2f8509aa-1')}}" name="arrow-right" size="14" color="#999" class="data-v-72d8ad3b" bind:__l="__l"></uv-icon></view></view></view><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label required data-v-72d8ad3b">年龄</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-4')+','+('2f8509aa-1')}}" placeholder="请输入您的年龄" type="number" border="none" custom-style="{{inputStyle}}" value="{{formData.age}}" data-event-opts="{{[['^input',[['__set_model',['$0','age','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label required data-v-72d8ad3b">手机号</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-5')+','+('2f8509aa-1')}}" placeholder="请输入您的手机号" type="number" border="none" custom-style="{{inputStyle}}" value="{{formData.phone}}" data-event-opts="{{[['^input',[['__set_model',['$0','phone','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view><view class="form-item data-v-72d8ad3b"><view data-event-opts="{{[['tap',[['openAreaPicker',['$event']]]]]}}" class="input-container data-v-72d8ad3b" bindtap="__e"><text class="input-label data-v-72d8ad3b">所在宿集区</text><view class="picker-input data-v-72d8ad3b"><text class="{{['picker-text','data-v-72d8ad3b',(!formData.area)?'placeholder':'']}}">{{formData.area||'请选择宿集区'}}</text><uv-icon vue-id="{{('2f8509aa-6')+','+('2f8509aa-1')}}" name="arrow-right" size="14" color="#999" class="data-v-72d8ad3b" bind:__l="__l"></uv-icon></view></view></view><view class="form-item data-v-72d8ad3b"><view class="input-container data-v-72d8ad3b"><text class="input-label data-v-72d8ad3b">详细地址</text><uv-input bind:input="__e" vue-id="{{('2f8509aa-7')+','+('2f8509aa-1')}}" placeholder="请输入详细地址" border="none" custom-style="{{inputStyle}}" value="{{formData.address}}" data-event-opts="{{[['^input',[['__set_model',['$0','address','$event',[]],['formData']]]]]}}" class="data-v-72d8ad3b" bind:__l="__l"></uv-input></view></view></view><view class="form-footer data-v-72d8ad3b"><uv-button vue-id="{{('2f8509aa-8')+','+('2f8509aa-1')}}" type="primary" text="提交报名" custom-style="{{buttonStyle}}" data-event-opts="{{[['^click',[['submitForm']]]]}}" bind:click="__e" class="data-v-72d8ad3b" bind:__l="__l"></uv-button></view></view></uv-popup><uv-picker vue-id="2f8509aa-9" columns="{{genderOptions}}" data-ref="genderPicker" data-event-opts="{{[['^confirm',[['onGenderConfirm']]],['^cancel',[['onGenderCancel']]],['^close',[['onGenderCancel']]]]}}" bind:confirm="__e" bind:cancel="__e" bind:close="__e" class="data-v-72d8ad3b vue-ref" bind:__l="__l"></uv-picker><uv-picker vue-id="2f8509aa-10" columns="{{columns}}" data-ref="areaPicker" data-event-opts="{{[['^confirm',[['onAreaConfirm']]]]}}" bind:confirm="__e" class="data-v-72d8ad3b vue-ref" bind:__l="__l"></uv-picker></view>

+ 27
- 7
unpackage/dist/dev/mp-weixin/subPages/login/userInfo.js View File

@ -428,37 +428,57 @@ var _default = {
}); });
return _context4.abrupt("return"); return _context4.abrupt("return");
case 3: case 3:
if (_this4.userInfo.phone.trim()) {
if (_this4.userInfo.name.trim()) {
_context4.next = 6; _context4.next = 6;
break; break;
} }
uni.showToast({ uni.showToast({
title: '请输入手机号',
title: '请输入真实姓名',
icon: 'none' icon: 'none'
}); });
return _context4.abrupt("return"); return _context4.abrupt("return");
case 6: case 6:
if (/^1[3-9]\d{9}$/.test(_this4.userInfo.phone)) {
if (_this4.userInfo.area.trim()) {
_context4.next = 9; _context4.next = 9;
break; break;
} }
uni.showToast({ uni.showToast({
title: '请输入正确的手机号',
title: '请输入所在宿集区',
icon: 'none' icon: 'none'
}); });
return _context4.abrupt("return"); return _context4.abrupt("return");
case 9: case 9:
if (_this4.userInfo.phone.trim()) {
_context4.next = 12;
break;
}
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
return _context4.abrupt("return");
case 12:
if (/^1[3-9]\d{9}$/.test(_this4.userInfo.phone)) {
_context4.next = 15;
break;
}
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
return _context4.abrupt("return");
case 15:
console.log('提交用户信息', _this4.userInfo); console.log('提交用户信息', _this4.userInfo);
// 提交用户信息 // 提交用户信息
_context4.next = 12;
_context4.next = 18;
return _this4.$api.user.updateUser({ return _this4.$api.user.updateUser({
nickName: _this4.userInfo.nickName, nickName: _this4.userInfo.nickName,
phone: _this4.userInfo.phone, phone: _this4.userInfo.phone,
headImage: _this4.userInfo.headImage, headImage: _this4.userInfo.headImage,
address: '' address: ''
}); });
case 12:
case 18:
// 这里可以调用API保存用户信息 // 这里可以调用API保存用户信息
uni.showToast({ uni.showToast({
title: '信息保存成功', title: '信息保存成功',
@ -471,7 +491,7 @@ var _default = {
url: '/pages/index/index' url: '/pages/index/index'
}); });
}, 1000); }, 1000);
case 14:
case 20:
case "end": case "end":
return _context4.stop(); return _context4.stop();
} }


+ 66
- 4
unpackage/dist/dev/mp-weixin/subPages/my/myProfile.js View File

@ -98,6 +98,29 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components var components
try {
components = {
uvPicker: function () {
return Promise.all(/*! import() | uni_modules/uv-picker/components/uv-picker/uv-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uv-picker/components/uv-picker/uv-picker")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uv-picker/components/uv-picker/uv-picker.vue */ 426))
},
}
} catch (e) {
if (
e.message.indexOf("Cannot find module") !== -1 &&
e.message.indexOf(".vue") !== -1
) {
console.error(e.message)
console.error("1. 排查组件名称拼写是否正确")
console.error(
"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
)
console.error(
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
)
} else {
throw e
}
}
var render = function () { var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
@ -154,6 +177,7 @@ exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30)); var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32)); var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
// //
@ -249,6 +273,18 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
var _default = { var _default = {
name: 'MyProfile', name: 'MyProfile',
data: function data() { data: function data() {
@ -257,11 +293,30 @@ var _default = {
headImage: '', headImage: '',
nickName: '', nickName: '',
phone: '', phone: '',
address: ''
address: '',
area: '',
name: ''
} }
}; };
}, },
computed: {
columns: function columns() {
var _this$$store$state$ar;
return [(0, _toConsumableArray2.default)((_this$$store$state$ar = this.$store.state.areaList) === null || _this$$store$state$ar === void 0 ? void 0 : _this$$store$state$ar.map(function (item) {
return item.title;
}))] || false;
}
},
methods: { methods: {
showPicker: function showPicker() {
this.$refs.picker.open();
},
confirm: function confirm(e) {
console.log('我是地区列表', this.columns);
// this.selectedAreaText = e.detail.value[0]
this.userInfo.area = e.value[0];
},
// 返回上一页 // 返回上一页
goBack: function goBack() { goBack: function goBack() {
uni.navigateBack(); uni.navigateBack();
@ -350,7 +405,9 @@ var _default = {
nickName: _this2.userInfo.nickName, nickName: _this2.userInfo.nickName,
phone: _this2.userInfo.phone, phone: _this2.userInfo.phone,
headImage: _this2.userInfo.headImage, headImage: _this2.userInfo.headImage,
address: _this2.userInfo.address
address: _this2.userInfo.address,
name: _this2.userInfo.name,
area: _this2.userInfo.area
}); });
case 8: case 8:
res = _context2.sent; res = _context2.sent;
@ -385,7 +442,6 @@ var _default = {
case 2: case 2:
res = _context3.sent; res = _context3.sent;
_this3.userInfo = _objectSpread(_objectSpread({}, _this3.userInfo), res.result); _this3.userInfo = _objectSpread(_objectSpread({}, _this3.userInfo), res.result);
// this.userInfo = res.result
case 4: case 4:
case "end": case "end":
return _context3.stop(); return _context3.stop();
@ -396,7 +452,13 @@ var _default = {
} }
}, },
onLoad: function onLoad() { onLoad: function onLoad() {
this.getUserInfo();
if (uni.getStorageSync('token')) {
this.getUserInfo();
} else {
uni.redirectTo({
url: '/subPages/login/login'
});
}
} }
}; };
exports.default = _default; exports.default = _default;


+ 3
- 1
unpackage/dist/dev/mp-weixin/subPages/my/myProfile.json View File

@ -1,4 +1,6 @@
{ {
"navigationBarTitleText": "我的资料", "navigationBarTitleText": "我的资料",
"usingComponents": {}
"usingComponents": {
"uv-picker": "/uni_modules/uv-picker/components/uv-picker/uv-picker"
}
} }

+ 1
- 1
unpackage/dist/dev/mp-weixin/subPages/my/myProfile.wxml View File

@ -1 +1 @@
<view class="profile-container data-v-247e4d67"><view class="section data-v-247e4d67"><view class="section-title data-v-247e4d67"><view class="vertical-line data-v-247e4d67"></view><view class="data-v-247e4d67"><text class="title-text data-v-247e4d67">基本资料</text></view></view><view class="avatar-section data-v-247e4d67"><button class="avatar-button data-v-247e4d67" open-type="chooseAvatar" data-event-opts="{{[['chooseavatar',[['onChooseAvatar',['$event']]]]]}}" bindchooseavatar="__e"><image class="avatar data-v-247e4d67" src="{{userInfo.headImage||'/static/待上传头像.png'}}" mode="aspectFill"></image></button><text class="avatar-tip data-v-247e4d67">点击更换头像</text></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">昵称</text><view class="value-container data-v-247e4d67"><input class="nickname-input data-v-247e4d67" placeholder="请输入" type="nickname" data-event-opts="{{[['blur',[['onNicknameBlur',['$event']]]],['input',[['__set_model',['$0','nickName','$event',[]],['userInfo']]]]]}}" value="{{userInfo.nickName}}" bindblur="__e" bindinput="__e"/></view></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">手机号</text><view class="value-container data-v-247e4d67"><input class="phone-input data-v-247e4d67" placeholder="请输入" type="number" maxlength="11" data-event-opts="{{[['input',[['__set_model',['$0','phone','$event',[]],['userInfo']]]]]}}" value="{{userInfo.phone}}" bindinput="__e"/></view></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">地址</text><view class="value-container data-v-247e4d67"><input class="address-input data-v-247e4d67" placeholder="{{$root.m0}}" type="text" maxlength="11" data-event-opts="{{[['input',[['__set_model',['$0','address','$event',[]],['userInfo']]]]]}}" value="{{userInfo.address}}" bindinput="__e"/></view></view></view><view class="save-section data-v-247e4d67"><button data-event-opts="{{[['tap',[['saveProfile',['$event']]]]]}}" class="save-button data-v-247e4d67" bindtap="__e">保存</button></view></view>
<view class="profile-container data-v-247e4d67"><view class="section data-v-247e4d67"><view class="section-title data-v-247e4d67"><view class="vertical-line data-v-247e4d67"></view><view class="data-v-247e4d67"><text class="title-text data-v-247e4d67">基本资料</text></view></view><view class="avatar-section data-v-247e4d67"><button class="avatar-button data-v-247e4d67" open-type="chooseAvatar" data-event-opts="{{[['chooseavatar',[['onChooseAvatar',['$event']]]]]}}" bindchooseavatar="__e"><image class="avatar data-v-247e4d67" src="{{userInfo.headImage||'/static/待上传头像.png'}}" mode="aspectFill"></image></button><text class="avatar-tip data-v-247e4d67">点击更换头像</text></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">真实姓名</text><view class="value-container data-v-247e4d67"><input class="nickname-input data-v-247e4d67" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','name','$event',[]],['userInfo']]]]]}}" value="{{userInfo.name}}" bindinput="__e"/></view></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">昵称</text><view class="value-container data-v-247e4d67"><input class="nickname-input data-v-247e4d67" placeholder="请输入" type="nickname" data-event-opts="{{[['blur',[['onNicknameBlur',['$event']]]],['input',[['__set_model',['$0','nickName','$event',[]],['userInfo']]]]]}}" value="{{userInfo.nickName}}" bindblur="__e" bindinput="__e"/></view></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">手机号</text><view class="value-container data-v-247e4d67"><input class="phone-input data-v-247e4d67" placeholder="请输入" type="number" maxlength="11" data-event-opts="{{[['input',[['__set_model',['$0','phone','$event',[]],['userInfo']]]]]}}" value="{{userInfo.phone}}" bindinput="__e"/></view></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">宿集区</text><view class="value-container data-v-247e4d67"><view data-event-opts="{{[['tap',[['showPicker',['$event']]]]]}}" class="picker-display data-v-247e4d67" bindtap="__e"><text class="{{['picker-text','data-v-247e4d67',(!userInfo.area)?'placeholder':'']}}">{{userInfo.area||'请选择宿集区'}}</text></view></view></view><view class="info-item data-v-247e4d67"><text class="label data-v-247e4d67">地址</text><view class="value-container data-v-247e4d67"><input class="address-input data-v-247e4d67" placeholder="{{$root.m0}}" type="text" maxlength="11" data-event-opts="{{[['input',[['__set_model',['$0','address','$event',[]],['userInfo']]]]]}}" value="{{userInfo.address}}" bindinput="__e"/></view></view></view><view class="save-section data-v-247e4d67"><button data-event-opts="{{[['tap',[['saveProfile',['$event']]]]]}}" class="save-button data-v-247e4d67" bindtap="__e">保存</button></view><uv-picker vue-id="6b4be07f-1" columns="{{columns}}" data-ref="picker" data-event-opts="{{[['^confirm',[['confirm']]]]}}" bind:confirm="__e" class="data-v-247e4d67 vue-ref" bind:__l="__l"></uv-picker></view>

Loading…
Cancel
Save