Commit 207ab5ff authored by mqf_0707's avatar mqf_0707

加购页优化

parent 4dec3d9c
......@@ -9,7 +9,7 @@ import config from './config/config'
import './utils/mdProxy'
import { cloundAlarm } from './utils/dingTalk'
const { env, tornadoAPI, defaultActivityId } = config
const { env, tornadoAPI, defaultActivityId, requestType } = config
cloud.init({ env })
......
......@@ -34,7 +34,7 @@ export default function Modal(props) {
<Overlay onClick={() => onClickOverlay()} />
<View className={`${styles.content} animate-zoom-in`} style={{ top }}>
{props.children}
{!hideCloseButton && <View className={closeBtnClass} onClick={() => onClose()} style={{ top: closePos.top / 100 + 'rem', right: closePos.right / 100 + 'rem' }} />}
{!hideCloseButton && <View className={closeBtnClass} onClick={() => onClose()} style={closePostion === 'top-right'?{ top: closePos.top / 100 + 'rem', right: closePos.right / 100 + 'rem' }: {}} />}
</View>
</View>
......
......@@ -2,7 +2,7 @@ export default {
env: 'test', // 云函数环境 test 测试环境 online 线上环境
requestType: 'cloud', // cloud: 云函数, yapi: yapi 接口, ams: ams接口,tornadoAPI: 风驰台接口
cloudName: 'testNewS', // 主云函数项目名 CommonToC
sellerId: '2207644377875',
sellerId: '2401530034',
tornadoAPI: 'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000038851072&proxyIp=172.16.130.158', // 新增:当requestType: 'tornadoAPI'时,找服务端提供地址
defaultActivityId: '610cff3f086e659a96b7336c' // 默认活动id
}
\ No newline at end of file
......@@ -55,6 +55,8 @@ function Index() {
const [helpInfo,setHelpInfo] = useState({})
// 助力弹窗标识
const showHelp = useRef(false)
// 用户信息
const [ userInfo, setUserInfo] = useState({})
const fetchActivityInfo = async() => {
const { success, data } = await API.getActivityBaseInfoById()
......@@ -211,7 +213,7 @@ function Index() {
/>
}
{<member-modal expend={memberVisible} onClose={onClose} onAuthFail={onAuthFail} onAuthSuccess={onAuthSuccess} />}
{authInfo?.visible && <Auth clickAuthBtn={authInfo.onOpenSetting} /> }
{authInfo?.visible && <Auth clickAuthBtn={authInfo.onHandleSetting} /> }
{false && <canvas-comp />}
</>
)
......
......@@ -43,7 +43,7 @@ function CartGoodsPage() {
const { status, quantity } = await showSkuModal(String(itemId))
if (status == "addCartSuccess") {
const { success } = await API.completeTask({ key: CART_CONFIG.taskType, taskType: CART_CONFIG.taskType, itemId, count: quantity })
if (!success) {
if (success) {
collectFlag.current += 1
getGoodsList()
// showToast({ title: '加购成功'})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment