fix bug
parent
b380d3c704
commit
e89f63d1ce
|
|
@ -1,8 +1,8 @@
|
|||
APP_BASE_URL=https://slb.birkenstock.net.cn/api/h5app/wxapp
|
||||
APP_WEBSOCKET=wss://slb.birkenstock.net.cn/ws
|
||||
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://slb.birkenstock.net.cn/
|
||||
APP_CUSTOM_SERVER=https://test.birkenstock.net.cn/
|
||||
APP_HOME_PAGE=/pages/index
|
||||
APP_TRACK=youshu
|
||||
APP_YOUSHU_TOKEN=bi281e87ab2424481a
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ function SpLogin (props, ref) {
|
|||
const auth_type = isWeixin ? 'wxapp' : 'aliapp'
|
||||
api.wx.login({ code: codeRef.current, showError: false, auth_type }).then(async ({ token }) => {
|
||||
if (token) {
|
||||
Taro.showLoading({ title: '' })
|
||||
Taro.showLoading({ title: '', mask: true })
|
||||
await setToken(token)
|
||||
onChange && onChange()
|
||||
Taro.hideLoading()
|
||||
|
|
|
|||
|
|
@ -366,14 +366,14 @@ function Home () {
|
|||
})
|
||||
}
|
||||
}) || []).sort((a, b) => a.sort - b.sort)
|
||||
const _swiperList = [...activeSwiper, {
|
||||
const _swiperList = [{
|
||||
type: 'image',
|
||||
src: process.env.APP_IMAGE_CDN_NEW + '/1774/kv.jpg?t' + new Date().getTime(),
|
||||
goods: [],
|
||||
onClick: () => {
|
||||
Taro.navigateTo({ url: '/pages/other/goods' })
|
||||
}
|
||||
}, ...list]
|
||||
}, ...activeSwiper, ...list]
|
||||
setState((draft) => {
|
||||
draft.swiperList = _swiperList
|
||||
draft.goodList = _swiperList[0].goods || []
|
||||
|
|
@ -693,7 +693,7 @@ function Home () {
|
|||
</SwiperItem>
|
||||
))}
|
||||
</Swiper>
|
||||
{!isUpOperation && currentIndex === 0 ? <View className="item-btns" style="left: 220rpx;
|
||||
{!isUpOperation && currentIndex === 1 ? <View className="item-btns" style="left: 220rpx;
|
||||
bottom: 180rpx;" >
|
||||
{<View onClick={handleGoWx} className="item-btn" style={{ padding: '74rpx 156rpx', opacity: 0, background: 'transparent', border: 'none' }} >
|
||||
<View className="item-btn-txt"></View>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { View, Text, Picker, Input } from "@tarojs/components"
|
|||
import './goods.scss'
|
||||
|
||||
const initState = {
|
||||
loading: false,
|
||||
loading: true,
|
||||
shopList: []
|
||||
}
|
||||
function goods () {
|
||||
|
|
@ -33,12 +33,12 @@ function goods () {
|
|||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
getShop()
|
||||
setTimeout(() => {
|
||||
setState((draft) => {
|
||||
draft.loading = false
|
||||
})
|
||||
}, 300)
|
||||
}, 500)
|
||||
getShop()
|
||||
}, [])
|
||||
|
||||
const getShop = async () => {
|
||||
|
|
@ -59,13 +59,16 @@ function goods () {
|
|||
}
|
||||
|
||||
return (
|
||||
<SpPage loading={loading} title={''} className='page-other-goods has-navbar' showNavSearchIcon showNavLogo>
|
||||
<View className="" style={{ minHeight: windowHeight * 2, background: '#000' }} >
|
||||
{goods_1774.map((item, index) => <SpImage src={`1774/${item}.jpg`} width={width} isNew >
|
||||
<SpPage title={''} className='page-other-goods has-navbar' showNavSearchIcon showNavLogo>
|
||||
<View className="" style={{ minHeight: windowHeight * 2, background: '#000', display: loading ? 'none' : 'block' }} >
|
||||
{goods_1774.map((item, index) => <SpImage src={`1774/${item}.jpg?t=${Date.now()}`} width={width} isNew >
|
||||
{(index === 3 || index === 5) && <View className="go-buy" onClick={() => handleGoBuy(item, index)} ></View>}
|
||||
</SpImage>)}
|
||||
{/* {goods_1774.map((item, index) => <View style={{ width, background: `url(${process.env.APP_IMAGE_CDN_NEW}/1774/${item}.jpg?t=${Date.now()}) no-repeat center center`, backgroundSize: 'cover' }} src={`1774/${item}.jpg?t=${Date.now()}`} width={width} isNew >
|
||||
{(index === 3 || index === 5) && <View className="go-buy" onClick={() => handleGoBuy(item, index)} ></View>}
|
||||
</View>)} */}
|
||||
</View>
|
||||
<View className="content-btn" onClick={handleBackToIndex} >
|
||||
<View style={{ display: loading ? 'none' : 'block' }} className="content-btn" onClick={handleBackToIndex} >
|
||||
返回首页
|
||||
</View>
|
||||
</SpPage>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export default function detail () {
|
|||
if (!checked) {
|
||||
const res = await Taro.showModal({
|
||||
title: '提示',
|
||||
content: `请先阅读并同意${appName}活动细则`,
|
||||
content: `请先阅读并同意BIRKENSTOCK活动细则`,
|
||||
showCancel: true,
|
||||
cancel: '取消',
|
||||
cancelText: '拒绝',
|
||||
|
|
@ -249,7 +249,7 @@ export default function detail () {
|
|||
onClick={() => Taro.navigateTo({ url: '/subpages/auth/reg-rule?type=activity_rule' })}
|
||||
style={`color: #000000;text-decoration: underline;`}
|
||||
>
|
||||
{`《${appName}活动细则》`}
|
||||
{`《BIRKENSTOCK活动细则》`}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import api from '@/api'
|
|||
import dayjs from 'dayjs'
|
||||
import { AtIcon } from 'taro-ui'
|
||||
import { classNames, navigateTo } from '@/utils'
|
||||
import { useLogin } from '@/hooks'
|
||||
// import { useLogin } from '@/hooks'
|
||||
import './detail.scss'
|
||||
|
||||
const initState = {
|
||||
|
|
@ -28,10 +28,10 @@ export default function detail () {
|
|||
const $instance = getCurrentInstance()
|
||||
const [state, setState] = useImmer(initState)
|
||||
const { appName } = useSelector((_state) => _state.sys)
|
||||
const { userInfo = {} } = useSelector((_state) => _state.user)
|
||||
const { isLogin } = useLogin({
|
||||
autoLogin: true,
|
||||
})
|
||||
const { userInfo = null } = useSelector((_state) => _state.user)
|
||||
// const { isLogin } = useLogin({
|
||||
// autoLogin: false,
|
||||
// })
|
||||
|
||||
// useDidShow(() => {
|
||||
// }, [])
|
||||
|
|
@ -65,7 +65,7 @@ export default function detail () {
|
|||
}
|
||||
draft.checked = !!_item
|
||||
// MM-DD
|
||||
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.changci = changci.map((item, index) => ({ index: index + 1, start: dayjs(item.start_time).format('M月D日 H: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
|
||||
})
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ export default function detail () {
|
|||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (isLogin && userInfo) {
|
||||
if (userInfo) {
|
||||
setState(draft => {
|
||||
draft.formInfo = {
|
||||
username: userInfo.username,
|
||||
|
|
@ -83,13 +83,13 @@ export default function detail () {
|
|||
}
|
||||
})
|
||||
}
|
||||
}, [userInfo, isLogin])
|
||||
}, [userInfo])
|
||||
|
||||
|
||||
const { isLoading, activeInfo = {}, changci, visible, formInfo, checked, status, isShare, alwaysBackUrl, isSub, applyStatus } = state
|
||||
|
||||
const handleConfirm = async () => {
|
||||
if (!isLogin || !userInfo) return
|
||||
if (!userInfo) return
|
||||
if (activeInfo.status) {
|
||||
Taro.navigateTo({ url: '/pages/recommend/status?success=true&id=' + activeInfo.activity_id })
|
||||
return
|
||||
|
|
@ -238,6 +238,7 @@ export default function detail () {
|
|||
}
|
||||
|
||||
const handleGoApply = (item) => {
|
||||
if (!userInfo) return
|
||||
if (item.has_stauts) {
|
||||
navigateTo('/pages/recommend/status?id=' + activeInfo.activity_id + '&time=')
|
||||
} else {
|
||||
|
|
@ -264,7 +265,7 @@ export default function detail () {
|
|||
<View className="name-box">
|
||||
<View className="activity_name">{activeInfo.activity_name}</View>
|
||||
</View>
|
||||
<View className="activity_time">{activeInfo.start == activeInfo.end ? activeInfo.start : `${activeInfo.start} - ${activeInfo.end}`}</View>
|
||||
{/* <View className="activity_time">{activeInfo.start == activeInfo.end ? activeInfo.start : `${activeInfo.start} - ${activeInfo.end}`}</View> */}
|
||||
<View className="activity_addr">
|
||||
<Image mode="widthFix" src={require('@/assets/icon/map.png')}></Image>
|
||||
<Text>{activeInfo.address}</Text>
|
||||
|
|
@ -279,7 +280,9 @@ export default function detail () {
|
|||
<View style={{ paddingBottom: '80px' }}>
|
||||
{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>
|
||||
<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>
|
||||
<SpLogin onChange={getActiveDetail}>
|
||||
<View className={`btn_n ${(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>
|
||||
</SpLogin>
|
||||
</View>)}
|
||||
</View>
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@
|
|||
padding: 16rpx 16rpx 16rpx 36rpx;
|
||||
color: #999;
|
||||
margin-bottom: 16rpx;
|
||||
.btn {
|
||||
.btn_n {
|
||||
width: 140rpx;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ export default function status () {
|
|||
const _start = dayjs(activity_info.start_time * 1000)
|
||||
const _end = dayjs(activity_info.end_time * 1000)
|
||||
const _session = changci.find(item => item.has_stauts == 1) || {}
|
||||
_session.start = dayjs(_session.start_time).format('M月D日 H:mm')
|
||||
_session.end = dayjs(_session.end_time).format('H:mm')
|
||||
const _item = _session.recordList?.[0] || {}
|
||||
let url = ''
|
||||
const qrData = JSON.stringify({
|
||||
|
|
@ -52,7 +54,6 @@ export default function status () {
|
|||
list.map((item) => {
|
||||
record[item.field_name] = item.answer || ''
|
||||
})
|
||||
console.log("🚀 ~ file: status.js:52 ~ record:", _item)
|
||||
setState(draft => {
|
||||
draft.activeInfo = {
|
||||
...activity_info,
|
||||
|
|
@ -195,7 +196,8 @@ export default function status () {
|
|||
</>}
|
||||
<View className="activity_time flex-col">
|
||||
<Text className="title">活动时间</Text>
|
||||
<Text className="value">{activeInfo.start == activeInfo.end ? activeInfo.start : `${activeInfo.start} - ${activeInfo.end} ${session.start_time.substr(11, 5)} - ${session.end_time.substr(11, 5)}`}</Text>
|
||||
{/* <Text className="value">{activeInfo.start == activeInfo.end ? activeInfo.start : `${activeInfo.start} - ${activeInfo.end} ${session.start_time.substr(11, 5)} - ${session.end_time.substr(11, 5)}`}</Text> */}
|
||||
<Text className="value">{session.start} - {session.end}</Text>
|
||||
</View>
|
||||
<View className="activity_addr flex-col">
|
||||
<Text className="title">活动地点</Text>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ export default class RegRule extends Component {
|
|||
data = registerContent + privacyContent
|
||||
navBarTitle = `${registerTitle}和${privactTitle}`
|
||||
} else if (type === 'activity_rule') {
|
||||
data = await Taro.request({ url: process.env.APP_IMAGE_CDN_NEW + '/active-rule.txt' }).then(res => res.data)
|
||||
const res = await Taro.request({ url: process.env.APP_IMAGE_CDN_NEW + '/active-rule.txt?t=' + Date.now() })
|
||||
data = res.data || ''
|
||||
navBarTitle = 'BIRKENSTOCK活动细则'
|
||||
}
|
||||
else if (type) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue