update
This commit is contained in:
parent
34120c6d7d
commit
5439570ac0
119
components/chargeBox.vue
Normal file
119
components/chargeBox.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view class="chargeBox">
|
||||
<!-- 理想 -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<img class="chargeIcon" src="/static/images/home/LXIcon.png" />
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue"></span>
|
||||
<span class="sum"></span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 蔚来 -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<img class="chargeIcon" src="https://eshangtech.com/minTestImg/WLIcon.png" />
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue"></span>
|
||||
<span class="sum"></span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 时代新能源(阳光) -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<img class="chargeIcon" src="/static/images/home/sunIcon.png" />
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue"></span>
|
||||
<span class="sum"></span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 国网(充换电) -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<img class="chargeIcon" src="/static/images/home/stateGridIcon.png" />
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue"></span>
|
||||
<span class="sum"></span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
props: ["SERVERPARTID"],
|
||||
watch: {
|
||||
SERVERPARTID: {
|
||||
handler(newVal, oldVal) {
|
||||
console.log("发生了变化", newVal, oldVal);
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.chargeBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.chargeItem {
|
||||
.chargeIconBox {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
.chargeIcon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.chargeInfo {
|
||||
margin-top: 8rpx;
|
||||
.empty {
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.emptyValue {
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.sum {
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -84,7 +84,13 @@
|
||||
"sdkConfigs" : {
|
||||
"ad" : {},
|
||||
"oauth" : {},
|
||||
"maps" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"name" : "amap_18158132615AICJ55IM2",
|
||||
"appkey_ios" : "78e8b8340770d439c5415a6d897b68a7",
|
||||
"appkey_android" : "d773aa156f8ca2160cfb06d5f117dacd"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
"appleiap" : {},
|
||||
"weixin" : {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: cclu 1106109051@qq.com
|
||||
* @Date: 2025-02-14 17:38:17
|
||||
* @LastEditors: cclu 1106109051@qq.com
|
||||
* @LastEditTime: 2025-02-17 09:24:49
|
||||
* @LastEditTime: 2025-03-06 12:34:14
|
||||
* @FilePath: \wanmeiyizhan\pages\clickRescue\index.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
@ -50,11 +50,11 @@
|
||||
|
||||
<view class="bottomBtn">
|
||||
<view class="btn" @click="handleGoWxMin">
|
||||
<img class="icon" src="/static/images/home/trailer.svg" />
|
||||
<image class="icon" src="/static/images/home/trailer.svg" />
|
||||
<text class="btnText">一键救援</text>
|
||||
</view>
|
||||
<view class="btn right" @click="handleCallPhone">
|
||||
<img class="icon" src="/static/images/home/rescuePhone.svg" />
|
||||
<image class="icon" src="/static/images/home/rescuePhone.svg" />
|
||||
<text class="btnText">救援电话</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -252,6 +252,9 @@ export default {
|
||||
POST_CONTENT: this.handleGetNewStr(this.contentText),
|
||||
PUBLISH_TIME: now,
|
||||
POST_TAG: this.selectLabel,
|
||||
AUTHOR_NAME:
|
||||
this.user.MEMBERSHIP_NAME || this.user.MEMBERSHIP_MOBILEPHONE, // 作者名称
|
||||
AUTHOR_HEADIMAGEURL: this.user.MEMBERSHIP_HEADIMAGEURL,
|
||||
};
|
||||
} else {
|
||||
req = {
|
||||
@ -267,8 +270,10 @@ export default {
|
||||
weChatAppId: "wx4c497eddcec4a0e7",
|
||||
wechatAppAppId: "wx4c497eddcec4a0e7",
|
||||
POST_STATE: 1,
|
||||
AUTHOR_HEADIMAGEURL: this.user.MEMBERSHIP_HEADIMAGEURL,
|
||||
};
|
||||
}
|
||||
console.log("this.user", this.user);
|
||||
console.log("req", req);
|
||||
const data = await this.$api.$post("/Member/SynchroPOST", req);
|
||||
console.log("datadsad", data);
|
||||
@ -330,25 +335,43 @@ export default {
|
||||
} else {
|
||||
fs = plus.io;
|
||||
console.log("fs", fs);
|
||||
console.log("this.imgList", this.imgList);
|
||||
this.imgList.forEach((imagePath, index) => {
|
||||
console.log("imagePath", imagePath);
|
||||
if (!imagePath.ImageId) {
|
||||
fs.FileReader({
|
||||
filePath: imagePath.ImageUrl,
|
||||
encoding: "base64",
|
||||
success: (readRes) => {
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // 你的接口 URL
|
||||
filePath: imagePath.ImageUrl, // 上传文件的路径
|
||||
name: "file", // 表单中的文件字段名
|
||||
formData: {
|
||||
Tabletype: "1307", // 表单中其他数据
|
||||
TableId: data.Result_Data.POST_ID,
|
||||
// 如果你有其他字段需要传递,也可以在这里添加
|
||||
},
|
||||
success: (uploadRes) => {},
|
||||
fs.resolveLocalFileSystemURL(
|
||||
imagePath.ImageUrl,
|
||||
function (entry) {
|
||||
entry.file(function (file) {
|
||||
var reader = new plus.io.FileReader();
|
||||
reader.onloadend = function (e) {
|
||||
console.log("readRes", e.target.result);
|
||||
const filePath = plus.io.convertLocalFileSystemURL(
|
||||
imagePath.ImageUrl
|
||||
);
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture",
|
||||
filePath: filePath, // 绝对路径
|
||||
name: "file",
|
||||
formData: {
|
||||
Tabletype: "1307",
|
||||
TableId: data.Result_Data.POST_ID,
|
||||
},
|
||||
success: (uploadRes) => {
|
||||
console.log("上传成功", uploadRes);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error("上传失败", err);
|
||||
},
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
},
|
||||
});
|
||||
function (error) {
|
||||
console.log("文件读取失败", error);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -13,7 +13,10 @@
|
||||
<view class="profileBox">
|
||||
<image
|
||||
class="profile"
|
||||
src="/static/images/home/defaultProfit.svg"
|
||||
:src="
|
||||
detailObj.AUTHOR_HEADIMAGEURL ||
|
||||
'/static/images/home/defaultProfit.svg'
|
||||
"
|
||||
/>
|
||||
</view>
|
||||
<view class="otherBox">
|
||||
@ -63,7 +66,10 @@
|
||||
<view class="detailLeft">
|
||||
<image
|
||||
class="profile"
|
||||
src="/static/images/home/defaultProfit.svg"
|
||||
:src="
|
||||
item.MEMBERSHIP_HEADIMAGEURL ||
|
||||
'/static/images/home/defaultProfit.svg'
|
||||
"
|
||||
/>
|
||||
</view>
|
||||
<view class="detailRight">
|
||||
@ -124,7 +130,10 @@
|
||||
<view class="childrenLeft">
|
||||
<image
|
||||
class="profile"
|
||||
src="/static/images/home/defaultProfit.svg"
|
||||
:src="
|
||||
subItem.MEMBERSHIP_HEADIMAGEURL ||
|
||||
'/static/images/home/defaultProfit.svg'
|
||||
"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@ -215,7 +224,13 @@
|
||||
}"
|
||||
>
|
||||
<view class="userProfile">
|
||||
<image class="profile" src="/static/images/home/defaultProfit.svg" />
|
||||
<image
|
||||
class="profile"
|
||||
:src="
|
||||
user.MEMBERSHIP_HEADIMAGEURL ||
|
||||
'/static/images/home/defaultProfit.svg'
|
||||
"
|
||||
/>
|
||||
</view>
|
||||
<view class="userInput" @click="handleShowInputPopup">
|
||||
写下你的评论...
|
||||
@ -536,7 +551,8 @@ export default {
|
||||
POSTDETAIL_PID: this.currentReplayObj.POSTDETAIL_ID,
|
||||
MEMBERSHIP_ID: this.user.MEMBERSHIP_ID, // 会员内码
|
||||
POSTDETAIL_TYPE: 3000, // 用户行为
|
||||
NICK_NAME: this.user.MEMBERSHIP_NAME, // 用户昵称
|
||||
NICK_NAME:
|
||||
this.user.MEMBERSHIP_NAME || this.user.MEMBERSHIP_MOBILEPHONE, // 用户昵称
|
||||
POSTDETAIL_STATE: 1, // 状态
|
||||
POSTDETAIL_CONTENT: str,
|
||||
OPERATE_DATE: new this.$moment().format("YYYY-MM-DD HH:mm:ss"),
|
||||
@ -544,6 +560,7 @@ export default {
|
||||
this.currentReplayObj.POSTDETAIL_PID !== -1
|
||||
? this.currentReplayObj.NICK_NAME
|
||||
: "",
|
||||
MEMBERSHIP_HEADIMAGEURL: this.user.MEMBERSHIP_HEADIMAGEURL,
|
||||
};
|
||||
} else {
|
||||
// 发布
|
||||
@ -552,10 +569,12 @@ export default {
|
||||
POSTDETAIL_PID: -1,
|
||||
MEMBERSHIP_ID: this.user.MEMBERSHIP_ID, // 会员内码
|
||||
POSTDETAIL_TYPE: 3000, // 用户行为
|
||||
NICK_NAME: this.user.MEMBERSHIP_NAME, // 用户昵称
|
||||
NICK_NAME:
|
||||
this.user.MEMBERSHIP_NAME || this.user.MEMBERSHIP_MOBILEPHONE, // 用户昵称
|
||||
POSTDETAIL_STATE: 1, // 状态
|
||||
POSTDETAIL_CONTENT: str,
|
||||
OPERATE_DATE: new this.$moment().format("YYYY-MM-DD HH:mm:ss"),
|
||||
MEMBERSHIP_HEADIMAGEURL: this.user.MEMBERSHIP_HEADIMAGEURL,
|
||||
};
|
||||
}
|
||||
|
||||
@ -634,6 +653,7 @@ export default {
|
||||
.profile {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.otherBox {
|
||||
@ -681,6 +701,7 @@ export default {
|
||||
height: 218rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
overflow: hidden;
|
||||
.imageBox {
|
||||
width: 100%;
|
||||
@ -723,6 +744,7 @@ export default {
|
||||
.profile {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -815,6 +837,7 @@ export default {
|
||||
.profile {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -945,6 +968,7 @@ export default {
|
||||
.profile {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,10 @@
|
||||
<view class="profileBox">
|
||||
<image
|
||||
class="profile"
|
||||
src="/static/images/home/defaultProfit.svg"
|
||||
:src="
|
||||
item.AUTHOR_HEADIMAGEURL ||
|
||||
'/static/images/home/defaultProfit.svg'
|
||||
"
|
||||
/>
|
||||
</view>
|
||||
<view class="otherBox">
|
||||
@ -90,7 +93,7 @@
|
||||
|
||||
<view class="itemContent"
|
||||
>{{
|
||||
item.isShowSmall === 1 ? item.smallText : item.POST_CONTENT || ""
|
||||
item.isShowSmall === 1 ? item.smallText : item.POST_TITLE || ""
|
||||
}}<span
|
||||
v-if="item.isShowSmall > 0"
|
||||
class="expend"
|
||||
@ -312,9 +315,9 @@ export default {
|
||||
} else {
|
||||
detailObj.isthumbsUp = false;
|
||||
}
|
||||
if (detailObj.POST_CONTENT.length > 100) {
|
||||
if (detailObj.POST_TITLE.length > 100) {
|
||||
detailObj.isShowSmall = 1;
|
||||
detailObj.smallText = detailObj.POST_CONTENT.slice(0, 100);
|
||||
detailObj.smallText = detailObj.POST_TITLE.slice(0, 100);
|
||||
} else {
|
||||
detailObj.isShowSmall = 0;
|
||||
}
|
||||
@ -457,9 +460,9 @@ export default {
|
||||
} else {
|
||||
item.isthumbsUp = false;
|
||||
}
|
||||
if (item.POST_CONTENT.length > 100) {
|
||||
if (item.POST_TITLE.length > 100) {
|
||||
item.isShowSmall = 1;
|
||||
item.smallText = item.POST_CONTENT.slice(0, 100);
|
||||
item.smallText = item.POST_TITLE.slice(0, 100);
|
||||
} else {
|
||||
item.isShowSmall = 0;
|
||||
}
|
||||
@ -607,6 +610,7 @@ export default {
|
||||
.profile {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.otherBox {
|
||||
@ -701,6 +705,7 @@ export default {
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
margin-right: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
.image {
|
||||
|
||||
@ -8,7 +8,11 @@
|
||||
<view class="itemValue" @click="handleChangeService">
|
||||
<view class="selectBox">
|
||||
<view class="picker"
|
||||
>{{ nowServerpart.SERVERPART_NAME || "" }}
|
||||
>{{
|
||||
detailObj && detailObj.SERVERPART_NAME
|
||||
? detailObj.SERVERPART_NAME
|
||||
: nowServerpart.SERVERPART_NAME || ""
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -38,7 +42,11 @@
|
||||
<view class="formItem">
|
||||
<view class="itemTitle">
|
||||
{{
|
||||
addType === 1000 ? "失物描述" : addType === 2000 ? "招领描述" : ""
|
||||
addType === 1000 || detailObj.WECHAT_OPENID === "1000"
|
||||
? "失物描述"
|
||||
: addType === 2000 || detailObj.WECHAT_OPENID === "2000"
|
||||
? "招领描述"
|
||||
: ""
|
||||
}}</view
|
||||
>
|
||||
<view class="itemValue">
|
||||
@ -51,13 +59,25 @@
|
||||
: ''
|
||||
"
|
||||
v-model="shopName"
|
||||
:disabled="isDetail"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="formItem">
|
||||
<view class="itemTitle">{{addType === 1000 ?'丢失时间':addType === 2000?'拾得时间':''}}</view>
|
||||
<view class="itemValue">
|
||||
<view class="itemTitle">{{
|
||||
addType === 1000 || detailObj.WECHAT_OPENID === "1000"
|
||||
? "丢失时间"
|
||||
: addType === 2000 || detailObj.WECHAT_OPENID === "2000"
|
||||
? "拾得时间"
|
||||
: ""
|
||||
}}</view>
|
||||
<view
|
||||
class="itemValue"
|
||||
v-if="detailObj && detailObj.SUGGESTION_CREATEDATE"
|
||||
>{{ detailObj.SUGGESTION_CREATEDATE || "" }}</view
|
||||
>
|
||||
<view class="itemValue" v-else>
|
||||
<time-picker @update="onTimeUpdate" />
|
||||
</view>
|
||||
</view>
|
||||
@ -70,11 +90,52 @@
|
||||
type="number"
|
||||
maxlength="11"
|
||||
v-model="phone"
|
||||
:disabled="isDetail"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="formItem" style="align-items: flex-start">
|
||||
<view class="itemTitle">附件图片</view>
|
||||
<view
|
||||
class="itemValue"
|
||||
style="
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="imgList"
|
||||
style="flex-wrap: wrap"
|
||||
v-if="imgList && imgList.length > 0"
|
||||
>
|
||||
<view
|
||||
class="imgBox"
|
||||
v-for="(item, index) in imgList"
|
||||
:key="index"
|
||||
@click="handlePreview(imgList, index)"
|
||||
>
|
||||
<image class="img" :src="item.ImageUrl" />
|
||||
<image
|
||||
v-if="!isDetail"
|
||||
@click="handleDeleteImg(item)"
|
||||
class="deleteImg"
|
||||
src="/static/images/home/deleteImg.svg"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submitImg" @click="handleUpLoadImg" v-if="!isDetail">
|
||||
<image
|
||||
class="imgIcon"
|
||||
src="/static/images/home/addImageIcon.svg"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnBox">
|
||||
<view class="btnBox" v-if="!isDetail">
|
||||
<button class="submitBox" type="primary" @click="formSubmit">
|
||||
{{
|
||||
addType === 1000 ? "新增失物" : addType === 2000 ? "新增招领" : ""
|
||||
@ -99,6 +160,10 @@ export default {
|
||||
phone: "", // 联系电话
|
||||
thisTime: "", // 当前时间
|
||||
addType: "", // 1000 失物 2000 招领
|
||||
imgList: [], // 图片列表
|
||||
isDetail: false, // 判断是不是来查看到
|
||||
detailObj: {}, // 详情
|
||||
loginType: "",
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -111,10 +176,17 @@ export default {
|
||||
},
|
||||
onLoad(query) {
|
||||
console.log("user", this.user);
|
||||
let type = uni.getStorageSync("loginType");
|
||||
this.loginType = type;
|
||||
if (query.addType) {
|
||||
this.addType = Number(query.addType);
|
||||
}
|
||||
|
||||
if (query.id) {
|
||||
this.isDetail = true;
|
||||
this.handleGetDetail(query.id);
|
||||
}
|
||||
|
||||
this.handleGetDefaultTime();
|
||||
// 先去拿枚举值
|
||||
this.handleGetTypeList();
|
||||
@ -127,6 +199,89 @@ export default {
|
||||
this.nowServerpart = currentService;
|
||||
},
|
||||
methods: {
|
||||
// 预览
|
||||
handlePreview(imgList, index) {
|
||||
console.log("imgList", imgList);
|
||||
console.log("index", index);
|
||||
let list = [];
|
||||
if (imgList && imgList.length > 0) {
|
||||
imgList.forEach((item) => {
|
||||
list.push(item.ImageUrl);
|
||||
});
|
||||
}
|
||||
uni.previewImage({
|
||||
current: list[index], // 当前显示图片的http链接
|
||||
urls: list, // 需要预览的图片http链接列表
|
||||
});
|
||||
},
|
||||
// 查看失物招领详情
|
||||
async handleGetDetail(id) {
|
||||
const req = {
|
||||
SUGGESTIONId: id,
|
||||
};
|
||||
const data = await this.$api.$get(
|
||||
"/EShangApiMain/SiteManage/GetSUGGESTIONDetail",
|
||||
req
|
||||
);
|
||||
console.log("handleGetDetail", data);
|
||||
this.detailObj = data.Result_Data;
|
||||
this.shopName = data.Result_Data.SUGGESTION_TITLE;
|
||||
this.imgList = data.Result_Data.ImageList;
|
||||
},
|
||||
// 删除图片
|
||||
async handleDeleteImg(obj) {
|
||||
console.log("obj", obj);
|
||||
if (obj.ImageId) {
|
||||
const data = await this.$api.$get(
|
||||
"/EShangApiMain/Picture/DeletePicture",
|
||||
{
|
||||
ImageId: obj.ImageId,
|
||||
ImagePath: obj.ImagePath,
|
||||
TableType: 6000,
|
||||
}
|
||||
);
|
||||
console.log("data", data);
|
||||
if (data.Result_Code === 100) {
|
||||
let newList = [];
|
||||
this.imgList.forEach((item) => {
|
||||
if (item.ImageId !== obj.ImageId) {
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.imgList = newList;
|
||||
uni.showToast({
|
||||
title: data.Result_Desc || "更新成功",
|
||||
icon: "success",
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: data.Result_Desc,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
} else {
|
||||
let newList = [];
|
||||
this.imgList.forEach((item) => {
|
||||
if (item.ImageUrl !== obj.ImageUrl) {
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.imgList = newList;
|
||||
}
|
||||
},
|
||||
// 上传图片
|
||||
handleUpLoadImg() {
|
||||
let _this = this;
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ["original", "compressed"],
|
||||
sourceType: ["album", "camera"],
|
||||
success(rs) {
|
||||
console.log("rs", rs);
|
||||
_this.imgList.push({ ImageUrl: rs.tempFilePaths[0] });
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取当前的默认时间
|
||||
handleGetDefaultTime() {
|
||||
const date = new Date();
|
||||
@ -209,6 +364,7 @@ export default {
|
||||
SUGGESTION_CREATEDATE: this.thisTime,
|
||||
SUGGESTION_STATE: 1,
|
||||
SUGGESTION_TYPE: 4000,
|
||||
SUGGESTION_NAME: this.user.MEMBERSHIP_NAME,
|
||||
SERVERPART_NAME: this.nowServerpart.SERVERPART_NAME,
|
||||
WECHAT_OPENID: this.addType,
|
||||
};
|
||||
@ -219,6 +375,74 @@ export default {
|
||||
);
|
||||
console.log("data", data);
|
||||
if (data.Result_Code === 100) {
|
||||
if (this.imgList && this.imgList.length > 0) {
|
||||
// 获取文件管理器
|
||||
let fs;
|
||||
if (this.loginType === "min") {
|
||||
this.imgList.forEach((imagePath, index) => {
|
||||
console.log("imagePath.ImageUrl", imagePath.ImageUrl);
|
||||
|
||||
if (!imagePath.ImageId) {
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // 你的接口 URL
|
||||
filePath: imagePath.ImageUrl, // 上传文件的路径
|
||||
name: "file", // 表单中的文件字段名
|
||||
formData: {
|
||||
Tabletype: "1306", // 表单中其他数据
|
||||
TableId: data.Result_Data.SUGGESTION_ID,
|
||||
// 如果你有其他字段需要传递,也可以在这里添加
|
||||
},
|
||||
success: (uploadRes) => {},
|
||||
fail: (uploadRes) => {
|
||||
_this.file = uploadRes;
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fs = plus.io;
|
||||
console.log("fs", fs);
|
||||
console.log("this.imgList", this.imgList);
|
||||
this.imgList.forEach((imagePath, index) => {
|
||||
console.log("imagePath", imagePath);
|
||||
if (!imagePath.ImageId) {
|
||||
fs.resolveLocalFileSystemURL(
|
||||
imagePath.ImageUrl,
|
||||
function (entry) {
|
||||
entry.file(function (file) {
|
||||
var reader = new plus.io.FileReader();
|
||||
reader.onloadend = function (e) {
|
||||
console.log("readRes", e.target.result);
|
||||
const filePath = plus.io.convertLocalFileSystemURL(
|
||||
imagePath.ImageUrl
|
||||
);
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture",
|
||||
filePath: filePath, // 绝对路径
|
||||
name: "file",
|
||||
formData: {
|
||||
Tabletype: "1306",
|
||||
TableId: data.Result_Data.SUGGESTION_ID,
|
||||
},
|
||||
success: (uploadRes) => {
|
||||
console.log("上传成功", uploadRes);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error("上传失败", err);
|
||||
},
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
},
|
||||
function (error) {
|
||||
console.log("文件读取失败", error);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
uni.showToast({
|
||||
title: data.Result_Desc,
|
||||
icon: "success",
|
||||
@ -312,6 +536,48 @@ export default {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.imgList {
|
||||
display: flex;
|
||||
.imgBox {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
position: relative;
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.deleteImg {
|
||||
position: absolute;
|
||||
// top: -15rpx;
|
||||
// right: -15rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submitImg {
|
||||
display: inline-block;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
background: #f7f8f9;
|
||||
border-radius: 4rpx;
|
||||
border: 2rpx dashed #e7e7e6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 16rpx;
|
||||
.imgIcon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnBox {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div
|
||||
class="top"
|
||||
:style="{
|
||||
height: `${menu.bottom + 8}px`,
|
||||
height: `${loginType === 'min' ? menu.bottom + 8 : ''}px`,
|
||||
paddingTop: `${menu.top}px`,
|
||||
}"
|
||||
>
|
||||
@ -79,7 +79,9 @@
|
||||
<div
|
||||
class="pageList"
|
||||
:style="{
|
||||
height: `calc(100vh - 200rpx - ${menu.bottom}px - 30px - 80rpx)`,
|
||||
height: `calc(100vh - 200rpx - ${
|
||||
loginType === 'min' ? menu.bottom : menu.top * 2
|
||||
}px - 30px - 80rpx)`,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
@ -90,12 +92,22 @@
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="listBox"
|
||||
:style="{
|
||||
height: `calc(100vh - 200rpx - ${
|
||||
loginType === 'min' ? menu.bottom : menu.top * 2
|
||||
}px - 30px - 80rpx - 80rpx)`,
|
||||
}"
|
||||
refresher-enabled
|
||||
:refresher-triggered="triggered"
|
||||
@scrolltolower="handleScrollBottom"
|
||||
@refresherrefresh="handleRefresh"
|
||||
>
|
||||
<div class="shopItem" v-for="(item, index) in dataList" :key="index">
|
||||
<div
|
||||
class="shopItem"
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
@click="handleGoDetail(item)"
|
||||
>
|
||||
<div class="title">
|
||||
<span class="normal">{{ item.beforeOtherName }}</span>
|
||||
<span class="light">{{ item.lightName }}</span>
|
||||
@ -257,6 +269,7 @@ export default {
|
||||
},
|
||||
triggered: false, // 下拉状态
|
||||
fintType: 1000, // 1000 失物 2000 招领
|
||||
loginType: "",
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -266,6 +279,7 @@ export default {
|
||||
onLoad() {
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
let type = uni.getStorageSync("loginType");
|
||||
this.loginType = type;
|
||||
if (type === "min") {
|
||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||
} else {
|
||||
@ -292,6 +306,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查看详情
|
||||
handleGoDetail(obj) {
|
||||
console.log("obj", obj);
|
||||
uni.navigateTo({
|
||||
url: `/pages/contact/addContact?id=${obj.SUGGESTION_ID}`,
|
||||
});
|
||||
},
|
||||
// 回车查询调用的方法
|
||||
handleEntrySearch() {
|
||||
console.log("handleEntrySearch");
|
||||
@ -696,7 +717,7 @@ export default {
|
||||
}
|
||||
.listBox {
|
||||
width: 100%;
|
||||
height: calc(100% - 80rpx);
|
||||
// height: calc(100% - 80rpx);
|
||||
overflow-y: auto;
|
||||
.shopItem {
|
||||
width: 100%;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<view
|
||||
class="top"
|
||||
:style="{
|
||||
height: `${menu.bottom + 8}px`,
|
||||
height: `${loginType === 'min' ? menu.bottom + 8 : ''}px`,
|
||||
paddingTop: `${menu.top}px`,
|
||||
}"
|
||||
>
|
||||
@ -65,7 +65,7 @@
|
||||
<image
|
||||
class="itemImg"
|
||||
:src="
|
||||
item.MERCHANTS_LOGO ||
|
||||
item.COUPON_IMAGEURL ||
|
||||
'https://eshangtech.com/ShopICO/no-picture.png'
|
||||
"
|
||||
mode="aspectFit"
|
||||
@ -97,7 +97,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="activityTitle" style="margin-top: 32rpx">折扣优惠</view>
|
||||
<view class="activityTitle" style="margin-top: 32rpx">会员活动</view>
|
||||
<scroll-view scroll-x class="activityBox">
|
||||
<view
|
||||
class="couponList"
|
||||
@ -451,7 +451,7 @@
|
||||
"
|
||||
>
|
||||
<div style="display: flex; align-items: center">
|
||||
<i></i>
|
||||
<!-- <i></i> -->
|
||||
<span>成为会员超多权益等你享</span>
|
||||
</div>
|
||||
|
||||
@ -922,14 +922,13 @@ export default {
|
||||
currentService,
|
||||
},
|
||||
onLoad() {
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
let type = uni.getStorageSync("loginType");
|
||||
console.log("type", type);
|
||||
if (type === "min") {
|
||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||
} else {
|
||||
this.menu = {
|
||||
height: 42,
|
||||
};
|
||||
this.menu = systemInfo.safeArea;
|
||||
}
|
||||
console.log("this.menu", this.menu);
|
||||
console.log("this.user", this.user);
|
||||
|
||||
@ -201,9 +201,9 @@
|
||||
</div>
|
||||
|
||||
<!-- @click="handleGoReservation" -->
|
||||
<div class="rightMerchants" @click="goSelectServer">
|
||||
<div class="rightMerchants" @click="goSelectServer(nearPart)">
|
||||
<span class="serviceName">{{
|
||||
currentServicePart.SERVERPART_NAME || ""
|
||||
nearPart.ServerPart_Name || ""
|
||||
}}</span>
|
||||
<image class="moreIcon" src="/static/images/home/rightArrow.png" />
|
||||
</div>
|
||||
@ -352,6 +352,7 @@ export default {
|
||||
headlinesList: [], // 高速头条
|
||||
showBanner: false, // 是否显示轮播框
|
||||
WXProfile: "",
|
||||
nearPart: {}, // 锁死的最近的服务区
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -530,6 +531,13 @@ export default {
|
||||
}
|
||||
}
|
||||
this.handleGetUserInfo();
|
||||
|
||||
let nearService = uni.getStorageSync("nearService");
|
||||
if (nearService) {
|
||||
this.nearPart = nearService;
|
||||
} else {
|
||||
this.handleGetNearService();
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
this.showBanner = false;
|
||||
@ -734,6 +742,36 @@ export default {
|
||||
// return;
|
||||
// }
|
||||
let _this = this;
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // 你的接口 URL
|
||||
filePath: e.detail.avatarUrl,
|
||||
name: "file", // 表单中的文件字段名
|
||||
formData: {
|
||||
Tabletype: "1005", // 表单中其他数据
|
||||
},
|
||||
success: async (uploadRes) => {
|
||||
let data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
|
||||
let url = data.Result_Data.ImageUrl;
|
||||
console.log("url", url);
|
||||
if (url) {
|
||||
let req = {
|
||||
membershipId: this.user.MEMBERSHIP_ID,
|
||||
headImgUrl: url,
|
||||
};
|
||||
_this.WXProfile = url;
|
||||
const userInfoData = await _this.$api.$get(
|
||||
"/WeChat/UpdateMemberInfo",
|
||||
req
|
||||
);
|
||||
console.log("userInfoData", userInfoData);
|
||||
if (userInfoData.Result_Code === 100) {
|
||||
_this.handleGetUserInfo();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return;
|
||||
console.log("this.user", this.user);
|
||||
uni.saveFile({
|
||||
tempFilePath: e.detail.avatarUrl,
|
||||
@ -1056,16 +1094,24 @@ export default {
|
||||
}
|
||||
},
|
||||
// 跳转到地图选择服务区
|
||||
goSelectServer() {
|
||||
if (this.currentServicePart.SERVERPART_ID) {
|
||||
// uni.navigateTo({ url: "/pages/serviceDetail/shopDetail/index" });
|
||||
goSelectServer(obj) {
|
||||
// 业主说不变
|
||||
return
|
||||
if (obj.SERVERPART_ID) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/serviceDetail/index?id=" +
|
||||
this.currentServicePart.SERVERPART_ID,
|
||||
url: "/pages/serviceDetail/index?id=" + obj.SERVERPART_ID,
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({ url: "/pages/newMap/index/index?comeForm=home" });
|
||||
if (this.currentServicePart.SERVERPART_ID) {
|
||||
// uni.navigateTo({ url: "/pages/serviceDetail/shopDetail/index" });
|
||||
uni.navigateTo({
|
||||
url:
|
||||
"/pages/serviceDetail/index?id=" +
|
||||
this.currentServicePart.SERVERPART_ID,
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({ url: "/pages/newMap/index/index?comeForm=home" });
|
||||
}
|
||||
}
|
||||
},
|
||||
// 轮播框的图片切换
|
||||
@ -1159,6 +1205,8 @@ export default {
|
||||
this.severPartList = _data;
|
||||
this.setSeverList(serverSelectList);
|
||||
let obj = this.handleChangeServiceInfo(_data[0]);
|
||||
uni.setStorageSync("nearService", obj); // 当前选中服务区信息
|
||||
this.nearPart = obj;
|
||||
uni.setStorageSync("currentService", obj); // 当前选中服务区信息
|
||||
this.serverPart = obj;
|
||||
console.log("_this.serverPart2", this.serverPart);
|
||||
@ -1204,7 +1252,7 @@ export default {
|
||||
.getCoop({
|
||||
action_type: "GetRcmContent",
|
||||
rcmtagKey: "HOME_SELLER",
|
||||
serverpartId: _this.serverPart.ServerPart_Id,
|
||||
serverpartId: _this.nearPart.ServerPart_Id,
|
||||
provinceCode: _this.provinceCode || "340000",
|
||||
})
|
||||
.then(function (data) {
|
||||
|
||||
@ -66,12 +66,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="refresh-box flex align-center" @click.stop="refreshCode()">
|
||||
<van-icon
|
||||
name="replay"
|
||||
size="30rpx"
|
||||
color="#ff6666"
|
||||
custom-style="margin-right:8rpx;"
|
||||
/>
|
||||
<image class="replayIcon" src="/static/images/home/replay.svg" />
|
||||
<span class="text-xs color9d">每分钟自动刷新</span>
|
||||
</div>
|
||||
<div
|
||||
@ -91,7 +86,10 @@
|
||||
@click="handleSelectCoupon"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<text class="text-sm color9d" style="margin-right: 8rpx" v-if="couponlist.length == 0"
|
||||
<text
|
||||
class="text-sm color9d"
|
||||
style="margin-right: 8rpx"
|
||||
v-if="couponlist.length == 0"
|
||||
>暂无可使用的优惠券</text
|
||||
>
|
||||
<text class="text-sm color9d" v-else>{{
|
||||
@ -125,7 +123,7 @@
|
||||
</view> -->
|
||||
|
||||
<view class="shipList">
|
||||
<view
|
||||
<!-- <view
|
||||
class="shipItem"
|
||||
@click="handleRealGoPay(1)"
|
||||
style="margin-right: 40rpx"
|
||||
@ -135,9 +133,9 @@
|
||||
class="shipIcon"
|
||||
src="/static/images/home/alipayIcon.svg"
|
||||
/>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <span class="shipTitle">支付宝</span> -->
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
<view class="shipItem" @click="handleRealGoPay(2)">
|
||||
<view class="shipIconBox">
|
||||
<image class="shipIcon" src="/static/images/home/wxPay.svg" />
|
||||
@ -254,7 +252,11 @@ export default {
|
||||
methods: {
|
||||
// 快捷支付
|
||||
handleRealGoPay(payType) {
|
||||
return
|
||||
uni.showToast({
|
||||
title: "待开发...",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
if (this.loginType === "android") {
|
||||
if (payType === 1) {
|
||||
uni.navigateTo({
|
||||
@ -638,6 +640,12 @@ canvas {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.replayIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.cuIcon-refresh::before {
|
||||
color: #FF4748;
|
||||
margin-right: 6rpx;
|
||||
@ -796,7 +804,7 @@ canvas {
|
||||
border-right: 2rpx dashed #E5CD92;
|
||||
|
||||
.leftUnit {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: 'PingFangSC';
|
||||
font-weight: 400;
|
||||
font-size: 34rpx;
|
||||
color: #BA922F;
|
||||
@ -807,7 +815,7 @@ canvas {
|
||||
}
|
||||
|
||||
.money {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: 'DINAlternate';
|
||||
font-weight: bold;
|
||||
font-size: 48rpx;
|
||||
color: #BA922F;
|
||||
@ -817,7 +825,7 @@ canvas {
|
||||
}
|
||||
|
||||
.condition {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: 'PingFangSC';
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #BA922F;
|
||||
@ -837,7 +845,7 @@ canvas {
|
||||
justify-content: space-between;
|
||||
|
||||
.couponName {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: 'PingFangSC';
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130F05;
|
||||
@ -848,7 +856,7 @@ canvas {
|
||||
|
||||
.timeText {
|
||||
.coupon-date {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: 'PingFangSC';
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #716F69;
|
||||
@ -860,7 +868,7 @@ canvas {
|
||||
|
||||
.useBtn {
|
||||
.useBtnText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: 'PingFangSC';
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
|
||||
@ -285,7 +285,7 @@ export default {
|
||||
})
|
||||
.then(function (result) {
|
||||
uni.showToast({
|
||||
title: result.ResultDesc,
|
||||
title: "登录成功",
|
||||
duration: 1000,
|
||||
icon: "none",
|
||||
});
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div
|
||||
class="top"
|
||||
:style="{
|
||||
height: `${menu.bottom + 8}px`,
|
||||
height: `${loginType === 'min' ? menu.bottom + 8 : ''}px`,
|
||||
paddingTop: `${menu.top}px`,
|
||||
}"
|
||||
>
|
||||
@ -53,7 +53,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="shopListBox">
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="shopListBox"
|
||||
:style="{
|
||||
height: `${
|
||||
loginType === 'min'
|
||||
? `calc(100vh - ${menu.bottom + 8 + 12}px)`
|
||||
: menu.height + 'px'
|
||||
}`,
|
||||
}"
|
||||
>
|
||||
<div v-if="shopList && shopList.length > 0">
|
||||
<div
|
||||
class="shopItemBox"
|
||||
@ -79,7 +89,10 @@
|
||||
</div>
|
||||
<div class="otherDetail">
|
||||
<div class="leftDetail">
|
||||
<span class="mark">{{ item.MERCHANTS_SCORE }}分</span>
|
||||
<span class="mark"
|
||||
>{{ item.MERCHANTS_SCORE
|
||||
}}<span class="unit">分</span></span
|
||||
>
|
||||
<span class="monthSales"
|
||||
>月售{{ item.MONTHLYSALES || "-" }}</span
|
||||
>
|
||||
@ -98,21 +111,43 @@
|
||||
> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="couponList">
|
||||
<div
|
||||
class="couponBox"
|
||||
:style="{
|
||||
right:
|
||||
item.SCANCODE_ORDER === 1 &&
|
||||
item.CouponList &&
|
||||
item.CouponList.length > 0
|
||||
? '160rpx'
|
||||
: '0',
|
||||
}"
|
||||
v-if="item.CouponList && item.CouponList.length > 0"
|
||||
>
|
||||
<view class="couponIconBox">
|
||||
<image
|
||||
class="couponIcon"
|
||||
src="/static/images/home/useCoupon.svg"
|
||||
/>
|
||||
</view>
|
||||
<span class="couponText">优惠券</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 去点餐 -->
|
||||
<!-- <div
|
||||
<div
|
||||
class="goOrder"
|
||||
v-if="item.SCANCODE_ORDER === 1"
|
||||
@click.stop="goBuy(item)"
|
||||
>
|
||||
<image
|
||||
class="orderIcon"
|
||||
src="/static/images/home/goOrderIcon.png"
|
||||
src="/static/images/home/goOrderIcon.svg"
|
||||
/>
|
||||
<span class="goOrderText">去点餐</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 优惠券 -->
|
||||
<div
|
||||
<!-- <div
|
||||
class="couponBox"
|
||||
:style="{
|
||||
right:
|
||||
@ -129,7 +164,7 @@
|
||||
src="/static/images/home/useCoupon.png"
|
||||
/>
|
||||
<span class="couponText">优惠券</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -156,13 +191,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="noDataBox">
|
||||
<div v-else class="noDataBox">
|
||||
<no-data
|
||||
text="暂无可点餐门店"
|
||||
:isShow="!(shopList && shopList.length > 0)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -194,6 +229,7 @@ export default {
|
||||
} else {
|
||||
this.menu = systemInfo.safeArea;
|
||||
}
|
||||
console.log("this.menu", this.menu);
|
||||
|
||||
let currentService = uni.getStorageSync("currentService");
|
||||
console.log("currentService", currentService);
|
||||
@ -228,6 +264,11 @@ export default {
|
||||
currentService,
|
||||
},
|
||||
methods: {
|
||||
handleBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
// 跳转到地图选择服务区
|
||||
goSelectServer() {
|
||||
uni.navigateTo({ url: "/pages/newMap/index/index" });
|
||||
@ -498,11 +539,11 @@ export default {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
.shopImg {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-right: 24rpx;
|
||||
.shopIcon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -525,11 +566,12 @@ export default {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #130f05;
|
||||
text-align: justify;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.titleIcon {
|
||||
@ -547,19 +589,42 @@ export default {
|
||||
justify-content: space-between;
|
||||
.leftDetail {
|
||||
.mark {
|
||||
color: #d45e0e;
|
||||
font-size: 26rpx;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #ba922f;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
.unit {
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #ba922f;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
.monthSales {
|
||||
margin-left: 8px;
|
||||
margin-left: 16rpx;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.perCapita {
|
||||
margin-left: 8px;
|
||||
margin-left: 16rpx;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
.rightDetail {
|
||||
@ -583,6 +648,39 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.couponList {
|
||||
display: inline-block;
|
||||
margin-top: 12rpx;
|
||||
.couponBox {
|
||||
background: #fef0e5;
|
||||
border-radius: 2rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.couponIconBox {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: linear-gradient(180deg, #ffddc0 0%, #ffeada 100%);
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.couponIcon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
.couponText {
|
||||
margin: 0 10rpx;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #fa5825;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goOrder {
|
||||
position: absolute;
|
||||
@ -599,7 +697,7 @@ export default {
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.goOrderText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #ba922f;
|
||||
@ -609,41 +707,41 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.couponBox {
|
||||
padding: 4rpx 6rpx;
|
||||
background: rgba(247, 80, 49, 0.08);
|
||||
border-radius: 2rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
right: 160rpx;
|
||||
top: 0;
|
||||
.couponIcon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.couponText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #f75031;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
// .couponBox {
|
||||
// padding: 4rpx 6rpx;
|
||||
// background: rgba(247, 80, 49, 0.08);
|
||||
// border-radius: 2rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// position: absolute;
|
||||
// right: 160rpx;
|
||||
// top: 0;
|
||||
// .couponIcon {
|
||||
// width: 24rpx;
|
||||
// height: 24rpx;
|
||||
// margin-right: 4rpx;
|
||||
// }
|
||||
// .couponText {
|
||||
// font-family: PingFangSC, PingFang SC;
|
||||
// font-weight: 400;
|
||||
// font-size: 22rpx;
|
||||
// color: #f75031;
|
||||
// line-height: 32rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// white-space: nowrap;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.shopList {
|
||||
width: calc(100% - 120rpx);
|
||||
width: calc(100% - 160rpx);
|
||||
box-sizing: border-box;
|
||||
margin-left: 120rpx;
|
||||
margin-left: 160rpx;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
// margin-top: 12rpx;
|
||||
margin-top: 24rpx;
|
||||
.shopItem {
|
||||
width: 168rpx;
|
||||
margin-right: 16rpx;
|
||||
@ -663,7 +761,7 @@ export default {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #130f05;
|
||||
@ -673,7 +771,7 @@ export default {
|
||||
}
|
||||
.itemPrice {
|
||||
.itemUnit {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
@ -681,7 +779,7 @@ export default {
|
||||
font-style: normal;
|
||||
}
|
||||
.itemPrice {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #130f05;
|
||||
@ -762,7 +860,10 @@ export default {
|
||||
|
||||
.noDataBox {
|
||||
width: 100%;
|
||||
padding-top: 160px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,14 +18,26 @@
|
||||
<!-- paddingBottom: index + 1 === serviceList.length ? '0' : '', -->
|
||||
<view class="leftItem">
|
||||
<view class="leftImgBox">
|
||||
<image
|
||||
<view
|
||||
class="leftImg"
|
||||
:style="{
|
||||
backgroundImage: `url(${
|
||||
item.ImageLits && item.ImageLits.length > 0
|
||||
? item.ImageLits[0]
|
||||
: '/static/images/discovery/defaultIcon.png'
|
||||
})`,
|
||||
}"
|
||||
>
|
||||
</view>
|
||||
|
||||
<!-- <image
|
||||
class="leftImg"
|
||||
:src="
|
||||
item.ImageLits && item.ImageLits.length > 0
|
||||
? item.ImageLits[0]
|
||||
: '/static/images/discovery/defaultIcon.png'
|
||||
"
|
||||
/>
|
||||
/> -->
|
||||
</view>
|
||||
<view class="detailBox">
|
||||
<view class="detailTop">
|
||||
@ -76,12 +88,12 @@
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<view class="chargeBox">
|
||||
<view class="chargeBox" v-if="false">
|
||||
<view class="chargeItem">
|
||||
<view class="itemLeft">
|
||||
<img
|
||||
<image
|
||||
class="imgIcon"
|
||||
src="/static/images/home/lixiangIcon.png"
|
||||
src="https://eshangtech.com/minTestImg/lixiangIcon.png"
|
||||
/>
|
||||
<span class="chargeTypeName">理想</span>
|
||||
</view>
|
||||
@ -93,7 +105,10 @@
|
||||
</view>
|
||||
<view class="chargeItem">
|
||||
<view class="itemLeft">
|
||||
<img class="imgIcon" src="/static/images/home/sunIcon.png" />
|
||||
<image
|
||||
class="imgIcon"
|
||||
src="/static/images/home/sunIcon.png"
|
||||
/>
|
||||
<span class="chargeTypeName">阳光</span>
|
||||
</view>
|
||||
<view class="itemRight">
|
||||
@ -105,9 +120,9 @@
|
||||
|
||||
<view class="chargeItem">
|
||||
<view class="itemLeft">
|
||||
<img
|
||||
<image
|
||||
class="imgIcon"
|
||||
src="/static/images/home/chargeAndReplace.png"
|
||||
src="https://eshangtech.com/minTestImg/chargeAndReplace.png"
|
||||
/>
|
||||
<span class="chargeTypeName">充换电</span>
|
||||
</view>
|
||||
@ -122,11 +137,117 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottomItem">
|
||||
<view class="chargeBox">
|
||||
<!-- 理想 -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<image
|
||||
class="chargeIcon"
|
||||
src="https://eshangtech.com/minTestImg/LXIcon.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue">{{
|
||||
item.LXDetail && item.LXDetail.LXEmpty
|
||||
? item.LXDetail.LXEmpty
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{
|
||||
item.LXDetail && item.LXDetail.LXSum
|
||||
? item.LXDetail.LXSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 蔚来 -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<image
|
||||
class="chargeIcon"
|
||||
src="https://eshangtech.com/minTestImg/WLIcon.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue">{{
|
||||
item.WLDetail && item.WLDetail.WLEmpty
|
||||
? item.WLDetail.WLEmpty
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{
|
||||
item.WLDetail && item.WLDetail.WLSum
|
||||
? item.WLDetail.WLSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 时代新能源(阳光) -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<image
|
||||
class="chargeIcon"
|
||||
src="/static/images/home/sunIcon.svg"
|
||||
/>
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue">{{
|
||||
item.SunDetail && item.SunDetail.SunEmpty
|
||||
? item.SunDetail.SunEmpty
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{
|
||||
item.SunDetail && item.SunDetail.SunSum
|
||||
? item.SunDetail.SunSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 国网(充换电) -->
|
||||
<view class="chargeItem">
|
||||
<view class="chargeIconBox">
|
||||
<image
|
||||
class="chargeIcon"
|
||||
src="https://eshangtech.com/minTestImg/stateGridIcon.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="chargeInfo">
|
||||
<span class="empty">空</span>
|
||||
<span class="emptyValue">{{
|
||||
item.chargeAndReplaceDetail &&
|
||||
item.chargeAndReplaceDetail.chargeAndReplace
|
||||
? item.chargeAndReplaceDetail.chargeAndReplace
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{
|
||||
item.chargeAndReplaceDetail &&
|
||||
item.chargeAndReplaceDetail.chargeAndReplaceSum
|
||||
? item.chargeAndReplaceDetail.chargeAndReplaceSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<div class="pageBottom" :style="{ height: 60 + bottomSafeArea + 'px' }">
|
||||
<div class="textBox" @click="handleScan">
|
||||
<img class="codeIcon" src="/static/images/home/scanCodeIcon.svg" />
|
||||
<image class="codeIcon" src="/static/images/home/scanCodeIcon.svg" />
|
||||
<span class="codeText">扫码充电</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -141,7 +262,7 @@
|
||||
<div class="popupDetailBox">
|
||||
<div class="popupTitle">
|
||||
<div class="closeIcon" @click="handleClosePopup">
|
||||
<img class="img" src="/static/images/home/closeIcon.svg" />
|
||||
<image class="img" src="/static/images/home/closeIcon.svg" />
|
||||
</div>
|
||||
<div clsas="title">电桩详情</div>
|
||||
<div class="closeIcon"></div>
|
||||
@ -183,7 +304,7 @@
|
||||
class="leftItem"
|
||||
:style="{
|
||||
backgroundImage: `url(${
|
||||
tem.Status === 0 || item.Status === 255
|
||||
item.Status === 0 || item.Status === 255
|
||||
? 'https://eshangtech.com/minTestImg/offGrid.svg'
|
||||
: item.Power >= 240
|
||||
? 'https://eshangtech.com/minTestImg/overfilling.svg'
|
||||
@ -343,7 +464,7 @@
|
||||
: '',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
<image
|
||||
v-if="item.Status === 3"
|
||||
class="chargeIcon"
|
||||
:src="
|
||||
@ -393,6 +514,7 @@ export default {
|
||||
serviceName: [], // 服务区名字数组
|
||||
chargeDetailList: [], // 悬浮框里面的详情数据
|
||||
nowCurrentObj: {}, // 当前点击选中的悬浮框的对象
|
||||
SERVERPART_TARGETOBJ: {},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@ -422,10 +544,35 @@ export default {
|
||||
}
|
||||
console.log("this.seatInfo", this.seatInfo);
|
||||
|
||||
let SERVERPART_TARGET = uni.getStorageSync("SERVERPART_TARGET");
|
||||
if (SERVERPART_TARGET) {
|
||||
this.SERVERPART_TARGETOBJ = JSON.parse(SERVERPART_TARGET);
|
||||
} else {
|
||||
// 拿到枚举
|
||||
this.handleSERVERPART_TARGETOBJ();
|
||||
}
|
||||
|
||||
// 最近的三个服务区数据
|
||||
this.handleGetThreeList();
|
||||
},
|
||||
methods: {
|
||||
// 解服务区的一个枚举
|
||||
async handleSERVERPART_TARGETOBJ() {
|
||||
let SERVERPART_TARGET = await this.$api.$get(
|
||||
"/EShangApiMain/FrameWork/GetFieldEnumTree",
|
||||
{ FieldExplainField: "SERVERPART_TARGET" }
|
||||
);
|
||||
let list = this.$utils.wrapTreeNode(SERVERPART_TARGET.Result_Data.List);
|
||||
let obj = {};
|
||||
if (list && list.length > 0) {
|
||||
list.forEach((item) => {
|
||||
obj[String(item.value)] = item.label;
|
||||
});
|
||||
}
|
||||
console.log("obj", obj);
|
||||
uni.setStorageSync("SERVERPART_TARGET", JSON.stringify(obj));
|
||||
this.SERVERPART_TARGETOBJ = obj;
|
||||
},
|
||||
handleChangeSelectPopup(value) {
|
||||
this.selectPopup = value;
|
||||
if (value === 1) {
|
||||
@ -435,19 +582,58 @@ export default {
|
||||
}
|
||||
},
|
||||
handleToMap(obj) {
|
||||
uni.openLocation({
|
||||
latitude: obj.latitude ? obj.latitude * 1 : obj.SERVERPART_Y * 1,
|
||||
longitude: obj.longitude ? obj.longitude * 1 : obj.SERVERPART_X * 1,
|
||||
scale: 16, // 缩放比例
|
||||
name: obj.SERVERPART_NAME,
|
||||
// address: "", // 这个可能会影响地图的定位,所以可以选择不填
|
||||
success(data) {
|
||||
console.log(data);
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
if (this.loginType === "min") {
|
||||
uni.openLocation({
|
||||
latitude: obj.latitude ? obj.latitude * 1 : obj.SERVERPART_Y * 1,
|
||||
longitude: obj.longitude ? obj.longitude * 1 : obj.SERVERPART_X * 1,
|
||||
scale: 16, // 缩放比例
|
||||
name: obj.SERVERPART_NAME,
|
||||
// address: "", // 这个可能会影响地图的定位,所以可以选择不填
|
||||
success(data) {
|
||||
console.log(data);
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const addModule = uni.requireNativePlugin("AMapModule");
|
||||
addModule.auth(
|
||||
"d773aa156f8ca2160cfb06d5f117dacd",
|
||||
(suc) => {
|
||||
addModule.reg(
|
||||
(suc) => {
|
||||
addModule.navfrom(
|
||||
this.seatInfo.latitude,
|
||||
this.seatInfo.longitude,
|
||||
"我的位置",
|
||||
obj.latitude ? obj.latitude : obj.SERVERPART_Y,
|
||||
obj.longitude ? obj.longitude : obj.SERVERPART_X,
|
||||
obj.SERVERPART_NAME,
|
||||
(suc) => {
|
||||
console.log(suc);
|
||||
},
|
||||
(err) => {
|
||||
console.log(err);
|
||||
}
|
||||
);
|
||||
},
|
||||
(err) => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
(err) => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
// 拿到最近的三个服务区数据
|
||||
async handleGetThreeList() {
|
||||
@ -460,6 +646,7 @@ export default {
|
||||
longitude: this.seatInfo.longitude,
|
||||
latitude: this.seatInfo.latitude,
|
||||
Serverpart_ID: "416,417,418",
|
||||
ShowService: true,
|
||||
PageIndex: 1,
|
||||
PageSize: 99, // 以后数据补齐 这个值变为3
|
||||
};
|
||||
@ -477,14 +664,58 @@ export default {
|
||||
let res = [];
|
||||
let nameList = [];
|
||||
let service = [418, 416, 417];
|
||||
|
||||
list.forEach((item) => {
|
||||
if (service.indexOf(item.SERVERPART_ID) !== -1) {
|
||||
let LXSum = 0; // 理想
|
||||
let WLSum = 0; // 蔚来
|
||||
let SunSum = 0; // 新能源
|
||||
let chargeAndReplaceSum = 0; // 国网
|
||||
|
||||
if (item.RegionInfo && item.RegionInfo.length > 0) {
|
||||
item.RegionInfo.forEach((subItem) => {
|
||||
chargeAndReplaceSum += subItem.STATEGRIDCHARGE; // 国网
|
||||
SunSum += subItem.GACENERGYCHARGE; // 新能源
|
||||
WLSum += subItem.OTHERCHAGRE; // 蔚来
|
||||
LXSum += subItem.LIAUTOCHARGE; // 理想
|
||||
});
|
||||
}
|
||||
|
||||
// 理想的随机百分比
|
||||
let LXRate = this.handleGetRandomData(0, 60);
|
||||
// 蔚来的随机百分比
|
||||
let WLRate = this.handleGetRandomData(0, 60);
|
||||
// 阳光的随机百分比
|
||||
let SunRate = this.handleGetRandomData(0, 60);
|
||||
// 充换电的随机百分比
|
||||
let chargeAndReplaceRate = this.handleGetRandomData(0, 60);
|
||||
item.LXDetail = {
|
||||
LXEmpty: Math.floor(LXSum * (LXRate / 100)),
|
||||
LXSum: LXSum,
|
||||
};
|
||||
item.WLDetail = {
|
||||
WLEmpty: Math.floor(WLSum * (WLRate / 100)),
|
||||
WLSum: WLSum,
|
||||
};
|
||||
item.SunDetail = {
|
||||
SunEmpty: Math.floor(SunSum * (SunRate / 100)),
|
||||
SunSum: SunSum,
|
||||
};
|
||||
item.chargeAndReplaceDetail = {
|
||||
chargeAndReplace: Math.floor(
|
||||
chargeAndReplaceSum * (chargeAndReplaceRate / 100)
|
||||
),
|
||||
chargeAndReplaceSum: chargeAndReplaceSum,
|
||||
};
|
||||
res.push(item);
|
||||
nameList.push(item.SERVERPART_NAME.split("服务区")[0]);
|
||||
}
|
||||
});
|
||||
this.serviceName = nameList;
|
||||
this.serviceList = res;
|
||||
|
||||
console.log("this.serviceList", this.serviceList);
|
||||
|
||||
await this.handleGetChargeData();
|
||||
// await this.handleGetSunChargeData();
|
||||
} else {
|
||||
@ -492,6 +723,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 生成随机数
|
||||
handleGetRandomData(max, min) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
},
|
||||
// 拿到充电的理想数据
|
||||
async handleGetChargeData() {
|
||||
uni.showLoading({
|
||||
@ -717,17 +952,17 @@ export default {
|
||||
// });
|
||||
// }
|
||||
|
||||
const stationFee = await this.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_equip_business_policy",
|
||||
data: JSON.stringify({
|
||||
ConnectorID: "81003879",
|
||||
EquipBizSeq: "78109626",
|
||||
}),
|
||||
id: 0,
|
||||
seq: "003",
|
||||
token: token,
|
||||
});
|
||||
console.log("stationFee", stationFee);
|
||||
// const stationFee = await this.$testApi.$post("/send", {
|
||||
// url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_equip_business_policy",
|
||||
// data: JSON.stringify({
|
||||
// ConnectorID: "81003879",
|
||||
// EquipBizSeq: "78109626",
|
||||
// }),
|
||||
// id: 0,
|
||||
// seq: "003",
|
||||
// token: token,
|
||||
// });
|
||||
// console.log("stationFee", stationFee);
|
||||
|
||||
uni.hideLoading();
|
||||
},
|
||||
@ -853,8 +1088,8 @@ export default {
|
||||
width: 100%;
|
||||
padding: 24rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
border-bottom: 1px solid #f5f6f7;
|
||||
background: #ffffff;
|
||||
@ -871,10 +1106,19 @@ export default {
|
||||
overflow: hidden;
|
||||
border-radius: 6rpx;
|
||||
margin-right: 20rpx;
|
||||
background: #f5f6f7;
|
||||
.leftImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
background-position: 50% 50%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
// .leftImg {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
.detailBox {
|
||||
width: calc(100% - 164rpx);
|
||||
@ -1058,116 +1302,175 @@ export default {
|
||||
// }
|
||||
}
|
||||
|
||||
.chargeBox {
|
||||
width: 100%;
|
||||
margin-top: 8rpx;
|
||||
.chargeItem {
|
||||
width: 100%;
|
||||
// .chargeBox {
|
||||
// width: 100%;
|
||||
// margin-top: 8rpx;
|
||||
// .chargeItem {
|
||||
// width: 100%;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-between;
|
||||
// margin-bottom: 12rpx;
|
||||
// .itemLeft {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// .imgIcon {
|
||||
// width: 40rpx;
|
||||
// height: 40rpx;
|
||||
// margin-right: 12rpx;
|
||||
// }
|
||||
// .chargeTypeName {
|
||||
// font-family: PingFangSC, PingFang SC;
|
||||
// font-weight: 400;
|
||||
// font-size: 28rpx;
|
||||
// color: #130f05;
|
||||
// line-height: 40rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// }
|
||||
// }
|
||||
// .itemRight {
|
||||
// background: #f5f6f7;
|
||||
// border-radius: 4rpx;
|
||||
// padding: 4rpx 12rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// .emptyText {
|
||||
// font-family: PingFangSC, PingFang SC;
|
||||
// font-weight: 400;
|
||||
// font-size: 24rpx;
|
||||
// color: #130f05;
|
||||
// line-height: 32rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// margin-right: 4rpx;
|
||||
// }
|
||||
// .use {
|
||||
// font-family: DINAlternate, DINAlternate;
|
||||
// font-weight: bold;
|
||||
// font-size: 28rpx;
|
||||
// color: #130f05;
|
||||
// line-height: 32rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// margin-right: 4rpx;
|
||||
// }
|
||||
// .sum {
|
||||
// font-family: DINAlternate, DINAlternate;
|
||||
// font-weight: bold;
|
||||
// font-size: 28rpx;
|
||||
// color: #716f69;
|
||||
// line-height: 32rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// }
|
||||
// }
|
||||
// // width: 100%;
|
||||
// // padding: 8rpx;
|
||||
// // background: #f6f6f6;
|
||||
// // display: flex;
|
||||
// // align-items: center;
|
||||
// // justify-content: space-between;
|
||||
// // border-radius: 8rpx;
|
||||
// // box-sizing: border-box;
|
||||
// // padding: 0 16rpx;
|
||||
// // margin-bottom: 14rpx;
|
||||
// // .chargeItemLabel {
|
||||
// // font-family: PingFangSC, PingFang SC;
|
||||
// // font-weight: 400;
|
||||
// // font-size: 24rpx;
|
||||
// // color: #130f05;
|
||||
// // line-height: 40rpx;
|
||||
// // text-align: left;
|
||||
// // font-style: normal;
|
||||
// // }
|
||||
// // .chargeItemValue {
|
||||
// // font-family: PingFangSC, PingFang SC;
|
||||
// // font-weight: 400;
|
||||
// // font-size: 24rpx;
|
||||
// // color: #130f05;
|
||||
// // line-height: 36rpx;
|
||||
// // text-align: left;
|
||||
// // font-style: normal;
|
||||
// // .empty {
|
||||
// // font-family: DINAlternate, DINAlternate;
|
||||
// // font-weight: bold;
|
||||
// // font-size: 24rpx;
|
||||
// // color: #130f05;
|
||||
// // line-height: 36rpx;
|
||||
// // text-align: left;
|
||||
// // font-style: normal;
|
||||
// // margin: 0 4rpx;
|
||||
// // }
|
||||
// // .sum {
|
||||
// // font-family: DINAlternate, DINAlternate;
|
||||
// // font-weight: bold;
|
||||
// // font-size: 24rpx;
|
||||
// // color: #716f69;
|
||||
// // line-height: 36rpx;
|
||||
// // text-align: left;
|
||||
// // font-style: normal;
|
||||
// // }
|
||||
// // }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
.bottomItem {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 8rpx 0 20rpx;
|
||||
margin-top: 24rpx;
|
||||
.chargeBox {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.chargeItem {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.chargeIconBox {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
.chargeIcon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.chargeInfo {
|
||||
margin-top: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12rpx;
|
||||
.itemLeft {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.imgIcon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.chargeTypeName {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130f05;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.empty {
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.itemRight {
|
||||
background: #f5f6f7;
|
||||
border-radius: 4rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.emptyText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.use {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #130f05;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.sum {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #716f69;
|
||||
line-height: 32rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.emptyValue {
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.sum {
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
// width: 100%;
|
||||
// padding: 8rpx;
|
||||
// background: #f6f6f6;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-between;
|
||||
// border-radius: 8rpx;
|
||||
// box-sizing: border-box;
|
||||
// padding: 0 16rpx;
|
||||
// margin-bottom: 14rpx;
|
||||
// .chargeItemLabel {
|
||||
// font-family: PingFangSC, PingFang SC;
|
||||
// font-weight: 400;
|
||||
// font-size: 24rpx;
|
||||
// color: #130f05;
|
||||
// line-height: 40rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// }
|
||||
// .chargeItemValue {
|
||||
// font-family: PingFangSC, PingFang SC;
|
||||
// font-weight: 400;
|
||||
// font-size: 24rpx;
|
||||
// color: #130f05;
|
||||
// line-height: 36rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// .empty {
|
||||
// font-family: DINAlternate, DINAlternate;
|
||||
// font-weight: bold;
|
||||
// font-size: 24rpx;
|
||||
// color: #130f05;
|
||||
// line-height: 36rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// margin: 0 4rpx;
|
||||
// }
|
||||
// .sum {
|
||||
// font-family: DINAlternate, DINAlternate;
|
||||
// font-weight: bold;
|
||||
// font-size: 24rpx;
|
||||
// color: #716f69;
|
||||
// line-height: 36rpx;
|
||||
// text-align: left;
|
||||
// font-style: normal;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<view class="topBox" :style="{ height: menu.bottom + 14 + 'px' }">
|
||||
<view
|
||||
class="topContent"
|
||||
:style="{ paddingTop: menu.top + 'px', height: menu.height + 'px' }"
|
||||
>
|
||||
<view
|
||||
class="topBox"
|
||||
:style="{
|
||||
height: `${loginType === 'min' ? menu.bottom + 8 : ''}px`,
|
||||
paddingTop: `${menu.top}px`,
|
||||
}"
|
||||
>
|
||||
<view class="topContent">
|
||||
<view class="backIconBox" @click="handleBack">
|
||||
<image
|
||||
class="backIcon"
|
||||
@ -22,7 +25,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content" :style="{ paddingTop: menu.bottom + 14 + 'px' }">
|
||||
<view class="content">
|
||||
<!-- 服务区照片 服务区距离名字信息 -->
|
||||
<view class="serviceDetail">
|
||||
<view class="detailTop">
|
||||
@ -38,7 +41,6 @@
|
||||
indicator-active-color="#272625"
|
||||
autoplay
|
||||
interval="3000"
|
||||
:current="pageMsg.current"
|
||||
style="width: 100%; height: 100%"
|
||||
>
|
||||
<swiper-item
|
||||
@ -138,29 +140,70 @@
|
||||
<view class="itemLeft">
|
||||
<img
|
||||
class="imgIcon"
|
||||
src="/static/images/home/lixiangIcon.png"
|
||||
src="https://eshangtech.com/minTestImg/LXIcon.png"
|
||||
/>
|
||||
<span class="chargeTypeName">理想</span>
|
||||
</view>
|
||||
<view class="itemRight">
|
||||
<span class="emptyText">空</span>
|
||||
<span class="use">{{ item.chargeObj.LXHave || "0" }}</span>
|
||||
<span class="use">{{
|
||||
detailInfo.LXDetail && detailInfo.LXDetail.LXEmpty
|
||||
? detailInfo.LXDetail.LXEmpty
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{ detailInfo.sumDetail.LIAUTOCHARGE || "0" }}</span
|
||||
>/{{
|
||||
detailInfo.LXDetail && detailInfo.LXDetail.LXSum
|
||||
? detailInfo.LXDetail.LXSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="chargeItem">
|
||||
<view class="itemLeft">
|
||||
<img class="imgIcon" src="/static/images/home/sunIcon.png" />
|
||||
<span class="chargeTypeName">阳光</span>
|
||||
<img
|
||||
class="imgIcon"
|
||||
src="https://eshangtech.com/minTestImg/WLIcon.png"
|
||||
/>
|
||||
<span class="chargeTypeName">蔚来</span>
|
||||
</view>
|
||||
<view class="itemRight">
|
||||
<span class="emptyText">空</span>
|
||||
<span class="use">{{ item.chargeObj.LXHave || "0" }}</span>
|
||||
<span class="use">{{
|
||||
detailInfo.WLDetail && detailInfo.WLDetail.WLEmpty
|
||||
? detailInfo.WLDetail.WLEmpty
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{ detailInfo.sumDetail.STATEGRIDCHARGE || "0" }}</span
|
||||
>/{{
|
||||
detailInfo.WLDetail && detailInfo.WLDetail.WLSum
|
||||
? detailInfo.WLDetail.WLSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="chargeItem">
|
||||
<view class="itemLeft">
|
||||
<img class="imgIcon" src="/static/images/home/sunIcon.svg" />
|
||||
<span class="chargeTypeName">新能源</span>
|
||||
</view>
|
||||
<view class="itemRight">
|
||||
<span class="emptyText">空</span>
|
||||
<span class="use">{{
|
||||
detailInfo.SunDetail && detailInfo.SunDetail.SunEmpty
|
||||
? detailInfo.SunDetail.SunEmpty
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{
|
||||
detailInfo.SunDetail && detailInfo.SunDetail.SunSum
|
||||
? detailInfo.SunDetail.SunSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
@ -169,15 +212,25 @@
|
||||
<view class="itemLeft">
|
||||
<img
|
||||
class="imgIcon"
|
||||
src="/static/images/home/chargeAndReplace.png"
|
||||
src="https://eshangtech.com/minTestImg/stateGridIcon.png"
|
||||
/>
|
||||
<span class="chargeTypeName">充换电</span>
|
||||
<span class="chargeTypeName">国网</span>
|
||||
</view>
|
||||
<view class="itemRight">
|
||||
<span class="emptyText">空</span>
|
||||
<span class="use">{{ item.chargeObj.LXHave || "0" }}</span>
|
||||
<span class="use">{{
|
||||
detailInfo.chargeAndReplaceDetail &&
|
||||
detailInfo.chargeAndReplaceDetail.chargeAndReplace
|
||||
? detailInfo.chargeAndReplaceDetail.chargeAndReplace
|
||||
: "0"
|
||||
}}</span>
|
||||
<span class="sum"
|
||||
>/{{ detailInfo.sumDetail.GACENERGYCHARGE || "0" }}</span
|
||||
>/{{
|
||||
detailInfo.chargeAndReplaceDetail &&
|
||||
detailInfo.chargeAndReplaceDetail.chargeAndReplaceSum
|
||||
? detailInfo.chargeAndReplaceDetail.chargeAndReplaceSum
|
||||
: "0"
|
||||
}}</span
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
@ -1008,10 +1061,18 @@ export default {
|
||||
have: 0,
|
||||
use: 0,
|
||||
}, // 充电桩数据
|
||||
loginType: "",
|
||||
};
|
||||
},
|
||||
async onLoad(query) {
|
||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
let type = uni.getStorageSync("loginType");
|
||||
this.loginType = type;
|
||||
if (type === "min") {
|
||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||
} else {
|
||||
this.menu = systemInfo.safeArea;
|
||||
}
|
||||
console.log("query", query);
|
||||
if (query.id) {
|
||||
this.serverpart = query.id;
|
||||
@ -1116,6 +1177,12 @@ export default {
|
||||
UREA_COUNT: 0, // 尿素
|
||||
VEHICLEWATERFILLING: 0, // 加水
|
||||
};
|
||||
|
||||
let LXSum = 0; // 理想
|
||||
let WLSum = 0; // 蔚来
|
||||
let SunSum = 0; // 新能源
|
||||
let chargeAndReplaceSum = 0; // 国网
|
||||
|
||||
console.log("res.RegionInfo", obj.RegionInfo);
|
||||
if (obj.RegionInfo && obj.RegionInfo.length > 0) {
|
||||
obj.RegionInfo.forEach((item) => {
|
||||
@ -1163,31 +1230,203 @@ export default {
|
||||
sumObj.REPAIR_TEL = item.REPAIR_TEL;
|
||||
}
|
||||
sumObj.SHOWERROOM = item.SHOWERROOM;
|
||||
|
||||
chargeAndReplaceSum += item.STATEGRIDCHARGE; // 国网
|
||||
SunSum += item.GACENERGYCHARGE; // 新能源
|
||||
WLSum += item.OTHERCHAGRE; // 蔚来
|
||||
LXSum += item.LIAUTOCHARGE; // 理想
|
||||
});
|
||||
}
|
||||
|
||||
// 理想的随机百分比
|
||||
let LXRate = this.handleGetRandomData(0, 60);
|
||||
// 蔚来的随机百分比
|
||||
let WLRate = this.handleGetRandomData(0, 60);
|
||||
// 阳光的随机百分比
|
||||
let SunRate = this.handleGetRandomData(0, 60);
|
||||
// 充换电的随机百分比
|
||||
let chargeAndReplaceRate = this.handleGetRandomData(0, 60);
|
||||
|
||||
sumObj.LIAUTOCHARGE = Math.floor(sumObj.LIAUTOCHARGE * (LXRate / 100));
|
||||
sumObj.STATEGRIDCHARGE = Math.floor(sumObj.STATEGRIDCHARGE * (SunRate / 100));
|
||||
sumObj.GACENERGYCHARGE = Math.floor(
|
||||
sumObj.GACENERGYCHARGE * (chargeAndReplaceRate / 100)
|
||||
);
|
||||
obj.LXDetail = {
|
||||
LXEmpty: Math.floor(LXSum * (LXRate / 100)),
|
||||
LXSum: LXSum,
|
||||
};
|
||||
obj.WLDetail = {
|
||||
WLEmpty: Math.floor(WLSum * (WLRate / 100)),
|
||||
WLSum: WLSum,
|
||||
};
|
||||
obj.SunDetail = {
|
||||
SunEmpty: Math.floor(SunSum * (SunRate / 100)),
|
||||
SunSum: SunSum,
|
||||
};
|
||||
obj.chargeAndReplaceDetail = {
|
||||
chargeAndReplace: Math.floor(
|
||||
chargeAndReplaceSum * (chargeAndReplaceRate / 100)
|
||||
),
|
||||
chargeAndReplaceSum: chargeAndReplaceSum,
|
||||
};
|
||||
|
||||
obj.sumDetail = sumObj;
|
||||
this.detailInfo = obj;
|
||||
console.log("this.detailInfo", this.detailInfo);
|
||||
let sortName = this.detailInfo.SERVERPART_NAME.split("服务区")[0];
|
||||
if (["新桥", "丰乐", "肥东"].indexOf(sortName) !== -1) {
|
||||
// 调用理想的数据
|
||||
this.handleGetChargeData(sortName);
|
||||
}
|
||||
|
||||
uni.hideLoading();
|
||||
},
|
||||
// 生成随机数
|
||||
handleGetRandomData(max, min) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
},
|
||||
// 拿到充电的理想数据
|
||||
async handleGetChargeData(name) {
|
||||
uni.showLoading({
|
||||
title: "查询理想设备信息...",
|
||||
});
|
||||
|
||||
const LiOperatorSecret = "bGMyYwJFl17BqwD3";
|
||||
const LiOperCode = "MA7EBGWBX";
|
||||
const LiSigSecret = "V7I6yvHvEk8STt0P";
|
||||
const LiDataSecret = "P2S3WjoLv3rqL0hn";
|
||||
const LiIV = "ZRlwcrx7k63ihzXF";
|
||||
|
||||
const OperatorID = "78109626X"; // 组织机构代码(OperatorID)
|
||||
const OperatorSecret = "Xh2vLq1Pz9zF7wK3"; // Xh2vLq1Pz9zF7wK3 运营商秘钥(OperatorSecret)
|
||||
const SigSecret = "bT8sWn2Aq0Jv6GvD"; // bT8sWn2Aq0Jv6GvD 签名秘钥(SigSecret)
|
||||
const DataSecret = "fK7YzAq1R8Vp9hL0"; // fK7YzAq1R8Vp9hL0 数据加密秘钥(DataSecret)
|
||||
const DataSecretIV = "z3XnWl8FQ2pTm5Ba"; // z3XnWl8FQ2pTm5Ba 初始化向量(DataSecretIV)
|
||||
|
||||
let tokenData = await this.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_token",
|
||||
|
||||
data: JSON.stringify({
|
||||
OperatorID: OperatorID,
|
||||
OperatorSecret: LiOperatorSecret,
|
||||
}),
|
||||
id: 0,
|
||||
seq: "001",
|
||||
token: "",
|
||||
});
|
||||
console.log("tokenData", tokenData);
|
||||
// token的实际值
|
||||
let token = tokenData.Data.AccessToken;
|
||||
|
||||
// 拿到所有站点的数据
|
||||
const allStationList = await this.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_stations_info",
|
||||
data: JSON.stringify({
|
||||
PageNo: 1,
|
||||
PageSize: 999,
|
||||
}),
|
||||
id: 0,
|
||||
seq: "002",
|
||||
token: token,
|
||||
});
|
||||
let stationList = allStationList.Data.StationInfos;
|
||||
console.log("stationList", stationList);
|
||||
|
||||
let newStationList = [];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach((item) => {
|
||||
if (item.Address) {
|
||||
if (item.Address.indexOf(name) !== -1) {
|
||||
newStationList.push(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 这段是和自己最近的三个服务区的 理想充电筛出来的数据
|
||||
console.log("newStationList", newStationList);
|
||||
|
||||
let stationIds = [];
|
||||
// 创建吧id当key的对象
|
||||
let stationObj = {};
|
||||
// 拿到充电站的id数组 去查里面的充电枪详情
|
||||
if (newStationList && newStationList.length > 0) {
|
||||
newStationList.forEach((item) => {
|
||||
stationIds.push(item.StationID);
|
||||
stationObj[item.StationID] = item;
|
||||
});
|
||||
}
|
||||
|
||||
// 查询具体状态
|
||||
if (stationIds && stationIds.length > 0) {
|
||||
const stationInfo = await this.$testApi.$post("/send", {
|
||||
url: "https://openapi.chehejia.com/lcp-inter-evio-service/evcs/v1/evio/query_station_status",
|
||||
data: JSON.stringify({
|
||||
StationIDs: stationIds,
|
||||
}),
|
||||
id: 0,
|
||||
seq: "003",
|
||||
token: token,
|
||||
});
|
||||
let statusList = stationInfo.Data.StationStatusInfos;
|
||||
console.log("statusList", statusList);
|
||||
if (statusList && statusList.length > 0) {
|
||||
statusList.forEach((item) => {
|
||||
if (stationObj[item.StationID]) {
|
||||
stationObj[item.StationID].statusList = item.ConnectorStatusInfos;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log("stationObj", stationObj);
|
||||
|
||||
// 带有状态的充电站列表格式
|
||||
let haveStationList = [];
|
||||
if (stationObj) {
|
||||
for (let key in stationObj) {
|
||||
haveStationList.push(stationObj[key]);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("haveStationList", haveStationList);
|
||||
|
||||
let LXCharge = [];
|
||||
let LXInfoList = [];
|
||||
if (haveStationList && haveStationList.length > 0) {
|
||||
haveStationList.forEach((subItem) => {
|
||||
if (subItem.Address.indexOf(name) !== -1) {
|
||||
LXCharge.push(...subItem.statusList);
|
||||
if (subItem.EquipmentInfos && subItem.EquipmentInfos.length > 0) {
|
||||
subItem.EquipmentInfos.forEach((thirdItem) => {
|
||||
if (
|
||||
thirdItem.ConnectorInfos &&
|
||||
thirdItem.ConnectorInfos.length > 0
|
||||
) {
|
||||
thirdItem.ConnectorInfos.forEach((fourthItem) => {
|
||||
LXInfoList.push(fourthItem);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// 空多少个
|
||||
let LXEmpty = 0;
|
||||
// 一共多少个
|
||||
let LXSum = 0;
|
||||
|
||||
if (LXCharge && LXCharge.length > 0) {
|
||||
LXCharge.forEach((subItem) => {
|
||||
if (subItem.Status !== 3) {
|
||||
LXEmpty += 1;
|
||||
}
|
||||
LXSum += 1;
|
||||
});
|
||||
}
|
||||
|
||||
this.detailInfo.LXDetail = {
|
||||
LXEmpty: LXEmpty,
|
||||
LXSum: LXSum,
|
||||
};
|
||||
}
|
||||
uni.hideLoading();
|
||||
},
|
||||
// 跳转到选择服务区
|
||||
goSelectServer() {
|
||||
uni.navigateTo({ url: "/pages/newMap/index/index" });
|
||||
@ -1269,13 +1508,9 @@ export default {
|
||||
|
||||
.topBox {
|
||||
width: 100%;
|
||||
padding: 0 32rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32rpx;
|
||||
position: fixed;
|
||||
background: #f5f5f5;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
background: #fff;
|
||||
|
||||
.topContent {
|
||||
display: flex;
|
||||
@ -1329,6 +1564,7 @@ export default {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32rpx 48rpx;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.serviceDetail {
|
||||
width: 100%;
|
||||
@ -1577,7 +1813,7 @@ export default {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.chargeTypeName {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130f05;
|
||||
@ -1593,29 +1829,31 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.emptyText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
line-height: 32rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.use {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-size: 28rpx;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #130f05;
|
||||
line-height: 32rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.sum {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-size: 28rpx;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #716f69;
|
||||
line-height: 32rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@ -193,7 +193,9 @@
|
||||
|
||||
<div class="go-pay">
|
||||
<div class="pay-left">
|
||||
还需支付<span class="pay-price">¥{{ orderAmount }}</span>
|
||||
还需支付<span class="pay-price"
|
||||
><span style="font-size: 28rpx">¥</span>{{ orderAmount }}</span
|
||||
>
|
||||
</div>
|
||||
<div class="pay-right" @click="goPayMent">去支付</div>
|
||||
</div>
|
||||
@ -308,7 +310,7 @@ export default {
|
||||
doorId: "",
|
||||
storeId: "", // 门店id
|
||||
active: 0,
|
||||
radio: 30,
|
||||
radio: 0,
|
||||
radio2: "",
|
||||
radioType: 10,
|
||||
type: 2000, // 判断预约还是堂食
|
||||
@ -419,6 +421,11 @@ export default {
|
||||
// 确认支付
|
||||
async handleRealGoPay() {
|
||||
if (this.loginType === "android") {
|
||||
uni.showToast({
|
||||
title: "备案上架后,才可使用...",
|
||||
icon: "none",
|
||||
});
|
||||
|
||||
if (this.payType === 1) {
|
||||
// uni.showModal({
|
||||
// title: "确认跳转支付宝?",
|
||||
@ -846,6 +853,14 @@ export default {
|
||||
// 去支付
|
||||
goPayMent() {
|
||||
let _this = this;
|
||||
if (!this.radio) {
|
||||
uni.showToast({
|
||||
title: "请选择就餐时间",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.type === 2000) {
|
||||
if (this.radio === "自定义") {
|
||||
uni.showToast({
|
||||
@ -1163,6 +1178,7 @@ bodyColor = #CAA97F;
|
||||
}
|
||||
|
||||
.time-title {
|
||||
font-family: 'PingFangSC';
|
||||
// padding 0 24rpx
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
|
||||
@ -377,7 +377,7 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
<style lang="less" scoped>
|
||||
.topEvaluation {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
@ -386,10 +386,10 @@ export default {
|
||||
padding: 16rpx 32rpx 24rpx;
|
||||
|
||||
.evaluationMark {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 72rpx;
|
||||
color: #BA922F;
|
||||
color: #ba922f;
|
||||
line-height: 84rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
@ -398,12 +398,12 @@ export default {
|
||||
|
||||
.evaluationRight {
|
||||
.markTitle {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716F69;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
@ -421,10 +421,10 @@ export default {
|
||||
padding: 0 32rpx;
|
||||
|
||||
.evaluationTitle {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130F05;
|
||||
color: #130f05;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
@ -432,10 +432,10 @@ export default {
|
||||
|
||||
.sumText {
|
||||
margin-left: 8rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #716F69;
|
||||
color: #716f69;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
@ -444,7 +444,7 @@ export default {
|
||||
|
||||
.evaluationItem {
|
||||
width: 100%;
|
||||
margin-bottom: 16rpx;
|
||||
margin-bottom: 48rpx;
|
||||
|
||||
.itemTop {
|
||||
width: 100%;
|
||||
@ -467,10 +467,10 @@ export default {
|
||||
margin-left: 16rpx;
|
||||
|
||||
.userTitle {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130F05;
|
||||
color: #130f05;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
@ -481,7 +481,7 @@ export default {
|
||||
.vip-level {
|
||||
font-size: 20rpx;
|
||||
background: #333;
|
||||
color: #EEDCB6;
|
||||
color: #eedcb6;
|
||||
padding: 4rpx 6rpx;
|
||||
margin-left: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
@ -491,10 +491,11 @@ export default {
|
||||
|
||||
// padding-left 24rpx
|
||||
.vip-level:before {
|
||||
content: '';
|
||||
content: "";
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background: url('https://eshangtech.com/ShopICO/vip-ico.png') no-repeat center; // eshangtech.com/ShopICO/vip-ico.png) no-repeat center
|
||||
background: url("https://eshangtech.com/ShopICO/vip-ico.png")
|
||||
no-repeat center; // eshangtech.com/ShopICO/vip-ico.png) no-repeat center
|
||||
background-size: contain;
|
||||
position: absolute;
|
||||
left: 4rpx;
|
||||
@ -503,10 +504,10 @@ export default {
|
||||
}
|
||||
|
||||
.timeText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716F69;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
@ -519,10 +520,10 @@ export default {
|
||||
align-items: center;
|
||||
|
||||
.rateText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716F69;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
@ -531,10 +532,10 @@ export default {
|
||||
}
|
||||
|
||||
.evaluationContent {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130F05;
|
||||
color: #130f05;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
@ -571,7 +572,8 @@ export default {
|
||||
align-items: center;
|
||||
padding: 24rpx 36rpx;
|
||||
|
||||
.rate-top-left, .rate-top-right {
|
||||
.rate-top-left,
|
||||
.rate-top-right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -580,7 +582,7 @@ export default {
|
||||
}
|
||||
|
||||
.rate-top-right:before {
|
||||
content: ' ';
|
||||
content: " ";
|
||||
height: 60rpx;
|
||||
width: 1rpx;
|
||||
background: #eeeeee;
|
||||
@ -590,7 +592,7 @@ export default {
|
||||
}
|
||||
|
||||
.rate-code {
|
||||
color: #ED6143;
|
||||
color: #ed6143;
|
||||
font-size: 60rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
@ -636,16 +638,16 @@ export default {
|
||||
border-radius: 6rpx;
|
||||
margin: 12rpx 9rpx;
|
||||
font-size: 24rpx;
|
||||
color: #BA9B6F;
|
||||
background: #F8E8D8;
|
||||
color: #ba9b6f;
|
||||
background: #f8e8d8;
|
||||
|
||||
&.gray {
|
||||
background-color: #F5F5F5;
|
||||
color: #A5A5A5;
|
||||
background-color: #f5f5f5;
|
||||
color: #a5a5a5;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #BA9B6F;
|
||||
background-color: #ba9b6f;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@ -687,7 +689,7 @@ export default {
|
||||
.vip-level {
|
||||
font-size: 20rpx;
|
||||
background: #333;
|
||||
color: #EEDCB6;
|
||||
color: #eedcb6;
|
||||
padding: 4rpx 6rpx;
|
||||
margin-left: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
@ -697,10 +699,11 @@ export default {
|
||||
|
||||
// padding-left 24rpx
|
||||
.vip-level:before {
|
||||
content: '';
|
||||
content: "";
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background: url('https://eshangtech.com/ShopICO/vip-ico.png') no-repeat center; // eshangtech.com/ShopICO/vip-ico.png) no-repeat center
|
||||
background: url("https://eshangtech.com/ShopICO/vip-ico.png") no-repeat
|
||||
center; // eshangtech.com/ShopICO/vip-ico.png) no-repeat center
|
||||
background-size: contain;
|
||||
position: absolute;
|
||||
left: 4rpx;
|
||||
@ -722,8 +725,8 @@ export default {
|
||||
|
||||
.rate-tag {
|
||||
border-radius: 4rpx;
|
||||
border: 1rpx solid #CF855E;
|
||||
color: #CF855E;
|
||||
border: 1rpx solid #cf855e;
|
||||
color: #cf855e;
|
||||
padding: 4rpx 6rpx;
|
||||
display: inline-block;
|
||||
font-size: 20rpx;
|
||||
|
||||
@ -1266,9 +1266,12 @@ export default {
|
||||
width: calc((100% / 3));
|
||||
padding: 6px 0;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #6d6b6b;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #716f69;
|
||||
line-height: 40rpx;
|
||||
font-style: normal;
|
||||
|
||||
.smallNumber {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
@ -1283,18 +1286,22 @@ export default {
|
||||
}
|
||||
|
||||
.selectTabItem {
|
||||
color: #000000;
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
color: #130f05;
|
||||
line-height: 40rpx;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.selectTabItem:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 2rem;
|
||||
height: 4px;
|
||||
height: 6rpx;
|
||||
// border-radius: 4px;
|
||||
background-color: #a18153;
|
||||
background-color: #ba922f;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
@ -1303,7 +1310,7 @@ export default {
|
||||
|
||||
.nowContent {
|
||||
width: 100%;
|
||||
height: calc(100vh - 160px);
|
||||
height: calc(100vh - 180px);
|
||||
overflow-y: auto;
|
||||
|
||||
.couponBox {
|
||||
@ -1331,16 +1338,17 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.useUnit {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 34rpx;
|
||||
color: #ba922f;
|
||||
line-height: 48rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.usePrice {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 48rpx;
|
||||
color: #ba922f;
|
||||
@ -1350,14 +1358,13 @@ export default {
|
||||
}
|
||||
}
|
||||
.useRule {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #ba922f;
|
||||
line-height: 32rpx;
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1376,7 +1383,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
.itemRightLeft {
|
||||
.couponText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130f05;
|
||||
@ -1385,7 +1392,7 @@ export default {
|
||||
font-style: normal;
|
||||
}
|
||||
.couponEndTime {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #716f69;
|
||||
@ -1394,7 +1401,7 @@ export default {
|
||||
font-style: normal;
|
||||
}
|
||||
.couponType {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #ba922f;
|
||||
@ -1405,12 +1412,11 @@ export default {
|
||||
}
|
||||
}
|
||||
.itemRightRight {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
padding: 8rpx 24rpx;
|
||||
background: #ba922f;
|
||||
@ -1422,17 +1428,21 @@ export default {
|
||||
}
|
||||
|
||||
.store-title {
|
||||
display: flex;
|
||||
font-size: 36rpx;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #130f05;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.store-info {
|
||||
color: #716f69;
|
||||
font-size: 22rpx;
|
||||
margin: 16rpx 0;
|
||||
margin: 4rpx 0;
|
||||
.mark {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #ba922f;
|
||||
@ -1441,7 +1451,7 @@ export default {
|
||||
font-style: normal;
|
||||
}
|
||||
.markUnit {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #ba922f;
|
||||
@ -1450,7 +1460,7 @@ export default {
|
||||
font-style: normal;
|
||||
}
|
||||
.month {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716f69;
|
||||
@ -1462,8 +1472,13 @@ export default {
|
||||
|
||||
.store-has-c {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
text {
|
||||
font-size: 22rpx;
|
||||
@ -1517,7 +1532,8 @@ export default {
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
display: inline-block;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #716f69;
|
||||
@ -1528,7 +1544,7 @@ export default {
|
||||
}
|
||||
|
||||
.infoDesc {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130f05;
|
||||
@ -1752,8 +1768,13 @@ export default {
|
||||
}
|
||||
|
||||
.menu-item-title {
|
||||
color: #393939;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-align: center;
|
||||
/* white-space: nowrap; */
|
||||
overflow: hidden;
|
||||
@ -1793,7 +1814,13 @@ export default {
|
||||
}
|
||||
|
||||
.menu-item.current .menu-item-title {
|
||||
color: #464245;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #ba922f;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.foods-wrapper {
|
||||
@ -1807,9 +1834,14 @@ export default {
|
||||
|
||||
.goodlist-title {
|
||||
padding-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
padding-left: 36rpx;
|
||||
color: #999;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #716f69;
|
||||
line-height: 36rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.newFoodsItem {
|
||||
@ -1843,7 +1875,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
|
||||
.shopName {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #130f05;
|
||||
@ -1860,7 +1892,7 @@ export default {
|
||||
|
||||
.leftPrice {
|
||||
.unit {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #130f05;
|
||||
@ -1871,11 +1903,11 @@ export default {
|
||||
}
|
||||
|
||||
.price {
|
||||
font-family: DINAlternate, DINAlternate;
|
||||
font-family: "DINAlternate";
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #130f05;
|
||||
line-height: 32rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -1889,6 +1921,8 @@ export default {
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: #ba922f;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.acount {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -100,15 +100,18 @@
|
||||
<image class="funIcon" src="/static/images/home/serviceHotline.svg" />
|
||||
<div class="funName">服务热线</div>
|
||||
</div>
|
||||
<!-- <div
|
||||
class="funItem"
|
||||
v-if="loginType && loginType !== 'min'"
|
||||
@click="handleLoginoOut"
|
||||
>
|
||||
<image class="funIcon" src="/static/images/home/closeLogin.png" />
|
||||
<div class="funName">退出登录</div>
|
||||
</div> -->
|
||||
<div class="funItem">
|
||||
<image class="funIcon" src="/static/images/home/iLike.svg" />
|
||||
<div class="funName gray">我的关注</div>
|
||||
</div>
|
||||
|
||||
<div class="funItem" v-if="loginType && loginType !== 'min'">
|
||||
<image class="funIcon" src="/static/images/home/closeLogin.png" />
|
||||
<div class="funName gray">退出登录</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<UniPopup
|
||||
@ -248,6 +251,11 @@ export default {
|
||||
this.handleGetUserInfo();
|
||||
},
|
||||
methods: {
|
||||
// 退出登录
|
||||
handleLoginoOut() {
|
||||
this.$store.commit("setUser", undefined);
|
||||
uni.navigateTo({ url: "/pages/login/index" });
|
||||
},
|
||||
// 服务区热线
|
||||
handleCallPhone() {
|
||||
uni.showModal({
|
||||
@ -274,6 +282,37 @@ export default {
|
||||
// }
|
||||
let _this = this;
|
||||
console.log("this.user", this.user);
|
||||
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // 你的接口 URL
|
||||
filePath: e.detail.avatarUrl,
|
||||
name: "file", // 表单中的文件字段名
|
||||
formData: {
|
||||
Tabletype: "1005", // 表单中其他数据
|
||||
},
|
||||
success: async (uploadRes) => {
|
||||
let data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
|
||||
let url = data.Result_Data.ImageUrl;
|
||||
console.log("url", url);
|
||||
if (url) {
|
||||
let req = {
|
||||
membershipId: this.user.MEMBERSHIP_ID,
|
||||
headImgUrl: url,
|
||||
};
|
||||
_this.WXProfile = url;
|
||||
const userInfoData = await _this.$api.$get(
|
||||
"/WeChat/UpdateMemberInfo",
|
||||
req
|
||||
);
|
||||
console.log("userInfoData", userInfoData);
|
||||
if (userInfoData.Result_Code === 100) {
|
||||
_this.handleGetUserInfo();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return;
|
||||
uni.saveFile({
|
||||
tempFilePath: e.detail.avatarUrl,
|
||||
success: async (res) => {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
16
static/images/home/goOrderIcon.svg
Normal file
16
static/images/home/goOrderIcon.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>图标/我的发帖_10@2x</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="切图汇总" transform="translate(-248.000000, -424.000000)">
|
||||
<g id="图标/我的发帖" transform="translate(248.000000, 424.000000)">
|
||||
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
|
||||
<line x1="6" y1="21.75" x2="18" y2="21.75" id="路径-12" stroke="#BA922F" stroke-width="1.08333333"></line>
|
||||
<path d="M3.83647878,9.5 L20.1529309,9.5 C20.6131634,9.49791372 20.9879539,9.86930763 20.9900488,10.3295402 C20.9900883,10.338232 20.9899919,10.3469239 20.9897467,10.3556124 C20.9397105,12.186805 20.7072552,13.7583685 20.2923806,15.0703029 C19.8502101,16.4685541 19.1170952,17.8365491 18.093036,19.1742879 C17.9369451,19.3793272 17.6940995,19.4992478 17.4364121,19.5 L6.55953013,19.5 C6.3161764,19.4997985 6.0850695,19.3932327 5.92692766,19.2082672 C4.98818803,18.1083539 4.25529842,16.7250834 3.72825884,15.0584557 C3.23822111,13.5088369 2.99548932,11.9335389 3.00006345,10.3325616 C3.00048697,9.87232452 3.37392837,9.49957415 3.83416546,9.50000036 C3.83493656,9.50000107 3.83570767,9.50000286 3.83647878,9.5 Z" id="矩形" stroke="#BA922F" stroke-width="1.08333333"></path>
|
||||
<path d="M8,2.25 C7.33333333,3.25 7.33333333,4.08333333 8,4.75 C8.66666667,5.41666667 8.66666667,6.25 8,7.25" id="路径-13" stroke="#BA922F" stroke-width="1.08333333" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M12,2.25 C11.3333333,3.25 11.3333333,4.08333333 12,4.75 C12.6666667,5.41666667 12.6666667,6.25 12,7.25" id="路径-13备份" stroke="#BA922F" stroke-width="1.08333333" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M16,2.25 C15.3333333,3.25 15.3333333,4.08333333 16,4.75 C16.6666667,5.41666667 16.6666667,6.25 16,7.25" id="路径-13备份-2" stroke="#BA922F" stroke-width="1.08333333" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
1
static/images/home/replay.svg
Normal file
1
static/images/home/replay.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1741244973010" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4381" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M912.1 168.1c-25.6-6.6-51.9 8.4-58.8 33.9l-17.7 66.3C756.2 152.1 625.2 80 480 80 241.8 80 48 273.8 48 512s193.8 432 432 432c171.8 0 327.3-101.8 396.1-259.3 10.6-24.3-0.5-52.6-24.8-63.2-24.4-10.6-52.6 0.5-63.2 24.8C734.6 768.8 613.7 848 480 848c-185.3 0-336-150.7-336-336s150.7-336 336-336c114.4 0 217.4 57.4 278.9 149.8l-82-22c-25.5-6.6-51.9 8.4-58.8 34-6.8 25.6 8.3 51.9 34 58.8l185.5 49.7c4.2 1.1 8.3 1.6 12.4 1.6 21.2 0 40.6-14.1 46.3-35.6L946 226.9c6.9-25.6-8.3-51.9-33.9-58.8z" fill="#716F69" p-id="4382"></path></svg>
|
||||
|
After Width: | Height: | Size: 856 B |
15
static/images/home/sunIcon.svg
Normal file
15
static/images/home/sunIcon.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.2 KiB |
20
static/images/home/useCoupon.svg
Normal file
20
static/images/home/useCoupon.svg
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>标签/棕色备份</title>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#FE6F02" offset="0%"></stop>
|
||||
<stop stop-color="#F75031" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="切图汇总" transform="translate(-466.000000, -461.000000)">
|
||||
<g id="图标/优惠券-填充" transform="translate(466.000000, 461.000000)">
|
||||
<rect id="矩形" x="0" y="0" width="12" height="12"></rect>
|
||||
<g id="编组" transform="translate(0.000000, 1.500000)" fill="url(#linearGradient-1)">
|
||||
<path d="M11,0 C11.5522847,-1.01453063e-16 12,0.44771525 12,1 L11.9995991,2.82963183 C11.2097968,2.98771745 10.615392,3.67549477 10.615392,4.5 C10.615392,5.32450523 11.2097968,6.01228255 11.9995991,6.17036817 L12,8 C12,8.55228475 11.5522847,9 11,9 L1,9 C0.44771525,9 6.76353751e-17,8.55228475 0,8 L0.000763608156,6.17029554 C0.790385155,6.01207199 1.38460795,5.32437902 1.38460795,4.5 C1.38460795,3.67562098 0.790385155,2.98792801 0.000763608156,2.82970446 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L11,0 Z M8.74872538,5.17664853 L3.24872538,5.17664853 L3.24872538,6.17664853 L8.74872538,6.17664853 L8.74872538,5.17664853 Z M8.74872538,2.67664853 L3.24872538,2.67664853 L3.24872538,3.67664853 L8.74872538,3.67664853 L8.74872538,2.67664853 Z" id="形状结合"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
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
6
unpackage/dist/build/app-plus/app-service.js
vendored
6
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app-view.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/manifest.json
vendored
2
unpackage/dist/build/app-plus/manifest.json
vendored
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
6673
unpackage/dist/dev/app-plus/app-service.js
vendored
6673
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
5141
unpackage/dist/dev/app-plus/app-view.js
vendored
5141
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/app-plus/manifest.json
vendored
2
unpackage/dist/dev/app-plus/manifest.json
vendored
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user