商城测试版v6
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
.bindSalesman_main{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
.bindSalesman_pop{
|
||||
width: 654px;
|
||||
height: 900px;
|
||||
border-radius: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position:absolute;
|
||||
margin:auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1999;
|
||||
.bindSalesman_header{
|
||||
width: 654px;
|
||||
height: 654px;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 40px 40px 0 0;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
width: 488px;
|
||||
height: 104px;
|
||||
image{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bindSalesman_mask{
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.8;
|
||||
background: #000000;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { Image, Swiper, SwiperItem, Text, View } from "@tarojs/components"
|
||||
import styles from './index.module.scss'
|
||||
import { formatImgUrl } from "@/common/fotmat"
|
||||
import Taro from "@tarojs/taro";
|
||||
import { goLink } from "@/common/common";
|
||||
import CloseBtn from "@/components/closeBtn";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
type params = {
|
||||
show?: true|false,
|
||||
onClose?: () => void
|
||||
}
|
||||
export default ({show = false, onClose}:params) => {
|
||||
const [showPop, setShowPop] = useState<true|false>(false)
|
||||
useEffect(() => {
|
||||
if(show !== undefined) setShowPop(() => show)
|
||||
}, [show])
|
||||
const onClick = async (val) => {
|
||||
onClose?.()
|
||||
setShowPop(() => false)
|
||||
if(val == 1) {
|
||||
goLink('/pages/depositBeforehand/index')
|
||||
} else {
|
||||
goLink('/pages/index/index', {}, 'switchTab')
|
||||
}
|
||||
}
|
||||
const onCloseEven = () => {
|
||||
setShowPop(() => false)
|
||||
onClose?.()
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{showPop&&<View className={styles.bindSalesman_main}>
|
||||
<View className={styles.bindSalesman_pop}>
|
||||
<View className={styles.bindSalesman_header} onClick={() => onClick(1)}>
|
||||
<Image src={formatImgUrl('/mall/invite_code_success.png', '!w400')} mode="widthFix"/>
|
||||
</View>
|
||||
<View className={styles.btns} onClick = {() => onClick(2)}>
|
||||
<Image src={formatImgUrl('/mall/invite_code_btn.png', '!w400')} mode="widthFix"/>
|
||||
</View>
|
||||
{/* <CloseBtn styleObj={{backgroundImage: '', border:'2PX solid #fff', color: '#fff'}}/> */}
|
||||
</View>
|
||||
<View className={styles.bindSalesman_mask} onClick={onCloseEven}></View>
|
||||
</View>}
|
||||
</>
|
||||
)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
navigationBarTitleText: '邀请码',
|
||||
enableShareAppMessage: true,
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
.bindSalesmanPage_main{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.header_image{
|
||||
width: 240px;
|
||||
height: 188px;
|
||||
padding: 50px 0;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.inputCode{
|
||||
width: 670px;
|
||||
height: 106px;
|
||||
background: #f6f6f6;
|
||||
border: 2px solid #f0f0f0;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 0 20px 30px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
input{
|
||||
flex:1;
|
||||
z-index: 0;
|
||||
}
|
||||
.scan_code{
|
||||
width: 101px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-left: 1PX solid #ccc;
|
||||
.miconfont{
|
||||
font-size: 50px;
|
||||
color: #007AFF;
|
||||
}
|
||||
}
|
||||
.close_btn{
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
width: 670px;
|
||||
height: 90px;
|
||||
opacity: 0.6;
|
||||
background: linear-gradient(41deg,#007aff, #4fa6ff 86%, #68b4ff 100%);
|
||||
border-radius: 46px;
|
||||
text-align: center;
|
||||
line-height: 90px;
|
||||
color: #fff;
|
||||
margin-top: 50px;
|
||||
}
|
||||
.message{
|
||||
padding: 150px 30px 20px 30px;
|
||||
color: #ABABAB;
|
||||
font-size: 28px;
|
||||
text{
|
||||
display: block;
|
||||
margin-bottom: 30px;
|
||||
&:nth-child(1) {
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
import { Image, Input, Text, View } from '@tarojs/components'
|
||||
import styles from './index.module.scss'
|
||||
import useLogin from '@/use/useLogin'
|
||||
import classnames from "classnames";
|
||||
import { formatImgUrl } from '@/common/fotmat'
|
||||
import { useEffect, useState } from 'react';
|
||||
import { alert } from '@/common/common';
|
||||
import CloseBtn from '@/components/closeBtn';
|
||||
import SuccessBind from './component/successBind';
|
||||
import Taro, { useDidShow } from "@tarojs/taro";
|
||||
export default () => {
|
||||
useLogin()
|
||||
|
||||
useDidShow(() => {
|
||||
onClipboardData()
|
||||
})
|
||||
|
||||
const [submitData, setSubmitData] = useState({
|
||||
code: '',
|
||||
})
|
||||
|
||||
const onSubmit = () => {
|
||||
if(!submitData.code) alert.error('请输入邀请码')
|
||||
}
|
||||
|
||||
const onInputCode = (e) => {
|
||||
setSubmitData((val) => ({...val, code:e.detail.value}))
|
||||
}
|
||||
|
||||
const oncloseEven = () => {
|
||||
setSubmitData((val) => ({...val, code:''}))
|
||||
}
|
||||
|
||||
const onScanCode = () => {
|
||||
Taro.scanCode({
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//获取粘贴版内容
|
||||
const onClipboardData = () => {
|
||||
Taro.getClipboardData({
|
||||
success: function (res){
|
||||
console.log('res.data:::', res.data)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.bindSalesmanPage_main}>
|
||||
<View className={styles.header_image}>
|
||||
<Image src={formatImgUrl('/mall/invite_code_bg.png')} mode="aspectFill"/>
|
||||
</View>
|
||||
<View className={styles.inputCode}>
|
||||
<Input value={submitData.code} placeholder='请输入邀请码' onInput={(e) => onInputCode(e)}/>
|
||||
<View className={styles.close_btn} >
|
||||
{submitData.code&&<CloseBtn styleObj={{backgroundColor: '#ccc', color: '#fff'}} onClose={oncloseEven}/>}
|
||||
</View>
|
||||
<View className={styles.scan_code} onClick={() => onScanCode()}>
|
||||
<Text className={classnames('iconfont icon-saomazhifu', styles.miconfont)}></Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.btns} onClick={onSubmit}>提交</View>
|
||||
<View className={styles.message}>
|
||||
<Text>温馨提示</Text>
|
||||
<Text>1. 新用户授权手机号码后,7天内可以输入邀请码,超过时间不能输入。</Text>
|
||||
<Text>2. 一个手机只能输入一次邀请码。输入邀请码。</Text>
|
||||
</View>
|
||||
<View className='common_safe_area_y'></View>
|
||||
<SuccessBind show={false}/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ import Taro, { Events, useDidShow, usePullDownRefresh } from '@tarojs/taro'
|
||||
import { GetProductKindListApi, GetProductListApi } from '@/api/material'
|
||||
import useLogin from '@/use/useLogin'
|
||||
import { dataLoadingStatus } from '@/common/util'
|
||||
import BindSalesman from '@/components/bindSalesmanPopup'
|
||||
import BindSalesmanPopup from '@/components/bindSalesmanPopup'
|
||||
|
||||
export default () => {
|
||||
|
||||
@@ -105,7 +107,9 @@ export default () => {
|
||||
</View>
|
||||
<View className='common_safe_area_y'></View>
|
||||
<ShopCart show={showShopCart} onClose={() => setShowShopCart(false)} />
|
||||
<BindSalesmanPopup show={true}/>
|
||||
</View>
|
||||
|
||||
</MoveBtn>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
}
|
||||
.color_num {
|
||||
background: rgba(0,0,0, 0.5);
|
||||
border-radius: 0px 50px 0px 0px;
|
||||
border-radius: 0px 50px 0px 30px;
|
||||
font-size: $font_size_min;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
|
||||
@@ -203,7 +203,7 @@ export default () => {
|
||||
return <View key={item.id} className={styles.product_item} onClick={() => goLinkPage(item)}>
|
||||
<View className={styles.product_img}>
|
||||
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
|
||||
<View className={styles.color_num}>{(item.product_color_code)}#</View>
|
||||
<View className={styles.color_num}>{(item.product_color_code)}</View>
|
||||
</View>
|
||||
<View className={styles.product_info}>
|
||||
<View className={styles.title}>{formatHashTag(item.product_code, item.product_name)}</View>
|
||||
|
||||
Reference in New Issue
Block a user