Browse Source

评价页面

epass
mk 4 months ago
parent
commit
3d4df01b17
  1. 4
      api/index.js
  2. 7
      api/user.js
  3. 3
      app.json
  4. 3
      app.wxss
  5. 14
      ocr.js
  6. 11
      pages/index/index.js
  7. 38
      pages/mine/mine.js
  8. 10
      pages/mine/mine.wxml
  9. 9
      pages/register/register.js
  10. 9
      project.private.config.json
  11. 5
      subpages/mine/checkInRecord/checkInRecord.js
  12. 560
      subpages/mine/editUser/editUser.js
  13. 2
      subpages/mine/editUser/editUser.json
  14. 19
      subpages/mine/editUser/editUser.wxml
  15. 90
      subpages/mine/evaluate/evaluate.js
  16. 8
      subpages/mine/evaluate/evaluate.json
  17. 54
      subpages/mine/evaluate/evaluate.wxml
  18. 29
      subpages/mine/evaluate/evaluate.wxss

4
api/index.js

@ -7,3 +7,7 @@ export function getPolicyList(query) {
export function getPolicyInfo(id) {
return fly.get(`/byspc/mzPolicy/${id}`)
}
// 选房记录
export function chooseRoomRec(pamars) {
return fly.get(`/bysmp/chooseRoomRec/page`,pamars)
}

7
api/user.js

@ -2,3 +2,10 @@ var fly = require('../utils/request')
export function login(data) {
return fly.post(`/bysmp/user/loginByWxCode`,data)
}
export function bindPhone(code) {
return fly.put(`/bysmp/user/bindPhone?code=${code}`)
}
export function getUserInfo() {
return fly.get(`/bysmp/user/wxUserInfo`)
}

3
app.json

@ -23,7 +23,8 @@
"name": "mine",
"pages": [
"editUser/editUser",
"checkInRecord/checkInRecord"
"checkInRecord/checkInRecord",
"evaluate/evaluate"
]
},
{

3
app.wxss

@ -234,4 +234,7 @@ page{
.icon-20{
width: 20rpx !important;
height: 20rpx !important;
}
.p-24{
padding: 24rpx;
}

14
ocr.js

@ -1,12 +1,22 @@
var config = require('./utils/config')
export const ocrAction = async (filePath) => {
wx.showLoading({
title: '正在处理',
})
let img_url = ''
console.log(filePath);
wx.uploadFile({
url: `${config.BASEURL()}/common/upload`,
name: 'name',
filePath: filePath,
success(res){
img_url = res.data
}
})
// TODO 将 tempFilePath 上传到 CDN 得到 url
let img_url = 'http://192.168.1.144:9000/mzjzf/身份反.jpg'
// 实现上传到 cdn 的代码, 将得到的 url 写到 img_url 中
// 调用服务市场接口 https://fuwu.weixin.qq.com/service/detail/000ce4cec24ca026d37900ed551415

11
pages/index/index.js

@ -1,7 +1,8 @@
// pages/index/index.js
const app = getApp()
import {
login
login,
getUserInfo
} from "../../api/user"
import {
getPolicyList
@ -67,7 +68,14 @@ Page({
login({
code: res.code
}).then(res => {
wx.setStorageSync('token',res.data.token)
if(res.data.bindPhone){
wx.redirectTo({
url: '/pages/register/register',
})
}
that.getPolicyList()
}).catch(err => {
console.log(err);
})
@ -80,7 +88,6 @@ Page({
pageSize: 3
}
getPolicyList(query).then(res => {
console.log(res);
this.setData({
policyList:res.data
})

38
pages/mine/mine.js

@ -1,6 +1,7 @@
// pages/mine/mine.js
const app = getApp()
import Notify from '@vant/weapp/notify/notify';
import { getUserInfo} from "../../api/user"
Page({
/**
@ -32,7 +33,8 @@ Page({
label:'共享空间',
url:''
}
]
],
registerFlag:false
},
/**
@ -112,10 +114,34 @@ Page({
}
},
getUserInfo(){
wx.getUserProfile({
success:(res)=>{
console.log(res);
getUserInfo().then(res=>{
if(res.code ===200 && data){
app.globalData.userInfo = res.data
this.setData({
registerFlag:false
})
}else{
this.setData({
registerFlag:true
})
}
})
}
})
},
getUserProfile: function(e) {
// 推荐使用 getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
console.log(e);
if (e.detail.userInfo) {
// 用户按了允许授权按钮
this.setData({
userInfo: e.detail.userInfo
})
} else {
// 用户按了拒绝按钮
wx.showToast({
title: '用户拒绝授权',
icon: 'none'
})
}
}
})

10
pages/mine/mine.wxml

@ -5,16 +5,10 @@
</view>
</view>
<view class="body">
<!-- bindtap="goToEdit" -->
<view class="userInfo flex flex-sb items-center" >
<view class="userInfo flex flex-sb items-center" bindtap="goToEdit">
<image src="../../images/mine/头像.png" class="avatar" mode="" />
<view class="flex flex-1" style="justify-content: start;">
<van-button
round
type="info"
bind:tap="getUserInfo"
custom-class="transparent-btn"
>去注册</van-button>
微信用户
</view>
<van-icon name="arrow" />
</view>

9
pages/register/register.js

@ -1,4 +1,5 @@
// pages/register/register.js
import {bindPhone} from "../../api/user"
Page({
/**
@ -65,5 +66,13 @@ Page({
},
getphonenumber(e){
console.log(e);
bindPhone(e.detail.code).then(res=>{
console.log(res);
if(res.code === 0){
wx.redirectTo({
url: '/pages/index/index',
})
}
})
}
})

9
project.private.config.json

@ -1,5 +1,5 @@
{
"libVersion": "3.7.12",
"libVersion": "2.33.0",
"projectname": "epmet-apartment-mp",
"setting": {
"urlCheck": false,
@ -14,6 +14,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "评价页面",
"pathName": "subpages/mine/evaluate/evaluate",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "报修",
"pathName": "subpages/eventAdd/add/add",

5
subpages/mine/checkInRecord/checkInRecord.js

@ -1,4 +1,5 @@
// subpages/mine/checkInRecord/checkInRecord.js
import {chooseRoomRec} from '../../../api/index'
Page({
/**
@ -12,7 +13,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
},
/**
@ -69,7 +70,7 @@ Page({
pageSize:10,
pageNo:1
}
getList(parm).then(res=>{
chooseRoomRec(parm).then(res=>{
if(res.code === 0){
this.setData({
list:res.data.list

560
subpages/mine/editUser/editUser.js

@ -1,10 +1,6 @@
// import {
// initTree,
// volunteerInfoSave,
// getwxphone,
// volunteerOrg,
// volunteerInfo,
// } from "../../../../api/user";
import {
getUserInfo
} from "../../../api/user";
// import { checkContentStatus } from "../../../../api/audit";
// const QQMapWX = require("../../../../utils/qqmap-wx-jssdk");
// const config = require("../../../../utils/config");
@ -15,139 +11,30 @@ Page({
*/
data: {
name: null,
nickName: null,
nickName: '微信用户',
idCard: null,
mobile: null,
remainingDays:null,
fileList: [
{
url: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240830/de2ccb0304eb4bab9513d11472fb3454.png",
type: "image",
name: "image",
},
],
showIdentity: false,
identityList: [
{ name: "医疗急救", key: "0" },
{ name: "体育竞技", key: "1" },
{ name: "驾驶运输", key: "2" },
{ name: "法律服务", key: "3" },
{ name: "信息技术", key: "4" },
{ name: "经营管理", key: "5" },
{ name: "公共关系", key: "6" },
{ name: "教育培训", key: "7" },
{ name: "电器维修", key: "8" },
{ name: "安全保卫", key: "9" },
{ name: "财会金融", key: "10" },
{ name: "设计创意", key: "11" },
{ name: "客服接待", key: "12" },
{ name: "物业养护", key: "13" },
{ name: "新闻写作", key: "14" },
{ name: "精通外语", key: "15" },
{ name: "音乐", key: "16" },
{ name: "心理咨询", key: "17" },
{ name: "护理照护", key: "18" },
{ name: "手工制作", key: "19" },
{ name: "文化艺术", key: "20" },
{ name: "网络技术", key: "21" },
{ name: "摄像摄影", key: "22" },
// {
// url: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240830/de2ccb0304eb4bab9513d11472fb3454.png",
// type: "image",
// name: "image",
// },
],
identityName: [],
identityKey: [],
showAgency: false,
volunOrgName: [],
volunOrgKey: [],
volunOrgList: [],
showVolunOrg: false,
traceId: "",
remainingDays:10
},
// 上传头像
chooseAvatar() {
wx.chooseMedia({
count: 1, // 最多选择 1 张图片
mediaType: ['image'], // 只选择图片
success: (res) => {
if (res.tempFiles.length > 0) {
const tempFilePath = res.tempFiles[0].tempFilePath;
this.setData({
avatarUrl: tempFilePath
});
// 如果你需要将图片上传到服务器,可以在这里添加上传逻辑
// wx.uploadFile({
// url: 'your_upload_url',
// filePath: tempFilePath,
// name: 'avatar',
// success: (uploadRes) => {
// console.log('上传成功', uploadRes);
// },
// fail: (err) => {
// console.error('上传失败', err);
// }
// });
}
},
fail: (err) => {
console.error('选择图片失败', err);
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// this.data.qqMapWX = new QQMapWX({
// key: "CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ",
// });
// this.reverseLocation();
// this.initTree();
// this.volunteerOrg();
// console.log(app.globalData.userInfo, " app.globalData.userInfo");
// let {
// nickName,
// name,
// agencyName,
// idCard,
// mobile,
// identityType,
// headImgUrl,
// agencyId,
// identityTypeList,
// orgName,
// userId,
// } = app.globalData.userInfo;
// let identityName = [];
// if (identityType && identityType.length != 0) {
// identityName = this.data.identityList
// .filter((item) => identityType.includes(item.key))
// .map((item) => item.name);
// }
// this.setData({
// userId,
// agencyNameStr: agencyName,
// fileList: headImgUrl ? [{ url: headImgUrl }] : this.data.fileList,
// identityKey: identityType,
// identityType,
// identityNameStr: identityTypeList ? identityTypeList.join() : "",
// identityName,
// volunOrgIdNameStr: orgName,
// });
// this.volunteerInfo();
this.getUserInfo()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
let volunteerOrgName = [];
// let { volunteerOrgId } = app.globalData.userInfo;
// if (volunteerOrgId) {
// volunteerOrgName = this.data.volunOrgList
// .filter((item) => volunteerOrgId.split(",").includes(item.key))
// .map((item) => item.name);
// }
},
/**
@ -174,401 +61,48 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
volunteerInfo() {
let parm = {
id: app.globalData.userInfo.id,
};
volunteerInfo(parm).then((res) => {
let {
nickName,
name,
agencyName,
idCard,
mobile,
identityType,
headImgUrl,
agencyId,
identityTypeList,
orgName,
userId,
volunteerOrgId,
} = res.data;
console.log(
nickName,
name,
agencyName,
idCard,
mobile,
identityType,
headImgUrl,
agencyId,
identityTypeList,
orgName,
userId,
"dslidfjlsdfj"
);
console.log(res, "sd;lfk;lsfdl");
this.setData({
nickName,
name,
agencyId,
volunteerOrgId,
userId,
idCard: res.data.idCard,
mobile,
});
});
},
volunteerOrg() {
let parm = {
orgName: "",
serviceType: "",
// userId:app.globalData.userInfo.userId,
status: "pass",
pageNo: 1,
pageSize: 20,
};
volunteerOrg(parm)
.then((res) => {
if (res.code === 0) {
console.log(res);
chooseAvatar() {
wx.chooseMedia({
count: 1, // 最多选择 1 张图片
mediaType: ['image'], // 只选择图片
success: (res) => {
if (res.tempFiles.length > 0) {
const tempFilePath = res.tempFiles[0].tempFilePath;
this.setData({
volunOrgList: res.data.list.map((item) => ({
name: item.orgName,
key: item.id,
})),
avatarUrl: tempFilePath
});
// 如果你需要将图片上传到服务器,可以在这里添加上传逻辑
// wx.uploadFile({
// url: 'your_upload_url',
// filePath: tempFilePath,
// name: 'avatar',
// success: (uploadRes) => {
// console.log('上传成功', uploadRes);
// },
// fail: (err) => {
// console.error('上传失败', err);
// }
// });
}
})
.catch((err) => {
console.log(err);
});
},
handelShowIdentity() {
this.setData({
showIdentity: true,
identityKey: [],
identityName: [],
identityName: [],
});
},
onClose() {
this.setData({
showIdentity: false,
});
},
onChangeIdentity(e) {
// this.setData({
// identityKey:[],
// identityName:[],
// identityName:[]
// });
console.log(
this.data.identityKey,
this.data.identityName,
this.data.identityList,
"dsfijlslkfjslkjflksfjlks"
);
console.log(e, "dsfijlslkfjslkjflksfjlks");
const name = e.detail.name;
const key = e.detail.key;
let identityName = this.data.identityName || [];
let identityKey = this.data.identityKey || [];
let identityList = this.data.identityList || [];
const nameIndex = identityName.indexOf(name);
if (nameIndex > -1) {
identityName.splice(nameIndex, 1);
} else {
identityName.push(name);
}
const keyIndex = identityKey.indexOf(key);
if (keyIndex > -1) {
identityKey.splice(keyIndex, 1);
const obj = identityList.find((item) => item.key === key);
if (obj) {
delete obj.color;
}
} else {
identityKey.push(key);
// 添加 color 属性
const obj = identityList.find((item) => item.key === key);
if (obj) {
obj.color = "#1cd66c";
}
}
this.setData({
identityName: identityName,
identityNameStr: identityName.join(","),
identityType: identityKey,
identityList,
});
},
afterRead(event) {
const { file } = event.detail;
console.log(file);
let than = this;
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadWxFile`,
filePath: file.url,
name: "file",
header: {
"Content-type": "multipart/form-data",
Authorization: wx.getStorageSync("token"),
},
success(res) {
let { data } = JSON.parse(res.data);
// 上传完成需要更新 fileList
const { fileList = [] } = than.data;
fileList.push({ ...file, url: data.url });
console.log(fileList);
than.setData({ fileList });
// 图片开始审核
than.setData({
traceId: data.traceId,
});
},
catch(err) {
console.log(err);
},
});
},
// 逆地址解析
reverseLocation() {
const _this = this;
// this.data.qqMapWX.reverseGeocoder({
// success(res) {
// _this.setData({
// street: res.result.address_reference.town.title,
// });
// _this.initTree();
// },
// fail(err) {
// console.debug(err);
// },
// });
},
// initTree() {
// let parm = {
// organizationName: "市北区",
// };
// initTree(parm)
// .then((res) => {
// this.setData({
// agencyList: [{ label: "市北区", value: "", children: res.data }],
// });
// })
// .catch((err) => {
// console.log(err);
// });
// },
handelShowAgency() {
this.setData({
showAgency: true,
});
},
handelShowVolunOrg() {
this.setData({
showVolunOrg: true,
});
},
onCloseV() {
this.setData({
showVolunOrg: false,
});
},
onChangeVolunOrg(e) {
const name = e.detail.name;
const key = e.detail.key;
let volunOrgName = this.data.volunOrgName || [];
let volunOrgKey = this.data.volunOrgKey || [];
let volunOrgList = this.data.volunOrgList || [];
const nameIndex = volunOrgName.indexOf(name);
if (nameIndex > -1) {
volunOrgName.splice(nameIndex, 1);
} else {
volunOrgName.push(name);
}
const keyIndex = volunOrgKey.indexOf(key);
if (keyIndex > -1) {
volunOrgKey.splice(keyIndex, 1);
const obj = volunOrgList.find((item) => item.key === key);
if (obj) {
delete obj.color;
}
} else {
volunOrgKey.push(key);
// 添加 color 属性
const obj = volunOrgList.find((item) => item.key === key);
if (obj) {
obj.color = "#1cd66c";
fail: (err) => {
console.error('选择图片失败', err);
}
}
this.setData({
volunOrgName: volunOrgName,
volunOrgIdNameStr: volunOrgName.join(","),
volunteerOrgId: volunOrgKey.join(","),
volunOrgList,
});
},
onChangeAgency(e) {
const { value, selectedOptions } = e.detail;
const orgId = selectedOptions[selectedOptions.length - 1].value;
const organizationName = selectedOptions[selectedOptions.length - 1].label;
const level = selectedOptions[selectedOptions.length - 1].level;
const agencyNameStr = selectedOptions.map((item) => item.label).join(",");
this.setData({
searchOrgIdPath: orgId,
agencyNameStr,
selectedOptions,
organizationName,
});
if (level === "community") {
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
getUserInfo(){
getUserInfo().then(res=>{
this.setData({
showAgency: false,
});
return false;
}
// initTree({ organizationName }).then((res) => {
// if (res.data.length > 0) {
// const data = res.data.map((item) => {
// return {
// ...item,
// children: [],
// };
// });
// const arr = this.getTreeFun(value, this.data.agencyList, data);
// this.setData({
// agencyList: arr,
// });
// } else {
// const arr = this.getTreeFun(value, this.data.agencyList, null);
// this.setData({
// agencyList: arr,
// });
// }
// });
},
getTreeFun(value, arr, data) {
return arr.map((item) => {
if (value == item.value) {
return {
...item,
children: data,
};
}
if (item.children && item.children.length > 0) {
return {
...item,
children: this.getTreeFun(value, item.children, data),
};
}
return item;
});
},
onConfirmAgency() {
this.setData({
showAgency: false,
});
},
onCancelAgency() {
this.setData({
showAgency: false,
});
},
submit() {
if (!this.data.traceId) {
// 没有要审核的图片
this.doSubmit();
} else {
let params = {
traceId: this.data.traceId,
};
checkContentStatus(params)
.then((res) => {
let data = res.data;
if (data.checkFlag == -1) {
wx.showToast({
title: "头像不合规",
icon: "none",
});
} else if (data.checkFlag == 0) {
// 图像审核中
wx.showToast({
title: "头像审核中",
icon: "none",
});
} else {
// 审核通过
this.doSubmit();
}
})
.catch((err) => {
console.log(err);
});
}
},
doSubmit() {
if (!this.data.name) {
wx.showToast({
title: "请填写姓名",
icon: "none",
});
return false;
}
if (!this.data.idCard) {
wx.showToast({
title: "请填写身份证号",
icon: "none",
});
return false;
}
if (!this.data.mobile) {
wx.showToast({
title: "请填写手机号",
icon: "none",
});
return false;
}
let parm = {
nickName: this.data.nickName,
name: this.data.name,
idCard: this.data.idCard,
mobile: this.data.mobile,
agencyId: this.data.searchOrgIdPath,
identityType: this.data.identityType,
headImgUrl: this.data.fileList[0] ? this.data.fileList[0].url : "",
volunteerOrgId: this.data.volunteerOrgId || "",
};
volunteerInfoSave(parm)
.then((res) => {
wx.showToast({
title: "修改成功",
duration: 2000,
success: () => {
setTimeout(() => {
wx.navigateBack();
}, 2000);
},
});
nickName:res.data.nickName,
idCard:res.data.idCard,
name:res.data.name,
mobile:res.data.phone,
remainingDays:res.data.leftQuota,
})
.catch((err) => {
console.log(err);
});
},
deleteImg() {
console.log(11);
this.setData({
fileList: [],
});
},
})
}
});

2
subpages/mine/editUser/editUser.json

@ -15,5 +15,5 @@
"van-image":"@vant/weapp/image/index",
"van-divider": "@vant/weapp/divider/index"
},
"navigationBarTitleText": "修改个人信息"
"navigationBarTitleText": "个人信息"
}

19
subpages/mine/editUser/editUser.wxml

@ -1,7 +1,8 @@
<view class="author ">
<van-cell is-link center custom-class="cus-avatar" bind:tap="chooseAvatar">
<van-cell is-link center custom-class="cus-avatar" >
<!-- bind:tap="chooseAvatar" -->
<view slot="title">
<van-image width="55" height="55" round src="{{avatarUrl || 'https://img.yzcdn.cn/vant/cat.jpeg'}}" />
<van-image width="55" height="55" round src="{{avatarUrl || '../../../../images/mine/头像.png'}}" />
</view>
</van-cell>
</view>
@ -10,10 +11,10 @@
基本信息
</view>
<van-cell-group>
<van-field model:value="{{ nickName }}" placeholder="请输入" input-align="right" label="昵称" />
<van-field model:value="{{ name }}" input-align="right" label="姓名" placeholder="请输入" />
<van-field model:value="{{ idCard }}" label="身份证" input-align="right" type="idcard" placeholder="实名认证请输入身份证" border="{{ false }}" />
<van-field model:value="{{ mobile }}" clearable input-align="right" label="手机号" placeholder="请输入" border="{{ false }}">
<van-field model:value="{{ nickName }}" placeholder="请输入" input-align="right" label="昵称" disabled="{{true}}"/>
<van-field model:value="{{ name }}" input-align="right" label="姓名" placeholder="请输入" disabled="{{true}}"/>
<van-field model:value="{{ idCard }}" label="身份证" input-align="right" type="idcard" placeholder="实名认证请输入身份证" border="{{ false }}" disabled="{{true}}"/>
<van-field model:value="{{ mobile }}" clearable input-align="right" label="手机号" placeholder="请输入" border="{{ false }} " disabled="{{true}}">
</van-field>
</van-cell-group>
<!-- 住房剩余天数 -->
@ -21,18 +22,18 @@
</van-field> -->
</view>
<view class="day">
<van-cell title="住房剩余天数" value="{{remainingDays}}天" border="false" custom-class="cus-day">
<van-cell title="住房剩余天数" value="{{remainingDays || 0}}天" border="false" custom-class="cus-day">
</van-cell>
</view>
<view style=" text-align: center;margin-top: 220rpx;">
<!-- <view style=" text-align: center;margin-top: 220rpx;">
<view class="bot-btn">
<van-button slot="button" type="primary" round color="linear-gradient(to right, #0DC6C6 , #46DBD5)" bind:tap="submit">
确定
</van-button>
</view>
</view>
</view> -->
<van-popup show="{{ showAgency }}" round position="bottom">
<van-cascader wx:if="{{showAgency}}" field-names="{{ {text: 'label',value: 'value',children: 'children'} }}" value="{{ cascaderValue }}" title="请选择所在地区" options="{{ agencyList }}" bind:close="onCancelAgency" bind:change="onChangeAgency" bind:finish="onConfirmAgency" />
</van-popup>

90
subpages/mine/evaluate/evaluate.js

@ -0,0 +1,90 @@
// subpages/mine/evaluate/evaluate.js
Page({
/**
* 页面的初始数据
*/
data: {
satisfiedZt:0,
satisfiedHj:0,
satisfiedFw:0,
satisfiedTy:0,
fileList: [{
url: 'https://img.yzcdn.cn/vant/leaf.jpg',
name: '图片1',
},
// Uploader 根据文件后缀来判断是否为图片文件
// 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
{
url: 'http://iph.href.lu/60x60?text=default',
name: '图片2',
isImage: true,
// deletable: true,
},
],
switchFlag:false,
questionText:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
onChangeSwitch(e){
this.setData({
switchFlag:e.detail
})
}
})

8
subpages/mine/evaluate/evaluate.json

@ -0,0 +1,8 @@
{
"usingComponents": {
"van-rate": "@vant/weapp/rate/index",
"van-switch": "@vant/weapp/switch/index",
"van-uploader": "@vant/weapp/uploader/index"
},
"navigationBarTitleText": "评价"
}

54
subpages/mine/evaluate/evaluate.wxml

@ -0,0 +1,54 @@
<!--subpages/mine/evaluate/evaluate.wxml-->
<view class="flex bg-white p-24">
<image src="../../../../../../../images/zixun.png" mode="" class=" mr-10" style="width: 200rpx;height: 152rpx;"/>
<view class="flex flex-col flex-1">
<view class="font-bold">
国信上月运抵
</view>
<view>5号楼1单元895南卧</view>
<view class="text-26 mt-24" style="color:#ee962c;">3居室</view>
</view>
</view>
<view class="card" style="width: calc(100vw - 40rpx);margin:14rpx auto 0;">
<view class="title">
满意度评价
</view>
<view class="flex flex-sb">
<view class="labe">总体评价</view>
<view class="flex flex-1 flex-x-end items-center">
<view class="gray text-28">{{satisfiedZt === 0 ?'':satisfiedZt <= 2 ? '不满意' : (satisfiedZt <= 4 ? '基本满意' : (satisfiedZt === 5 ? '非常满意' : ''))}}</view>
<van-rate model:value="{{ satisfiedZt }}" size="{{ 25 }}" color="#13c2c2" void-icon="star" void-color="#eee" />
</view>
</view>
<view class="flex flex-sb">
<view class="labe">环境方面</view>
<view class="flex flex-1 flex-x-end items-center">
<view class="gray text-28">{{satisfiedHj === 0?'':satisfiedHj <= 2? '不满意' : (satisfiedHj <= 4 ? '基本满意' : (satisfiedHj === 5 ? '非常满意' : ''))}}</view>
<van-rate model:value="{{ satisfiedHj }}" size="{{ 25 }}" color="#13c2c2" void-icon="star" void-color="#eee" />
</view>
</view>
<view class="flex flex-sb">
<view class="labe">服务方面</view>
<view class="flex flex-1 flex-x-end items-center">
<view class="gray text-28">{{satisfiedFw === 0?'':satisfiedFw <= 2? '不满意' : (satisfiedFw <= 4 ? '基本满意' : (satisfiedFw === 5 ? '非常满意' : ''))}}</view>
<van-rate model:value="{{ satisfiedFw }}" size="{{ 25 }}" color="#13c2c2" void-icon="star" void-color="#eee" />
</view>
</view>
<view class="flex flex-sb">
<view class="labe">体验方面</view>
<view class="flex flex-1 flex-x-end items-center">
<view class="gray text-28">{{satisfiedTy === 0?'':satisfiedTy <= 2? '不满意' : (satisfiedTy <= 4 ? '基本满意' : (satisfiedTy === 5 ? '非常满意' : ''))}}</view>
<van-rate model:value="{{ satisfiedTy }}" size="{{ 25 }}" color="#13c2c2" void-icon="star" void-color="#eee" />
</view>
</view>
<textarea class="question-input" placeholder="请输入内容" bindinput="onInput" value="{{questionText}}" maxlength="" />
<view class="mt-40">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" bind:before-read="beforeRead" bind:delete="deleteData" max-count="3" />
</view>
</view>
<view class="flex flex-sb items-center" style="width: calc(100vw - 40rpx);margin:14rpx auto 0;">
<view>匿名</view>
<van-switch checked="{{ switchFlag }}" bind:change="onChangeSwitch" active-color="#13c2c2"
inactive-color="#e2e2e3" size="32rpx"/>
</view>
<view class="bsBtn" bindtap="onButtonTap">提交</view>

29
subpages/mine/evaluate/evaluate.wxss

@ -0,0 +1,29 @@
/* subpages/mine/evaluate/evaluate.wxss */
page{
background-color:#f8f8f8 ;
padding-bottom: 20rpx;
}
.question-input {
width: 98%;
margin-left: 1%;
margin-top: 2%;
height: 500rpx;
border-radius: 10rpx;
padding: 15rpx;
box-sizing: border-box;
background-color: rgba(246, 246, 246, 1);
color: rgba(203, 203, 203, 1);
font-size: 28rpx;
}
.bsBtn {
width: 440rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 600rpx;
background: linear-gradient(86.25deg, rgba(13, 198, 198, 1) 3.03%, rgba(19, 194, 194, 1) 3.03%, rgba(70, 219, 213, 1) 96.43%);
color: rgba(255, 255, 255, 1);
font-size: 34rpx;
text-align: center;
margin: 22rpx auto 22rpx;
}
Loading…
Cancel
Save