yujialong 5 days ago
parent d9bb1f258f
commit 502eea0809
  1. 6
      src/components/UserExchangeModal/index.tsx
  2. 2
      src/components/goToMemberModal/index.tsx
  3. 36
      src/pages/Subscribe/index.tsx
  4. 3
      src/pages/UserHome/UserSubscribe/index.tsx
  5. 1
      src/pages/Vip/index.less

@ -38,10 +38,10 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) {
const handleScanCode = () => {
Taro.scanCode({
success: (res: any) => {
console.log('唤起扫码:',res,res.path)
const { path } = res
if(!Taro.getStorageSync('UserToken')){
setisLoginOpen(true)
setuserScene(res.path.slice(-8))
setuserScene(path ? path.slice(-8) : '')
}else{
Taro.request({
url: 'https://interapi.jm-kid.com/api/product/exchange',
@ -51,7 +51,7 @@ export default function UserExchangeModal({ isOpen, setIsOpen }: Props) {
},
data: {
timestamp: Date.now(),
change_code: res.path.slice(-8)
change_code: path ? path.slice(-8) : ''
},
success: (s_res: any) => {
const { state, data } = s_res.data

@ -57,7 +57,7 @@ export default function GoToStoreModal({ visible, onClose, memberInfo}) {
<View className='store_modal_close' onClick={handleOverlayClick}></View>
<View className='store_modal_title'></View>
<Text className='store_modal_context'>
{memberInfo.SubscribedState === -1 ? '已过期' : '未开通'}VIP会员解锁全部专辑
{memberInfo.SubscribedState === -1 ? '已过期' : '未开通'}VIP会员解锁专辑
</Text>
<View
className='store_modal_container'

@ -397,10 +397,11 @@ export default function Subscribe() {
console.log('唤起扫码')
Taro.scanCode({
success: (res: any) => {
console.log(res.path.slice(-8))
console.log('二维码内容:', res)
const { path } = res
if(!Taro.getStorageSync('UserToken')){
setisLoginOpen(true)
setuserScene(res.path.slice(-8))
setuserScene(path ? path.slice(-8) : '')
}else{
Taro.request({
url: 'https://interapi.jm-kid.com/api/product/exchange',
@ -410,7 +411,7 @@ export default function Subscribe() {
},
data: {
timestamp: Date.now(),
change_code: res.path.slice(-8)
change_code: path ? path.slice(-8) : ''
},
success: (s_res: any) => {
const { state, data } = s_res.data
@ -579,12 +580,6 @@ export default function Subscribe() {
></Image>
</View>
<PopupHalfScreen
visible={isPopupOpen}
onClose={() => setisPopupOpen(!isPopupOpen)}
onFilter={setisFilter}
></PopupHalfScreen>
<View className='subscribe_selection'>
<View
className='subscribe_selection_item'
@ -695,6 +690,20 @@ export default function Subscribe() {
}
</View>
<PopupHalfScreen
visible={isPopupOpen}
onClose={() => setisPopupOpen(!isPopupOpen)}
onFilter={setisFilter}
></PopupHalfScreen>
{/* 跳转商城 */}
<GoToStoreModal
visible={isToStoreOpen}
onClose={() => setisToStoreOpen(false)}
type={1}
mallLink={prdtMallLink}
setmallLink={setprdtMallLink}
></GoToStoreModal>
</ScrollView>
}
@ -744,15 +753,6 @@ export default function Subscribe() {
onModalClose={() => setisLoginOpen(false)}
></GetPhoneNumber>
{/* 跳转商城 */}
<GoToStoreModal
visible={isToStoreOpen}
onClose={() => setisToStoreOpen(false)}
type={1}
mallLink={prdtMallLink}
setmallLink={setprdtMallLink}
></GoToStoreModal>
<UserExchangeSuccessModal exchangeState={exchangeState} prdtList={prdtList} prdtNames={prdtNames} isOpen={isUserExchangeSuccessModalOpen} setIsOpen={setisUserExchangeSuccessModalOpen}></UserExchangeSuccessModal>
</View>
)

@ -63,6 +63,7 @@ export default function UserSubscribe() {
console.log('唤起扫码')
Taro.scanCode({
success: (res: any) => {
const { path } = res
Taro.request({
url: 'https://interapi.jm-kid.com/api/product/exchange',
method: 'POST',
@ -71,7 +72,7 @@ export default function UserSubscribe() {
},
data: {
timestamp: Date.now(),
change_code: res.path.slice(-8)
change_code: path ? path.slice(-8) : ''
},
success: (s_res: any) => {
const { state, data } = s_res.data

@ -44,7 +44,6 @@
width: 3.75rem;
height: 3.75rem;
margin-right: 1rem;
border: .0625rem solid #444;
border-radius: 50%;
}
.vip_info {

Loading…
Cancel
Save