update
This commit is contained in:
parent
e1f39fd953
commit
b59efd68b4
3
App.vue
3
App.vue
@ -119,6 +119,7 @@ export default {
|
|||||||
.then(function (data) {
|
.then(function (data) {
|
||||||
if (data.ResultCode === "100") {
|
if (data.ResultCode === "100") {
|
||||||
let _data = data;
|
let _data = data;
|
||||||
|
console.log("获取会员信息成功", _data);
|
||||||
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
|
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
|
||||||
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
|
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
|
||||||
_this.user.MEMBERSHIP_LEVEL_TEXT =
|
_this.user.MEMBERSHIP_LEVEL_TEXT =
|
||||||
@ -134,6 +135,8 @@ export default {
|
|||||||
_this.user.MEMBERSHIP_LEVEL = _data.Data.MEMBERSHIP_LEVEL || "";
|
_this.user.MEMBERSHIP_LEVEL = _data.Data.MEMBERSHIP_LEVEL || "";
|
||||||
_this.user.InviteCode = _data.Data.InviteCode || "";
|
_this.user.InviteCode = _data.Data.InviteCode || "";
|
||||||
_this.user.MEMBERSHIP_POINT = _data.Data.MEMBERSHIP_POINT || "";
|
_this.user.MEMBERSHIP_POINT = _data.Data.MEMBERSHIP_POINT || "";
|
||||||
|
_this.user.NICK_NAME = _data.Data.NICK_NAME || "";
|
||||||
|
|
||||||
_this.user.MEMBERSHIP_MOBILEPHONE =
|
_this.user.MEMBERSHIP_MOBILEPHONE =
|
||||||
_data.Data.MEMBERSHIP_MOBILEPHONE || "";
|
_data.Data.MEMBERSHIP_MOBILEPHONE || "";
|
||||||
// _this.setUser(user);
|
// _this.setUser(user);
|
||||||
|
|||||||
@ -878,7 +878,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 跳转到选择服务区
|
// 跳转到选择服务区
|
||||||
goSelectServer() {
|
goSelectServer() {
|
||||||
uni.navigateTo({ url: "/pages/newMap/index/index" });
|
uni.navigateTo({ url: "/pages/newMap/index/index?comeForm=home" });
|
||||||
},
|
},
|
||||||
// 返回上级页面
|
// 返回上级页面
|
||||||
handleBack() {
|
handleBack() {
|
||||||
|
|||||||
@ -57,7 +57,8 @@
|
|||||||
: shopTypeList.length * 136 + 60 + 'rpx',
|
: shopTypeList.length * 136 + 60 + 'rpx',
|
||||||
}" -->
|
}" -->
|
||||||
<!-- 工会之家 -->
|
<!-- 工会之家 -->
|
||||||
<div class="rowBox" @click="handleGoUnionMall" v-if="pageType !== 'UnionMall'">
|
<div class="rowBox" @click="handleGoUnionMall"
|
||||||
|
v-if="pageType !== 'UnionMall' && user && user.INDUSTRY_MEMBERSHIP_ID">
|
||||||
<div class="imgBox">
|
<div class="imgBox">
|
||||||
<div class="itemImgBox">
|
<div class="itemImgBox">
|
||||||
<image class="img" src="/static/images/home/unionMallIcon.svg"></image>
|
<image class="img" src="/static/images/home/unionMallIcon.svg"></image>
|
||||||
@ -633,6 +634,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from "vuex";
|
||||||
import shopTabbar from "../../../components/shopTabbar.vue";
|
import shopTabbar from "../../../components/shopTabbar.vue";
|
||||||
export default {
|
export default {
|
||||||
components: { shopTabbar },
|
components: { shopTabbar },
|
||||||
@ -692,8 +694,14 @@ export default {
|
|||||||
priceRangeRefShow: false
|
priceRangeRefShow: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters({
|
||||||
|
user: "user",
|
||||||
|
}),
|
||||||
|
},
|
||||||
async onLoad(query) {
|
async onLoad(query) {
|
||||||
console.log("query", query);
|
console.log("query", query);
|
||||||
|
console.log("user", this.user);
|
||||||
this.menu = uni.getMenuButtonBoundingClientRect();
|
this.menu = uni.getMenuButtonBoundingClientRect();
|
||||||
this.pageType = query.pageType;
|
this.pageType = query.pageType;
|
||||||
// 判断这个用户是不是第一次进入到商城
|
// 判断这个用户是不是第一次进入到商城
|
||||||
@ -1575,8 +1583,12 @@ export default {
|
|||||||
// 返回首页
|
// 返回首页
|
||||||
handleBackHome() {
|
handleBackHome() {
|
||||||
if (this.pageType === "UnionMall") {
|
if (this.pageType === "UnionMall") {
|
||||||
uni.navigateBack({
|
// uni.navigateBack({
|
||||||
delta: 1,
|
// delta: 1,
|
||||||
|
// });
|
||||||
|
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `/pages/shopMallPage/index/index`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|||||||
@ -25,7 +25,8 @@
|
|||||||
<div class="scrollBox">
|
<div class="scrollBox">
|
||||||
<!-- :style="{ width: (shopTypeList.length + 2) * 70 + 'px' }" -->
|
<!-- :style="{ width: (shopTypeList.length + 2) * 70 + 'px' }" -->
|
||||||
|
|
||||||
<div class="bigTabItem" @click="handleGoUnionMall" v-if="pageType !== 'UnionMall'">
|
<div class="bigTabItem" @click="handleGoUnionMall"
|
||||||
|
v-if="pageType !== 'UnionMall' && user && user.INDUSTRY_MEMBERSHIP_ID">
|
||||||
<!-- style="width: 70px" -->
|
<!-- style="width: 70px" -->
|
||||||
|
|
||||||
<div class="itemBox">
|
<div class="itemBox">
|
||||||
|
|||||||
@ -440,6 +440,20 @@ export default {
|
|||||||
|
|
||||||
console.log("this.user", this.user);
|
console.log("this.user", this.user);
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
|
|
||||||
|
// 因为当有些商品整数 有些商品小数 接口那边会将小数点部分直接去掉 所以我们这边处理一下 把价钱字段转为字符串
|
||||||
|
let newShopList = JSON.parse(JSON.stringify(this.shopOrder));
|
||||||
|
newShopList.forEach((item) => {
|
||||||
|
item.AVERAGE_PRICE = item.AVERAGE_PRICE.toString();
|
||||||
|
item.COMMODITY_CURRPRICE = item.COMMODITY_CURRPRICE.toString();
|
||||||
|
item.ORDER_AMOUNT = item.ORDER_AMOUNT.toString();
|
||||||
|
item.ORDER_COUNT = item.ORDER_COUNT.toString();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log('newShopListnewShopList', newShopList);
|
||||||
|
|
||||||
|
|
||||||
let req = {
|
let req = {
|
||||||
action_type: "ScanOrder",
|
action_type: "ScanOrder",
|
||||||
salebillType:
|
salebillType:
|
||||||
@ -467,7 +481,8 @@ export default {
|
|||||||
? this.addressInfo.MOBILEPHONE
|
? this.addressInfo.MOBILEPHONE
|
||||||
: this.phoneNumber,
|
: this.phoneNumber,
|
||||||
// couponCode: '',//优惠券
|
// couponCode: '',//优惠券
|
||||||
t_saleorderdetail: JSON.stringify(this.shopOrder),
|
// t_saleorderdetail: JSON.stringify(this.shopOrder),
|
||||||
|
t_saleorderdetail: JSON.stringify(newShopList),
|
||||||
recommendCode: app.globalData.recommendCode || "",
|
recommendCode: app.globalData.recommendCode || "",
|
||||||
recommendId: app.globalData.recommendId || "",
|
recommendId: app.globalData.recommendId || "",
|
||||||
requestType: "application/x-www-form-urlencoded",
|
requestType: "application/x-www-form-urlencoded",
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="userInfoMessage">
|
<view class="userInfoMessage">
|
||||||
<view class="userInfoName">{{ user.MEMBERSHIP_NAME || '' }}</view>
|
<view class="userInfoName">{{ userInfo.NICK_NAME || user.MEMBERSHIP_NAME || '' }}</view>
|
||||||
<view class="mainTopMessageUserLevelBox">
|
<view class="mainTopMessageUserLevelBox">
|
||||||
<image class="mainTopMessageUserLevelIcon"
|
<image class="mainTopMessageUserLevelIcon"
|
||||||
src="https://eshangtech.com/caiyunyiImg/levelIcon.png" />
|
src="https://eshangtech.com/caiyunyiImg/levelIcon.png" />
|
||||||
@ -28,12 +28,12 @@
|
|||||||
<text class="rightText">{{ phone }}</text>
|
<text class="rightText">{{ phone }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="userInfoItem">
|
<!-- <view class="userInfoItem">
|
||||||
<view class="userInfoItemLabel">实名认证</view>
|
<view class="userInfoItemLabel">实名认证</view>
|
||||||
<view class="userInfoItemRight">
|
<view class="userInfoItemRight">
|
||||||
<image class="rightArrow" src="https://eshangtech.com/caiyunyiImg/rightArrow.png" />
|
<image class="rightArrow" src="https://eshangtech.com/caiyunyiImg/rightArrow.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="userInfoItem" @click="handleGoAddress">
|
<view class="userInfoItem" @click="handleGoAddress">
|
||||||
<view class="userInfoItemLabel">地址管理</view>
|
<view class="userInfoItemLabel">地址管理</view>
|
||||||
<view class="userInfoItemRight">
|
<view class="userInfoItemRight">
|
||||||
@ -224,6 +224,12 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
// // 拿用户信息
|
||||||
|
// this.handleGetUserDetail();
|
||||||
|
// // 拿到用户新的信息
|
||||||
|
// this.handleGetUserNewInfo();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
// 拿用户信息
|
// 拿用户信息
|
||||||
this.handleGetUserDetail();
|
this.handleGetUserDetail();
|
||||||
// 拿到用户新的信息
|
// 拿到用户新的信息
|
||||||
@ -479,6 +485,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.userInfoBoxLeft {
|
.userInfoBoxLeft {
|
||||||
|
width: calc(100% - 32rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
@ -495,7 +502,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.userInfoMessage {
|
.userInfoMessage {
|
||||||
|
width: calc(100% - 138rpx);
|
||||||
|
|
||||||
.userInfoName {
|
.userInfoName {
|
||||||
|
width: 100%;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
@ -503,10 +513,13 @@ export default {
|
|||||||
line-height: 56rpx;
|
line-height: 56rpx;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainTopMessageUserLevelBox {
|
.mainTopMessageUserLevelBox {
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #515050;
|
background-color: #515050;
|
||||||
padding: 4rpx 18rpx;
|
padding: 4rpx 18rpx;
|
||||||
@ -535,6 +548,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.userInfoBoxRight {
|
.userInfoBoxRight {
|
||||||
|
width: 32rpx;
|
||||||
|
|
||||||
.rightArrow {
|
.rightArrow {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
|
|||||||
@ -4,6 +4,15 @@
|
|||||||
<view class="userInfoItem">
|
<view class="userInfoItem">
|
||||||
<view class="userInfoItemLabel">头像</view>
|
<view class="userInfoItemLabel">头像</view>
|
||||||
<view class="userInfoItemRight">
|
<view class="userInfoItemRight">
|
||||||
|
<view class="headerImgBox">
|
||||||
|
<button class="avatarBtn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||||
|
<image class="headerImg" :src="WXProfile ||
|
||||||
|
(userInfo && userInfo.MEMBERSHIP_HEADIMAGEURL
|
||||||
|
? userInfo.MEMBERSHIP_HEADIMAGEURL
|
||||||
|
: '')
|
||||||
|
" />
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="userInfoItem">
|
<view class="userInfoItem">
|
||||||
@ -28,21 +37,45 @@
|
|||||||
<view class="userInfoItem">
|
<view class="userInfoItem">
|
||||||
<view class="userInfoItemLabel">生日</view>
|
<view class="userInfoItemLabel">生日</view>
|
||||||
<view class="userInfoItemRight">
|
<view class="userInfoItemRight">
|
||||||
<picker mode="multiSelector" @change="bindMultiPickerChange"
|
<picker mode="date" @change="bindMultiPickerChange">
|
||||||
@columnchange="bindMultiPickerColumnChange" :value="multiIndex" :range="multiArray">
|
|
||||||
<view class="phoneBox">{{ birthday || '请选择生日' }}</view>
|
<view class="phoneBox">{{ birthday || '请选择生日' }}</view>
|
||||||
</picker>
|
</picker>
|
||||||
|
|
||||||
|
<!-- <picker mode="multiSelector" @change="bindMultiPickerChange"
|
||||||
|
@columnchange="bindMultiPickerColumnChange" :value="multiIndex" :range="multiArray">
|
||||||
|
<view class="phoneBox">{{ birthday || '请选择生日' }}</view>
|
||||||
|
</picker> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="userInfoItem">
|
<view class="userInfoItem">
|
||||||
<view class="userInfoItemLabel">邮箱地址</view>
|
<view class="userInfoItemLabel">邮箱地址</view>
|
||||||
<view class="userInfoItemRight">
|
<view class="userInfoItemRight">
|
||||||
<input class="phoneBox" v-model="email" placeholder="请输入昵称" />
|
<input class="phoneBox" v-model="email" placeholder="请输入邮箱地址" @blur="validateEmail" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="userInfoContent">
|
||||||
|
<view class="userInfoItem">
|
||||||
|
<view class="userInfoItemLabel">真实姓名</view>
|
||||||
|
<view class="userInfoItemRight">
|
||||||
|
<input class="phoneBox" v-model="realName" placeholder="请输入真实姓名" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="userInfoItem">
|
||||||
|
<view class="userInfoItemLabel">身份证号</view>
|
||||||
|
<view class="userInfoItemRight">
|
||||||
|
<input class="phoneBox" v-model="idCard" placeholder="请输入身份证号" @blur="validateIdCard" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btnBox">
|
||||||
|
<view class="saveBtn" style="margin-bottom: 24rpx;" @click="handleSaveChange">保存修改</view>
|
||||||
|
<view class="loginOut" @click="handleGoLoginOut">退出登录</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -55,10 +88,13 @@ export default {
|
|||||||
editableNickname: "",// 昵称
|
editableNickname: "",// 昵称
|
||||||
genderArray: ['男', '女'], // 性别选项
|
genderArray: ['男', '女'], // 性别选项
|
||||||
genderIndex: 0, // 选中的性别索引
|
genderIndex: 0, // 选中的性别索引
|
||||||
multiArray: [['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], Array.from({ length: 31 }, (_, i) => `${i + 1}日`)], // 多列选择器的数据
|
|
||||||
multiIndex: [0, 0], // 多列选择器的选中索引
|
|
||||||
birthday: '',
|
birthday: '',
|
||||||
email: '', // 邮箱地址
|
email: '', // 邮箱地址
|
||||||
|
realName: "",
|
||||||
|
idCard: "",
|
||||||
|
userInfo: {},
|
||||||
|
emailError: false, // 判断邮箱校验是否通过
|
||||||
|
idCardError: false, // 判断身份证号校验是否通过
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -66,52 +102,167 @@ export default {
|
|||||||
user: "user",
|
user: "user",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
onLoad() {
|
async onLoad() {
|
||||||
|
await this.handleGetUserDetail()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 退出登录
|
||||||
|
handleGoLoginOut() {
|
||||||
|
let _this = this
|
||||||
|
uni.showModal({
|
||||||
|
content: '确定退出登录?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.clearStorageSync()
|
||||||
|
_this.$store.commit('RESET_ALL_STATE')
|
||||||
|
setTimeout(() => {
|
||||||
|
try {
|
||||||
|
// 尝试使用reLaunch完全重启应用
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
// 如果reLaunch失败,则使用switchTab
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
} else if (res.cancel) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 保存信息修改
|
||||||
|
async handleSaveChange() {
|
||||||
|
console.log('this.emailthis.email', this.email);
|
||||||
|
|
||||||
|
if (!this.emailError && this.email) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '邮箱地址错误!',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.idCardError && this.idCard) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '身份证号错误!',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 进行保存操作
|
||||||
|
const req = {
|
||||||
|
Membership_NickName: this.editableNickname,
|
||||||
|
Membership_Sex: this.genderArray[this.genderIndex] === '男' ? 0 : 1,
|
||||||
|
Membership_Birthday: this.birthday,
|
||||||
|
Certificate_Number: this.idNumber,
|
||||||
|
Membership_Email: this.email,
|
||||||
|
// this.realName
|
||||||
|
CERTIFICATE_NUMBER: this.idCard,
|
||||||
|
type: 'encryption1'
|
||||||
|
}
|
||||||
|
console.log('reqreqreqreq', req);
|
||||||
|
|
||||||
|
const userInfoData = await this.$api.$post(
|
||||||
|
"/WeChat/ModifyMemberInfo",
|
||||||
|
req
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log('userInfoData', userInfoData);
|
||||||
|
if (userInfoData.Result_Code === 100) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1 // 返回上一页
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改失败,请稍后再试',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validateIdCard() {
|
||||||
|
// 简单的中国大陆身份证号校验(18位或15位)
|
||||||
|
const idCardPattern = /^(^[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X|x)$)|(^[1-9]\d{7}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}$)$/;
|
||||||
|
if (this.idCard && idCardPattern.test(this.idCard)) {
|
||||||
|
this.idCardError = true
|
||||||
|
} else {
|
||||||
|
this.idCardError = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validateEmail() {
|
||||||
|
// 简单邮箱正则
|
||||||
|
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||||
|
if (this.email && emailPattern.test(this.email)) {
|
||||||
|
this.emailError = true
|
||||||
|
} else {
|
||||||
|
this.emailError = false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 性别选择改变
|
// 性别选择改变
|
||||||
bindGenderChange(e) {
|
bindGenderChange(e) {
|
||||||
this.genderIndex = e.detail.value
|
this.genderIndex = e.detail.value
|
||||||
},
|
},
|
||||||
// 生日多列选择器值改变
|
// 生日多列选择器值改变
|
||||||
bindMultiPickerChange(e) {
|
bindMultiPickerChange(e) {
|
||||||
this.multiIndex = e.detail.value;
|
console.log('eee', e);
|
||||||
const month = this.multiIndex[0] + 1;
|
this.birthday = e.detail.value;
|
||||||
const day = this.multiIndex[1] + 1;
|
|
||||||
// 格式化为 MM-DD 字符串,不足两位前补零
|
|
||||||
const formattedMonth = month < 10 ? '0' + month : month;
|
|
||||||
const formattedDay = day < 10 ? '0' + day : day;
|
|
||||||
this.birthday = `${formattedMonth}-${formattedDay}`;
|
|
||||||
},
|
},
|
||||||
// 生日多列选择器列改变
|
// 用户上传头像
|
||||||
bindMultiPickerColumnChange(e) {
|
async onChooseAvatar(e) {
|
||||||
const data = [...this.multiArray]; // 复制 multiArray
|
let _this = this;
|
||||||
const multiIndex = [...this.multiIndex]; // 复制 multiIndex
|
uni.uploadFile({
|
||||||
multiIndex[e.detail.column] = e.detail.value;
|
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // 你的接口 URL
|
||||||
|
filePath: e.detail.avatarUrl,
|
||||||
if (e.detail.column === 0) { // 月份列改变
|
name: "file", // 表单中的文件字段名
|
||||||
const month = e.detail.value + 1; // 月份是 1-based
|
formData: {
|
||||||
let daysInMonth = 31;
|
Tabletype: "1005", // 表单中其他数据
|
||||||
if (month === 4 || month === 6 || month === 9 || month === 11) {
|
},
|
||||||
daysInMonth = 30;
|
success: async (uploadRes) => {
|
||||||
} else if (month === 2) {
|
let data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
|
||||||
// 简化处理,不考虑闰年,二月按 28 天计算
|
let url = data.Result_Data.ImageUrl;
|
||||||
daysInMonth = 28;
|
if (url) {
|
||||||
}
|
let req = {
|
||||||
// 生成新的天数数组
|
membershipId: this.user.MEMBERSHIP_ID,
|
||||||
const daysArray = Array.from({ length: daysInMonth }, (_, i) => `${i + 1}日`);
|
headImgUrl: url,
|
||||||
data[1] = daysArray; // 更新天数数组
|
};
|
||||||
|
_this.WXProfile = url;
|
||||||
// 如果之前选择的天数索引超出新月份的天数范围,则重置天数索引
|
const userInfoData = await _this.$api.$get(
|
||||||
if (multiIndex[1] >= daysInMonth) {
|
"/WeChat/UpdateMemberInfo",
|
||||||
multiIndex[1] = daysInMonth - 1;
|
req
|
||||||
|
);
|
||||||
|
if (userInfoData.Result_Code === 100) {
|
||||||
|
_this.handleGetUserDetail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 拿到用户详情
|
||||||
|
async handleGetUserDetail() {
|
||||||
|
const userData = await this.$api.getCoop({
|
||||||
|
action_type: "GetMembershipInfo",
|
||||||
|
WechatUserId: this.user.WechatUserId,
|
||||||
|
});
|
||||||
|
this.userInfo = userData.Data;
|
||||||
|
this.editableNickname = this.userInfo.NICK_NAME // 昵称
|
||||||
|
this.genderIndex = this.userInfo.MEMBERSHIP_SEX // 性别
|
||||||
|
this.birthday = this.$utils.formatDate(this.userInfo.MEMBERSHIP_BIRTHDAY) // 生日
|
||||||
|
this.email = this.userInfo.MEMBERSHIP_EMAIL // 邮箱地址
|
||||||
|
this.validateEmail()
|
||||||
|
|
||||||
// 更新数据和索引
|
// this.realName = this.userInfo.MEMBERSHIP_REALNAME // 真实姓名
|
||||||
this.multiArray = data;
|
|
||||||
this.multiIndex = multiIndex;
|
this.$forceUpdate();
|
||||||
|
console.log("this.userInfo", JSON.parse(JSON.stringify(this.userInfo)));
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,6 +272,7 @@ export default {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.userInfoContent {
|
.userInfoContent {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -170,8 +322,60 @@ export default {
|
|||||||
color: #a1a1a1;
|
color: #a1a1a1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.headerImgBox {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
|
||||||
|
.avatarBtn {
|
||||||
|
width: 64rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
padding: 0 !important;
|
||||||
|
|
||||||
|
.headerImg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnBox {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 60rpx;
|
||||||
|
|
||||||
|
.saveBtn {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 48rpx;
|
||||||
|
background-color: #07C160;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginOut {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 48rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #07C160;
|
||||||
|
text-align: center;
|
||||||
|
font-style: normal;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
border: 1px solid #07C160;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -21,7 +21,8 @@
|
|||||||
<view class="userInfo">
|
<view class="userInfo">
|
||||||
<view class="userInfoLeft">
|
<view class="userInfoLeft">
|
||||||
<view class="userInfoLeftTop">
|
<view class="userInfoLeftTop">
|
||||||
<view class="userName">{{ user.NICK_NAME || user.MEMBERSHIP_NAME || "未填写名称" }}</view>
|
<view class="userName">{{ inShop === 2 ? (user.MEMBERSHIP_NAME || "微信用户") : (user.NICK_NAME ||
|
||||||
|
user.MEMBERSHIP_NAME || "未填写名称") }}</view>
|
||||||
<view class="userLevel">
|
<view class="userLevel">
|
||||||
<image class="userLevelIcon" src="https://eshangtech.com/caiyunyiImg/levelIcon.png" />
|
<image class="userLevelIcon" src="https://eshangtech.com/caiyunyiImg/levelIcon.png" />
|
||||||
<view class="userLevelName">{{ user.MEMBERSHIP_LEVEL_TEXT || "" }}</view>
|
<view class="userLevelName">{{ user.MEMBERSHIP_LEVEL_TEXT || "" }}</view>
|
||||||
@ -943,8 +944,6 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.userInfo {
|
.userInfo {
|
||||||
|
|||||||
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
2
unpackage/dist/dev/mp-weixin/common/main.js
vendored
2
unpackage/dist/dev/mp-weixin/common/main.js
vendored
@ -244,6 +244,7 @@ var _default = {
|
|||||||
}).then(function (data) {
|
}).then(function (data) {
|
||||||
if (data.ResultCode === "100") {
|
if (data.ResultCode === "100") {
|
||||||
var _data = data;
|
var _data = data;
|
||||||
|
console.log("获取会员信息成功", _data);
|
||||||
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
|
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
|
||||||
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
|
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
|
||||||
_this.user.MEMBERSHIP_LEVEL_TEXT = _data.Data.MEMBERSHIP_LEVEL_TEXT || "";
|
_this.user.MEMBERSHIP_LEVEL_TEXT = _data.Data.MEMBERSHIP_LEVEL_TEXT || "";
|
||||||
@ -257,6 +258,7 @@ var _default = {
|
|||||||
_this.user.MEMBERSHIP_LEVEL = _data.Data.MEMBERSHIP_LEVEL || "";
|
_this.user.MEMBERSHIP_LEVEL = _data.Data.MEMBERSHIP_LEVEL || "";
|
||||||
_this.user.InviteCode = _data.Data.InviteCode || "";
|
_this.user.InviteCode = _data.Data.InviteCode || "";
|
||||||
_this.user.MEMBERSHIP_POINT = _data.Data.MEMBERSHIP_POINT || "";
|
_this.user.MEMBERSHIP_POINT = _data.Data.MEMBERSHIP_POINT || "";
|
||||||
|
_this.user.NICK_NAME = _data.Data.NICK_NAME || "";
|
||||||
_this.user.MEMBERSHIP_MOBILEPHONE = _data.Data.MEMBERSHIP_MOBILEPHONE || "";
|
_this.user.MEMBERSHIP_MOBILEPHONE = _data.Data.MEMBERSHIP_MOBILEPHONE || "";
|
||||||
// _this.setUser(user);
|
// _this.setUser(user);
|
||||||
_this.$store.commit("setUser", user);
|
_this.$store.commit("setUser", user);
|
||||||
|
|||||||
11
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
11
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@ -12908,6 +12908,8 @@ var api = {
|
|||||||
data: data.type === 'encryption' ? {
|
data: data.type === 'encryption' ? {
|
||||||
name: "",
|
name: "",
|
||||||
value: (0, _handleAes.encryptAES)(JSON.stringify(data))
|
value: (0, _handleAes.encryptAES)(JSON.stringify(data))
|
||||||
|
} : data.type === 'encryption1' ? {
|
||||||
|
postData: (0, _handleAes.encryptAES)(JSON.stringify(data))
|
||||||
} : data,
|
} : data,
|
||||||
method: method
|
method: method
|
||||||
};
|
};
|
||||||
@ -13374,12 +13376,13 @@ function wrapTreeNode(data) {
|
|||||||
function formatDate(dateStr) {
|
function formatDate(dateStr) {
|
||||||
var date = new Date(dateStr);
|
var date = new Date(dateStr);
|
||||||
|
|
||||||
// 获取月份和日期,确保是两位数
|
// 获取年份、月份和日期,确保是两位数
|
||||||
var month = (date.getMonth() + 1).toString().padStart(2, '0'); // getMonth() 返回的是 0 基的月份
|
var year = date.getFullYear();
|
||||||
var day = date.getDate().toString().padStart(2, '0'); // getDate() 返回的是日
|
var month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
var day = date.getDate().toString().padStart(2, '0');
|
||||||
|
|
||||||
// 返回格式化后的结果
|
// 返回格式化后的结果
|
||||||
return "".concat(month, ".").concat(day);
|
return "".concat(year, "-").concat(month, "-").concat(day);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 格式化数字
|
// 格式化数字
|
||||||
|
|||||||
@ -608,7 +608,7 @@ var _default = {
|
|||||||
// 跳转到选择服务区
|
// 跳转到选择服务区
|
||||||
goSelectServer: function goSelectServer() {
|
goSelectServer: function goSelectServer() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/newMap/index/index"
|
url: "/pages/newMap/index/index?comeForm=home"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 返回上级页面
|
// 返回上级页面
|
||||||
|
|||||||
@ -226,11 +226,14 @@ Object.defineProperty(exports, "__esModule", {
|
|||||||
});
|
});
|
||||||
exports.default = void 0;
|
exports.default = void 0;
|
||||||
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
|
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
|
||||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
|
||||||
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
|
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
|
||||||
|
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
||||||
|
var _vuex = __webpack_require__(/*! vuex */ 33);
|
||||||
var _methods;
|
var _methods;
|
||||||
|
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 shopTabbar = function shopTabbar() {
|
var shopTabbar = function shopTabbar() {
|
||||||
Promise.all(/*! require.ensure | components/shopTabbar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/shopTabbar")]).then((function () {
|
__webpack_require__.e(/*! require.ensure | components/shopTabbar */ "components/shopTabbar").then((function () {
|
||||||
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
@ -344,6 +347,9 @@ var _default = {
|
|||||||
priceRangeRefShow: false
|
priceRangeRefShow: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: _objectSpread({}, (0, _vuex.mapGetters)({
|
||||||
|
user: "user"
|
||||||
|
})),
|
||||||
onLoad: function onLoad(query) {
|
onLoad: function onLoad(query) {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||||
@ -353,6 +359,7 @@ var _default = {
|
|||||||
switch (_context.prev = _context.next) {
|
switch (_context.prev = _context.next) {
|
||||||
case 0:
|
case 0:
|
||||||
console.log("query", query);
|
console.log("query", query);
|
||||||
|
console.log("user", _this2.user);
|
||||||
_this2.menu = uni.getMenuButtonBoundingClientRect();
|
_this2.menu = uni.getMenuButtonBoundingClientRect();
|
||||||
_this2.pageType = query.pageType;
|
_this2.pageType = query.pageType;
|
||||||
// 判断这个用户是不是第一次进入到商城
|
// 判断这个用户是不是第一次进入到商城
|
||||||
@ -377,15 +384,15 @@ var _default = {
|
|||||||
// this.globalData.recommendCode = 1111;
|
// this.globalData.recommendCode = 1111;
|
||||||
// this.globalData.recommendId = 2222;
|
// this.globalData.recommendId = 2222;
|
||||||
if (!(query.pageType === "UnionMall")) {
|
if (!(query.pageType === "UnionMall")) {
|
||||||
_context.next = 27;
|
_context.next = 28;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_context.next = 11;
|
_context.next = 12;
|
||||||
return _this2.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
return _this2.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
|
||||||
ownerUnitId: 911,
|
ownerUnitId: 911,
|
||||||
commodityNature: 5070
|
commodityNature: 5070
|
||||||
});
|
});
|
||||||
case 11:
|
case 12:
|
||||||
data = _context.sent;
|
data = _context.sent;
|
||||||
console.log("handleGetShopBigType", data);
|
console.log("handleGetShopBigType", data);
|
||||||
typeList = data.Data.List || [];
|
typeList = data.Data.List || [];
|
||||||
@ -448,9 +455,9 @@ var _default = {
|
|||||||
_this2.handleGetSortList();
|
_this2.handleGetSortList();
|
||||||
// 拿到工会之家的商品列表
|
// 拿到工会之家的商品列表
|
||||||
_this2.handleGetUnionShopList();
|
_this2.handleGetUnionShopList();
|
||||||
_context.next = 34;
|
_context.next = 35;
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 28:
|
||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title: "加载中"
|
// title: "加载中"
|
||||||
// })
|
// })
|
||||||
@ -458,9 +465,9 @@ var _default = {
|
|||||||
// 拿到每周优惠的内容
|
// 拿到每周优惠的内容
|
||||||
_this2.handleGetEveryWeekShop();
|
_this2.handleGetEveryWeekShop();
|
||||||
// 拿到顶部商品大类的方法
|
// 拿到顶部商品大类的方法
|
||||||
_context.next = 30;
|
_context.next = 31;
|
||||||
return _this2.handleGetShopBigType();
|
return _this2.handleGetShopBigType();
|
||||||
case 30:
|
case 31:
|
||||||
// 拿到特价优惠的
|
// 拿到特价优惠的
|
||||||
_this2.handleGetSpecialOffers();
|
_this2.handleGetSpecialOffers();
|
||||||
// 拿到今日推荐的商品列表
|
// 拿到今日推荐的商品列表
|
||||||
@ -471,7 +478,7 @@ var _default = {
|
|||||||
_this2.handleGetActivityList();
|
_this2.handleGetActivityList();
|
||||||
}
|
}
|
||||||
// uni.hideLoading()
|
// uni.hideLoading()
|
||||||
case 34:
|
case 35:
|
||||||
case "end":
|
case "end":
|
||||||
return _context.stop();
|
return _context.stop();
|
||||||
}
|
}
|
||||||
@ -1237,8 +1244,12 @@ var _default = {
|
|||||||
}))();
|
}))();
|
||||||
}), (0, _defineProperty2.default)(_methods, "handleBackHome", function handleBackHome() {
|
}), (0, _defineProperty2.default)(_methods, "handleBackHome", function handleBackHome() {
|
||||||
if (this.pageType === "UnionMall") {
|
if (this.pageType === "UnionMall") {
|
||||||
uni.navigateBack({
|
// uni.navigateBack({
|
||||||
delta: 1
|
// delta: 1,
|
||||||
|
// });
|
||||||
|
|
||||||
|
uni.redirectTo({
|
||||||
|
url: "/pages/shopMallPage/index/index"
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -191,7 +191,7 @@ var _vuex = __webpack_require__(/*! vuex */ 33);
|
|||||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||||
var shopTabbar = function shopTabbar() {
|
var shopTabbar = function shopTabbar() {
|
||||||
Promise.all(/*! require.ensure | components/shopTabbar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/shopTabbar")]).then((function () {
|
__webpack_require__.e(/*! require.ensure | components/shopTabbar */ "components/shopTabbar").then((function () {
|
||||||
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -205,7 +205,7 @@ var NoData = function NoData() {
|
|||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
var shopTabbar = function shopTabbar() {
|
var shopTabbar = function shopTabbar() {
|
||||||
Promise.all(/*! require.ensure | components/shopTabbar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/shopTabbar")]).then((function () {
|
__webpack_require__.e(/*! require.ensure | components/shopTabbar */ "components/shopTabbar").then((function () {
|
||||||
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -147,7 +147,7 @@ var _vuex = __webpack_require__(/*! vuex */ 33);
|
|||||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||||
var shopTabbar = function shopTabbar() {
|
var shopTabbar = function shopTabbar() {
|
||||||
Promise.all(/*! require.ensure | components/shopTabbar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/shopTabbar")]).then((function () {
|
__webpack_require__.e(/*! require.ensure | components/shopTabbar */ "components/shopTabbar").then((function () {
|
||||||
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
return resolve(__webpack_require__(/*! ../../../components/shopTabbar.vue */ 478));
|
||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -476,7 +476,7 @@ var _default = {
|
|||||||
createOrder: function createOrder() {
|
createOrder: function createOrder() {
|
||||||
var _this5 = this;
|
var _this5 = this;
|
||||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
||||||
var DATAFORMATType, openId, app, req, data, _this5$addressInfo$ME, _this5$addressInfo$ME2, provinceId, cityId, districtId, streetId, skuBase, priceContentBase, _req, pingnuoData, shopCarList, newList;
|
var DATAFORMATType, openId, app, newShopList, req, data, _this5$addressInfo$ME, _this5$addressInfo$ME2, provinceId, cityId, districtId, streetId, skuBase, priceContentBase, _req, pingnuoData, shopCarList, newList;
|
||||||
return _regenerator.default.wrap(function _callee3$(_context3) {
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (_context3.prev = _context3.next) {
|
switch (_context3.prev = _context3.next) {
|
||||||
@ -554,7 +554,15 @@ var _default = {
|
|||||||
openId = uni.getStorageSync("openId");
|
openId = uni.getStorageSync("openId");
|
||||||
console.log("openId", openId);
|
console.log("openId", openId);
|
||||||
console.log("this.user", _this5.user);
|
console.log("this.user", _this5.user);
|
||||||
app = getApp();
|
app = getApp(); // 因为当有些商品整数 有些商品小数 接口那边会将小数点部分直接去掉 所以我们这边处理一下 把价钱字段转为字符串
|
||||||
|
newShopList = JSON.parse(JSON.stringify(_this5.shopOrder));
|
||||||
|
newShopList.forEach(function (item) {
|
||||||
|
item.AVERAGE_PRICE = item.AVERAGE_PRICE.toString();
|
||||||
|
item.COMMODITY_CURRPRICE = item.COMMODITY_CURRPRICE.toString();
|
||||||
|
item.ORDER_AMOUNT = item.ORDER_AMOUNT.toString();
|
||||||
|
item.ORDER_COUNT = item.ORDER_COUNT.toString();
|
||||||
|
});
|
||||||
|
console.log('newShopListnewShopList', newShopList);
|
||||||
req = {
|
req = {
|
||||||
action_type: "ScanOrder",
|
action_type: "ScanOrder",
|
||||||
salebillType: DATAFORMATType === 2 ? "3002" : _this5.pageType === "UnionMall" ? "3001" : "3000",
|
salebillType: DATAFORMATType === 2 ? "3002" : _this5.pageType === "UnionMall" ? "3001" : "3000",
|
||||||
@ -573,7 +581,8 @@ var _default = {
|
|||||||
addressId: _this5.selectTab === 1 ? _this5.addressInfo.MEMBERADDRESS_ID : "",
|
addressId: _this5.selectTab === 1 ? _this5.addressInfo.MEMBERADDRESS_ID : "",
|
||||||
orderPersonTel: _this5.selectTab === 1 ? _this5.addressInfo.MOBILEPHONE : _this5.phoneNumber,
|
orderPersonTel: _this5.selectTab === 1 ? _this5.addressInfo.MOBILEPHONE : _this5.phoneNumber,
|
||||||
// couponCode: '',//优惠券
|
// couponCode: '',//优惠券
|
||||||
t_saleorderdetail: JSON.stringify(_this5.shopOrder),
|
// t_saleorderdetail: JSON.stringify(this.shopOrder),
|
||||||
|
t_saleorderdetail: JSON.stringify(newShopList),
|
||||||
recommendCode: app.globalData.recommendCode || "",
|
recommendCode: app.globalData.recommendCode || "",
|
||||||
recommendId: app.globalData.recommendId || "",
|
recommendId: app.globalData.recommendId || "",
|
||||||
requestType: "application/x-www-form-urlencoded"
|
requestType: "application/x-www-form-urlencoded"
|
||||||
@ -586,13 +595,13 @@ var _default = {
|
|||||||
console.log("this.shopOrder", _this5.shopOrder);
|
console.log("this.shopOrder", _this5.shopOrder);
|
||||||
console.log("this.addressInfo", _this5.addressInfo);
|
console.log("this.addressInfo", _this5.addressInfo);
|
||||||
// return
|
// return
|
||||||
_context3.next = 34;
|
_context3.next = 37;
|
||||||
return _this5.$api.postCoop(req);
|
return _this5.$api.postCoop(req);
|
||||||
case 34:
|
case 37:
|
||||||
data = _context3.sent;
|
data = _context3.sent;
|
||||||
console.log("data", data);
|
console.log("data", data);
|
||||||
if (!(data.ResultCode === "100")) {
|
if (!(data.ResultCode === "100")) {
|
||||||
_context3.next = 49;
|
_context3.next = 52;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_this5$addressInfo$ME = _this5.addressInfo.MEMBERADDRESS_CODE.split(","), _this5$addressInfo$ME2 = (0, _slicedToArray2.default)(_this5$addressInfo$ME, 4), provinceId = _this5$addressInfo$ME2[0], cityId = _this5$addressInfo$ME2[1], districtId = _this5$addressInfo$ME2[2], streetId = _this5$addressInfo$ME2[3];
|
_this5$addressInfo$ME = _this5.addressInfo.MEMBERADDRESS_CODE.split(","), _this5$addressInfo$ME2 = (0, _slicedToArray2.default)(_this5$addressInfo$ME, 4), provinceId = _this5$addressInfo$ME2[0], cityId = _this5$addressInfo$ME2[1], districtId = _this5$addressInfo$ME2[2], streetId = _this5$addressInfo$ME2[3];
|
||||||
@ -632,9 +641,9 @@ var _default = {
|
|||||||
expect_time: "",
|
expect_time: "",
|
||||||
priceContentBase: priceContentBase
|
priceContentBase: priceContentBase
|
||||||
};
|
};
|
||||||
_context3.next = 44;
|
_context3.next = 47;
|
||||||
return _this5.$api.$postNode("/pino/order/submit", _req);
|
return _this5.$api.$postNode("/pino/order/submit", _req);
|
||||||
case 44:
|
case 47:
|
||||||
pingnuoData = _context3.sent;
|
pingnuoData = _context3.sent;
|
||||||
console.log("pingnuoData", pingnuoData);
|
console.log("pingnuoData", pingnuoData);
|
||||||
if (pingnuoData.code === 200) {
|
if (pingnuoData.code === 200) {
|
||||||
@ -686,9 +695,9 @@ var _default = {
|
|||||||
});
|
});
|
||||||
_this5.isMakeOrdering = false;
|
_this5.isMakeOrdering = false;
|
||||||
}
|
}
|
||||||
_context3.next = 51;
|
_context3.next = 54;
|
||||||
break;
|
break;
|
||||||
case 49:
|
case 52:
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: data.ResultDesc,
|
// title: data.ResultDesc,
|
||||||
// icon: "none",
|
// icon: "none",
|
||||||
@ -700,7 +709,7 @@ var _default = {
|
|||||||
success: function success(res) {}
|
success: function success(res) {}
|
||||||
});
|
});
|
||||||
_this5.isMakeOrdering = false;
|
_this5.isMakeOrdering = false;
|
||||||
case 51:
|
case 54:
|
||||||
case "end":
|
case "end":
|
||||||
return _context3.stop();
|
return _context3.stop();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,7 +167,7 @@ var tabbar = function tabbar() {
|
|||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
var shopTabbar = function shopTabbar() {
|
var shopTabbar = function shopTabbar() {
|
||||||
Promise.all(/*! require.ensure | components/shopTabbar */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/shopTabbar")]).then((function () {
|
__webpack_require__.e(/*! require.ensure | components/shopTabbar */ "components/shopTabbar").then((function () {
|
||||||
return resolve(__webpack_require__(/*! ../../components/shopTabbar.vue */ 478));
|
return resolve(__webpack_require__(/*! ../../components/shopTabbar.vue */ 478));
|
||||||
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -56,6 +56,8 @@ const api = {
|
|||||||
data: data.type === 'encryption' ? {
|
data: data.type === 'encryption' ? {
|
||||||
name: "",
|
name: "",
|
||||||
value: encryptAES(JSON.stringify(data))
|
value: encryptAES(JSON.stringify(data))
|
||||||
|
} : data.type === 'encryption1' ? {
|
||||||
|
postData: encryptAES(JSON.stringify(data))
|
||||||
} : data,
|
} : data,
|
||||||
method: method
|
method: method
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,12 +96,13 @@ export function wrapTreeNode(data) {
|
|||||||
export function formatDate(dateStr) {
|
export function formatDate(dateStr) {
|
||||||
const date = new Date(dateStr);
|
const date = new Date(dateStr);
|
||||||
|
|
||||||
// 获取月份和日期,确保是两位数
|
// 获取年份、月份和日期,确保是两位数
|
||||||
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // getMonth() 返回的是 0 基的月份
|
const year = date.getFullYear();
|
||||||
const day = date.getDate().toString().padStart(2, '0'); // getDate() 返回的是日
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
const day = date.getDate().toString().padStart(2, '0');
|
||||||
|
|
||||||
// 返回格式化后的结果
|
// 返回格式化后的结果
|
||||||
return `${month}.${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user