version/0412
wangdong 6 months ago
parent 1437dcbe4d
commit d444da0365
  1. 4
      pages.json
  2. 139
      pages/feedback/form.vue
  3. 10
      pages/index/index.vue
  4. 44
      pages/squareDynamic/index.vue
  5. 2
      pages/squareDynamic/publish.vue
  6. 6
      pages/user/index.vue
  7. BIN
      static/feedback/feedback.png
  8. BIN
      static/tabbar/shop-active.png
  9. BIN
      static/tabbar/shop.png

@ -16,8 +16,8 @@
"text": "分类"
}, {
"pagePath": "pages/shopList/index",
"iconPath": "static/tabbar/serve.png",
"selectedIconPath": "static/tabbar/serve-active.png",
"iconPath": "static/tabbar/shop.png",
"selectedIconPath": "static/tabbar/shop-active.png",
"text": "商户"
}, {
"pagePath": "pages/cart/index",

@ -1,59 +1,70 @@
<template>
<view class="container">
<view class="form">
<view class="form-item">
<view class="form-item-label">
<text class="label-flag">*</text>问题类型
</view>
<view class="form-item-content">
<view v-for="(item, index) in typeList" :key="index" class="type" @click="form.type = index + 1">
<image v-if="form.type !== index + 1" src="/static/feedback/circle.png" mode="aspectFill"></image>
<image v-else src="/static/feedback/circle-choose.png" mode="aspectFill"></image>
{{ item }}
<template v-if="!isSubmit">
<view class="form">
<view class="form-item">
<view class="form-item-label">
<text class="label-flag">*</text>问题类型
</view>
<view class="form-item-content">
<view v-for="(item, index) in typeList" :key="index" class="type" @click="form.type = index + 1">
<image v-if="form.type !== index + 1" src="/static/feedback/circle.png" mode="aspectFill"></image>
<image v-else src="/static/feedback/circle-choose.png" mode="aspectFill"></image>
{{ item }}
</view>
</view>
</view>
</view>
<view class="form-item">
<view class="form-item-label">
<text class="label-flag">*</text>反馈与建议
</view>
<view class="form-item-content">
<view class="textarea-box">
<textarea v-model="form.suggest" placeholder="您填写的信息越全,越有利于问题得到快速解决~" placeholder-class="textarea-placeholer" maxlength="299" />
<view class="text-num">已写<text>{{ form.suggest.length }}</text>/299个字</view>
<view class="form-item">
<view class="form-item-label">
<text class="label-flag">*</text>反馈与建议
</view>
<view class="image-list">
<view v-for="(item, index) in form.images" :key="index" class="image">
<image :src="item" mode="aspectFill" @click="previewImage(item)"></image>
<image src="/static/delete.png" mode="aspectFill" class="delete" @click.stop="deleteImage(index)"></image>
<view class="form-item-content">
<view class="textarea-box">
<textarea v-model="form.suggest" placeholder="您填写的信息越全,越有利于问题得到快速解决~" placeholder-class="textarea-placeholer" maxlength="299" />
<view class="text-num">已写<text>{{ form.suggest.length }}</text>/299个字</view>
</view>
<view v-if="form.images.length < 5" class="upload-btn" @click="addImage">
<image src="/static/feedback/photo.png" mode="aspectFill"></image>
<view class="tip">添加照片</view>
<view class="sub-tip">最多5张</view>
<view class="image-list">
<view v-for="(item, index) in form.images" :key="index" class="image">
<image :src="item" mode="aspectFill" @click="previewImage(item)"></image>
<image src="/static/delete.png" mode="aspectFill" class="delete" @click.stop="deleteImage(index)"></image>
</view>
<view v-if="form.images.length < 5" class="upload-btn" @click="addImage">
<image src="/static/feedback/photo.png" mode="aspectFill"></image>
<view class="tip">添加照片</view>
<view class="sub-tip">最多5张</view>
</view>
<view class="image-num"><text>{{ form.images.length }}</text>/5</view>
</view>
<view class="image-num"><text>{{ form.images.length }}</text>/5</view>
</view>
</view>
</view>
<view class="form-item">
<view class="form-item-content" style="padding: 0 30rpx;">
<view class="content-info">
<view class="info-name">您的姓名</view>
<input type="text" v-model="form.name" placeholder="请填写您的名字" placeholder-class="input-placeholder" />
</view>
<view class="content-info">
<view class="info-name">您的电话</view>
<input type="number" v-model="form.phone" placeholder="请填写可以联系到您的手机号码" placeholder-class="input-placeholder" />
</view>
<view class="content-info">
<view class="info-name">您的单位</view>
<input type="text" v-model="form.unit" placeholder="请填写您商城认证的营业执照名称" placeholder-class="input-placeholder" />
<view class="form-item">
<view class="form-item-content" style="padding: 0 30rpx;">
<view class="content-info">
<view class="info-name">您的姓名</view>
<input type="text" v-model="form.name" placeholder="请填写您的名字" placeholder-class="input-placeholder" />
</view>
<view class="content-info">
<view class="info-name">您的电话</view>
<input type="number" v-model="form.phone" placeholder="请填写可以联系到您的手机号码" placeholder-class="input-placeholder" />
</view>
<view class="content-info">
<view class="info-name">您的单位</view>
<input type="text" v-model="form.unit" placeholder="请填写您商城认证的营业执照名称" placeholder-class="input-placeholder" />
</view>
</view>
</view>
</view>
</view>
<view class="submit" @click="submit">提交</view>
<view class="submit" @click="submit">提交</view>
</template>
<template v-else>
<view class="success">
<image :src="$picUrl+ '/static/feedbackSuccess.png'" mode="aspectFill"></image>
<view class="success-tip">提交成功</view>
<text>您的反馈意见已经提交成功</text>
<text>预计1-2个工作日内与您联系</text>
</view>
<view class="submit back" @click="back">完成</view>
</template>
</view>
</template>
@ -79,6 +90,7 @@ import * as Api from '@/api/feedback/index.js'
unit: '',
},
loading: false,
isSubmit: false,
};
},
methods: {
@ -192,18 +204,17 @@ import * as Api from '@/api/feedback/index.js'
.then(res => {
console.log(res);
this.loading = false;
uni.showToast({
title: '添加成功!'
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
this.isPublish = true;
})
.catch(() => {
this.loading = false;
})
}
},
back() {
uni.navigateBack();
},
},
};
</script>
@ -360,5 +371,33 @@ import * as Api from '@/api/feedback/index.js'
text-align: center;
margin-top: 30rpx;
}
.success {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 140rpx;
>image {
width: 189rpx;
height: 166rpx;
}
.success-tip {
margin: 34rpx 0 28rpx;
color: #222222;
font-size: 36rpx;
line-height: 36rpx;
}
uni-text {
color: #666666;
font-size: 28rpx;
line-height: 40rpx;
}
}
.back {
position: fixed;
left: 24rpx;
width: 702rpx;
bottom: 43rpx;
}
}
</style>

@ -607,23 +607,17 @@
type: 2
},
{
image: `${this.$picUrl}/static/index/g5.png?n=` + new Date().getTime(),
image: '/static/tabbar/serve-active.png',
text: "服务",
path: '/pages/serve/index',
type: 2
},
{
image: `${this.$picUrl}/static/index/g5.png?n=` + new Date().getTime(),
image: `${this.$picUrl}/static/index/g6.png?n=` + new Date().getTime(),
text: "广场动态",
path: '/pages/squareDynamic/index',
type: 2
},
{
image: `${this.$picUrl}/static/index/g5.png?n=` + new Date().getTime(),
text: "意见反馈",
path: '/pages/feedback/index',
type: 2
},
],
catagoryList: [],
paihangList: [],

@ -47,6 +47,7 @@
<view>暂无动态</view>
</view>
<view
v-if="userInfo.user_type == 40"
id="publish"
class="publish"
:style="{'left': left === 0 ? '626rpx' : left + 'px', 'top': top === 0 ? 'calc(100% - 300rpx)' : top + 'px'}"
@ -64,6 +65,10 @@
<script>
import * as Api from '@/api/squareDynamic/index.js'
import {
checkLogin
} from '@/core/app'
import * as UserApi from '@/api/user';
export default {
components: {
@ -89,6 +94,8 @@
windowHeight: 0,
isMove: true,
edge: 20,
userInfo: {},
isLogin: false,
};
},
watch: {
@ -125,8 +132,45 @@
this.page = 1;
this.dynamicList = [];
this.getDynamicList();
if (uni.getStorageSync("userInfo").user_id) {
this.isLogin = true
this.onRefreshPage()
} else {
this.userInfo = {}
}
},
methods: {
//
onRefreshPage() {
this.isLogin = checkLogin()
console.log(this.isLogin, '是否登录')
//
this.getUserInfo();
},
//
getUserInfo() {
const that = this
return new Promise((resolve, reject) => {
!that.isLogin ? resolve(null) : UserApi.info({}, {
load: false
})
.then(result => {
let data = result.data.userInfo
that.userInfo = data
uni.setStorageSync('userInfo', that.userInfo)
resolve(that.userInfo)
})
.catch(err => {
if (err.result && err.result.status == 401) {
that.isLogin = false
resolve(null)
} else {
reject(err)
}
})
})
},
async getDynamicList() {
if (this.loading || this.finished) {
return;

@ -48,7 +48,7 @@ import * as Api from '@/api/squareDynamic/index.js'
imageList: [],
uploadImages: [],
content: '',
cateList: ['晒单', '日常', '文章'],
cateList: ['推荐', '精选','晒单', '日常', '文章'],
cateIndex: -1,
isPublish: false,
loading: false,

@ -509,6 +509,12 @@
进群有礼
</view>
</view>
<view class="serveIcon" v-if="userInfo.user_type == 40" @click="goJump('/pages/feedback/index')">
<image src="/static/feedback/feedback.png" class="icons"></image>
<view class="serveInfo">
意见反馈
</view>
</view>
</view>
</view>
<!-- 商品推荐 -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Loading…
Cancel
Save