This commit is contained in:
ylj20011123 2025-06-27 19:44:05 +08:00
parent e1f39fd953
commit b59efd68b4
79 changed files with 428 additions and 151 deletions

View File

@ -119,6 +119,7 @@ export default {
.then(function (data) {
if (data.ResultCode === "100") {
let _data = data;
console.log("获取会员信息成功", _data);
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
_this.user.MEMBERSHIP_LEVEL_TEXT =
@ -134,6 +135,8 @@ export default {
_this.user.MEMBERSHIP_LEVEL = _data.Data.MEMBERSHIP_LEVEL || "";
_this.user.InviteCode = _data.Data.InviteCode || "";
_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.setUser(user);

View File

@ -878,7 +878,7 @@ export default {
},
//
goSelectServer() {
uni.navigateTo({ url: "/pages/newMap/index/index" });
uni.navigateTo({ url: "/pages/newMap/index/index?comeForm=home" });
},
//
handleBack() {

View File

@ -57,7 +57,8 @@
: 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="itemImgBox">
<image class="img" src="/static/images/home/unionMallIcon.svg"></image>
@ -633,6 +634,7 @@
</template>
<script>
import { mapGetters } from "vuex";
import shopTabbar from "../../../components/shopTabbar.vue";
export default {
components: { shopTabbar },
@ -692,8 +694,14 @@ export default {
priceRangeRefShow: false
};
},
computed: {
...mapGetters({
user: "user",
}),
},
async onLoad(query) {
console.log("query", query);
console.log("user", this.user);
this.menu = uni.getMenuButtonBoundingClientRect();
this.pageType = query.pageType;
//
@ -1575,8 +1583,12 @@ export default {
//
handleBackHome() {
if (this.pageType === "UnionMall") {
uni.navigateBack({
delta: 1,
// uni.navigateBack({
// delta: 1,
// });
uni.redirectTo({
url: `/pages/shopMallPage/index/index`,
});
} else {
uni.switchTab({

View File

@ -25,7 +25,8 @@
<div class="scrollBox">
<!-- :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" -->
<div class="itemBox">

View File

@ -440,6 +440,20 @@ export default {
console.log("this.user", this.user);
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 = {
action_type: "ScanOrder",
salebillType:
@ -467,7 +481,8 @@ export default {
? this.addressInfo.MOBILEPHONE
: this.phoneNumber,
// couponCode: '',//
t_saleorderdetail: JSON.stringify(this.shopOrder),
// t_saleorderdetail: JSON.stringify(this.shopOrder),
t_saleorderdetail: JSON.stringify(newShopList),
recommendCode: app.globalData.recommendCode || "",
recommendId: app.globalData.recommendId || "",
requestType: "application/x-www-form-urlencoded",

View File

@ -7,7 +7,7 @@
</view>
<view class="userInfoMessage">
<view class="userInfoName">{{ user.MEMBERSHIP_NAME || '' }}</view>
<view class="userInfoName">{{ userInfo.NICK_NAME || user.MEMBERSHIP_NAME || '' }}</view>
<view class="mainTopMessageUserLevelBox">
<image class="mainTopMessageUserLevelIcon"
src="https://eshangtech.com/caiyunyiImg/levelIcon.png" />
@ -28,12 +28,12 @@
<text class="rightText">{{ phone }}</text>
</view>
</view>
<view class="userInfoItem">
<!-- <view class="userInfoItem">
<view class="userInfoItemLabel">实名认证</view>
<view class="userInfoItemRight">
<image class="rightArrow" src="https://eshangtech.com/caiyunyiImg/rightArrow.png" />
</view>
</view>
</view> -->
<view class="userInfoItem" @click="handleGoAddress">
<view class="userInfoItemLabel">地址管理</view>
<view class="userInfoItemRight">
@ -224,6 +224,12 @@ export default {
},
},
onLoad() {
// //
// this.handleGetUserDetail();
// //
// this.handleGetUserNewInfo();
},
onShow() {
//
this.handleGetUserDetail();
//
@ -479,6 +485,7 @@ export default {
justify-content: space-between;
.userInfoBoxLeft {
width: calc(100% - 32rpx);
display: flex;
align-items: center;
@ -495,7 +502,10 @@ export default {
}
.userInfoMessage {
width: calc(100% - 138rpx);
.userInfoName {
width: 100%;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 40rpx;
@ -503,10 +513,13 @@ export default {
line-height: 56rpx;
text-align: left;
font-style: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mainTopMessageUserLevelBox {
display: flex;
display: inline-flex;
align-items: center;
background-color: #515050;
padding: 4rpx 18rpx;
@ -535,6 +548,8 @@ export default {
}
.userInfoBoxRight {
width: 32rpx;
.rightArrow {
width: 32rpx;
height: 32rpx;

View File

@ -4,6 +4,15 @@
<view class="userInfoItem">
<view class="userInfoItemLabel">头像</view>
<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 class="userInfoItem">
@ -28,21 +37,45 @@
<view class="userInfoItem">
<view class="userInfoItemLabel">生日</view>
<view class="userInfoItemRight">
<picker mode="multiSelector" @change="bindMultiPickerChange"
@columnchange="bindMultiPickerColumnChange" :value="multiIndex" :range="multiArray">
<picker mode="date" @change="bindMultiPickerChange">
<view class="phoneBox">{{ birthday || '请选择生日' }}</view>
</picker>
<!-- <picker mode="multiSelector" @change="bindMultiPickerChange"
@columnchange="bindMultiPickerColumnChange" :value="multiIndex" :range="multiArray">
<view class="phoneBox">{{ birthday || '请选择生日' }}</view>
</picker> -->
</view>
</view>
<view class="userInfoItem">
<view class="userInfoItemLabel">邮箱地址</view>
<view class="userInfoItemRight">
<input class="phoneBox" v-model="email" placeholder="请输入昵称" />
<input class="phoneBox" v-model="email" placeholder="请输入邮箱地址" @blur="validateEmail" />
</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>
</template>
@ -55,10 +88,13 @@ export default {
editableNickname: "",//
genderArray: ['男', '女'], //
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: '',
email: '', //
realName: "",
idCard: "",
userInfo: {},
emailError: false, //
idCardError: false, //
}
},
computed: {
@ -66,52 +102,167 @@ export default {
user: "user",
}),
},
onLoad() {
async onLoad() {
await this.handleGetUserDetail()
},
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() {
// 1815
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) {
this.genderIndex = e.detail.value
},
//
bindMultiPickerChange(e) {
this.multiIndex = e.detail.value;
const month = this.multiIndex[0] + 1;
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}`;
console.log('eee', e);
this.birthday = e.detail.value;
},
//
bindMultiPickerColumnChange(e) {
const data = [...this.multiArray]; // multiArray
const multiIndex = [...this.multiIndex]; // multiIndex
multiIndex[e.detail.column] = e.detail.value;
if (e.detail.column === 0) { //
const month = e.detail.value + 1; // 1-based
let daysInMonth = 31;
if (month === 4 || month === 6 || month === 9 || month === 11) {
daysInMonth = 30;
} else if (month === 2) {
// 28
daysInMonth = 28;
}
//
const daysArray = Array.from({ length: daysInMonth }, (_, i) => `${i + 1}`);
data[1] = daysArray; //
//
if (multiIndex[1] >= daysInMonth) {
multiIndex[1] = daysInMonth - 1;
//
async onChooseAvatar(e) {
let _this = this;
uni.uploadFile({
url: "https://api.eshangtech.com/EShangApiMain/Picture/UploadPicture", // URL
filePath: e.detail.avatarUrl,
name: "file", //
formData: {
Tabletype: "1005", //
},
success: async (uploadRes) => {
let data = uploadRes.data ? JSON.parse(uploadRes.data) : "";
let url = data.Result_Data.ImageUrl;
if (url) {
let req = {
membershipId: this.user.MEMBERSHIP_ID,
headImgUrl: url,
};
_this.WXProfile = url;
const userInfoData = await _this.$api.$get(
"/WeChat/UpdateMemberInfo",
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.multiArray = data;
this.multiIndex = multiIndex;
// this.realName = this.userInfo.MEMBERSHIP_REALNAME //
this.$forceUpdate();
console.log("this.userInfo", JSON.parse(JSON.stringify(this.userInfo)));
},
}
}
@ -121,6 +272,7 @@ export default {
width: 100vw;
height: 100vh;
background-color: #F5F5F5;
position: relative;
.userInfoContent {
width: 100%;
@ -170,8 +322,60 @@ export default {
color: #a1a1a1;
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>

View File

@ -21,7 +21,8 @@
<view class="userInfo">
<view class="userInfoLeft">
<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">
<image class="userLevelIcon" src="https://eshangtech.com/caiyunyiImg/levelIcon.png" />
<view class="userLevelName">{{ user.MEMBERSHIP_LEVEL_TEXT || "" }}</view>
@ -943,8 +944,6 @@ export default {
}
}
}
.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

View File

@ -244,6 +244,7 @@ var _default = {
}).then(function (data) {
if (data.ResultCode === "100") {
var _data = data;
console.log("获取会员信息成功", _data);
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
_this.user.MEMBERSHIP_NAME = _data.Data.MEMBERSHIP_NAME || "";
_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.InviteCode = _data.Data.InviteCode || "";
_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.setUser(user);
_this.$store.commit("setUser", user);

View File

@ -12908,6 +12908,8 @@ var api = {
data: data.type === 'encryption' ? {
name: "",
value: (0, _handleAes.encryptAES)(JSON.stringify(data))
} : data.type === 'encryption1' ? {
postData: (0, _handleAes.encryptAES)(JSON.stringify(data))
} : data,
method: method
};
@ -13374,12 +13376,13 @@ function wrapTreeNode(data) {
function formatDate(dateStr) {
var date = new Date(dateStr);
// 获取月份和日期,确保是两位数
var month = (date.getMonth() + 1).toString().padStart(2, '0'); // getMonth() 返回的是 0 基的月份
var day = date.getDate().toString().padStart(2, '0'); // getDate() 返回的是日
// 获取年份、月份和日期,确保是两位数
var year = date.getFullYear();
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);
}
// 格式化数字

View File

@ -608,7 +608,7 @@ var _default = {
// 跳转到选择服务区
goSelectServer: function goSelectServer() {
uni.navigateTo({
url: "/pages/newMap/index/index"
url: "/pages/newMap/index/index?comeForm=home"
});
},
// 返回上级页面

View File

@ -226,11 +226,14 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = void 0;
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 _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _vuex = __webpack_require__(/*! vuex */ 33);
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() {
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));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
@ -344,6 +347,9 @@ var _default = {
priceRangeRefShow: false
};
},
computed: _objectSpread({}, (0, _vuex.mapGetters)({
user: "user"
})),
onLoad: function onLoad(query) {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
@ -353,6 +359,7 @@ var _default = {
switch (_context.prev = _context.next) {
case 0:
console.log("query", query);
console.log("user", _this2.user);
_this2.menu = uni.getMenuButtonBoundingClientRect();
_this2.pageType = query.pageType;
// 判断这个用户是不是第一次进入到商城
@ -377,15 +384,15 @@ var _default = {
// this.globalData.recommendCode = 1111;
// this.globalData.recommendId = 2222;
if (!(query.pageType === "UnionMall")) {
_context.next = 27;
_context.next = 28;
break;
}
_context.next = 11;
_context.next = 12;
return _this2.$api.$javaGet('/third-party/getWeChatGetMallGoodsType', {
ownerUnitId: 911,
commodityNature: 5070
});
case 11:
case 12:
data = _context.sent;
console.log("handleGetShopBigType", data);
typeList = data.Data.List || [];
@ -448,9 +455,9 @@ var _default = {
_this2.handleGetSortList();
// 拿到工会之家的商品列表
_this2.handleGetUnionShopList();
_context.next = 34;
_context.next = 35;
break;
case 27:
case 28:
// uni.showLoading({
// title: "加载中"
// })
@ -458,9 +465,9 @@ var _default = {
// 拿到每周优惠的内容
_this2.handleGetEveryWeekShop();
// 拿到顶部商品大类的方法
_context.next = 30;
_context.next = 31;
return _this2.handleGetShopBigType();
case 30:
case 31:
// 拿到特价优惠的
_this2.handleGetSpecialOffers();
// 拿到今日推荐的商品列表
@ -471,7 +478,7 @@ var _default = {
_this2.handleGetActivityList();
}
// uni.hideLoading()
case 34:
case 35:
case "end":
return _context.stop();
}
@ -1237,8 +1244,12 @@ var _default = {
}))();
}), (0, _defineProperty2.default)(_methods, "handleBackHome", function handleBackHome() {
if (this.pageType === "UnionMall") {
uni.navigateBack({
delta: 1
// uni.navigateBack({
// delta: 1,
// });
uni.redirectTo({
url: "/pages/shopMallPage/index/index"
});
} else {
uni.switchTab({

File diff suppressed because one or more lines are too long

View File

@ -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 _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() {
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));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};

View File

@ -205,7 +205,7 @@ var NoData = function NoData() {
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
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));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};

File diff suppressed because one or more lines are too long

View File

@ -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 _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() {
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));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};

View File

@ -476,7 +476,7 @@ var _default = {
createOrder: function createOrder() {
var _this5 = this;
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) {
while (1) {
switch (_context3.prev = _context3.next) {
@ -554,7 +554,15 @@ var _default = {
openId = uni.getStorageSync("openId");
console.log("openId", openId);
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 = {
action_type: "ScanOrder",
salebillType: DATAFORMATType === 2 ? "3002" : _this5.pageType === "UnionMall" ? "3001" : "3000",
@ -573,7 +581,8 @@ var _default = {
addressId: _this5.selectTab === 1 ? _this5.addressInfo.MEMBERADDRESS_ID : "",
orderPersonTel: _this5.selectTab === 1 ? _this5.addressInfo.MOBILEPHONE : _this5.phoneNumber,
// couponCode: '',//优惠券
t_saleorderdetail: JSON.stringify(_this5.shopOrder),
// t_saleorderdetail: JSON.stringify(this.shopOrder),
t_saleorderdetail: JSON.stringify(newShopList),
recommendCode: app.globalData.recommendCode || "",
recommendId: app.globalData.recommendId || "",
requestType: "application/x-www-form-urlencoded"
@ -586,13 +595,13 @@ var _default = {
console.log("this.shopOrder", _this5.shopOrder);
console.log("this.addressInfo", _this5.addressInfo);
// return
_context3.next = 34;
_context3.next = 37;
return _this5.$api.postCoop(req);
case 34:
case 37:
data = _context3.sent;
console.log("data", data);
if (!(data.ResultCode === "100")) {
_context3.next = 49;
_context3.next = 52;
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];
@ -632,9 +641,9 @@ var _default = {
expect_time: "",
priceContentBase: priceContentBase
};
_context3.next = 44;
_context3.next = 47;
return _this5.$api.$postNode("/pino/order/submit", _req);
case 44:
case 47:
pingnuoData = _context3.sent;
console.log("pingnuoData", pingnuoData);
if (pingnuoData.code === 200) {
@ -686,9 +695,9 @@ var _default = {
});
_this5.isMakeOrdering = false;
}
_context3.next = 51;
_context3.next = 54;
break;
case 49:
case 52:
// uni.showToast({
// title: data.ResultDesc,
// icon: "none",
@ -700,7 +709,7 @@ var _default = {
success: function success(res) {}
});
_this5.isMakeOrdering = false;
case 51:
case 54:
case "end":
return _context3.stop();
}

View File

@ -167,7 +167,7 @@ var tabbar = function tabbar() {
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
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));
}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};

File diff suppressed because one or more lines are too long

View File

@ -56,6 +56,8 @@ const api = {
data: data.type === 'encryption' ? {
name: "",
value: encryptAES(JSON.stringify(data))
} : data.type === 'encryption1' ? {
postData: encryptAES(JSON.stringify(data))
} : data,
method: method
}

View File

@ -96,12 +96,13 @@ export function wrapTreeNode(data) {
export function formatDate(dateStr) {
const date = new Date(dateStr);
// 获取月份和日期,确保是两位数
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // getMonth() 返回的是 0 基的月份
const day = date.getDate().toString().padStart(2, '0'); // getDate() 返回的是日
// 获取年份、月份和日期,确保是两位数
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
// 返回格式化后的结果
return `${month}.${day}`;
return `${year}-${month}-${day}`;
}