diff --git a/.env b/.env index c433749a1..f53bd29e3 100644 --- a/.env +++ b/.env @@ -1,16 +1,16 @@ APP_BASE_URL=https://demo-ecshopx.ishopex.cn/api/h5app/wxapp APP_WEBSOCKET=wss://demo-ecshopx.ishopex.cn/ws -APP_COMPANY_ID=5 -APP_PLATFORM=platform +APP_COMPANY_ID=38 +APP_PLATFORM=standard APP_CUSTOM_SERVER=https://ecshopx-h5.ex-sandbox.com/ APP_HOME_PAGE=/pages/index APP_TRACK=youshu APP_YOUSHU_TOKEN=bi281e87ab2424481a -APP_ID=wxf7abee400d50e0d0 -APP_MAP_KEY=1ccc1ebc947719886f0cd766d70241fe +APP_ID=wx1e25e45145b70faa +APP_MAP_KEY=PSPBZ-KQ5CW-CSGRF-ON2S4-K2HQJ-XEBQG APP_MAP_NAME=oneX新零售门店定位 APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop -APP_DIANWU_URL= +APP_DIANWU_URL=https://demo-ecshopx-dianwu.shopex123.com APP_MERCHANT_URL= APP_ADAPAY= diff --git a/src/components/sp-goods-item/index.js b/src/components/sp-goods-item/index.js index ed7be0618..ad4954481 100644 --- a/src/components/sp-goods-item/index.js +++ b/src/components/sp-goods-item/index.js @@ -1,14 +1,14 @@ -import React, { Component, useEffect } from 'react' +import React, { } from 'react' import { useSelector, useDispatch } from 'react-redux' -import Taro, { getCurrentInstance } from '@tarojs/taro' +import Taro from '@tarojs/taro' import { View, Text, Image } from '@tarojs/components' -import { SpImage, SpPoint, SpPrice, SpVipLabel, SpLogin } from '@/components' +import { SpImage, SpPoint, SpPrice, SpVipLabel } from '@/components' import { fetchUserFavs, addUserFav, deleteUserFav } from '@/store/slices/user' +import { useLogin } from '@/hooks' import qs from 'qs' -import api from '@/api' import S from '@/spx' -import { isObject, classNames, showToast, VERSION_PLATFORM, VERSION_IN_PURCHASE } from '@/utils' +import { classNames, showToast, VERSION_PLATFORM, VERSION_IN_PURCHASE } from '@/utils' import { PROMOTION_TAG } from '@/consts' import './index.scss' @@ -26,7 +26,6 @@ function SpGoodsItem(props) { const { priceDisplayConfig = {} } = useSelector((state) => state.purchase) const { items_page = {} } = priceDisplayConfig const { activity_price: enPurActivityPrice, sale_price: enPurSalePrice } = items_page - const { onClick, onChange, @@ -49,6 +48,7 @@ function SpGoodsItem(props) { goodsType, lazyLoad } = props + const {isLogin} = useLogin() const handleFavClick = async (e) => { e.stopPropagation() @@ -188,7 +188,7 @@ function SpGoodsItem(props) { > )} - {!info.activityPrice && ( + {!info.activityPrice && isLogin && ( {info.memberPrice < info.price && enMemberPrice && ( @@ -197,7 +197,7 @@ function SpGoodsItem(props) { )} - {info.vipPrice > 0 && + {info.vipPrice > 0 && isLogin && info.vipPrice < info.memberPrice && (!info.svipPrice || info.vipPrice > info.svipPrice) && enSvipPrice && ( @@ -207,7 +207,7 @@ function SpGoodsItem(props) { )} - {info.svipPrice > 0 && + {info.svipPrice > 0 && isLogin && info.svipPrice < info.vipPrice && info.svipPrice < info.memberPrice && enSvipPrice && ( diff --git a/src/components/sp-goods-price/index.js b/src/components/sp-goods-price/index.js index 80b879f27..8ea5373f6 100644 --- a/src/components/sp-goods-price/index.js +++ b/src/components/sp-goods-price/index.js @@ -4,6 +4,7 @@ import Taro from '@tarojs/taro' import { View, Text } from '@tarojs/components' import { SpPrice, SpPoint, SpVipLabel } from '@/components' import { classNames } from '@/utils' +import { useLogin } from '@/hooks' import './index.scss' function SpGoodsPrice(props) { @@ -16,6 +17,7 @@ function SpGoodsPrice(props) { svip_price: enSvipPrice } = item_page const { priceDisplayConfig = {} } = useSelector((state) => state.purchase) + const { isLogin } = useLogin() const { items_page = {} } = priceDisplayConfig const { activity_price: enPurActivityPrice, sale_price: enPurSalePrice } = items_page @@ -56,14 +58,14 @@ function SpGoodsPrice(props) { )} - {info.memberPrice < info.price && enMemberPrice && ( + {info.memberPrice < info.price && enMemberPrice && isLogin && ( )} - {info.vipPrice > 0 && + {info.vipPrice > 0 && isLogin && info.vipPrice < info.memberPrice && (!info.svipPrice || info.vipPrice > info.svipPrice) && enSvipPrice && ( @@ -73,7 +75,7 @@ function SpGoodsPrice(props) { )} - {info.svipPrice > 0 && + {info.svipPrice > 0 && isLogin && info.svipPrice < info.vipPrice && info.svipPrice < info.memberPrice && enSvipPrice && ( diff --git a/src/ext.json b/src/ext.json index 16871ea04..2fdef7437 100644 --- a/src/ext.json +++ b/src/ext.json @@ -1,9 +1,9 @@ { "extEnable": true, - "extAppid": "wxf7abee400d50e0d0", + "extAppid": "wx1e25e45145b70faa", "ext": { - "company_id": "5", - "appid": "wxf7abee400d50e0d0", + "company_id": "38", + "appid": "wx1e25e45145b70faa", "wxa_name": "通用小程序", "ali_isvid":"" },