Commit a14426e8 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 1a0a7903 0185cd92
Showing 64 changed files with 1572 additions and 322 deletions
import api from '../request/http'
module.exports = {
/**查询购物车 */
getCartList(data) {
return api.post({
method: 'scrm.api.shopmall.points.shopping.car.get',
...data
})
},
/**加入购物车 */
addToCart(data) {
return api.post({
method: 'scrm.api.shopmall.points.shopping.car.add',
...data
})
},
/**购物车更新商品(将商品数量改为1) */
updateGoodsFormCart(data) {
return api.post({
method: 'scrm.api.shopmall.points.shopping.car.reduce',
...data
})
}
}
\ No newline at end of file
......@@ -35,4 +35,28 @@ module.exports = {
getImgVersion() {
return http.getMock();
},
/**手机号验证码登录 */
phoneSmsLogin() {
return http.fetch('scrm.api.sso.sms.login', {
source: 'MINIAPP',
...data
})
},
/**微信授权手机号登录 */
authPhoneLogin() {
return http.fetch('scrm.api.sso.weapp.auth.phone', {
source: 'MINIAPP',
...data
})
},
/**查询积分钱包开通状态 */
getPointsWalletStatus() {
return http.fetch('scrm.api.shopmall.pointswallet.get', {
...data
})
},
/**开通积分钱包 */
openPointsWallet() {
return http.fetch('scrm.api.shopmall.pointswallet.open', {...data})
}
};
import api from '../request/http'
module.exports = {
}
\ No newline at end of file
......@@ -57,7 +57,9 @@
"pages/integral/withdrawalSuccess/withdrawalSuccess",
"pages/SpecialSale/SpecialSale",
"pages/goodsDetail/index",
"pages/integral/withdrawalRules/withdrawalRules"
"pages/integral/withdrawalRules/withdrawalRules",
"pages/confirmOrder/index",
"pages/exchangeSuccess/index"
]
},
{
......@@ -87,7 +89,9 @@
"pages/coupon/center/center",
"pages/coupon/detail/detail",
"pages/coupon/recommend/recommend",
"pages/coupon/usedDetail/usedDetail"
"pages/coupon/usedDetail/usedDetail",
"pages/order/express/express",
"pages/order/components/Copy/Copy"
]
}
],
......
......@@ -31,9 +31,7 @@ Component({
)
},
jump(e) {
let { url } = e.currentTarget.dataset
if (url == 'home') wx.p.router.goHome()
else wx.p.router.go('/packageMall/pages/shoppingCart/shoppingCart')
wx.p.router.switchTab('/pages/tab/cart/index')
},
click(e) {
let { event } = e.currentTarget.dataset
......
......@@ -6,6 +6,7 @@
<view class="goods-action">
<view class="navigation-box">
<view class="item" wx:if="{{!hideShop}}" bindtap="jump">
<view v-if="{{true}}" class="goods-num">{{15}}</view>
<view class="sprite-icon" >
<glsx-image src="/index/goods-cart.png"></glsx-image>
</view>
......
......@@ -47,6 +47,20 @@
flex-direction: column;
align-items: center;
margin:0 14rpx;
position: relative;
}
.navigation-box .item .goods-num {
position: absolute;
top: -10rpx;
right: -16rpx;
height: 28rpx;
background: #F75454;
border: 1rpx solid #FFFFFF;
border-radius: 14rpx;
font-size: 18rpx;
color: #FFFFFF;
padding: 0 8rpx;
}
.navigation-box .sprite-icon{
width: 40rpx;
......
......@@ -37,7 +37,19 @@ Component({
only: {
type: Boolean,
value: true
}
},
showCloseButton: {
type: Boolean,
value: false
},
showFooter: {
type: Boolean,
value: true
},
headerColor: {
type: String,
value: ''
},
},
/**
......
......@@ -2,17 +2,18 @@
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content {{close?'close':''}}" style="height:{{height}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
<view class="popup-title text-center" style="background:{{headerColor}}">{{title}}
<view class="popup-close" wx:if="{{showCloseButton}}" bindtap="hidePopup">
<mp-icon icon="close2" color="#B1B1B3" size="20"></mp-icon>
</view>
</view>
</block>
<view class="popup-slot {{title?'':'notitle' }}">
<slot></slot>
</view>
<view class="popup-footer isFullSucreen" wx:if="{{only}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确定</view>
</view>
<view class="popup-footer isFullSucreen" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确定</view>
<view class="popup-footer isFullSucreen" wx:if="{{showFooter}}">
<view class="cancel btn text-center" wx:if="{{only}}" bindtap="hidePopup">取消</view>
<view class="confirm {{only?'btn':'doubtn'}} text-center" bindtap="confirm">确定</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -43,6 +43,18 @@
font-size: 32rpx;
color: #333333;
border-bottom: 2rpx solid #EBEDF0;
border-radius: 20rpx 20rpx 0 0;
position: relative;
}
.popup-close {
position: absolute;
right: 40rpx;
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.popup-slot {
......
/*可视化地呈现时间流信息*/
Component({
properties: {
list: {
// 时间轴列表
// 时间轴节点数据
nodes: {
type: Array,
value: [],
},
observer: function(newVal, oldVal) {
this.processNodes(newVal);
}
}
},
data: {
timeLineNodes: []
},
});
/**
* 组件内部方法
*/
methods: {
/**
* 预处理节点数据,添加样式类
* @param {Array} nodes - 节点数组
*/
processNodes(nodes) {
if (!nodes || !Array.isArray(nodes)) return;
const timeLineNodes = nodes.map(node => {
return {
...node,
dotClass: this.getNodeDotClass(node),
contentClass: this.getNodeContentClass(node)
};
});
this.setData({
timeLineNodes
});
},
/**
* 获取节点点的样式类
* @param {Object} item - 时间轴节点项
* @returns {String} 样式类名
*/
getNodeDotClass(item) {
// 直接根据节点属性返回对应的样式类
if (item.active) {
return 'timeline-node__dot timeline-node__dot--active';
} else if (item.type === 'special') {
return 'timeline-node__dot timeline-node__dot--spacial';
} else if (item.small) {
return 'timeline-node__dot timeline-node__dot--small';
} else {
return 'timeline-node__dot';
}
},
/**
* 获取节点内容的样式类
* @param {Object} item - 时间轴节点项
* @returns {String} 样式类名
*/
getNodeContentClass(item) {
// 非激活状态的内容使用灰色
if (item.type === 'special') {
return 'timeline-node__content--special';
}else if(item.active){
return 'active';
}
},
/**
* 判断是否显示节点点
* @param {Object} item - 时间轴节点项
* @returns {Boolean} 是否显示节点点
*/
shouldShowNodeDot(item) {
// 修复逻辑:所有节点默认都应该显示点
// 只有特定情况下才不显示
return true;
}
}
});
\ No newline at end of file
.box {
padding: 10rpx;
/* 时间轴容器 */
.timeline-container {
padding: 20rpx 0;
}
.one {
/* 时间轴节点 */
.timeline-node {
position: relative;
padding-bottom: 40rpx;
display: flex;
&:last-child {
padding-bottom: 0;
}
}
.onedot {
left: -2rpx;
/* 时间轴节点点容器 */
.timeline-node__dot-wrapper {
width: 36rpx;
display: flex;
justify-content: center;
align-items: flex-start;
flex-shrink: 0;
padding-top: 6rpx;
}
/* 时间轴节点点 */
.timeline-node__dot {
width: 20rpx;
height: 20rpx;
position: absolute;
background-color: #e8e8ea;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
&.highlight {
/* 激活状态的节点点 */
&.timeline-node__dot--active {
background-color: var(--btnColor);
}
&.tiny {
/* 小型节点点 */
&.timeline-node__dot--small {
width: 12rpx;
height: 12rpx;
}
/* 地址节点点 */
&.timeline-node__dot--spacial {
width: 12rpx;
height: 12rpx;
left: 2rpx;
}
}
.oneline {
/* 时间轴连接线 */
.timeline-node__line {
position: absolute;
left: 8rpx;
height: 100%;
border-left: 1rpx solid #f0f0f0;
top: 18rpx;
left: 18rpx;
height: calc(100% - 16rpx);
border-left: 1px solid #e8e8ea;
z-index: 0;
}
.onemain {
position: relative;
padding-left: 56rpx;
top: -6rpx;
.main {
display: flex;
align-items: center;
gap: 12rpx;
.title {
font-weight: 500;
font-size: 32rpx;
color: #282829;
}
.time {
font-weight: 400;
font-size: 24rpx;
color: #282829;
}
/* 时间轴内容 */
.timeline-node__content {
flex: 1;
padding-left: 20rpx;
color: #b1b1b3;
}
.timeline-node__content--special {
.timeline-node__title,
.timeline-node__tip {
font-weight: 400;
font-size: 24rpx;
}
.timeline-node__title {
color: #282829;
}
.timeline-node__tip {
color: #666666;
}
}
.onemaintitle {
/* 时间轴头部 */
.timeline-node__header {
display: flex;
margin-bottom: 16rpx;
margin-bottom: 16rpx;
padding-top: 8rpx;
color: #909399;
line-height: 1;
font-size: 26rpx;
align-items: center;
gap: 20rpx;
}
/* 时间轴标题 */
.timeline-node__title {
font-weight: 500;
font-size: 28rpx;
margin-bottom: 8rpx;
line-height: 1.4;
}
.tip {
/* 时间轴时间 */
.timeline-node__time {
font-weight: 400;
font-size: 24rpx;
color: #656566;
line-height: 1.4;
}
/* 时间轴提示信息 */
.timeline-node__tip {
font-weight: 400;
font-size: 24rpx;
line-height: 1.5;
}
.active {
.timeline-node__title {
color: #282829;
}
.timeline-node__time {
color: #909399;
}
.timeline-node__tip {
color: #656566;
}
}
<view class="box">
<view wx:for="{{list}}" wx:key="index" class="one">
<view class="onedot {{index==list.length-1?'highlight':''}} {{!item.status?'tiny':''}}"></view>
<view wx:if="{{index!=list.length-1}}" class="oneline"></view>
<view class="onemain ">
<view class="main">
<view class="title">{{item.status}}</view>
<view class="time">{{item.time}}</view>
</view>
<view class="tip" wx:for="{{item.tips}}" wx:for-item="tip">{{tip}}</view>
</view>
<!-- 时间轴组件 -->
<view class="timeline-container">
<view wx:for="{{timeLineNodes}}" wx:key="index" class="timeline-node">
<!-- 时间轴节点 -->
<view class="timeline-node__dot-wrapper">
<!-- 使用预处理的样式类 -->
<view class="{{item.dotClass}}"></view>
</view>
<!-- 时间轴连接线 -->
<view wx:if="{{index !== timeLineNodes.length - 1}}" class="timeline-node__line"></view>
<!-- 时间轴内容 -->
<view class="timeline-node__content {{item.contentClass}} ">
<view class="timeline-node__header">
<view wx:if="{{item.title}}" class="timeline-node__title">{{item.title}}</view>
<view wx:if="{{item.time}}" class="timeline-node__time">{{item.time}}</view>
</view>
<view wx:for="{{item.tips}}" wx:key="index" class="timeline-node__tip">
{{item}}
</view>
</view>
</view>
</view>
\ No newline at end of file
{
"navigationBarTitleText": "确认订单"
}
\ No newline at end of file
<view class="layout" style="padding-bottom:{{padding_bottom }}px">
<view class="box">
<block wx:if="{{addressFlag}}">
<block wx:if="{{shopFlag && shopCartFlag}}">
<view class="address-box">
<view class="ad-title">快递配送</view>
<view class="ad-box" bindtap="jump">
<block wx:if="{{contactInfo.contactAddress}}">
<view class="left">
<view class="top">
<view class="name text-hide">{{contactInfo.contactName}}</view>
<block wx:if="{{isDefault}}">
<view class="default text-center">默认地址</view>
</block>
<view class="phone">{{contactInfo.contactPhone}}</view>
</view>
<view class="bottom text-hide">{{contactInfo.contactAddress}}</view>
</view>
</block>
<block wx:else>
选择收货地址
</block>
<view class="right text-center">
<mp-icon icon="arrow" color="#B1B1B3" size="{{12}}"></mp-icon>
</view>
</view>
</view>
</block>
</block>
<view class="content-box">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="item">
<view class="content">
<view class="goods-info">
<view class="preview">
<image webp src="{{item.goodsImage}}"></image>
</view>
<view class="text">
<view class="name">
<view class="text-hide">
{{item.goodsName}}
</view>
<view class="text-hide description">{{item.specificationData || ''}}</view>
</view>
<view class="price-box">
<view class="price">
{{item.retailPrice}}
<text>积分</text>
</view>
<view class="goods-num">
x{{item.goodsNumber}}
</view>
</view>
</view>
</view>
</view>
</view>
</block>
</view>
<view class="all-box">
<view class="cell">
<view class="label">商品总价</view>
<view class="value">{{money || 0}}积分</view>
</view>
<view class="cell">
<view class="label">运费</view>
<view class="value">{{expressFee || '包邮'}}</view>
</view>
<view class="all-item">
<text>合计</text>
<view class="price">{{money || 0}}<text>积分</text></view>
</view>
</view>
<view class="tips">
<text>当前积分</text>
{{1500}}
</view>
</view>
</view>
<block wx:if="{{addressFlag}}">
<goods-action bindready="goodsActionReady" custom>
<view class="goods-action">
<view class="left">
<view class="radio">
共{{goodsNumber}}件,合计:
</view>
<view class="total">
<view class="price">
{{money|| 0}}
<text>积分</text>
</view>
</view>
</view>
<view class="btn text-center {{money > 1500 ? 'disabled' : ''}}" bindtap="checkOut">立即兑换</view>
</view>
</goods-action>
</block>
<Dialog show="{{ showModal }}" mask="true" bindbuttontap="dialogConfirm" buttons="{{buttons}}" title="积分兑换">
<view class="suggest-box">
<view>您当前总积分为<text>{{400}}</text>积分</view>
<view>确认使用<text>{{400}}</text>积分兑换该商品</view>
</view>
</Dialog>
\ No newline at end of file
/* packageMall/pages/pay/pay.wxss */
.layout {
background: #F7F8FA;
padding: 24rpx 32rpx;
}
.address-box {
padding: 20rpx 24rpx;
background-color: #fff;
border-radius: 24rpx;
box-sizing: border-box;
margin-bottom: 24rpx;
}
.address-box .ad-title {
border-bottom: 2rpx solid #EFF0F2;
padding-bottom: 20rpx;
}
.address-box .ad-box {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 0 0;
}
.address-box .left {
width: 580rpx;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
padding-left: 8rpx;
color: #282829;
}
.address-box .left .top {
display: flex;
align-items: center;
}
.address-box .default {
width: 120rpx;
height: 40rpx;
font-size: 24rpx;
color: #fff;
background-color: #F75454;
border-radius: 4rpx;
margin: 0 20rpx;
flex-shrink: 0;
}
.address-box .bottom{
color: #B1B1B3;
}
.address-box .phone {
margin-left: auto;
}
.address-box .right {
width: calc(100% - 580rpx);
justify-content: flex-end;
}
.address-box .right .icon {
width: 16rpx;
height: 28rpx;
}
.content-box{
padding: 24rpx;
background-color: #fff;
border-radius: 8px;
}
.box .item .content .goods-info {
width: 100%;
display: flex;
}
.box .item .content .goods-info .preview {
flex-shrink: 0;
margin-right: 20rpx;
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
overflow: hidden;
}
.box .item .content .goods-info .text {
flex-shrink: 0;
width: calc(100% - 180rpx);
}
.box .item .content .goods-info .text .price-box {
display: flex;
justify-content: space-between;
margin-top: 16rpx;
}
.box .item .content .goods-info .text .price-box .price {
color: #FC5B32;
font-size: 40rpx;
font-weight: 600;
}
.box .item .content .goods-info .text .price-box .price text {
font-size: 20rpx;
font-weight: 500;
}
.box .item .content .goods-info .text .price-box .goods-num {
height: 36rpx;
padding: 0 16rpx;
background: #FFFFFF;
border: 1rpx solid #DCDFE6;
border-radius: 20rpx;
}
.all-box {
margin-top: 24rpx;
padding: 0 24rpx;
background-image: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
border-radius: 24rpx;
}
.all-box .cell {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #EFF0F2;
height: 100rpx;
}
.all-box .cell .label {
color: #666666;
}
.all-box .cell .value {
color: #282829;
}
.all-box .all-item {
text-align: right;
height: 100rpx;
line-height: 100rpx;
}
.all-box .all-item .price {
display: inline-block;
color: #FC5B32;
font-size: 48rpx;
font-weight: 600;
margin-left: 16rpx;
}
.all-box .all-item .price text {
font-weight: 500;
font-size: 24rpx;
margin-left: 4rpx;
}
.text .description {
font-size: 24rpx;
margin-top: 4rpx;
color: #B1B1B3;
}
.tips {
color: #888888;
margin: 20rpx 24rpx;
}
.tips .price {
font-size: 36rpx;
color: var(--btnColor);
font-weight: 500;
}
.goods-action {
padding: 10rpx 24rpx;
box-sizing: border-box;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.goods-action .btn {
width: 280rpx;
height: 80rpx;
color: #FFFFFF;
background: #FB8A32;
border-radius: 16rpx;
font-weight: 500;
padding: 0 !important;
margin: 0 !important;
font-size: 28rpx;
}
.goods-action .btn.disabled {
opacity: 0.3;
background: #FB8A32;
}
.goods-action .left {
width: calc(100% - 300rpx);
font-size: 24rpx;
display: flex;
align-items: baseline;
}
.goods-action .total .price {
color: #FC5B32;
font-size: 48rpx;
display: flex;
align-items: baseline;
font-weight: 600;
}
.goods-action .total .price text {
font-size: 24rpx;
font-weight: 400;
margin-left: 4rpx;
}
.suggest-box text{
color: #FC5B32;
}
.btn_primary {
color: #FC5B32;
}
\ No newline at end of file
// packageIndex/pages/exchangeSuccess/index.js
Page({
/**
* 页面的初始数据
*/
data: {
count: 5,
paramsData: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.p.router.getRouterParams(options).then(params => {
params = {
orderCode: '22232'
}
this.countdown(params.orderCode)
this.setData({
paramsData: params
})
}).catch(err => {
console.error('参数获取失败:', err)
})
},
countdown(orderCode) {
this.timer = setInterval(() => {
let { count } = this.data
if (count == 0) {
clearInterval(this.timer)
// wx.p.router.reLaunch('/packageMine/pages/order/detail/detail', {orderCode})
return
}
this.setData({
count: --count
})
}, 1 * 1000)
},
viewOrderDetail() {
let { paramsData } = this.data
wx.p.router.reLaunch('/packageMine/pages/order/detail/detail', {orderCode: paramsData.orderCode})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageIndex/pages/exchangeSuccess/index.wxss */
.container {
width: 100%;
height: 100vh;
background: #ffffff;
display: flex;
align-items: center;
flex-direction: column;
.icon {
width: 136rpx;
height: 136rpx;
margin: 168rpx 0 48rpx;
}
.title {
font-size: 40rpx;
font-weight: 600;
color: #292D33;
}
.text {
font-size: 28rpx;
color: #7A8299;
margin-top: 24rpx;
}
.btn {
background: #FB8A32;
border-radius: 16rpx;
color: #FFFFFF;
font-weight: 500;
font-size: 32rpx;
margin: 280rpx 0 16rpx;
}
.tips {
font-size: 22rpx;
color: #B9BABB;
}
}
\ No newline at end of file
<!--packageIndex/pages/exchangeSuccess/index.wxml-->
<view class="container">
<view class="icon">
<glsx-image src="/status/success.png"></glsx-image>
</view>
<view class="title">兑换成功</view>
<block>
<view class="text">您的订单已兑换成功,请耐心等待商品发货!</view>
<button class="btn" bindtap="viewOrderDetail">查看订单</button>
<view class="tips">{{count}}秒后自动跳转到订单详情页面</view>
</block>
</view>
\ No newline at end of file
import { shopmallApi } from '~/api/api'
// import { shopmallApi } from '~/api/api'
Component({
/**
* 组件的属性列表
......@@ -39,14 +39,22 @@ Component({
// this.triggerEvent('getAddress', { addressInfo: this.data.addressInfo })
this.cancel()
},
comfirm(e) {
addNew () {
let { url } = e.currentTarget.dataset
wx.$router.go(url,{
wx.p.router.go(url,{
platform:true,
staff:this.data.staff,
notIntercept:this.data.staff
})
// this.cancel()
},
// 确认
confirm(e) {
let { address } = this.data
const item = address?.find(val => val.active == true)
if (!item || !Object.keys(item)?.length) return wx.p.wxApi.showToast('请选择收货地址')
const contactAddress = item.provinceName+item.cityName+item.countyName+item.address
this.triggerEvent('getAddress', {defaultAddress:item,contactAddress})
this.cancel()
},
cancel() {
this.setData({
......@@ -55,9 +63,12 @@ Component({
},
toSelect(e) {
const { item } = e.currentTarget.dataset
const contactAddress = item.provinceName+item.cityName+item.countyName+item.address
this.triggerEvent('getAddress', {defaultAddress:item,contactAddress})
this.cancel()
let { address } = this.data
address?.forEach(val => {
val.active = false
if (item.id == val.id) val.active = true
})
this.setData({address})
},
addressList() {
let para = {}
......@@ -75,8 +86,8 @@ Component({
},
lifetimes: {
attached: function () {
wx.$eventbus.on('REFRESH_PLATFORM_ADDRESS',()=>{
this.addressList()
wx.p.eventbus.on('REFRESH_PLATFORM_ADDRESS',()=>{
// this.addressList()
})
},
},
......
......@@ -25,12 +25,11 @@
height: 80%;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 20rpx 20rpx 0 0;
border-radius: 32rpx 32rpx 0 0;
left: 0;
bottom: 0;
animation: show-sku-box .5s forwards;
z-index: 2;
padding: 44rpx 40rpx;
}
}
......@@ -54,10 +53,9 @@
}
.list-pannel {
height: 868rpx;
height: calc(100% - 260rpx);
.scroll {
height: 868rpx;
height: 100%;
}
.cell {
......@@ -66,14 +64,10 @@
box-sizing: border-box;
padding: 32rpx 40rpx;
position: relative;
.check-box {
margin-right: 20rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 24rpx;
}
.content-box {
......@@ -89,11 +83,14 @@
font-weight: 400;
font-size: 28rpx;
color: #333435;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-height: 44rpx;
margin: 4rpx 0 10rpx 0;
margin: 4rpx 0 8rpx 0;
}
.default-tip {
......@@ -129,14 +126,19 @@
padding: 0 32rpx;
.btn {
width: 100%;
width: calc(50% - 7rpx);
height: 80rpx;
background: #ffffff0f;
border: 2rpx solid #FC5B32;
border-radius: 8rpx;
border: 2rpx solid #FB8A32;
border-radius: 20rpx;
font-weight: 500;
font-size: 28rpx;
color: #EE7A31;
color: #FB8A32;
margin-right: 17rpx;
}
.confirm_btn {
background: #FB8A32;
color: #FFFFFF;
}
}
......
......@@ -3,30 +3,31 @@
<view class="address-bg" bindtap="cancel"></view>
<view class="container">
<view class="headeer flex_sbc">
<!-- <glsx-image bind:tap="back" webp class="icon" src="glsx/equity/version/3_9_0/back-icon.png"></glsx-image> -->
<view></view>
<view class="title">选择收货地址</view>
<glsx-image bind:tap="cancel" webp class="icon" src="glsx/equity/version/3_9_0/close-icon.png"></glsx-image>
<glsx-image bind:tap="cancel" class="icon" src="/index/back.png"></glsx-image>
<view class="title">选择收货地址</view>
<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}}">
<block wx:for="{{address}}" wx:key="index">
<view bind:tap="toSelect" data-item="{{item}}" data-index="{{index}}" class="cell">
<view class="check-box">
<glsx-image webp class="icon" src="glsx/equity/version/3_9_0/{{currentIndex==index?'select-icon-active':'select-icon'}}.png"></glsx-image>
</view>
<view class="content-box">
<view class="name-phone">{{item.receiveName}} {{item.receiveMobile}}</view>
<view class="address">{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.address}}</view>
<view wx:if="{{item.isDefault==1}}" class="default-tip flex_cc">默认地址</view>
</view>
<view class="line"></view>
</view>
</block>
<block wx:for="{{address}}" wx:key="index">
<view bind:tap="toSelect" data-item="{{item}}" data-index="{{index}}" class="cell">
<view class="icon">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
</view>
<view class="content-box">
<view class="name-phone">{{item.receiveName}} {{item.receiveMobile}}</view>
<view class="address">{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.address}}</view>
<view wx:if="{{item.isDefault==1}}" class="default-tip flex_cc">默认地址</view>
</view>
<view class="line"></view>
</view>
</block>
</scroll-view>
</view>
<view class="footer flex_cc">
<view bind:tap="comfirm" data-url="/packageShopmall/packageMine/pages/address/detail/detail" class="btn flex_cc">新增地址</view>
<view bind:tap="addNew" data-url="/packageShopmall/packageMine/pages/address/detail/detail" class="btn flex_cc">新增地址</view>
<view bind:tap="confirm" class="btn confirm_btn flex_cc">确认</view>
</view>
</view>
</view>
......@@ -48,7 +48,6 @@ Component({
})
},
toShowAddressModal() {
console.log('222')
this.setData({
showAddress: true
})
......@@ -66,8 +65,8 @@ Component({
})
},
toCreatedOrder() {
const userInfo = wx.$util.getUserInfo()
const userStorage = wx.$storage.get("userInfo");
// const userInfo = wx.p.util.getUserInfo()
// const userStorage = wx.$storage.get("userInfo");
const { remain, goods, goodsNumber, defaultAddress,staffShop } = this.data
if(!defaultAddress.receiveName){
return wx.$api.showToast('请选择收货地址')
......@@ -95,7 +94,7 @@ Component({
shopmallApi[HTTPNAME](params).then(res => {
if(staffShop&&!goods.salePrice){
wx.hideLoading();
wx.$router.reLaunch('/packageStoreAssistant/packageMine/pages/ShopPaySuccess/index')
wx.p.router.reLaunch('/packageStoreAssistant/packageMine/pages/ShopPaySuccess/index')
return
}
if (res) this.toPayOrder(res.orderCode)
......@@ -116,7 +115,7 @@ Component({
paySign: paySign,
success() {
const URL = staffShop?'/packageStoreAssistant/packageMine/pages/ShopPaySuccess/index':'/packageShopmall/packageMine/pages/order/complete/complete'
wx.$router.reLaunch(URL, {
wx.p.router.reLaunch(URL, {
success: true,
})
},
......@@ -128,18 +127,20 @@ Component({
})
}
if(staffShop){
wx.$eventbus.emit('REFRESH_WITHDRALWAL')
wx.p.eventbus.emit('REFRESH_WITHDRALWAL')
}
})
},
// 检查登录状态
async checkLoginStatus() {
this.toCreatedOrder()
return
if(this.data.staffShop){
this.setData({showJfModal:true})
return
}
const sessionId = wx.$util.getSessionId(),
userInfo = wx.$util.getUserInfo() || null;
const sessionId = wx.p.util.getSessionId(),
userInfo = wx.p.util.getUserInfo() || null;
if ((userInfo && !userInfo.phone) || !userInfo) return this.reLogin()
if (sessionId) {
const {
......
......@@ -41,7 +41,7 @@
<view bind:tap="toShowAddressModal" class="adress-box flex_scb">
<view class="title">收货地址</view>
<view class="right flex_scb">
<view class=" content {{defaultAds?'':'emptyText'}}">{{defaultAds || '请选择'}}</view>
<view class="content {{defaultAds?'':'emptyText'}}">{{defaultAds || '请选择'}}</view>
<mp-icon icon="arrow" bind:tap="showSkuModal" color="#B1B1B3" size="{{10}}"></mp-icon>
</view>
</view>
......@@ -52,5 +52,4 @@
<view style="height:290rpx"></view>
</view>
</view>
<address wx:if="{{showAddress}}" staff="{{staffShop}}" address="{{address}}" idIndex="{{defaultAddress.id}}" bind:getAddress="getAddress" show="{{showAddress}}"></address>
<!-- <jf-modal bind:comfirmOrder="toCreatedOrder" count="{{jfCount || goods.redeemPoints}}" show="{{showJfModal}}"></jf-modal> -->
<address staff="{{staffShop}}" address="{{address}}" idIndex="{{defaultAddress.id}}" bind:getAddress="getAddress" show="{{showAddress}}"></address>
const navStyle = 'background-color: transparent;'
let navBarHeight = 38
import mallApi from '~/api/module/mall.js'
import cartApi from '~/api/module/cart.js'
// import { mineApi, shopmallApi } from '~/api/api'
// import MineApi from '~/api/mineApi/index'
// import NP from 'number-precision'
......@@ -22,16 +24,190 @@ Page({
isCarOwner: false,
payWayActions: [{ name: '金额支付', type: 1, disabled: false }, { name: '积分兑换', type: 2, disabled: false }],
detailInfo: {
pointsPrice: 25,
marketPrice: 30,
imageResponses: [{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/index/index-bg.png'
}],
saleNum: 600,
remaining: 56,
goodsName: '九阳保温饭盒焖烧杯九阳保温饭盒焖烧杯九阳保温饭盒焖烧杯九阳',
goodsDescribe: '<figure class="image"><img src="https://img.yunzhonghe.com/image/1592793907468wHVTWiUHIc.png"></figure>'
}
"id" : 267,
"goodsSkuCode" : "2888888889071442",
"goodsSkuName" : "系统商品009 鹅黄 28寸",
"goodsSkuTitle" : "",
"firstCategoryName" : "箱包",
"secondCategoryName" : "功能箱包",
"lastCategoryName" : "拉杆箱",
"goodsStock" : 695,
"salePrice" : 0.00,
"redeemPoints" : 40,
"sellPrice" : 150.00,
"marketPrice" : 700.00,
"startQty" : 1,
"brandName" : "膳魔师",
"returnGoodsRules" : 1001,
"goodsCharacteristic" : "系统商品009",
"goodsUnit" : "",
"modelNumber" : "系统商品009",
"productPlace" : "",
"haveShelfLife" : 0,
"shelfLife" : "0",
"fragileGoods" : 0,
"grossWeight" : 0.0000,
"grossWeightUnit" : "kg",
"density" : 0.0000,
"extent" : 0,
"width" : 0,
"height" : 0,
"attributeResponses" : [ {
"attributeCode" : "1001",
"attributeName" : "锁具类型",
"attributeValueCode" : "2888888888892503",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "990",
"attributeName" : "拉杆种类",
"attributeValueCode" : "2888888888892497",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "995",
"attributeName" : "闭合方式",
"attributeValueCode" : "2888888888892500",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "992",
"attributeName" : "适用场景",
"attributeValueCode" : "2888888888892498",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "1003",
"attributeName" : "轮子种类",
"attributeValueCode" : "2888888888892505",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "997",
"attributeName" : "类别",
"attributeValueCode" : "2888888888892502",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "989",
"attributeName" : "商品产地",
"attributeValueCode" : "345",
"attributeValueName" : "中国"
}, {
"attributeCode" : "994",
"attributeName" : "适用性别",
"attributeValueCode" : "349",
"attributeValueName" : "女"
}, {
"attributeCode" : "1002",
"attributeName" : "适用人群",
"attributeValueCode" : "2888888888892504",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "991",
"attributeName" : "是否带锁",
"attributeValueCode" : "348",
"attributeValueName" : "是"
}, {
"attributeCode" : "996",
"attributeName" : "箱包硬度",
"attributeValueCode" : "2888888888892501",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "987",
"attributeName" : "商品毛重",
"attributeValueCode" : "2888888888892496",
"attributeValueName" : "系统商品009"
}, {
"attributeCode" : "993",
"attributeName" : "材质",
"attributeValueCode" : "2888888888892499",
"attributeValueName" : "系统商品009"
} ],
"imageResponses" : [ {
"imgUrl" : "https://img.yunzhonghe.com/image/1618215408263PefyXSUtQW.jpg",
"imgMain" : 1,
"imgSort" : 0
}, {
"imgUrl" : "https://img.yunzhonghe.com/image/1618215556741tYVyESRNzw.jpg",
"imgMain" : 0,
"imgSort" : 1
} ],
"specificationResponses" : [ {
"specName" : "颜色",
"specValue" : "鹅黄"
}, {
"specName" : "选择尺寸",
"specValue" : "28寸"
} ],
"goodsDescribe" : "<p>22</p>",
"goodsPosition" : 2,
"saleFlag" : 1,
"shelvesStatus" : 1001,
"retailPrice" : null,
"exchangeIntegralFlag" : null,
"exchangeIntegral" : null,
"merchantId" : null,
"merchantName" : null
},
addressList: [{
id: 1,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 1
}, {
id: 2,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 0
}, {
id: 3,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 0
}, {
id: 4,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 0
}, {
id: 5,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 0
}, {
id: 6,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 0
}, {
id: 7,
receiveName: '何瑶',
receiveMobile: '15044526870',
provinceName: '广东省',
cityName: '深圳市',
countyName: '南山区',
address: '南山智园崇文园区1号楼14层',
isDefault: 0
}]
},
appHide() {
wx.offAppHide()
......@@ -73,7 +249,6 @@ Page({
// this.getPlatFormAddress(staff)
},
showSkuModal(type) {
console.log('111')
// if (this.data.isCarOwner) return
this.setData({
showSku: true,
......@@ -92,7 +267,7 @@ Page({
if (staff) {
para.businessType = 1
}else{
const SID = wx.$util.getSessionId()
const SID = wx.p.util.getSessionId()
if (!SID) return wx.hideLoading()
}
shopmallApi.platformAddressList(para).then(data => {
......@@ -122,7 +297,7 @@ Page({
},
jump(e) {
let { url, isChooseAddress } = e.currentTarget.dataset
wx.$router.go(url, {
wx.p.router.go(url, {
isChooseAddress,
platform: true,
staff: this.data.staffShop,
......@@ -130,7 +305,7 @@ Page({
})
},
back() {
wx.$router.back()
wx.p.router.back()
},
changeTab(e) {
if (this.data.opacity < 0.8) return
......@@ -208,8 +383,8 @@ Page({
PARAMS.cartType = 4
}
if(isCarOwner&&!detailInfo.retailPrice&&detailInfo.exchangeIntegral)return
shopmallApi.platformAddCar(PARAMS).then(res => {
wx.$api.showToast('添加成功!在购物车等亲~')
cartApi.addToCart(PARAMS).then(res => {
wx.$api.showToast('加入购物车成功')
})
},
// 同步选择的地址
......@@ -320,7 +495,7 @@ Page({
},
onShareAppMessage: function () {
const merchantId = wx.$storage.get('srcm_shopmall_merchant_id')
const userInfo = wx.$util.getUserInfo()
const userInfo = wx.p.util.getUserInfo()
let {
detailInfo,
isCarOwner
......
......@@ -123,7 +123,6 @@ page {
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
.flex {
width: 100%;
}
......@@ -133,11 +132,15 @@ page {
color: #707071;
}
.content {
width: calc(100% - 140rpx);
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
word-break: break-all;
width: 520rpx;
height: 44rpx;
.address-text {
width: 520rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
}
}
.flex_ccc {
display: flex;
......
......@@ -63,11 +63,11 @@
<view class="cell">
<view class="flex">
<view class="title">配送</view>
<view bindtap="jump" data-is-choose-address data-url="/packageShopmall/packageMine/pages/address/index/index" class="content flex_ccc">
<view bindtap="jump" data-is-choose-address data-url="/packageMine/pages/address/index/index" class="content flex_ccc">
<view class="address-text">{{contactAddress || '--'}}</view>
</view>
</view>
<mp-icon icon="arrow" color="#B1B1B3" size="{{12}}"></mp-icon>
<mp-icon icon="arrow" bindtap="jump" color="#B1B1B3" size="{{12}}"></mp-icon>
</view>
<view class="cell">
<view class="title">服务</view>
......@@ -115,5 +115,4 @@
<block wx:if="{{navHeight&&!staffShop}}">
<goods-action platformShop="{{true}}" bindready="goodsActionReady" pay-disabled="{{false}}" upgradeSet="{{!detailInfo.retailPrice&&detailInfo.exchangeIntegral}}" stock="{{detailInfo.goodsStock===0}}" buyFlag="{{false}}" bindclick="goodsActionClick" hideShop="{{false}}"></goods-action>
</block>
<sku staffShop="{{staffShop}}" canPay="{{canPay}}" bind:cancelSku="closeSku" bind:getCount="getCount" bind:sameAddress="resetAddress" wx:if="{{showSku}}" show="{{showSku}}" defaultAds="{{contactAddress}}" goods="{{detailInfo}}" defaultAddress="{{defaultAddress}}" address="{{addressList}}"></sku>
<glsx-privacy appletName="积分商城"></glsx-privacy>
\ No newline at end of file
<sku staffShop="{{staffShop}}" canPay="{{canPay}}" bind:cancelSku="closeSku" bind:getCount="getCount" bind:sameAddress="resetAddress" wx:if="{{showSku}}" show="{{showSku}}" defaultAds="{{contactAddress}}" goods="{{detailInfo}}" defaultAddress="{{defaultAddress}}" address="{{addressList}}"></sku>
\ No newline at end of file
{
"component": true,
"usingComponents": {
"mp-icon": "weui-miniprogram/icon/icon",
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet"
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet",
"Copy": "../../../components/Copy/Copy"
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<view class="text-box">
<view class="header">
<view class="title">商品寄回地址</view>
<view class="copy">复制</view>
<Copy />
</view>
<block wx:for="{{address}}" wx:key="index">
<view class="item">
......
// packageMine/pages/order/components/Copy/Copy.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"component": true,
"style": "v2"
}
.copy {
background: #e8e8ea;
border-radius: 18rpx;
font-weight: 400;
font-size: 22rpx;
color: #707071;
padding: 4rpx 18rpx;
}
\ No newline at end of file
<!--packageMine/pages/order/components/Copy/Copy.wxml-->
<view class="copy">复制</view>
\ No newline at end of file
......@@ -12,27 +12,38 @@ Component({
},
},
data: {
list: [
{
time: "",
tips: ["深圳市南山区南山智园崇文园区1号楼14层","何万瑞 15077226060"],
status:'address'
},
timelineData: [
{
time: "2021-02-02 10:30:30",
tips: ["这是主要内容部分这是主要内容部分这是主要内容部分这是主要内容部分这是主要内容部分"],
status:''
tips: ["这是主要内容部分"],
title: "已发货",
type: 'normal',
active: true // 高亮显示
},
{
time: "2021-02-02 10:30:30",
tips: ["这是主要内容部分这是主要内容部分这是主要内容部分这是主要内容部分"],
status:'已离开'
tips: ["这是主要内容部分"],
title:'运输中',
type: 'normal',
small: true, // 小点显示
active:false
},
{
time: "2021-02-02 10:30:30",
tips: ["这是主要内容部分这是主要内容部分这是主要内容部分这是主要内容部分"],
status:'已离开'
tips: ["这是主要内容部分11111111111",
"这是主要内容部分11111111111",
"这是主要内容部分11111111111"
],
title:'运输中',
type: 'normal',
small: false, // 小点显示
active:false
},
{
title:'收货地址',
tips: ["这是主要内容部分"],
type: 'special' // 地址节点,使用专门的样式
}
],
},
});
});
\ No newline at end of file
<view class="item">
<TimeLine list="{{list}}"/>
<TimeLine nodes="{{timelineData}}"/>
</view>
\ No newline at end of file
const { mockDeliveryInfoData } = require("./mock.js");
Component({
properties: {
showExpress: {
type: Boolean,
value: false,
},
expressInfo:{
type: Object,
value: {}
}
},
data: {
},
});
\ No newline at end of file
{
"component": true,
"usingComponents": {
"Express": "../Express/Express",
"Copy": "../Copy/Copy"
}
}
\ No newline at end of file
.popup-content {
padding: 0 32rpx;
.express-info {
display: flex;
justify-content: space-between;
height: 88rpx;
border-bottom: 1px solid #eff0f2;
.express-info-item {
display: flex;
gap: 6rpx;
align-items: center;
font-weight: 400;
font-size: 28rpx;
color: #333435;
.logo {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
overflow: hidden;
transform: translateY(1rpx);
}
}
}
}
<popup show="{{showExpress}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" title="物流详情" bindconfirm="onConfirmPopup">
<view class="popup-content">
<view class="express-info">
<view class="express-info-item">
<view class="logo">
<glsx-image src="{{expressInfo.logo||'https://picsum.photos/200/200'}}" />
</view>
<text>{{expressInfo.name||"顺丰快递"}}</text>
<text>{{expressInfo.number||'SF12222222222222'}}</text>
</view>
<view class="express-info-item">
<Copy />
</view>
</view>
<Express />
</view>
</popup>
\ No newline at end of file
const mockDeliveryInfoData = {
orderInfo: {
deliveryCompany: '深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层深圳广联赛讯有限公司',
deliveryNumber: 'SF1234567890',
deliveryStatus: 2
},
deliveryStatus: {
1: "待发货",
2: "已发货",
3: "已收货",
}
};
module.exports = {
mockDeliveryInfoData
};
\ No newline at end of file
......@@ -37,7 +37,7 @@
}
.order-bottom {
height: 64rpx;
padding: 30rpx;
padding-top: 24rpx;
border-top: 1rpx solid #f0f1f5;
margin-top: 35rpx;
}
......
......@@ -13,6 +13,7 @@ Page({
...mockOrderDetailData,
OrderStatus,
couponsList: [],
isShowExpressPop:false,
orderObj: [
{
label: "下单日期",
......@@ -137,4 +138,10 @@ Page({
qr: QR.createQrCodeImg(`t=1&c=${data}`),
});
},
showExpressPop(){
console.log("🚀 ~ showExpressPop ~ showExpressPop:")
this.setData({
isShowExpressPop: true,
});
}
});
......@@ -9,6 +9,7 @@
"OrderGoods": "./components/OrderGoods/OrderGoods",
"OrderAmount": "./components/OrderAmount/OrderAmount",
"content": "/packageMine/pages/order/index/components/Content/Content",
"Express": "./components/Express/Express"
"Express": "../components/Express/Express",
"Expresspop": "../components/ExpressPop/ExpressPop"
}
}
\ No newline at end of file
/* packageMine/pages/order/detail/detail.wxss */
.layout {
padding: 24rpx 32rpx 68rpx;
.express-box{
position: relative;
.express-detail{
position: absolute;
right: 24rpx;
top:10rpx;
color: var(--btnColor);
font-weight: 400;
font-size: 24rpx;
}
}
}
.status-box {
......
......@@ -7,7 +7,10 @@
<DeliveryInfo orderInfo="{{orderInfo}}" deliveryStatus="{{deliveryStatus}}"></DeliveryInfo>
</BlockBox>
<BlockBox>
<Express />
<view class="express-box" bindtap="showExpressPop">
<view class="express-detail" >物流详情 <mp-icon icon="arrow" color="var(--btnColor)" size="{{11}}"></mp-icon></view>
<Express />
</view>
</BlockBox>
<BlockBox>
<OrderInfo orderInfo="{{orderInfo}}" orderObj="{{orderObj}}" statusEnum="{{statusEnum}}"></OrderInfo>
......@@ -18,5 +21,6 @@
<BlockBox>
<OrderAmount orderInfo="{{orderInfo}}"></OrderAmount>
</BlockBox>
<Expresspop showExpress="{{isShowExpressPop}}"/>
</view>
</block>
\ No newline at end of file
// packageMine/pages/order/express/express.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageMine/pages/order/express/express.wxss */
\ No newline at end of file
<!--packageMine/pages/order/express/express.wxml-->
<text>packageMine/pages/order/express/express.wxml</text>
\ No newline at end of file
import { commonApi } from '~/api/module/common'
const phoneRex = /^[1]([3-9])[0-9]{9}$/
Page({
/**
......@@ -11,7 +12,13 @@ Page({
count: 0,
showChooseSource: false,
showEnableWallet: false,
showEnableSuccess: false
showEnableSuccess: false,
buttons: [{
text: '取消'
}, {
text: '同意',
extClass: 'btn_primary'
}]
},
changeLoginType() {
const {
......@@ -102,6 +109,22 @@ Page({
showTips(message) {
wx.p.wxApi.showToast(typeof message == 'string' ? message : '请同意以下用户协议')
},
showModal() {
this.setData({
showAgreeModal: true
})
},
dialogConfirm(e) {
let { value } = e.detail
this.setData({
showAgreeModal: false
})
if (value == 1) {
this.setData({
isAgree: true
})
}
},
/**手机号短信登录 */
async phoneLogin() {
const {
......@@ -109,17 +132,20 @@ Page({
captcha,
isAgree
} = this.data
if (!isAgree) {
return this.showModal()
}
try {
if (!mobile) throw '请输入手机号'
if (!captcha) throw '请输入验证码'
if (!phoneRex.test(mobile)) throw '请输入正确的手机号'
if (!isAgree) throw '请同意以下用户协议'
// if (!isAgree) throw '请同意以下用户协议'
wx.p.wxApi.showLoading()
const {
code,
data,
message
} = await wx.p.api.userApi.phoneLogin({
} = await commonApi.phoneSmsLogin({
mobile,
captcha,
sessionId: this.sessionId
......@@ -144,18 +170,18 @@ Page({
try {
if (detail.errMsg && ['authorized', 'deny'].findIndex(e => detail.errMsg.toLowerCase().includes(e)) != -1) return
if (!detail?.code) throw '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
if (!isAgree) throw '请同意以下用户协议'
// if (!isAgree) throw '请同意以下用户协议'
wx.p.wxApi.showLoading()
const {
code,
data,
message
} = await wx.p.api.userApi.authUserPhone(detail, this.sessionId)
} = await commonApi.authPhoneLogin(detail, this.sessionId)
wx.hideLoading()
if (code == '0') this.customerLoginCallBack(data)
else throw message
} catch (error) {
console.log(error)
console.log(error, '222222')
this.showTips(error || '服务不可用')
setTimeout(() => {
this.onLoad()
......
<view class="layout">
<view class="bg-top">
<glsx-image src="login/login-bg.png"></glsx-image>
<glsx-image src="/login/login-bg.png"></glsx-image>
</view>
<navigation-bar navStyle="background:transparent;" showBack page-title="登录"><text class="page-title">登录</text></navigation-bar>
<view class="content" style="margin-top: {{navHeight}}px;">
......@@ -10,11 +10,11 @@
欢迎使用积分商城小程序
</view>
<view class="login-img">
<glsx-image src="login/login-img.png"></glsx-image>
<glsx-image src="/login/login-img.png"></glsx-image>
</view>
<view class="wx-box">
<block wx:if="{{!isAgree}}">
<button class="wx-auth-button text-center {{isAgree}}" bindtap="showTips">微信登录</button>
<button class="wx-auth-button text-center {{isAgree}}" bindtap="showModal">微信登录</button>
</block>
<block wx:else>
<button open-type="getPhoneNumber" catchgetphonenumber="getPhoneNumber" class="wx-auth-button text-center">微信登录</button>
......@@ -42,14 +42,14 @@
</view>
<view class="type" bindtap="changeLoginType">
<view class="icon">
<glsx-image src="login/{{loginType == 0?'phone':'wx'}}.png"></glsx-image>
<glsx-image src="/login/{{loginType == 0?'phone':'wx'}}.png"></glsx-image>
</view>
{{loginType == 0?'手机号':'微信登录'}}
</view>
</view>
<view class="tips text-center" bindtap="handleChangeAgree">
<view class="check {{isAgree}}">
<glsx-image src="login/check.png" class="icon"></glsx-image>
<glsx-image src="/login/check.png" class="icon"></glsx-image>
</view>
我已阅读并同意
<text class="txt-orange" catchtap="handleAgree" data-name="privacy">《隐私协议》</text>
......@@ -58,6 +58,13 @@
</view>
</view>
<glsx-privacy appletName="积分商城"></glsx-privacy>
<Dialog show="{{ showAgreeModal }}" mask="true" bindbuttontap="dialogConfirm" buttons="{{buttons}}" title="隐私协议与用户协议">
<view class="suggest-box">
<view>为保障你的合法权益,请阅读并同意</view>
<text class="txt-orange" catchtap="handleAgree" data-name="privacy">《隐私协议》</text>
<text class="txt-orange" catchtap="handleAgree" data-name="agreement">《服务使用协议》</text>
</view>
</Dialog>
<!-- 积分来源选择 -->
<points-source show="{{showChooseSource}}" bindconfirm="pointSourceEvent"></points-source>
<!-- 开通钱包 -->
......
......@@ -25,7 +25,9 @@ page{
opacity: 1;
}
}
.btn_primary {
color: #FB8A32;
}
.h1 {
margin: 0 0 24rpx 80rpx;
......
......@@ -3,7 +3,7 @@
<view class="success-bg"></view>
<view class="success-content">
<view class="content-bg">
<glsx-image src="login/success-bg.png"></glsx-image>
<glsx-image src="/login/success-bg.png"></glsx-image>
</view>
<view class="content-box">
<view class="success-text">开通成功</view>
......
......@@ -3,15 +3,15 @@
<view class="wallet-bg"></view>
<view class="wallet-content">
<view class="content-bg">
<glsx-image src="login/wallet-bg.png"></glsx-image>
<glsx-image src="/login/wallet-bg.png"></glsx-image>
</view>
<view class="close" bindtap="closeWallet">
<glsx-image src="login/wallet-close.png"></glsx-image>
<glsx-image src="/login/wallet-close.png"></glsx-image>
</view>
<view class="content-box">
<view class="box-item" wx:for="{{stepDataArr}}" wx:key="index">
<view class="wallet-icon">
<glsx-image src="login/{{item.icon}}.png"></glsx-image>
<glsx-image src="/login/{{item.icon}}.png"></glsx-image>
</view>
<view>
<view class="label">{{item.label}}</view>
......
......@@ -19,12 +19,12 @@
<view class="source-item" wx:for="{{sourceArr}}" wx:key="index" bindtap="checkSource" data-target="{{item}}" style="color: {{item.color}};background-image: {{item.background}};">
<view>
<view class="source-icon">
<glsx-image src="login/{{item.icon}}.png"></glsx-image>
<glsx-image src="/login/{{item.icon}}.png"></glsx-image>
</view>
<view class="label">{{item.label}}</view>
</view>
<view class="item-check {{item.isChecked}}">
<glsx-image src="login/source-check.png" class="icon"></glsx-image>
<glsx-image src="/login/source-check.png" class="icon"></glsx-image>
</view>
</view>
</view>
......
import cartApi from '~/api/module/cart.js'
Page({
/**
* 页面的初始数据
*/
data: {
count: 0,
goodsList: [{
payeeMerchantId: 44184606,
payeeMerchantName: "广联嘀加平台超级管理员",
platform: false,
upgrade: false,
list: [{
activityId: null,
activityPrice: null,
cartType: 1,
deliveryType: 2,
flag: 2,
specificationData: '象牙白',
depositPrice: null,
expressFee: 10,
goodsId: 34,
......@@ -25,14 +28,63 @@ Page({
id: 355,
memberPrice: null,
paymentType: null,
retailPrice: "32.00",
retailPrice: "32",
retainagePrice: null,
specificationKey: null,
userMerchantId: null,
}, {
payeeMerchantId: 44184606,
payeeMerchantName: "广联嘀加平台超级管理员",
platform: false,
upgrade: false,
activityId: null,
activityPrice: null,
cartType: 1,
deliveryType: 2,
depositPrice: null,
expressFee: 10,
goodsId: 34,
goodsImage: "https://scrm.test.glsx.com.cn/group1/M00/00/3F/wKgD3mF3f--AEfHQAAC-XmaLhCs352.png",
goodsName: "贝得车载吸尘器(蓝色)",
goodsNumber: 1,
goodsSkuCode: null,
goodsSource: null,
goodsStock: 9975,
id: 356,
memberPrice: null,
paymentType: null,
retailPrice: "32",
retainagePrice: null,
specificationData: null,
specificationKey: null,
userMerchantId: null,
}]
}, {
payeeMerchantId: 44184606,
payeeMerchantName: "广联嘀加平台超级管理员",
platform: false,
upgrade: false,
activityId: null,
activityPrice: null,
cartType: 1,
deliveryType: 2,
depositPrice: null,
expressFee: 10,
goodsId: 34,
goodsImage: "https://scrm.test.glsx.com.cn/group1/M00/00/3F/wKgD3mF3f--AEfHQAAC-XmaLhCs352.png",
goodsName: "贝得车载吸尘器(蓝色)",
goodsNumber: 1,
goodsSkuCode: null,
goodsSource: null,
goodsStock: 9975,
id: 357,
memberPrice: null,
paymentType: null,
retailPrice: "32",
retainagePrice: null,
specificationData: '等方式尽快发',
specificationKey: null,
userMerchantId: null,
}],
chooseIndex: null,
shoppingcartFlag: true
},
goodsActionReady(e) {
......@@ -41,116 +93,100 @@ Page({
})
},
changeCount(e) {
console.log(e)
let count = e.detail
let {
index,
item,
ind
item
} = e.currentTarget.dataset
if (item.goodsNumber == count) return
let {
chooseIndex
} = this.data
this.setData({
[`goodsList[${index}].list[${ind}].goodsNumber`]: count
[`goodsList[${index}].goodsNumber`]: count
})
if (chooseIndex == index) this.cheackAll(index)
this.cheackAll()
wx.p.wxApi.showLoading('正在加载...')
let params = {
id: item.id,
goodsId: item.goodsId,
goodsNumber: count
let para = {
goodsId: 1,
sellQty: count,
goodsSource: target?.goodsSource,
scoreSource: 1
}
if (item.specificationKey) params.specificationKey = item.specificationKey
wx.p.api.shopmallApi.updateShoppingcart(params).then(res => {
cartApi.updateGoodsFormCart(para).then(res => {
wx.hideLoading()
})
},
choose(e) {
let {
index,
ind
index
} = e.currentTarget.dataset
let {
goodsList,
chooseIndex
goodsList
} = this.data
if (chooseIndex != null && chooseIndex != index) return
if (goodsList[index].list[ind].showDel) {
if (goodsList[index].showDel) {
this.hide(e)
return
}
this.setData({
[`goodsList[${index}].list[${ind}].active`]: !goodsList[index].list[ind].active
[`goodsList[${index}].active`]: !goodsList[index].active
})
this.cheackAll(index)
this.cheackAll()
},
cheackAll(index) {
cheackAll() {
let count = 0
let sum = 0
let {
goodsList
} = this.data
let allActive = true
try {
goodsList[index].list.map(e => {
if (!e.active) throw false
goodsList?.map(e => {
if (!e.active || e.flag) throw false
})
} catch (error) {
allActive = error
}
goodsList[index].list.map(e => {
goodsList?.map(e => {
if (e.active) {
count += e.goodsNumber
sum += e.retailPrice * e.goodsNumber
}
})
this.setData({
[`goodsList[${index}].active`]: allActive,
count,
sum: sum == 0 ? 0 : Number(sum).toFixed(2),
chooseIndex: count == 0 ? null : index
allActive: goodsList?.filter(item => item.flag == null).length == goodsList?.filter(val => val.active == true && val.flag == null)?.length
})
},
chooseAll(e) {
let {
index
} = e.currentTarget.dataset
let {
goodsList,
chooseIndex
allActive
} = this.data
if (chooseIndex != null && chooseIndex != index) return
let all = true
try {
goodsList[index].list.map(i => {
if (!i.active) throw false
goodsList?.map(val => {
if (!val.active || val.flag) throw false
})
} catch (error) {
goodsList[index].list.map(i => (i.active = true))
all = error
goodsList?.map(val => {
if (!val.flag) val.active = true
})
}
if (allActive) {
goodsList?.map((val, index) => {
val.active = false
})
}
if (all) goodsList[index].list.map(i => (i.active = false))
this.setData({
goodsList
goodsList,
allActive: !allActive
})
this.cheackAll(index)
this.cheackAll()
},
checkOut() {
let {
chooseIndex,
goodsList
} = this.data
let {
list,
payeeMerchantName,
} = goodsList[chooseIndex]
let data = []
list.map(e => (e.active ? data.push(e) : ''))
wx.p.router.go('/packageMall/pages/pay/pay', {
goodsList: data,
merchantName: payeeMerchantName
goodsList?.map(e => (e.active ? data.push(e) : ''))
wx.p.router.go('/packageIndex/pages/confirmOrder/index', {
goodsList: data
})
},
/**
......@@ -174,8 +210,7 @@ Page({
goodsList: data,
shoppingcartFlag: true,
count: 0,
sum: 0,
chooseIndex: null
sum: 0
})
wx.hideLoading()
})
......@@ -188,13 +223,15 @@ Page({
del(e) {
wx.p.wxApi.showLoading('请稍后...')
let {
id
target
} = e.target.dataset
let para = {
cartType: 1,
id
goodsId: 1,
sellQty: 0,
goodsSource: target?.goodsSource,
scoreSource: 1
}
wx.p.api.shopmallApi.delShoppingcart(para).then(res => {
cartApi.updateGoodsFormCart(para).then(res => {
wx.p.wxApi.showToast('删除成功')
setTimeout(() => {
this.getShoppingcartList()
......@@ -230,12 +267,11 @@ Page({
goodsList
} = this.data
let {
index,
ind
index
} = e.currentTarget.dataset
if (goodsList[index].list[ind].showDel)
if (goodsList[index].showDel)
this.setData({
[`goodsList[${index}].list[${ind}].showDel`]: false
[`goodsList[${index}].showDel`]: false
})
},
start(e) {
......@@ -262,7 +298,7 @@ Page({
let result = clientX < startX
if (Math.abs(angle) > 30) return
this.setData({
[`goodsList[${index}].list[${ind}].showDel`]: result
[`goodsList[${index}].showDel`]: result
})
}
})
\ No newline at end of file
......@@ -15,12 +15,12 @@ page {
color: #7A8299;
}
.nothing .icon {
margin: 0 auto 32rpx;
margin: 0 auto 20rpx;
width: 320rpx;
height: 300rpx;
}
.box {
padding: 24rpx var(--margin);
padding: 24rpx;
}
.item-box {
margin-bottom: 24rpx;
......@@ -29,19 +29,7 @@ page {
padding-left: 24rpx;
}
.item-box.disabled {
opacity: .5;
}
.item-box .top {
height: 80rpx;
display: flex;
align-items: center;
padding-right: 24rpx;
}
.item-box .top .icon {
margin-right: 18rpx;
}
.item-box .top .name {
width: calc(100% - 50rpx);
opacity: .7;
}
.item-box .list {
border-top: 2rpx solid #EFF0F2;
......@@ -50,7 +38,7 @@ page {
width: 100%;
height: 208rpx;
background: #FFFFFF;
border-radius: 8rpx;
border-radius: 24rpx;
margin-bottom: 24rpx;
overflow: hidden;
display: flex;
......@@ -70,7 +58,7 @@ page {
}
.box .item .content .icon,
.box .item .content .goods-info .preview {
margin-right: 20rpx;
margin-right: 24rpx;
}
.box .item .content .goods-info {
width: calc(100% - 60rpx);
......@@ -80,7 +68,7 @@ page {
.box .item .content .goods-info .preview {
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
border-radius: 16rpx;
overflow: hidden;
}
.box .item .content .goods-info .text {
......@@ -95,20 +83,34 @@ page {
align-items: baseline;
justify-content: space-between;
}
.invalid {
color: #F13C3D;
}
.invalid-icon {
width: 64rpx;
height: 32rpx;
background: #E6E7EA;
border-radius: 4rpx;
color: #6E6E7A;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
}
.box .item .content .goods-info .text .price-box .price {
color: var(--btnColor);
color: #FC5B32;
font-size: 36rpx;
display: flex;
align-items: baseline;
font-weight: 500;
font-weight: 700;
}
.box .item .content .goods-info .text .price-box .price .unit {
.box .item .content .goods-info .text .price-box .price text {
font-size: 24rpx;
font-weight: 400;
}
.box .item .del {
width: 112rpx;
height: 100%;
background: var(--themeColor);
background: #F75454;
transform: translateX(112rpx);
transition: all .5s;
color: #fff;
......@@ -118,19 +120,29 @@ page {
transform: translateX(0);
}
.goods-action {
padding: 10rpx var(--margin);
padding: 10rpx 24rpx;
box-sizing: border-box;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.goods-action .all-check {
display: flex;
align-items: center;
font-size: 24rpx;
height: 64rpx;
padding-top: 8rpx;
.icon {
margin-right: 8rpx;
}
}
.goods-action .btn {
width: 332rpx;
width: 280rpx;
height: 80rpx;
color: #FFFFFF;
background: var(--btnColor);
border-radius: var(--borderRadius);
background: #FB8A32;
border-radius: 16rpx;
font-weight: 500;
padding: 0 !important;
margin: 0 !important;
......@@ -143,20 +155,20 @@ page {
}
}
.goods-action .total {
width: calc(100% - 360rpx);
font-size: 24rpx;
display: flex;
align-items: baseline;
}
.goods-action .total .price {
color: var(--btnColor);
color: #FC5B32;
font-size: 40rpx;
display: flex;
align-items: baseline;
font-weight: 500;
font-weight: 700;
}
.goods-action .total .price .unit {
.goods-action .total .price text {
font-size: 24rpx;
font-weight: 400;
}
.specification {
font-size: 24rpx;
......
......@@ -13,45 +13,37 @@
<block wx:else>
<view class="box">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="item-box {{chooseIndex != null && chooseIndex != index?'disabled':''}}">
<view class="top" catchtap="chooseAll" data-index="{{index}}" >
<view class="icon text-center">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#8A303A':'#B1B1B3'}}" size="20">
</icon>
</view>
<view class="name text-hide">
{{item.payeeMerchantName}}
</view>
</view>
<view class="item-box {{item.flag?'disabled':''}}">
<view class="list">
<block wx:for="{{item.list}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="item {{i.showDel?'touch-move-active':''}}" data-index="{{index}}" data-ind="{{ind}}"
bindtouchstart="start" bindtouchmove="move">
<view class="content" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}">
<view class="icon">
<icon type="{{i.active?'success':'circle'}}" color="{{i.active?'#8A303A':'#B1B1B3'}}" size="20">
</icon>
<view class="item {{item.showDel?'touch-move-active':''}}" data-index="{{index}}" data-ind="{{ind}}"
bindtouchstart="start" bindtouchmove="move">
<view class="content" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}">
<view class="icon" wx:if="{{!item.flag}}">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
</view>
<view wx:else class="invalid-icon">失效</view>
<view class="goods-info">
<view class="preview">
<image webp src="{{item.goodsImage}}"></image>
</view>
<view class="goods-info">
<view class="preview">
<image webp src="{{i.goodsImage}}"></image>
</view>
<view class="text">
<view class="text-hide">{{i.goodsName}}</view>
<view class="specification" wx:if="{{i.specificationData}}">{{i.specificationData}}</view>
<view class="price-box">
<view class="price">
<text class="unit">¥</text>{{i.retailPrice || 0}}
</view>
<stepper count="{{i.goodsNumber}}" max="{{i.goodsStock}}" catchchange="changeCount"
data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}"></stepper>
<view class="text">
<view class="text-hide">{{item.goodsName}}</view>
<view class="specification" wx:if="{{item.specificationData}}">{{item.specificationData}}</view>
<view class="price-box" wx:if="{{!item.flag}}">
<view class="price">
{{item.retailPrice || 0}}
<text>积分</text>
</view>
<stepper count="{{item.goodsNumber}}" max="{{item.goodsStock}}" catchchange="changeCount"
data-index="{{index}}" data-item="{{item}}"></stepper>
</view>
<view wx:else class="invalid">该商品已下架/库存不足</view>
</view>
</view>
<view class="del text-center" catchtap="del" data-id="{{i.id}}">删除</view>
</view>
</block>
<view class="del text-center" catchtap="del" data-target="{{item}}">删除</view>
</view>
</view>
</view>
</block>
......@@ -62,9 +54,16 @@
<block wx:if="{{goodsList.length}}">
<goods-action bindready="goodsActionReady" custom>
<view class="goods-action">
<view class="all-check" bindtap="chooseAll">
<view class="icon">
<icon type="{{allActive?'success':'circle'}}" color="{{allActive?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
</view>
全选
</view>
<view class="total">合计:
<view class="price">
<text class="unit">¥</text>{{sum||0}}
<text>积分</text>{{sum||0}}
</view>
</view>
<button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count||0}})</button>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!