Commit 32014122 by wangzhihui

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents 4d078883 39610aae
Showing 37 changed files with 256 additions and 85 deletions
......@@ -94,9 +94,10 @@ class Request {
})
}
if (query.length) currentRoute += `?${query.join('&')}`
return wx.p.router.redirectTo('/pages/loading/loading', {
url: `/${currentRoute}`
})
wx.p.storage.rm('sessionId')
wx.p.isLogin = false
wx.p.storage.rm('userInfo')
return wx.p.router.redirectTo('/pages/Login/Login')
} else {
if (code == '0') {
resolve(data.data)
......@@ -105,16 +106,18 @@ class Request {
title: message || '系统异常',
icon: 'none'
})
wx.p.sentry.reportError(`接口异常:${message}`, {code,message,params})
}
}
},
fail(error) {
wx.hideLoading()
console.error(`接口异常:`, error)
wx.showToast({
title: typeof error == 'string' ? error : JSON.stringify(error) || '系统异常',
icon: 'error'
})
console.error(`接口异常:`, error)
wx.p.sentry.reportError(`接口异常:${error.message}`, {error,params})
reject(error)
},
complete() {
......
@import "assets/style/common.wxss";
page {
background-color: #F9F7F7 !important;
background-color: #F7F8FA !important;
color: #282829;
font-size: 28rpx;
--themeColor: #FC5B32;
......
......@@ -112,6 +112,19 @@
background: #EFF0F2;
}
}
.nothing {
height: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
color: #7A8299;
.icon{
width: 320rpx;
height: 300rpx;
margin-bottom: 20rpx;
}
}
}
.footer {
......
......@@ -8,7 +8,7 @@
<glsx-image bind:tap="cancel" webp class="icon" src="/index/close.png"></glsx-image>
</view>
<view class="list-pannel">
<scroll-view class="scroll" scroll-y="{{true}}">
<scroll-view class="scroll" scroll-y="{{true}}" wx:if="{{address.length}}">
<block wx:for="{{address}}" wx:key="index">
<view bind:tap="toSelect" data-item="{{item}}" data-index="{{index}}" class="cell">
<view class="icon">
......@@ -24,6 +24,12 @@
</view>
</block>
</scroll-view>
<view wx:else class="nothing">
<view class="icon">
<glsx-image webp src="/cart/nothing-icon.png" />
</view>
暂无收货地址
</view>
</view>
<view class="footer flex_cc">
<view bind:tap="addNew" data-url="/packageMine/pages/address/detail/detail" class="btn flex_cc">新增地址</view>
......
......@@ -53,6 +53,13 @@ Component({
// 替换积分钱包名称
replaceNickName(data) {
let userInfo = wx.p.storage.get('userInfo')
let { phone, scoreSource } = data
if (!phone || !scoreSource) {
wx.p.sentry.reportParamError(
'替换积分钱包姓名异常:phone, scoreSource',
data
)
}
commonApi.replaceWalletName({
nickName: data?.name,
phone: data?.phone,
......
......@@ -39,6 +39,7 @@
.content-box {
position: absolute;
z-index: 2;
width: calc(100% - 80rpx);
margin: 220rpx 40rpx 0 40rpx;
.box-item {
display: flex;
......
......@@ -48,7 +48,7 @@ Component({
cartApi.getCartList(para).then(res => {
let cartNum = 0
res?.goodsList?.forEach(el => {
cartNum = NP.plus(cartNum, el.sellQty)
cartNum = NP.plus(cartNum, el.sellQty || 0)
})
this.setData({
cartNum
......
......@@ -79,7 +79,7 @@
width: 304rpx;
height: 84rpx;
color: #fff;
font-size: 28rpx;
font-size: 32rpx;
}
.btn-box .pay {
......
......@@ -87,7 +87,7 @@
.sku-title {
color: #2D2D2E;
font-weight: 500;
padding-top: var(--margin);
padding-top: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
......@@ -97,7 +97,8 @@
flex-wrap: wrap;
.item {
height: 52rpx;
line-height: 52rpx;
display: flex;
align-items: center;
background: #F7F8FA;
padding: 0 20rpx;
margin: 20rpx 20rpx 0 0;
......@@ -140,7 +141,7 @@
}
.count-box {
margin-top: 20rpx;
margin-top: 32rpx;
.title {
font-weight: 400;
......@@ -232,11 +233,11 @@
background: white;
.btn {
width: 100%;
height: 80rpx;
height: 84rpx;
background: #FB8A32;
border-radius: 20rpx;
font-weight: 500;
font-size: 30rpx;
font-size: 32rpx;
color: #FFFFFF;
}
......
......@@ -30,6 +30,7 @@
.stepper-box .num {
width: 59rpx;
border-radius: 8rpx;
}
.stepper-box .add {
......
......@@ -27,8 +27,7 @@
</view>
<view class="item-box-price">
<view class="points-price">
{{item.redeemPoints}}
<text>积分</text>
{{item.redeemPoints}}<text>积分</text>
</view>
</view>
<view class="item-box-btn">
......
......@@ -94,6 +94,7 @@
.item-box-price text{
font-weight: 400;
font-size: 22rpx;
margin-left: 4rpx;
}
.item-box-btn {
......
......@@ -30,7 +30,7 @@ Component({
},
mode: {
type: String,
value: 'scaleToFill'
value: 'aspectFill'
},
webp: {
type: Boolean,
......
......@@ -42,7 +42,7 @@
</view>
<view wx:if="{{item.specificationData}}" class="specificationData-text" bindtap="handleChangeSku" data-target="{{item}}" data-index="{{index}}">
<view class="text-hide description">{{item.specificationData}}</view>
<mp-icon icon="back" class="change-icon" color="#6E6E7A" size="{{8}}"></mp-icon>
<mp-icon icon="back" class="change-icon" color="#6E6E7A" size="{{6}}"></mp-icon>
</view>
</view>
<view class="price-box">
......
/* packageMall/pages/pay/pay.wxss */
.layout {
background: #F7F8FA;
/* background: #F7F8FA; */
padding: 24rpx 32rpx;
}
.address-box {
......@@ -20,7 +20,7 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 0 0;
padding: 24rpx 0 4rpx;
}
.address-box .left {
......@@ -170,6 +170,8 @@
.text .specificationData-text .change-icon {
margin-left: 8rpx;
margin-top: 2rpx;
filter: drop-shadow(1rpx 0 0 #6E6E7A);
transform: rotate(-90deg);
}
......
......@@ -92,6 +92,19 @@ Page({
merchantId: userInfo?.merchantId,
merchantName: userInfo?.merchantName,
} : {id: reviewId}
let { goodsId, customerMobile, merchantId } = params
if (e.type == 'add' && (!goodsId || !customerMobile || !merchantId)) {
wx.p.sentry.reportParamError(
'商品详情进入埋点异常:goodsId, customerMobile, merchantId',
params
)
}
if (e.type != 'add' && !reviewId) {
wx.p.sentry.reportParamError(
'商品详情离开埋点异常:id',
{id: reviewId}
)
}
commonApi[eventApi](params).then(res => {
this.setData({reviewId: res?.data})
})
......@@ -165,6 +178,12 @@ Page({
},
// 获取详情
getDetail(options) {
if (!options.id) {
wx.p.sentry.reportParamError(
'商品详情异常:id',
id
)
}
homeApi.getGoodsDetailInfo({id: options.id, businessType: 1}).then(res => {
if (res && res.specificationResponses?.length) {
this.toGetSpecString(res, res.startQty)
......@@ -216,6 +235,13 @@ Page({
merchantId: userInfo?.merchantId
}
if (!detailInfo.goodsStock) return wx.p.wxApi.showToast('暂无库存')
let { goodsId, sellQty, goodsSource, scoreSource, merchantId, specificationData } = PARAMS
if (!goodsId || !sellQty || !goodsSource || !scoreSource || !merchantId || (goodsSource == 2 && !specificationData)) {
wx.p.sentry.reportParamError(
'加入购物车异常:goodsId, sellQty, goodsSource, scoreSource, merchantId, specificationData',
PARAMS
)
}
cartApi.addToCart(PARAMS).then(res => {
wx.p.wxApi.showToast('加入购物车成功')
this.joinSuccess()
......
......@@ -72,7 +72,7 @@ page {
padding: 16rpx 0;
.container-item {
margin: 0 16rpx;
padding: 28rpx 24rpx;
padding: 0 24rpx;
background: #FFFFFF;
border-radius: 24rpx;
margin-bottom: 16rpx;
......@@ -91,6 +91,7 @@ page {
text {
font-size: 28rpx;
font-weight: 500;
margin-left: 4rpx;
}
}
.market-price {
......@@ -103,6 +104,9 @@ page {
.count {
color: #B1B1B3;
font-size: 24rpx;
.line{
margin: 0 16rpx;
}
}
.goods-title {
margin-top: 20rpx;
......
......@@ -39,13 +39,12 @@
<view class="price">
<view class="price-box">
<view class="sale-price">
{{detailInfo.redeemPoints}}
<text>积分</text>
{{detailInfo.redeemPoints}}<text>积分</text>
</view>
<view class="market-price">¥{{detailInfo.marketPrice}}</view>
</view>
<view class="count">
<text>剩余 {{goodsStock}}</text> | <text>销售 {{detailInfo.saleAmount}}</text>
<text>剩余 {{goodsStock}}</text><text class="line">|</text><text>销售 {{detailInfo.saleAmount}}</text>
</view>
</view>
<view class="goods-title"><text wx:if="{{detailInfo.goodsSource == 1}}">{{detailInfo.brandName}}</text>{{detailInfo.goodsSkuName}}</view>
......@@ -55,8 +54,8 @@
<view class="flex">
<view class="title">已选</view>
<view class="content flex_ccc">
<view wx:if="{{detailInfo.goodsSource == 1}}">{{skuInfo}}</view>
<view wx:else>{{activeSku}}</view>
<view class="text" wx:if="{{detailInfo.goodsSource == 1}}">{{skuInfo}}</view>
<view class="text" wx:else>{{activeSku}}</view>
</view>
</view>
<mp-icon icon="arrow" color="#B1B1B3" size="{{12}}"></mp-icon>
......
/* packageMine/pages/address/detail/detail.wxss */
@import '../index/index.scss';
page {
background: #F7F8FA;
}
.layout {
padding: var(--margin);
}
......@@ -93,6 +95,7 @@
padding-top: 26rpx;
}
.user-info .textarea .value{
padding-top: 4rpx;
height: 120rpx;
}
.default {
......
......@@ -79,6 +79,19 @@
.address-item .bottom .choose icon {
margin-right: 20rpx;
}
.nothing {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
color: #7A8299;
padding-top: 40rpx;
.icon {
width: 320rpx;
height: 300rpx;
margin-bottom: 20rpx;
}
}
.btn-box {
position: fixed;
bottom: 0;
......
<view class="layout">
<block wx:for="{{addressList}}" wx:key="index">
<view class="address-item" catchtap="chooseThis" data-item="{{item}}">
<view class="top">
<view class="info">
<view class="user">
<text class="name">{{item.receiveName}}</text>
<text>{{item.receiveMobile}}</text>
<block wx:if="{{addressList.length}}">
<block wx:for="{{addressList}}" wx:key="index">
<view class="address-item" catchtap="chooseThis" data-item="{{item}}">
<view class="top">
<view class="info">
<view class="user">
<text class="name">{{item.receiveName}}</text>
<text>{{item.receiveMobile}}</text>
</view>
<view class="address">{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.address}}</view>
</view>
<view class="address">{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.address}}</view>
</view>
<block wx:if="{{!isChooseAddress}}">
<view class="icon-box" catchtap="jump" data-item="{{item}}" data-edit data-id="{{item.id}}">
<view class="sprite-icon icon-address-edit">
<glsx-image src="/mine/edit-address.png"></glsx-image>
<block wx:if="{{!isChooseAddress}}">
<view class="icon-box" catchtap="jump" data-item="{{item}}" data-edit data-id="{{item.id}}">
<view class="sprite-icon icon-address-edit">
<glsx-image src="/mine/edit-address.png"></glsx-image>
</view>
</view>
</block>
</view>
<view class="bottom">
<view class="choose {{item.isDefault == 1?'default':''}}" catchtap="chooseDefault" data-item="{{item}}">
<icon type="{{item.isDefault == 1?'success':'circle'}}" size="32rpx" color="{{item.isDefault == 1?'#FB8A32':'#6E6E7A'}}"></icon>
默认地址
</view>
</block>
</view>
<view class="bottom">
<view class="choose {{item.isDefault == 1?'default':''}}" catchtap="chooseDefault" data-item="{{item}}">
<icon type="{{item.isDefault == 1?'success':'circle'}}" size="32rpx" color="{{item.isDefault == 1?'#FB8A32':'#6E6E7A'}}"></icon>
默认地址
<block wx:if="{{!isChooseAddress}}">
<view class="del" catchtap="del" data-item="{{item}}" data-id="{{item.id}}">删除</view>
</block>
</view>
<block wx:if="{{!isChooseAddress}}">
<view class="del" catchtap="del" data-item="{{item}}" data-id="{{item.id}}">删除</view>
</block>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="nothing">
<view class="icon">
<glsx-image webp src="/cart/nothing-icon.png" />
</view>
暂无收货地址
</view>
</block>
</view>
<view class="btn-box isFullSucreen">
<view class="btn text-center" bindtap="jump">新增收货地址</view>
......
......@@ -71,6 +71,8 @@ Page({
status,
button,
});
}).catch((err) => {
wx.p.sentry.reportError(`售后详情异常:${err.message}`, {...this.data,err});
})
.finally(() => {
wx.hideLoading();
......@@ -123,14 +125,19 @@ Page({
tab: ORDER_STATUS[OrderStatusEnum.COMPLETED],
});
}
}).catch((err) => {
wx.p.sentry.reportError(`撤销售后:${err.message}`, {...this.data.orderInfo,err});
});
}
})
.catch(() => {
.catch((err) => {
wx.p.sentry.reportError(`撤销售后Modal:${err.message}`, {...this.data.orderInfo,err});
wx.p.wxApi.showToast("已取消");
})
.finally(() => {
wx.hideLoading();
setTimeout(() => {
wx.hideLoading();
}, 500);
});
},
previewImage(e) {
......
......@@ -64,7 +64,9 @@ Component({
}
})
.finally(() => {
wx.p.wxApi.hideLoading();
setTimeout(() => {
wx.p.wxApi.hideLoading();
}, 500);
});
},
onExpressNoInput(e) {
......
......@@ -8,7 +8,7 @@
}
.text-box {
padding: 32rpx 24rpx;
padding: 32rpx;
/* border-bottom: 2rpx solid #eff0f2; */
}
......@@ -33,21 +33,49 @@
color: #707071;
padding: 4rpx 18rpx;
}
.item {
margin-bottom: 12rpx;
display: flex;
align-items: flex-start;
margin-bottom: 20rpx;
.label {
flex-shrink: 0;
width: auto;
min-width: fit-content;
color: #333;
font-size: 28rpx;
margin-right: 20rpx;
}
.value {
flex: 1;
color: #656566;
font-size: 28rpx;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
line-height: 1.4;
}
&:last-child {
margin-bottom: 0;
}
}
.item .label {
width: 200rpx;
}
.item .value {
color: #656566;
width: calc(100% - 150rpx);
}
// .item {
// margin-bottom: 12rpx;
// display: flex;
// align-items: flex-start;
// }
// .item .label {
// min-width: 100rpx;
// }
// .item .value {
// color: #656566;
// // min-width: calc(100% - 100rpx);
// word-wrap: break-word;
// word-break: break-word;
// white-space: normal;
// }
.item .value.icon {
display: flex;
......
......@@ -8,7 +8,7 @@
<view class="item">
<view class="label">{{item.title}}:</view>
<view class="value">
<view>{{orderInfo.sendbackAddressModel[item.key]||'-'}}</view>
{{orderInfo.sendbackAddressModel[item.key]||'-'}}
</view>
</view>
</block>
......
......@@ -152,6 +152,7 @@ Component({
*/
processExpressInfo(expressInfo) {
if (!expressInfo || typeof expressInfo !== "object") {
wx.p.sentry.reportError(`快递信息异常:expressInfo参数无效`, {expressInfo});
console.warn("Express组件: expressInfo参数无效");
return;
}
......@@ -160,6 +161,7 @@ Component({
// 验证必要字段
if (typeof logisticsStatus !== "number") {
wx.p.sentry.reportError(`快递信息异常:logisticsStatus字段无效`, {expressInfo});
console.warn("Express组件: logisticsStatus字段无效");
return;
}
......
......@@ -20,4 +20,7 @@
.item .value {
width: calc(100% - 128rpx);
word-wrap: break-word;
word-break: break-word;
white-space: normal;
}
......@@ -37,6 +37,8 @@ Page({
this.setData({
expressInfo: data,
});
}).catch((err) => {
wx.p.sentry.reportError(`查询物流异常:${err.message}`, {subOrderCode,err});
});
},
getOrderDetail(subOrderCode) {
......@@ -68,6 +70,8 @@ Page({
},
});
}
}).catch((err) => {
wx.p.sentry.reportError(`订单详情异常:${err.message}`, {subOrderCode,err});
})
.finally(() => {
wx.hideLoading();
......
......@@ -2,7 +2,7 @@
<block>
<view class="goods">
<view class="icon">
<image webp src="{{item.goodsImageUrl}}"></image>
<glsx-image src="{{item.goodsImageUrl}}" mode="aspectFill" lazy-load></glsx-image>
</view>
<view class="info">
<view class="info-top">
......
......@@ -175,6 +175,8 @@ Page({
list,
listFlag: true,
});
}).catch((err) => {
wx.p.sentry.reportError(`订单列表异常:${err.message}`, {...obj,err});
})
.finally(() => {
wx.hideLoading();
......
......@@ -46,7 +46,7 @@ Page({
// })
},
goAgreement() {
wx.p.router.jumpH5('https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/hmd/privacy.html', true)
wx.p.router.jumpH5('https://img01.glsx.com.cn/weapp/resource/miniprogram/points-mall/html/privacy.html', true)
},
/**
* 生命周期函数--监听页面加载
......
......@@ -43,7 +43,7 @@ Page({
const {
name
} = e.currentTarget.dataset
wx.p.router.jumpH5(`https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/hmd/${name}.html`, true)
wx.p.router.jumpH5(`https://img01.glsx.com.cn/weapp/resource/miniprogram/points-mall/html/${name}.html`, true)
},
async onLoad() {
wx.p.wxApi.showLoading()
......@@ -143,6 +143,12 @@ Page({
if (!captcha) throw '请输入验证码'
if (!phoneRex.test(mobile)) throw '请输入正确的手机号'
wx.p.wxApi.showLoading()
if (!mobile || !captcha || !this.sessionId) {
wx.p.sentry.reportParamError(
'手机号验证码登录异常: mobile, captcha, sessionId',
{mobile, captcha, sessionId: this.sessionId}
)
}
const {
code,
data,
......@@ -177,6 +183,13 @@ Page({
iv: detail.iv,
sessionId: this.sessionId
}
let { encryptedData, iv, sessionId } = obj
if (!encryptedData || !iv || !sessionId) {
wx.p.sentry.reportParamError(
'授权手机号登录异常: encryptedData, iv, sessionId',
obj
)
}
const {
code,
data,
......@@ -202,6 +215,12 @@ Page({
getSource() {
let { loginData } = this.data
if (!loginData.phone) {
wx.p.sentry.reportParamError(
'获取积分渠道来源异常:staffPhone ',
loginData
)
}
commonApi.getPointsSourceList({
staffPhone: loginData?.phone
}).then(res => {
......@@ -227,6 +246,12 @@ Page({
this.getMerchantList(source, loginData)
},
getMerchantList(source, loginData) {
if (!loginData.phone || !source) {
wx.p.sentry.reportParamError(
'获取门店列表异常:staffPhone, channelSource',
{...loginData, channelSource: source}
)
}
commonApi.getMerchantData({staffPhone: loginData?.phone, channelSource: source}).then(res => {
let { code, data, message } = res
if (code == 0) {
......@@ -237,6 +262,12 @@ Page({
if (data?.length == 1) { // 仅有一个门店时跳过选择门店页面 直接登录成功
const { merchantId, merchantName } = data[0] || {}
wx.p.isLogin = true;
if (!source || !merchantId || !loginData.phone) {
wx.p.sentry.reportParamError(
'门店选择异常:staffPhone, channelSource',
{...loginData, channelSource: source, merchantId, merchantName}
)
}
wx.p.storage.set('userInfo', {
...loginData,
channelSource: source,
......
......@@ -33,15 +33,12 @@ page {
.item-box {
margin-bottom: 24rpx;
background: #FFFFFF;
border-radius: 8rpx;
border-radius: 24rpx;
padding-left: 24rpx;
}
.item-box.disabled {
opacity: .7;
}
.item-box .list {
border-top: 2rpx solid #EFF0F2;
}
.box .item {
width: 100%;
height: 208rpx;
......
......@@ -8,7 +8,7 @@
display: flex;
flex-direction: column;
height: 100%;
padding: 24rpx;
padding: 16rpx 24rpx 0;
}
.fixed-tabs, .dynamic-tabs {
......@@ -40,10 +40,6 @@
border-radius: 6rpx;
}
.dynamic-tabs {
margin-top: 10rpx;
}
.dynamic-tabs .tab-item{
display: inline-block;
padding: 10rpx 24rpx;
......
......@@ -59,6 +59,8 @@
}
.arrow-icon {
margin-left: 10rpx;
margin-bottom: 6rpx;
filter: drop-shadow(0.5px 0 0 #F4776D) drop-shadow(0 0.5px 0 #F4776D);
}
}
......@@ -103,20 +105,28 @@
flex-shrink: 0;
width: 80rpx;
height: 44rpx;
background: #FFF0ED;
border-radius: 12rpx;
margin-left: 8rpx;
position: relative;
display: flex;
align-items: center;
box-sizing: border-box;
justify-content: space-between;
padding-left: 10rpx;
text {
position: absolute;
top: 6rpx;
left: 10rpx;
font-size: 20rpx;
color: #F75454;
font-weight: 500;
}
.arrow-icon {
margin: 0 6rpx 6rpx;
filter: drop-shadow(0.5px 0 0 #F4776D) drop-shadow(0 0.5px 0 #F4776D);
}
}
}
.special-sale-box {
padding: 0 20rpx;
background: #F8F9FC;
.item {
width: 100%;
height: 340rpx;
......@@ -157,6 +167,7 @@
}
.goods-content {
box-sizing: border-box;
background: #F8F9FC;
.goods-box-title {
position: sticky;
top: 0;
......@@ -173,6 +184,7 @@
width: 100%;
box-sizing: border-box;
overflow: hidden;
margin-top: 8rpx;
.nothing {
text-align: center;
color: #7A8299;
......@@ -193,5 +205,4 @@
.sticky {
background: #F8F9FC;
padding: 10rpx 0;
}
......@@ -18,7 +18,7 @@
<view class="points-num" bind:tap="toIntegral">{{walletObj.currentScore || '-'}}</view>
</view>
<view class="arrow-icon">
<mp-icon icon="arrow" color="#F4776D" size="7"></mp-icon>
<mp-icon icon="arrow" color="#F4776D" size="8"></mp-icon>
</view>
</view>
</view>
......@@ -29,8 +29,8 @@
<view class="text" animation="{{animationData}}">郑重提醒:根据国家税务总局2025第16号公告,提现收入也将纳入个人累计收入计算税额,以上政策将于 10 月 1 日正式实施。</view>
</view>
<view class="detail-btn" bindtap="policyDetail">
<glsx-image src="/index/notice-arrow-right.png"></glsx-image>
<text>详情</text>
<mp-icon icon="arrow" class="arrow-icon" color="#F4776D" size="8"></mp-icon>
</view>
</view>
<!-- 专场 -->
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!