Compare commits
4 Commits
3566cca5f0
...
d148a32332
| Author | SHA1 | Date |
|---|---|---|
|
|
d148a32332 | |
|
|
e2fca080a9 | |
|
|
8e48e39b0b | |
|
|
0b31c3eb0a |
|
|
@ -1,15 +1,15 @@
|
||||||
APP_BASE_URL=http://47.103.169.154:8080/api/h5app/wxapp
|
APP_BASE_URL=https://test.birkenstock.net.cn/api/h5app/wxapp
|
||||||
APP_WEBSOCKET=wss://http://47.103.169.154:8080/ws
|
APP_WEBSOCKET=wss://test.birkenstock.net.cn/ws
|
||||||
APP_COMPANY_ID=1
|
APP_COMPANY_ID=1
|
||||||
APP_PLATFORM=standard
|
APP_PLATFORM=standard
|
||||||
APP_CUSTOM_SERVER=http://47.103.169.154:8081/
|
APP_CUSTOM_SERVER=https://test.birkenstock.net.cn/
|
||||||
APP_HOME_PAGE=/pages/index
|
APP_HOME_PAGE=/pages/index
|
||||||
APP_TRACK=youshu
|
APP_TRACK=youshu
|
||||||
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
||||||
# APP_ID=wx3e1c17c88abf3e45
|
# APP_ID=wx3e1c17c88abf3e45
|
||||||
APP_ID=wx55ff808ba0e28b1d
|
APP_ID=wx72e9e1a93420862c
|
||||||
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
||||||
APP_MAP_NAME=oneX新零售门店定位
|
APP_MAP_NAME=BIRKENSTOCK门店定位
|
||||||
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
||||||
APP_IMAGE_CDN_NEW=https://espier-oss-cdn.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
APP_IMAGE_CDN_NEW=https://ecx-brikenstock-image.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
||||||
APP_DIANWU_URL=
|
APP_DIANWU_URL=
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
APP_BASE_URL=https://test.birkenstock.net.cn/api/h5app/wxapp
|
|
||||||
APP_WEBSOCKET=wss://test.birkenstock.net.cn/ws
|
|
||||||
APP_COMPANY_ID=1
|
|
||||||
APP_PLATFORM=standard
|
|
||||||
APP_CUSTOM_SERVER=https://test.birkenstock.net.cn/
|
|
||||||
APP_HOME_PAGE=/pages/index
|
|
||||||
APP_TRACK=youshu
|
|
||||||
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
|
||||||
# APP_ID=wx3e1c17c88abf3e45
|
|
||||||
APP_ID=wx72e9e1a93420862c
|
|
||||||
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
|
||||||
APP_MAP_NAME=BIRKENSTOCK门店定位
|
|
||||||
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
|
||||||
APP_IMAGE_CDN_NEW=https://espier-oss-cdn.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
|
||||||
APP_DIANWU_URL=
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
APP_BASE_URL=http://47.103.169.154:8080/api/h5app/wxapp
|
||||||
|
APP_WEBSOCKET=wss://http://47.103.169.154:8080/ws
|
||||||
|
APP_COMPANY_ID=1
|
||||||
|
APP_PLATFORM=standard
|
||||||
|
APP_CUSTOM_SERVER=http://47.103.169.154:8081/
|
||||||
|
APP_HOME_PAGE=/pages/index
|
||||||
|
APP_TRACK=youshu
|
||||||
|
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
||||||
|
# APP_ID=wx3e1c17c88abf3e45
|
||||||
|
APP_ID=wx55ff808ba0e28b1d
|
||||||
|
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
||||||
|
APP_MAP_NAME=oneX新零售门店定位
|
||||||
|
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
||||||
|
APP_IMAGE_CDN_NEW=https://ecx-brikenstock-image.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
||||||
|
APP_DIANWU_URL=
|
||||||
|
|
@ -11,5 +11,5 @@ APP_ID=wx72e9e1a93420862c
|
||||||
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
||||||
APP_MAP_NAME=BIRKENSTOCK门店定位
|
APP_MAP_NAME=BIRKENSTOCK门店定位
|
||||||
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
||||||
APP_IMAGE_CDN_NEW=https://espier-oss-cdn.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
APP_IMAGE_CDN_NEW=https://ecx-brikenstock-image.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
||||||
APP_DIANWU_URL=
|
APP_DIANWU_URL=
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,5 @@ APP_ID=wx55ff808ba0e28b1d
|
||||||
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe
|
||||||
APP_MAP_NAME=oneX新零售门店定位
|
APP_MAP_NAME=oneX新零售门店定位
|
||||||
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
|
||||||
APP_IMAGE_CDN_NEW=https://espier-oss-cdn.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
APP_IMAGE_CDN_NEW=https://ecx-brikenstock-image.oss-cn-shanghai.aliyuncs.com/default_project/wxAssets
|
||||||
APP_DIANWU_URL=
|
APP_DIANWU_URL=
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"miniprogramRoot": "dist/",
|
"miniprogramRoot": "dist/",
|
||||||
"projectname": "ecshopx-vshop",
|
"projectname": "ecshopx-vshop",
|
||||||
"description": "weshop for platform",
|
"description": "weshop for platform",
|
||||||
"appid": "wx55ff808ba0e28b1d",
|
"appid": "wx72e9e1a93420862c",
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
"es6": false,
|
"es6": false,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export default class SearchBar extends Component {
|
||||||
historyList: [],
|
historyList: [],
|
||||||
isShowAction: false,
|
isShowAction: false,
|
||||||
qaList: [
|
qaList: [
|
||||||
{ content: '正常版和窄版的区别' },
|
{ content: '常规版和窄版的区别' },
|
||||||
{ content: '如何区分常规软木鞋床和软底软木鞋床' },
|
{ content: '如何区分常规软木鞋床和软底软木鞋床' },
|
||||||
{ content: '人造革和牛皮革的区别' },
|
{ content: '人造革和牛皮革的区别' },
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,8 @@ function SpSkuSelect (props, ref) {
|
||||||
const _skuTxtArr = ['', '', '']
|
const _skuTxtArr = ['', '', '']
|
||||||
if (curItem) {
|
if (curItem) {
|
||||||
const name = curItem.specItem?.[0]?.specName
|
const name = curItem.specItem?.[0]?.specName
|
||||||
_skuTxtArr[0] = name ? name + ':' + curItem.itemBn : ''
|
const reg = /^[0-9]+$/
|
||||||
|
_skuTxtArr[0] = name ? name + (reg.test(curItem.itemBn) ? ':' + curItem.itemBn : '') : ''
|
||||||
_skuTxtArr[2] = name ? name + ':' + curItem.itemBnDetail : ''
|
_skuTxtArr[2] = name ? name + ':' + curItem.itemBnDetail : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export const TRADE_ITEM = {
|
||||||
// 可售后商品数
|
// 可售后商品数
|
||||||
leftAftersalesNum: 'left_aftersales_num',
|
leftAftersalesNum: 'left_aftersales_num',
|
||||||
// 默认售后商品数
|
// 默认售后商品数
|
||||||
refundNum: 1,
|
refundNum: ({ num }) => num || 1,
|
||||||
itemSpecDesc: 'item_spec_desc',
|
itemSpecDesc: 'item_spec_desc',
|
||||||
point: 'point',
|
point: 'point',
|
||||||
checked: () => false,
|
checked: () => false,
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ page {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 66px;
|
left: 66px;
|
||||||
bottom: 170px;
|
bottom: 120px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
// justify-content: flex-start;
|
// justify-content: flex-start;
|
||||||
.item-tit {
|
.item-tit {
|
||||||
|
|
@ -210,7 +210,7 @@ page {
|
||||||
.item-btn {
|
.item-btn {
|
||||||
// width: 180px;
|
// width: 180px;
|
||||||
// height: 56px;
|
// height: 56px;
|
||||||
padding: 20rpx 90rpx 20rpx 50rpx;
|
padding: 20rpx 90rpx 20rpx 90rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ function Home () {
|
||||||
src: process.env.APP_IMAGE_CDN_NEW + '/1774/kv.jpg?t' + new Date().getTime(),
|
src: process.env.APP_IMAGE_CDN_NEW + '/1774/kv.jpg?t' + new Date().getTime(),
|
||||||
goods: [],
|
goods: [],
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
// Taro.navigateTo({ url: '/pages/other/goods' })
|
Taro.navigateTo({ url: '/pages/other/goods' })
|
||||||
}
|
}
|
||||||
}, ...list]
|
}, ...list]
|
||||||
setState((draft) => {
|
setState((draft) => {
|
||||||
|
|
@ -574,7 +574,7 @@ function Home () {
|
||||||
|
|
||||||
const indexUrl = 'https://mp.weixin.qq.com/s/LBXthKa-P9gNK8FCv3n1pA'
|
const indexUrl = 'https://mp.weixin.qq.com/s/LBXthKa-P9gNK8FCv3n1pA'
|
||||||
const handleGoWx = () => {
|
const handleGoWx = () => {
|
||||||
return handleApply()
|
// handleApply()
|
||||||
Taro.navigateTo({ url: '/pages/webview?url=' + encodeURIComponent(indexUrl) })
|
Taro.navigateTo({ url: '/pages/webview?url=' + encodeURIComponent(indexUrl) })
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
@ -695,7 +695,7 @@ function Home () {
|
||||||
</Swiper>
|
</Swiper>
|
||||||
{!isUpOperation && currentIndex === 0 ? <View className="item-btns" style="left: 220rpx;
|
{!isUpOperation && currentIndex === 0 ? <View className="item-btns" style="left: 220rpx;
|
||||||
bottom: 180rpx;" >
|
bottom: 180rpx;" >
|
||||||
{<View onClick={handleGoWx} className="item-btn" style={{ padding: '50rpx 156rpx', opacity: 0, background: 'transparent', border: 'none' }} >
|
{<View onClick={handleGoWx} className="item-btn" style={{ padding: '74rpx 156rpx', opacity: 0, background: 'transparent', border: 'none' }} >
|
||||||
<View className="item-btn-txt"></View>
|
<View className="item-btn-txt"></View>
|
||||||
</View>}
|
</View>}
|
||||||
</View> : null}
|
</View> : null}
|
||||||
|
|
|
||||||
|
|
@ -123,42 +123,74 @@ export default function detail () {
|
||||||
// draft.visible = true
|
// draft.visible = true
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
let flag = true
|
||||||
|
const reg = /^[1][3,4,5,7,8,9][0-9]{9}$/
|
||||||
|
if (formData['mobile'] !== userInfo.mobile) {
|
||||||
|
if (!reg.test(answer)) {
|
||||||
|
return Taro.showToast({
|
||||||
|
title: '手机号格式不正确',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (formData['username'] !== userInfo.username && (!formData['username'] || !formData['username'].trim())) {
|
||||||
|
return Taro.showToast({
|
||||||
|
title: '请输入姓名',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
if (!formData['gender']) {
|
||||||
|
return Taro.showToast({
|
||||||
|
title: '请选择性别',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
if (!formData['has_bought']) {
|
||||||
|
return Taro.showToast({
|
||||||
|
title: '请选择是否拥有BIRKENSTOCK鞋履',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
flag = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// const reg = /^[1][3,4,5,7,8,9][0-9]{9}$/
|
||||||
|
// _formData.forEach((d) => {
|
||||||
|
// const { field_name, field_title, answer } = d
|
||||||
|
// if ((formData['has_partner'] === '否' && field_name.includes('partner') || field_name.includes('city') || (field_name === 'mobile' && answer === userInfo.mobile))) {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// if (field_name === 'mobile' || field_name === 'partner_mobile') {
|
||||||
|
// if (!reg.test(answer)) {
|
||||||
|
// Taro.showToast({
|
||||||
|
// title: `${formData['has_partner'] === '是' ? '同行人' : ''}${field_title}格式不正确`,
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// throw new Error(`${field_title}格式不正确`)
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (!answer || !answer.trim()) {
|
||||||
|
// Taro.showToast({
|
||||||
|
// title: `请填写${formData['has_partner'] === '是' ? '同行人' : ''}${field_title}`,
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// throw new Error(`${formData['has_partner'] === '是' ? '同行人' : ''}${field_title}不能为空`)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// } catch (error) {
|
||||||
|
// flag = false
|
||||||
|
// }
|
||||||
|
if (!flag) return
|
||||||
const _formData = formDataList.map((d) => {
|
const _formData = formDataList.map((d) => {
|
||||||
return {
|
return {
|
||||||
...d,
|
...d,
|
||||||
answer: formData[d.field_name]
|
answer: formData[d.field_name]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let flag = true
|
|
||||||
try {
|
|
||||||
_formData.forEach((d) => {
|
|
||||||
const { field_name, field_title, answer } = d
|
|
||||||
const reg = /^[1][3,4,5,7,8,9][0-9]{9}$/
|
|
||||||
if ((formData['has_partner'] === '否' && field_name.includes('partner') || field_name.includes('city') || (field_name === 'mobile' && answer === userInfo.mobile))) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (field_name === 'mobile' || field_name === 'partner_mobile') {
|
|
||||||
if (!reg.test(answer)) {
|
|
||||||
Taro.showToast({
|
|
||||||
title: `${formData['has_partner'] === '是' ? '同行人' : ''}${field_title}格式不正确`,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
throw new Error(`${field_title}格式不正确`)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!answer || !answer.trim()) {
|
|
||||||
Taro.showToast({
|
|
||||||
title: `请填写${formData['has_partner'] === '是' ? '同行人' : ''}${field_title}`,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
throw new Error(`${formData['has_partner'] === '是' ? '同行人' : ''}${field_title}不能为空`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
flag = false
|
|
||||||
}
|
|
||||||
if (!flag) return
|
|
||||||
const content = {
|
const content = {
|
||||||
title: '',
|
title: '',
|
||||||
sort: 1,
|
sort: 1,
|
||||||
|
|
@ -310,7 +342,7 @@ export default function detail () {
|
||||||
title: activeInfo.activity_name,
|
title: activeInfo.activity_name,
|
||||||
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
|
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
|
||||||
// imageUrl: activeInfo.pics[0]
|
// imageUrl: activeInfo.pics[0]
|
||||||
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share-logo.jpg`
|
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share.jpg`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
|
|
@ -424,7 +456,8 @@ export default function detail () {
|
||||||
</Picker>
|
</Picker>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{index === 0 && <View className="user-form-item">
|
{/* 是否协同他人--暂时不要了! */}
|
||||||
|
{false && index === 0 && <View className="user-form-item">
|
||||||
<View className='cell-item'>
|
<View className='cell-item'>
|
||||||
<View className="cell-item-tit">是否协同他人一起参加</View>
|
<View className="cell-item-tit">是否协同他人一起参加</View>
|
||||||
<View className='flex-row'>
|
<View className='flex-row'>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export default function detail () {
|
||||||
}
|
}
|
||||||
draft.checked = !!_item
|
draft.checked = !!_item
|
||||||
// MM-DD
|
// MM-DD
|
||||||
draft.changci = changci.map((item, index) => ({ index: index + 1, start: dayjs(item.start_time).format('HH:mm'), end: dayjs(item.end_time).format('HH:mm'), limit: item.join_limit, join: item.has_join_num, id: item.registration_session_id, activity_id: item.activity_id, has_stauts: item.has_stauts == 1 }))
|
draft.changci = changci.map((item, index) => ({ index: index + 1, start: dayjs(item.start_time).format('MM-DD HH:mm'), end: dayjs(item.end_time).format('HH:mm'), limit: item.join_limit, join: item.has_join_num, id: item.registration_session_id, activity_id: item.activity_id, has_stauts: item.has_stauts == 1 }))
|
||||||
draft.applyStatus = _applyStatus
|
draft.applyStatus = _applyStatus
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -223,7 +223,7 @@ export default function detail () {
|
||||||
title: activeInfo.activity_name,
|
title: activeInfo.activity_name,
|
||||||
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
|
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
|
||||||
// imageUrl: activeInfo.pics[0]
|
// imageUrl: activeInfo.pics[0]
|
||||||
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share-logo.jpg`
|
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share.jpg`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
|
|
@ -241,8 +241,7 @@ export default function detail () {
|
||||||
if (item.has_stauts) {
|
if (item.has_stauts) {
|
||||||
navigateTo('/pages/recommend/status?id=' + activeInfo.activity_id + '&time=')
|
navigateTo('/pages/recommend/status?id=' + activeInfo.activity_id + '&time=')
|
||||||
} else {
|
} else {
|
||||||
if (applyStatus) return
|
if (applyStatus || item.limit - item.join < 1) return
|
||||||
navigateTo('/pages/recommend/apply?id=' + activeInfo.activity_id + '&time=')
|
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/pages/recommend/apply?id=' + activeInfo.activity_id,
|
url: '/pages/recommend/apply?id=' + activeInfo.activity_id,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
|
@ -280,7 +279,7 @@ export default function detail () {
|
||||||
<View style={{ paddingBottom: '80px' }}>
|
<View style={{ paddingBottom: '80px' }}>
|
||||||
{changci.length > 0 && changci.map((item, index) => <View className='time-item' key={index + '__item'}>
|
{changci.length > 0 && changci.map((item, index) => <View className='time-item' key={index + '__item'}>
|
||||||
<Text className="time-item-title">第{item.index}场 {item.start}-{item.end}</Text>
|
<Text className="time-item-title">第{item.index}场 {item.start}-{item.end}</Text>
|
||||||
<View className={`btn ${(item.limit - item.join <= 0) && !item.has_stauts ? 'disabled' : ''}`} onClick={() => handleGoApply(item)} >{item.has_stauts ? '已报名' : `${item.limit - item.join}席可选`}</View>
|
<View className={`btn ${(item.limit - item.join <= 0) && !item.has_stauts ? 'disabled' : ''}`} onClick={() => handleGoApply(item)} >{item.has_stauts ? '已报名' : item.limit - item.join > 0 ? `${item.limit - item.join}席可选` : '已满员'}</View>
|
||||||
</View>)}
|
</View>)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ export default function status () {
|
||||||
title: activeInfo.activity_name,
|
title: activeInfo.activity_name,
|
||||||
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
|
path: `/pages/recommend/detail?id=${activeInfo.activity_id}`,
|
||||||
// imageUrl: activeInfo.pics[0]
|
// imageUrl: activeInfo.pics[0]
|
||||||
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share-logo.jpg`
|
imageUrl: `${process.env.APP_IMAGE_CDN_NEW}/share.jpg`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// {activeInfo.status === 'pending' ? '待审核' : '报名成功'}
|
// {activeInfo.status === 'pending' ? '待审核' : '报名成功'}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export default class RegRule extends Component {
|
||||||
data = registerContent + privacyContent
|
data = registerContent + privacyContent
|
||||||
navBarTitle = `${registerTitle}和${privactTitle}`
|
navBarTitle = `${registerTitle}和${privactTitle}`
|
||||||
} else if (type === 'activity_rule') {
|
} else if (type === 'activity_rule') {
|
||||||
data = 'xxxx'
|
data = await Taro.request({ url: process.env.APP_IMAGE_CDN_NEW + '/active-rule.txt' }).then(res => res.data)
|
||||||
navBarTitle = 'BIRKENSTOCK活动细则'
|
navBarTitle = 'BIRKENSTOCK活动细则'
|
||||||
}
|
}
|
||||||
else if (type) {
|
else if (type) {
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,8 @@ function TradeAfterSale (props) {
|
||||||
}
|
}
|
||||||
setState(draft => {
|
setState(draft => {
|
||||||
draft.aftersales = _aftersales
|
draft.aftersales = _aftersales
|
||||||
draft.afterSaleTotalNum = _aftersales.items.reduce((sum, { num }) => sum + num, 0)
|
draft.afterSaleTotalNum = _aftersales.items.reduce((sum, { num, refundNum }) => sum + +refundNum, 0)
|
||||||
draft.afterSaleTotalprice = _aftersales.items.reduce((sum, { price }) => sum + price, 0)
|
draft.afterSaleTotalprice = _aftersales.items.reduce((sum, { price, num, refundNum }) => sum + price / num * refundNum, 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const { orderInfo, offline_aftersales_is_open, distributor } = await api.trade.detail(id)
|
const { orderInfo, offline_aftersales_is_open, distributor } = await api.trade.detail(id)
|
||||||
|
|
@ -183,19 +183,22 @@ function TradeAfterSale (props) {
|
||||||
draft.allClicked = !allClicked
|
draft.allClicked = !allClicked
|
||||||
draft.info.items.map((_item) => {
|
draft.info.items.map((_item) => {
|
||||||
_item.checked = !allClicked
|
_item.checked = !allClicked
|
||||||
|
_item.refundNum = _item.num
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
draft.info.items[index].checked = !item.checked
|
draft.info.items[index].checked = !item.checked
|
||||||
}
|
}
|
||||||
draft.allClicked = draft.info.items.every((item) => item.checked)
|
draft.allClicked = draft.info.items.every((item) => item.checked)
|
||||||
draft.afterSaleTotalNum = draft.info.items.filter((_item) => _item.checked).reduce((sum, { num }) => sum + num, 0)
|
draft.afterSaleTotalNum = draft.info.items.filter((_item) => _item.checked).reduce((sum, { num, refundNum }) => sum + +refundNum, 0)
|
||||||
draft.afterSaleTotalprice = draft.info.items.filter((_item) => _item.checked).reduce((sum, { price }) => sum + price, 0)
|
draft.afterSaleTotalprice = draft.info.items.filter((_item) => _item.checked).reduce((sum, { price, num, refundNum }) => sum + price / num * refundNum, 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChangeItemNum = (e, index) => {
|
const onChangeItemNum = (e, index) => {
|
||||||
setState(draft => {
|
setState(draft => {
|
||||||
draft.info.items[index].refundNum = e
|
draft.info.items[index].refundNum = e
|
||||||
|
draft.afterSaleTotalNum = draft.info.items.filter((_item) => _item.checked).reduce((sum, { num, refundNum }) => sum + +refundNum, 0)
|
||||||
|
draft.afterSaleTotalprice = draft.info.items.filter((_item) => _item.checked).reduce((sum, { price, num, refundNum }) => sum + price / num * refundNum, 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -248,7 +251,7 @@ function TradeAfterSale (props) {
|
||||||
detail: checkedItems.map(({ id: _id, refundNum, num }) => {
|
detail: checkedItems.map(({ id: _id, refundNum, num }) => {
|
||||||
return {
|
return {
|
||||||
id: _id,
|
id: _id,
|
||||||
num: num || refundNum
|
num: refundNum
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
order_id: id,
|
order_id: id,
|
||||||
|
|
@ -399,9 +402,10 @@ function TradeAfterSale (props) {
|
||||||
</> : <Text className="choose-item" style={{ fontSize: '30rpx', fontWeight: 'bold' }}>已选择的退货商品</Text>}
|
</> : <Text className="choose-item" style={{ fontSize: '30rpx', fontWeight: 'bold' }}>已选择的退货商品</Text>}
|
||||||
<View className='refund-items'>
|
<View className='refund-items'>
|
||||||
<View className='items-container'>
|
<View className='items-container'>
|
||||||
|
{console.log(aftersales?.items || info?.items, '--------')}
|
||||||
{
|
{
|
||||||
(aftersales?.items || info?.items || []).map((item, index) => (
|
(aftersales?.items || info?.items || []).map((item, index) => (
|
||||||
<View className="item-box" onClick={onChangeItemCheck.bind(this, item, index)}>
|
<View className="item-box">
|
||||||
<View className='item-wrap' key={`item-wrap__${index}`}>
|
<View className='item-wrap' key={`item-wrap__${index}`}>
|
||||||
{!afterSaleTid && <View className='item-hd'>
|
{!afterSaleTid && <View className='item-hd'>
|
||||||
<SpCheckbox checked={item.checked} onChange={onChangeItemCheck.bind(this, item, index)} />
|
<SpCheckbox checked={item.checked} onChange={onChangeItemCheck.bind(this, item, index)} />
|
||||||
|
|
@ -422,7 +426,7 @@ function TradeAfterSale (props) {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/> */}
|
/> */}
|
||||||
<SpImage src={item.pic} width={150} height={150} mode='aspectFill' radius={4} circle={4} />
|
<SpImage onClick={onChangeItemCheck.bind(this, item, index)} src={item.pic} width={150} height={150} mode='aspectFill' radius={4} circle={4} />
|
||||||
<View className='goods-info'>
|
<View className='goods-info'>
|
||||||
<View className='goods-info-hd'>
|
<View className='goods-info-hd'>
|
||||||
<Text className='goods-title'>{item.itemName}</Text>
|
<Text className='goods-title'>{item.itemName}</Text>
|
||||||
|
|
@ -432,15 +436,15 @@ function TradeAfterSale (props) {
|
||||||
{/* <View><SpPrice size={28} value={item.price / item.num} /> x <Text className='num'>{item.num}</Text></View> */}
|
{/* <View><SpPrice size={28} value={item.price / item.num} /> x <Text className='num'>{item.num}</Text></View> */}
|
||||||
</View>
|
</View>
|
||||||
<View className='goods-info-ft'>
|
<View className='goods-info-ft'>
|
||||||
<Text>数量:{item.num}</Text>
|
{/* <Text>数量:{item.num}</Text> */}
|
||||||
<SpPrice size={20} value={item.price / item.num} showSeparator noDecimal={false} />
|
<SpInputNumber
|
||||||
{/* <SpInputNumber
|
// disabled={!item.leftAftersalesNum}
|
||||||
disabled={!item.leftAftersalesNum}
|
|
||||||
value={item.refundNum}
|
value={item.refundNum}
|
||||||
max={item.leftAftersalesNum}
|
max={item.num}
|
||||||
min={1}
|
min={1}
|
||||||
onChange={(e) => onChangeItemNum(e, index)}
|
onChange={(e) => onChangeItemNum(e, index)}
|
||||||
/> */}
|
/>
|
||||||
|
<SpPrice size={20} value={item.price / item.num * item.refundNum} showSeparator noDecimal={false} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// margin-top: 10px;
|
// margin-top: 10px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
||||||
.sp-price {
|
.sp-price {
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
.sp-price__symbol {
|
.sp-price__symbol {
|
||||||
|
|
@ -354,15 +355,17 @@
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
border: 1PX solid #999;
|
border: 1PX solid #999;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
height: 44px;
|
height: 34px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
&__btn {
|
&__btn {
|
||||||
color: #222;
|
color: #222;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 40px;
|
width: 34px;
|
||||||
display: block;
|
display: block;
|
||||||
height: 40px;
|
height: 34px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
line-height: 44px;
|
line-height: 34px;
|
||||||
.at-icon-subtract {
|
.at-icon-subtract {
|
||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
|
|
@ -375,8 +378,8 @@
|
||||||
border-left: 1PX solid #999;
|
border-left: 1PX solid #999;
|
||||||
border-right: 1px solid #999;
|
border-right: 1px solid #999;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 32px;
|
height: 30px;
|
||||||
line-height: 32px;
|
line-height: 30px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue