This commit is contained in:
ylj20011123 2025-05-28 19:17:42 +08:00
parent c71b240880
commit 9d7c856ee6
94 changed files with 5287 additions and 3958 deletions

View File

@ -81,10 +81,10 @@
item.SERVERPART_ADDRESS || "-" item.SERVERPART_ADDRESS || "-"
}}</span> }}</span>
</div> </div>
<div class="typeList" v-if="item.ServerpartInfo.SERVERPART_TARGET"> <scroll-view :scroll-x="true" class="typeList" v-if="item.ServerpartInfo.SERVERPART_TARGET">
<div class="typeItem" v-for="( <div class="typeListInner">
subItem, subIndex <div class="typeItem"
) in item.ServerpartInfo.SERVERPART_TARGET.split(',')" :key="subIndex"> v-for="(subItem, subIndex) in item.ServerpartInfo.SERVERPART_TARGET.split(',')" :key="subIndex">
{{ {{
SERVERPART_TARGETOBJ && subItem SERVERPART_TARGETOBJ && subItem
? SERVERPART_TARGETOBJ[subItem] ? SERVERPART_TARGETOBJ[subItem]
@ -92,6 +92,7 @@ subItem, subIndex
}} }}
</div> </div>
</div> </div>
</scroll-view>
</view> </view>
</view> </view>
</view> </view>
@ -355,10 +356,10 @@ subItem, subIndex
item.SERVERPART_ADDRESS || "-" item.SERVERPART_ADDRESS || "-"
}}</span> }}</span>
</div> </div>
<div class="typeList" v-if="item.ServerpartInfo.SERVERPART_TARGET"> <scroll-view :scroll-x="true" class="typeList" v-if="item.ServerpartInfo.SERVERPART_TARGET">
<div class="typeItem" v-for="( <div class="typeListInner">
subItem, subIndex <div class="typeItem"
) in item.ServerpartInfo.SERVERPART_TARGET.split(',')" :key="subIndex"> v-for="(subItem, subIndex) in item.ServerpartInfo.SERVERPART_TARGET.split(',')" :key="subIndex">
{{ {{
SERVERPART_TARGETOBJ && subItem SERVERPART_TARGETOBJ && subItem
? SERVERPART_TARGETOBJ[subItem] ? SERVERPART_TARGETOBJ[subItem]
@ -366,6 +367,7 @@ subItem, subIndex
}} }}
</div> </div>
</div> </div>
</scroll-view>
</view> </view>
</view> </view>
</view> </view>
@ -526,6 +528,9 @@ subItem, subIndex
</div> </div>
<div clsas="title">电桩详情</div> <div clsas="title">电桩详情</div>
<div class="closeIcon"></div> <div class="closeIcon"></div>
<!-- <div class="rightElectricity" @click="handleShowElectricityFee">
<span v-if="selectElectricityFee && selectElectricityFee.length > 0">时段电价</span>
</div> -->
</div> </div>
<div class="popupTab"> <div class="popupTab">
@ -536,13 +541,36 @@ subItem, subIndex
</div> </div>
</div> </div>
<div class="smallTabBox">
<div :class="selectSmallTab === index ? 'smallTabItem selectSmallTabItem' : 'smallTabItem'
" v-for="(item, index) in smallTab" :key="index" @click="handleChangeSmallTab(index)">
{{ item.label }}
{{ item.sum ? `(${item.sum})` : "" }}
</div>
</div>
<scroll-view class="stationList" scroll-y :style="{ <scroll-view class="stationList" scroll-y :style="{
height: `calc(${comeForm === 'home' ? 80 : 95 height: `calc(${comeForm === 'home' ? 80 : 95
}vh - 108rpx - 56rpx - 24rpx - ${comeForm === 'home' ? 100 : 0 }vh - 30px - 108rpx - 56rpx - 24rpx - ${comeForm === 'home' ? 100 : 0
}px)`, }px)`,
paddingBottom: comeForm === 'home' ? 0 : '', paddingBottom: comeForm === 'home' ? 0 : '',
}"> }">
<div class="stationItem" v-for="(item, index) in chargeDetailList" :key="index">
<scroll-view class="selectElectricityFeeListBox" :scroll-x="true"
v-if="selectElectricityFee && selectElectricityFee.length > 0">
<view class="selectElectricityFeeListInner">
<view class="selectElectricityFeeItem" v-for="(item, index) in selectElectricityFee" :key="index">
<view class="timeBox">{{ item.electricityTime }}</view>
<view class="valueBox">{{ item.electricityBill }}</view>
</view>
</view>
</scroll-view>
<template
v-if="smallTab && smallTab[selectSmallTab] && smallTab[selectSmallTab].list && smallTab[selectSmallTab].list.length > 0">
<div class="stationItem" v-for="(item, index) in smallTab[selectSmallTab].list" :key="index">
<div class="leftItem" :style="{ <div class="leftItem" :style="{
backgroundImage: `url(${item.Status === 0 || item.Status === 255 backgroundImage: `url(${item.Status === 0 || item.Status === 255
? 'https://eshangtech.com/minTestImg/offGrid.svg' ? 'https://eshangtech.com/minTestImg/offGrid.svg'
@ -668,7 +696,7 @@ subItem, subIndex
</div> </div>
</div> </div>
<div class="addressText"> {{ item.address || "" }}</div> <!-- <div class="addressText"> {{ item.address || "" }}</div> -->
</div> </div>
<div class="statusBox" v-if=" <div class="statusBox" v-if="
@ -710,12 +738,24 @@ subItem, subIndex
}} }}
</div> </div>
</div> </div>
</template>
</scroll-view> </scroll-view>
</div> </div>
<view class="popup-mask" @catchtouchmove="preventTouchMove" @click="handleClosePopup"></view> <view class="popup-mask" @catchtouchmove="preventTouchMove" @click="handleClosePopup"></view>
</view> </view>
</uni-popup> </uni-popup>
<!-- <uni-popup ref="electricityPopup" :show="electricityShow" :safe-area="false" :mask-click="false"
:is-mask-click="false">
<view class="electricityPopup">
</view>
</uni-popup> -->
<CustomLoading :visible="isLoading" v-if="isLoading" @update:visible="(val) => (isLoading = val)" /> <CustomLoading :visible="isLoading" v-if="isLoading" @update:visible="(val) => (isLoading = val)" />
</view> </view>
</template> </template>
@ -745,6 +785,12 @@ export default {
currentBan: 0, // currentBan: 0, //
swiperHeight: [], // swiperHeight: [], //
isLoading: false, isLoading: false,
smallTab: [],//
selectSmallTab: 0,
pageDirection: {},
electricityFeeRes: {},//
selectElectricityFee: [],//
electricityShow: false
}; };
}, },
props: { props: {
@ -840,6 +886,10 @@ export default {
}, },
// #endif // #endif
methods: { methods: {
//
handleShowElectricityFee() {
this.$refs.electricityPopup.open('center');
},
// //
async handleGetOilData(idList) { async handleGetOilData(idList) {
const data = await this.$api.$javaGet2("/oil-price/getListByServerPartIds", { const data = await this.$api.$javaGet2("/oil-price/getListByServerPartIds", {
@ -999,7 +1049,6 @@ export default {
let serverpart = {}; let serverpart = {};
let idList = [] let idList = []
console.log('serviceListserviceListserviceListserviceListserviceListserviceList', serviceList);
if (serviceList && serviceList.length > 0) { if (serviceList && serviceList.length > 0) {
serviceList.forEach((item) => { serviceList.forEach((item) => {
@ -1015,7 +1064,6 @@ export default {
let _this = this; let _this = this;
console.log('_this.serviceAreaList_this.serviceAreaList_this.serviceAreaList', _this.serviceAreaList);
let list = []; let list = [];
let nameList = []; let nameList = [];
@ -1700,7 +1748,6 @@ export default {
} }
console.log('newResnewResnewResnewResnewResnewResnewRes', newRes);
// 2025-05-14 // 2025-05-14
@ -1767,7 +1814,6 @@ export default {
} }
}); });
} }
console.log("serviceListserviceListserviceListserviceList", serviceList);
if (serviceList && serviceList.length > 0) { if (serviceList && serviceList.length > 0) {
serviceList.forEach((item) => { serviceList.forEach((item) => {
@ -1801,6 +1847,7 @@ export default {
NationalStandard: Number(fourthItem.national), NationalStandard: Number(fourthItem.national),
VoltageLowerLimits: Number(fourthItem.voltageLimit), VoltageLowerLimits: Number(fourthItem.voltageLimit),
VoltageUpperLimits: Number(fourthItem.voltageMax), VoltageUpperLimits: Number(fourthItem.voltageMax),
electricityFee: subItem.electricityFee
}); });
}); });
} }
@ -1854,6 +1901,7 @@ export default {
NationalStandard: Number(fourthItem.national), NationalStandard: Number(fourthItem.national),
VoltageLowerLimits: Number(fourthItem.voltageLimit), VoltageLowerLimits: Number(fourthItem.voltageLimit),
VoltageUpperLimits: Number(fourthItem.voltageMax), VoltageUpperLimits: Number(fourthItem.voltageMax),
electricityFee: subItem.electricityFee
}); });
}); });
} }
@ -1906,6 +1954,7 @@ export default {
NationalStandard: Number(fourthItem.national), NationalStandard: Number(fourthItem.national),
VoltageLowerLimits: Number(fourthItem.voltageLimit), VoltageLowerLimits: Number(fourthItem.voltageLimit),
VoltageUpperLimits: Number(fourthItem.voltageMax), VoltageUpperLimits: Number(fourthItem.voltageMax),
electricityFee: subItem.electricityFee
}); });
}); });
} }
@ -1959,6 +2008,7 @@ export default {
NationalStandard: Number(fourthItem.national), NationalStandard: Number(fourthItem.national),
VoltageLowerLimits: Number(fourthItem.voltageLimit), VoltageLowerLimits: Number(fourthItem.voltageLimit),
VoltageUpperLimits: Number(fourthItem.voltageMax), VoltageUpperLimits: Number(fourthItem.voltageMax),
electricityFee: subItem.electricityFee
}); });
}); });
} }
@ -2745,14 +2795,65 @@ export default {
// }); // });
}, },
// //
handleOpenDetail(obj) { handleOpenDetail(item) {
console.log("objobjobjobjobjobj", obj); let obj = {}
if (item) {
obj = item
this.nowCurrentObj = item;
this.chargeDetailList = item.LXInfoList;
} else {
obj = this.detailObj.servicePart[0]
this.nowCurrentObj = obj; this.nowCurrentObj = obj;
this.chargeDetailList = obj.LXInfoList; this.chargeDetailList = obj.LXInfoList;
}
let pageDirection = {}
let list = []; let list = [];
//
let electricityFeeObj = {}
if (obj.LXInfoList && obj.LXInfoList.length > 0) { if (obj.LXInfoList && obj.LXInfoList.length > 0) {
let directionList = {}
let directionTypeList = []
let electricityFeeStr = ''
obj.LXInfoList.forEach((item) => {
if (item.address) {
if (directionTypeList.indexOf(item.address) === -1) {
directionTypeList.push(item.address)
directionList[item.address] = []
directionList[item.address].push(item)
} else {
if (directionList[item.address] && directionList[item.address].length > 0) {
let oldList = directionList[item.address]
oldList.push(item)
directionList[item.address] = oldList
}
}
}
if (item.electricityFee) {
electricityFeeStr = item.electricityFee
}
});
let directionRes = [];
if (directionList) {
for (let key in directionList) {
directionRes.push({
label: key,
list: directionList[key],
sum: directionList[key].length,
})
}
}
directionRes.unshift({
label: "全部",
list: obj.LXInfoList,
});
list.push({ list.push({
label: "理想", label: "理想",
value: 1, value: 1,
@ -2762,10 +2863,58 @@ export default {
: 0, : 0,
empty: empty:
obj.LXDetail && obj.LXDetail.LXEmpty ? obj.LXDetail.LXEmpty : 0, obj.LXDetail && obj.LXDetail.LXEmpty ? obj.LXDetail.LXEmpty : 0,
directionRes: directionRes
}); });
pageDirection['理想'] = directionRes
if (electricityFeeStr) {
let electricityFee = electricityFeeStr.split(",")
electricityFeeObj['理想'] = electricityFee
}
} }
if (obj.WLInfoList && obj.WLInfoList.length > 0) { if (obj.WLInfoList && obj.WLInfoList.length > 0) {
let directionList = {}
let directionTypeList = []
let electricityFeeStr = ''
obj.WLInfoList.forEach((item) => {
if (item.address) {
if (directionTypeList.indexOf(item.address) === -1) {
directionTypeList.push(item.address)
directionList[item.address] = []
directionList[item.address].push(item)
} else {
if (directionList[item.address] && directionList[item.address].length > 0) {
let oldList = directionList[item.address]
oldList.push(item)
directionList[item.address] = oldList
}
}
}
if (item.electricityFee) {
electricityFeeStr = item.electricityFee
}
});
let directionRes = [];
if (directionList) {
for (let key in directionList) {
directionRes.push({
label: key,
list: directionList[key],
sum: directionList[key].length,
})
}
}
directionRes.unshift({
label: "全部",
list: obj.WLInfoList,
});
list.push({ list.push({
label: "蔚来", label: "蔚来",
value: 2, value: 2,
@ -2775,10 +2924,73 @@ export default {
: 0, : 0,
empty: empty:
obj.WLDetail && obj.WLDetail.WLEmpty ? obj.WLDetail.WLEmpty : 0, obj.WLDetail && obj.WLDetail.WLEmpty ? obj.WLDetail.WLEmpty : 0,
directionRes: directionRes
});
pageDirection['蔚来'] = directionRes
if (electricityFeeStr) {
let electricityFee = electricityFeeStr.split(",")
let newList = []
if (electricityFee && electricityFee.length > 0) {
electricityFee.forEach((item) => {
let [electricityBill, electricityTime] = item.split(";");
let obj = {
electricityBill: electricityBill.indexOf("电费") !== -1 ? electricityBill : '',
electricityTime: electricityTime
}
if (obj.electricityBill && obj.electricityTime) {
newList.push(obj)
}
}); });
} }
electricityFeeObj['蔚来'] = newList
}
}
if (obj.JKInfoList && obj.JKInfoList.length > 0) { if (obj.JKInfoList && obj.JKInfoList.length > 0) {
let directionList = {}
let directionTypeList = []
let electricityFeeStr = ''
obj.JKInfoList.forEach((item) => {
if (item.address) {
if (directionTypeList.indexOf(item.address) === -1) {
directionTypeList.push(item.address)
directionList[item.address] = []
directionList[item.address].push(item)
} else {
if (directionList[item.address] && directionList[item.address].length > 0) {
let oldList = directionList[item.address]
oldList.push(item)
directionList[item.address] = oldList
}
}
}
if (item.electricityFee) {
electricityFeeStr = item.electricityFee
}
});
let directionRes = [];
if (directionList) {
for (let key in directionList) {
directionRes.push({
label: key,
list: directionList[key],
sum: directionList[key].length,
})
}
}
directionRes.unshift({
label: "全部",
list: obj.JKInfoList,
});
list.push({ list.push({
label: "交控", label: "交控",
value: 3, value: 3,
@ -2788,10 +3000,58 @@ export default {
: 0, : 0,
empty: empty:
obj.JKDetail && obj.JKDetail.JKEmpty ? obj.JKDetail.JKEmpty : 0, obj.JKDetail && obj.JKDetail.JKEmpty ? obj.JKDetail.JKEmpty : 0,
directionRes: directionRes
}); });
pageDirection['交控'] = directionRes
if (electricityFeeStr) {
//
let electricityFee = electricityFeeStr.split(",")
electricityFeeObj['交控'] = electricityFee
}
} }
if (obj.GWInfoList && obj.GWInfoList.length > 0) { if (obj.GWInfoList && obj.GWInfoList.length > 0) {
let directionList = {}
let directionTypeList = []
let electricityFeeStr = ''
obj.GWInfoList.forEach((item) => {
if (item.address) {
if (directionTypeList.indexOf(item.address) === -1) {
directionTypeList.push(item.address)
directionList[item.address] = []
directionList[item.address].push(item)
} else {
if (directionList[item.address] && directionList[item.address].length > 0) {
let oldList = directionList[item.address]
oldList.push(item)
directionList[item.address] = oldList
}
}
}
if (item.electricityFee) {
electricityFeeStr = item.electricityFee
}
});
let directionRes = [];
if (directionList) {
for (let key in directionList) {
directionRes.push({
label: key,
list: directionList[key],
sum: directionList[key].length,
})
}
}
directionRes.unshift({
label: "全部",
list: obj.GWInfoList,
});
list.push({ list.push({
label: "国网", label: "国网",
value: 4, value: 4,
@ -2801,7 +3061,14 @@ export default {
: 0, : 0,
empty: empty:
obj.GWDetail && obj.GWDetail.GWEmpty ? obj.GWDetail.GWEmpty : 0, obj.GWDetail && obj.GWDetail.GWEmpty ? obj.GWDetail.GWEmpty : 0,
directionRes: directionRes
}); });
pageDirection['国网'] = directionRes
if (electricityFeeStr) {
let electricityFee = electricityFeeStr.split(",")
electricityFeeObj['国网'] = electricityFee
}
} }
// [ // [
@ -2848,34 +3115,57 @@ export default {
this.chargeDetailList = this.nowCurrentObj.WLInfoList; this.chargeDetailList = this.nowCurrentObj.WLInfoList;
} }
this.popupTab = list; this.popupTab = list;
this.smallTab = list[0].directionRes
this.electricityFeeRes = electricityFeeObj
this.selectElectricityFee = this.electricityFeeRes[list[0].label] || []
this.pageDirection = pageDirection
this.$emit("handleChangeShow", true);
this.$refs.popup.open("bottom"); this.$refs.popup.open("bottom");
this.isShow = true; this.isShow = true;
}, },
// //
handleClosePopup() { handleClosePopup() {
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("handleChangeShow", false);
this.isShow = false; this.isShow = false;
this.nowCurrentObj = {}; this.nowCurrentObj = {};
this.chargeDetailList = []; this.chargeDetailList = [];
this.popupTab = []; this.popupTab = [];
this.selectPopup = 1; this.selectPopup = 1;
this.selectSmallTab = 0
}, },
handleChangeSelectPopup(value) { handleChangeSelectPopup(value) {
this.selectPopup = value; this.selectPopup = value;
if (value === 1) { if (value === 1) {
// //
this.chargeDetailList = this.nowCurrentObj.LXInfoList; // this.chargeDetailList = this.nowCurrentObj.LXInfoList;
this.smallTab = this.pageDirection['理想']
this.selectElectricityFee = this.electricityFeeRes['理想'] || []
} else if (value === 3) { } else if (value === 3) {
// //
this.chargeDetailList = this.nowCurrentObj.JKInfoList; // this.chargeDetailList = this.nowCurrentObj.JKInfoList;
this.smallTab = this.pageDirection['交控']
this.selectElectricityFee = this.electricityFeeRes['交控'] || []
} else if (value === 4) { } else if (value === 4) {
// //
this.chargeDetailList = this.nowCurrentObj.GWInfoList; // this.chargeDetailList = this.nowCurrentObj.GWInfoList;
this.smallTab = this.pageDirection['国网']
this.selectElectricityFee = this.electricityFeeRes['国网'] || []
} else { } else {
// //
this.chargeDetailList = this.nowCurrentObj.WLInfoList; // this.chargeDetailList = this.nowCurrentObj.WLInfoList;
this.smallTab = this.pageDirection['蔚来']
this.selectElectricityFee = this.electricityFeeRes['蔚来'] || []
} }
},
handleChangeSmallTab(value) {
this.selectSmallTab = value
}, },
}, },
}; };
@ -3060,10 +3350,15 @@ export default {
.typeList { .typeList {
width: 100%; width: 100%;
display: flex; display: block;
flex-wrap: nowrap;
overflow-x: auto; overflow-x: auto;
margin-top: 16rpx; margin-top: 16rpx;
box-sizing: border-box;
.typeListInner {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
.typeItem { .typeItem {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -3077,9 +3372,12 @@ export default {
background: #f5f6f7; background: #f5f6f7;
border-radius: 4rpx; border-radius: 4rpx;
margin-right: 12rpx; margin-right: 12rpx;
flex-shrink: 0;
} }
} }
}
// .label { // .label {
// font-family: PingFangSC, PingFang SC; // font-family: PingFangSC, PingFang SC;
// font-weight: 400; // font-weight: 400;
@ -3631,6 +3929,17 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
.rightElectricity {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #ba922f;
line-height: 44rpx;
text-align: left;
font-style: normal;
}
} }
.popupTab { .popupTab {
@ -3646,7 +3955,7 @@ export default {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #716f69; color: #B3B3B3;
line-height: 50rpx; line-height: 50rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -3664,9 +3973,9 @@ export default {
.selectTabItem { .selectTabItem {
// background: #f8f4ea; // background: #f8f4ea;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 600; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #ba922f; color: #000000;
line-height: 40rpx; line-height: 40rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -3677,7 +3986,7 @@ export default {
content: ""; content: "";
width: 2rem; width: 2rem;
height: 4rpx; height: 4rpx;
background: #ba922f; background: #009DFF;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 50%; left: 50%;
@ -3685,6 +3994,71 @@ export default {
} }
} }
.smallTabBox {
width: 100%;
height: 30px;
display: flex;
align-items: center;
margin-top: 30rpx;
.smallTabItem {
font-family: Inter, Inter;
font-weight: 400;
font-size: 26rpx;
color: #1A577D;
text-align: center;
font-style: normal;
text-transform: none;
padding: 12rpx 20rpx;
background-color: #E6F6FF;
border-radius: 6rpx 6rpx 6rpx 6rpx;
margin-right: 20rpx;
// font-family: PingFangSC, PingFang SC;
// font-weight: 400;
// font-size: 28rpx;
// color: #716f69;
// line-height: 50rpx;
// text-align: left;
// font-style: normal;
// // background: #f5f5f5;
// border-radius: 8rpx;
// display: flex;
// align-items: center;
// justify-content: center;
// padding: 8rpx;
// box-sizing: border-box;
// margin-right: 16rpx;
// white-space: nowrap;
}
.selectSmallTabItem {
// background: #f8f4ea;
// font-family: PingFangSC, PingFang SC;
// font-weight: 600;
// font-size: 28rpx;
// color: #ba922f;
// line-height: 40rpx;
// text-align: left;
// font-style: normal;
// position: relative;
color: #ffffff;
background-color: #009DFF;
}
// .selectSmallTabItem::after {
// content: "";
// width: 2rem;
// height: 4rpx;
// background: #ba922f;
// position: absolute;
// bottom: 0;
// left: 50%;
// transform: translateX(-50%);
// }
}
.stationList { .stationList {
width: 100%; width: 100%;
margin-top: 24rpx; margin-top: 24rpx;
@ -3692,6 +4066,51 @@ export default {
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
.selectElectricityFeeListBox {
width: calc(100vw - 64rpx);
overflow-x: auto;
margin-bottom: 24rpx;
/* 添加底部间距 */
.selectElectricityFeeListInner {
white-space: nowrap;
.selectElectricityFeeItem {
display: inline-block;
box-sizing: border-box;
padding: 16rpx 20rpx;
background-color: #F7F7F7;
border-radius: 6rpx;
/* 添加 flex-shrink: 0; 防止子元素收缩 */
flex-shrink: 0;
/* 添加右侧间距 */
margin-right: 16rpx;
/* 确保内部文本不换行 */
white-space: nowrap;
.timeBox {
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 26rpx;
color: #000000;
text-align: left;
font-style: normal;
text-transform: none;
}
.valueBox {
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: bold;
font-size: 30rpx;
color: #FF6200;
text-align: left;
font-style: normal;
text-transform: none;
}
}
}
}
.stationItem { .stationItem {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
@ -3844,4 +4263,14 @@ export default {
/* 淡入淡出动画(可选) */ /* 淡入淡出动画(可选) */
} }
} }
.electricityPopup {
width: 80vw;
height: 600rpx;
box-sizing: border-box;
padding: 32rpx;
border-radius: 32rpx;
background: #fff;
}
</style> </style>

View File

@ -2,8 +2,8 @@
"name" : "驿佳", "name" : "驿佳",
"appid" : "__UNI__F870657", "appid" : "__UNI__F870657",
"description" : "", "description" : "",
"versionName" : "1.0.20", "versionName" : "1.0.23",
"versionCode" : 1020, "versionCode" : 1023,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -124,6 +124,8 @@
</view> </view>
</view> </view>
</view> </view>
<view style="color: red;margin-top: 16rpx;font-size: 24rpx;text-align: center;">新增失物/招领前请先联系服务区管理员</view>
</view> </view>
<!-- v-if="!isDetail" --> <!-- v-if="!isDetail" -->
<view class="btnBox"> <view class="btnBox">
@ -504,7 +506,7 @@ export default {
PHONE_NUMBER: this.phone, PHONE_NUMBER: this.phone,
PROVINCE_CODE: "340000", PROVINCE_CODE: "340000",
SUGGESTION_CREATEDATE: this.thisTime, SUGGESTION_CREATEDATE: this.thisTime,
SUGGESTION_STATE: 1, SUGGESTION_STATE: 2,
SUGGESTION_TYPE: 4000, SUGGESTION_TYPE: 4000,
SUGGESTION_NAME: this.user.MEMBERSHIP_NAME, SUGGESTION_NAME: this.user.MEMBERSHIP_NAME,
SERVERPART_NAME: this.nowServerpart.SERVERPART_NAME, SERVERPART_NAME: this.nowServerpart.SERVERPART_NAME,

View File

@ -203,11 +203,10 @@
</view> </view>
<view class="btnList"> <view class="btnList">
<button class="btns noAgree" @click="handleRefuse">拒绝</button> <view class="btns noAgree" @click="handleAgreePrivacyAuthorization">拒绝</view>
<button class="btns agree" id="agree-btn3" open-type="agreePrivacyAuthorization" <view class="btns agree" @click="handleAgreePrivacyAuthorization">
@click="handleAgreePrivacyAuthorization">
同意 同意
</button> </view>
</view> </view>
</view> </view>
</view> </view>
@ -275,6 +274,9 @@ import ChargeBox from "../../components/chargeBox.vue";
import { import {
handleGetUserPointInfo, handleGetUserPointInfo,
handleGetNearThreeService, handleGetNearThreeService,
handleGetPosition,
handleGetAndroidPosition,
handleGetIOSPosition,
} from "../../utils/publicMethods"; } from "../../utils/publicMethods";
export default { export default {
@ -326,6 +328,7 @@ export default {
mallList: [], mallList: [],
nearCouponList: [],// nearCouponList: [],//
selectLocation: {},// selectLocation: {},//
isFirst: true
}; };
}, },
computed: { computed: {
@ -337,6 +340,7 @@ export default {
}), }),
}, },
async onLoad() { async onLoad() {
// await getApp().globalData.initReady; // await getApp().globalData.initReady;
// //
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
@ -577,31 +581,41 @@ export default {
const selectLocation = uni.getStorageSync("selectLocation"); const selectLocation = uni.getStorageSync("selectLocation");
let _this = this let _this = this
if (_this.isFirst) {
uni.setStorageSync("selectLocation", null);
//
let res = {}
if (_this.loginType === 'min') {
res = await handleGetPosition()
} else if (_this.loginType === 'android') {
res = await handleGetAndroidPosition()
} else {
res = await handleGetIOSPosition()
}
_this.seatInfo = res
// _this.seatInfo = {
// latitude: 31.855616,
// longitude: 117.449167
// }
uni.setStorageSync("seatInfo", res)
if (this.loginType === 'min') {
this.handleGetUserNearInfo()
} else {
this.handleGetUserNearInfo()
}
} else {
if (selectLocation) { if (selectLocation) {
this.selectLocation = selectLocation this.selectLocation = selectLocation
} else { } else {
if (this.loginType === 'min') { if (this.loginType === 'min') {
// wx.chooseLocation({
// success: (res) => {
// console.log('res', res);
// _this.selectLocation = res
// uni.setStorageSync("selectLocation", res);
// },
// });
this.handleGetUserNearInfo() this.handleGetUserNearInfo()
} else { } else {
// uni.chooseLocation({
// success: function (res) {
// console.log('res', res);
// _this.selectLocation = res
// uni.setStorageSync("selectLocation", res);
// }
// });
this.handleGetUserNearInfo() this.handleGetUserNearInfo()
} }
} }
}
this.$forceUpdate(); this.$forceUpdate();
}, },
// //
@ -635,6 +649,44 @@ export default {
} }
_this.selectLocation = res _this.selectLocation = res
uni.setStorageSync("selectLocation", res); uni.setStorageSync("selectLocation", res);
//
let req = {
Province_Code: "340000",
longitude: _this.seatInfo.longitude,
latitude: _this.seatInfo.latitude,
ShowService: true,
};
const newRes = await _this.$api.$javaGet2('/third-party/getServerPartList', req)
let data = newRes.Result_Data.List;
//
let nearThreeList = [];
//
let allServiceList = []
if (data && data.length > 0) {
uni.setStorageSync("allServiceList", []); //
data.forEach((item, index) => {
if (index <= 2) {
nearThreeList.push(item.SERVERPART_NAME)
}
allServiceList.push({
...item,
showName: item.SERVERPART_NAME,
ProvinceCode: "340000",
ServerPart_Id: item.SERVERPART_ID,
ServerPart_Name: item.SERVERPART_NAME,
})
});
}
uni.setStorageSync("currentService", data[0]); //
uni.setStorageSync("nearService", data[0]); //
uni.setStorageSync("nearThreeList", nearThreeList); //
uni.setStorageSync("allServiceList", allServiceList); //
_this.chaegeBoxList = []
setTimeout(() => {
_this.chaegeBoxList = [nearThreeList[0]]
}, 10);
}, },
// //
async handleGetNearCouponList() { async handleGetNearCouponList() {
@ -1910,7 +1962,7 @@ export default {
.btns { .btns {
display: inline-block; display: inline-block;
padding: 0 90rpx; padding: 20rpx 90rpx;
border-radius: 15rpx; border-radius: 15rpx;
} }

View File

@ -177,6 +177,7 @@ export default {
// //
_this.handleSetInter(); _this.handleSetInter();
_this.pendCode = true;
const req = { const req = {
action_type: "GetSMSIdentityCode", action_type: "GetSMSIdentityCode",

View File

@ -6,38 +6,19 @@
<div class="messageBox"> <div class="messageBox">
<div class="phoneBox"> <div class="phoneBox">
<image class="phoneIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/detailPhone.png" /> <image class="phoneIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/detailPhone.png" />
<input <input class="phoneText" placeholder="请输入手机号" style="font-size: 32rpx" v-model="phone"
class="phoneText" @input="validatePhone" />
placeholder="请输入手机号"
style="font-size: 32rpx"
v-model="phone"
@input="validatePhone"
/>
</div> </div>
<div class="phoneError">{{ errorMessage }}</div> <div class="phoneError">{{ errorMessage }}</div>
<div class="codeBox"> <div class="codeBox">
<image class="codeIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/passwordICon.svg" /> <image class="codeIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/passwordICon.svg" />
<input <input v-model="password" class="passwordText" placeholder="请输入密码" style="font-size: 32rpx" />
v-model="password"
class="passwordText"
placeholder="请输入密码"
style="font-size: 32rpx"
/>
</div> </div>
<div class="codeBox"> <div class="codeBox">
<image class="codeIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/codeIcon.svg" /> <image class="codeIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/codeIcon.svg" />
<input <input v-model="code" class="codeText" placeholder="请输入验证码" style="font-size: 32rpx" />
v-model="code" <div :style="{ color: isRight ? '#130F05' : '#b8b7b4' }" class="haveCode" @click="handleGetCode"
class="codeText" v-if="!pendCode">
placeholder="请输入验证码"
style="font-size: 32rpx"
/>
<div
:style="{ color: isRight ? '#130F05' : '#b8b7b4' }"
class="haveCode"
@click="handleGetCode"
v-if="!pendCode"
>
获取验证码 获取验证码
</div> </div>
<div v-if="pendCode">{{ second ? second + "s" : "" }}</div> <div v-if="pendCode">{{ second ? second + "s" : "" }}</div>
@ -45,30 +26,20 @@
</div> </div>
<div class="agreementBox"> <div class="agreementBox">
<radio <radio class="radioBox" :value="isAgree" :checked="isAgree" color="#BA922F" :size="16"
class="radioBox" @click="handleChangeAgree" />
:value="isAgree"
:checked="isAgree"
color="#BA922F"
:size="16"
@click="handleChangeAgree"
/>
<span class="normal">我已阅读并同意</span> <span class="normal">我已阅读并同意</span>
<span class="light">服务协议</span> <span class="light">服务协议</span>
<span class="normal"></span> <span class="normal"></span>
<span class="light">隐私协议</span> <span class="light">隐私协议</span>
</div> </div>
<div <div class="loginBox" :style="{
class="loginBox"
:style="{
background: background:
isAllRight && isClick isAllRight && isClick
? 'rgba(186, 146, 47, 1)' ? 'rgba(186, 146, 47, 1)'
: 'rgba(186, 146, 47, 0.5)', : 'rgba(186, 146, 47, 0.5)',
}" }" @click="handleRegister">
@click="handleRegister"
>
注册 注册
</div> </div>
@ -76,13 +47,7 @@
<div> <div>
<div>手机号码</div> <div>手机号码</div>
<div class="inputBG"> <div class="inputBG">
<input <input type="number" maxlength="11" placeholder="请输入手机号码" v-model="phone" @input="validatePhone" />
type="number"
maxlength="11"
placeholder="请输入手机号码"
v-model="phone"
@input="validatePhone"
/>
</div> </div>
<div> <div>
{{ errorMessage }} {{ errorMessage }}
@ -91,15 +56,8 @@
<div> <div>
<input placeholder="请输入密码" v-model="password" /> <input placeholder="请输入密码" v-model="password" />
<input <input v-if="loginType === 2" type="number" placeholder="请输入验证码" v-model="code" />
v-if="loginType === 2" <span v-if="loginType === 2" @click="handleGetCode">点击获取验证码</span>
type="number"
placeholder="请输入验证码"
v-model="code"
/>
<span v-if="loginType === 2" @click="handleGetCode"
>点击获取验证码</span
>
<!-- <span style="margin-left: 8px" @click="handleSelectLoginType">{{ <!-- <span style="margin-left: 8px" @click="handleSelectLoginType">{{
loginType === 1 ? "验证码注册" : "密码注册" loginType === 1 ? "验证码注册" : "密码注册"
@ -131,6 +89,7 @@ export default {
second: 60, // second: 60, //
isAgree: false, // isAgree: false, //
isClick: true, // isClick: true, //
timer: null,//
}; };
}, },
onload() { onload() {
@ -180,23 +139,30 @@ export default {
} }
}, },
// //
handleGetCode() { async handleGetCode() {
let _this = this; let _this = this;
console.log("this.phone", this.phone);
console.log("this.isRight", this.isRight);
if (this.isRight && this.phone) { if (this.isRight && this.phone) {
this.pendCode = true; //
this.handleSetInter(); _this.handleSetInter();
this.$api _this.pendCode = true;
.getCoop({ const req = {
action_type: "GetSMSIdentityCode", action_type: "GetSMSIdentityCode",
action_data: this.phone, action_data: _this.phone,
}) time: Date.now()
.then(function (res) { }
console.log("res", res); const res = await this.$api.$getLogin(req)
let obj = res.ResultObject[0]; let obj = res.ResultObject[0];
if (obj.ResultCode === '100') {
_this.pendCode = true;
_this.currentCode = obj.FirstParameter; _this.currentCode = obj.FirstParameter;
}); } else {
_this.pendCode = false;
clearInterval(this.timer);
uni.showToast({
title: obj.ResultDesc,
icon: 'none'
})
}
} else { } else {
uni.showToast({ uni.showToast({
title: "请检查输入的手机号", title: "请检查输入的手机号",
@ -207,16 +173,21 @@ export default {
}, },
// //
handleSetInter() { handleSetInter() {
let timer;
let _this = this; let _this = this;
timer = setInterval(() => { if (this.timer) {
if (_this.second === 1) { clearInterval(this.timer);
this.pendCode = false; }
setTimeout(timer);
_this.second = 60; _this.second = 60;
_this.timer = setInterval(() => {
if (_this.second === 1) {
_this.pendCode = false;
// setTimeout(timer);
_this.second = 60;
clearInterval(this.timer);
} else { } else {
_this.second = _this.second - 1; _this.second = _this.second - 1;
} }
_this.$forceUpdate();
}, 1000); }, 1000);
}, },
// //
@ -295,11 +266,13 @@ export default {
.main { .main {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
.content { .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx 48rpx; padding: 16rpx 48rpx;
.pageTitle { .pageTitle {
width: 100%; width: 100%;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -310,23 +283,28 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
.messageBox { .messageBox {
margin-top: 24rpx; margin-top: 24rpx;
.phoneBox { .phoneBox {
padding: 32rpx 0; padding: 32rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #f5f6f7; border-bottom: 1px solid #f5f6f7;
.phoneIcon { .phoneIcon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.phoneText { .phoneText {
width: calc(100% - 48rpx); width: calc(100% - 48rpx);
color: #130f05; color: #130f05;
} }
} }
.phoneError { .phoneError {
color: red; color: red;
font-size: 24rpx; font-size: 24rpx;
@ -337,17 +315,21 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #f5f6f7; border-bottom: 1px solid #f5f6f7;
.codeIcon { .codeIcon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.codeText { .codeText {
width: calc(100% - 200rpx); width: calc(100% - 200rpx);
} }
.passwordText { .passwordText {
width: calc(100% - 48rpx); width: calc(100% - 48rpx);
} }
.haveCode { .haveCode {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
@ -364,9 +346,11 @@ export default {
margin-top: 40rpx; margin-top: 40rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
width: 100%; width: 100%;
.radioBox { .radioBox {
transform: scale(0.7); transform: scale(0.7);
} }
.normal { .normal {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
@ -376,6 +360,7 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
.light { .light {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;

View File

@ -19,7 +19,7 @@
</view> </view>
</view> </view>
<view class="statusBox"> <view class="statusBox" @click="handleShowChargeDetail">
<view> <view>
<!-- 国网 --> <!-- 国网 -->
<view class="statusItem"> <view class="statusItem">
@ -122,7 +122,7 @@
</view> </view>
<view class="serviceDetailBox" v-if="showChargeBox"> <view class="serviceDetailBox" v-if="showChargeBox">
<charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'" <charge-box ref="chargeBoxRef" :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
@allChargeData="handleGetChargeData" /> @allChargeData="handleGetChargeData" />
</view> </view>
<!-- @allLXDataList="handleLXAddMarker" <!-- @allLXDataList="handleLXAddMarker"
@ -301,6 +301,10 @@ export default {
this.$utils.addUserBehaviorNew(); this.$utils.addUserBehaviorNew();
}, },
methods: { methods: {
//
handleShowChargeDetail() {
this.$refs.chargeBoxRef.handleOpenDetail(null);
},
// //
handleGoBack() { handleGoBack() {
this.scrollView = "navItem"; this.scrollView = "navItem";

View File

@ -16,11 +16,12 @@
</view> </view>
</view> </view>
<view style="width: 100vw; height: calc(100vh - 55px - 400rpx);position: relative;"> <view style="width: 100vw; height: calc(100vh - 55px - 400rpx);position: relative;" v-show="showMap">
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true" <map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true"
:markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map> :markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map>
<cover-view class="statusBox" :style="{ left: showListPage ? '-2000px' : '' }"> <cover-view class="statusBox" :style="{ left: showListPage ? '-2000px' : '' }" @tap="handleShowChargeDetail">
<cover-view> <cover-view>
<!-- 国网 --> <!-- 国网 -->
<cover-view class="statusItem" style="margin: 0 16rpx;"> <cover-view class="statusItem" style="margin: 0 16rpx;">
@ -140,11 +141,11 @@
</cover-view> --> </cover-view> -->
</view> </view>
<view style="display: flex;align-items: flex-start;justify-content: space-between;"> <view style="width: 100%; display: flex;align-items: flex-start;justify-content: space-between;">
<view style="width: calc(100%- 120rpx)"> <view style="width: calc(100vw- 120rpx)">
<view class="serviceDetailBox" v-if="showChargeBox"> <view class="serviceDetailBox" v-if="showChargeBox">
<charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'" <charge-box ref="chargeBoxRef" :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
@allChargeData="handleGetChargeData" /> @allChargeData="handleGetChargeData" @handleChangeShow="handleChangeShow" />
</view> </view>
</view> </view>
<view style="width: 120rpx"> <view style="width: 120rpx">
@ -227,7 +228,8 @@ export default {
lastMoveTime: 0, // lastMoveTime: 0, //
pageIndex: 1, pageIndex: 1,
isHaveMore: false, isHaveMore: false,
isShowAllData: true, // isShowAllData: true, // ,
showMap: true, //
}; };
}, },
onLoad() { onLoad() {
@ -271,6 +273,13 @@ export default {
}), }),
}, },
methods: { methods: {
handleChangeShow(e) {
this.showMap = !e
this.$forceUpdate();
},
handleShowChargeDetail() {
this.$refs.chargeBoxRef.handleOpenDetail(null);
},
// //
handleShowLocal() { handleShowLocal() {
let seatInfo = uni.getStorageSync("seatInfo"); let seatInfo = uni.getStorageSync("seatInfo");

View File

@ -1,23 +1,18 @@
<template> <template>
<view class="main"> <view class="main">
<view :class="showListPage ? 'mapBox moveLeft' : 'mapBox'" v-if="!showListPage">
<movable-area style="width: 100vw; height: calc(100vh - 460rpx);">
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true"
:markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map>
<view class="topBox"> <view class="topBox">
<view class="topRight"> <view class="topRight">
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" /> <image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" />
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText" <input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText"
@confirm="handleConfirm" /> @confirm="handleConfirm" />
<!-- <span class="searchText">请输入服务区</span> -->
</view> </view>
</view>
<view :class="showListPage ? 'mapBox moveLeft' : 'mapBox'">
<movable-area style="width: 100vw; height: calc(100vh - 560rpx);">
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true"
:markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map>
<!-- <view class="listBox" @click="handleChangePageType">
<image class="listIcon" src="/static/home/listIcon.svg" />
<text class="text">列表</text>
</view> -->
</view>
<view class="serviceDetailBox" v-if="showChargeBox"> <view class="serviceDetailBox" v-if="showChargeBox">
<!-- <charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'" <!-- <charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
@ -751,23 +746,6 @@ export default {
overflow: hidden; overflow: hidden;
background-color: #F5F5F5; background-color: #F5F5F5;
.mapBox {
width: 100vw;
height: 100vh;
position: absolute;
top: 0;
left: 0;
transition: transform 0.5s ease;
.map {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.topBox { .topBox {
width: 100%; width: 100%;
position: absolute; position: absolute;
@ -838,6 +816,26 @@ export default {
} }
} }
.mapBox {
width: 100vw;
height: 100vh;
position: absolute;
top: 104rpx;
left: 0;
transition: transform 0.5s ease;
.map {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.statusBox { .statusBox {
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx; padding: 16rpx;

View File

@ -7,7 +7,7 @@
<div class="evaluationRight"> <div class="evaluationRight">
<div class="markTitle">商家评分</div> <div class="markTitle">商家评分</div>
<!-- --> <!-- -->
<UniRate :value="storeMsg.MERCHANTS_SCORE" size="14" activeColor="#FFD401" :allowHalf="true" color="#D9D9D9" <uni-rate :value="storeMsg.MERCHANTS_SCORE" size="14" activeColor="#FFD401" :allowHalf="true" color="#D9D9D9"
void-color="#eee" void-icon="star" readonly /> void-color="#eee" void-icon="star" readonly />
</div> </div>
@ -39,7 +39,7 @@
</div> </div>
<div class="itemRate"> <div class="itemRate">
<UniRate :value="item.COMMENT_SCORE" size="12" allowHalf color="#ececec" void-color="#eee" void-icon="star" <uni-rate :value="item.COMMENT_SCORE" size="12" allowHalf color="#ececec" void-color="#eee" void-icon="star"
readonly /> readonly />
<span class="rateText">{{ item.rateText }}</span> <span class="rateText">{{ item.rateText }}</span>
</div> </div>
@ -63,7 +63,7 @@
<div> <div>
<div class="rate-text">商家评分</div> <div class="rate-text">商家评分</div>
<UniRate v-model="storeMsg.MERCHANTS_SCORE" size="12" allowHalf color="#ececec" void-color="#eee" <uni-rate v-model="storeMsg.MERCHANTS_SCORE" size="12" allowHalf color="#ececec" void-color="#eee"
void-icon="star" readonly /> void-icon="star" readonly />
</div> </div>
</div> </div>
@ -129,7 +129,6 @@
</template> </template>
<script> <script>
import uniRate from "@/uni_modules/uni-rate/components/uni-rate/uni-rate.vue";
import { mapGetters, mapMutations } from "vuex"; import { mapGetters, mapMutations } from "vuex";
import noData from "../../../../components/noData.vue"; import noData from "../../../../components/noData.vue";
export default { export default {
@ -153,7 +152,6 @@ export default {
}), }),
}, },
components: { components: {
uniRate,
noData, noData,
}, },
methods: { methods: {

View File

@ -250,14 +250,16 @@
</view> </view>
</div> </div>
<scroll-view :scroll-y="true" class="nowContent nowContent2" v-if="activeTabs === 2"> <div v-if="activeTabs === 2">
<scroll-view :scroll-y="true" class="nowContent nowContent2">
<MerchantEvaluation ref="merchantEvaluation" :storeMsg="merchatsMsg" :merchantsId="merchatsMsg.MERCHANTS_ID" /> <MerchantEvaluation ref="merchantEvaluation" :storeMsg="merchatsMsg" :merchantsId="merchatsMsg.MERCHANTS_ID" />
</scroll-view>
<div class="rate-box" @click="goEvaluate"> <div class="rate-box" @click="goEvaluate">
<div class="rate-gray">评价一下这家店...</div> <div class="rate-gray">评价一下这家店...</div>
<div class="rate-ico"><i></i>评论</div> <div class="rate-ico"><i></i>评论</div>
</div> </div>
</scroll-view> </div>
<div class="nowContent" v-if="activeTabs === 3" style="background-color: #fff;"> <div class="nowContent" v-if="activeTabs === 3" style="background-color: #fff;">
<div> <div>
@ -553,6 +555,8 @@ export default {
buyType: "", // 1 buyType: "", // 1
isLoading: false, isLoading: false,
listDetail: {}, // listDetail: {}, //
onLoadMid: "",
onLoadType: ""
}; };
}, },
computed: { computed: {
@ -1043,7 +1047,6 @@ export default {
} }
}, },
async getShop(id, type) { async getShop(id, type) {
console.log("2");
let _this = this; let _this = this;
let res = await this.$api.getCoop({ let res = await this.$api.getCoop({
action_type: "GetMerchantsDetails", action_type: "GetMerchantsDetails",
@ -1053,7 +1056,6 @@ export default {
// }); // });
let _data = res.Data; let _data = res.Data;
console.log("_datagetShop", _data);
_this.merchatsMsg = _data; _this.merchatsMsg = _data;
_this.getCouponList(_data.MERCHANTS_ID); // _this.getCouponList(_data.MERCHANTS_ID); //
_this.getFoodImages(_data.MERCHANTS_ID); // _this.getFoodImages(_data.MERCHANTS_ID); //
@ -1070,6 +1072,9 @@ export default {
.$get("/WeChat/GetCouponList", { sellerId: id }) .$get("/WeChat/GetCouponList", { sellerId: id })
.then(function (data) { .then(function (data) {
_this.couponList = data.Result_Data.List || []; _this.couponList = data.Result_Data.List || [];
console.log('sellerIdsellerIdsellerIdsellerIdsellerId', { sellerId: id });
console.log('_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList', _this.couponList);
let tabList = []; let tabList = [];
let isFood = false; let isFood = false;
@ -1129,17 +1134,17 @@ export default {
} }
if (options.stroreDetail) { if (options.stroreDetail) {
this.listDetail = JSON.parse(options.stroreDetail); this.listDetail = JSON.parse(options.stroreDetail);
console.log("this.listDetail", this.listDetail);
} }
this.stroreId = options.id; this.stroreId = options.id;
await this.getNewGood(options.id, options.province); await this.getNewGood(options.id, options.province);
// this.merchatsMsg.MERCHANTS_ID = options.mid // this.merchatsMsg.MERCHANTS_ID = options.mid
this.onLoadMid = options.mid;
this.onLoadType = options.type;
await this.getShop(options.mid, options.type || 0); // await this.getShop(options.mid, options.type || 0); //
this.tableNum = options.tableNum || 0; // tableNum 0 this.tableNum = options.tableNum || 0; // tableNum 0
this.$store.commit("orderTable", options.tableNum || 0); this.$store.commit("orderTable", options.tableNum || 0);
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
console.log('systemInfosystemInfosystemInfosystemInfo', systemInfo);
let goodsHeight = systemInfo.windowHeight + systemInfo.statusBarHeight - 96; // - 44 let goodsHeight = systemInfo.windowHeight + systemInfo.statusBarHeight - 96; // - 44
@ -1148,7 +1153,6 @@ export default {
} else { } else {
this.goodsH = goodsHeight; this.goodsH = goodsHeight;
} }
console.log('this.goodsH this.goodsH this.goodsH this.goodsH ', this.goodsH);
this.$utils.addUserBehaviorNew(); this.$utils.addUserBehaviorNew();
}, },
@ -1181,9 +1185,10 @@ export default {
} }
if (this.activeTabs === 2) { if (this.activeTabs === 2) {
setTimeout(() => { this.getShop(this.onLoadMid, this.onLoadType || 0)
this.$refs.merchantEvaluation.loading(); // setTimeout(() => {
}); // this.$refs.merchantEvaluation.loading();
// });
} }
this.$forceUpdate(); this.$forceUpdate();
}, },

View File

@ -5,7 +5,7 @@
paddingTop: `${loginType === 'min' ? menu.bottom : menu.top + 14}px`, paddingTop: `${loginType === 'min' ? menu.bottom : menu.top + 14}px`,
}"> }">
<view class="userInfoLeft"> <view class="userInfoLeft">
<view class="userFile"> <view class="userFile" v-if="loginType === 'min'">
<button class="avatarBtn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> <button class="avatarBtn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="headerImg" :src="WXProfile || <image class="headerImg" :src="WXProfile ||
(user && user.MEMBERSHIP_HEADIMAGEURL (user && user.MEMBERSHIP_HEADIMAGEURL
@ -14,6 +14,15 @@
" /> " />
</button> </button>
</view> </view>
<view class="userFile" style="background-color: #F2F2F2;" v-if="loginType !== 'min' && showAvatar"
@click="handleChooseAvatarApp">
<image class="headerImg" :src="displayedAvatarUrl ||
(user && user.MEMBERSHIP_HEADIMAGEURL
? user.MEMBERSHIP_HEADIMAGEURL
: '')
" />
</view>
<view class="userInfoBox" v-if="user && user.MEMBERSHIP_ID"> <view class="userInfoBox" v-if="user && user.MEMBERSHIP_ID">
<view class="userTop"> <view class="userTop">
<span class="userName">{{ <span class="userName">{{
@ -408,6 +417,8 @@ export default {
// }, // },
], ],
toDayHaveSign: false, // toDayHaveSign: false, //
displayedAvatarUrl: "",
showAvatar: true,//
}; };
}, },
onUnload() { onUnload() {
@ -531,6 +542,104 @@ export default {
}; };
}, },
methods: { methods: {
// APP
async handleChooseAvatarApp() {
//
if (!this.user || !this.user.MEMBERSHIP_ID) {
let _this = this;
uni.showModal({
title: "温馨提示",
content: "请您授权登录后再操作。",
success(res) {
if (res.confirm) {
if (_this.loginType === "min") {
uni.navigateTo({ url: "/pages/register/index" });
} else {
uni.navigateTo({ url: "/pages/login/index" });
}
}
},
});
return;
}
uni.chooseImage({
count: 1, //
sizeType: ['compressed'], //
sourceType: ['album', 'camera'], //
success: (res) => {
console.log("APP chooseImage success:", res);
const tempFilePath = res.tempFilePaths[0]; //
if (tempFilePath) {
//
this.uploadAvatarAndSave(tempFilePath);
} else {
uni.showToast({ title: '未选择图片', icon: 'none' });
}
},
fail: (err) => {
console.error("APP chooseImage failed:", err);
//
if (err.errMsg && err.errMsg.includes('cancel')) {
//
} else {
uni.showToast({ title: '选择图片失败', icon: 'none' });
}
}
});
},
// ()
async uploadAvatarAndSave(filePath) {
console.log('filePathfilePathfilePath', filePath);
let _this = this;
uni.showLoading({ title: '上传中...' }); //
uni.uploadFile({
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // URL
filePath: filePath, // 使
name: "file", //
formData: {
Tabletype: "1005", //
},
success: async (uploadRes) => {
uni.hideLoading(); //
let data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
let url = data.Result_Data.ImageUrl;
console.log('urlurlurlurl', url);
if (url) {
//
let req = {
membershipId: this.user.MEMBERSHIP_ID, // user ID
headImgUrl: url,
};
const userInfoData = await _this.$api.$get(
"/WeChat/UpdateMemberInfo", // URL
req
);
if (userInfoData.Result_Code === 100) {
uni.showToast({ title: '头像更新成功', icon: 'success' });
//
_this.showAvatar = false
_this.handleGetUserInfo();
} else {
uni.showToast({ title: userInfoData.Result_Desc || '更新头像失败', icon: 'none' });
//
_this.handleGetUserInfo();
}
} else {
uni.showToast({ title: data.Result_Desc || '上传图片失败', icon: 'none' });
}
},
fail: (uploadErr) => {
uni.hideLoading(); //
uni.showToast({ title: '上传图片失败', icon: 'none' });
}
});
},
// //
handleGoLogin() { handleGoLogin() {
if (this.loginType === "min") { if (this.loginType === "min") {
@ -864,6 +973,15 @@ export default {
_this.WXProfile = _data.Data.MEMBERSHIP_HEADIMAGEURL; _this.WXProfile = _data.Data.MEMBERSHIP_HEADIMAGEURL;
// _this.setUser(user); // _this.setUser(user);
_this.$store.commit("setUser", _this.user); _this.$store.commit("setUser", _this.user);
if (_data.Data.MEMBERSHIP_HEADIMAGEURL) {
_this.displayedAvatarUrl = _data.Data.MEMBERSHIP_HEADIMAGEURL + '?t=' + Date.now();
} else {
_this.displayedAvatarUrl = ''; // URL
}
console.log('_this.displayedAvatarUrl_this.displayedAvatarUrl_this.displayedAvatarUrl', _this.displayedAvatarUrl);
_this.$forceUpdate()
_this.showAvatar = true
} else { } else {
// _this.setUser({}); // _this.setUser({});
_this.$store.commit("setUser", user); _this.$store.commit("setUser", user);
@ -1097,6 +1215,12 @@ export default {
border-radius: 50%; border-radius: 50%;
} }
} }
.headerImg {
width: 100%;
height: 100%;
border-radius: 50%;
}
} }
.userInfoBox { .userInfoBox {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1119,8 +1119,8 @@ function populateParameters(result) {
var parameters = { var parameters = {
appId: "__UNI__F870657", appId: "__UNI__F870657",
appName: "驿佳", appName: "驿佳",
appVersion: "1.0.20", appVersion: "1.0.23",
appVersionCode: "1020", appVersionCode: "1023",
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
uniCompileVersion: "4.45", uniCompileVersion: "4.45",
uniCompilerVersion: "4.45", uniCompilerVersion: "4.45",
@ -1220,8 +1220,8 @@ var getAppBaseInfo = {
result = sortObject(Object.assign(result, { result = sortObject(Object.assign(result, {
appId: "__UNI__F870657", appId: "__UNI__F870657",
appName: "驿佳", appName: "驿佳",
appVersion: "1.0.20", appVersion: "1.0.23",
appVersionCode: "1020", appVersionCode: "1023",
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
hostVersion: version, hostVersion: version,
hostLanguage: hostLanguage, hostLanguage: hostLanguage,
@ -25704,6 +25704,7 @@ exports.handleGetAndroidPosition = handleGetAndroidPosition;
exports.handleGetIOSPosition = handleGetIOSPosition; exports.handleGetIOSPosition = handleGetIOSPosition;
exports.handleGetNearService = handleGetNearService; exports.handleGetNearService = handleGetNearService;
exports.handleGetNearThreeService = handleGetNearThreeService; exports.handleGetNearThreeService = handleGetNearThreeService;
exports.handleGetPosition = handleGetPosition;
exports.handleGetUserPointInfo = handleGetUserPointInfo; exports.handleGetUserPointInfo = handleGetUserPointInfo;
exports.handleHavePointInApp = handleHavePointInApp; exports.handleHavePointInApp = handleHavePointInApp;
exports.handleHavePointInMin = handleHavePointInMin; exports.handleHavePointInMin = handleHavePointInMin;

View File

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

View File

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

View File

@ -333,19 +333,20 @@ var _default = {
case 0: case 0:
_this = _this2; _this = _this2;
if (!(_this2.isRight && _this2.phone)) { if (!(_this2.isRight && _this2.phone)) {
_context.next = 11; _context.next = 12;
break; break;
} }
// 计时器 // 计时器
_this.handleSetInter(); _this.handleSetInter();
_this.pendCode = true;
req = { req = {
action_type: "GetSMSIdentityCode", action_type: "GetSMSIdentityCode",
action_data: _this.phone, action_data: _this.phone,
time: Date.now() time: Date.now()
}; };
_context.next = 6; _context.next = 7;
return _this2.$api.$getLogin(req); return _this2.$api.$getLogin(req);
case 6: case 7:
res = _context.sent; res = _context.sent;
obj = res.ResultObject[0]; obj = res.ResultObject[0];
if (obj.ResultCode === '100') { if (obj.ResultCode === '100') {
@ -359,15 +360,15 @@ var _default = {
icon: 'none' icon: 'none'
}); });
} }
_context.next = 12; _context.next = 13;
break; break;
case 11: case 12:
uni.showToast({ uni.showToast({
title: "请检查输入的手机号", title: "请检查输入的手机号",
duration: 2000, duration: 2000,
icon: "none" icon: "none"
}); });
case 12: case 13:
case "end": case "end":
return _context.stop(); return _context.stop();
} }

View File

@ -137,52 +137,13 @@ __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 _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
// var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// //
// //
// //
@ -282,7 +243,9 @@ var _default = {
// 剩余秒数 // 剩余秒数
isAgree: false, isAgree: false,
//协议是否同意 //协议是否同意
isClick: true // 判断当前是否变点击了 isClick: true,
// 判断当前是否变点击了
timer: null // 定时器
}; };
}, },
onload: function onload() { onload: function onload() {
@ -333,41 +296,76 @@ var _default = {
}, },
// 得到验证码 // 得到验证码
handleGetCode: function handleGetCode() { handleGetCode: function handleGetCode() {
var _this = this; var _this2 = this;
console.log("this.phone", this.phone); return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
console.log("this.isRight", this.isRight); var _this, req, res, obj;
if (this.isRight && this.phone) { return _regenerator.default.wrap(function _callee$(_context) {
this.pendCode = true; while (1) {
this.handleSetInter(); switch (_context.prev = _context.next) {
this.$api.getCoop({ case 0:
_this = _this2;
if (!(_this2.isRight && _this2.phone)) {
_context.next = 12;
break;
}
// 计时器
_this.handleSetInter();
_this.pendCode = true;
req = {
action_type: "GetSMSIdentityCode", action_type: "GetSMSIdentityCode",
action_data: this.phone action_data: _this.phone,
}).then(function (res) { time: Date.now()
console.log("res", res); };
var obj = res.ResultObject[0]; _context.next = 7;
return _this2.$api.$getLogin(req);
case 7:
res = _context.sent;
obj = res.ResultObject[0];
if (obj.ResultCode === '100') {
_this.pendCode = true;
_this.currentCode = obj.FirstParameter; _this.currentCode = obj.FirstParameter;
});
} else { } else {
_this.pendCode = false;
clearInterval(_this2.timer);
uni.showToast({
title: obj.ResultDesc,
icon: 'none'
});
}
_context.next = 13;
break;
case 12:
uni.showToast({ uni.showToast({
title: "请检查输入的手机号", title: "请检查输入的手机号",
duration: 2000, duration: 2000,
icon: "none" icon: "none"
}); });
case 13:
case "end":
return _context.stop();
} }
}
}, _callee);
}))();
}, },
// 计时器 // 计时器
handleSetInter: function handleSetInter() { handleSetInter: function handleSetInter() {
var _this2 = this; var _this3 = this;
var timer;
var _this = this; var _this = this;
timer = setInterval(function () { if (this.timer) {
if (_this.second === 1) { clearInterval(this.timer);
_this2.pendCode = false; }
setTimeout(timer);
_this.second = 60; _this.second = 60;
_this.timer = setInterval(function () {
if (_this.second === 1) {
_this.pendCode = false;
// setTimeout(timer);
_this.second = 60;
clearInterval(_this3.timer);
} else { } else {
_this.second = _this.second - 1; _this.second = _this.second - 1;
} }
_this.$forceUpdate();
}, 1000); }, 1000);
}, },
// 注册 // 注册

View File

@ -77,6 +77,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 = {
uniRate: function () {
return __webpack_require__.e(/*! import() | uni_modules/uni-rate/components/uni-rate/uni-rate */ "uni_modules/uni-rate/components/uni-rate/uni-rate").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-rate/components/uni-rate/uni-rate.vue */ 643))
},
}
} 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
@ -151,11 +174,6 @@ var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/run
var _vuex = __webpack_require__(/*! vuex */ 33); var _vuex = __webpack_require__(/*! vuex */ 33);
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; }
var uniRate = function uniRate() {
__webpack_require__.e(/*! require.ensure | uni_modules/uni-rate/components/uni-rate/uni-rate */ "uni_modules/uni-rate/components/uni-rate/uni-rate").then((function () {
return resolve(__webpack_require__(/*! @/uni_modules/uni-rate/components/uni-rate/uni-rate.vue */ 643));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var noData = function noData() { var noData = function noData() {
Promise.all(/*! require.ensure | components/noData */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/noData")]).then((function () { Promise.all(/*! require.ensure | components/noData */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/noData")]).then((function () {
return resolve(__webpack_require__(/*! ../../../../components/noData.vue */ 516)); return resolve(__webpack_require__(/*! ../../../../components/noData.vue */ 516));
@ -180,7 +198,6 @@ var _default = {
user: "user" user: "user"
})), })),
components: { components: {
uniRate: uniRate,
noData: noData noData: noData
}, },
methods: _objectSpread(_objectSpread({}, (0, _vuex.mapMutations)(["setIsLoading"])), {}, { methods: _objectSpread(_objectSpread({}, (0, _vuex.mapMutations)(["setIsLoading"])), {}, {

View File

@ -313,10 +313,12 @@ var _default = {
buyType: "", buyType: "",
// 判断能不能点餐 1 是可以点餐 // 判断能不能点餐 1 是可以点餐
isLoading: false, isLoading: false,
listDetail: {} // 列表带进来的数据 月售和人均 listDetail: {},
// 列表带进来的数据 月售和人均
onLoadMid: "",
onLoadType: ""
}; };
}, },
computed: _objectSpread({}, (0, _vuex.mapGetters)({ computed: _objectSpread({}, (0, _vuex.mapGetters)({
// 'store': 'nowStore', // 'store': 'nowStore',
user: "user", user: "user",
@ -782,19 +784,17 @@ var _default = {
while (1) { while (1) {
switch (_context2.prev = _context2.next) { switch (_context2.prev = _context2.next) {
case 0: case 0:
console.log("2");
_this = _this4; _this = _this4;
_context2.next = 4; _context2.next = 3;
return _this4.$api.getCoop({ return _this4.$api.getCoop({
action_type: "GetMerchantsDetails", action_type: "GetMerchantsDetails",
merchantsId: id merchantsId: id
}); });
case 4: case 3:
res = _context2.sent; res = _context2.sent;
// .then(function (res) { // .then(function (res) {
// }); // });
_data = res.Data; _data = res.Data;
console.log("_datagetShop", _data);
_this.merchatsMsg = _data; _this.merchatsMsg = _data;
_this.getCouponList(_data.MERCHANTS_ID); // 获取商家优惠 _this.getCouponList(_data.MERCHANTS_ID); // 获取商家优惠
_this.getFoodImages(_data.MERCHANTS_ID); // 加载商家商品推荐 _this.getFoodImages(_data.MERCHANTS_ID); // 加载商家商品推荐
@ -804,7 +804,7 @@ var _default = {
_this.$refs.merchantEvaluation.loading(); _this.$refs.merchantEvaluation.loading();
} }
}, 500); }, 500);
case 12: case 10:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -818,6 +818,10 @@ var _default = {
sellerId: id sellerId: id
}).then(function (data) { }).then(function (data) {
_this.couponList = data.Result_Data.List || []; _this.couponList = data.Result_Data.List || [];
console.log('sellerIdsellerIdsellerIdsellerIdsellerId', {
sellerId: id
});
console.log('_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList', _this.couponList);
var tabList = []; var tabList = [];
var isFood = false; var isFood = false;
if (_this.couponList && _this.couponList.length > 0) { if (_this.couponList && _this.couponList.length > 0) {
@ -880,27 +884,27 @@ var _default = {
} }
if (options.stroreDetail) { if (options.stroreDetail) {
_this5.listDetail = JSON.parse(options.stroreDetail); _this5.listDetail = JSON.parse(options.stroreDetail);
console.log("this.listDetail", _this5.listDetail);
} }
_this5.stroreId = options.id; _this5.stroreId = options.id;
_context3.next = 8; _context3.next = 8;
return _this5.getNewGood(options.id, options.province); return _this5.getNewGood(options.id, options.province);
case 8: case 8:
_context3.next = 10; // this.merchatsMsg.MERCHANTS_ID = options.mid
_this5.onLoadMid = options.mid;
_this5.onLoadType = options.type;
_context3.next = 12;
return _this5.getShop(options.mid, options.type || 0); return _this5.getShop(options.mid, options.type || 0);
case 10: case 12:
// 获取商户信息 // 获取商户信息
_this5.tableNum = options.tableNum || 0; // tableNum 桌号 不等于0说明是门店扫码进入 则当确认订单时 不要选择相关的方向 _this5.tableNum = options.tableNum || 0; // tableNum 桌号 不等于0说明是门店扫码进入 则当确认订单时 不要选择相关的方向
_this5.$store.commit("orderTable", options.tableNum || 0); _this5.$store.commit("orderTable", options.tableNum || 0);
systemInfo = uni.getSystemInfoSync(); systemInfo = uni.getSystemInfoSync();
console.log('systemInfosystemInfosystemInfosystemInfo', systemInfo);
goodsHeight = systemInfo.windowHeight + systemInfo.statusBarHeight - 96; // - 44 goodsHeight = systemInfo.windowHeight + systemInfo.statusBarHeight - 96; // - 44
if (systemInfo.safeArea) { if (systemInfo.safeArea) {
_this5.goodsH = goodsHeight - systemInfo.safeArea.top; _this5.goodsH = goodsHeight - systemInfo.safeArea.top;
} else { } else {
_this5.goodsH = goodsHeight; _this5.goodsH = goodsHeight;
} }
console.log('this.goodsH this.goodsH this.goodsH this.goodsH ', _this5.goodsH);
_this5.$utils.addUserBehaviorNew(); _this5.$utils.addUserBehaviorNew();
case 18: case 18:
case "end": case "end":
@ -925,7 +929,6 @@ var _default = {
this.isShow = false; this.isShow = false;
}, },
onShow: function onShow() { onShow: function onShow() {
var _this6 = this;
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
if (this.shopcartOrder == "") { if (this.shopcartOrder == "") {
this.$store.commit("orderRemark", ""); this.$store.commit("orderRemark", "");
@ -938,10 +941,12 @@ var _default = {
this.shoppingCateCount = {}; this.shoppingCateCount = {};
} }
if (this.activeTabs === 2) { if (this.activeTabs === 2) {
setTimeout(function () { this.getShop(this.onLoadMid, this.onLoadType || 0);
_this6.$refs.merchantEvaluation.loading(); // setTimeout(() => {
}); // this.$refs.merchantEvaluation.loading();
// });
} }
this.$forceUpdate(); this.$forceUpdate();
}, },
onShareAppMessage: function onShareAppMessage() { onShareAppMessage: function onShareAppMessage() {

File diff suppressed because one or more lines are too long

View File

@ -278,7 +278,10 @@ var _default = {
// url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg", // url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg",
// }, // },
], ],
toDayHaveSign: false // 今日是否已经签到了 toDayHaveSign: false,
// 今日是否已经签到了
displayedAvatarUrl: "",
showAvatar: true // 是否显示头像
}; };
}, },
onUnload: function onUnload() { onUnload: function onUnload() {
@ -389,6 +392,184 @@ var _default = {
}, },
methods: { methods: {
// APP 端选择头像
handleChooseAvatarApp: function handleChooseAvatarApp() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var _this;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!(!_this2.user || !_this2.user.MEMBERSHIP_ID)) {
_context.next = 4;
break;
}
_this = _this2;
uni.showModal({
title: "温馨提示",
content: "请您授权登录后再操作。",
success: function success(res) {
if (res.confirm) {
if (_this.loginType === "min") {
uni.navigateTo({
url: "/pages/register/index"
});
} else {
uni.navigateTo({
url: "/pages/login/index"
});
}
}
}
});
return _context.abrupt("return");
case 4:
uni.chooseImage({
count: 1,
// 只允许选择一张图片
sizeType: ['compressed'],
// 压缩图片
sourceType: ['album', 'camera'],
// 可以从相册或相机选择
success: function success(res) {
console.log("APP chooseImage success:", res);
var tempFilePath = res.tempFilePaths[0]; // 获取临时文件路径
if (tempFilePath) {
// 直接调用上传方法,传入临时文件路径
_this2.uploadAvatarAndSave(tempFilePath);
} else {
uni.showToast({
title: '未选择图片',
icon: 'none'
});
}
},
fail: function fail(err) {
console.error("APP chooseImage failed:", err);
// 处理用户取消或权限问题
if (err.errMsg && err.errMsg.includes('cancel')) {
// 用户取消,不提示错误
} else {
uni.showToast({
title: '选择图片失败',
icon: 'none'
});
}
}
});
case 5:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
// 上传头像并更新用户信息 (这个方法可以复用,接收文件路径)
uploadAvatarAndSave: function uploadAvatarAndSave(filePath) {
var _this3 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
var _this;
return _regenerator.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
console.log('filePathfilePathfilePath', filePath);
_this = _this3;
uni.showLoading({
title: '上传中...'
}); // 显示加载提示
uni.uploadFile({
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture",
// 你的图片上传接口 URL
filePath: filePath,
// 直接使用文件路径
name: "file",
// 表单中的文件字段名
formData: {
Tabletype: "1005" // 表单中其他数据,根据你的接口要求填写
},
success: function () {
var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(uploadRes) {
var data, url, req, userInfoData;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
uni.hideLoading(); // 隐藏加载提示
data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
url = data.Result_Data.ImageUrl;
console.log('urlurlurlurl', url);
if (!url) {
_context2.next = 12;
break;
}
// 调用接口更新用户头像信息
req = {
membershipId: _this3.user.MEMBERSHIP_ID,
// 假设 user 对象中包含用户 ID
headImgUrl: url
};
_context2.next = 8;
return _this.$api.$get("/WeChat/UpdateMemberInfo",
// 你的更新用户信息接口 URL
req);
case 8:
userInfoData = _context2.sent;
if (userInfoData.Result_Code === 100) {
uni.showToast({
title: '头像更新成功',
icon: 'success'
});
// 重新获取用户最新信息,更新页面显示
_this.showAvatar = false;
_this.handleGetUserInfo();
} else {
uni.showToast({
title: userInfoData.Result_Desc || '更新头像失败',
icon: 'none'
});
// 如果更新失败,重新获取用户信息以显示正确的头像
_this.handleGetUserInfo();
}
_context2.next = 13;
break;
case 12:
uni.showToast({
title: data.Result_Desc || '上传图片失败',
icon: 'none'
});
case 13:
case "end":
return _context2.stop();
}
}
}, _callee2);
}));
function success(_x) {
return _success.apply(this, arguments);
}
return success;
}(),
fail: function fail(uploadErr) {
uni.hideLoading(); // 隐藏加载提示
uni.showToast({
title: '上传图片失败',
icon: 'none'
});
}
});
case 4:
case "end":
return _context3.stop();
}
}
}, _callee3);
}))();
},
// 跳转去登录 // 跳转去登录
handleGoLogin: function handleGoLogin() { handleGoLogin: function handleGoLogin() {
if (this.loginType === "min") { if (this.loginType === "min") {
@ -404,13 +585,13 @@ var _default = {
// 签到 // 签到
handleSign: function handleSign() { handleSign: function handleSign() {
if (this.user && !this.user.MEMBERSHIP_ID || !this.user && !this.user.MEMBERSHIP_ID) { if (this.user && !this.user.MEMBERSHIP_ID || !this.user && !this.user.MEMBERSHIP_ID) {
var _this2 = this; var _this4 = this;
uni.showModal({ uni.showModal({
title: "温馨提示", title: "温馨提示",
content: "请您授权登录后再操作。", content: "请您授权登录后再操作。",
success: function success(res) { success: function success(res) {
if (res.confirm) { if (res.confirm) {
if (_this2.loginType === "min") { if (_this4.loginType === "min") {
uni.navigateTo({ uni.navigateTo({
url: "/pages/register/index" url: "/pages/register/index"
}); });
@ -647,12 +828,12 @@ var _default = {
}, },
// 微信用户头像 // 微信用户头像
onChooseAvatar: function onChooseAvatar(e) { onChooseAvatar: function onChooseAvatar(e) {
var _this3 = this; var _this5 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
var _this; var _this;
return _regenerator.default.wrap(function _callee3$(_context3) { return _regenerator.default.wrap(function _callee6$(_context6) {
while (1) { while (1) {
switch (_context3.prev = _context3.next) { switch (_context6.prev = _context6.next) {
case 0: case 0:
console.log("e", e); console.log("e", e);
// this.WXProfile = e.detail.avatarUrl; // this.WXProfile = e.detail.avatarUrl;
@ -660,8 +841,8 @@ var _default = {
// if (!this.WXProfile) { // if (!this.WXProfile) {
// return; // return;
// } // }
_this = _this3; _this = _this5;
console.log("this.user", _this3.user); console.log("this.user", _this5.user);
uni.uploadFile({ uni.uploadFile({
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture",
// 你的接口 URL // 你的接口 URL
@ -673,52 +854,52 @@ var _default = {
}, },
success: function () { success: function () {
var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(uploadRes) { var _success2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(uploadRes) {
var data, url, req, userInfoData; var data, url, req, userInfoData;
return _regenerator.default.wrap(function _callee$(_context) { return _regenerator.default.wrap(function _callee4$(_context4) {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context4.prev = _context4.next) {
case 0: case 0:
data = uploadRes.data ? JSON.parse(uploadRes.data) : ""; data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
url = data.Result_Data.ImageUrl; url = data.Result_Data.ImageUrl;
console.log("url", url); console.log("url", url);
if (!url) { if (!url) {
_context.next = 11; _context4.next = 11;
break; break;
} }
req = { req = {
membershipId: _this3.user.MEMBERSHIP_ID, membershipId: _this5.user.MEMBERSHIP_ID,
headImgUrl: url headImgUrl: url
}; };
_this.WXProfile = url; _this.WXProfile = url;
_context.next = 8; _context4.next = 8;
return _this.$api.$get("/WeChat/UpdateMemberInfo", req); return _this.$api.$get("/WeChat/UpdateMemberInfo", req);
case 8: case 8:
userInfoData = _context.sent; userInfoData = _context4.sent;
console.log("userInfoData", userInfoData); console.log("userInfoData", userInfoData);
if (userInfoData.Result_Code === 100) { if (userInfoData.Result_Code === 100) {
_this.handleGetUserInfo(); _this.handleGetUserInfo();
} }
case 11: case 11:
case "end": case "end":
return _context.stop(); return _context4.stop();
} }
} }
}, _callee); }, _callee4);
})); }));
function success(_x) { function success(_x2) {
return _success.apply(this, arguments); return _success2.apply(this, arguments);
} }
return success; return success;
}() }()
}); });
return _context3.abrupt("return"); return _context6.abrupt("return");
case 6: case 6:
case "end": case "end":
return _context3.stop(); return _context6.stop();
} }
} }
}, _callee3); }, _callee6);
}))(); }))();
}, },
// 拿用户最新的user信息 // 拿用户最新的user信息
@ -748,6 +929,15 @@ var _default = {
_this.WXProfile = _data.Data.MEMBERSHIP_HEADIMAGEURL; _this.WXProfile = _data.Data.MEMBERSHIP_HEADIMAGEURL;
// _this.setUser(user); // _this.setUser(user);
_this.$store.commit("setUser", _this.user); _this.$store.commit("setUser", _this.user);
if (_data.Data.MEMBERSHIP_HEADIMAGEURL) {
_this.displayedAvatarUrl = _data.Data.MEMBERSHIP_HEADIMAGEURL + '?t=' + Date.now();
} else {
_this.displayedAvatarUrl = ''; // 或者设置为默认头像 URL
}
console.log('_this.displayedAvatarUrl_this.displayedAvatarUrl_this.displayedAvatarUrl', _this.displayedAvatarUrl);
_this.$forceUpdate();
_this.showAvatar = true;
} else { } else {
// _this.setUser({}); // _this.setUser({});
_this.$store.commit("setUser", user); _this.$store.commit("setUser", user);

File diff suppressed because one or more lines are too long

View File

@ -38,6 +38,11 @@
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;
} }
.main .content .top .userInfoLeft .userFile .headerImg.data-v-d596de08 {
width: 100%;
height: 100%;
border-radius: 50%;
}
.main .content .top .userInfoLeft .userInfoBox.data-v-d596de08 { .main .content .top .userInfoLeft .userInfoBox.data-v-d596de08 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -8,14 +8,7 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/userConfig/index", "name": "pages/register/index",
"pathName": "pages/userConfig/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/login/index",
"pathName": "pages/login/index", "pathName": "pages/login/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",

View File

@ -32,7 +32,7 @@ export async function handleGetUserPointInfo() {
} }
// 三个平台拿到当前位置的方法 反正最后输出经纬度的数据就好 // 三个平台拿到当前位置的方法 反正最后输出经纬度的数据就好
async function handleGetPosition() { export async function handleGetPosition() {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const res = await uni.getSetting(); const res = await uni.getSetting();
const times = uni.getStorageSync("howTimes"); const times = uni.getStorageSync("howTimes");