Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
34251b7b00
56 changed files with 901 additions and 199 deletions
  1. +6
    -0
      App.vue
  2. +23
    -1
      api/api.js
  3. +17
    -5
      components/base/tabbar.vue
  4. +38
    -19
      components/list/dynamic/dynamicItem.vue
  5. +2
    -1
      components/user/certificationPopup.vue
  6. +11
    -1
      components/user/createDetailPopup.vue
  7. +142
    -0
      components/user/customerServicePopup.vue
  8. +46
    -0
      components/user/sharePopup.vue
  9. +14
    -0
      dict/dict.js
  10. +30
    -0
      mixins/sex.js
  11. +6
    -0
      pages.json
  12. +66
    -20
      pages/index/center.vue
  13. +100
    -14
      pages/index/index.vue
  14. +1
    -0
      pages/index/message.vue
  15. +1
    -1
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  16. +56
    -33
      pages_order/auth/wxUserInfo.vue
  17. +59
    -31
      pages_order/components/list/gourmet/gourmetItem.vue
  18. +77
    -0
      pages_order/components/list/scenicSpot/scenicSpotItem.vue
  19. +3
    -1
      pages_order/components/list/workList/index.vue
  20. +19
    -3
      pages_order/gourmet/gourmetList.vue
  21. +95
    -51
      pages_order/post/addPost.vue
  22. +4
    -10
      pages_order/renting/rentingList.vue
  23. +57
    -0
      pages_order/scenicSpot/scenicSpotList.vue
  24. +18
    -6
      pages_order/work/workList.vue
  25. BIN
      static/image/cart/1.png
  26. BIN
      static/image/center/1.png
  27. +0
    -1
      static/image/center/11.svg
  28. BIN
      static/image/center/2.png
  29. BIN
      static/image/center/3.png
  30. BIN
      static/image/center/4.png
  31. BIN
      static/image/center/5.png
  32. BIN
      static/image/center/6.png
  33. BIN
      static/image/center/7.png
  34. BIN
      static/image/center/8.png
  35. BIN
      static/image/center/9.png
  36. BIN
      static/image/home/0.png
  37. BIN
      static/image/home/1.png
  38. BIN
      static/image/home/2.png
  39. BIN
      static/image/home/3.png
  40. BIN
      static/image/home/address-icon.png
  41. BIN
      static/image/home/arrow-icon.png
  42. BIN
      static/image/home/cart.png
  43. BIN
      static/image/home/photo.png
  44. BIN
      static/image/home/search-icon.png
  45. BIN
      static/image/tabbar/cart-a.png
  46. BIN
      static/image/tabbar/cart.png
  47. BIN
      static/image/tabbar/category-a.png
  48. BIN
      static/image/tabbar/category.png
  49. BIN
      static/image/tabbar/center-a.png
  50. BIN
      static/image/tabbar/center.png
  51. BIN
      static/image/tabbar/home-a.png
  52. BIN
      static/image/tabbar/home.png
  53. BIN
      static/image/tabbar/order-a.png
  54. BIN
      static/image/tabbar/order.png
  55. +1
    -0
      uni.scss
  56. +9
    -1
      utils/index.js

+ 6
- 0
App.vue View File

@ -21,5 +21,11 @@
}
.page{
padding-top: var(--window-top);
}
.pageList{
/deep/ .uv-search__content__input{
padding: 10rpx !important;
}
}
</style>

+ 23
- 1
api/api.js View File

@ -91,11 +91,16 @@ const config = {
url: '/city/getRentDetail',
method: 'GET',
},
//根据分类获取动态帖子列表带分页
//获取动态帖子列表
getPostPage: {
url: '/city/getPostPage',
method: 'GET',
},
//获取帖子详情
getPostDetail: {
url: '/city/getPostDetail',
method: 'GET',
},
//获取活动列表信息
getActivityPage: {
url: '/city/getActivityPage',
@ -121,6 +126,11 @@ const config = {
url: '/city/getCityList',
method: 'GET',
},
//获取景点列表带分页
getScenicPage: {
url: '/city/getScenicPage',
method: 'GET',
},
@ -134,6 +144,18 @@ const config = {
limit : 1000,
auth : true,
},
//查询自己发布的动态
getMyPostPage: {
url: '/token/getMyPostPage',
method: 'GET',
auth : true,
},
//删除自己发布的动态
deletePost: {
url: '/token/deletePost',
method: 'POST',
auth : true,
},
//店铺认证
companyAuthentication: {
url: '/token/companyAuthentication',


+ 17
- 5
components/base/tabbar.vue View File

@ -9,9 +9,13 @@
v-if="!item.isNotShop || !userShop"
@click="toPath(item, index)">
<view class="icon">
<image :src="select == index ?
<!-- <image :src="select == index ?
item.selectedIconPath :
item.iconPath" class="icon-image" mode=""></image>
item.iconPath" class="icon-image" mode=""></image> -->
<uv-icon
size="54rpx"
:color="select == index ? '#5baaff' : '#BCBCBC'"
:name="item.icon"></uv-icon>
</view>
<view class="title">
{{ item.title }}
@ -36,25 +40,29 @@
"selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": "首页"
"title": "首页",
icon : 'home',
},
{
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/activity",
"title": "活动"
"title": "活动",
icon : 'gift',
},
{
"selectedIconPath": "/static/image/tabbar/cart-a.png",
"iconPath": "/static/image/tabbar/cart.png",
"pagePath": "/pages/index/message",
"title": "消息",
icon : 'chat',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center",
"title": "我的"
"title": "我的",
icon : 'account',
}
]
};
@ -100,6 +108,10 @@
.icon{
width: 54rpx;
height: 54rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.icon-image{
width: 54rpx;
height: 54rpx;


+ 38
- 19
components/list/dynamic/dynamicItem.vue View File

@ -1,25 +1,34 @@
<template>
<view class="works">
<view class="box">
<view class="works" @click="$emit('click')">
<view class="box"
:style="{'--sexcolor' : sex[item.sex].color}">
<view class="headPortraitimg">
<image :src="item.userImage" mode="aspectFill"></image>
</view>
<view class="YaoduUniversalWall">
<view class="heide">
<view class="username text-ellipsis">
{{ item.userName }}
</view>
<view class="inde">
男性
<view class="inde"
v-if="item.sex">
<!-- 性别 -->
{{ item.sex }}
</view>
<view class="inde">
99
<view class="inde"
v-if="item.yearDate">
<!-- 年份 -->
{{ item.yearDate }}
</view>
<view class="inde">
大路铺镇
<view class="inde"
v-if="item.address">
<!-- 地址 -->
{{ item.address }}
</view>
<view class="authentication">
官方认证
<view class="authentication"
v-if="item.isContent">
<!-- 个人认证 -->
{{ item.isContent }}
</view>
</view>
@ -37,7 +46,9 @@
<view class="dynamics" v-html="$utils.stringFormatHtml(item.title)">
</view>
<view class="Artworkimages">
<view class="wrokimg" :key="i" v-for="(img, i) in item.image && item.image.split(',')">
<view class="wrokimg"
@click.stop="previewImage(item.image, i)"
:key="i" v-for="(img, i) in item.image">
<image :src="img" mode="aspectFill"></image>
</view>
</view>
@ -49,16 +60,24 @@
{{ item.isComment }}条评论
</view>
<view class="Leavingamessage">
<uv-icon size="30rpx" name="chat"></uv-icon>
<uv-icon size="40rpx" name="chat"></uv-icon>
</view>
<view class="Leavingamessage"
v-if="del"
@click.stop="$emit('del')">
<uv-icon size="40rpx" name="trash"></uv-icon>
</view>
</view>
</view>
</template>
<script>
import mixinsSex from '@/mixins/sex.js'
export default {
mixins: [mixinsSex],
props: {
item: {}
item: {},
del : {},
},
data() {
return {
@ -66,14 +85,13 @@
}
},
methods: {
}
},
}
</script>
<style scoped lang="scss">
.works {
margin: 40rpx 24rpx;
margin: 40rpx 20rpx;
background-color: #fff;
padding: 40rpx;
border-radius: 20rpx;
@ -117,7 +135,8 @@
font-size: 20rpx;
height: 30rpx;
color: white;
background-color: rgb(124, 136, 242);
// background-color: rgb(124, 136, 242);
background-color: var(--sexcolor);
border-radius: 7rpx;
flex-shrink: 0;
}
@ -190,7 +209,7 @@
.bottom {
display: flex;
margin-top: 20rpx;
font-size: 20rpx;
font-size: 24rpx;
.browse {
margin: 0rpx 30rpx;


+ 2
- 1
components/user/certificationPopup.vue View File

@ -72,7 +72,7 @@
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="/static/image/home/cart.png"
<image src="/static/image/home/photo.png"
mode="aspectFit"
style="width: 390rpx;height: 280rpx;" />
<view class="btn-add">
@ -169,6 +169,7 @@
title: '提交成功!',
icon: 'none'
})
this.$store.commit('getUserInfo')
this.$refs.popup.close()
}
})


+ 11
- 1
components/user/createDetailPopup.vue View File

@ -1,6 +1,6 @@
<template>
<view>
<view class="createDetail" @click="$refs.createDetailPopup.open('bottom')">
<view class="createDetail" @click="open">
<uv-icon size="40rpx" color="#fff" name="plus"></uv-icon>
</view>
@ -37,6 +37,15 @@
this.getData()
},
methods: {
open(){
if(!uni.getStorageSync('token')){
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
return
}
this.$refs.createDetailPopup.open('bottom')
},
getData() {
this.$api('getPublishList', res => {
if (res.code == 200) {
@ -65,6 +74,7 @@
justify-content: center;
align-items: center;
box-shadow: 0 0 10rpx 10rpx rgba(#000, 0.1);
z-index: 99;
}
.createDetailPopup {


+ 142
- 0
components/user/customerServicePopup.vue View File

@ -0,0 +1,142 @@
<template>
<!-- 实名认证 -->
<uv-popup ref="popup" :round="30">
<view class="page">
<view class="info-tips">
{{ title }}
</view>
<view class="image">
<image :src="image" mode="widthFix"></image>
</view>
<view class="uni-color-btn" @click="save">
保存客服微信
</view>
</view>
</uv-popup>
</template>
<script>
export default {
props: ['title', 'image'],
data() {
return {}
},
methods: {
open() {
this.$refs.popup.open()
},
preservationImg(img) {
let that = this
uni.authorize({
/* scope.writePhotosAlbum 类型是保存到相册 */
scope: 'scope.writePhotosAlbum',
success() {
/* 已授权进入 */
/* 保存图片到相册方法方法 */
that.imgApi(img);
},
complete(res) {
/* 判断如果没有授权就打开设置选项让用户重新授权 */
uni.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
/* 打开设置的方法 */
that.openInstall();
}
}
});
}
});
},
imgApi(image) {
/* 获取图片的信息 */
uni.getImageInfo({
src: image,
success: function(image) {
/* 保存图片到手机相册 */
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: function() {
uni.showModal({
title: '保存成功',
content: '图片已成功保存到相册',
showCancel: false
});
},
complete(res) {
console.log(res);
}
});
}
});
},
opensit() {
uni.showModal({
content: '没有授权保存图片到相册,点击确定去允许授权',
success: function(res) {
if (res.confirm) {
/* 打开设置的API*/
uni.openSetting({
success(res) {
console.log(res.authSetting);
}
});
} else if (res.cancel) {
uni.showModal({
cancelText: '取消',
confirmText: '重新授权',
content: '你点击了取消,将无法进行保存操作',
success: function(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
/* 授权成功 */
console.log(res.authSetting);
}
});
} else if (res.cancel) {
console.log('用户不授权');
}
}
});
}
}
});
},
save() {
this.preservationImg(this.image)
},
}
}
</script>
<style scoped lang="scss">
.page {
width: 650rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.info-tips {
width: 100%;
padding: 30rpx 0;
// background-color: #f3f3f3;
text-align: center;
text {
color: $uni-color;
}
}
.image {
image {
width: 300rpx;
height: 300rpx;
}
}
}
</style>

+ 46
- 0
components/user/sharePopup.vue View File

@ -0,0 +1,46 @@
<template>
<uv-popup ref="popup" :round="30">
<view class="page">
<view class="logo">
<image src="/static/image/logo.jpg" mode="aspectFill"></image>
</view>
<view class="title">
</view>
</view>
</uv-popup>
</template>
<script>
export default {
data() {
return {}
},
methods: {
open() {
this.$refs.popup.open('bottom')
},
}
}
</script>
<style scoped lang="scss">
.page {
display: flex;
justify-content: center;
align-items: center;
.logo {
width: 100rpx;
height: 100rpx;
image{
width: 100%;
height: 100%;
border-radius: 15rpx;
}
}
.title{
}
}
</style>

+ 14
- 0
dict/dict.js View File

@ -0,0 +1,14 @@
export default {
sex : {
: {
name : 'man',
color : '#5baaff',
},
: {
name : 'woman',
color : '#ff50b3',
},
},
}

+ 30
- 0
mixins/sex.js View File

@ -0,0 +1,30 @@
export default {
data() {
return {
sex : {
: {
name : 'man',
color : '#5baaff',
},
: {
name : 'woman',
color : '#ff50b3',
},
},
sexList : [
{
value : '男',
icon : 'man',
actColor : '#5baaff',
},
{
value : '女',
icon : 'woman',
actColor : '#ff50b3',
},
],
}
},
}

+ 6
- 0
pages.json View File

@ -127,6 +127,12 @@
"style": {
"enablePullDownRefresh" : true
}
},
{
"path": "scenicSpot/scenicSpotList",
"style": {
"enablePullDownRefresh" : true
}
}
]
}],


+ 66
- 20
pages/index/center.vue View File

@ -8,43 +8,45 @@
<!-- <img src="https://k.sinaimg.cn/n/sinakd20117/0/w800h800/20240127/889b-4c8a7876ebe98e4d619cdaf43fceea7c.jpg/w700d1q75cms.jpg"
alt="" /> -->
<image
src="https://k.sinaimg.cn/n/sinakd20117/0/w800h800/20240127/889b-4c8a7876ebe98e4d619cdaf43fceea7c.jpg/w700d1q75cms.jpg"
mode="aspectFill"></image>
:src="userInfo.headImage"
mode="aspectFill"></image>
</view>
<view class="setUp">
<view class="setUp"
@click="$utils.navigateTo('/pages_order/auth/wxUserInfo?back=1')">
设置
</view>
</view>
<view class="account">
<view class="number">
狐友1712378974678376
{{ userInfo.nickName || '墙友1712378974678376' }}
</view>
<view class="gender">
<uv-icon name="man" size="34rpx" color="rgb(127 200 239)"></uv-icon>
<uv-icon
:name="sex[userInfo.sex].name"
size="34rpx"
:color="sex[userInfo.sex].color"></uv-icon>
</view>
<view class="authentication">
未认证
{{ auth[userInfo.idCardOpen] || '未认证' }}
</view>
</view>
<view class="Days">
你已经成为狐友133天啦~
<!-- 你已经成为狐友133天啦~ -->
</view>
<view class="box">
<view class="followWithnterest">
<view class="digit">
2
0
</view>
<view class="close">
关注
</view>
</view>
<view class="shut">
|
</view>
<view class="fenst">
@ -62,12 +64,22 @@
</view>
<view class="Content">
<uv-tabs :list="list" @click="click"
<uv-tabs :list="tabs" @click="click"
:activeStyle="{color : '#000', fontWeight : 900}"
lineColor="#5baaff"
lineHeight="8rpx"
lineWidth="50rpx"></uv-tabs>
</view>
<view class="">
<dynamicItem
:key="index"
@click="$utils.navigateTo('/pages_order/post/addPost?id=' + item.id)"
v-for="(item, index) in list"
:item="item"
del
@del="delDynamic(item.id)"
/>
</view>
<tabber select="3" />
@ -76,18 +88,31 @@
<script>
import tabber from '@/components/base/tabbar.vue'
import dynamicItem from '@/components/list/dynamic/dynamicItem.vue'
import mixinsList from '@/mixins/list.js'
import mixinsSex from '@/mixins/sex.js'
import { mapState } from 'vuex'
export default {
mixins: [mixinsList, mixinsSex],
components: {
tabber,
dynamicItem,
},
computed: {
...mapState(['userInfo']),
},
computed: {},
data() {
return {
list: [{
name: '关注',
}, {
name: '评论',
}]
tabs: [
{
name: '我发布的帖子',
},
{
name: '评论',
},
],
mixinsListApi : 'getMyPostPage',
auth : ['审核中', '个人认证', '店铺认证'],
}
},
onShow() {
@ -96,8 +121,29 @@
methods: {
click(item) {
console.log('item', item);
}
},
getDataThen(list){
list.forEach(n => {
n.image = n.image ? n.image.split(',') : []
})
},
delDynamic(postId){
let self = this
uni.showModal({
title: '确认要删除吗?',
success(e) {
if(e.confirm){
self.$api('deletePost', {
postId
}, res => {
if(res.code == 200){
self.getData()
}
})
}
}
})
},
}
}


+ 100
- 14
pages/index/index.vue View File

@ -6,7 +6,7 @@
:list="bannerList"
indicator
height="520rpx"
indicatorStyle="bottom: 100rpx;"
indicatorStyle="bottom: 80rpx;"
keyName="image"></uv-swiper>
</view>
@ -20,22 +20,58 @@
江华瑶族自治县
</view>
<view class="top">
<view class=" profilePicture">
<view class="profilePicture"
@click="$refs.customerServicePopup.open()">
<image :src="headinfo.headImage" mode=""></image>
</view>
<view class="UniversalWall">
<view class="dynamic">
<view class="dynamic"
@click="$refs.customerServicePopup.open()">
{{ headinfo.name }}
</view>
<view class="dynamics">
{{headinfo.num}}动态<text>|</text>{{headinfo.userNum}}江华人
{{headinfo.num}}动态
<text>|</text>
<view>
{{headinfo.userNum}}江华人
</view>
</view>
<view class="dynamics">
{{headinfo.homeNum}}租房
<text>|</text>
{{headinfo.jobNum}}工作
<text>|</text>
{{headinfo.jdNum}}景点
<text>|</text>
{{headinfo.shopNum}}美食
<text>|</text>
{{headinfo.activityNum}}活动
</view>
</view>
<view class="join"
@click="$refs.certificationPopup.open()">
加入
@click="join">
<view
v-if="userInfo.idCardOpen == 0">
审核中
</view>
<view
v-else-if="!userInfo.idCardOpen">
加入
</view>
<view
v-else>
<uv-icon
color="#fff"
size="30rpx"
name="list-dot"></uv-icon>
</view>
</view>
</view>
</view>
@ -76,6 +112,13 @@
<createDetailPopup/>
<certificationPopup ref="certificationPopup"/>
<sharePopup ref="sharePopup"/>
<customerServicePopup
:title="headinfo.details"
:image="headinfo.kefu"
ref="customerServicePopup"/>
<PrivacyAgreementPoup />
<tabber select="0" />
@ -87,6 +130,8 @@
import tabber from '@/components/base/tabbar.vue'
import certificationPopup from '@/components/user/certificationPopup.vue'
import createDetailPopup from '@/components/user/createDetailPopup.vue'
import customerServicePopup from '@/components/user/customerServicePopup.vue'
import sharePopup from '@/components/user/sharePopup.vue'
import dynamicItem from '@/components/list/dynamic/dynamicItem.vue'
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
@ -96,8 +141,10 @@
tabber,
PrivacyAgreementPoup,
createDetailPopup,
customerServicePopup,
dynamicItem,
certificationPopup,
sharePopup,
},
data() {
return {
@ -112,15 +159,17 @@
this.getClassifyList()
this.getBannerList()
this.$store.commit('getCategory')
this.getUserInfo()
},
onPullDownRefresh() {
this.getIndexHeaderInfo()
this.getClassifyList()
this.getBannerList()
this.$store.commit('getCategory')
this.getUserInfo()
},
computed: {
...mapState(['city', 'category']),
...mapState(['city', 'category', 'userInfo']),
},
methods: {
tabsClick(item) {
@ -175,11 +224,44 @@
}
})
},
getDataThen(list){
list.forEach(n => {
n.image = n.image ? n.image.split(',') : []
})
},
join(){
if(!uni.getStorageSync('token')){
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
})
return
}
if(this.userInfo.idCardOpen == 0){
uni.showToast({
title: '审核中...',
icon:'none'
})
}else if(!this.userInfo.idCardOpen){
this.$refs.certificationPopup.open()
}else{
this.$refs.sharePopup.open()
}
},
getUserInfo(){
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
}
},
}
}
</script>
<style scoped lang="scss">
.page{
position: relative;
}
image{
width: 100%;
height: 100%;
@ -189,7 +271,7 @@
width: 100%;
top: 0;
left: 0;
padding-top: 150rpx;
padding-top: 120rpx;
// background: linear-gradient(to bottom, rgb(85, 94, 123), rgb(45, 51, 73));
.Toggle{
margin: 10rpx 30rpx;
@ -206,19 +288,20 @@
.top {
display: flex;
color: white;
padding: 35rpx;
padding: 25rpx;
align-items: center;
position: relative;
.profilePicture {
width: 100rpx;
height: 100rpx;
width: 150rpx;
height: 150rpx;
image{
border-radius: 20rpx;
}
}
.UniversalWall {
padding: 0rpx 45rpx;
padding: 0rpx 20rpx;
.dynamic {
font-size: 40rpx;
@ -228,14 +311,17 @@
.dynamics {
margin-top: 20rpx;
font-size: 25rpx;
display: flex;
text {
margin: 0 20rpx;
margin: 0 10rpx;
}
}
}
.join {
position: absolute;
right: 10rpx;
top: 40rpx;
width: 125rpx;
height: 50rpx;
background-color: $uni-color;


+ 1
- 0
pages/index/message.vue View File

@ -1,5 +1,6 @@
<template>
<view class="page">
<navbar title="消息"/>
<tabber select="2" />
</view>


+ 1
- 1
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -11,7 +11,7 @@
<!-- 头像 -->
<view class="userIamge">
<view>
<img src="../../static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
<!-- <img src="../../static/image/center/11.svg" alt="" style="width: 100%;height: 100%;"> -->
</view>
</view>


+ 56
- 33
pages_order/auth/wxUserInfo.vue View File

@ -1,5 +1,6 @@
<template>
<view class="login">
<!-- <view class="title">
瑶都万能墙
</view>
@ -13,7 +14,7 @@
头像
</view>
<view class="">
<image :src="userInfo.headImage" v-if="userInfo.headImage" style="width: 60rpx;height: 60rpx;"
<image :src="form.headImage" v-if="form.headImage" style="width: 60rpx;height: 60rpx;"
mode=""></image>
<image src="../static/auth/headImage.png" v-else style="width: 50rpx;height: 50rpx;" mode=""></image>
@ -26,37 +27,48 @@
</view>
<view class="">
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName"
v-model="userInfo.nickName" />
v-model="form.nickName" />
</view>
</view> -->
<view class="bg1"/>
<view class="bg1"></view>
<view class="title">
定制自己的形象
</view>
<view
v-if="back"
@click="$utils.navigateBack"
style="position: absolute;top: 120rpx;left: 20rpx;">
<uv-icon
size="30rpx"
color="#000"
name="arrow-left"></uv-icon>
</view>
<button class="chooseAvatar"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar">
<image :src="userInfo.headImage"
<image :src="form.headImage"
mode="aspectFill"></image>
</button>
<input type="nickname"
placeholder="给自己起一个响亮的名字"
class="nickname" id="nickName"
v-model="userInfo.nickName" />
v-model="form.nickName" />
<view class="sexSelect">
<view
@click="sexClick(item)"
v-for="(item, index) in sex"
v-for="(item, index) in sexList"
:key="index"
:style="{color : userInfo.sex == item.value ? item.actColor : '#333'}">
:style="{color : form.sex == item.value ? item.actColor : '#333'}">
<uv-icon
size="30rpx"
:color="userInfo.sex == item.value ? item.actColor : '#333'"
:color="form.sex == item.value ? item.actColor : '#333'"
:name="item.icon"></uv-icon>
{{ item.value }}
</view>
@ -64,17 +76,17 @@
<view class="address"
@click="$refs.datetimePicker.open()">
您出生于{{ $dayjs(userInfo.yearDate).format("YYYY") }}
您出生于{{ $dayjs(form.yearDate).format("YYYY") }}
</view>
<view class="address"
@click="$refs.picker.open()">
{{ userInfo.address || '请选择居住地址'}}
{{ form.address || '请选择居住地址'}}
</view>
<uv-datetime-picker
ref="datetimePicker"
v-model="userInfo.yearDate"
v-model="form.yearDate"
mode="year"
:minDate="minDate"
:maxDate="maxDate">
@ -93,10 +105,12 @@
<script>
import { mapState } from 'vuex'
import mixinsSex from '@/mixins/sex.js'
export default {
mixins : [mixinsSex],
data() {
return {
userInfo: {
form: {
headImage: '/static/image/logo.jpg',
nickName: '',
sex : '男',
@ -105,25 +119,34 @@
},
maxDate : this.$dayjs().valueOf(),
minDate : this.$dayjs().add(-100, 'y').valueOf(),
sex : [
{
value : '男',
icon : 'man',
actColor : '#5baaff',
},
{
value : '女',
icon : 'woman',
actColor : '#ff50b3',
},
],
// sex : [
// {
// value : '',
// icon : 'man',
// actColor : '#5baaff',
// },
// {
// value : '',
// icon : 'woman',
// actColor : '#ff50b3',
// },
// ],
columns : [],
back : '',
};
},
computed: {
...mapState(['cityList']),
...mapState(['cityList', 'userInfo']),
},
onLoad() {
onLoad({back}) {
this.back = back
// this.$nextTick(() => {
// this.form.headImage = this.userInfo.headImage || this.form.headImage
// this.form.nickName = this.userInfo.nickName || this.form.nickName
// this.form.sex = this.userInfo.sex || this.form.sex
// this.form.yearDate = this.userInfo.yearDate || this.form.yearDate
// this.form.address = this.userInfo.address || this.form.address
// })
},
onShow() {
this.getCityList()
@ -134,14 +157,14 @@
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.userInfo.headImage = url
self.form.headImage = url
})
},
sexClick(item){
this.userInfo.sex = item.value
this.form.sex = item.value
},
confirmAddress(e){
this.userInfo.address = e.value[0].name
this.form.address = e.value[0].name
},
//
getCityList(){
@ -163,9 +186,9 @@
})
.exec((res) => {
const nickName = res?.[0]?.value
self.userInfo.nickName = nickName
self.form.nickName = nickName
if (self.$utils.verificationAll(self.userInfo, {
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称',
address: '请选择居住地址',
@ -174,8 +197,8 @@
}
let data = {
...self.userInfo,
yearDate : this.$dayjs(self.userInfo.yearDate).format("YYYY")
...self.form,
yearDate : this.$dayjs(self.form.yearDate).format("YYYY")
}
self.$api('updateInfo', data, res => {


+ 59
- 31
pages_order/components/list/gourmet/gourmetItem.vue View File

@ -1,22 +1,39 @@
<template>
<view class="item">
<image :src="item.image &&
item.image.split(',')[0]" mode="aspectFill"></image>
<image class="image"
@click.stop="previewImage([item.image])"
:src="item.image" mode="aspectFill"></image>
<view class="text">
<view class="title">
{{ item.title }}
<view class="">
{{ item.title }}
</view>
<view class="len">
30m
</view>
</view>
<view class="titleSub">
{{ item.titleSub }}
<view class="workTime">
营业时间{{ item.workTime }}
</view>
<view class="createBy">
工作时间
{{ item.workTime }}
</view>
<view class="createTime">
{{ item.address }}
<!-- {{ $dayjs(item.createTime).format('YYYY-MM-DD') }} -->
<view class="address">
地址{{ item.address }}
</view>
<scroll-view
scroll-x="true"
style="width: 500rpx;">
<view class="list">
<view class="item-detail"
:key="index"
v-for="(t, index) in item.detailsImage">
<image :src="t"
@click.stop="previewImage(item.detailsImage, index)"
mode="aspectFill"></image>
<view class="text-ellipsis">
{{ item.details[index] }}
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
@ -30,14 +47,12 @@
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.item {
height: 200rpx;
width: 100%;
background-color: #fff;
overflow: hidden;
@ -45,38 +60,51 @@
color: #777;
display: flex;
font-size: 24rpx;
margin: 30rpx 0;
margin: 20rpx 0;
padding: 20rpx;
box-sizing: border-box;
image {
width: 50%;
height: 100%;
.image {
width: 140rpx;
height: 120rpx;
border-radius: 10rpx;
}
.text {
display: flex;
flex-direction: column;
padding: 16rpx;
width: 50%;
.title {
font-size: 30rpx;
font-weight: 600;
color: #000;
margin-bottom: 10rpx;
}
.titleSub{
}
.createBy {
// margin-bottom: 10rpx;
display: flex;
margin-top: auto;
margin-bottom: 10rpx;
justify-content: space-between;
&>view {
align-items: center;
.len{
font-size: 24rpx;
}
}
.list{
display: flex;
.item-detail{
display: flex;
align-items: center;
justify-content: center;
align-items: center;
flex-direction: column;
flex-shrink: 0;
width: 200rpx;
margin: 8rpx;
image{
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
view{
font-size: 26rpx;
line-height: 50rpx;
}
}
}
}


+ 77
- 0
pages_order/components/list/scenicSpot/scenicSpotItem.vue View File

@ -0,0 +1,77 @@
<template>
<view class="item">
<image :src="item.titleImage" mode="aspectFill"></image>
<view class="text">
<view class="title">
{{ item.name }}
</view>
<view>
</view>
<view class="createBy">
{{ item.address }}
</view>
<view class="createBy">
距离30m
</view>
<view class="createTime">
{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
</view>
</view>
</view>
</template>
<script>
export default {
props: ['item'],
data() {
return {
};
}
}
</script>
<style lang="scss" scoped>
.item {
height: 220rpx;
width: 100%;
background-color: #fff;
overflow: hidden;
border-radius: 10rpx;
color: #777;
display: flex;
font-size: 24rpx;
margin: 30rpx 0;
image {
width: 50%;
height: 100%;
}
.text {
display: flex;
flex-direction: column;
padding: 16rpx;
width: 50%;
.title {
font-size: 30rpx;
font-weight: 600;
color: #000;
}
.createBy {
display: flex;
margin-top: auto;
margin-bottom: 10rpx;
justify-content: space-between;
&>view {
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
</style>

+ 3
- 1
pages_order/components/list/workList/index.vue View File

@ -39,8 +39,10 @@
}
},
methods: {
getData(){
getData(title){
this.queryParams.title = title
this.$api(this.api, this.queryParams, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.list = res.result.records || res.result
this.total = res.result.total || res.result.length


+ 19
- 3
pages_order/gourmet/gourmetList.vue View File

@ -1,7 +1,18 @@
<template>
<view class="page">
<view class="page pageList">
<navbar title="美食" leftClick @leftClick="$utils.navigateBack" />
<view
style="padding: 10rpx 20rpx;">
<uv-search
bgColor="#fff"
@search="getData"
@custom="getData"
searchIconSize="30rpx"
placeholder="请输入搜索关键字..."
v-model="title"></uv-search>
</view>
<view class="list">
<gourmetItem
:key="index"
@ -27,7 +38,12 @@
}
},
methods: {
getDataThen(list){
list.forEach(n => {
n.detailsImage = n.detailsImage ? n.detailsImage.split(',') : []
n.details = n.details ? n.details.split(',') : []
})
},
}
}
</script>
@ -35,7 +51,7 @@
<style scoped lang="scss">
.page{
.list{
padding: 20rpx;
padding: 0 20rpx;
}
}
</style>

+ 95
- 51
pages_order/post/addPost.vue View File

@ -18,6 +18,7 @@
:maxlength="200"
autoHeight
count
style="min-height: 400rpx;"
placeholder="说点什么吧"></uv-textarea>
</view>
@ -25,7 +26,7 @@
<view class="images box">
<uv-upload
:fileList="fileList"
:maxCount="4"
:maxCount="imageMax"
multiple
width="150rpx"
height="150rpx"
@ -41,7 +42,7 @@
<view class="tagList">
<view
:class="{act : t.id == form.classId}"
@click="clickCategory(item, i)"
@click="clickCategory(t, i)"
v-for="(t, i) in category"
:key="i">
{{ t.title }}
@ -49,6 +50,25 @@
</view>
</view>
<view class="category">
<view class="title">
选择地区
</view>
<view class="tagList">
<view
:class="{act : t.name == form.address}"
@click="clickAddress(t, i)"
v-for="(t, i) in cityList"
:key="i">
{{ t.name }}
</view>
</view>
</view>
<view class="title-input box">
<input type="text" placeholder="手机号码(选填)" v-model="form.phone"/>
</view>
<!-- <view class="upTop"
>
<view class="title">
@ -119,17 +139,22 @@
form : {
title : '',
classId : 0,
address : '',
},
id : 0,
fileList : [],
imageMax : 9,
};
},
computed : {
...mapState(['city', 'category']),
...mapState(['cityList', 'category']),
},
onLoad(args) {
this.id = args.id
this.form.classId = this.category[0].id
this.form.address = this.cityList[0].name
this.imageMax = args.imageMax || 9
this.getDateil()
},
onShow() {
this.$store.commit('getCategory')
@ -138,6 +163,9 @@
clickCategory(item, index){
this.form.classId = item.id
},
clickAddress(item, index){
this.form.address = item.name
},
getDateil(){
if(!this.id){
return
@ -145,10 +173,23 @@
let self = this
this.$api('indexGetTrendsDetail', {
this.$api('getPostDetail', {
id : this.id
}, res => {
if (res.code == 200) {
self.form.id = res.result.id
self.form.title = res.result.title
self.form.address = res.result.address || self.form.address
self.form.classId = res.result.classId || self.form.classId
if(res.result.image){
res.result.image.split(',')
.forEach(url => {
self.fileList.push({
url
})
})
}
}
})
},
@ -166,58 +207,58 @@
})
},
//
payOrder(){
let self = this
// //
// payOrder(){
// let self = this
let data = {
// ...this.form,
content : this.form.content,
topId : this.form.topId,
title : this.form.title,
isCard : 'Y',
state : 0,
image : this.fileList.map((item) => item.url).join(","),
isTop : this.form.topId ? 'Y' : 'N',
}
// let data = {
// // ...this.form,
// content : this.form.content,
// topId : this.form.topId,
// title : this.form.title,
// isCard : 'Y',
// state : 0,
// image : this.fileList.map((item) => item.url).join(","),
// isTop : this.form.topId ? 'Y' : 'N',
// }
if(this.id){
data.id = this.id
}
// if(this.id){
// data.id = this.id
// }
this.$api('infoReleaseTrends', data,
res => {
if(res.code == 200){
if(self.form.topId && !this.id){
uni.requestPayment({
provider: 'wxpay', //
timeStamp: res.result.timeStamp, //
nonceStr: res.result.nonceStr, //
package: res.result.packageValue,
signType: res.result.signType, //
paySign: res.result.paySign, //
success: function (res) {
console.log('支付成功',res);
self.$refs.confirmationPopupUpload.open()
// self.$refs.confirmationPopup.close()
},
fail: function (err) {
console.log('支付失败',err);
self.$refs.confirmationPopup.close()
uni.showToast({
icon:'none',
title:"支付失败"
})
}
});
}else{
self.$refs.confirmationPopupUpload.open()
}
// this.$api('infoReleaseTrends', data,
// res => {
// if(res.code == 200){
// if(self.form.topId && !this.id){
// uni.requestPayment({
// provider: 'wxpay', //
// timeStamp: res.result.timeStamp, //
// nonceStr: res.result.nonceStr, //
// package: res.result.packageValue,
// signType: res.result.signType, //
// paySign: res.result.paySign, //
// success: function (res) {
// console.log('',res);
// self.$refs.confirmationPopupUpload.open()
// // self.$refs.confirmationPopup.close()
// },
// fail: function (err) {
// console.log('',err);
// self.$refs.confirmationPopup.close()
// uni.showToast({
// icon:'none',
// title:""
// })
// }
// });
// }else{
// self.$refs.confirmationPopupUpload.open()
// }
}
})
// }
// })
},
// },
//
submit(){
@ -282,6 +323,9 @@
}
.content-input{
min-height: 400rpx;
/deep/ .uv-textarea{
min-height: 400rpx;
}
}
.upTop{
.title{


+ 4
- 10
pages_order/renting/rentingList.vue View File

@ -1,16 +1,9 @@
<template>
<view>
<view class="page pageList">
<navbar title="租房列表" leftClick @leftClick="$utils.navigateBack" />
<view class="flex"
style="padding: 30rpx;">
<!-- <view class="flex area">
<view>永州</view>
<uv-icon name="down" color="#333" size="30rpx" />
</view>
<view class="s-div b-relative">
</view> -->
style="padding: 20rpx;">
<uv-search
bgColor="#fff"
@search="getData"
@ -44,7 +37,7 @@
@click="clickDetail(item)">
<view>
<image class="imx" :src="item.image &&
item.image.split(',')[0]" />
item.image.split(',')[0]" />
</view>
<view style="width: calc(100% - 330rpx);">
<view class="t1">{{ item.title }}</view>
@ -82,6 +75,7 @@
</script>
<style scoped lang="scss">
.container {
padding: 0 30rpx;
}


+ 57
- 0
pages_order/scenicSpot/scenicSpotList.vue View File

@ -0,0 +1,57 @@
<template>
<view class="page pageList">
<navbar title="景点" leftClick @leftClick="$utils.navigateBack" />
<view
style="padding: 10rpx 30rpx;">
<uv-search
bgColor="#fff"
@search="getData"
@custom="getData"
searchIconSize="30rpx"
placeholder="请输入搜索关键字..."
v-model="queryParams.title"></uv-search>
</view>
<view class="list">
<scenicSpotItem
:key="index"
v-for="(item, index) in list"
:item="item"
/>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import scenicSpotItem from '../components/list/scenicSpot/scenicSpotItem.vue'
export default {
mixins: [mixinsList],
components : {
scenicSpotItem,
},
data() {
return {
mixinsListApi : 'getScenicPage',
}
},
methods: {
getDataThen(list){
// list.forEach(n => {
// n.detailsImage = n.detailsImage ? n.detailsImage.split(',') : []
// n.details = n.details ? n.details.split(',') : []
// })
},
}
}
</script>
<style scoped lang="scss">
.page{
.list{
padding: 0 20rpx;
}
}
</style>

+ 18
- 6
pages_order/work/workList.vue View File

@ -1,7 +1,18 @@
<template>
<view>
<view class="page pageList">
<navbar title="找工作" leftClick @leftClick="$utils.navigateBack" />
<view
style="padding: 10rpx 20rpx;">
<uv-search
bgColor="#fff"
@search="getData"
@custom="getData"
searchIconSize="30rpx"
placeholder="请输入搜索关键字..."
v-model="title"></uv-search>
</view>
<workList ref="workList"/>
</view>
@ -15,24 +26,25 @@
},
data() {
return {
title : '',
}
},
onShow() {
this.$refs.workList.getData()
this.getData()
},
onPullDownRefresh() {
this.$refs.workList.getData()
this.getData()
},
onReachBottom() {
this.$refs.workList.loadMoreData()
},
methods: {
getData(){
this.$refs.workList.getData(this.title)
},
}
}
</script>
<style scoped lang="scss">
</style>

BIN
static/image/cart/1.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.9 KiB

BIN
static/image/center/1.png View File

Before After
Width: 51  |  Height: 49  |  Size: 1.2 KiB

+ 0
- 1
static/image/center/11.svg View File

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726157567630" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6220" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M513.536 628.6336c101.6832 0 280.8832 38.7072 310.8864 193.7408 77.5168-77.5168 124.928-185.9584 124.928-305.0496 0-241.152-194.6624-435.8144-435.8144-435.8144S77.7216 277.0944 77.7216 517.2224c0 119.0912 47.4112 227.6352 124.928 306.0736 30.0032-154.9312 209.2032-194.6624 310.8864-194.6624z m0-439.7056c112.3328 0 204.3904 91.0336 204.3904 204.3904 0 112.3328-91.0336 204.3904-204.3904 204.3904a203.776 203.776 0 0 1-204.3904-204.3904c0.1024-112.4352 92.0576-204.3904 204.3904-204.3904z m0 0" fill="#cdcdcd" p-id="6221"></path><path d="M515.4816 1006.8992c-65.8432 0-129.8432-12.9024-189.952-38.4-58.1632-24.576-110.2848-59.8016-155.136-104.5504A485.56032 485.56032 0 0 1 65.8432 708.8128c-25.6-60.2112-38.5024-124.1088-38.5024-189.952 0-65.8432 12.9024-129.8432 38.4-189.952 24.576-58.1632 59.8016-110.2848 104.5504-155.136 44.8512-44.8512 96.9728-79.9744 155.136-104.5504C385.6384 43.6224 449.536 30.72 515.4816 30.72c65.8432 0 129.8432 12.9024 189.952 38.4 58.1632 24.576 110.2848 59.8016 155.136 104.5504 44.8512 44.8512 79.9744 96.9728 104.5504 155.136C990.6176 389.0176 1003.52 452.9152 1003.52 518.8608c0 65.8432-12.9024 129.8432-38.4 189.952-24.576 58.1632-59.8016 110.2848-104.5504 155.136a485.56032 485.56032 0 0 1-155.136 104.5504 484.39296 484.39296 0 0 1-189.952 38.4z m0-936.8576c-60.6208 0-119.3984 11.8784-174.6944 35.2256a447.76448 447.76448 0 0 0-142.6432 96.1536A444.42624 444.42624 0 0 0 101.9904 344.064a446.70976 446.70976 0 0 0-35.2256 174.6944c0 60.6208 11.8784 119.3984 35.2256 174.6944 22.6304 53.4528 54.9888 101.4784 96.1536 142.6432 41.1648 41.2672 89.1904 73.6256 142.6432 96.1536 55.296 23.3472 114.0736 35.2256 174.6944 35.2256 60.6208 0 119.3984-11.8784 174.6944-35.2256 53.4528-22.6304 101.4784-54.9888 142.6432-96.1536 41.2672-41.1648 73.6256-89.1904 96.1536-142.6432 23.3472-55.296 35.2256-114.0736 35.2256-174.6944 0-60.6208-11.8784-119.3984-35.2256-174.6944a447.76448 447.76448 0 0 0-96.1536-142.6432 444.42624 444.42624 0 0 0-142.6432-96.1536 447.44704 447.44704 0 0 0-174.6944-35.2256z m0 0" fill="#cdcdcd" p-id="6222"></path></svg>

BIN
static/image/center/2.png View File

Before After
Width: 112  |  Height: 126  |  Size: 6.1 KiB

BIN
static/image/center/3.png View File

Before After
Width: 120  |  Height: 120  |  Size: 5.9 KiB

BIN
static/image/center/4.png View File

Before After
Width: 52  |  Height: 49  |  Size: 1.7 KiB

BIN
static/image/center/5.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.8 KiB

BIN
static/image/center/6.png View File

Before After
Width: 63  |  Height: 50  |  Size: 2.1 KiB

BIN
static/image/center/7.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.4 KiB

BIN
static/image/center/8.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.5 KiB

BIN
static/image/center/9.png View File

Before After
Width: 56  |  Height: 48  |  Size: 2.1 KiB

BIN
static/image/home/0.png View File

Before After
Width: 116  |  Height: 118  |  Size: 14 KiB

BIN
static/image/home/1.png View File

Before After
Width: 117  |  Height: 117  |  Size: 13 KiB

BIN
static/image/home/2.png View File

Before After
Width: 114  |  Height: 114  |  Size: 12 KiB

BIN
static/image/home/3.png View File

Before After
Width: 114  |  Height: 114  |  Size: 11 KiB

BIN
static/image/home/address-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.4 KiB

BIN
static/image/home/arrow-icon.png View File

Before After
Width: 39  |  Height: 39  |  Size: 296 B

BIN
static/image/home/cart.png View File

Before After
Width: 349  |  Height: 239  |  Size: 11 KiB

BIN
static/image/home/photo.png View File

Before After
Width: 349  |  Height: 239  |  Size: 7.5 KiB

BIN
static/image/home/search-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.8 KiB

BIN
static/image/tabbar/cart-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 958 B

BIN
static/image/tabbar/cart.png View File

Before After
Width: 40  |  Height: 40  |  Size: 953 B

BIN
static/image/tabbar/category-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
static/image/tabbar/category.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.2 KiB

BIN
static/image/tabbar/center-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 915 B

BIN
static/image/tabbar/center.png View File

Before After
Width: 40  |  Height: 40  |  Size: 937 B

BIN
static/image/tabbar/home-a.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB

BIN
static/image/tabbar/home.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB

BIN
static/image/tabbar/order-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 691 B

BIN
static/image/tabbar/order.png View File

Before After
Width: 40  |  Height: 40  |  Size: 736 B

+ 1
- 0
uni.scss View File

@ -14,6 +14,7 @@
/* 颜色变量 */
$uni-color: #5baaff;
/* 行为相关颜色 */
$uni-color-primary: #1671ff;
$uni-color-success: #4cd964;


+ 9
- 1
utils/index.js View File

@ -27,4 +27,12 @@ Vue.prototype.$dayjs = dayjs
Vue.prototype.$timeUtils = time
Vue.prototype.$utils = util
Vue.prototype.$md5 = md5
Vue.prototype.$md5 = md5
Vue.prototype.previewImage = (urls, current) => {
uni.previewImage({
urls,
current,
})
}

Loading…
Cancel
Save