This commit is contained in:
ylj20011123 2025-12-01 09:02:03 +08:00
parent bc2c1bb9e5
commit c3911e17a9
8 changed files with 77 additions and 65 deletions

View File

@ -152,7 +152,8 @@
"path": "index", "path": "index",
"style": { "style": {
"navigationBarTitleText": "优质文明服务监督", "navigationBarTitleText": "优质文明服务监督",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"navigationStyle": "custom"
} }
}, },
{ {

View File

@ -332,9 +332,9 @@ export default {
SERVERPART_ID: this.detailSuggestion.SERVERPART_ID, SERVERPART_ID: this.detailSuggestion.SERVERPART_ID,
SERVERPART_NAME: this.detailSuggestion.SERVERPART_NAME, SERVERPART_NAME: this.detailSuggestion.SERVERPART_NAME,
} }
this.imgsList = this.detailSuggestion.IMAGE_URL.split(',') this.imgsList = this.detailSuggestion.IMAGE_URL ? this.detailSuggestion.IMAGE_URL.split(',') : []
let labelList = this.detailSuggestion.ENUM_LABEL.split(',') let labelList = this.detailSuggestion.ENUM_LABEL ? this.detailSuggestion.ENUM_LABEL.split(',') : []
this.pageMsg.typeName = this.detailSuggestion.SUGGESTION_TYPE ? this.msgTypeObj[this.detailSuggestion.SUGGESTION_TYPE] : "" this.pageMsg.typeName = this.detailSuggestion.SUGGESTION_TYPE ? this.msgTypeObj[this.detailSuggestion.SUGGESTION_TYPE] : ""
this.typeIndex = this.detailSuggestion.SUGGESTION_TYPE === 2000 ? '0' : this.detailSuggestion.SUGGESTION_TYPE === 1050 ? '1' : this.detailSuggestion.SUGGESTION_TYPE === 4000 ? '2' : '0' this.typeIndex = this.detailSuggestion.SUGGESTION_TYPE === 2000 ? '0' : this.detailSuggestion.SUGGESTION_TYPE === 1050 ? '1' : this.detailSuggestion.SUGGESTION_TYPE === 4000 ? '2' : '0'

View File

@ -1,7 +1,10 @@
<template> <template>
<view class="complaints"> <view class="complaints">
<!-- 因为说扫码进入不要微信小程序自带的 返回首页按钮 那就只能 去掉自带的标题内容 自己搞了 -->
<view class="complaints-content"> <div class="mainTop" :style="{ height: menu.bottom + 6 + 'px', paddingTop: menu.top + 'px' }">
<div class="pageTitle" :style="{ height: menu.height + 'px' }">优质文明服务监督</div>
</div>
<view class="complaints-content" :style="{ marginTop: menu.bottom + 6 + 'px' }">
<view class="complaints-content-unit" v-for="(unit, i) in complaintsRecord" :key="i" <view class="complaints-content-unit" v-for="(unit, i) in complaintsRecord" :key="i"
@click="goDetail(unit)"> @click="goDetail(unit)">
@ -58,7 +61,8 @@ export default {
pageIndex: 1, pageIndex: 1,
isLoadMore: true, isLoadMore: true,
isScreen: false isScreen: false
} },
menu: {}, //
} }
}, },
components: { components: {
@ -175,6 +179,9 @@ export default {
this.pageMsg.pageIndex = 1 this.pageMsg.pageIndex = 1
this.pageMsg.isLoadMore = true this.pageMsg.isLoadMore = true
this.getConsuptionRecord() this.getConsuptionRecord()
},
onLoad() {
this.menu = uni.getMenuButtonBoundingClientRect();
} }
} }
</script> </script>
@ -187,6 +194,24 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.mainTop {
width: 100%;
background-color: #f8f8f8;
box-sizing: border-box;
position: fixed;
left: 0;
top: 0;
z-index: 999;
.pageTitle {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
}
.complaints-content { .complaints-content {
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
} }

View File

@ -143,25 +143,25 @@ export default {
}, },
onShow() { onShow() {
this.getUserPoints();
}, },
methods: { methods: {
// //
async getUserPoints() { async getUserPoints() {
let _this = this; const req = {
try { mobile: this.user.MEMBERSHIP_MOBILEPHONE,
const data = await this.$api.getCoop({ outUserId: this.user.MEMBERSHIP_ID,
action_type: "GetMembershipInfo", type: "encryption"
WechatUserId: this.user.WechatUserId,
noLoading: true,
});
if (data.ResultCode === "100") {
this.userPoints = data.Data.MEMBERSHIP_POINT || 0;
} }
} catch (error) { const data = await this.$api.$post('/MemberApi/ThirdInterface/GetYTSLMemberPoint', req)
console.error('获取用户积分失败:', error); console.log('datadatadatadata321', data);
if (data.Result_Code === 100) {
let res = data.Result_Data
} else {
uni.showToast({
title: data.Result_Desc,
icon: 'none'
});
} }
}, },
@ -179,7 +179,6 @@ export default {
// //
handleExchange() { handleExchange() {
if (!this.etcPoints || this.etcPoints <= 0) { uni.showToast({ title: '请输入兑换积分', icon: 'none' }); return; } if if (!this.etcPoints || this.etcPoints <= 0) { uni.showToast({ title: '请输入兑换积分', icon: 'none' }); return; } if
(Number(this.etcPoints) < 100) { uni.showToast({ title: '单次最低兑换100积分', icon: 'none' }); return; } if
(Number(this.etcPoints) > this.userPoints) { (Number(this.etcPoints) > this.userPoints) {
uni.showToast({ uni.showToast({
title: 'ETC积分不足', title: 'ETC积分不足',
@ -203,36 +202,16 @@ export default {
async doExchange() { async doExchange() {
uni.showLoading({ title: '兑换中...' }); uni.showLoading({ title: '兑换中...' });
try { const req = {
// TODO: orderno: "",
// const result = await this.$api.postCoop({ outUserId: this.user.MEMBERSHIP_ID,
// action_type: "ExchangePoints", changePoint: this.platformPoints,
// etcPoints: this.etcPoints, memo: "积分兑换",
// platformPoints: this.platformPoints type: "encryption"
// });
//
setTimeout(() => {
uni.hideLoading();
uni.showToast({
title: '兑换成功',
icon: 'success'
});
//
this.getUserPoints();
//
this.etcPoints = '';
this.platformPoints = 0;
}, 1000);
} catch (error) {
uni.hideLoading();
uni.showToast({
title: '兑换失败,请稍后重试',
icon: 'none'
});
} }
const data = await this.$api.$post('/MemberApi/ThirdInterface/ChangeYTSLMemberPoint', req)
console.log('datadatadatadata321', data);
}, },
// //

View File

@ -449,7 +449,7 @@ export default {
// //
// this.handleGetYNUserInfo() this.handleGetYNUserInfo()
// //
@ -656,9 +656,9 @@ export default {
async handleGetYNUserInfo() { async handleGetYNUserInfo() {
let params = { let params = {
// mobile: this.user.MEMBERSHIP_MOBILEPHONE, // mobile: this.user.MEMBERSHIP_MOBILEPHONE,
mobile: "15067121398", mobile: "13508703001",
// out_user_id: this.user.MEMBERSHIP_ID, // out_user_id: this.user.MEMBERSHIP_ID,
outUserId: "3209361", outUserId: "46999999",
}; };
let time = Math.ceil(new Date().getTime() / 1000); let time = Math.ceil(new Date().getTime() / 1000);
let req = { let req = {
@ -698,7 +698,7 @@ export default {
const tweetsData = await new Promise((resolve, reject) => { const tweetsData = await new Promise((resolve, reject) => {
uni.request({ uni.request({
url: `https://sxgzh.etclife.cn/etc/api/v1/gzh/point/balance`, url: `https://tuozhan.yns-etc.com/gzh/api/v1/gzh/point/balance`,
method: "POST", method: "POST",
data: req, data: req,
header: { header: {

File diff suppressed because one or more lines are too long

View File

@ -302,7 +302,7 @@ var _default = {
// } // }
// 请求一下云南那边的积分信息 // 请求一下云南那边的积分信息
// this.handleGetYNUserInfo() _this2.handleGetYNUserInfo();
// 拿到订单信息 // 拿到订单信息
// await this.handleGetOrderDetail() // await this.handleGetOrderDetail()
@ -340,7 +340,7 @@ var _default = {
_this2.$utils.addUserBehaviorNew({ _this2.$utils.addUserBehaviorNew({
behaviorRecordDesc: "进入了我的页面" behaviorRecordDesc: "进入了我的页面"
}); });
case 15: case 16:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -540,9 +540,9 @@ var _default = {
case 0: case 0:
params = { params = {
// mobile: this.user.MEMBERSHIP_MOBILEPHONE, // mobile: this.user.MEMBERSHIP_MOBILEPHONE,
mobile: "15067121398", mobile: "13508703001",
// out_user_id: this.user.MEMBERSHIP_ID, // out_user_id: this.user.MEMBERSHIP_ID,
outUserId: "3209361" outUserId: "46999999"
}; };
time = Math.ceil(new Date().getTime() / 1000); time = Math.ceil(new Date().getTime() / 1000);
req = { req = {
@ -581,7 +581,7 @@ var _default = {
_context4.next = 11; _context4.next = 11;
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
uni.request({ uni.request({
url: "https://sxgzh.etclife.cn/etc/api/v1/gzh/point/balance", url: "https://tuozhan.yns-etc.com/gzh/api/v1/gzh/point/balance",
method: "POST", method: "POST",
data: req, data: req,
header: { header: {

View File

@ -9,11 +9,18 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/pointsRedemption/index", "name": "pages/complaints/addComplaints",
"pathName": "pages/pointsRedemption/index", "pathName": "pages/complaints/index",
"query": "", "query": "",
"scene": null, "scene": null,
"launchMode": "default" "launchMode": "default"
},
{
"name": "pages/pointsRedemption/index",
"pathName": "pages/pointsRedemption/index",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }