95折去除(只去了购物车)备份一下

This commit is contained in:
ylj20011123 2025-11-11 09:42:39 +08:00
parent 18959b7500
commit 9d45a9cce8
89 changed files with 1271 additions and 588 deletions

11
App.vue
View File

@ -15,11 +15,8 @@ export default {
}), }),
}, },
onLaunch: function (options) { onLaunch: function (options) {
console.log("onLaunch", options);
// //
this.globalData.appLaunchTime = Date.now() this.globalData.appLaunchTime = Date.now()
console.log('应用启动时间:', this.globalData.appLaunchTime)
this.setVisitChannels(options.scene); this.setVisitChannels(options.scene);
// this.handleGetUserInfo(); // this.handleGetUserInfo();
@ -76,7 +73,6 @@ export default {
...data.data, ...data.data,
ip: data.ip, ip: data.ip,
}; };
console.log("obj", obj);
uni.setStorageSync("userInfo", obj); uni.setStorageSync("userInfo", obj);
}, },
fail(error) { fail(error) {
@ -89,7 +85,6 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.login({ uni.login({
success(res) { success(res) {
console.log("login", res);
uni.setStorageSync("openId", res.code); uni.setStorageSync("openId", res.code);
_this.$api _this.$api
.getCoop({ .getCoop({
@ -98,8 +93,6 @@ export default {
// appId: "wx6a8173c6299c7a93", // appId: "wx6a8173c6299c7a93",
}) })
.then(async (data) => { .then(async (data) => {
console.log('fdsfgaslkfs', data);
_this.$store.commit("setUser", data.Data); _this.$store.commit("setUser", data.Data);
_this.user = data.Data; _this.user = data.Data;
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
@ -144,8 +137,6 @@ 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);
uni.setStorageSync("userData", _data.Data); uni.setStorageSync("userData", _data.Data);
_this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || ""; _this.user.MEMBERSHIP_ID = _data.Data.MEMBERSHIP_ID || "";
@ -170,8 +161,6 @@ export default {
_data.Data.MEMBERSHIP_MOBILEPHONE || ""; _data.Data.MEMBERSHIP_MOBILEPHONE || "";
// _this.setUser(user); // _this.setUser(user);
_this.$store.commit("setUser", user); _this.$store.commit("setUser", user);
console.log("_this.globalData");
} else { } else {
// _this.setUser({}); // _this.setUser({});

View File

@ -91,7 +91,6 @@
<text class="funItemText">{{ allFun.label }}</text> <text class="funItemText">{{ allFun.label }}</text>
</view> </view>
</view> </view>
<!-- 服务区详情 --> <!-- 服务区详情 -->
<view class="serviceDetail" @click="handleGoDetail"> <view class="serviceDetail" @click="handleGoDetail">
<view class="detailTop"> <view class="detailTop">
@ -294,6 +293,28 @@
</view> </view>
</view> </view>
<view class="mallContent"> <view class="mallContent">
<view class="advertisement advertisement2">
<view class="advertisementItem" v-if="marketingCampaign && marketingCampaign.length > 0"
style="width:100% ">
<view class="advertisementItemTop topLeft">
<view class="topTitle">
<text class="light">活动</text>
<text class="normal">专区</text>
</view>
<view class="topOther">超多优惠等你来</view>
<image class="mallBg" src="/static/images/home/leftShopBg.png" />
</view>
<scroll-view scroll-x class="advertisementItemBottom">
<view class="scroll-content">
<image class="advertisementImg" v-for="(item, index) in marketingCampaign" :key="index"
:src="item.IMAGE_PATH ? item.IMAGE_PATH.split(',') && item.IMAGE_PATH.split(',').length > 1 ? item.IMAGE_PATH.split(',')[0] : item.IMAGE_PATH : '/static/images/home/defultImg.png'"
@click.stop="handleGoShopDetail(item)" />
<!-- <image class="advertisementImg" /> -->
</view>
</scroll-view>
</view>
</view>
<view class="advertisement"> <view class="advertisement">
<view class="advertisementItem" v-if="everyWeekShopData && everyWeekShopData.length > 0" <view class="advertisementItem" v-if="everyWeekShopData && everyWeekShopData.length > 0"
style="width:100% "> style="width:100% ">
@ -337,7 +358,7 @@
</view> </view>
</view> </view>
<view class="advertisementItem" @click="handleGoShopList(5040)" <!-- <view class="advertisementItem" @click="handleGoShopList(5040)"
v-if="productsList && productsList.length > 0" v-if="productsList && productsList.length > 0"
:style="{ width: specialOffersList && specialOffersList.length > 0 ? '' : '100%' }"> :style="{ width: specialOffersList && specialOffersList.length > 0 ? '' : '100%' }">
<view class="advertisementItemTop topRight"> <view class="advertisementItemTop topRight">
@ -352,10 +373,10 @@
<image class="advertisementImg" v-for="(item, index) in productsList" :key="index" <image class="advertisementImg" v-for="(item, index) in productsList" :key="index"
:src="item.IMAGE_PATH ? item.IMAGE_PATH.split(',') && item.IMAGE_PATH.split(',').length > 1 ? item.IMAGE_PATH.split(',')[0] : item.IMAGE_PATH : '/static/images/home/defultImg.png'" :src="item.IMAGE_PATH ? item.IMAGE_PATH.split(',') && item.IMAGE_PATH.split(',').length > 1 ? item.IMAGE_PATH.split(',')[0] : item.IMAGE_PATH : '/static/images/home/defultImg.png'"
@click.stop="handleGoShopDetail(item)" /> @click.stop="handleGoShopDetail(item)" />
<!-- <image class="advertisementImg" /> -->
</view>
</view> </view>
</view> -->
</view> </view>
</view> </view>
<view class="mallList"> <view class="mallList">
<view class="mallItem" v-for="(item, index) in shoppingMall" :key="index" @click="handleGoShopDetail(item)"> <view class="mallItem" v-for="(item, index) in shoppingMall" :key="index" @click="handleGoShopDetail(item)">
@ -595,6 +616,7 @@ export default {
// "https://ahyd.eshangtech.com/UploadImageDir/minprogram/.jpg", // "https://ahyd.eshangtech.com/UploadImageDir/minprogram/.jpg",
// "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg", // "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg",
// "https://eshangtech.com/minTestImg/banner_0626_0702.png", // "https://eshangtech.com/minTestImg/banner_0626_0702.png",
"https://eshangtech.com/caiyunyiImg/indexTopBg2.jpg",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥_1.jpg",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/小沙坝服务区_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/小沙坝服务区_1.jpg",
@ -603,6 +625,7 @@ export default {
// "https://ahyd.eshangtech.com/UploadImageDir/minprogram/.jpg", // "https://ahyd.eshangtech.com/UploadImageDir/minprogram/.jpg",
// "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg", // "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg",
// "https://eshangtech.com/minTestImg/banner_0626_0702.png", // "https://eshangtech.com/minTestImg/banner_0626_0702.png",
"https://eshangtech.com/caiyunyiImg/indexTopBg2.jpg",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/正太泰国榴莲.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/正太泰国榴莲.jpg",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥.jpg",
@ -629,6 +652,8 @@ export default {
ScenicData: null,// ScenicData: null,//
SCENICAREAOBJ: {},// SCENICAREAOBJ: {},//
everyWeekShopData: [],// everyWeekShopData: [],//
firstObj1: {},
marketingCampaign: [],//
}; };
}, },
async onLoad(options) { async onLoad(options) {
@ -1055,12 +1080,13 @@ export default {
} }
} }
console.log('firstObj1', firstObj1); this.firstObj1 = firstObj1
console.log('firstObj2', firstObj2);
if (firstObj1.USERDEFINEDTYPE_ICO) { if (firstObj1.USERDEFINEDTYPE_ICO) {
this.swiperList.unshift(firstObj1.USERDEFINEDTYPE_ICO) // this.swiperList.unshift(firstObj1.USERDEFINEDTYPE_ICO)
this.swiperList.splice(1, 0, firstObj1.USERDEFINEDTYPE_ICO);
} }
console.log('firstObj2firstObj2firstObj2', firstObj2);
this.poster = firstObj2 this.poster = firstObj2
// this.swiperList.unshift(res1[0].USERDEFINEDTYPE_ICO) // this.swiperList.unshift(res1[0].USERDEFINEDTYPE_ICO)
@ -1322,9 +1348,16 @@ export default {
handleHidePopup() { handleHidePopup() {
uni.setStorageSync("showIndexPoster", 1); uni.setStorageSync("showIndexPoster", 1);
this.$refs.noticeRef.close(); this.$refs.noticeRef.close();
if (this.poster.BUSINESSTYPE === 2000) {
uni.navigateTo({
url: `/pages/shopMallPage/shopType/index?selectIndex=3&pageType=`,
});
} else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopMallPage/shopType/index`, url: `/pages/shopMallPage/shopType/index`,
}); });
}
}, },
// //
handleGoBack() { handleGoBack() {
@ -1620,7 +1653,12 @@ export default {
this.handleGoShop(); this.handleGoShop();
} }
} else if (obj.value === 17) { } else if (obj.value === 17) {
if (this.firstObj1.USERDEFINEDTYPE_ICO) {
if (obj.index === 0) { if (obj.index === 0) {
uni.navigateTo({
url: `/pages/shopMallPage/shopType/index?selectIndex=3`,
});
} else if (obj.index === 1) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopMallPage/shopType/index?comeForm=index`, url: `/pages/shopMallPage/shopType/index?comeForm=index`,
}); });
@ -1629,6 +1667,18 @@ export default {
url: `/pages/highwayHeadlines/attractInvestment`, url: `/pages/highwayHeadlines/attractInvestment`,
}); });
} }
} else {
if (obj.index === 0) {
uni.navigateTo({
url: `/pages/shopMallPage/shopType/index?selectIndex=3`,
});
} else {
uni.navigateTo({
url: `/pages/highwayHeadlines/attractInvestment`,
});
}
}
} else if (obj.value === 18) { } else if (obj.value === 18) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/eventRegistration/index`, url: `/pages/eventRegistration/index`,
@ -2182,6 +2232,8 @@ export default {
uni.setStorageSync("getWeChatGetMallGoodsInfo", data.Data.List) uni.setStorageSync("getWeChatGetMallGoodsInfo", data.Data.List)
let list = data.Data.List let list = data.Data.List
let res = [] let res = []
//
let res2 = []
const idSet = new Set() const idSet = new Set()
if (list && list.length > 0) { if (list && list.length > 0) {
@ -2189,7 +2241,11 @@ export default {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(subItem => { item.COMMODITYLIST.forEach(subItem => {
if (!idSet.has(subItem.COMMODITY_ID)) { if (!idSet.has(subItem.COMMODITY_ID)) {
if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem)
} else {
res.push(subItem) res.push(subItem)
}
idSet.add(subItem.COMMODITY_ID) idSet.add(subItem.COMMODITY_ID)
} }
}) })
@ -2199,6 +2255,47 @@ export default {
console.log('everyWeekShopDataeveryWeekShopDataeveryWeekShopData', res); console.log('everyWeekShopDataeveryWeekShopDataeveryWeekShopData', res);
this.everyWeekShopData = res this.everyWeekShopData = res
// this.marketingCampaign = res2
})
//
this.$api.$javaGet(
'/third-party/getWeChatGetMallGoodsInfo',
{
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1,
}
).then((data) => {
console.log('拿到模块活动的内容', data);
uni.setStorageSync("moduleActivity", data.Data.List)
let list = data.Data.List
let res = []
//
let res2 = []
const idSet = new Set()
if (list && list.length > 0) {
list.forEach(item => {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(subItem => {
if (!idSet.has(subItem.COMMODITY_ID)) {
// if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem)
/// } else {
// res.push(subItem)
// }
idSet.add(subItem.COMMODITY_ID)
}
})
}
})
}
console.log('moduleActivitymoduleActivitymoduleActivitymoduleActivity', res2);
// this.everyWeekShopData = res
this.marketingCampaign = res2
}) })
// //
@ -3182,6 +3279,20 @@ export default {
} }
} }
} }
.advertisement2 {
.advertisementItem {
.topLeft {
background: linear-gradient(180deg, #ffe5ca 0%, #ffffff 100%);
.topTitle {
.light {
color: #fe972c;
}
}
}
}
}
} }
.mallList { .mallList {

View File

@ -282,7 +282,7 @@ export default {
tatalMoney() { tatalMoney() {
let total = this.orderAmount; let total = this.orderAmount;
total = total =
Math.round((total - this.orderInfo.COUPON_AMOUNT || 0) * 100) / 100; this.orderInfo.COUPON_ID ? Math.round((total - this.orderInfo.COUPON_AMOUNT || 0) * 100) / 100 : total
return total; return total;
}, },
@ -454,6 +454,12 @@ export default {
console.log("payMoney", payMoney console.log("payMoney", payMoney
? payMoney * 100 ? payMoney * 100
: Number(_this.tatalMoney) * 100 || 1); : Number(_this.tatalMoney) * 100 || 1);
//
const amount = payMoney ? payMoney : this.tatalMoney;
const cents = Math.round((Number(amount) + Number.EPSILON) * 100);
console.log('centscentscentscents', cents);
let req = { let req = {
appid: "wxee018fb96955552a", // ID appid: "wxee018fb96955552a", // ID
mchid: "1672298991", // mchid: "1672298991", //
@ -462,9 +468,7 @@ export default {
notify_url: notify_url:
"https://eshangtech.com:18998/Coop.Merchant/Handler/Handler_Trade.ashx", // "https://eshangtech.com:18998/Coop.Merchant/Handler/Handler_Trade.ashx", //
amount: { amount: {
total: payMoney total: cents || 1,
? payMoney * 100
: Number(_this.tatalMoney) * 100 || 1,
currency: "CNY", currency: "CNY",
}, // }, //
payer: { payer: {
@ -509,7 +513,7 @@ export default {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
success: async (res) => { success: async (res) => {
console.log(res.data.prepay_id); console.log('32131', res);
_this.text = "request success"; _this.text = "request success";
let paySign = ""; let paySign = "";
let reqSign = { let reqSign = {

View File

@ -274,10 +274,53 @@
</div> </div>
</div> </div>
<!-- 每周特惠 --> <!-- 活动套餐 图片-->
<div class="advertisementSecond" :style="{ height: showModalActivityImg ? '240rpx' : '' }"
@click="handleGoShopPage({}, 3)">
<image style="width:100%;height:100%;border-radius: 16rpx;" :lazy-load="true"
src="https://eshangtech.com/caiyunyiImg/indexTopBg2.jpg" @load="handleShowModalActivityImg" />
</div>
<!-- 活动专区 -->
<div class="advertisement" v-if="pageType !== 'UnionMall'" :style="{ <div class="advertisement" v-if="pageType !== 'UnionMall'" :style="{
background: pageType !== 'UnionMall' ? '#fff' : 'transparent', background: pageType !== 'UnionMall' ? '#fff' : 'transparent',
}"> }">
<div class="advertisementContentBox" v-if="pageType !== 'UnionMall'" @click="handleGoShopPage({}, 3)">
<div class="advertisementTop">
<div class="title">
活动专区
<!-- <image class="titleImg" src="https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/title1st.png" /> -->
</div>
<div class="moreBox">
<!-- <text class="moreText">低价爆品天天有</text> -->
<image class="rightIcon" src="https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/rightArrow.png" />
</div>
</div>
<scroll-view class="shopList" scroll-x>
<!-- @click="handleGoShop(item)"-->
<div :style="{
width: marketingCampaign.slice(0, 5).length * 160 + 'rpx',
height: '100%',
whiteSpace: 'noWrap',
}">
<div class="shopItem" v-for="(item, index) in marketingCampaign.slice(0, 5)" :key="index"
@click.stop="handleGoShopDetail(item)">
<div class="shopItemImg">
<div class="imgBox">
<image class="shopImg"
:src="item.IMAGE_PATH ? item.IMAGE_PATH.split(',') && item.IMAGE_PATH.split(',').length > 1 ? item.IMAGE_PATH.split(',')[0] : item.IMAGE_PATH : '/static/images/home/defultImg.png'" />
</div>
<text class=" discountedPrice">¥{{ item.bigNumber || "" }}.{{
item.smallNumber || "00"
}}</text>
</div>
<!-- <text class="price">¥15.99</text>-->
</div>
</div>
</scroll-view>
</div>
<div class="advertisementContentBox" v-if="pageType !== 'UnionMall'" @click="handleGoShopList(4597, 0)"> <div class="advertisementContentBox" v-if="pageType !== 'UnionMall'" @click="handleGoShopList(4597, 0)">
<div class="advertisementTop"> <div class="advertisementTop">
<div class="title"> <div class="title">
@ -502,6 +545,8 @@
</div> </div>
</div> </div>
<!-- 甄选商品 --> <!-- 甄选商品 -->
<div class="allShopList"> <div class="allShopList">
@ -742,6 +787,7 @@ export default {
menu: {}, menu: {},
specialOffersList: [], // specialOffersList: [], //
weeklySpecialOffer: [], // weeklySpecialOffer: [], //
marketingCampaign: [], //
todayOffersList: [], // todayOffersList: [], //
shopTypeList: [], // shopTypeList: [], //
oneRowNumber: 0, // oneRowNumber: 0, //
@ -799,7 +845,8 @@ export default {
funList: [ funList: [
{ label: "商城首页", src: "" }, { label: "商城首页", src: "" },
{ label: "", src: "" }, { label: "", src: "" },
] ],
showModalActivityImg: false
}; };
}, },
computed: { computed: {
@ -864,6 +911,7 @@ export default {
this.sortType = Math.floor(Math.random() * this.sortTypeList.length); this.sortType = Math.floor(Math.random() * this.sortTypeList.length);
this.shopTypeList = resList; this.shopTypeList = resList;
// //
this.handleGetSortList(); this.handleGetSortList();
// //
@ -874,6 +922,8 @@ export default {
// }) // })
// //
this.handleGetEveryWeekShop() this.handleGetEveryWeekShop()
//
this.handleGetModalProducetShop()
// //
await this.handleGetShopBigType(); await this.handleGetShopBigType();
// //
@ -955,6 +1005,11 @@ export default {
this.isFirstLoad = true; this.isFirstLoad = true;
}, },
methods: { methods: {
handleShowModalActivityImg(e) {
console.log('eee', e);
this.showModalActivityImg = true
},
handleHideExportFun() { handleHideExportFun() {
this.showExportFun = false this.showExportFun = false
}, },
@ -1346,7 +1401,7 @@ export default {
let resList = []; let resList = [];
// //
let activityObj = {}; let activityObj = {};
let indexOfList = [3186, 3175, 4597]; let indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
typeList.forEach((item) => { typeList.forEach((item) => {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) { if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -1364,6 +1419,7 @@ export default {
this.activityObj = activityObj; this.activityObj = activityObj;
} }
this.shopTypeList = resList; this.shopTypeList = resList;
this.selectProducts = resList[0].UserdefinedType_Id; this.selectProducts = resList[0].UserdefinedType_Id;
}, },
// //
@ -1542,6 +1598,44 @@ export default {
this.handleGetEveryWeekShopShowData(list) this.handleGetEveryWeekShopShowData(list)
}, },
//
async handleGetModalProducetShop() {
let _this = this
let list = []
let moduleActivity = uni.getStorageSync("moduleActivity")
if (moduleActivity) {
list = moduleActivity
this.$api.$javaGet(
'/third-party/getWeChatGetMallGoodsInfo',
{
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1,
}
).then((data) => {
let newList = data.Data && data.Data.List ? data.Data.List : [];
if (JSON.stringify(newList) !== JSON.stringify(list)) {
uni.setStorageSync("moduleActivity", newList)
_this.handleGetModalProducetShopShowData(newList)
}
})
} else {
const data = await this.$api.$javaGet(
'/third-party/getWeChatGetMallGoodsInfo',
{
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1,
}
)
list = data.Data && data.Data.List ? data.Data.List : [];
uni.setStorageSync("moduleActivity", list)
}
this.handleGetModalProducetShopShowData(list)
},
// //
handleGetEveryWeekShopShowData(list) { handleGetEveryWeekShopShowData(list) {
let shopList = []; let shopList = [];
@ -1577,9 +1671,44 @@ export default {
}); });
} }
console.log('weeklySpecialOfferweeklySpecialOfferweeklySpecialOfferweeklySpecialOffer', shopList); console.log('weeklySpecialOfferweeklySpecialOfferweeklySpecialOfferweeklySpecialOffer', shopList);
this.weeklySpecialOffer = shopList this.weeklySpecialOffer = shopList
}, },
//
handleGetModalProducetShopShowData(list) {
let shopList = [];
if (list && list.length > 0) {
list.forEach((item) => {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach((subItem) => {
if (
subItem.COMMODITY_MEMBERPRICE &&
subItem.COMMODITY_MEMBERPRICE.toString().indexOf(".") !== -1
) {
subItem.bigNumber =
subItem.COMMODITY_MEMBERPRICE.toString().split(".")[0];
subItem.smallNumber =
subItem.COMMODITY_MEMBERPRICE.toString().split(".")[1];
} else {
subItem.bigNumber = subItem.COMMODITY_MEMBERPRICE;
}
if (
subItem.COMMODITY_RETAILPRICE &&
subItem.COMMODITY_RETAILPRICE.toString().indexOf(".") !== -1
) {
subItem.RETbigNumber =
subItem.COMMODITY_RETAILPRICE.toString().split(".")[0];
subItem.RETsmallNumber =
subItem.COMMODITY_RETAILPRICE.toString().split(".")[1];
} else {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
}
shopList.push(subItem);
});
}
});
}
this.marketingCampaign = shopList
},
// nature 5050 // nature 5050
async handleGetTodayOffers() { async handleGetTodayOffers() {
let _this = this let _this = this
@ -2240,6 +2369,9 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
// padding: 2rpx; // padding: 2rpx;
background-image: url("https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/Special Offers.png");
background-repeat: no-repeat;
background-size: 100% 100%;
.contentBox { .contentBox {
width: 100%; width: 100%;
@ -2247,17 +2379,16 @@ export default {
box-sizing: border-box; box-sizing: border-box;
min-height: 214rpx; min-height: 214rpx;
padding: 30rpx; padding: 30rpx;
background-image: url("https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/Special Offers.png");
background-repeat: no-repeat;
background-size: 100% 100%;
// background: linear-gradient(180deg, // background: linear-gradient(180deg,
// rgba(230, 240, 255, 1) 0%, // rgba(230, 240, 255, 1) 0%,
// rgba(255, 255, 255, 1) 50%, // rgba(255, 255, 255, 1) 50%,
// #ffffff 100%); // #ffffff 100%);
flex-wrap: wrap; // flex-wrap: wrap;
display: flex; // display: flex;
align-items: center; // align-items: center;
// justify-content: space-between; // justify-content: space-between;
white-space: nowrap;
.rowBox { .rowBox {
width: 20%; width: 20%;
@ -2268,7 +2399,7 @@ export default {
// display: inline-block; // display: inline-block;
// box-sizing: border-box; // box-sizing: border-box;
display: flex; display: inline-flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
// justify-content: space-between; // justify-content: space-between;
@ -2328,7 +2459,7 @@ export default {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 24rpx 160rpx; padding: 0 24rpx 160rpx;
margin-top: 24rpx; // margin-top: 24rpx;
.noticeBox { .noticeBox {
width: 100%; width: 100%;

View File

@ -157,6 +157,15 @@
) )
}} }}
</view> </view>
<!-- <view class="discountedPrice" v-if="item.showDiscount">
<text class="sumPriceUnit"></text>{{
preciseRound(
item.discountedPrice * item.count
)
}}
</view> -->
</div> </div>
<div class="detailRight"> <div class="detailRight">
<div class="title"> <div class="title">
@ -221,9 +230,16 @@
@click="handleAllDelete" />全选 @click="handleAllDelete" />全选
</div> </div>
<div class="bottomRight" v-if="pageType === 'normal'"> <div class="bottomRight" v-if="pageType === 'normal'">
<!-- <view style="display: flex;flex-direction: column;align-items: flex-end;"> -->
<view class="submitTextBox">
<text class="sum">合计</text> <text class="sum">合计</text>
<text class="sumPrice"></text> <text class="sumPrice"></text>
<!-- <text class="sunNumber">{{ totalDiscount || totalPay }}</text> -->
<text class="sunNumber">{{ totalPay }}</text> <text class="sunNumber">{{ totalPay }}</text>
</view>
<!-- <view class="discountText" v-if="totalDiscount">已减{{ discountAmount }}</view> -->
<!-- </view> -->
<div class="submitBtn" @click="goPayFn" <div class="submitBtn" @click="goPayFn"
:style="{ background: bigPageType === 'UnionMall' ? '#4BCB7E' : '#4BCB7E' }">立即下单</div> :style="{ background: bigPageType === 'UnionMall' ? '#4BCB7E' : '#4BCB7E' }">立即下单</div>
</div> </div>
@ -293,6 +309,8 @@ export default {
delBtnWidth: 72, // delBtnWidth: 72, //
isAllSelect: false, // isAllSelect: false, //
totalPay: 0, // totalPay: 0, //
totalDiscount: 0,//
discountAmount: 0,//
inputMaxLength: -1, inputMaxLength: -1,
pageOut: false, // pageOut: false, //
storeId: "", storeId: "",
@ -314,7 +332,7 @@ export default {
if (newVal && newVal.length > 0) { if (newVal && newVal.length > 0) {
let count = 0; let count = 0;
newVal.forEach((item) => { newVal.forEach((item) => {
count += item.count; count += Number(item.count);
}); });
this.shopCarListCount = count; this.shopCarListCount = count;
} else { } else {
@ -335,7 +353,6 @@ export default {
this.showContent = this.skeletonControl.showContent this.showContent = this.skeletonControl.showContent
this.isFirstLoad = this.skeletonControl.showSkeleton this.isFirstLoad = this.skeletonControl.showSkeleton
console.log("query", query);
let height = uni.getStorageSync("safeHeight"); let height = uni.getStorageSync("safeHeight");
this.safeHeight = Number(height); this.safeHeight = Number(height);
@ -343,7 +360,6 @@ export default {
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
this.menu = uni.getMenuButtonBoundingClientRect(); this.menu = uni.getMenuButtonBoundingClientRect();
this.systemInfo = systemInfo; this.systemInfo = systemInfo;
console.log("systemInfo", systemInfo);
if (query.pageType) { if (query.pageType) {
this.bigPageType = query.pageType; this.bigPageType = query.pageType;
@ -358,7 +374,6 @@ export default {
this.handleGetAddressList(); this.handleGetAddressList();
this.handleGetNowShopCarList(); this.handleGetNowShopCarList();
this.handleSum();
// this.$utils.addUserBehaviorNew(); // this.$utils.addUserBehaviorNew();
// 访访 // 访访
if (this.skeletonControl && this.skeletonControl.showSkeleton) { if (this.skeletonControl && this.skeletonControl.showSkeleton) {
@ -381,8 +396,6 @@ export default {
}, },
onShow() { onShow() {
// onShow onLoad // onShow onLoad
console.log('this.bigPageTypethis.bigPageType', this.bigPageType);
// 西 // 西
let shopCarList = []; let shopCarList = [];
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
@ -390,15 +403,14 @@ export default {
} else { } else {
shopCarList = this.$store.state.myShopCar; shopCarList = this.$store.state.myShopCar;
} }
console.log("shopCarList", shopCarList);
this.shopList = shopCarList; this.shopList = shopCarList;
let count = 0; let count = 0;
if (shopCarList && shopCarList.length > 0) { if (shopCarList && shopCarList.length > 0) {
shopCarList.forEach((item) => { shopCarList.forEach((item) => {
count += item.count; count += Number(item.count);
}); });
} }
this.shopCarListCount = count; this.shopCarListCount = Number(count);
this.handleSum(); this.handleSum();
this.handleGetAddressList(); this.handleGetAddressList();
@ -410,7 +422,6 @@ export default {
item.cartItemAoumt = item.cartItemAoumt =
Number(item.COMMODITY_MEMBERPRICE) * Number(item.count); Number(item.COMMODITY_MEMBERPRICE) * Number(item.count);
}); });
console.log('this.pageTypethis.pageTypethis.bigPageType', this.bigPageType);
// list // list
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
@ -436,7 +447,6 @@ export default {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index"
}) })
// console.log('e', e);
// this.showExportFun = !this.showExportFun; // this.showExportFun = !this.showExportFun;
// this.showExportObj = e.detail // this.showExportObj = e.detail
}, },
@ -456,8 +466,6 @@ export default {
}, },
// //
handleChangeAddress(id) { handleChangeAddress(id) {
console.log("this.selectAddressId", this.selectAddressId);
this.addressList.forEach((item) => { this.addressList.forEach((item) => {
if (item.MEMBERADDRESS_ID === id) { if (item.MEMBERADDRESS_ID === id) {
this.showAddressObj = item; this.showAddressObj = item;
@ -489,8 +497,6 @@ export default {
} }
}); });
} }
console.log("defaultAddress", defaultAddress);
console.log("address", list);
if (!defaultAddress.MEMBERADDRESS_ID) { if (!defaultAddress.MEMBERADDRESS_ID) {
if (haveMEMBERADDRESSCODEList && haveMEMBERADDRESSCODEList.length > 0) { if (haveMEMBERADDRESSCODEList && haveMEMBERADDRESSCODEList.length > 0) {
defaultAddress = haveMEMBERADDRESSCODEList[0]; defaultAddress = haveMEMBERADDRESSCODEList[0];
@ -516,7 +522,6 @@ export default {
WechatUserId: this.user.WechatUserId, WechatUserId: this.user.WechatUserId,
}); });
this.userInfo = data.Data; this.userInfo = data.Data;
console.log("this.userInfo", this.userInfo);
uni.hideLoading(); uni.hideLoading();
}, },
// //
@ -527,16 +532,42 @@ export default {
} else { } else {
shopCarList = this.$store.state.myShopCar; shopCarList = this.$store.state.myShopCar;
} }
console.log("shopCarList", shopCarList); console.log('shopCarListshopCarList', JSON.parse(JSON.stringify(shopCarList)));
if (shopCarList && shopCarList.length > 0) { if (shopCarList && shopCarList.length > 0) {
//
// let haveSum = 0
shopCarList.forEach((item) => { shopCarList.forEach((item) => {
let goodNum = Number(item.count);
item.rows = item.rows =
item.COMMODITY_NAME && item.COMMODITY_NAME.length / 14 > 1 item.COMMODITY_NAME && item.COMMODITY_NAME.length / 14 > 1
? Math.ceil(item.COMMODITY_NAME.length / 14) ? Math.ceil(item.COMMODITY_NAME.length / 14)
: 1; : 1;
// if (item.select === true && item.COMMODITY_NATURE === 7000) {
// haveSum += 1 * goodNum
// }
}); });
// if (haveSum >= 2) {
// // 2 95
// shopCarList.forEach((item) => {
// if (item.COMMODITY_NATURE === 7000) {
// item.showDiscount = true
// item.discountedPrice = this.preciseRound(0.95 * item.COMMODITY_MEMBERPRICE)
// }
// })
// }
} }
this.shopList = shopCarList; this.shopList = shopCarList;
//
this.handleSum();
},
preciseRound(num, decimals = 2) {
if (isNaN(num) || num === null) return 0;
const factor = Math.pow(10, decimals);
return Math.round((num + Number.EPSILON) * factor) / factor;
}, },
// //
handleChangePageType() { handleChangePageType() {
@ -549,7 +580,6 @@ export default {
}, },
// //
startTouch(e, index) { startTouch(e, index) {
console.log("e", e);
if (e.touches.length === 1) { if (e.touches.length === 1) {
this.startX = e.touches[0].clientX; this.startX = e.touches[0].clientX;
this.selectIndex = index; this.selectIndex = index;
@ -587,13 +617,61 @@ export default {
// //
handleSum() { handleSum() {
this.totalPay = 0; this.totalPay = 0;
//
// let haveSum = 0
//
let allSelect = true
this.shopList.forEach((u) => { this.shopList.forEach((u) => {
let goodNum = Number(u.count);
if (u.select === true) { if (u.select === true) {
let goodNum = Number(u.count); let goodNum = Number(u.count);
this.totalPay += Number(u.COMMODITY_MEMBERPRICE) * goodNum; this.totalPay += Number(u.COMMODITY_MEMBERPRICE) * goodNum;
this.totalPay = Number(this.totalPay.toFixed(2)); this.totalPay = Number(this.totalPay.toFixed(2));
// //
// if (u.COMMODITY_NATURE === 7000) {
// haveSum += 1 * goodNum
// }
} else {
allSelect = false
} }
}); });
if (allSelect) {
this.isAllSelect = true
}
// if (haveSum >= 2) {
// // 2 95
// //
// // 95
// let discountedProducts = 0
// let noDiscountedProducts = 0
// this.shopList.forEach((item) => {
// let goodNum = Number(item.count);
// if (item.COMMODITY_NATURE === 7000 && item.select) {
// item.showDiscount = true
// item.discountedPrice = this.preciseRound(0.95 * item.COMMODITY_MEMBERPRICE)
// discountedProducts += item.COMMODITY_MEMBERPRICE * goodNum
// } else if (item.select) {
// noDiscountedProducts += item.COMMODITY_MEMBERPRICE * goodNum
// }
// })
// this.totalDiscount = (this.preciseRound(0.95 * discountedProducts) + noDiscountedProducts).toFixed(2)
// this.discountAmount = (discountedProducts - this.preciseRound(0.95 * discountedProducts)).toFixed(2)
// } else {
// this.shopList.forEach((item) => {
// if (item.COMMODITY_NATURE === 7000) {
// item.showDiscount = false
// item.discountedPrice = 0
// }
// })
// this.totalDiscount = 0
// this.discountAmount = 0
// }
}, },
// //
handleChangeSelect(item) { handleChangeSelect(item) {
@ -614,7 +692,6 @@ export default {
}, },
// //
handleChangeDelete(item) { handleChangeDelete(item) {
console.log("item", item);
if (item.selectDelete) { if (item.selectDelete) {
item.selectDelete = false; item.selectDelete = false;
} else { } else {
@ -641,8 +718,6 @@ export default {
if (res.confirm) { if (res.confirm) {
item.count -= 1; item.count -= 1;
// //
console.log('item', JSON.parse(JSON.stringify(item)));
if (item.count === 0) { if (item.count === 0) {
let list = []; let list = [];
_this.shopList.forEach((i) => { _this.shopList.forEach((i) => {
@ -690,7 +765,6 @@ export default {
} }
this.handleSum(); this.handleSum();
console.log(' this.shopList', this.shopList);
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
this.$store.commit("unionMyShopCar", this.shopList); this.$store.commit("unionMyShopCar", this.shopList);
@ -701,7 +775,6 @@ export default {
}, },
// //
haveFocus(e, item) { haveFocus(e, item) {
console.log("e", e);
let value = e.detail.value; let value = e.detail.value;
let number = 0; let number = 0;
if (value.indexOf(".") === -1) { if (value.indexOf(".") === -1) {
@ -710,7 +783,6 @@ export default {
let bigNumber = value.split(".")[0]; let bigNumber = value.split(".")[0];
number = Number(bigNumber); number = Number(bigNumber);
} }
console.log("number2", number);
let oldCount = item.count; let oldCount = item.count;
if (number < 0) { if (number < 0) {
@ -735,7 +807,6 @@ export default {
} }
}); });
_this.shopList = list; _this.shopList = list;
console.log("this.dataList1111", _this.shopList);
if (_this.bigPageType === "UnionMall") { if (_this.bigPageType === "UnionMall") {
_this.$store.commit("unionMyShopCar", _this.shopList); _this.$store.commit("unionMyShopCar", _this.shopList);
} else { } else {
@ -751,7 +822,6 @@ export default {
} else { } else {
item.count = number; item.count = number;
} }
console.log("this.dataList1111", this.shopList);
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
this.$store.commit("unionMyShopCar", this.shopList); this.$store.commit("unionMyShopCar", this.shopList);
} else { } else {
@ -772,8 +842,6 @@ export default {
}, },
// //
handleDeleteItem(obj) { handleDeleteItem(obj) {
console.log('obj', obj)
console.log('this.shopList', this.shopList)
let list = []; let list = [];
this.shopList.forEach((item) => { this.shopList.forEach((item) => {
if (item.COMMODITY_ID !== obj.COMMODITY_ID) { if (item.COMMODITY_ID !== obj.COMMODITY_ID) {
@ -866,8 +934,6 @@ export default {
}); });
} }
console.log("this.shopList", this.shopList);
if (isPresale) { if (isPresale) {
uni.showToast({ uni.showToast({
title: "选中的商品中有未售商品,无法下单!", title: "选中的商品中有未售商品,无法下单!",
@ -923,7 +989,6 @@ export default {
} }
} }
}); });
console.log("DATAFORMATTypeList", DATAFORMATTypeList);
if (DATAFORMATTypeList && DATAFORMATTypeList.length > 1) { if (DATAFORMATTypeList && DATAFORMATTypeList.length > 1) {
uni.showToast({ uni.showToast({
@ -933,7 +998,6 @@ export default {
return; return;
} }
} }
console.log("this.shopList", this.shopList);
if (this.shopList.length > 0) { if (this.shopList.length > 0) {
this.pageOut = true; this.pageOut = true;
let orderList = []; let orderList = [];
@ -973,16 +1037,15 @@ export default {
// item.COMMODITY_ID = item.SELLERCOMMODITY_ID // item.COMMODITY_ID = item.SELLERCOMMODITY_ID
}); });
} }
console.log("noSelectList", noSelectList);
console.log("orderList", JSON.parse(JSON.stringify(orderList)));
let id = Number( let id = Number(
Math.random().toString().substr(3, 5) + Date.now() Math.random().toString().substr(3, 5) + Date.now()
).toString(36); ).toString(36);
if (orderList.length > 0) { if (orderList.length > 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=${JSON.stringify( url: `/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=${encodeURIComponent(JSON.stringify(
orderList orderList
)}&pageType=${this.bigPageType}&addressId=${this.selectAddressId}`, ))}&pageType=${this.bigPageType}&addressId=${this.selectAddressId}`,
}); });
} else { } else {
uni.showToast({ title: "购物车内无勾选商品", icon: "none" }); uni.showToast({ title: "购物车内无勾选商品", icon: "none" });
@ -1182,7 +1245,9 @@ export default {
line-height: 18px; line-height: 18px;
width: 100%; width: 100%;
margin-top: 24rpx; margin-top: 24rpx;
text-align: center; text-align: left;
box-sizing: border-box;
padding-left: 56rpx;
.sumPriceUnit { .sumPriceUnit {
font-size: 12px; font-size: 12px;
@ -1190,7 +1255,42 @@ export default {
font-weight: bold; font-weight: bold;
// color: #ff6219; // color: #ff6219;
color: #ff6219; color: #ff6219;
line-height: 12px;
}
}
.haveDiscount {
margin-top: 0;
font-size: 14px;
color: #4D4B4C;
font-weight: bold;
.sumPriceUnit {
font-size: 12px;
color: #4D4B4C;
font-weight: bold;
}
}
.discountedPrice {
height: 20px;
font-size: 18px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #ff6219;
line-height: 18px; line-height: 18px;
width: 100%;
text-align: left;
box-sizing: border-box;
padding-left: 56rpx;
.sumPriceUnit {
font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
// color: #ff6219;
color: #ff6219;
line-height: 12px;
} }
} }
} }
@ -1392,6 +1492,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.submitTextBox {
.sum { .sum {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
@ -1415,6 +1516,15 @@ export default {
color: #ff6219; color: #ff6219;
line-height: 20px; line-height: 20px;
} }
}
.discountText {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff6219;
}
.submitBtn { .submitBtn {
width: 210rpx; width: 210rpx;

View File

@ -1003,7 +1003,7 @@ export default {
// //
handleGetShopTypeShowData(typeList) { handleGetShopTypeShowData(typeList) {
let resList = []; let resList = [];
let indexOfList = [3186, 3175, 4597]; let indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
typeList.forEach((item) => { typeList.forEach((item) => {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) { if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -1688,6 +1688,10 @@ export default {
this.changBigTypeLoading = true; this.changBigTypeLoading = true;
this.rightShopList = shopList; this.rightShopList = shopList;
this.visibleList = shopList.slice(0, this.visibleCount + this.buffer * 2); this.visibleList = shopList.slice(0, this.visibleCount + this.buffer * 2);
} else {
this.changBigTypeLoading = true;
this.rightShopList = shopList;
this.visibleList = shopList.slice(0, this.visibleCount + this.buffer * 2);
} }
}, },
// //
@ -1910,6 +1914,7 @@ export default {
.scrollBox { .scrollBox {
width: 100%; width: 100%;
white-space: nowrap;
.bigTabItem { .bigTabItem {
width: 20%; width: 20%;

View File

@ -28,7 +28,13 @@
<span class="font_2">单价: {{ obj.COMMODITY_MEMBERPRICE }}/{{ <span class="font_2">单价: {{ obj.COMMODITY_MEMBERPRICE }}/{{
obj.COMMODITY_UNIT obj.COMMODITY_UNIT
}}</span> }}</span>
<span class="font_2">¥{{ obj.cartItemAoumt }}</span> <view style="display: flex;flex-direction: column;align-items: flex-end;">
<span class="font_2" :style="{ textDecoration: obj.showDiscount ? 'line-through' : '' }">¥{{ obj.cartItemAoumt
}}</span>
<span class="font_2" v-if="obj.showDiscount">¥{{ preciseRound(
obj.discountedPrice * obj.count
) }}</span>
</view>
</div> </div>
<div class="remark" v-if="isSubmit && obj.SALEDETAIL_DESC"> <div class="remark" v-if="isSubmit && obj.SALEDETAIL_DESC">
<input :disabled="isSubmit" class="input" v-model="obj.SALEDETAIL_DESC" /> <input :disabled="isSubmit" class="input" v-model="obj.SALEDETAIL_DESC" />
@ -58,6 +64,11 @@ export default {
obj.SALEDETAIL_DESC = e.detail.value; obj.SALEDETAIL_DESC = e.detail.value;
this.$emit('update-desc', { COMMODITY_ID: obj.COMMODITY_ID, RTCOMMODITY_MULTI_ID: obj.RTCOMMODITY_MULTI_ID, value: e.detail.value }); this.$emit('update-desc', { COMMODITY_ID: obj.COMMODITY_ID, RTCOMMODITY_MULTI_ID: obj.RTCOMMODITY_MULTI_ID, value: e.detail.value });
}, },
preciseRound(num, decimals = 2) {
if (isNaN(num) || num === null) return 0;
const factor = Math.pow(10, decimals);
return Math.round((num + Number.EPSILON) * factor) / factor;
},
}, },
}; };
</script> </script>

View File

@ -102,9 +102,15 @@
<div class="place_order"> <div class="place_order">
<div class="place_order_box" v-if="!isSubmit"> <div class="place_order_box" v-if="!isSubmit">
<div style="display: flex;flex-direction: column;align-items: flex-end;">
<div class="sum_count"> <div class="sum_count">
合计<span class="unit"></span><span class="price">{{ couponOrder }}</span> 合计<span class="unit"></span><span class="price">{{ couponOrder }}</span>
</div> </div>
<div class="discountAmount" v-if="discountAmount">
已减{{ discountAmount }}
</div>
</div>
<div v-if="pageType === 'UnionMall' && payType === 1" class="place_order_btn" @click="handleCombinationPayment"> <div v-if="pageType === 'UnionMall' && payType === 1" class="place_order_btn" @click="handleCombinationPayment">
组合支付 组合支付
@ -213,6 +219,7 @@ export default {
recommendCode: "", // recommendCode: "", //
currentOrderDetial: "",// currentOrderDetial: "",//
noDelivery: false,// noDelivery: false,//
discountAmount: 0,//
}; };
}, },
computed: { computed: {
@ -227,10 +234,43 @@ export default {
couponOrder() { couponOrder() {
// //
let amount = 0; let amount = 0;
console.log('computedcomputed', this.shopOrder);
// 2 95
let haveSum = 0
this.shopOrder.forEach((item) => {
let goodNum = Number(item.count);
if (item.showDiscount) {
haveSum += 1 * goodNum
}
})
if (haveSum >= 2) {
let discountedProducts = 0 // (0.95)
let noDiscountedProducts = 0
this.shopOrder.forEach((item) => {
let goodNum = Number(item.count);
if (item.showDiscount) {
discountedProducts += item.COMMODITY_MEMBERPRICE * goodNum
} else {
noDiscountedProducts += item.COMMODITY_MEMBERPRICE * goodNum
}
})
this.discountAmount = (discountedProducts - this.preciseRound(0.95 * discountedProducts)).toFixed(2)
let res = (this.preciseRound(0.95 * discountedProducts) + noDiscountedProducts).toFixed(2)
console.log('this.discountAmount this.discountAmount', this.discountAmount);
return res
} else {
//
this.shopOrder.map((v) => { this.shopOrder.map((v) => {
amount += v.ORDER_AMOUNT; amount += v.ORDER_AMOUNT;
}); });
this.discountAmount = 0
return amount.toFixed(2); return amount.toFixed(2);
}
}, },
}, },
onShow() { onShow() {
@ -241,7 +281,6 @@ export default {
} }
}, },
// onHide() { // onHide() {
// console.log(' this.currentOrderDetial this.currentOrderDetial', this.currentOrderDetial);
// if (this.currentOrderDetial.SALEBILL_ID) { // if (this.currentOrderDetial.SALEBILL_ID) {
// const req = { // const req = {
// action_type: "UpdateOrderState", // action_type: "UpdateOrderState",
@ -254,23 +293,19 @@ export default {
// } // }
// }, // },
async onLoad(option) { async onLoad(option) {
console.log('optionoptionoptionoption', option);
const app = getApp(); const app = getApp();
if (option.rcmCode) { if (option.rcmCode) {
this.recommendCode = Number(option.rcmCode); this.recommendCode = Number(option.rcmCode);
} }
if (option.shopCarList) { if (option.shopCarList) {
let shopList = JSON.parse(option.shopCarList); let shopList = JSON.parse(decodeURIComponent(option.shopCarList));
console.log("shopList", shopList); console.log('shopListshopListshopListshopList', shopList);
let sum = 0; let sum = 0;
let newList = []; let newList = [];
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
shopList.forEach((item) => { shopList.forEach((item) => {
let obj = this.parseBracketString(item.COMMODITY_NAME); let obj = this.parseBracketString(item.COMMODITY_NAME);
console.log("obj", obj);
sum += item.count; sum += item.count;
newList.push({ newList.push({
...obj, ...obj,
@ -279,7 +314,6 @@ export default {
}); });
} }
this.shopOrder = newList; this.shopOrder = newList;
console.log("this.shopOrder", this.shopOrder);
this.shopCount = sum; this.shopCount = sum;
} }
if (option.addressId) { if (option.addressId) {
@ -288,7 +322,6 @@ export default {
if (option.pageType) { if (option.pageType) {
this.pageType = option.pageType; this.pageType = option.pageType;
} }
console.log("this.shopOrder", this.shopOrder);
// //
if (this.shopOrder && this.shopOrder.length > 0) { if (this.shopOrder && this.shopOrder.length > 0) {
@ -306,24 +339,28 @@ export default {
} else { } else {
// tab // tab
this.noDelivery = true this.noDelivery = true
this.selectTab = 2
} }
} }
// //
await this.handleGetAddressList(); await this.handleGetAddressList();
console.log("1");
this.isFirst = false; this.isFirst = false;
this.$utils.addUserBehaviorNew(); this.$utils.addUserBehaviorNew();
}, },
methods: { methods: {
preciseRound(num, decimals = 2) {
if (isNaN(num) || num === null) return 0;
const factor = Math.pow(10, decimals);
return Math.round((num + Number.EPSILON) * factor) / factor;
},
updateDesc({ COMMODITY_ID, RTCOMMODITY_MULTI_ID, value }) { updateDesc({ COMMODITY_ID, RTCOMMODITY_MULTI_ID, value }) {
const item = this.shopOrder.find(i => i.COMMODITY_ID === COMMODITY_ID && i.RTCOMMODITY_MULTI_ID === RTCOMMODITY_MULTI_ID); const item = this.shopOrder.find(i => i.COMMODITY_ID === COMMODITY_ID && i.RTCOMMODITY_MULTI_ID === RTCOMMODITY_MULTI_ID);
if (item) item.SALEDETAIL_DESC = value; if (item) item.SALEDETAIL_DESC = value;
}, },
// //
handlePayTypeChange(e) { handlePayTypeChange(e) {
console.log("e", e);
this.payType = Number(e.detail.value); this.payType = Number(e.detail.value);
}, },
// //
@ -360,7 +397,6 @@ export default {
// //
async handleGetAddressList() { async handleGetAddressList() {
const data = await this.$api.getCoop({ action_type: "GetAddressList" }); const data = await this.$api.getCoop({ action_type: "GetAddressList" });
console.log("handleGetAddressList", data);
let list = data.Data.List; let list = data.Data.List;
let defaultAddress = {}; let defaultAddress = {};
if (list && list.length > 0) { if (list && list.length > 0) {
@ -382,7 +418,6 @@ export default {
} }
}); });
console.log("defaultAddress", defaultAddress);
if (!defaultAddress.MEMBERADDRESS_ID) { if (!defaultAddress.MEMBERADDRESS_ID) {
defaultAddress = list[0]; defaultAddress = list[0];
} }
@ -398,8 +433,6 @@ export default {
}, },
// //
handleChangeAddress(id) { handleChangeAddress(id) {
console.log("this.selectAddressId", this.selectAddressId);
this.addressList.forEach((item) => { this.addressList.forEach((item) => {
if (item.MEMBERADDRESS_ID === id) { if (item.MEMBERADDRESS_ID === id) {
this.addressInfo = item; this.addressInfo = item;
@ -454,13 +487,15 @@ export default {
}); });
return; return;
} }
this.isMakeOrdering = true; this.isMakeOrdering = true;
console.log("_this.user", this.user); uni.showLoading({
console.log("_this.shopOrder", this.shopOrder); title: "创建订单...",
mask: true
})
// DATAFORMAT DATAFORMAT 2 3002 // DATAFORMAT DATAFORMAT 2 3002
let DATAFORMATType = 0; let DATAFORMATType = 0;
if (this.shopOrder && this.shopOrder.length > 0) { if (this.shopOrder && this.shopOrder.length > 0) {
@ -474,12 +509,8 @@ export default {
}); });
} }
console.log("DATAFORMATType", DATAFORMATType);
let openId = uni.getStorageSync("openId"); let openId = uni.getStorageSync("openId");
console.log("openId", openId);
console.log("this.user", this.user);
const app = getApp(); const app = getApp();
// //
@ -501,7 +532,7 @@ export default {
COMMODITY_RULE: item.COMMODITY_RULE ? item.COMMODITY_RULE.toString() : "", COMMODITY_RULE: item.COMMODITY_RULE ? item.COMMODITY_RULE.toString() : "",
COMMODITY_RETAILPRICE: item.COMMODITY_RETAILPRICE ? item.COMMODITY_RETAILPRICE.toString() : "", COMMODITY_RETAILPRICE: item.COMMODITY_RETAILPRICE ? item.COMMODITY_RETAILPRICE.toString() : "",
COMMODITY_PURCHASEPRICE: item.COMMODITY_PURCHASEPRICE ? item.COMMODITY_PURCHASEPRICE.toString() : "", COMMODITY_PURCHASEPRICE: item.COMMODITY_PURCHASEPRICE ? item.COMMODITY_PURCHASEPRICE.toString() : "",
COMMODITY_MEMBERPRICE: item.COMMODITY_MEMBERPRICE ? item.COMMODITY_MEMBERPRICE.toString() : "", COMMODITY_MEMBERPRICE: item.discountedPrice ? item.discountedPrice.toString() : item.COMMODITY_MEMBERPRICE ? item.COMMODITY_MEMBERPRICE.toString() : "",
COMMODITY_CURRPRICE: item.COMMODITY_CURRPRICE ? item.COMMODITY_CURRPRICE.toString() : "", COMMODITY_CURRPRICE: item.COMMODITY_CURRPRICE ? item.COMMODITY_CURRPRICE.toString() : "",
COMMODITY_STOCK: item.COMMODITY_STOCK ? item.COMMODITY_STOCK.toString() : "", COMMODITY_STOCK: item.COMMODITY_STOCK ? item.COMMODITY_STOCK.toString() : "",
COMMODITY_STATE: item.COMMODITY_STATE ? item.COMMODITY_STATE.toString() : "", COMMODITY_STATE: item.COMMODITY_STATE ? item.COMMODITY_STATE.toString() : "",
@ -516,9 +547,6 @@ export default {
}); });
}); });
console.log('newShopListnewShopList', newShopList);
let req = { let req = {
action_type: "ScanOrder", action_type: "ScanOrder",
salebillType: salebillType:
@ -555,12 +583,11 @@ export default {
// const scanParams = app.globalData.recommendCode; // const scanParams = app.globalData.recommendCode;
// const scanParams2 = app.globalData.recommendId; // const scanParams2 = app.globalData.recommendId;
}; };
console.log("req", req);
console.log("this.shopOrder", this.shopOrder);
console.log("this.addressInfo", this.addressInfo);
// return // return
console.log('reqreqreq', req);
const data = await this.$api.postCoop(req); const data = await this.$api.postCoop(req);
console.log("data", data); console.log('创建的订单', data);
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
@ -582,9 +609,28 @@ export default {
if (this.pageType === "UnionMall") { if (this.pageType === "UnionMall") {
this.handleBalancePayment(data.Data); this.handleBalancePayment(data.Data);
} else {
if (this.user.TEST_MEMBER) {
let _this = this
uni.showModal({
content: "此单是否为测试订单?",
success: function (res) {
if (res.confirm) {
//
_this.handleUpdateOrderGrowth(data.Data.SALEBILL_ID, data.Data.PAY_AMOUNT)
uni.redirectTo({
url: `/pages/order/orderdetail/index?orderInternal=${data.Data.SALEBILL_ID}`,
});
} else if (res.cancel) {
_this.getOrderInfo(data.Data, data.Data.PAY_AMOUNT);
}
}
})
} else { } else {
this.getOrderInfo(data.Data, data.Data.PAY_AMOUNT); this.getOrderInfo(data.Data, data.Data.PAY_AMOUNT);
} }
}
// let [provinceId, cityId, districtId, streetId] = // let [provinceId, cityId, districtId, streetId] =
// this.addressInfo.MEMBERADDRESS_CODE.split(","); // this.addressInfo.MEMBERADDRESS_CODE.split(",");
@ -629,7 +675,6 @@ export default {
// "/pino/order/submit", // "/pino/order/submit",
// req // req
// ); // );
// console.log("pingnuoData", pingnuoData);
// if (pingnuoData.code === 200) { // if (pingnuoData.code === 200) {
// let shopCarList = []; // let shopCarList = [];
// if (this.pageType === "UnionMall") { // if (this.pageType === "UnionMall") {
@ -707,19 +752,15 @@ export default {
AppID: "wxee018fb96955552a", AppID: "wxee018fb96955552a",
type: 'encryption' type: 'encryption'
} }
console.log('reqreqreq', req);
const data = await this.$api.$zzyLocalPost( const data = await this.$api.$zzyLocalPost(
"/Member/RecordMemberScoreInfo", "/Member/RecordMemberScoreInfo",
req req
); );
console.log('datadatadatadata', data);
}, },
// //
async handleBalancePayment(obj) { async handleBalancePayment(obj) {
let _this = this; let _this = this;
console.log("this.user", this.user);
console.log("obj", obj);
// //
uni.showLoading({ uni.showLoading({
@ -730,7 +771,6 @@ export default {
WechatUserId: this.user.WechatUserId, WechatUserId: this.user.WechatUserId,
}); });
this.userInfo = userData.Data; this.userInfo = userData.Data;
console.log("this.userInfo", this.userInfo);
uni.hideLoading(); uni.hideLoading();
// //
@ -754,7 +794,6 @@ export default {
mixPay: insufficientBalance ? 1 : "", // 1 mixPay: insufficientBalance ? 1 : "", // 1
}; };
const data = await this.$api.postCoop(req); const data = await this.$api.postCoop(req);
console.log("data", data);
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
if (insufficientBalance) { if (insufficientBalance) {
uni.showModal({ uni.showModal({
@ -765,7 +804,28 @@ export default {
uni.showLoading({ uni.showLoading({
title: "进行组合支付...", title: "进行组合支付...",
}); });
if (_this.user.TEST_MEMBER) {
let _this = this
uni.showModal({
content: "此单是否为测试订单?",
success: function (res) {
if (res.confirm) {
//
_this.handleUpdateOrderGrowth(data.ResultData.SALEBILL_ID, data.ResultData.PAY_AMOUNT)
uni.redirectTo({
url: `/pages/order/orderdetail/index?orderInternal=${obj.SALEBILL_ID}`,
});
} else if (res.cancel) {
_this.getOrderInfo(obj, data.ResultData); _this.getOrderInfo(obj, data.ResultData);
}
}
})
} else {
this.getOrderInfo(obj, data.ResultData);
}
uni.hideLoading(); uni.hideLoading();
} else if (res.cancel) { } else if (res.cancel) {
// //
@ -784,8 +844,6 @@ export default {
} }
let newShopList = [] let newShopList = []
console.log('nowShopCarListnowShopCarList', nowShopCarList);
if (nowShopCarList && nowShopCarList.length > 0) { if (nowShopCarList && nowShopCarList.length > 0) {
nowShopCarList.forEach((item) => { nowShopCarList.forEach((item) => {
if (idList.indexOf(item.COMMODITY_ID) === -1) { if (idList.indexOf(item.COMMODITY_ID) === -1) {
@ -794,8 +852,6 @@ export default {
}) })
} }
console.log('newShopListnewShopList', newShopList);
// 3000 30001 // 3000 30001
if (_this.pageType === "UnionMall") { if (_this.pageType === "UnionMall") {
_this.$store.commit("unionMyShopCar", newShopList); _this.$store.commit("unionMyShopCar", newShopList);
@ -892,24 +948,8 @@ export default {
// 16 // 16
// //
async getOrderInfo(obj, payMoney) { async getOrderInfo(obj, payMoney) {
if (this.user.TEST_MEMBER) {
//
this.handleUpdateOrderGrowth(obj.SALEBILL_ID, obj.PAY_AMOUNT)
uni.redirectTo({
url: `/pages/order/orderdetail/index?orderInternal=${obj.SALEBILL_ID}`,
});
return
}
console.log('this.shopOrderthis.shopOrderthis.shopOrder', this.shopOrder);
// payMoney // payMoney
let _this = this; let _this = this;
console.log("_this.couponOrder", _this.couponOrder);
console.log("payMoneypayMoneypayMoney", payMoney);
console.log("objobjobjobjobjobjobjobj", obj);
// //
let mchid = "1672298991"; let mchid = "1672298991";
let timeStamp = Math.ceil(new Date().getTime() / 1000); let timeStamp = Math.ceil(new Date().getTime() / 1000);
@ -936,7 +976,6 @@ export default {
openid: _this.user.WECHATAPP_OPENID, openid: _this.user.WECHATAPP_OPENID,
}, // }, //
}; };
console.log("req", req);
let reqSign = { let reqSign = {
parameters: parameters:
@ -1058,10 +1097,8 @@ export default {
// SALEBILL_CODE: this.orderInfo.SALEBILL_CODE, // SALEBILL_CODE: this.orderInfo.SALEBILL_CODE,
// requestType: "application/x-www-form-urlencoded", // requestType: "application/x-www-form-urlencoded",
// }; // };
// console.log("getOrderInfo", req);
return; return;
_this.$api.postCoop(req).then((res) => { _this.$api.postCoop(req).then((res) => {
console.log("getOrderInfo", res);
if (res) { if (res) {
uni.requestPayment({ uni.requestPayment({
appId: "wxee018fb96955552a", // appId: "wxee018fb96955552a", //
@ -1468,6 +1505,13 @@ export default {
font-size: 36rpx; font-size: 36rpx;
} }
} }
.discountAmount {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff6219;
}
} }
.place_order_btn { .place_order_btn {

View File

@ -123,7 +123,8 @@
backgroundSize: '100% 100%', backgroundSize: '100% 100%',
}" }"
></view> --> ></view> -->
<image mode="aspectFit" :lazy-load="true" :src="img.IMAGE_URL" @click="handlePreviewSwiper(img, i)"> <!-- mode="aspectFit" -->
<image :lazy-load="true" :src="img.IMAGE_URL" @click="handlePreviewSwiper(img, i)">
</image> </image>
</swiper-item> </swiper-item>
</swiper> </swiper>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are 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

@ -130,11 +130,8 @@ var _default = {
sessionUser: "user" sessionUser: "user"
})), })),
onLaunch: function onLaunch(options) { onLaunch: function onLaunch(options) {
console.log("onLaunch", options);
// 设置应用启动时间戳,用于骨架屏管理 // 设置应用启动时间戳,用于骨架屏管理
this.globalData.appLaunchTime = Date.now(); this.globalData.appLaunchTime = Date.now();
console.log('应用启动时间:', this.globalData.appLaunchTime);
this.setVisitChannels(options.scene); this.setVisitChannels(options.scene);
// this.handleGetUserInfo(); // this.handleGetUserInfo();
var _this = this; var _this = this;
@ -189,7 +186,6 @@ var _default = {
var obj = _objectSpread(_objectSpread({}, data.data), {}, { var obj = _objectSpread(_objectSpread({}, data.data), {}, {
ip: data.ip ip: data.ip
}); });
console.log("obj", obj);
uni.setStorageSync("userInfo", obj); uni.setStorageSync("userInfo", obj);
}, },
fail: function fail(error) { fail: function fail(error) {
@ -202,7 +198,6 @@ var _default = {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
uni.login({ uni.login({
success: function success(res) { success: function success(res) {
console.log("login", res);
uni.setStorageSync("openId", res.code); uni.setStorageSync("openId", res.code);
_this.$api.getCoop({ _this.$api.getCoop({
action_type: "WeChatLogin", action_type: "WeChatLogin",
@ -214,34 +209,33 @@ var _default = {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context.prev = _context.next) {
case 0: case 0:
console.log('fdsfgaslkfs', data);
_this.$store.commit("setUser", data.Data); _this.$store.commit("setUser", data.Data);
_this.user = data.Data; _this.user = data.Data;
if (!(data.ResultCode === "100")) { if (!(data.ResultCode === "100")) {
_context.next = 15; _context.next = 14;
break; break;
} }
_context.prev = 4; _context.prev = 3;
_context.next = 7; _context.next = 6;
return _this.getMember(data.Data); return _this.getMember(data.Data);
case 7: case 6:
// 确保 getMember 完成 // 确保 getMember 完成
resolve(data); resolve(data);
_context.next = 13; _context.next = 12;
break; break;
case 10: case 9:
_context.prev = 10; _context.prev = 9;
_context.t0 = _context["catch"](4); _context.t0 = _context["catch"](3);
reject(_context.t0); reject(_context.t0);
case 13: case 12:
_context.next = 15; _context.next = 14;
break; break;
case 15: case 14:
case "end": case "end":
return _context.stop(); return _context.stop();
} }
} }
}, _callee, null, [[4, 10]]); }, _callee, null, [[3, 9]]);
})); }));
return function (_x) { return function (_x) {
return _ref.apply(this, arguments); return _ref.apply(this, arguments);
@ -267,7 +261,6 @@ 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);
uni.setStorageSync("userData", _data.Data); uni.setStorageSync("userData", _data.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 || "";
@ -287,7 +280,6 @@ var _default = {
_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);
console.log("_this.globalData");
} else { } else {
// _this.setUser({}); // _this.setUser({});
_this.$store.commit("setUser", user); _this.$store.commit("setUser", user);

View File

@ -13535,7 +13535,6 @@ function addUserBehaviorNew(obj) {
LoginPlace: ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.prov) || '') + (userInfo !== null && userInfo !== void 0 && userInfo.prov && userInfo !== null && userInfo !== void 0 && userInfo.city ? '-' : '') + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.city) || ''), LoginPlace: ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.prov) || '') + (userInfo !== null && userInfo !== void 0 && userInfo.prov && userInfo !== null && userInfo !== void 0 && userInfo.city ? '-' : '') + ((userInfo === null || userInfo === void 0 ? void 0 : userInfo.city) || ''),
OperatingSystem: '彩云驿出行' OperatingSystem: '彩云驿出行'
}; };
console.log('埋点数据:', req);
_api.default.$get('/CommercialApi/UserBehavior/AddUserBehavior', req).then(function () {}); _api.default.$get('/CommercialApi/UserBehavior/AddUserBehavior', req).then(function () {});
} }
var _default = { var _default = {
@ -15351,17 +15350,14 @@ var SkeletonManager = /*#__PURE__*/function () {
this.visitedPages = new Set(); this.visitedPages = new Set();
uni.removeStorageSync('visitedPages'); uni.removeStorageSync('visitedPages');
uni.setStorageSync('lastAppLaunchTime', appLaunchTime); uni.setStorageSync('lastAppLaunchTime', appLaunchTime);
console.log('骨架屏管理器: 检测到新的小程序启动,重置访问记录');
} else { } else {
// 同一次应用启动,恢复已访问记录 // 同一次应用启动,恢复已访问记录
var cachedVisitedPages = uni.getStorageSync('visitedPages'); var cachedVisitedPages = uni.getStorageSync('visitedPages');
if (cachedVisitedPages && Array.isArray(cachedVisitedPages)) { if (cachedVisitedPages && Array.isArray(cachedVisitedPages)) {
this.visitedPages = new Set(cachedVisitedPages); this.visitedPages = new Set(cachedVisitedPages);
console.log('骨架屏管理器: 恢复已访问记录', cachedVisitedPages);
} }
} }
} catch (error) { } catch (error) {
console.warn('骨架屏管理器初始化失败:', error);
this.visitedPages = new Set(); this.visitedPages = new Set();
} }
} }
@ -15394,7 +15390,6 @@ var SkeletonManager = /*#__PURE__*/function () {
var pageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var pageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var pageKey = this.generatePageKey(pagePath, pageType); var pageKey = this.generatePageKey(pagePath, pageType);
var shouldShow = !this.visitedPages.has(pageKey); var shouldShow = !this.visitedPages.has(pageKey);
console.log("\u9AA8\u67B6\u5C4F\u68C0\u67E5 ".concat(pageKey, ": ").concat(shouldShow ? '需要显示' : '已访问过'), "\u5F53\u524D\u5DF2\u8BBF\u95EE\u9875\u9762:", Array.from(this.visitedPages));
return shouldShow; return shouldShow;
} }
@ -15408,11 +15403,8 @@ var SkeletonManager = /*#__PURE__*/function () {
value: function markPageVisited(pagePath) { value: function markPageVisited(pagePath) {
var pageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var pageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var pageKey = this.generatePageKey(pagePath, pageType); var pageKey = this.generatePageKey(pagePath, pageType);
console.log('pageKeypageKeypageKey', pageKey);
this.visitedPages.add(pageKey); this.visitedPages.add(pageKey);
console.log('this.visitedPagesthis.visitedPages', this.visitedPages);
this.saveToCache(); this.saveToCache();
console.log("\u9AA8\u67B6\u5C4F\u6807\u8BB0\u5DF2\u8BBF\u95EE: ".concat(pageKey), "\u5F53\u524D\u5DF2\u8BBF\u95EE\u9875\u9762:", Array.from(this.visitedPages));
} }
/** /**
@ -15451,7 +15443,6 @@ var SkeletonManager = /*#__PURE__*/function () {
var _this = this; var _this = this;
var pageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var pageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var shouldShow = this.shouldShowSkeleton(pagePath, pageType); var shouldShow = this.shouldShowSkeleton(pagePath, pageType);
console.log('1111', shouldShow);
return { return {
// 是否显示骨架屏 // 是否显示骨架屏
showSkeleton: shouldShow, showSkeleton: shouldShow,

View File

@ -146,11 +146,11 @@ var render = function () {
? _vm.roadStatusList && _vm.roadStatusList.length === 1 ? _vm.roadStatusList && _vm.roadStatusList.length === 1
: null : null
var g5 = !_vm.isPageLoading var g5 = !_vm.isPageLoading
? _vm.everyWeekShopData && _vm.everyWeekShopData.length > 0 ? _vm.marketingCampaign && _vm.marketingCampaign.length > 0
: null : null
var l2 = var l2 =
!_vm.isPageLoading && g5 !_vm.isPageLoading && g5
? _vm.__map(_vm.everyWeekShopData, function (item, index) { ? _vm.__map(_vm.marketingCampaign, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g6 = item.IMAGE_PATH var g6 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") && ? item.IMAGE_PATH.split(",") &&
@ -165,48 +165,44 @@ var render = function () {
}) })
: null : null
var g8 = !_vm.isPageLoading var g8 = !_vm.isPageLoading
? _vm.specialOffersList && _vm.specialOffersList.length > 0 ? _vm.everyWeekShopData && _vm.everyWeekShopData.length > 0
: null
var g9 =
!_vm.isPageLoading && g8
? _vm.productsList && _vm.productsList.length > 0
: null : null
var l3 = var l3 =
!_vm.isPageLoading && g8 !_vm.isPageLoading && g8
? _vm.__map(_vm.specialOffersList, function (item, index) { ? _vm.__map(_vm.everyWeekShopData, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g10 = item.IMAGE_PATH var g9 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") && ? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1 item.IMAGE_PATH.split(",").length > 1
: null : null
var g11 = item.IMAGE_PATH && g10 ? item.IMAGE_PATH.split(",") : null var g10 = item.IMAGE_PATH && g9 ? item.IMAGE_PATH.split(",") : null
return { return {
$orig: $orig, $orig: $orig,
g9: g9,
g10: g10, g10: g10,
g11: g11,
} }
}) })
: null : null
var g12 = !_vm.isPageLoading var g11 = !_vm.isPageLoading
? _vm.productsList && _vm.productsList.length > 0
: null
var g13 =
!_vm.isPageLoading && g12
? _vm.specialOffersList && _vm.specialOffersList.length > 0 ? _vm.specialOffersList && _vm.specialOffersList.length > 0
: null : null
var g12 =
!_vm.isPageLoading && g11
? _vm.productsList && _vm.productsList.length > 0
: null
var l4 = var l4 =
!_vm.isPageLoading && g12 !_vm.isPageLoading && g11
? _vm.__map(_vm.productsList, function (item, index) { ? _vm.__map(_vm.specialOffersList, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g14 = item.IMAGE_PATH var g13 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") && ? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1 item.IMAGE_PATH.split(",").length > 1
: null : null
var g15 = item.IMAGE_PATH && g14 ? item.IMAGE_PATH.split(",") : null var g14 = item.IMAGE_PATH && g13 ? item.IMAGE_PATH.split(",") : null
return { return {
$orig: $orig, $orig: $orig,
g13: g13,
g14: g14, g14: g14,
g15: g15,
} }
}) })
: null : null
@ -233,10 +229,9 @@ var render = function () {
g5: g5, g5: g5,
l2: l2, l2: l2,
g8: g8, g8: g8,
g9: g9,
l3: l3, l3: l3,
g11: g11,
g12: g12, g12: g12,
g13: g13,
l4: l4, l4: l4,
}, },
} }
@ -428,12 +423,12 @@ var _default = {
// "https://ahyd.eshangtech.com/UploadImageDir/minprogram/正大泰国榴莲.jpg", // "https://ahyd.eshangtech.com/UploadImageDir/minprogram/正大泰国榴莲.jpg",
// "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg", // "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg",
// "https://eshangtech.com/minTestImg/banner_0626_0702.png", // "https://eshangtech.com/minTestImg/banner_0626_0702.png",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/小沙坝服务区_1.jpg"], "https://eshangtech.com/caiyunyiImg/indexTopBg2.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/小沙坝服务区_1.jpg"],
previewImageList: [ previewImageList: [
// "https://ahyd.eshangtech.com/UploadImageDir/minprogram/正大泰国榴莲.jpg", // "https://ahyd.eshangtech.com/UploadImageDir/minprogram/正大泰国榴莲.jpg",
// "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg", // "http://saas.eshangtech.com/minTestImg/DragonBoatFestival.jpg",
// "https://eshangtech.com/minTestImg/banner_0626_0702.png", // "https://eshangtech.com/minTestImg/banner_0626_0702.png",
"https://ahyd.eshangtech.com/UploadImageDir/minprogram/正太泰国榴莲.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/小沙坝服务区.jpg"], "https://eshangtech.com/caiyunyiImg/indexTopBg2.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/正太泰国榴莲.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/招商信息_1.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/龙江大桥.jpg", "https://ahyd.eshangtech.com/UploadImageDir/minprogram/小沙坝服务区.jpg"],
// 预览图数组 // 预览图数组
roadStatusList: [], roadStatusList: [],
// 路况播报 // 路况播报
@ -469,7 +464,10 @@ var _default = {
// 景区信息 // 景区信息
SCENICAREAOBJ: {}, SCENICAREAOBJ: {},
// 景区类型的枚举 // 景区类型的枚举
everyWeekShopData: [] // 每周特惠数据 everyWeekShopData: [],
// 每周特惠数据
firstObj1: {},
marketingCampaign: [] // 营销活动数据
}; };
}, },
onLoad: function onLoad(options) { onLoad: function onLoad(options) {
@ -956,11 +954,12 @@ var _default = {
_context4.next = 27; _context4.next = 27;
break; break;
case 35: case 35:
console.log('firstObj1', firstObj1); _this8.firstObj1 = firstObj1;
console.log('firstObj2', firstObj2);
if (firstObj1.USERDEFINEDTYPE_ICO) { if (firstObj1.USERDEFINEDTYPE_ICO) {
_this8.swiperList.unshift(firstObj1.USERDEFINEDTYPE_ICO); // this.swiperList.unshift(firstObj1.USERDEFINEDTYPE_ICO)
_this8.swiperList.splice(1, 0, firstObj1.USERDEFINEDTYPE_ICO);
} }
console.log('firstObj2firstObj2firstObj2', firstObj2);
_this8.poster = firstObj2; _this8.poster = firstObj2;
// this.swiperList.unshift(res1[0].USERDEFINEDTYPE_ICO) // this.swiperList.unshift(res1[0].USERDEFINEDTYPE_ICO)
@ -1248,9 +1247,15 @@ var _default = {
handleHidePopup: function handleHidePopup() { handleHidePopup: function handleHidePopup() {
uni.setStorageSync("showIndexPoster", 1); uni.setStorageSync("showIndexPoster", 1);
this.$refs.noticeRef.close(); this.$refs.noticeRef.close();
if (this.poster.BUSINESSTYPE === 2000) {
uni.navigateTo({
url: "/pages/shopMallPage/shopType/index?selectIndex=3&pageType="
});
} else {
uni.navigateTo({ uni.navigateTo({
url: "/pages/shopMallPage/shopType/index" url: "/pages/shopMallPage/shopType/index"
}); });
}
}, },
// 回到顶部 // 回到顶部
handleGoBack: function handleGoBack() { handleGoBack: function handleGoBack() {
@ -1568,7 +1573,12 @@ var _default = {
this.handleGoShop(); this.handleGoShop();
} }
} else if (obj.value === 17) { } else if (obj.value === 17) {
if (this.firstObj1.USERDEFINEDTYPE_ICO) {
if (obj.index === 0) { if (obj.index === 0) {
uni.navigateTo({
url: "/pages/shopMallPage/shopType/index?selectIndex=3"
});
} else if (obj.index === 1) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/shopMallPage/shopType/index?comeForm=index" url: "/pages/shopMallPage/shopType/index?comeForm=index"
}); });
@ -1577,6 +1587,17 @@ var _default = {
url: "/pages/highwayHeadlines/attractInvestment" url: "/pages/highwayHeadlines/attractInvestment"
}); });
} }
} else {
if (obj.index === 0) {
uni.navigateTo({
url: "/pages/shopMallPage/shopType/index?selectIndex=3"
});
} else {
uni.navigateTo({
url: "/pages/highwayHeadlines/attractInvestment"
});
}
}
} else if (obj.value === 18) { } else if (obj.value === 18) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/eventRegistration/index" url: "/pages/eventRegistration/index"
@ -2203,13 +2224,19 @@ var _default = {
uni.setStorageSync("getWeChatGetMallGoodsInfo", data.Data.List); uni.setStorageSync("getWeChatGetMallGoodsInfo", data.Data.List);
var list = data.Data.List; var list = data.Data.List;
var res = []; var res = [];
// 给营销活动准备的
var res2 = [];
var idSet = new Set(); var idSet = new Set();
if (list && list.length > 0) { if (list && list.length > 0) {
list.forEach(function (item) { list.forEach(function (item) {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) { if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) { item.COMMODITYLIST.forEach(function (subItem) {
if (!idSet.has(subItem.COMMODITY_ID)) { if (!idSet.has(subItem.COMMODITY_ID)) {
if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem);
} else {
res.push(subItem); res.push(subItem);
}
idSet.add(subItem.COMMODITY_ID); idSet.add(subItem.COMMODITY_ID);
} }
}); });
@ -2218,6 +2245,43 @@ var _default = {
} }
console.log('everyWeekShopDataeveryWeekShopDataeveryWeekShopData', res); console.log('everyWeekShopDataeveryWeekShopDataeveryWeekShopData', res);
_this24.everyWeekShopData = res; _this24.everyWeekShopData = res;
// this.marketingCampaign = res2
});
// 拿模块活动的商品
this.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1
}).then(function (data) {
console.log('拿到模块活动的内容', data);
uni.setStorageSync("moduleActivity", data.Data.List);
var list = data.Data.List;
var res = [];
// 给营销活动准备的
var res2 = [];
var idSet = new Set();
if (list && list.length > 0) {
list.forEach(function (item) {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) {
if (!idSet.has(subItem.COMMODITY_ID)) {
// if (subItem.COMMODITY_NATURE === 7000) {
res2.push(subItem);
/// } else {
// res.push(subItem)
// }
idSet.add(subItem.COMMODITY_ID);
}
});
}
});
}
console.log('moduleActivitymoduleActivitymoduleActivitymoduleActivity', res2);
// this.everyWeekShopData = res
_this24.marketingCampaign = res2;
}); });
// 拿到特价优惠的内容 // 拿到特价优惠的内容

File diff suppressed because one or more lines are too long

View File

@ -784,6 +784,12 @@
border-radius: 16rpx; border-radius: 16rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.main .content .shoppingMall .mallContent .advertisement2 .advertisementItem .topLeft.data-v-57280228 {
background: linear-gradient(180deg, #ffe5ca 0%, #ffffff 100%);
}
.main .content .shoppingMall .mallContent .advertisement2 .advertisementItem .topLeft .topTitle .light.data-v-57280228 {
color: #fe972c;
}
.main .content .shoppingMall .mallList.data-v-57280228 { .main .content .shoppingMall .mallList.data-v-57280228 {
width: 100%; width: 100%;
margin-top: 16rpx; margin-top: 16rpx;

View File

@ -238,7 +238,7 @@ var _default = {
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapGetters)(["user"])), {}, { computed: _objectSpread(_objectSpread({}, (0, _vuex.mapGetters)(["user"])), {}, {
tatalMoney: function tatalMoney() { tatalMoney: function tatalMoney() {
var total = this.orderAmount; var total = this.orderAmount;
total = Math.round((total - this.orderInfo.COUPON_AMOUNT || 0) * 100) / 100; total = this.orderInfo.COUPON_ID ? Math.round((total - this.orderInfo.COUPON_AMOUNT || 0) * 100) / 100 : total;
return total; return total;
} }
}), }),
@ -447,7 +447,7 @@ var _default = {
goPayment: function goPayment(obj, payMoney) { goPayment: function goPayment(obj, payMoney) {
var _this3 = this; var _this3 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
var _this, mchid, timeStamp, nonceStr, serial_no, out_trade_no, req, reqSign, data, Authorization, AuthorizationStr; var _this, mchid, timeStamp, nonceStr, serial_no, out_trade_no, amount, cents, req, reqSign, data, Authorization, AuthorizationStr;
return _regenerator.default.wrap(function _callee5$(_context5) { return _regenerator.default.wrap(function _callee5$(_context5) {
while (1) { while (1) {
switch (_context5.prev = _context5.next) { switch (_context5.prev = _context5.next) {
@ -472,6 +472,10 @@ var _default = {
out_trade_no = obj.SALEBILL_CODE; out_trade_no = obj.SALEBILL_CODE;
console.log("obj", obj); console.log("obj", obj);
console.log("payMoney", payMoney ? payMoney * 100 : Number(_this.tatalMoney) * 100 || 1); console.log("payMoney", payMoney ? payMoney * 100 : Number(_this.tatalMoney) * 100 || 1);
// 处理小数点失衡问题
amount = payMoney ? payMoney : _this3.tatalMoney;
cents = Math.round((Number(amount) + Number.EPSILON) * 100);
console.log('centscentscentscents', cents);
req = { req = {
appid: "wxee018fb96955552a", appid: "wxee018fb96955552a",
// 公众账号ID // 公众账号ID
@ -484,7 +488,7 @@ var _default = {
notify_url: "https://eshangtech.com:18998/Coop.Merchant/Handler/Handler_Trade.ashx", notify_url: "https://eshangtech.com:18998/Coop.Merchant/Handler/Handler_Trade.ashx",
// 商户回调地址 // 商户回调地址
amount: { amount: {
total: payMoney ? payMoney * 100 : Number(_this.tatalMoney) * 100 || 1, total: cents || 1,
currency: "CNY" currency: "CNY"
}, },
// 订单金额 // 订单金额
@ -498,9 +502,9 @@ var _default = {
parameters: "POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n" parameters: "POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n"
}; };
console.log("POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n"); console.log("POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n");
_context5.next = 15; _context5.next = 18;
return _this3.$api.$get("/WeChat/GenerateSign", reqSign); return _this3.$api.$get("/WeChat/GenerateSign", reqSign);
case 15: case 18:
data = _context5.sent; data = _context5.sent;
console.log("data3213123", data.Result_Data); console.log("data3213123", data.Result_Data);
Authorization = "mchid=\"".concat(mchid, "\",nonce_str=\"").concat(nonceStr, "\",signature=\"").concat(data.Result_Data, "\",timestamp=\"").concat(timeStamp, "\",serial_no=\"").concat(serial_no, "\""); Authorization = "mchid=\"".concat(mchid, "\",nonce_str=\"").concat(nonceStr, "\",signature=\"").concat(data.Result_Data, "\",timestamp=\"").concat(timeStamp, "\",serial_no=\"").concat(serial_no, "\"");
@ -524,7 +528,7 @@ var _default = {
while (1) { while (1) {
switch (_context4.prev = _context4.next) { switch (_context4.prev = _context4.next) {
case 0: case 0:
console.log(res.data.prepay_id); console.log('32131', res);
_this.text = "request success"; _this.text = "request success";
paySign = ""; paySign = "";
reqSign = { reqSign = {
@ -597,7 +601,7 @@ var _default = {
return success; return success;
}() }()
}); });
case 21: case 24:
case "end": case "end":
return _context5.stop(); return _context5.stop();
} }

View File

@ -175,13 +175,13 @@ var render = function () {
_vm.showContent && _vm.showContent &&
_vm.pageType !== "UnionMall" && _vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall" _vm.pageType !== "UnionMall"
? _vm.weeklySpecialOffer.slice(0, 10).length ? _vm.marketingCampaign.slice(0, 5).length
: null : null
var l2 = var l2 =
_vm.showContent && _vm.showContent &&
_vm.pageType !== "UnionMall" && _vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall" _vm.pageType !== "UnionMall"
? _vm.__map(_vm.weeklySpecialOffer.slice(0, 10), function (item, index) { ? _vm.__map(_vm.marketingCampaign.slice(0, 5), function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g11 = item.IMAGE_PATH var g11 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") && ? item.IMAGE_PATH.split(",") &&
@ -196,12 +196,16 @@ var render = function () {
}) })
: null : null
var g13 = var g13 =
_vm.showContent && _vm.pageType !== "UnionMall" _vm.showContent &&
? _vm.specialOffersList.slice(0, 10).length _vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall"
? _vm.weeklySpecialOffer.slice(0, 10).length
: null : null
var l3 = var l3 =
_vm.showContent && _vm.pageType !== "UnionMall" _vm.showContent &&
? _vm.__map(_vm.specialOffersList.slice(0, 10), function (item, index) { _vm.pageType !== "UnionMall" &&
_vm.pageType !== "UnionMall"
? _vm.__map(_vm.weeklySpecialOffer.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g14 = item.IMAGE_PATH var g14 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") && ? item.IMAGE_PATH.split(",") &&
@ -216,92 +220,112 @@ var render = function () {
}) })
: null : null
var g16 = var g16 =
_vm.showContent && _vm.pageType === "UnionMall" _vm.showContent && _vm.pageType !== "UnionMall"
? _vm.newShopList && _vm.newShopList.length > 0 ? _vm.specialOffersList.slice(0, 10).length
: null
var g17 =
_vm.showContent && _vm.pageType === "UnionMall" && g16
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g18 =
_vm.showContent && _vm.pageType === "UnionMall" && g16 && !g17
? _vm.goodShopList && _vm.goodShopList.length > 0
: null : null
var l4 = var l4 =
_vm.showContent && _vm.pageType === "UnionMall" && g16 _vm.showContent && _vm.pageType !== "UnionMall"
? _vm.__map(_vm.newShopList, function (item, index) { ? _vm.__map(_vm.specialOffersList.slice(0, 10), function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g19 = _vm.goodShopList.length var g17 = item.IMAGE_PATH
? item.IMAGE_PATH.split(",") &&
item.IMAGE_PATH.split(",").length > 1
: null
var g18 = item.IMAGE_PATH && g17 ? item.IMAGE_PATH.split(",") : null
return { return {
$orig: $orig, $orig: $orig,
g19: g19, g17: g17,
g18: g18,
} }
}) })
: null : null
var g20 = var g19 =
_vm.showContent && _vm.pageType === "UnionMall" _vm.showContent && _vm.pageType === "UnionMall"
? _vm.newShopList && _vm.newShopList.length > 0
: null
var g20 =
_vm.showContent && _vm.pageType === "UnionMall" && g19
? _vm.hotShopList && _vm.hotShopList.length > 0 ? _vm.hotShopList && _vm.hotShopList.length > 0
: null : null
var g21 = var g21 =
_vm.showContent && _vm.pageType === "UnionMall" && g20 _vm.showContent && _vm.pageType === "UnionMall" && g19 && !g20
? _vm.goodShopList && _vm.goodShopList.length > 0 ? _vm.goodShopList && _vm.goodShopList.length > 0
: null : null
var g22 =
_vm.showContent && _vm.pageType === "UnionMall" && g20 && !g21
? _vm.newShopList && _vm.newShopList.length > 0
: null
var l5 = var l5 =
_vm.showContent && _vm.pageType === "UnionMall" && g20 _vm.showContent && _vm.pageType === "UnionMall" && g19
? _vm.__map(_vm.hotShopList, function (item, index) { ? _vm.__map(_vm.newShopList, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g23 = _vm.goodShopList.length var g22 = _vm.goodShopList.length
return { return {
$orig: $orig, $orig: $orig,
g23: g23, g22: g22,
} }
}) })
: null : null
var g24 = var g23 =
_vm.showContent && _vm.pageType === "UnionMall" _vm.showContent && _vm.pageType === "UnionMall"
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g24 =
_vm.showContent && _vm.pageType === "UnionMall" && g23
? _vm.goodShopList && _vm.goodShopList.length > 0 ? _vm.goodShopList && _vm.goodShopList.length > 0
: null : null
var g25 = var g25 =
_vm.showContent && _vm.pageType === "UnionMall" && g24 _vm.showContent && _vm.pageType === "UnionMall" && g23 && !g24
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g26 =
_vm.showContent && _vm.pageType === "UnionMall" && g24 && !g25
? _vm.newShopList && _vm.newShopList.length > 0 ? _vm.newShopList && _vm.newShopList.length > 0
: null : null
var l6 = var l6 =
_vm.showContent && _vm.pageType === "UnionMall" && g24 _vm.showContent && _vm.pageType === "UnionMall" && g23
? _vm.__map(_vm.goodShopList, function (item, index) { ? _vm.__map(_vm.hotShopList, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g27 = _vm.goodShopList.length var g26 = _vm.goodShopList.length
return { return {
$orig: $orig, $orig: $orig,
g27: g27, g26: g26,
} }
}) })
: null : null
var g27 =
_vm.showContent && _vm.pageType === "UnionMall"
? _vm.goodShopList && _vm.goodShopList.length > 0
: null
var g28 = var g28 =
_vm.showContent && _vm.pageType === "UnionMall" && g27
? _vm.hotShopList && _vm.hotShopList.length > 0
: null
var g29 =
_vm.showContent && _vm.pageType === "UnionMall" && g27 && !g28
? _vm.newShopList && _vm.newShopList.length > 0
: null
var l7 =
_vm.showContent && _vm.pageType === "UnionMall" && g27
? _vm.__map(_vm.goodShopList, function (item, index) {
var $orig = _vm.__get_orig(item)
var g30 = _vm.goodShopList.length
return {
$orig: $orig,
g30: g30,
}
})
: null
var g31 =
_vm.showContent && _vm.pageType !== "UnionMall" _vm.showContent && _vm.pageType !== "UnionMall"
? _vm.todayOffersList.slice(0, 10).length ? _vm.todayOffersList.slice(0, 10).length
: null : null
var l7 = var l8 =
_vm.showContent && _vm.pageType !== "UnionMall" _vm.showContent && _vm.pageType !== "UnionMall"
? _vm.todayOffersList.slice(0, 10) ? _vm.todayOffersList.slice(0, 10)
: null : null
var g29 = _vm.showContent var g32 = _vm.showContent
? _vm.pageType !== "UnionMall" && ? _vm.pageType !== "UnionMall" &&
_vm.productsList && _vm.productsList &&
_vm.productsList.length > 0 _vm.productsList.length > 0
: null : null
var g30 = var g33 =
_vm.showContent && g29 && _vm.pageType !== "UnionMall" _vm.showContent && g32 && _vm.pageType !== "UnionMall"
? _vm.productsList.length ? _vm.productsList.length
: null : null
var g31 = var g34 =
_vm.showContent && _vm.pageType === "UnionMall" _vm.showContent && _vm.pageType === "UnionMall"
? _vm.showShopList && _vm.showShopList.length > 0 ? _vm.showShopList && _vm.showShopList.length > 0
: null : null
@ -330,6 +354,14 @@ var render = function () {
$event.stopPropagation() $event.stopPropagation()
return _vm.handleGoShopDetail(item) return _vm.handleGoShopDetail(item)
} }
_vm.e3 = function ($event, item) {
var _temp7 = arguments[arguments.length - 1].currentTarget.dataset,
_temp8 = _temp7.eventParams || _temp7["event-params"],
item = _temp8.item
var _temp7, _temp8
$event.stopPropagation()
return _vm.handleGoShopDetail(item)
}
} }
_vm.$mp.data = Object.assign( _vm.$mp.data = Object.assign(
{}, {},
@ -350,22 +382,24 @@ var render = function () {
g13: g13, g13: g13,
l3: l3, l3: l3,
g16: g16, g16: g16,
g17: g17,
g18: g18,
l4: l4, l4: l4,
g19: g19,
g20: g20, g20: g20,
g21: g21, g21: g21,
g22: g22,
l5: l5, l5: l5,
g23: g23,
g24: g24, g24: g24,
g25: g25, g25: g25,
g26: g26,
l6: l6, l6: l6,
g27: g27,
g28: g28, g28: g28,
l7: l7,
g29: g29, g29: g29,
g30: g30, l7: l7,
g31: g31, g31: g31,
l8: l8,
g32: g32,
g33: g33,
g34: g34,
}, },
} }
) )
@ -438,6 +472,8 @@ var _default = {
// 特价优惠 // 特价优惠
weeklySpecialOffer: [], weeklySpecialOffer: [],
// 每周特惠 // 每周特惠
marketingCampaign: [],
// 营销活动
todayOffersList: [], todayOffersList: [],
// 今日推荐 // 今日推荐
shopTypeList: [], shopTypeList: [],
@ -549,7 +585,8 @@ var _default = {
}, { }, {
label: "", label: "",
src: "" src: ""
}] }],
showModalActivityImg: false
}; };
}, },
computed: _objectSpread({}, (0, _vuex.mapGetters)({ computed: _objectSpread({}, (0, _vuex.mapGetters)({
@ -616,11 +653,12 @@ var _default = {
} }
_this2.sortType = Math.floor(Math.random() * _this2.sortTypeList.length); _this2.sortType = Math.floor(Math.random() * _this2.sortTypeList.length);
_this2.shopTypeList = resList; _this2.shopTypeList = resList;
// 拿到榜单的方法 // 拿到榜单的方法
_this2.handleGetSortList(); _this2.handleGetSortList();
// 拿到工会之家的商品列表 // 拿到工会之家的商品列表
_this2.handleGetUnionShopList(); _this2.handleGetUnionShopList();
_context2.next = 32; _context2.next = 33;
break; break;
case 25: case 25:
// uni.showLoading({ // uni.showLoading({
@ -628,10 +666,12 @@ var _default = {
// }) // })
// 拿到每周优惠的内容 // 拿到每周优惠的内容
_this2.handleGetEveryWeekShop(); _this2.handleGetEveryWeekShop();
// 拿到模块商品的数据
_this2.handleGetModalProducetShop();
// 拿到顶部商品大类的方法 // 拿到顶部商品大类的方法
_context2.next = 28; _context2.next = 29;
return _this2.handleGetShopBigType(); return _this2.handleGetShopBigType();
case 28: case 29:
// 拿到特价优惠的 // 拿到特价优惠的
_this2.handleGetSpecialOffers(); _this2.handleGetSpecialOffers();
// 拿到今日推荐的商品列表 // 拿到今日推荐的商品列表
@ -642,7 +682,7 @@ var _default = {
_this2.handleGetActivityList(); _this2.handleGetActivityList();
} }
// uni.hideLoading() // uni.hideLoading()
case 32: case 33:
if (_this2.skeletonControl && _this2.skeletonControl.showSkeleton) { if (_this2.skeletonControl && _this2.skeletonControl.showSkeleton) {
setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
return _regenerator.default.wrap(function _callee$(_context) { return _regenerator.default.wrap(function _callee$(_context) {
@ -670,7 +710,7 @@ var _default = {
_this2.showContent = true; _this2.showContent = true;
_this2.isFirstLoad = false; _this2.isFirstLoad = false;
} }
case 33: case 34:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -732,6 +772,10 @@ var _default = {
this.isFirstLoad = true; this.isFirstLoad = true;
}, },
methods: { methods: {
handleShowModalActivityImg: function handleShowModalActivityImg(e) {
console.log('eee', e);
this.showModalActivityImg = true;
},
handleHideExportFun: function handleHideExportFun() { handleHideExportFun: function handleHideExportFun() {
this.showExportFun = false; this.showExportFun = false;
}, },
@ -1205,7 +1249,7 @@ var _default = {
var resList = []; var resList = [];
// 如果有活动的话就有值 // 如果有活动的话就有值
var activityObj = {}; var activityObj = {};
var indexOfList = [3186, 3175, 4597]; var indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
typeList.forEach(function (item) { typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) { if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -1424,6 +1468,59 @@ var _default = {
}, _callee10); }, _callee10);
}))(); }))();
}, },
// 拿到模块商品的商品列表
handleGetModalProducetShop: function handleGetModalProducetShop() {
var _this13 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
var _this, list, moduleActivity, data;
return _regenerator.default.wrap(function _callee11$(_context11) {
while (1) {
switch (_context11.prev = _context11.next) {
case 0:
_this = _this13;
list = [];
moduleActivity = uni.getStorageSync("moduleActivity");
if (!moduleActivity) {
_context11.next = 8;
break;
}
list = moduleActivity;
_this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1
}).then(function (data) {
var newList = data.Data && data.Data.List ? data.Data.List : [];
if (JSON.stringify(newList) !== JSON.stringify(list)) {
uni.setStorageSync("moduleActivity", newList);
_this.handleGetModalProducetShopShowData(newList);
}
});
_context11.next = 13;
break;
case 8:
_context11.next = 10;
return _this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
ownerUnitId: 911,
userdefinedtypeId: 4797,
userdefinedTypeId: 4797,
justCommodity: 1
});
case 10:
data = _context11.sent;
list = data.Data && data.Data.List ? data.Data.List : [];
uni.setStorageSync("moduleActivity", list);
case 13:
_this13.handleGetModalProducetShopShowData(list);
case 14:
case "end":
return _context11.stop();
}
}
}, _callee11);
}))();
},
// 每周商品特惠显示数据的方法 // 每周商品特惠显示数据的方法
handleGetEveryWeekShopShowData: function handleGetEveryWeekShopShowData(list) { handleGetEveryWeekShopShowData: function handleGetEveryWeekShopShowData(list) {
var shopList = []; var shopList = [];
@ -1451,24 +1548,50 @@ var _default = {
console.log('weeklySpecialOfferweeklySpecialOfferweeklySpecialOfferweeklySpecialOffer', shopList); console.log('weeklySpecialOfferweeklySpecialOfferweeklySpecialOfferweeklySpecialOffer', shopList);
this.weeklySpecialOffer = shopList; this.weeklySpecialOffer = shopList;
}, },
// 模块商品显示数据的方法
handleGetModalProducetShopShowData: function handleGetModalProducetShopShowData(list) {
var shopList = [];
if (list && list.length > 0) {
list.forEach(function (item) {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach(function (subItem) {
if (subItem.COMMODITY_MEMBERPRICE && subItem.COMMODITY_MEMBERPRICE.toString().indexOf(".") !== -1) {
subItem.bigNumber = subItem.COMMODITY_MEMBERPRICE.toString().split(".")[0];
subItem.smallNumber = subItem.COMMODITY_MEMBERPRICE.toString().split(".")[1];
} else {
subItem.bigNumber = subItem.COMMODITY_MEMBERPRICE;
}
if (subItem.COMMODITY_RETAILPRICE && subItem.COMMODITY_RETAILPRICE.toString().indexOf(".") !== -1) {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE.toString().split(".")[0];
subItem.RETsmallNumber = subItem.COMMODITY_RETAILPRICE.toString().split(".")[1];
} else {
subItem.RETbigNumber = subItem.COMMODITY_RETAILPRICE;
}
shopList.push(subItem);
});
}
});
}
this.marketingCampaign = shopList;
},
// 拿到今日推荐的商品列表 nature 5050 // 拿到今日推荐的商品列表 nature 5050
handleGetTodayOffers: function handleGetTodayOffers() { handleGetTodayOffers: function handleGetTodayOffers() {
var _this13 = this; var _this14 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
var _this, getWeChatGetMallGoodsInfoExcludeToday, list, data; var _this, getWeChatGetMallGoodsInfoExcludeToday, list, data;
return _regenerator.default.wrap(function _callee11$(_context11) { return _regenerator.default.wrap(function _callee12$(_context12) {
while (1) { while (1) {
switch (_context11.prev = _context11.next) { switch (_context12.prev = _context12.next) {
case 0: case 0:
_this = _this13; _this = _this14;
getWeChatGetMallGoodsInfoExcludeToday = uni.getStorageSync("getWeChatGetMallGoodsInfoExcludeToday"); getWeChatGetMallGoodsInfoExcludeToday = uni.getStorageSync("getWeChatGetMallGoodsInfoExcludeToday");
list = []; list = [];
if (!getWeChatGetMallGoodsInfoExcludeToday) { if (!getWeChatGetMallGoodsInfoExcludeToday) {
_context11.next = 8; _context12.next = 8;
break; break;
} }
list = getWeChatGetMallGoodsInfoExcludeToday; list = getWeChatGetMallGoodsInfoExcludeToday;
_this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', { _this14.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', {
ownerUnitId: 911, ownerUnitId: 911,
// COMMODITYNATURE: 4598,// 原今日推荐 // COMMODITYNATURE: 4598,// 原今日推荐
COMMODITYNATURE: 5022, COMMODITYNATURE: 5022,
@ -1486,11 +1609,11 @@ var _default = {
_this.handleGetTodayOffersShowData(newList); _this.handleGetTodayOffersShowData(newList);
} }
}); });
_context11.next = 12; _context12.next = 12;
break; break;
case 8: case 8:
_context11.next = 10; _context12.next = 10;
return _this13.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', { return _this14.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfoExclude', {
ownerUnitId: 911, ownerUnitId: 911,
// COMMODITYNATURE: 4598,// 原今日推荐 // COMMODITYNATURE: 4598,// 原今日推荐
COMMODITYNATURE: 5022, COMMODITYNATURE: 5022,
@ -1503,16 +1626,16 @@ var _default = {
justCommodity: 1 justCommodity: 1
}); });
case 10: case 10:
data = _context11.sent; data = _context12.sent;
list = data.Data.List; list = data.Data.List;
case 12: case 12:
_this13.handleGetTodayOffersShowData(list); _this14.handleGetTodayOffersShowData(list);
case 13: case 13:
case "end": case "end":
return _context11.stop(); return _context12.stop();
} }
} }
}, _callee11); }, _callee12);
}))(); }))();
}, },
// 拿到今日推荐的商品列表显示数据的方法 // 拿到今日推荐的商品列表显示数据的方法
@ -1567,31 +1690,31 @@ var _default = {
}, },
// 拿到甄选商品 3000 // 拿到甄选商品 3000
handleGetProductsList: function handleGetProductsList() { handleGetProductsList: function handleGetProductsList() {
var _this14 = this; var _this15 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
var data, list, resList, thisResList; var data, list, resList, thisResList;
return _regenerator.default.wrap(function _callee12$(_context12) { return _regenerator.default.wrap(function _callee13$(_context13) {
while (1) { while (1) {
switch (_context12.prev = _context12.next) { switch (_context13.prev = _context13.next) {
case 0: case 0:
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}); });
_context12.next = 3; _context13.next = 3;
return _this14.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', { return _this15.$api.$javaGet('/third-party/getWeChatGetMallGoodsInfo', {
ownerUnitId: 911, ownerUnitId: 911,
justCommodity: 1, justCommodity: 1,
payMethod: "2000,3000", payMethod: "2000,3000",
COMMODITYNATURE: 6000 COMMODITYNATURE: 6000
}); });
case 3: case 3:
data = _context12.sent; data = _context13.sent;
list = data.Data.List; list = data.Data.List;
console.log('积分商城', list); console.log('积分商城', list);
resList = []; resList = [];
thisResList = []; thisResList = [];
if (_this14.shopMsg.pageIndex > 1) { if (_this15.shopMsg.pageIndex > 1) {
resList = _this14.productsList; resList = _this15.productsList;
} }
if (list && list.length > 0) { if (list && list.length > 0) {
// this.selectProducts = list[0].UserdefinedType_Id; // this.selectProducts = list[0].UserdefinedType_Id;
@ -1616,11 +1739,11 @@ var _default = {
}); });
} }
if (thisResList && thisResList.length < 6) { if (thisResList && thisResList.length < 6) {
_this14.shopMsg.isOver = true; _this15.shopMsg.isOver = true;
} }
// this.productsList = list; // this.productsList = list;
_this14.productsList = resList.concat(thisResList); _this15.productsList = resList.concat(thisResList);
console.log("甄选商品", _this14.productsList); console.log("甄选商品", _this15.productsList);
uni.hideLoading(); uni.hideLoading();
// let shopList = [] // let shopList = []
@ -1635,10 +1758,10 @@ var _default = {
// } // }
case 14: case 14:
case "end": case "end":
return _context12.stop(); return _context13.stop();
} }
} }
}, _callee12); }, _callee13);
}))(); }))();
}, },
// 返回首页 // 返回首页

File diff suppressed because one or more lines are too long

View File

@ -348,6 +348,9 @@
margin: 24rpx 0 0 24rpx; margin: 24rpx 0 0 24rpx;
border-radius: 16rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
background-image: url("https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/Special Offers.png");
background-repeat: no-repeat;
background-size: 100% 100%;
} }
.main .header .typeBox .contentBox.data-v-79c11018 { .main .header .typeBox .contentBox.data-v-79c11018 {
width: 100%; width: 100%;
@ -355,17 +358,12 @@
box-sizing: border-box; box-sizing: border-box;
min-height: 214rpx; min-height: 214rpx;
padding: 30rpx; padding: 30rpx;
background-image: url("https://eshangtech.com/ShopICO/ahyd-mall/wechatesAH/Special Offers.png"); white-space: nowrap;
background-repeat: no-repeat;
background-size: 100% 100%;
flex-wrap: wrap;
display: flex;
align-items: center;
} }
.main .header .typeBox .contentBox .rowBox.data-v-79c11018 { .main .header .typeBox .contentBox .rowBox.data-v-79c11018 {
width: 20%; width: 20%;
height: 144rpx; height: 144rpx;
display: flex; display: inline-flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
@ -407,7 +405,6 @@
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 24rpx 160rpx; padding: 0 24rpx 160rpx;
margin-top: 24rpx;
} }
.main .pageContent .noticeBox.data-v-79c11018 { .main .pageContent .noticeBox.data-v-79c11018 {
width: 100%; width: 100%;

View File

@ -242,6 +242,10 @@ var _default = {
// 是否选中全选 // 是否选中全选
totalPay: 0, totalPay: 0,
// 根据选中的商品需要支付的钱 // 根据选中的商品需要支付的钱
totalDiscount: 0,
// 打折之后要付的钱
discountAmount: 0,
// 实际减了的钱
inputMaxLength: -1, inputMaxLength: -1,
pageOut: false, pageOut: false,
// 是不是从立即下单离开页面的 // 是不是从立即下单离开页面的
@ -271,7 +275,7 @@ var _default = {
if (newVal && newVal.length > 0) { if (newVal && newVal.length > 0) {
var count = 0; var count = 0;
newVal.forEach(function (item) { newVal.forEach(function (item) {
count += item.count; count += Number(item.count);
}); });
this.shopCarListCount = count; this.shopCarListCount = count;
} else { } else {
@ -296,29 +300,26 @@ var _default = {
_this2.skeletonControl = (0, _skeletonManager.useSkeletonControl)('/pages/shopMallPage/shopCar/index', query.pageType); _this2.skeletonControl = (0, _skeletonManager.useSkeletonControl)('/pages/shopMallPage/shopCar/index', query.pageType);
_this2.showContent = _this2.skeletonControl.showContent; _this2.showContent = _this2.skeletonControl.showContent;
_this2.isFirstLoad = _this2.skeletonControl.showSkeleton; _this2.isFirstLoad = _this2.skeletonControl.showSkeleton;
console.log("query", query);
height = uni.getStorageSync("safeHeight"); height = uni.getStorageSync("safeHeight");
_this2.safeHeight = Number(height); _this2.safeHeight = Number(height);
systemInfo = uni.getSystemInfoSync(); systemInfo = uni.getSystemInfoSync();
_this2.menu = uni.getMenuButtonBoundingClientRect(); _this2.menu = uni.getMenuButtonBoundingClientRect();
_this2.systemInfo = systemInfo; _this2.systemInfo = systemInfo;
console.log("systemInfo", systemInfo);
if (query.pageType) { if (query.pageType) {
_this2.bigPageType = query.pageType; _this2.bigPageType = query.pageType;
} }
// 获取最新的用户余额 // 获取最新的用户余额
if (!(_this2.bigPageType === "UnionMall")) { if (!(_this2.bigPageType === "UnionMall")) {
_context2.next = 14; _context2.next = 12;
break; break;
} }
_context2.next = 14; _context2.next = 12;
return _this2.handleGetUserBalance(); return _this2.handleGetUserBalance();
case 14: case 12:
// 获得用户地址数据 // 获得用户地址数据
_this2.handleGetAddressList(); _this2.handleGetAddressList();
_this2.handleGetNowShopCarList(); _this2.handleGetNowShopCarList();
_this2.handleSum();
// this.$utils.addUserBehaviorNew(); // this.$utils.addUserBehaviorNew();
// 如果是首次访问,延迟显示内容并标记已访问 // 如果是首次访问,延迟显示内容并标记已访问
if (_this2.skeletonControl && _this2.skeletonControl.showSkeleton) { if (_this2.skeletonControl && _this2.skeletonControl.showSkeleton) {
@ -351,7 +352,7 @@ var _default = {
_this2.$utils.addUserBehaviorNew({ _this2.$utils.addUserBehaviorNew({
behaviorRecordDesc: _this2.bigPageType ? '进入工会商城购物车' : "进入精选商城购物车" behaviorRecordDesc: _this2.bigPageType ? '进入工会商城购物车' : "进入精选商城购物车"
}); });
case 19: case 16:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -361,8 +362,6 @@ var _default = {
}, },
onShow: function onShow() { onShow: function onShow() {
// onShow 中不控制骨架屏,骨架屏完全由 onLoad 中控制 // onShow 中不控制骨架屏,骨架屏完全由 onLoad 中控制
console.log('this.bigPageTypethis.bigPageType', this.bigPageType);
// 判断当前的购物车里面是否有东西 // 判断当前的购物车里面是否有东西
var shopCarList = []; var shopCarList = [];
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
@ -370,15 +369,14 @@ var _default = {
} else { } else {
shopCarList = this.$store.state.myShopCar; shopCarList = this.$store.state.myShopCar;
} }
console.log("shopCarList", shopCarList);
this.shopList = shopCarList; this.shopList = shopCarList;
var count = 0; var count = 0;
if (shopCarList && shopCarList.length > 0) { if (shopCarList && shopCarList.length > 0) {
shopCarList.forEach(function (item) { shopCarList.forEach(function (item) {
count += item.count; count += Number(item.count);
}); });
} }
this.shopCarListCount = count; this.shopCarListCount = Number(count);
this.handleSum(); this.handleSum();
this.handleGetAddressList(); this.handleGetAddressList();
}, },
@ -388,7 +386,6 @@ var _default = {
list.forEach(function (item) { list.forEach(function (item) {
item.cartItemAoumt = Number(item.COMMODITY_MEMBERPRICE) * Number(item.count); item.cartItemAoumt = Number(item.COMMODITY_MEMBERPRICE) * Number(item.count);
}); });
console.log('this.pageTypethis.pageTypethis.bigPageType', this.bigPageType);
// list // list
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
@ -414,7 +411,6 @@ var _default = {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index"
}); });
// console.log('e', e);
// this.showExportFun = !this.showExportFun; // this.showExportFun = !this.showExportFun;
// this.showExportObj = e.detail // this.showExportObj = e.detail
}, },
@ -435,7 +431,6 @@ var _default = {
// 切换选中的地址 // 切换选中的地址
handleChangeAddress: function handleChangeAddress(id) { handleChangeAddress: function handleChangeAddress(id) {
var _this3 = this; var _this3 = this;
console.log("this.selectAddressId", this.selectAddressId);
this.addressList.forEach(function (item) { this.addressList.forEach(function (item) {
if (item.MEMBERADDRESS_ID === id) { if (item.MEMBERADDRESS_ID === id) {
_this3.showAddressObj = item; _this3.showAddressObj = item;
@ -481,8 +476,6 @@ var _default = {
} }
}); });
} }
console.log("defaultAddress", defaultAddress);
console.log("address", list);
if (!defaultAddress.MEMBERADDRESS_ID) { if (!defaultAddress.MEMBERADDRESS_ID) {
if (haveMEMBERADDRESSCODEList && haveMEMBERADDRESSCODEList.length > 0) { if (haveMEMBERADDRESSCODEList && haveMEMBERADDRESSCODEList.length > 0) {
defaultAddress = haveMEMBERADDRESSCODEList[0]; defaultAddress = haveMEMBERADDRESSCODEList[0];
@ -497,7 +490,7 @@ var _default = {
} }
_this4.addressList = list; _this4.addressList = list;
_this4.$forceUpdate(); _this4.$forceUpdate();
case 13: case 11:
case "end": case "end":
return _context3.stop(); return _context3.stop();
} }
@ -525,9 +518,8 @@ var _default = {
case 3: case 3:
data = _context4.sent; data = _context4.sent;
_this5.userInfo = data.Data; _this5.userInfo = data.Data;
console.log("this.userInfo", _this5.userInfo);
uni.hideLoading(); uni.hideLoading();
case 7: case 6:
case "end": case "end":
return _context4.stop(); return _context4.stop();
} }
@ -543,13 +535,40 @@ var _default = {
} else { } else {
shopCarList = this.$store.state.myShopCar; shopCarList = this.$store.state.myShopCar;
} }
console.log("shopCarList", shopCarList); console.log('shopCarListshopCarList', JSON.parse(JSON.stringify(shopCarList)));
if (shopCarList && shopCarList.length > 0) { if (shopCarList && shopCarList.length > 0) {
// 判断一下 当前购物车中 活动模块的商品有多少个被选中
// let haveSum = 0
shopCarList.forEach(function (item) { shopCarList.forEach(function (item) {
var goodNum = Number(item.count);
item.rows = item.COMMODITY_NAME && item.COMMODITY_NAME.length / 14 > 1 ? Math.ceil(item.COMMODITY_NAME.length / 14) : 1; item.rows = item.COMMODITY_NAME && item.COMMODITY_NAME.length / 14 > 1 ? Math.ceil(item.COMMODITY_NAME.length / 14) : 1;
// if (item.select === true && item.COMMODITY_NATURE === 7000) {
// haveSum += 1 * goodNum
// }
}); });
// if (haveSum >= 2) {
// // 如果 活动模块 的商品大于等于2个 那么 就是打95折 做好打折标记 和 打折完的钱
// shopCarList.forEach((item) => {
// if (item.COMMODITY_NATURE === 7000) {
// item.showDiscount = true
// item.discountedPrice = this.preciseRound(0.95 * item.COMMODITY_MEMBERPRICE)
// }
// })
// }
} }
this.shopList = shopCarList; this.shopList = shopCarList;
// 商品处理了 之后 再算钱
this.handleSum();
},
preciseRound: function preciseRound(num) {
var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
if (isNaN(num) || num === null) return 0;
var factor = Math.pow(10, decimals);
return Math.round((num + Number.EPSILON) * factor) / factor;
}, },
// 改变当前的编辑状态 // 改变当前的编辑状态
handleChangePageType: function handleChangePageType() { handleChangePageType: function handleChangePageType() {
@ -562,7 +581,6 @@ var _default = {
}, },
// 左滑删除的接触到屏幕 // 左滑删除的接触到屏幕
startTouch: function startTouch(e, index) { startTouch: function startTouch(e, index) {
console.log("e", e);
if (e.touches.length === 1) { if (e.touches.length === 1) {
this.startX = e.touches[0].clientX; this.startX = e.touches[0].clientX;
this.selectIndex = index; this.selectIndex = index;
@ -601,13 +619,60 @@ var _default = {
handleSum: function handleSum() { handleSum: function handleSum() {
var _this6 = this; var _this6 = this;
this.totalPay = 0; this.totalPay = 0;
// 判断一下 当前购物车中 活动模块的商品有多少个被选中
// let haveSum = 0
// 判断一下是不是全部都已经被选择乐
var allSelect = true;
this.shopList.forEach(function (u) { this.shopList.forEach(function (u) {
if (u.select === true) {
var goodNum = Number(u.count); var goodNum = Number(u.count);
_this6.totalPay += Number(u.COMMODITY_MEMBERPRICE) * goodNum; if (u.select === true) {
var _goodNum = Number(u.count);
_this6.totalPay += Number(u.COMMODITY_MEMBERPRICE) * _goodNum;
_this6.totalPay = Number(_this6.totalPay.toFixed(2)); _this6.totalPay = Number(_this6.totalPay.toFixed(2));
// // 添加参数 判断一下
// if (u.COMMODITY_NATURE === 7000) {
// haveSum += 1 * goodNum
// }
} else {
allSelect = false;
} }
}); });
if (allSelect) {
this.isAllSelect = true;
}
// if (haveSum >= 2) {
// // 如果 活动模块 的商品大于等于2个 那么 就是打95折 做好打折标记 和 打折完的钱
// // 注意!!!!!!!!!!!!!!!!!!!
// // 只是 活动模块 的商品 打95折 其他商品不做处理的
// let discountedProducts = 0
// let noDiscountedProducts = 0
// this.shopList.forEach((item) => {
// let goodNum = Number(item.count);
// if (item.COMMODITY_NATURE === 7000 && item.select) {
// item.showDiscount = true
// item.discountedPrice = this.preciseRound(0.95 * item.COMMODITY_MEMBERPRICE)
// discountedProducts += item.COMMODITY_MEMBERPRICE * goodNum
// } else if (item.select) {
// noDiscountedProducts += item.COMMODITY_MEMBERPRICE * goodNum
// }
// })
// this.totalDiscount = (this.preciseRound(0.95 * discountedProducts) + noDiscountedProducts).toFixed(2)
// this.discountAmount = (discountedProducts - this.preciseRound(0.95 * discountedProducts)).toFixed(2)
// } else {
// this.shopList.forEach((item) => {
// if (item.COMMODITY_NATURE === 7000) {
// item.showDiscount = false
// item.discountedPrice = 0
// }
// })
// this.totalDiscount = 0
// this.discountAmount = 0
// }
}, },
// 修改商品前面的单选框选中效果 // 修改商品前面的单选框选中效果
handleChangeSelect: function handleChangeSelect(item) { handleChangeSelect: function handleChangeSelect(item) {
@ -628,7 +693,6 @@ var _default = {
}, },
// 取消选中商品的方法 // 取消选中商品的方法
handleChangeDelete: function handleChangeDelete(item) { handleChangeDelete: function handleChangeDelete(item) {
console.log("item", item);
if (item.selectDelete) { if (item.selectDelete) {
item.selectDelete = false; item.selectDelete = false;
} else { } else {
@ -655,7 +719,6 @@ var _default = {
if (res.confirm) { if (res.confirm) {
item.count -= 1; item.count -= 1;
// 这里重复了先这样 // 这里重复了先这样
console.log('item', JSON.parse(JSON.stringify(item)));
if (item.count === 0) { if (item.count === 0) {
var list = []; var list = [];
_this.shopList.forEach(function (i) { _this.shopList.forEach(function (i) {
@ -702,7 +765,6 @@ var _default = {
this.shopList = list; this.shopList = list;
} }
this.handleSum(); this.handleSum();
console.log(' this.shopList', this.shopList);
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
this.$store.commit("unionMyShopCar", this.shopList); this.$store.commit("unionMyShopCar", this.shopList);
} else { } else {
@ -712,7 +774,6 @@ var _default = {
}, },
// 输入框里面的数量 // 输入框里面的数量
haveFocus: function haveFocus(e, item) { haveFocus: function haveFocus(e, item) {
console.log("e", e);
var value = e.detail.value; var value = e.detail.value;
var number = 0; var number = 0;
if (value.indexOf(".") === -1) { if (value.indexOf(".") === -1) {
@ -721,7 +782,6 @@ var _default = {
var bigNumber = value.split(".")[0]; var bigNumber = value.split(".")[0];
number = Number(bigNumber); number = Number(bigNumber);
} }
console.log("number2", number);
var oldCount = item.count; var oldCount = item.count;
if (number < 0) { if (number < 0) {
item.count = 1; item.count = 1;
@ -741,7 +801,6 @@ var _default = {
} }
}); });
_this.shopList = list; _this.shopList = list;
console.log("this.dataList1111", _this.shopList);
if (_this.bigPageType === "UnionMall") { if (_this.bigPageType === "UnionMall") {
_this.$store.commit("unionMyShopCar", _this.shopList); _this.$store.commit("unionMyShopCar", _this.shopList);
} else { } else {
@ -757,7 +816,6 @@ var _default = {
} else { } else {
item.count = number; item.count = number;
} }
console.log("this.dataList1111", this.shopList);
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
this.$store.commit("unionMyShopCar", this.shopList); this.$store.commit("unionMyShopCar", this.shopList);
} else { } else {
@ -778,8 +836,6 @@ var _default = {
}, },
// 左滑出现的删除 // 左滑出现的删除
handleDeleteItem: function handleDeleteItem(obj) { handleDeleteItem: function handleDeleteItem(obj) {
console.log('obj', obj);
console.log('this.shopList', this.shopList);
var list = []; var list = [];
this.shopList.forEach(function (item) { this.shopList.forEach(function (item) {
if (item.COMMODITY_ID !== obj.COMMODITY_ID) { if (item.COMMODITY_ID !== obj.COMMODITY_ID) {
@ -866,7 +922,6 @@ var _default = {
}); });
} }
console.log("this.shopList", this.shopList);
if (isPresale) { if (isPresale) {
uni.showToast({ uni.showToast({
title: "选中的商品中有未售商品,无法下单!", title: "选中的商品中有未售商品,无法下单!",
@ -910,7 +965,6 @@ var _default = {
} }
} }
}); });
console.log("DATAFORMATTypeList", DATAFORMATTypeList);
if (DATAFORMATTypeList && DATAFORMATTypeList.length > 1) { if (DATAFORMATTypeList && DATAFORMATTypeList.length > 1) {
uni.showToast({ uni.showToast({
title: "订单中含有品诺商城商品,请去除后下单!", title: "订单中含有品诺商城商品,请去除后下单!",
@ -919,7 +973,6 @@ var _default = {
return; return;
} }
} }
console.log("this.shopList", this.shopList);
if (this.shopList.length > 0) { if (this.shopList.length > 0) {
this.pageOut = true; this.pageOut = true;
var orderList = []; var orderList = [];
@ -955,12 +1008,10 @@ var _default = {
}); });
} }
console.log("noSelectList", noSelectList);
console.log("orderList", JSON.parse(JSON.stringify(orderList)));
var id = Number(Math.random().toString().substr(3, 5) + Date.now()).toString(36); var id = Number(Math.random().toString().substr(3, 5) + Date.now()).toString(36);
if (orderList.length > 0) { if (orderList.length > 0) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=".concat(JSON.stringify(orderList), "&pageType=").concat(this.bigPageType, "&addressId=").concat(this.selectAddressId) url: "/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=".concat(encodeURIComponent(JSON.stringify(orderList)), "&pageType=").concat(this.bigPageType, "&addressId=").concat(this.selectAddressId)
}); });
} else { } else {
uni.showToast({ uni.showToast({

File diff suppressed because one or more lines are too long

View File

@ -150,14 +150,46 @@
line-height: 18px; line-height: 18px;
width: 100%; width: 100%;
margin-top: 24rpx; margin-top: 24rpx;
text-align: center; text-align: left;
box-sizing: border-box;
padding-left: 56rpx;
} }
.main .shopList .shopBox .shopItem .shopUp .detail .detailLeft .simPriceBox .sumPriceUnit.data-v-fce33af8 { .main .shopList .shopBox .shopItem .shopUp .detail .detailLeft .simPriceBox .sumPriceUnit.data-v-fce33af8 {
font-size: 12px; font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold; font-weight: bold;
color: #ff6219; color: #ff6219;
line-height: 12px;
}
.main .shopList .shopBox .shopItem .shopUp .detail .detailLeft .haveDiscount.data-v-fce33af8 {
margin-top: 0;
font-size: 14px;
color: #4D4B4C;
font-weight: bold;
}
.main .shopList .shopBox .shopItem .shopUp .detail .detailLeft .haveDiscount .sumPriceUnit.data-v-fce33af8 {
font-size: 12px;
color: #4D4B4C;
font-weight: bold;
}
.main .shopList .shopBox .shopItem .shopUp .detail .detailLeft .discountedPrice.data-v-fce33af8 {
height: 20px;
font-size: 18px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #ff6219;
line-height: 18px; line-height: 18px;
width: 100%;
text-align: left;
box-sizing: border-box;
padding-left: 56rpx;
}
.main .shopList .shopBox .shopItem .shopUp .detail .detailLeft .discountedPrice .sumPriceUnit.data-v-fce33af8 {
font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #ff6219;
line-height: 12px;
} }
.main .shopList .shopBox .shopItem .shopUp .detail .detailRight.data-v-fce33af8 { .main .shopList .shopBox .shopItem .shopUp .detail .detailRight.data-v-fce33af8 {
width: 100%; width: 100%;
@ -327,27 +359,33 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.main .bottom .bottomRight .sum.data-v-fce33af8 { .main .bottom .bottomRight .submitTextBox .sum.data-v-fce33af8 {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #6c737a; color: #6c737a;
line-height: 20px; line-height: 20px;
} }
.main .bottom .bottomRight .sumPrice.data-v-fce33af8 { .main .bottom .bottomRight .submitTextBox .sumPrice.data-v-fce33af8 {
font-size: 12px; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #ff6219; color: #ff6219;
line-height: 20px; line-height: 20px;
} }
.main .bottom .bottomRight .sunNumber.data-v-fce33af8 { .main .bottom .bottomRight .submitTextBox .sunNumber.data-v-fce33af8 {
font-size: 20px; font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #ff6219; color: #ff6219;
line-height: 20px; line-height: 20px;
} }
.main .bottom .bottomRight .discountText.data-v-fce33af8 {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff6219;
}
.main .bottom .bottomRight .submitBtn.data-v-fce33af8 { .main .bottom .bottomRight .submitBtn.data-v-fce33af8 {
width: 210rpx; width: 210rpx;
font-size: 16px; font-size: 16px;

View File

@ -914,7 +914,7 @@ var _default = {
}))(); }))();
}), (0, _defineProperty2.default)(_methods, "handleGetShopTypeShowData", function handleGetShopTypeShowData(typeList) { }), (0, _defineProperty2.default)(_methods, "handleGetShopTypeShowData", function handleGetShopTypeShowData(typeList) {
var resList = []; var resList = [];
var indexOfList = [3186, 3175, 4597]; var indexOfList = [3186, 3175, 4597, 4797];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
typeList.forEach(function (item) { typeList.forEach(function (item) {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) { if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -1539,6 +1539,10 @@ var _default = {
_this12.changBigTypeLoading = true; _this12.changBigTypeLoading = true;
_this12.rightShopList = shopList; _this12.rightShopList = shopList;
_this12.visibleList = shopList.slice(0, _this12.visibleCount + _this12.buffer * 2); _this12.visibleList = shopList.slice(0, _this12.visibleCount + _this12.buffer * 2);
} else {
_this12.changBigTypeLoading = true;
_this12.rightShopList = shopList;
_this12.visibleList = shopList.slice(0, _this12.visibleCount + _this12.buffer * 2);
} }
case 9: case 9:
case "end": case "end":

View File

@ -178,6 +178,7 @@
} }
.main .pageContent .bigTabBox .scrollBox.data-v-36e5d840 { .main .pageContent .bigTabBox .scrollBox.data-v-36e5d840 {
width: 100%; width: 100%;
white-space: nowrap;
} }
.main .pageContent .bigTabBox .scrollBox .bigTabItem.data-v-36e5d840 { .main .pageContent .bigTabBox .scrollBox .bigTabItem.data-v-36e5d840 {
width: 20%; width: 20%;

View File

@ -86,6 +86,9 @@ var render = function () {
: null : null
var g1 = _vm.obj.IMAGE_PATH && g0 ? _vm.obj.IMAGE_PATH.split(",") : null var g1 = _vm.obj.IMAGE_PATH && g0 ? _vm.obj.IMAGE_PATH.split(",") : null
var g2 = !_vm.obj.IMAGE_PATH ? _vm.obj.List && _vm.obj.List.length > 0 : null var g2 = !_vm.obj.IMAGE_PATH ? _vm.obj.List && _vm.obj.List.length > 0 : null
var m0 = _vm.obj.showDiscount
? _vm.preciseRound(_vm.obj.discountedPrice * _vm.obj.count)
: null
_vm.$mp.data = Object.assign( _vm.$mp.data = Object.assign(
{}, {},
{ {
@ -93,6 +96,7 @@ var render = function () {
g0: g0, g0: g0,
g1: g1, g1: g1,
g2: g2, g2: g2,
m0: m0,
}, },
} }
) )
@ -181,6 +185,12 @@ exports.default = void 0;
// //
// //
// //
//
//
//
//
//
//
var _default = { var _default = {
props: { props: {
obj: {}, obj: {},
@ -197,6 +207,12 @@ var _default = {
RTCOMMODITY_MULTI_ID: obj.RTCOMMODITY_MULTI_ID, RTCOMMODITY_MULTI_ID: obj.RTCOMMODITY_MULTI_ID,
value: e.detail.value value: e.detail.value
}); });
},
preciseRound: function preciseRound(num) {
var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
if (isNaN(num) || num === null) return 0;
var factor = Math.pow(10, decimals);
return Math.round((num + Number.EPSILON) * factor) / factor;
} }
} }
}; };

View File

@ -1 +1 @@
<view class="flex-row space-x-12 _div data-v-5a6f0e03"><image class="shrink-0 self-start image_9 _img data-v-5a6f0e03" src="{{obj.IMAGE_PATH?$root.g0?$root.g1[0]:obj.IMAGE_PATH:$root.g2?obj.List[0].IMAGE_URL:obj.DEFAULT_IMG?obj.DEFAULT_IMG:'/static/images/home/defultImg.png'}}"></image><view class="flex-col info _div data-v-5a6f0e03"><view class="flex-row justify-between _div data-v-5a6f0e03"><block wx:if="{{obj.bracketContent}}"><view class="font_3 titleName _div data-v-5a6f0e03"><label style="font-weight:600;color:red;" class="_span data-v-5a6f0e03">{{''+(obj.COMMODITY_RULE?''+obj.COMMODITY_RULE+'':"")+obj.bracketContent}}</label><label class="_span data-v-5a6f0e03">{{obj.restContent||""}}</label></view></block><block wx:else><view class="font_3 titleName _div data-v-5a6f0e03">{{(obj.COMMODITY_RULE?''+obj.COMMODITY_RULE+'':"")+(obj.COMMODITY_NAME||"")}}</view></block><view class="font_3 _div data-v-5a6f0e03" style="width:100px;text-align:right;">{{'x'+obj.count+obj.COMMODITY_UNIT+''}}</view></view><view class="flex-row justify-between _div data-v-5a6f0e03"><label class="font_2 _span data-v-5a6f0e03">{{"单价: "+obj.COMMODITY_MEMBERPRICE+"元/"+obj.COMMODITY_UNIT}}</label><label class="font_2 _span data-v-5a6f0e03">{{"¥"+obj.cartItemAoumt}}</label></view><block wx:if="{{isSubmit&&obj.SALEDETAIL_DESC}}"><view class="remark _div data-v-5a6f0e03"><input class="input data-v-5a6f0e03" disabled="{{isSubmit}}" data-event-opts="{{[['input',[['__set_model',['$0','SALEDETAIL_DESC','$event',[]],['obj']]]]]}}" value="{{obj.SALEDETAIL_DESC}}" bindinput="__e"/></view></block><block wx:if="{{!isSubmit}}"><view class="remark _div data-v-5a6f0e03"><input class="input data-v-5a6f0e03" placeholder="这里是备注的内容" data-event-opts="{{[['blur',[['handleChangeValue',['$event','$0'],['obj']]]]]}}" value="{{obj.SALEDETAIL_DESC}}" bindblur="__e"/></view></block></view></view> <view class="flex-row space-x-12 _div data-v-5a6f0e03"><image class="shrink-0 self-start image_9 _img data-v-5a6f0e03" src="{{obj.IMAGE_PATH?$root.g0?$root.g1[0]:obj.IMAGE_PATH:$root.g2?obj.List[0].IMAGE_URL:obj.DEFAULT_IMG?obj.DEFAULT_IMG:'/static/images/home/defultImg.png'}}"></image><view class="flex-col info _div data-v-5a6f0e03"><view class="flex-row justify-between _div data-v-5a6f0e03"><block wx:if="{{obj.bracketContent}}"><view class="font_3 titleName _div data-v-5a6f0e03"><label style="font-weight:600;color:red;" class="_span data-v-5a6f0e03">{{''+(obj.COMMODITY_RULE?''+obj.COMMODITY_RULE+'':"")+obj.bracketContent}}</label><label class="_span data-v-5a6f0e03">{{obj.restContent||""}}</label></view></block><block wx:else><view class="font_3 titleName _div data-v-5a6f0e03">{{(obj.COMMODITY_RULE?''+obj.COMMODITY_RULE+'':"")+(obj.COMMODITY_NAME||"")}}</view></block><view class="font_3 _div data-v-5a6f0e03" style="width:100px;text-align:right;">{{'x'+obj.count+obj.COMMODITY_UNIT+''}}</view></view><view class="flex-row justify-between _div data-v-5a6f0e03"><label class="font_2 _span data-v-5a6f0e03">{{"单价: "+obj.COMMODITY_MEMBERPRICE+"元/"+obj.COMMODITY_UNIT}}</label><view style="display:flex;flex-direction:column;align-items:flex-end;" class="data-v-5a6f0e03"><label class="font_2 _span data-v-5a6f0e03" style="{{'text-decoration:'+(obj.showDiscount?'line-through':'')+';'}}">{{"¥"+obj.cartItemAoumt}}</label><block wx:if="{{obj.showDiscount}}"><label class="font_2 _span data-v-5a6f0e03">{{"¥"+$root.m0}}</label></block></view></view><block wx:if="{{isSubmit&&obj.SALEDETAIL_DESC}}"><view class="remark _div data-v-5a6f0e03"><input class="input data-v-5a6f0e03" disabled="{{isSubmit}}" data-event-opts="{{[['input',[['__set_model',['$0','SALEDETAIL_DESC','$event',[]],['obj']]]]]}}" value="{{obj.SALEDETAIL_DESC}}" bindinput="__e"/></view></block><block wx:if="{{!isSubmit}}"><view class="remark _div data-v-5a6f0e03"><input class="input data-v-5a6f0e03" placeholder="这里是备注的内容" data-event-opts="{{[['blur',[['handleChangeValue',['$event','$0'],['obj']]]]]}}" value="{{obj.SALEDETAIL_DESC}}" bindblur="__e"/></view></block></view></view>

View File

@ -277,7 +277,9 @@ var _default = {
// 营销工号 // 营销工号
currentOrderDetial: "", currentOrderDetial: "",
// 如果订单创建成功了 就会有值的 // 如果订单创建成功了 就会有值的
noDelivery: false // 判断是否隐藏配送 noDelivery: false,
// 判断是否隐藏配送
discountAmount: 0 // 实际优惠的金额
}; };
}, },
@ -292,11 +294,40 @@ var _default = {
couponOrder: function couponOrder() { couponOrder: function couponOrder() {
// 商品金额 // 商品金额
var amount = 0; var amount = 0;
console.log('computedcomputed', this.shopOrder);
// 判断 活动模块 的商品是不是大于等于2个 那么 就是打95折
var haveSum = 0;
this.shopOrder.forEach(function (item) {
var goodNum = Number(item.count);
if (item.showDiscount) {
haveSum += 1 * goodNum;
}
});
if (haveSum >= 2) {
var discountedProducts = 0; // 打折商品的合计钱(还没乘0.95的)
var noDiscountedProducts = 0;
this.shopOrder.forEach(function (item) {
var goodNum = Number(item.count);
if (item.showDiscount) {
discountedProducts += item.COMMODITY_MEMBERPRICE * goodNum;
} else {
noDiscountedProducts += item.COMMODITY_MEMBERPRICE * goodNum;
}
});
this.discountAmount = (discountedProducts - this.preciseRound(0.95 * discountedProducts)).toFixed(2);
var res = (this.preciseRound(0.95 * discountedProducts) + noDiscountedProducts).toFixed(2);
console.log('this.discountAmount this.discountAmount', this.discountAmount);
return res;
} else {
// 正常算钱
this.shopOrder.map(function (v) { this.shopOrder.map(function (v) {
amount += v.ORDER_AMOUNT; amount += v.ORDER_AMOUNT;
}); });
this.discountAmount = 0;
return amount.toFixed(2); return amount.toFixed(2);
} }
}
}), }),
onShow: function onShow() { onShow: function onShow() {
this.phoneNumber = this.user.MEMBERSHIP_MOBILEPHONE; this.phoneNumber = this.user.MEMBERSHIP_MOBILEPHONE;
@ -306,7 +337,6 @@ var _default = {
} }
}, },
// onHide() { // onHide() {
// console.log(' this.currentOrderDetial this.currentOrderDetial', this.currentOrderDetial);
// if (this.currentOrderDetial.SALEBILL_ID) { // if (this.currentOrderDetial.SALEBILL_ID) {
// const req = { // const req = {
// action_type: "UpdateOrderState", // action_type: "UpdateOrderState",
@ -326,26 +356,23 @@ var _default = {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context.prev = _context.next) {
case 0: case 0:
console.log('optionoptionoptionoption', option);
app = getApp(); app = getApp();
if (option.rcmCode) { if (option.rcmCode) {
_this2.recommendCode = Number(option.rcmCode); _this2.recommendCode = Number(option.rcmCode);
} }
if (option.shopCarList) { if (option.shopCarList) {
shopList = JSON.parse(option.shopCarList); shopList = JSON.parse(decodeURIComponent(option.shopCarList));
console.log("shopList", shopList); console.log('shopListshopListshopListshopList', shopList);
sum = 0; sum = 0;
newList = []; newList = [];
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
shopList.forEach(function (item) { shopList.forEach(function (item) {
var obj = _this2.parseBracketString(item.COMMODITY_NAME); var obj = _this2.parseBracketString(item.COMMODITY_NAME);
console.log("obj", obj);
sum += item.count; sum += item.count;
newList.push(_objectSpread(_objectSpread({}, obj), item)); newList.push(_objectSpread(_objectSpread({}, obj), item));
}); });
} }
_this2.shopOrder = newList; _this2.shopOrder = newList;
console.log("this.shopOrder", _this2.shopOrder);
_this2.shopCount = sum; _this2.shopCount = sum;
} }
if (option.addressId) { if (option.addressId) {
@ -354,7 +381,6 @@ var _default = {
if (option.pageType) { if (option.pageType) {
_this2.pageType = option.pageType; _this2.pageType = option.pageType;
} }
console.log("this.shopOrder", _this2.shopOrder);
// 根据这笔订单的商品来判断 是显示 配送 还是自提 // 根据这笔订单的商品来判断 是显示 配送 还是自提
if (_this2.shopOrder && _this2.shopOrder.length > 0) { if (_this2.shopOrder && _this2.shopOrder.length > 0) {
@ -370,17 +396,17 @@ var _default = {
if (haveDelivery) {} else { if (haveDelivery) {} else {
// 没有配送 那就隐藏掉顶部tab的配送 // 没有配送 那就隐藏掉顶部tab的配送
_this2.noDelivery = true; _this2.noDelivery = true;
_this2.selectTab = 2;
} }
} }
// 请求用户的地址 // 请求用户的地址
_context.next = 10; _context.next = 8;
return _this2.handleGetAddressList(); return _this2.handleGetAddressList();
case 10: case 8:
console.log("1");
_this2.isFirst = false; _this2.isFirst = false;
_this2.$utils.addUserBehaviorNew(); _this2.$utils.addUserBehaviorNew();
case 13: case 10:
case "end": case "end":
return _context.stop(); return _context.stop();
} }
@ -389,6 +415,12 @@ var _default = {
}))(); }))();
}, },
methods: { methods: {
preciseRound: function preciseRound(num) {
var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
if (isNaN(num) || num === null) return 0;
var factor = Math.pow(10, decimals);
return Math.round((num + Number.EPSILON) * factor) / factor;
},
updateDesc: function updateDesc(_ref) { updateDesc: function updateDesc(_ref) {
var COMMODITY_ID = _ref.COMMODITY_ID, var COMMODITY_ID = _ref.COMMODITY_ID,
RTCOMMODITY_MULTI_ID = _ref.RTCOMMODITY_MULTI_ID, RTCOMMODITY_MULTI_ID = _ref.RTCOMMODITY_MULTI_ID,
@ -400,7 +432,6 @@ var _default = {
}, },
// 选择支付方式的切换 // 选择支付方式的切换
handlePayTypeChange: function handlePayTypeChange(e) { handlePayTypeChange: function handlePayTypeChange(e) {
console.log("e", e);
this.payType = Number(e.detail.value); this.payType = Number(e.detail.value);
}, },
// 组合支付 // 组合支付
@ -449,7 +480,6 @@ var _default = {
}); });
case 2: case 2:
data = _context2.sent; data = _context2.sent;
console.log("handleGetAddressList", data);
list = data.Data.List; list = data.Data.List;
defaultAddress = {}; defaultAddress = {};
if (list && list.length > 0) { if (list && list.length > 0) {
@ -470,7 +500,6 @@ var _default = {
} }
} }
}); });
console.log("defaultAddress", defaultAddress);
if (!defaultAddress.MEMBERADDRESS_ID) { if (!defaultAddress.MEMBERADDRESS_ID) {
defaultAddress = list[0]; defaultAddress = list[0];
} }
@ -483,7 +512,7 @@ var _default = {
_this3.addressInfo = {}; _this3.addressInfo = {};
_this3.selectAddressId = 0; _this3.selectAddressId = 0;
} }
case 7: case 6:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -494,7 +523,6 @@ var _default = {
// 切换选中的地址 // 切换选中的地址
handleChangeAddress: function handleChangeAddress(id) { handleChangeAddress: function handleChangeAddress(id) {
var _this4 = this; var _this4 = this;
console.log("this.selectAddressId", this.selectAddressId);
this.addressList.forEach(function (item) { this.addressList.forEach(function (item) {
if (item.MEMBERADDRESS_ID === id) { if (item.MEMBERADDRESS_ID === id) {
_this4.addressInfo = item; _this4.addressInfo = item;
@ -519,7 +547,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, newShopList, t_saleorderdetail, req, data, shopOrderNameList; var DATAFORMATType, openId, app, newShopList, t_saleorderdetail, req, data, shopOrderNameList, _this;
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) {
@ -579,8 +607,10 @@ var _default = {
return _context3.abrupt("return"); return _context3.abrupt("return");
case 18: case 18:
_this5.isMakeOrdering = true; _this5.isMakeOrdering = true;
console.log("_this.user", _this5.user); uni.showLoading({
console.log("_this.shopOrder", _this5.shopOrder); title: "创建订单...",
mask: true
});
// 判断这笔订单的 DATAFORMAT 如果 DATAFORMAT 有2 说明是品诺订单 要传3002 // 判断这笔订单的 DATAFORMAT 如果 DATAFORMAT 有2 说明是品诺订单 要传3002
DATAFORMATType = 0; DATAFORMATType = 0;
@ -593,10 +623,7 @@ var _default = {
DATAFORMATType = item.DATAFORMAT; DATAFORMATType = item.DATAFORMAT;
}); });
} }
console.log("DATAFORMATType", DATAFORMATType);
openId = uni.getStorageSync("openId"); 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 = JSON.parse(JSON.stringify(_this5.shopOrder));
t_saleorderdetail = []; t_saleorderdetail = [];
@ -616,7 +643,7 @@ var _default = {
COMMODITY_RULE: item.COMMODITY_RULE ? item.COMMODITY_RULE.toString() : "", COMMODITY_RULE: item.COMMODITY_RULE ? item.COMMODITY_RULE.toString() : "",
COMMODITY_RETAILPRICE: item.COMMODITY_RETAILPRICE ? item.COMMODITY_RETAILPRICE.toString() : "", COMMODITY_RETAILPRICE: item.COMMODITY_RETAILPRICE ? item.COMMODITY_RETAILPRICE.toString() : "",
COMMODITY_PURCHASEPRICE: item.COMMODITY_PURCHASEPRICE ? item.COMMODITY_PURCHASEPRICE.toString() : "", COMMODITY_PURCHASEPRICE: item.COMMODITY_PURCHASEPRICE ? item.COMMODITY_PURCHASEPRICE.toString() : "",
COMMODITY_MEMBERPRICE: item.COMMODITY_MEMBERPRICE ? item.COMMODITY_MEMBERPRICE.toString() : "", COMMODITY_MEMBERPRICE: item.discountedPrice ? item.discountedPrice.toString() : item.COMMODITY_MEMBERPRICE ? item.COMMODITY_MEMBERPRICE.toString() : "",
COMMODITY_CURRPRICE: item.COMMODITY_CURRPRICE ? item.COMMODITY_CURRPRICE.toString() : "", COMMODITY_CURRPRICE: item.COMMODITY_CURRPRICE ? item.COMMODITY_CURRPRICE.toString() : "",
COMMODITY_STOCK: item.COMMODITY_STOCK ? item.COMMODITY_STOCK.toString() : "", COMMODITY_STOCK: item.COMMODITY_STOCK ? item.COMMODITY_STOCK.toString() : "",
COMMODITY_STATE: item.COMMODITY_STATE ? item.COMMODITY_STATE.toString() : "", COMMODITY_STATE: item.COMMODITY_STATE ? item.COMMODITY_STATE.toString() : "",
@ -630,7 +657,6 @@ var _default = {
SALEDETAIL_DESC: item.SALEDETAIL_DESC ? item.SALEDETAIL_DESC.toString() : "" SALEDETAIL_DESC: item.SALEDETAIL_DESC ? item.SALEDETAIL_DESC.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",
@ -657,17 +683,14 @@ var _default = {
// const scanParams = app.globalData.recommendCode; // const scanParams = app.globalData.recommendCode;
// const scanParams2 = app.globalData.recommendId; // const scanParams2 = app.globalData.recommendId;
}; }; // return
console.log("req", req); console.log('reqreqreq', req);
console.log("this.shopOrder", _this5.shopOrder); _context3.next = 31;
console.log("this.addressInfo", _this5.addressInfo);
// return
_context3.next = 38;
return _this5.$api.postCoop(req); return _this5.$api.postCoop(req);
case 38: case 31:
data = _context3.sent; data = _context3.sent;
console.log("data", data); console.log('创建的订单', data);
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
shopOrderNameList = ''; shopOrderNameList = '';
if (t_saleorderdetail && t_saleorderdetail.length > 0) { if (t_saleorderdetail && t_saleorderdetail.length > 0) {
@ -685,9 +708,27 @@ var _default = {
}); });
if (_this5.pageType === "UnionMall") { if (_this5.pageType === "UnionMall") {
_this5.handleBalancePayment(data.Data); _this5.handleBalancePayment(data.Data);
} else {
if (_this5.user.TEST_MEMBER) {
_this = _this5;
uni.showModal({
content: "此单是否为测试订单?",
success: function success(res) {
if (res.confirm) {
// 因为是内部会员 跳过支付 所以 直接跳转 且给成长值
_this.handleUpdateOrderGrowth(data.Data.SALEBILL_ID, data.Data.PAY_AMOUNT);
uni.redirectTo({
url: "/pages/order/orderdetail/index?orderInternal=".concat(data.Data.SALEBILL_ID)
});
} else if (res.cancel) {
_this.getOrderInfo(data.Data, data.Data.PAY_AMOUNT);
}
}
});
} else { } else {
_this5.getOrderInfo(data.Data, data.Data.PAY_AMOUNT); _this5.getOrderInfo(data.Data, data.Data.PAY_AMOUNT);
} }
}
// let [provinceId, cityId, districtId, streetId] = // let [provinceId, cityId, districtId, streetId] =
// this.addressInfo.MEMBERADDRESS_CODE.split(","); // this.addressInfo.MEMBERADDRESS_CODE.split(",");
@ -732,7 +773,6 @@ var _default = {
// "/pino/order/submit", // "/pino/order/submit",
// req // req
// ); // );
// console.log("pingnuoData", pingnuoData);
// if (pingnuoData.code === 200) { // if (pingnuoData.code === 200) {
// let shopCarList = []; // let shopCarList = [];
// if (this.pageType === "UnionMall") { // if (this.pageType === "UnionMall") {
@ -797,7 +837,7 @@ var _default = {
}); });
_this5.isMakeOrdering = false; _this5.isMakeOrdering = false;
} }
case 41: case 34:
case "end": case "end":
return _context3.stop(); return _context3.stop();
} }
@ -824,13 +864,11 @@ var _default = {
AppID: "wxee018fb96955552a", AppID: "wxee018fb96955552a",
type: 'encryption' type: 'encryption'
}; };
console.log('reqreqreq', req); _context4.next = 3;
_context4.next = 4;
return _this6.$api.$zzyLocalPost("/Member/RecordMemberScoreInfo", req); return _this6.$api.$zzyLocalPost("/Member/RecordMemberScoreInfo", req);
case 4: case 3:
data = _context4.sent; data = _context4.sent;
console.log('datadatadatadata', data); case 4:
case 6:
case "end": case "end":
return _context4.stop(); return _context4.stop();
} }
@ -847,23 +885,18 @@ var _default = {
while (1) { while (1) {
switch (_context5.prev = _context5.next) { switch (_context5.prev = _context5.next) {
case 0: case 0:
_this = _this7; _this = _this7; // 获取最新的用户余额
console.log("this.user", _this7.user);
console.log("obj", obj);
// 获取最新的用户余额
uni.showLoading({ uni.showLoading({
title: "获取用户余额..." title: "获取用户余额..."
}); });
_context5.next = 6; _context5.next = 4;
return _this7.$api.getCoop({ return _this7.$api.getCoop({
action_type: "GetMembershipInfo", action_type: "GetMembershipInfo",
WechatUserId: _this7.user.WechatUserId WechatUserId: _this7.user.WechatUserId
}); });
case 6: case 4:
userData = _context5.sent; userData = _context5.sent;
_this7.userInfo = userData.Data; _this7.userInfo = userData.Data;
console.log("this.userInfo", _this7.userInfo);
uni.hideLoading(); uni.hideLoading();
// 判断余额是否不足 // 判断余额是否不足
@ -884,11 +917,10 @@ var _default = {
requestType: "application/x-www-form-urlencoded", requestType: "application/x-www-form-urlencoded",
mixPay: insufficientBalance ? 1 : "" // 组合支付的时候传1 mixPay: insufficientBalance ? 1 : "" // 组合支付的时候传1
}; };
_context5.next = 15; _context5.next = 12;
return _this7.$api.postCoop(req); return _this7.$api.postCoop(req);
case 15: case 12:
data = _context5.sent; data = _context5.sent;
console.log("data", data);
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
if (insufficientBalance) { if (insufficientBalance) {
uni.showModal({ uni.showModal({
@ -899,7 +931,25 @@ var _default = {
uni.showLoading({ uni.showLoading({
title: "进行组合支付..." title: "进行组合支付..."
}); });
_this.getOrderInfo(obj, data.ResultData); if (_this.user.TEST_MEMBER) {
var _this8 = this;
uni.showModal({
content: "此单是否为测试订单?",
success: function success(res) {
if (res.confirm) {
// 因为是内部会员 跳过支付 所以 直接跳转 且给成长值
_this8.handleUpdateOrderGrowth(data.ResultData.SALEBILL_ID, data.ResultData.PAY_AMOUNT);
uni.redirectTo({
url: "/pages/order/orderdetail/index?orderInternal=".concat(obj.SALEBILL_ID)
});
} else if (res.cancel) {
_this8.getOrderInfo(obj, data.ResultData);
}
}
});
} else {
this.getOrderInfo(obj, data.ResultData);
}
uni.hideLoading(); uni.hideLoading();
} else if (res.cancel) { } else if (res.cancel) {
// 删除购物车中的商品 // 删除购物车中的商品
@ -916,7 +966,6 @@ var _default = {
nowShopCarList = _this.$store.state.myShopCar; nowShopCarList = _this.$store.state.myShopCar;
} }
var newShopList = []; var newShopList = [];
console.log('nowShopCarListnowShopCarList', nowShopCarList);
if (nowShopCarList && nowShopCarList.length > 0) { if (nowShopCarList && nowShopCarList.length > 0) {
nowShopCarList.forEach(function (item) { nowShopCarList.forEach(function (item) {
if (idList.indexOf(item.COMMODITY_ID) === -1) { if (idList.indexOf(item.COMMODITY_ID) === -1) {
@ -924,7 +973,6 @@ var _default = {
} }
}); });
} }
console.log('newShopListnewShopList', newShopList);
// 判断是工会商城 还是 精选商城 3000 精选 30001 工会 // 判断是工会商城 还是 精选商城 3000 精选 30001 工会
if (_this.pageType === "UnionMall") { if (_this.pageType === "UnionMall") {
@ -992,7 +1040,7 @@ var _default = {
icon: 'none' icon: 'none'
}); });
} }
case 18: case 14:
case "end": case "end":
return _context5.stop(); return _context5.stop();
} }
@ -1023,32 +1071,15 @@ var _default = {
// 生成一个符合要求的商户订单号长度为16的示例 // 生成一个符合要求的商户订单号长度为16的示例
// 获取后台信息调取微信支付 // 获取后台信息调取微信支付
getOrderInfo: function getOrderInfo(obj, payMoney) { getOrderInfo: function getOrderInfo(obj, payMoney) {
var _this8 = this; var _this9 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
var _this, mchid, timeStamp, nonceStr, serial_no, out_trade_no, req, reqSign, data, Authorization, AuthorizationStr; var _this, mchid, timeStamp, nonceStr, serial_no, out_trade_no, req, reqSign, data, Authorization, AuthorizationStr;
return _regenerator.default.wrap(function _callee7$(_context7) { return _regenerator.default.wrap(function _callee7$(_context7) {
while (1) { while (1) {
switch (_context7.prev = _context7.next) { switch (_context7.prev = _context7.next) {
case 0: case 0:
if (!_this8.user.TEST_MEMBER) {
_context7.next = 4;
break;
}
// 因为是内部会员 跳过支付 所以 直接跳转 且给成长值
_this8.handleUpdateOrderGrowth(obj.SALEBILL_ID, obj.PAY_AMOUNT);
uni.redirectTo({
url: "/pages/order/orderdetail/index?orderInternal=".concat(obj.SALEBILL_ID)
});
return _context7.abrupt("return");
case 4:
console.log('this.shopOrderthis.shopOrderthis.shopOrder', _this8.shopOrder);
// payMoney 工会之家订单 组合支付时可能会出现的值 // payMoney 工会之家订单 组合支付时可能会出现的值
_this = _this8; _this = _this9; // 拿到签名
console.log("_this.couponOrder", _this.couponOrder);
console.log("payMoneypayMoneypayMoney", payMoney);
console.log("objobjobjobjobjobjobjobj", obj);
// 拿到签名
mchid = "1672298991"; mchid = "1672298991";
timeStamp = Math.ceil(new Date().getTime() / 1000); timeStamp = Math.ceil(new Date().getTime() / 1000);
nonceStr = Math.random().toString(36).substring(2, 8); nonceStr = Math.random().toString(36).substring(2, 8);
@ -1075,15 +1106,13 @@ var _default = {
openid: _this.user.WECHATAPP_OPENID openid: _this.user.WECHATAPP_OPENID
} // 支付者信息 } // 支付者信息
}; };
console.log("req", req);
reqSign = { reqSign = {
parameters: "POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n", parameters: "POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n",
provinceCode: _this.provinceCode || "530000" provinceCode: _this.provinceCode || "530000"
}; };
_context7.next = 19; _context7.next = 10;
return _this8.$api.$get("/WeChat/GenerateSign", reqSign); return _this9.$api.$get("/WeChat/GenerateSign", reqSign);
case 19: case 10:
data = _context7.sent; data = _context7.sent;
console.log("data3213123", data.Result_Data); console.log("data3213123", data.Result_Data);
Authorization = "mchid=\"".concat(mchid, "\",nonce_str=\"").concat(nonceStr, "\",signature=\"").concat(data.Result_Data, "\",timestamp=\"").concat(timeStamp, "\",serial_no=\"").concat(serial_no, "\""); Authorization = "mchid=\"".concat(mchid, "\",nonce_str=\"").concat(nonceStr, "\",signature=\"").concat(data.Result_Data, "\",timestamp=\"").concat(timeStamp, "\",serial_no=\"").concat(serial_no, "\"");
@ -1185,7 +1214,7 @@ var _default = {
}() }()
}); });
return _context7.abrupt("return"); return _context7.abrupt("return");
case 28: case 19:
case "end": case "end":
return _context7.stop(); return _context7.stop();
} }

File diff suppressed because one or more lines are too long

View File

@ -309,6 +309,12 @@
color: #ff6219; color: #ff6219;
font-size: 36rpx; font-size: 36rpx;
} }
.settlement .place_order .place_order_box .discountAmount.data-v-43036aa6 {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff6219;
}
.settlement .place_order .place_order_btn.data-v-43036aa6 { .settlement .place_order .place_order_btn.data-v-43036aa6 {
width: 210rpx; width: 210rpx;
background: #4BCB7E; background: #4BCB7E;

File diff suppressed because one or more lines are too long

View File

@ -9,44 +9,9 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/highwayHeadlines/attractInvestmentDetail", "name": "pages/shopMallPage/shopCar/index",
"pathName": "pages/highwayHeadlines/attractInvestmentDetail", "pathName": "pages/shopMallPage/shopCar/index",
"query": "id=61&type=true", "query": "pageType=",
"scene": null,
"launchMode": "default"
},
{
"name": "pages/highwayHeadlines/investmentApplication",
"pathName": "pages/highwayHeadlines/investmentApplication",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/sharedRestStop/index",
"pathName": "pages/sharedRestStop/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/eventRegistration/index",
"pathName": "pages/eventRegistration/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/InvoiceManagement/detail",
"pathName": "pages/InvoiceManagement/detail",
"query": "id=1&invoice=%257B%2522id%2522%253A1%252C%2522title%2522%253A%2522%25E4%25BA%2591%25E5%258D%2597%25E9%25AB%2598%25E9%2580%259F%25E5%2585%25AC%25E8%25B7%25AF%25E6%259C%258D%25E5%258A%25A1%25E5%258C%25BA%25E6%259C%2589%25E9%2599%2590%25E5%2585%25AC%25E5%258F%25B8%2522%252C%2522invoiceNumber%2522%253A%2522FP202401001%2522%252C%2522amount%2522%253A%25221000.00%2522%252C%2522status%2522%253A%2522issued%2522%252C%2522type%2522%253A%2522%25E5%25A2%259E%25E5%2580%25BC%25E7%25A8%258E%25E6%2599%25AE%25E9%2580%259A%25E5%258F%2591%25E7%25A5%25A8%2522%252C%2522createTime%2522%253A%25222024-01-15%252014%253A30%253A00%2522%252C%2522email%2522%253A%2522zhangsan%2540example.com%2522%252C%2522phone%2522%253A%252213800138000%2522%252C%2522taxNumber%2522%253A%252291530100MA6KXXXXXX%2522%252C%2522bankName%2522%253A%2522%25E4%25B8%25AD%25E5%259B%25BD%25E9%2593%25B6%25E8%25A1%258C%25E6%2598%2586%25E6%2598%258E%25E5%2588%2586%25E8%25A1%258C%2522%252C%2522bankAccount%2522%253A%25226217%25209027%25200000%25201234%2520567%2522%257D",
"launchMode": "default",
"scene": null
},
{
"name": "pages/InvoiceManagement/index",
"pathName": "pages/InvoiceManagement/index",
"query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
} }

View File

@ -190,7 +190,6 @@ export function addUserBehaviorNew(obj) {
OperatingSystem: '彩云驿出行', OperatingSystem: '彩云驿出行',
}; };
console.log('埋点数据:', req);
api.$get('/CommercialApi/UserBehavior/AddUserBehavior', req).then(() => { }); api.$get('/CommercialApi/UserBehavior/AddUserBehavior', req).then(() => { });
} }

View File

@ -29,17 +29,14 @@ class SkeletonManager {
this.visitedPages = new Set() this.visitedPages = new Set()
uni.removeStorageSync('visitedPages') uni.removeStorageSync('visitedPages')
uni.setStorageSync('lastAppLaunchTime', appLaunchTime) uni.setStorageSync('lastAppLaunchTime', appLaunchTime)
console.log('骨架屏管理器: 检测到新的小程序启动,重置访问记录')
} else { } else {
// 同一次应用启动,恢复已访问记录 // 同一次应用启动,恢复已访问记录
const cachedVisitedPages = uni.getStorageSync('visitedPages') const cachedVisitedPages = uni.getStorageSync('visitedPages')
if (cachedVisitedPages && Array.isArray(cachedVisitedPages)) { if (cachedVisitedPages && Array.isArray(cachedVisitedPages)) {
this.visitedPages = new Set(cachedVisitedPages) this.visitedPages = new Set(cachedVisitedPages)
console.log('骨架屏管理器: 恢复已访问记录', cachedVisitedPages)
} }
} }
} catch (error) { } catch (error) {
console.warn('骨架屏管理器初始化失败:', error)
this.visitedPages = new Set() this.visitedPages = new Set()
} }
} }
@ -66,8 +63,6 @@ class SkeletonManager {
shouldShowSkeleton(pagePath, pageType = '') { shouldShowSkeleton(pagePath, pageType = '') {
const pageKey = this.generatePageKey(pagePath, pageType) const pageKey = this.generatePageKey(pagePath, pageType)
const shouldShow = !this.visitedPages.has(pageKey) const shouldShow = !this.visitedPages.has(pageKey)
console.log(`骨架屏检查 ${pageKey}: ${shouldShow ? '需要显示' : '已访问过'}`,
`当前已访问页面:`, Array.from(this.visitedPages))
return shouldShow return shouldShow
} }
@ -78,12 +73,9 @@ class SkeletonManager {
*/ */
markPageVisited(pagePath, pageType = '') { markPageVisited(pagePath, pageType = '') {
const pageKey = this.generatePageKey(pagePath, pageType) const pageKey = this.generatePageKey(pagePath, pageType)
console.log('pageKeypageKeypageKey', pageKey);
this.visitedPages.add(pageKey) this.visitedPages.add(pageKey)
console.log('this.visitedPagesthis.visitedPages', this.visitedPages);
this.saveToCache() this.saveToCache()
console.log(`骨架屏标记已访问: ${pageKey}`, `当前已访问页面:`, Array.from(this.visitedPages))
} }
/** /**
@ -115,7 +107,6 @@ class SkeletonManager {
getPageSkeletonControl(pagePath, pageType = '') { getPageSkeletonControl(pagePath, pageType = '') {
const shouldShow = this.shouldShowSkeleton(pagePath, pageType) const shouldShow = this.shouldShowSkeleton(pagePath, pageType)
console.log('1111', shouldShow);
return { return {
// 是否显示骨架屏 // 是否显示骨架屏