update
This commit is contained in:
parent
c71b240880
commit
9d7c856ee6
File diff suppressed because it is too large
Load Diff
@ -2,8 +2,8 @@
|
||||
"name" : "驿佳",
|
||||
"appid" : "__UNI__F870657",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.20",
|
||||
"versionCode" : 1020,
|
||||
"versionName" : "1.0.23",
|
||||
"versionCode" : 1023,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@ -124,6 +124,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="color: red;margin-top: 16rpx;font-size: 24rpx;text-align: center;">新增失物/招领前请先联系服务区管理员</view>
|
||||
</view>
|
||||
<!-- v-if="!isDetail" -->
|
||||
<view class="btnBox">
|
||||
@ -504,7 +506,7 @@ export default {
|
||||
PHONE_NUMBER: this.phone,
|
||||
PROVINCE_CODE: "340000",
|
||||
SUGGESTION_CREATEDATE: this.thisTime,
|
||||
SUGGESTION_STATE: 1,
|
||||
SUGGESTION_STATE: 2,
|
||||
SUGGESTION_TYPE: 4000,
|
||||
SUGGESTION_NAME: this.user.MEMBERSHIP_NAME,
|
||||
SERVERPART_NAME: this.nowServerpart.SERVERPART_NAME,
|
||||
|
||||
@ -203,11 +203,10 @@
|
||||
</view>
|
||||
|
||||
<view class="btnList">
|
||||
<button class="btns noAgree" @click="handleRefuse">拒绝</button>
|
||||
<button class="btns agree" id="agree-btn3" open-type="agreePrivacyAuthorization"
|
||||
@click="handleAgreePrivacyAuthorization">
|
||||
<view class="btns noAgree" @click="handleAgreePrivacyAuthorization">拒绝</view>
|
||||
<view class="btns agree" @click="handleAgreePrivacyAuthorization">
|
||||
同意
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -275,6 +274,9 @@ import ChargeBox from "../../components/chargeBox.vue";
|
||||
import {
|
||||
handleGetUserPointInfo,
|
||||
handleGetNearThreeService,
|
||||
handleGetPosition,
|
||||
handleGetAndroidPosition,
|
||||
handleGetIOSPosition,
|
||||
} from "../../utils/publicMethods";
|
||||
|
||||
export default {
|
||||
@ -326,6 +328,7 @@ export default {
|
||||
mallList: [],
|
||||
nearCouponList: [],// 附近服务区的优惠券列表
|
||||
selectLocation: {},// 选择的定位
|
||||
isFirst: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -337,6 +340,7 @@ export default {
|
||||
}),
|
||||
},
|
||||
async onLoad() {
|
||||
|
||||
// await getApp().globalData.initReady;
|
||||
// 获取手机参数对页面进行适配 主要是用于拿到胶囊的位置
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
@ -577,31 +581,41 @@ export default {
|
||||
|
||||
const selectLocation = uni.getStorageSync("selectLocation");
|
||||
let _this = this
|
||||
if (selectLocation) {
|
||||
this.selectLocation = selectLocation
|
||||
} else {
|
||||
if (this.loginType === 'min') {
|
||||
// wx.chooseLocation({
|
||||
// success: (res) => {
|
||||
// console.log('res', res);
|
||||
// _this.selectLocation = res
|
||||
// uni.setStorageSync("selectLocation", res);
|
||||
// },
|
||||
// });
|
||||
if (_this.isFirst) {
|
||||
uni.setStorageSync("selectLocation", null);
|
||||
// 拿到最新的位置 并更新老的经纬度
|
||||
let res = {}
|
||||
if (_this.loginType === 'min') {
|
||||
res = await handleGetPosition()
|
||||
} else if (_this.loginType === 'android') {
|
||||
res = await handleGetAndroidPosition()
|
||||
} else {
|
||||
res = await handleGetIOSPosition()
|
||||
}
|
||||
_this.seatInfo = res
|
||||
// _this.seatInfo = {
|
||||
// latitude: 31.855616,
|
||||
// longitude: 117.449167
|
||||
// }
|
||||
uni.setStorageSync("seatInfo", res)
|
||||
|
||||
if (this.loginType === 'min') {
|
||||
this.handleGetUserNearInfo()
|
||||
} else {
|
||||
// uni.chooseLocation({
|
||||
// success: function (res) {
|
||||
// console.log('res', res);
|
||||
// _this.selectLocation = res
|
||||
// uni.setStorageSync("selectLocation", res);
|
||||
// }
|
||||
// });
|
||||
this.handleGetUserNearInfo()
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (selectLocation) {
|
||||
this.selectLocation = selectLocation
|
||||
} else {
|
||||
if (this.loginType === 'min') {
|
||||
this.handleGetUserNearInfo()
|
||||
} else {
|
||||
this.handleGetUserNearInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
// 默认获取用户附近的点位数据
|
||||
@ -635,6 +649,44 @@ export default {
|
||||
}
|
||||
_this.selectLocation = res
|
||||
uni.setStorageSync("selectLocation", res);
|
||||
|
||||
// 拿到最新的定位附近的数据
|
||||
let req = {
|
||||
Province_Code: "340000",
|
||||
longitude: _this.seatInfo.longitude,
|
||||
latitude: _this.seatInfo.latitude,
|
||||
ShowService: true,
|
||||
};
|
||||
const newRes = await _this.$api.$javaGet2('/third-party/getServerPartList', req)
|
||||
let data = newRes.Result_Data.List;
|
||||
// 最近的前三个的服务区 名称
|
||||
let nearThreeList = [];
|
||||
// 先存一下所有服务区的数据
|
||||
let allServiceList = []
|
||||
if (data && data.length > 0) {
|
||||
uni.setStorageSync("allServiceList", []); // 最近的三个服务区
|
||||
data.forEach((item, index) => {
|
||||
if (index <= 2) {
|
||||
nearThreeList.push(item.SERVERPART_NAME)
|
||||
}
|
||||
allServiceList.push({
|
||||
...item,
|
||||
showName: item.SERVERPART_NAME,
|
||||
ProvinceCode: "340000",
|
||||
ServerPart_Id: item.SERVERPART_ID,
|
||||
ServerPart_Name: item.SERVERPART_NAME,
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
uni.setStorageSync("currentService", data[0]); // 最近的服务区数据
|
||||
uni.setStorageSync("nearService", data[0]); // 最近的服务区数据
|
||||
uni.setStorageSync("nearThreeList", nearThreeList); // 最近的三个服务区
|
||||
uni.setStorageSync("allServiceList", allServiceList); // 最近的三个服务区
|
||||
_this.chaegeBoxList = []
|
||||
setTimeout(() => {
|
||||
_this.chaegeBoxList = [nearThreeList[0]]
|
||||
}, 10);
|
||||
},
|
||||
// 拿到就近服务区的优惠券列表
|
||||
async handleGetNearCouponList() {
|
||||
@ -1910,7 +1962,7 @@ export default {
|
||||
|
||||
.btns {
|
||||
display: inline-block;
|
||||
padding: 0 90rpx;
|
||||
padding: 20rpx 90rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
|
||||
|
||||
@ -177,6 +177,7 @@ export default {
|
||||
|
||||
// 计时器
|
||||
_this.handleSetInter();
|
||||
_this.pendCode = true;
|
||||
|
||||
const req = {
|
||||
action_type: "GetSMSIdentityCode",
|
||||
|
||||
@ -6,38 +6,19 @@
|
||||
<div class="messageBox">
|
||||
<div class="phoneBox">
|
||||
<image class="phoneIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/detailPhone.png" />
|
||||
<input
|
||||
class="phoneText"
|
||||
placeholder="请输入手机号"
|
||||
style="font-size: 32rpx"
|
||||
v-model="phone"
|
||||
@input="validatePhone"
|
||||
/>
|
||||
<input class="phoneText" placeholder="请输入手机号" style="font-size: 32rpx" v-model="phone"
|
||||
@input="validatePhone" />
|
||||
</div>
|
||||
<div class="phoneError">{{ errorMessage }}</div>
|
||||
<div class="codeBox">
|
||||
<image class="codeIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/passwordICon.svg" />
|
||||
<input
|
||||
v-model="password"
|
||||
class="passwordText"
|
||||
placeholder="请输入密码"
|
||||
style="font-size: 32rpx"
|
||||
/>
|
||||
<input v-model="password" class="passwordText" placeholder="请输入密码" style="font-size: 32rpx" />
|
||||
</div>
|
||||
<div class="codeBox">
|
||||
<image class="codeIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/codeIcon.svg" />
|
||||
<input
|
||||
v-model="code"
|
||||
class="codeText"
|
||||
placeholder="请输入验证码"
|
||||
style="font-size: 32rpx"
|
||||
/>
|
||||
<div
|
||||
:style="{ color: isRight ? '#130F05' : '#b8b7b4' }"
|
||||
class="haveCode"
|
||||
@click="handleGetCode"
|
||||
v-if="!pendCode"
|
||||
>
|
||||
<input v-model="code" class="codeText" placeholder="请输入验证码" style="font-size: 32rpx" />
|
||||
<div :style="{ color: isRight ? '#130F05' : '#b8b7b4' }" class="haveCode" @click="handleGetCode"
|
||||
v-if="!pendCode">
|
||||
获取验证码
|
||||
</div>
|
||||
<div v-if="pendCode">{{ second ? second + "s" : "" }}</div>
|
||||
@ -45,30 +26,20 @@
|
||||
</div>
|
||||
|
||||
<div class="agreementBox">
|
||||
<radio
|
||||
class="radioBox"
|
||||
:value="isAgree"
|
||||
:checked="isAgree"
|
||||
color="#BA922F"
|
||||
:size="16"
|
||||
@click="handleChangeAgree"
|
||||
/>
|
||||
<radio class="radioBox" :value="isAgree" :checked="isAgree" color="#BA922F" :size="16"
|
||||
@click="handleChangeAgree" />
|
||||
<span class="normal">我已阅读并同意</span>
|
||||
<span class="light">服务协议</span>
|
||||
<span class="normal">和</span>
|
||||
<span class="light">隐私协议</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="loginBox"
|
||||
:style="{
|
||||
background:
|
||||
isAllRight && isClick
|
||||
? 'rgba(186, 146, 47, 1)'
|
||||
: 'rgba(186, 146, 47, 0.5)',
|
||||
}"
|
||||
@click="handleRegister"
|
||||
>
|
||||
<div class="loginBox" :style="{
|
||||
background:
|
||||
isAllRight && isClick
|
||||
? 'rgba(186, 146, 47, 1)'
|
||||
: 'rgba(186, 146, 47, 0.5)',
|
||||
}" @click="handleRegister">
|
||||
注册
|
||||
</div>
|
||||
|
||||
@ -76,13 +47,7 @@
|
||||
<div>
|
||||
<div>手机号码:</div>
|
||||
<div class="inputBG">
|
||||
<input
|
||||
type="number"
|
||||
maxlength="11"
|
||||
placeholder="请输入手机号码"
|
||||
v-model="phone"
|
||||
@input="validatePhone"
|
||||
/>
|
||||
<input type="number" maxlength="11" placeholder="请输入手机号码" v-model="phone" @input="validatePhone" />
|
||||
</div>
|
||||
<div>
|
||||
{{ errorMessage }}
|
||||
@ -91,15 +56,8 @@
|
||||
<div>
|
||||
<input placeholder="请输入密码" v-model="password" />
|
||||
|
||||
<input
|
||||
v-if="loginType === 2"
|
||||
type="number"
|
||||
placeholder="请输入验证码"
|
||||
v-model="code"
|
||||
/>
|
||||
<span v-if="loginType === 2" @click="handleGetCode"
|
||||
>点击获取验证码</span
|
||||
>
|
||||
<input v-if="loginType === 2" type="number" placeholder="请输入验证码" v-model="code" />
|
||||
<span v-if="loginType === 2" @click="handleGetCode">点击获取验证码</span>
|
||||
|
||||
<!-- <span style="margin-left: 8px" @click="handleSelectLoginType">{{
|
||||
loginType === 1 ? "验证码注册" : "密码注册"
|
||||
@ -131,6 +89,7 @@ export default {
|
||||
second: 60, // 剩余秒数
|
||||
isAgree: false, //协议是否同意
|
||||
isClick: true, // 判断当前是否变点击了
|
||||
timer: null,// 定时器
|
||||
};
|
||||
},
|
||||
onload() {
|
||||
@ -180,23 +139,30 @@ export default {
|
||||
}
|
||||
},
|
||||
// 得到验证码
|
||||
handleGetCode() {
|
||||
async handleGetCode() {
|
||||
let _this = this;
|
||||
console.log("this.phone", this.phone);
|
||||
console.log("this.isRight", this.isRight);
|
||||
if (this.isRight && this.phone) {
|
||||
this.pendCode = true;
|
||||
this.handleSetInter();
|
||||
this.$api
|
||||
.getCoop({
|
||||
action_type: "GetSMSIdentityCode",
|
||||
action_data: this.phone,
|
||||
// 计时器
|
||||
_this.handleSetInter();
|
||||
_this.pendCode = true;
|
||||
const req = {
|
||||
action_type: "GetSMSIdentityCode",
|
||||
action_data: _this.phone,
|
||||
time: Date.now()
|
||||
}
|
||||
const res = await this.$api.$getLogin(req)
|
||||
let obj = res.ResultObject[0];
|
||||
if (obj.ResultCode === '100') {
|
||||
_this.pendCode = true;
|
||||
_this.currentCode = obj.FirstParameter;
|
||||
} else {
|
||||
_this.pendCode = false;
|
||||
clearInterval(this.timer);
|
||||
uni.showToast({
|
||||
title: obj.ResultDesc,
|
||||
icon: 'none'
|
||||
})
|
||||
.then(function (res) {
|
||||
console.log("res", res);
|
||||
let obj = res.ResultObject[0];
|
||||
_this.currentCode = obj.FirstParameter;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "请检查输入的手机号",
|
||||
@ -207,16 +173,21 @@ export default {
|
||||
},
|
||||
// 计时器
|
||||
handleSetInter() {
|
||||
let timer;
|
||||
let _this = this;
|
||||
timer = setInterval(() => {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
_this.second = 60;
|
||||
_this.timer = setInterval(() => {
|
||||
if (_this.second === 1) {
|
||||
this.pendCode = false;
|
||||
setTimeout(timer);
|
||||
_this.pendCode = false;
|
||||
// setTimeout(timer);
|
||||
_this.second = 60;
|
||||
clearInterval(this.timer);
|
||||
} else {
|
||||
_this.second = _this.second - 1;
|
||||
}
|
||||
_this.$forceUpdate();
|
||||
}, 1000);
|
||||
},
|
||||
// 注册
|
||||
@ -254,7 +225,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.isClick = false;
|
||||
let _this = this
|
||||
let _this = this
|
||||
const req = {
|
||||
action_type: "Registe",
|
||||
APPGuid: "2693711a-72eb-48dc-b3dc-5122424e8fd4",
|
||||
@ -295,11 +266,13 @@ export default {
|
||||
.main {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 48rpx;
|
||||
|
||||
.pageTitle {
|
||||
width: 100%;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
@ -310,23 +283,28 @@ export default {
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.messageBox {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.phoneBox {
|
||||
padding: 32rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #f5f6f7;
|
||||
|
||||
.phoneIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.phoneText {
|
||||
width: calc(100% - 48rpx);
|
||||
color: #130f05;
|
||||
}
|
||||
}
|
||||
|
||||
.phoneError {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
@ -337,17 +315,21 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #f5f6f7;
|
||||
|
||||
.codeIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.codeText {
|
||||
width: calc(100% - 200rpx);
|
||||
}
|
||||
|
||||
.passwordText {
|
||||
width: calc(100% - 48rpx);
|
||||
}
|
||||
|
||||
.haveCode {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
@ -364,9 +346,11 @@ export default {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 24rpx;
|
||||
width: 100%;
|
||||
|
||||
.radioBox {
|
||||
transform: scale(0.7);
|
||||
}
|
||||
|
||||
.normal {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
@ -376,6 +360,7 @@ export default {
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.light {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="statusBox">
|
||||
<view class="statusBox" @click="handleShowChargeDetail">
|
||||
<view>
|
||||
<!-- 国网 -->
|
||||
<view class="statusItem">
|
||||
@ -122,7 +122,7 @@
|
||||
</view>
|
||||
|
||||
<view class="serviceDetailBox" v-if="showChargeBox">
|
||||
<charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
|
||||
<charge-box ref="chargeBoxRef" :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
|
||||
@allChargeData="handleGetChargeData" />
|
||||
</view>
|
||||
<!-- @allLXDataList="handleLXAddMarker"
|
||||
@ -301,6 +301,10 @@ export default {
|
||||
this.$utils.addUserBehaviorNew();
|
||||
},
|
||||
methods: {
|
||||
// 点击地图上面的电桩汇总信息 出现电桩的详情悬浮框
|
||||
handleShowChargeDetail() {
|
||||
this.$refs.chargeBoxRef.handleOpenDetail(null);
|
||||
},
|
||||
// 回到顶部
|
||||
handleGoBack() {
|
||||
this.scrollView = "navItem";
|
||||
|
||||
@ -16,11 +16,12 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100vw; height: calc(100vh - 55px - 400rpx);position: relative;">
|
||||
<view style="width: 100vw; height: calc(100vh - 55px - 400rpx);position: relative;" v-show="showMap">
|
||||
|
||||
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true"
|
||||
:markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map>
|
||||
|
||||
<cover-view class="statusBox" :style="{ left: showListPage ? '-2000px' : '' }">
|
||||
<cover-view class="statusBox" :style="{ left: showListPage ? '-2000px' : '' }" @tap="handleShowChargeDetail">
|
||||
<cover-view>
|
||||
<!-- 国网 -->
|
||||
<cover-view class="statusItem" style="margin: 0 16rpx;">
|
||||
@ -140,11 +141,11 @@
|
||||
</cover-view> -->
|
||||
</view>
|
||||
|
||||
<view style="display: flex;align-items: flex-start;justify-content: space-between;">
|
||||
<view style="width: calc(100%- 120rpx)">
|
||||
<view style="width: 100%; display: flex;align-items: flex-start;justify-content: space-between;">
|
||||
<view style="width: calc(100vw- 120rpx)">
|
||||
<view class="serviceDetailBox" v-if="showChargeBox">
|
||||
<charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
|
||||
@allChargeData="handleGetChargeData" />
|
||||
<charge-box ref="chargeBoxRef" :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
|
||||
@allChargeData="handleGetChargeData" @handleChangeShow="handleChangeShow" />
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 120rpx">
|
||||
@ -227,7 +228,8 @@ export default {
|
||||
lastMoveTime: 0, // 上次移动的时间戳,用于节流
|
||||
pageIndex: 1,
|
||||
isHaveMore: false,
|
||||
isShowAllData: true, // 判断是否点击了服务区 没有点击 就显示全部的数据 点击了 就显示单个服务区的具体每个品牌的数据
|
||||
isShowAllData: true, // 判断是否点击了服务区 没有点击 就显示全部的数据 点击了 就显示单个服务区的具体每个品牌的数据,
|
||||
showMap: true, // 是否显示地图
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@ -271,6 +273,13 @@ export default {
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
handleChangeShow(e) {
|
||||
this.showMap = !e
|
||||
this.$forceUpdate();
|
||||
},
|
||||
handleShowChargeDetail() {
|
||||
this.$refs.chargeBoxRef.handleOpenDetail(null);
|
||||
},
|
||||
// 显示自己的定位
|
||||
handleShowLocal() {
|
||||
let seatInfo = uni.getStorageSync("seatInfo");
|
||||
|
||||
@ -1,23 +1,18 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<view :class="showListPage ? 'mapBox moveLeft' : 'mapBox'" v-if="!showListPage">
|
||||
<movable-area style="width: 100vw; height: calc(100vh - 460rpx);">
|
||||
<view class="topBox">
|
||||
<view class="topRight">
|
||||
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" />
|
||||
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText"
|
||||
@confirm="handleConfirm" />
|
||||
</view>
|
||||
</view>
|
||||
<view :class="showListPage ? 'mapBox moveLeft' : 'mapBox'">
|
||||
<movable-area style="width: 100vw; height: calc(100vh - 560rpx);">
|
||||
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true"
|
||||
:markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map>
|
||||
|
||||
<view class="topBox">
|
||||
<view class="topRight">
|
||||
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" />
|
||||
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText"
|
||||
@confirm="handleConfirm" />
|
||||
<!-- <span class="searchText">请输入服务区</span> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="listBox" @click="handleChangePageType">
|
||||
<image class="listIcon" src="/static/home/listIcon.svg" />
|
||||
<text class="text">列表</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="serviceDetailBox" v-if="showChargeBox">
|
||||
<!-- <charge-box :serviceAreaList="currentServiceList" :pageType="'mapIndex'"
|
||||
@ -751,11 +746,82 @@ export default {
|
||||
overflow: hidden;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.topBox {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.topRight {
|
||||
width: calc(100% - 240rpx);
|
||||
height: 72rpx;
|
||||
background: #fff;
|
||||
border-radius: 36rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
|
||||
.searchIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.searchText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #9fa1aa;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 180rpx;
|
||||
height: 72rpx;
|
||||
background: #fff;
|
||||
border-radius: 36rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
|
||||
.listIcon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.mapBox {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: 104rpx;
|
||||
left: 0;
|
||||
transition: transform 0.5s ease;
|
||||
|
||||
@ -768,75 +834,7 @@ export default {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.topBox {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.topRight {
|
||||
width: calc(100% - 240rpx);
|
||||
height: 72rpx;
|
||||
background: #fff;
|
||||
border-radius: 36rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
|
||||
.searchIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.searchText {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #9fa1aa;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 180rpx;
|
||||
height: 72rpx;
|
||||
background: #fff;
|
||||
border-radius: 36rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
|
||||
.listIcon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-family: "PingFangSC";
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #130f05;
|
||||
line-height: 36rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.statusBox {
|
||||
box-sizing: border-box;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<div class="evaluationRight">
|
||||
<div class="markTitle">商家评分</div>
|
||||
<!-- -->
|
||||
<UniRate :value="storeMsg.MERCHANTS_SCORE" size="14" activeColor="#FFD401" :allowHalf="true" color="#D9D9D9"
|
||||
<uni-rate :value="storeMsg.MERCHANTS_SCORE" size="14" activeColor="#FFD401" :allowHalf="true" color="#D9D9D9"
|
||||
void-color="#eee" void-icon="star" readonly />
|
||||
</div>
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</div>
|
||||
|
||||
<div class="itemRate">
|
||||
<UniRate :value="item.COMMENT_SCORE" size="12" allowHalf color="#ececec" void-color="#eee" void-icon="star"
|
||||
<uni-rate :value="item.COMMENT_SCORE" size="12" allowHalf color="#ececec" void-color="#eee" void-icon="star"
|
||||
readonly />
|
||||
<span class="rateText">{{ item.rateText }}</span>
|
||||
</div>
|
||||
@ -63,7 +63,7 @@
|
||||
<div>
|
||||
<div class="rate-text">商家评分</div>
|
||||
|
||||
<UniRate v-model="storeMsg.MERCHANTS_SCORE" size="12" allowHalf color="#ececec" void-color="#eee"
|
||||
<uni-rate v-model="storeMsg.MERCHANTS_SCORE" size="12" allowHalf color="#ececec" void-color="#eee"
|
||||
void-icon="star" readonly />
|
||||
</div>
|
||||
</div>
|
||||
@ -129,7 +129,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniRate from "@/uni_modules/uni-rate/components/uni-rate/uni-rate.vue";
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import noData from "../../../../components/noData.vue";
|
||||
export default {
|
||||
@ -153,7 +152,6 @@ export default {
|
||||
}),
|
||||
},
|
||||
components: {
|
||||
uniRate,
|
||||
noData,
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<span style="margin: 0 8rpx; color: #fff; font-size: 22rpx">|</span>
|
||||
<span class="month">人均<span class="value">¥{{
|
||||
listDetail.PERCAPITA || merchatsMsg.PERCAPITA || "-"
|
||||
}}</span></span>
|
||||
}}</span></span>
|
||||
</div>
|
||||
|
||||
<scroll-view :scroll-x="true" class="newCoupop">
|
||||
@ -250,14 +250,16 @@
|
||||
</view>
|
||||
</div>
|
||||
|
||||
<scroll-view :scroll-y="true" class="nowContent nowContent2" v-if="activeTabs === 2">
|
||||
<MerchantEvaluation ref="merchantEvaluation" :storeMsg="merchatsMsg" :merchantsId="merchatsMsg.MERCHANTS_ID" />
|
||||
|
||||
<div v-if="activeTabs === 2">
|
||||
<scroll-view :scroll-y="true" class="nowContent nowContent2">
|
||||
<MerchantEvaluation ref="merchantEvaluation" :storeMsg="merchatsMsg" :merchantsId="merchatsMsg.MERCHANTS_ID" />
|
||||
</scroll-view>
|
||||
<div class="rate-box" @click="goEvaluate">
|
||||
<div class="rate-gray">评价一下这家店...</div>
|
||||
<div class="rate-ico"><i></i>评论</div>
|
||||
</div>
|
||||
</scroll-view>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nowContent" v-if="activeTabs === 3" style="background-color: #fff;">
|
||||
<div>
|
||||
@ -553,6 +555,8 @@ export default {
|
||||
buyType: "", // 判断能不能点餐 1 是可以点餐
|
||||
isLoading: false,
|
||||
listDetail: {}, // 列表带进来的数据 月售和人均
|
||||
onLoadMid: "",
|
||||
onLoadType: ""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -1043,7 +1047,6 @@ export default {
|
||||
}
|
||||
},
|
||||
async getShop(id, type) {
|
||||
console.log("2");
|
||||
let _this = this;
|
||||
let res = await this.$api.getCoop({
|
||||
action_type: "GetMerchantsDetails",
|
||||
@ -1053,7 +1056,6 @@ export default {
|
||||
|
||||
// });
|
||||
let _data = res.Data;
|
||||
console.log("_datagetShop", _data);
|
||||
_this.merchatsMsg = _data;
|
||||
_this.getCouponList(_data.MERCHANTS_ID); // 获取商家优惠
|
||||
_this.getFoodImages(_data.MERCHANTS_ID); // 加载商家商品推荐
|
||||
@ -1070,6 +1072,9 @@ export default {
|
||||
.$get("/WeChat/GetCouponList", { sellerId: id })
|
||||
.then(function (data) {
|
||||
_this.couponList = data.Result_Data.List || [];
|
||||
console.log('sellerIdsellerIdsellerIdsellerIdsellerId', { sellerId: id });
|
||||
|
||||
console.log('_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList', _this.couponList);
|
||||
|
||||
let tabList = [];
|
||||
let isFood = false;
|
||||
@ -1129,17 +1134,17 @@ export default {
|
||||
}
|
||||
if (options.stroreDetail) {
|
||||
this.listDetail = JSON.parse(options.stroreDetail);
|
||||
console.log("this.listDetail", this.listDetail);
|
||||
}
|
||||
this.stroreId = options.id;
|
||||
await this.getNewGood(options.id, options.province);
|
||||
// this.merchatsMsg.MERCHANTS_ID = options.mid
|
||||
this.onLoadMid = options.mid;
|
||||
this.onLoadType = options.type;
|
||||
await this.getShop(options.mid, options.type || 0); // 获取商户信息
|
||||
this.tableNum = options.tableNum || 0; // tableNum 桌号 不等于0说明是门店扫码进入 则当确认订单时 不要选择相关的方向
|
||||
this.$store.commit("orderTable", options.tableNum || 0);
|
||||
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
console.log('systemInfosystemInfosystemInfosystemInfo', systemInfo);
|
||||
|
||||
let goodsHeight = systemInfo.windowHeight + systemInfo.statusBarHeight - 96; // - 44
|
||||
|
||||
@ -1148,7 +1153,6 @@ export default {
|
||||
} else {
|
||||
this.goodsH = goodsHeight;
|
||||
}
|
||||
console.log('this.goodsH this.goodsH this.goodsH this.goodsH ', this.goodsH);
|
||||
|
||||
this.$utils.addUserBehaviorNew();
|
||||
},
|
||||
@ -1181,9 +1185,10 @@ export default {
|
||||
}
|
||||
|
||||
if (this.activeTabs === 2) {
|
||||
setTimeout(() => {
|
||||
this.$refs.merchantEvaluation.loading();
|
||||
});
|
||||
this.getShop(this.onLoadMid, this.onLoadType || 0)
|
||||
// setTimeout(() => {
|
||||
// this.$refs.merchantEvaluation.loading();
|
||||
// });
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
paddingTop: `${loginType === 'min' ? menu.bottom : menu.top + 14}px`,
|
||||
}">
|
||||
<view class="userInfoLeft">
|
||||
<view class="userFile">
|
||||
<view class="userFile" v-if="loginType === 'min'">
|
||||
<button class="avatarBtn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||
<image class="headerImg" :src="WXProfile ||
|
||||
(user && user.MEMBERSHIP_HEADIMAGEURL
|
||||
@ -14,6 +14,15 @@
|
||||
" />
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="userFile" style="background-color: #F2F2F2;" v-if="loginType !== 'min' && showAvatar"
|
||||
@click="handleChooseAvatarApp">
|
||||
<image class="headerImg" :src="displayedAvatarUrl ||
|
||||
(user && user.MEMBERSHIP_HEADIMAGEURL
|
||||
? user.MEMBERSHIP_HEADIMAGEURL
|
||||
: '')
|
||||
" />
|
||||
</view>
|
||||
<view class="userInfoBox" v-if="user && user.MEMBERSHIP_ID">
|
||||
<view class="userTop">
|
||||
<span class="userName">{{
|
||||
@ -408,6 +417,8 @@ export default {
|
||||
// },
|
||||
],
|
||||
toDayHaveSign: false, // 今日是否已经签到了
|
||||
displayedAvatarUrl: "",
|
||||
showAvatar: true,// 是否显示头像
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
@ -531,6 +542,104 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// APP 端选择头像
|
||||
async handleChooseAvatarApp() {
|
||||
// 检查是否登录
|
||||
if (!this.user || !this.user.MEMBERSHIP_ID) {
|
||||
let _this = this;
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: "请您授权登录后再操作。",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
if (_this.loginType === "min") {
|
||||
uni.navigateTo({ url: "/pages/register/index" });
|
||||
} else {
|
||||
uni.navigateTo({ url: "/pages/login/index" });
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1, // 只允许选择一张图片
|
||||
sizeType: ['compressed'], // 压缩图片
|
||||
sourceType: ['album', 'camera'], // 可以从相册或相机选择
|
||||
success: (res) => {
|
||||
console.log("APP chooseImage success:", res);
|
||||
const tempFilePath = res.tempFilePaths[0]; // 获取临时文件路径
|
||||
if (tempFilePath) {
|
||||
// 直接调用上传方法,传入临时文件路径
|
||||
this.uploadAvatarAndSave(tempFilePath);
|
||||
} else {
|
||||
uni.showToast({ title: '未选择图片', icon: 'none' });
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error("APP chooseImage failed:", err);
|
||||
// 处理用户取消或权限问题
|
||||
if (err.errMsg && err.errMsg.includes('cancel')) {
|
||||
// 用户取消,不提示错误
|
||||
} else {
|
||||
uni.showToast({ title: '选择图片失败', icon: 'none' });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 上传头像并更新用户信息 (这个方法可以复用,接收文件路径)
|
||||
async uploadAvatarAndSave(filePath) {
|
||||
console.log('filePathfilePathfilePath', filePath);
|
||||
|
||||
let _this = this;
|
||||
uni.showLoading({ title: '上传中...' }); // 显示加载提示
|
||||
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // 你的图片上传接口 URL
|
||||
filePath: filePath, // 直接使用文件路径
|
||||
name: "file", // 表单中的文件字段名
|
||||
formData: {
|
||||
Tabletype: "1005", // 表单中其他数据,根据你的接口要求填写
|
||||
},
|
||||
success: async (uploadRes) => {
|
||||
uni.hideLoading(); // 隐藏加载提示
|
||||
let data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
|
||||
let url = data.Result_Data.ImageUrl;
|
||||
console.log('urlurlurlurl', url);
|
||||
|
||||
if (url) {
|
||||
// 调用接口更新用户头像信息
|
||||
let req = {
|
||||
membershipId: this.user.MEMBERSHIP_ID, // 假设 user 对象中包含用户 ID
|
||||
headImgUrl: url,
|
||||
};
|
||||
|
||||
const userInfoData = await _this.$api.$get(
|
||||
"/WeChat/UpdateMemberInfo", // 你的更新用户信息接口 URL
|
||||
req
|
||||
);
|
||||
|
||||
if (userInfoData.Result_Code === 100) {
|
||||
uni.showToast({ title: '头像更新成功', icon: 'success' });
|
||||
// 重新获取用户最新信息,更新页面显示
|
||||
_this.showAvatar = false
|
||||
_this.handleGetUserInfo();
|
||||
} else {
|
||||
uni.showToast({ title: userInfoData.Result_Desc || '更新头像失败', icon: 'none' });
|
||||
// 如果更新失败,重新获取用户信息以显示正确的头像
|
||||
_this.handleGetUserInfo();
|
||||
}
|
||||
} else {
|
||||
uni.showToast({ title: data.Result_Desc || '上传图片失败', icon: 'none' });
|
||||
}
|
||||
},
|
||||
fail: (uploadErr) => {
|
||||
uni.hideLoading(); // 隐藏加载提示
|
||||
uni.showToast({ title: '上传图片失败', icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转去登录
|
||||
handleGoLogin() {
|
||||
if (this.loginType === "min") {
|
||||
@ -864,6 +973,15 @@ export default {
|
||||
_this.WXProfile = _data.Data.MEMBERSHIP_HEADIMAGEURL;
|
||||
// _this.setUser(user);
|
||||
_this.$store.commit("setUser", _this.user);
|
||||
|
||||
if (_data.Data.MEMBERSHIP_HEADIMAGEURL) {
|
||||
_this.displayedAvatarUrl = _data.Data.MEMBERSHIP_HEADIMAGEURL + '?t=' + Date.now();
|
||||
} else {
|
||||
_this.displayedAvatarUrl = ''; // 或者设置为默认头像 URL
|
||||
}
|
||||
console.log('_this.displayedAvatarUrl_this.displayedAvatarUrl_this.displayedAvatarUrl', _this.displayedAvatarUrl);
|
||||
_this.$forceUpdate()
|
||||
_this.showAvatar = true
|
||||
} else {
|
||||
// _this.setUser({});
|
||||
_this.$store.commit("setUser", user);
|
||||
@ -1097,6 +1215,12 @@ export default {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.headerImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.userInfoBox {
|
||||
|
||||
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
4074
unpackage/dist/dev/app-plus/app-service.js
vendored
4074
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
3132
unpackage/dist/dev/app-plus/app-view.js
vendored
3132
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
@ -1119,8 +1119,8 @@ function populateParameters(result) {
|
||||
var parameters = {
|
||||
appId: "__UNI__F870657",
|
||||
appName: "驿佳",
|
||||
appVersion: "1.0.20",
|
||||
appVersionCode: "1020",
|
||||
appVersion: "1.0.23",
|
||||
appVersionCode: "1023",
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
uniCompileVersion: "4.45",
|
||||
uniCompilerVersion: "4.45",
|
||||
@ -1220,8 +1220,8 @@ var getAppBaseInfo = {
|
||||
result = sortObject(Object.assign(result, {
|
||||
appId: "__UNI__F870657",
|
||||
appName: "驿佳",
|
||||
appVersion: "1.0.20",
|
||||
appVersionCode: "1020",
|
||||
appVersion: "1.0.23",
|
||||
appVersionCode: "1023",
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
hostVersion: version,
|
||||
hostLanguage: hostLanguage,
|
||||
@ -25704,6 +25704,7 @@ exports.handleGetAndroidPosition = handleGetAndroidPosition;
|
||||
exports.handleGetIOSPosition = handleGetIOSPosition;
|
||||
exports.handleGetNearService = handleGetNearService;
|
||||
exports.handleGetNearThreeService = handleGetNearThreeService;
|
||||
exports.handleGetPosition = handleGetPosition;
|
||||
exports.handleGetUserPointInfo = handleGetUserPointInfo;
|
||||
exports.handleHavePointInApp = handleHavePointInApp;
|
||||
exports.handleHavePointInMin = handleHavePointInMin;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
@ -333,19 +333,20 @@ var _default = {
|
||||
case 0:
|
||||
_this = _this2;
|
||||
if (!(_this2.isRight && _this2.phone)) {
|
||||
_context.next = 11;
|
||||
_context.next = 12;
|
||||
break;
|
||||
}
|
||||
// 计时器
|
||||
_this.handleSetInter();
|
||||
_this.pendCode = true;
|
||||
req = {
|
||||
action_type: "GetSMSIdentityCode",
|
||||
action_data: _this.phone,
|
||||
time: Date.now()
|
||||
};
|
||||
_context.next = 6;
|
||||
_context.next = 7;
|
||||
return _this2.$api.$getLogin(req);
|
||||
case 6:
|
||||
case 7:
|
||||
res = _context.sent;
|
||||
obj = res.ResultObject[0];
|
||||
if (obj.ResultCode === '100') {
|
||||
@ -359,15 +360,15 @@ var _default = {
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
_context.next = 12;
|
||||
_context.next = 13;
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
uni.showToast({
|
||||
title: "请检查输入的手机号",
|
||||
duration: 2000,
|
||||
icon: "none"
|
||||
});
|
||||
case 12:
|
||||
case 13:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
|
||||
136
unpackage/dist/dev/mp-weixin/pages/login/register.js
vendored
136
unpackage/dist/dev/mp-weixin/pages/login/register.js
vendored
@ -137,52 +137,13 @@ __webpack_require__.r(__webpack_exports__);
|
||||
"use strict";
|
||||
/* WEBPACK VAR INJECTION */(function(uni) {
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
|
||||
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -282,7 +243,9 @@ var _default = {
|
||||
// 剩余秒数
|
||||
isAgree: false,
|
||||
//协议是否同意
|
||||
isClick: true // 判断当前是否变点击了
|
||||
isClick: true,
|
||||
// 判断当前是否变点击了
|
||||
timer: null // 定时器
|
||||
};
|
||||
},
|
||||
onload: function onload() {
|
||||
@ -333,41 +296,76 @@ var _default = {
|
||||
},
|
||||
// 得到验证码
|
||||
handleGetCode: function handleGetCode() {
|
||||
var _this = this;
|
||||
console.log("this.phone", this.phone);
|
||||
console.log("this.isRight", this.isRight);
|
||||
if (this.isRight && this.phone) {
|
||||
this.pendCode = true;
|
||||
this.handleSetInter();
|
||||
this.$api.getCoop({
|
||||
action_type: "GetSMSIdentityCode",
|
||||
action_data: this.phone
|
||||
}).then(function (res) {
|
||||
console.log("res", res);
|
||||
var obj = res.ResultObject[0];
|
||||
_this.currentCode = obj.FirstParameter;
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "请检查输入的手机号",
|
||||
duration: 2000,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
var _this2 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||
var _this, req, res, obj;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_this = _this2;
|
||||
if (!(_this2.isRight && _this2.phone)) {
|
||||
_context.next = 12;
|
||||
break;
|
||||
}
|
||||
// 计时器
|
||||
_this.handleSetInter();
|
||||
_this.pendCode = true;
|
||||
req = {
|
||||
action_type: "GetSMSIdentityCode",
|
||||
action_data: _this.phone,
|
||||
time: Date.now()
|
||||
};
|
||||
_context.next = 7;
|
||||
return _this2.$api.$getLogin(req);
|
||||
case 7:
|
||||
res = _context.sent;
|
||||
obj = res.ResultObject[0];
|
||||
if (obj.ResultCode === '100') {
|
||||
_this.pendCode = true;
|
||||
_this.currentCode = obj.FirstParameter;
|
||||
} else {
|
||||
_this.pendCode = false;
|
||||
clearInterval(_this2.timer);
|
||||
uni.showToast({
|
||||
title: obj.ResultDesc,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
_context.next = 13;
|
||||
break;
|
||||
case 12:
|
||||
uni.showToast({
|
||||
title: "请检查输入的手机号",
|
||||
duration: 2000,
|
||||
icon: "none"
|
||||
});
|
||||
case 13:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
},
|
||||
// 计时器
|
||||
handleSetInter: function handleSetInter() {
|
||||
var _this2 = this;
|
||||
var timer;
|
||||
var _this3 = this;
|
||||
var _this = this;
|
||||
timer = setInterval(function () {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
_this.second = 60;
|
||||
_this.timer = setInterval(function () {
|
||||
if (_this.second === 1) {
|
||||
_this2.pendCode = false;
|
||||
setTimeout(timer);
|
||||
_this.pendCode = false;
|
||||
// setTimeout(timer);
|
||||
_this.second = 60;
|
||||
clearInterval(_this3.timer);
|
||||
} else {
|
||||
_this.second = _this.second - 1;
|
||||
}
|
||||
_this.$forceUpdate();
|
||||
}, 1000);
|
||||
},
|
||||
// 注册
|
||||
|
||||
@ -77,6 +77,29 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
|
||||
var components
|
||||
try {
|
||||
components = {
|
||||
uniRate: function () {
|
||||
return __webpack_require__.e(/*! import() | uni_modules/uni-rate/components/uni-rate/uni-rate */ "uni_modules/uni-rate/components/uni-rate/uni-rate").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-rate/components/uni-rate/uni-rate.vue */ 643))
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
if (
|
||||
e.message.indexOf("Cannot find module") !== -1 &&
|
||||
e.message.indexOf(".vue") !== -1
|
||||
) {
|
||||
console.error(e.message)
|
||||
console.error("1. 排查组件名称拼写是否正确")
|
||||
console.error(
|
||||
"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
|
||||
)
|
||||
console.error(
|
||||
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
|
||||
)
|
||||
} else {
|
||||
throw e
|
||||
}
|
||||
}
|
||||
var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
@ -151,11 +174,6 @@ var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/run
|
||||
var _vuex = __webpack_require__(/*! vuex */ 33);
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
var uniRate = function uniRate() {
|
||||
__webpack_require__.e(/*! require.ensure | uni_modules/uni-rate/components/uni-rate/uni-rate */ "uni_modules/uni-rate/components/uni-rate/uni-rate").then((function () {
|
||||
return resolve(__webpack_require__(/*! @/uni_modules/uni-rate/components/uni-rate/uni-rate.vue */ 643));
|
||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||
};
|
||||
var noData = function noData() {
|
||||
Promise.all(/*! require.ensure | components/noData */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/noData")]).then((function () {
|
||||
return resolve(__webpack_require__(/*! ../../../../components/noData.vue */ 516));
|
||||
@ -180,7 +198,6 @@ var _default = {
|
||||
user: "user"
|
||||
})),
|
||||
components: {
|
||||
uniRate: uniRate,
|
||||
noData: noData
|
||||
},
|
||||
methods: _objectSpread(_objectSpread({}, (0, _vuex.mapMutations)(["setIsLoading"])), {}, {
|
||||
|
||||
@ -313,10 +313,12 @@ var _default = {
|
||||
buyType: "",
|
||||
// 判断能不能点餐 1 是可以点餐
|
||||
isLoading: false,
|
||||
listDetail: {} // 列表带进来的数据 月售和人均
|
||||
listDetail: {},
|
||||
// 列表带进来的数据 月售和人均
|
||||
onLoadMid: "",
|
||||
onLoadType: ""
|
||||
};
|
||||
},
|
||||
|
||||
computed: _objectSpread({}, (0, _vuex.mapGetters)({
|
||||
// 'store': 'nowStore',
|
||||
user: "user",
|
||||
@ -782,19 +784,17 @@ var _default = {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
console.log("2");
|
||||
_this = _this4;
|
||||
_context2.next = 4;
|
||||
_context2.next = 3;
|
||||
return _this4.$api.getCoop({
|
||||
action_type: "GetMerchantsDetails",
|
||||
merchantsId: id
|
||||
});
|
||||
case 4:
|
||||
case 3:
|
||||
res = _context2.sent;
|
||||
// .then(function (res) {
|
||||
// });
|
||||
_data = res.Data;
|
||||
console.log("_datagetShop", _data);
|
||||
_this.merchatsMsg = _data;
|
||||
_this.getCouponList(_data.MERCHANTS_ID); // 获取商家优惠
|
||||
_this.getFoodImages(_data.MERCHANTS_ID); // 加载商家商品推荐
|
||||
@ -804,7 +804,7 @@ var _default = {
|
||||
_this.$refs.merchantEvaluation.loading();
|
||||
}
|
||||
}, 500);
|
||||
case 12:
|
||||
case 10:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
@ -818,6 +818,10 @@ var _default = {
|
||||
sellerId: id
|
||||
}).then(function (data) {
|
||||
_this.couponList = data.Result_Data.List || [];
|
||||
console.log('sellerIdsellerIdsellerIdsellerIdsellerId', {
|
||||
sellerId: id
|
||||
});
|
||||
console.log('_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList_this.couponList', _this.couponList);
|
||||
var tabList = [];
|
||||
var isFood = false;
|
||||
if (_this.couponList && _this.couponList.length > 0) {
|
||||
@ -880,27 +884,27 @@ var _default = {
|
||||
}
|
||||
if (options.stroreDetail) {
|
||||
_this5.listDetail = JSON.parse(options.stroreDetail);
|
||||
console.log("this.listDetail", _this5.listDetail);
|
||||
}
|
||||
_this5.stroreId = options.id;
|
||||
_context3.next = 8;
|
||||
return _this5.getNewGood(options.id, options.province);
|
||||
case 8:
|
||||
_context3.next = 10;
|
||||
// this.merchatsMsg.MERCHANTS_ID = options.mid
|
||||
_this5.onLoadMid = options.mid;
|
||||
_this5.onLoadType = options.type;
|
||||
_context3.next = 12;
|
||||
return _this5.getShop(options.mid, options.type || 0);
|
||||
case 10:
|
||||
case 12:
|
||||
// 获取商户信息
|
||||
_this5.tableNum = options.tableNum || 0; // tableNum 桌号 不等于0说明是门店扫码进入 则当确认订单时 不要选择相关的方向
|
||||
_this5.$store.commit("orderTable", options.tableNum || 0);
|
||||
systemInfo = uni.getSystemInfoSync();
|
||||
console.log('systemInfosystemInfosystemInfosystemInfo', systemInfo);
|
||||
goodsHeight = systemInfo.windowHeight + systemInfo.statusBarHeight - 96; // - 44
|
||||
if (systemInfo.safeArea) {
|
||||
_this5.goodsH = goodsHeight - systemInfo.safeArea.top;
|
||||
} else {
|
||||
_this5.goodsH = goodsHeight;
|
||||
}
|
||||
console.log('this.goodsH this.goodsH this.goodsH this.goodsH ', _this5.goodsH);
|
||||
_this5.$utils.addUserBehaviorNew();
|
||||
case 18:
|
||||
case "end":
|
||||
@ -925,7 +929,6 @@ var _default = {
|
||||
this.isShow = false;
|
||||
},
|
||||
onShow: function onShow() {
|
||||
var _this6 = this;
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (this.shopcartOrder == "") {
|
||||
this.$store.commit("orderRemark", "");
|
||||
@ -938,10 +941,12 @@ var _default = {
|
||||
this.shoppingCateCount = {};
|
||||
}
|
||||
if (this.activeTabs === 2) {
|
||||
setTimeout(function () {
|
||||
_this6.$refs.merchantEvaluation.loading();
|
||||
});
|
||||
this.getShop(this.onLoadMid, this.onLoadType || 0);
|
||||
// setTimeout(() => {
|
||||
// this.$refs.merchantEvaluation.loading();
|
||||
// });
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
},
|
||||
onShareAppMessage: function onShareAppMessage() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -278,7 +278,10 @@ var _default = {
|
||||
// url: "https://eshangtech.com/wanmeiyizhanImg/home/userConfig.svg",
|
||||
// },
|
||||
],
|
||||
toDayHaveSign: false // 今日是否已经签到了
|
||||
toDayHaveSign: false,
|
||||
// 今日是否已经签到了
|
||||
displayedAvatarUrl: "",
|
||||
showAvatar: true // 是否显示头像
|
||||
};
|
||||
},
|
||||
onUnload: function onUnload() {
|
||||
@ -389,6 +392,184 @@ var _default = {
|
||||
},
|
||||
|
||||
methods: {
|
||||
// APP 端选择头像
|
||||
handleChooseAvatarApp: function handleChooseAvatarApp() {
|
||||
var _this2 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||
var _this;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
if (!(!_this2.user || !_this2.user.MEMBERSHIP_ID)) {
|
||||
_context.next = 4;
|
||||
break;
|
||||
}
|
||||
_this = _this2;
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: "请您授权登录后再操作。",
|
||||
success: function success(res) {
|
||||
if (res.confirm) {
|
||||
if (_this.loginType === "min") {
|
||||
uni.navigateTo({
|
||||
url: "/pages/register/index"
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/index"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return _context.abrupt("return");
|
||||
case 4:
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
// 只允许选择一张图片
|
||||
sizeType: ['compressed'],
|
||||
// 压缩图片
|
||||
sourceType: ['album', 'camera'],
|
||||
// 可以从相册或相机选择
|
||||
success: function success(res) {
|
||||
console.log("APP chooseImage success:", res);
|
||||
var tempFilePath = res.tempFilePaths[0]; // 获取临时文件路径
|
||||
if (tempFilePath) {
|
||||
// 直接调用上传方法,传入临时文件路径
|
||||
_this2.uploadAvatarAndSave(tempFilePath);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '未选择图片',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: function fail(err) {
|
||||
console.error("APP chooseImage failed:", err);
|
||||
// 处理用户取消或权限问题
|
||||
if (err.errMsg && err.errMsg.includes('cancel')) {
|
||||
// 用户取消,不提示错误
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '选择图片失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
case 5:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
},
|
||||
// 上传头像并更新用户信息 (这个方法可以复用,接收文件路径)
|
||||
uploadAvatarAndSave: function uploadAvatarAndSave(filePath) {
|
||||
var _this3 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||||
var _this;
|
||||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||||
while (1) {
|
||||
switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
console.log('filePathfilePathfilePath', filePath);
|
||||
_this = _this3;
|
||||
uni.showLoading({
|
||||
title: '上传中...'
|
||||
}); // 显示加载提示
|
||||
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture",
|
||||
// 你的图片上传接口 URL
|
||||
filePath: filePath,
|
||||
// 直接使用文件路径
|
||||
name: "file",
|
||||
// 表单中的文件字段名
|
||||
formData: {
|
||||
Tabletype: "1005" // 表单中其他数据,根据你的接口要求填写
|
||||
},
|
||||
|
||||
success: function () {
|
||||
var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(uploadRes) {
|
||||
var data, url, req, userInfoData;
|
||||
return _regenerator.default.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
uni.hideLoading(); // 隐藏加载提示
|
||||
data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
|
||||
url = data.Result_Data.ImageUrl;
|
||||
console.log('urlurlurlurl', url);
|
||||
if (!url) {
|
||||
_context2.next = 12;
|
||||
break;
|
||||
}
|
||||
// 调用接口更新用户头像信息
|
||||
req = {
|
||||
membershipId: _this3.user.MEMBERSHIP_ID,
|
||||
// 假设 user 对象中包含用户 ID
|
||||
headImgUrl: url
|
||||
};
|
||||
_context2.next = 8;
|
||||
return _this.$api.$get("/WeChat/UpdateMemberInfo",
|
||||
// 你的更新用户信息接口 URL
|
||||
req);
|
||||
case 8:
|
||||
userInfoData = _context2.sent;
|
||||
if (userInfoData.Result_Code === 100) {
|
||||
uni.showToast({
|
||||
title: '头像更新成功',
|
||||
icon: 'success'
|
||||
});
|
||||
// 重新获取用户最新信息,更新页面显示
|
||||
_this.showAvatar = false;
|
||||
_this.handleGetUserInfo();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: userInfoData.Result_Desc || '更新头像失败',
|
||||
icon: 'none'
|
||||
});
|
||||
// 如果更新失败,重新获取用户信息以显示正确的头像
|
||||
_this.handleGetUserInfo();
|
||||
}
|
||||
_context2.next = 13;
|
||||
break;
|
||||
case 12:
|
||||
uni.showToast({
|
||||
title: data.Result_Desc || '上传图片失败',
|
||||
icon: 'none'
|
||||
});
|
||||
case 13:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2);
|
||||
}));
|
||||
function success(_x) {
|
||||
return _success.apply(this, arguments);
|
||||
}
|
||||
return success;
|
||||
}(),
|
||||
fail: function fail(uploadErr) {
|
||||
uni.hideLoading(); // 隐藏加载提示
|
||||
uni.showToast({
|
||||
title: '上传图片失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
case 4:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}
|
||||
}, _callee3);
|
||||
}))();
|
||||
},
|
||||
// 跳转去登录
|
||||
handleGoLogin: function handleGoLogin() {
|
||||
if (this.loginType === "min") {
|
||||
@ -404,13 +585,13 @@ var _default = {
|
||||
// 签到
|
||||
handleSign: function handleSign() {
|
||||
if (this.user && !this.user.MEMBERSHIP_ID || !this.user && !this.user.MEMBERSHIP_ID) {
|
||||
var _this2 = this;
|
||||
var _this4 = this;
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: "请您授权登录后再操作。",
|
||||
success: function success(res) {
|
||||
if (res.confirm) {
|
||||
if (_this2.loginType === "min") {
|
||||
if (_this4.loginType === "min") {
|
||||
uni.navigateTo({
|
||||
url: "/pages/register/index"
|
||||
});
|
||||
@ -647,12 +828,12 @@ var _default = {
|
||||
},
|
||||
// 微信用户头像
|
||||
onChooseAvatar: function onChooseAvatar(e) {
|
||||
var _this3 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||||
var _this5 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
||||
var _this;
|
||||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||||
return _regenerator.default.wrap(function _callee6$(_context6) {
|
||||
while (1) {
|
||||
switch (_context3.prev = _context3.next) {
|
||||
switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
console.log("e", e);
|
||||
// this.WXProfile = e.detail.avatarUrl;
|
||||
@ -660,8 +841,8 @@ var _default = {
|
||||
// if (!this.WXProfile) {
|
||||
// return;
|
||||
// }
|
||||
_this = _this3;
|
||||
console.log("this.user", _this3.user);
|
||||
_this = _this5;
|
||||
console.log("this.user", _this5.user);
|
||||
uni.uploadFile({
|
||||
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture",
|
||||
// 你的接口 URL
|
||||
@ -673,52 +854,52 @@ var _default = {
|
||||
},
|
||||
|
||||
success: function () {
|
||||
var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(uploadRes) {
|
||||
var _success2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(uploadRes) {
|
||||
var data, url, req, userInfoData;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
return _regenerator.default.wrap(function _callee4$(_context4) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
|
||||
url = data.Result_Data.ImageUrl;
|
||||
console.log("url", url);
|
||||
if (!url) {
|
||||
_context.next = 11;
|
||||
_context4.next = 11;
|
||||
break;
|
||||
}
|
||||
req = {
|
||||
membershipId: _this3.user.MEMBERSHIP_ID,
|
||||
membershipId: _this5.user.MEMBERSHIP_ID,
|
||||
headImgUrl: url
|
||||
};
|
||||
_this.WXProfile = url;
|
||||
_context.next = 8;
|
||||
_context4.next = 8;
|
||||
return _this.$api.$get("/WeChat/UpdateMemberInfo", req);
|
||||
case 8:
|
||||
userInfoData = _context.sent;
|
||||
userInfoData = _context4.sent;
|
||||
console.log("userInfoData", userInfoData);
|
||||
if (userInfoData.Result_Code === 100) {
|
||||
_this.handleGetUserInfo();
|
||||
}
|
||||
case 11:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
return _context4.stop();
|
||||
}
|
||||
}
|
||||
}, _callee);
|
||||
}, _callee4);
|
||||
}));
|
||||
function success(_x) {
|
||||
return _success.apply(this, arguments);
|
||||
function success(_x2) {
|
||||
return _success2.apply(this, arguments);
|
||||
}
|
||||
return success;
|
||||
}()
|
||||
});
|
||||
return _context3.abrupt("return");
|
||||
return _context6.abrupt("return");
|
||||
case 6:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
return _context6.stop();
|
||||
}
|
||||
}
|
||||
}, _callee3);
|
||||
}, _callee6);
|
||||
}))();
|
||||
},
|
||||
// 拿用户最新的user信息
|
||||
@ -748,6 +929,15 @@ var _default = {
|
||||
_this.WXProfile = _data.Data.MEMBERSHIP_HEADIMAGEURL;
|
||||
// _this.setUser(user);
|
||||
_this.$store.commit("setUser", _this.user);
|
||||
if (_data.Data.MEMBERSHIP_HEADIMAGEURL) {
|
||||
_this.displayedAvatarUrl = _data.Data.MEMBERSHIP_HEADIMAGEURL + '?t=' + Date.now();
|
||||
} else {
|
||||
_this.displayedAvatarUrl = ''; // 或者设置为默认头像 URL
|
||||
}
|
||||
|
||||
console.log('_this.displayedAvatarUrl_this.displayedAvatarUrl_this.displayedAvatarUrl', _this.displayedAvatarUrl);
|
||||
_this.$forceUpdate();
|
||||
_this.showAvatar = true;
|
||||
} else {
|
||||
// _this.setUser({});
|
||||
_this.$store.commit("setUser", user);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -38,6 +38,11 @@
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.main .content .top .userInfoLeft .userFile .headerImg.data-v-d596de08 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.main .content .top .userInfoLeft .userInfoBox.data-v-d596de08 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -8,14 +8,7 @@
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pages/userConfig/index",
|
||||
"pathName": "pages/userConfig/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/login/index",
|
||||
"name": "pages/register/index",
|
||||
"pathName": "pages/login/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
|
||||
@ -32,7 +32,7 @@ export async function handleGetUserPointInfo() {
|
||||
}
|
||||
|
||||
// 三个平台拿到当前位置的方法 反正最后输出经纬度的数据就好
|
||||
async function handleGetPosition() {
|
||||
export async function handleGetPosition() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const res = await uni.getSetting();
|
||||
const times = uni.getStorageSync("howTimes");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user