Merge branch 'dev' of ssh://git.online.zzfzyc.com:10022/mp/EShop into dev
This commit is contained in:
commit
523946db67
1978
package-lock.json
generated
1978
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -37,6 +37,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.7.7",
|
"@babel/runtime": "^7.7.7",
|
||||||
"@tarojs/components": "3.3.10",
|
"@tarojs/components": "3.3.10",
|
||||||
|
"@tarojs/plugin-framework-react": "^3.4.12",
|
||||||
"@tarojs/react": "3.3.10",
|
"@tarojs/react": "3.3.10",
|
||||||
"@tarojs/runtime": "3.3.10",
|
"@tarojs/runtime": "3.3.10",
|
||||||
"@tarojs/taro": "3.3.10",
|
"@tarojs/taro": "3.3.10",
|
||||||
|
@ -1,13 +1,47 @@
|
|||||||
{
|
{
|
||||||
"miniprogramRoot": "./dist",
|
"miniprogramRoot": "dist/",
|
||||||
"projectname": "EShop",
|
"projectname": "EShop",
|
||||||
"description": "电子商城",
|
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"appid": "wx68d92d7cbf0b6963",
|
"appid": "wx68d92d7cbf0b6963",
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": true,
|
"urlCheck": true,
|
||||||
"es6": false,
|
"es6": false,
|
||||||
"postcss": false,
|
"postcss": false,
|
||||||
"minified": false
|
"minified": false,
|
||||||
|
"coverView": true,
|
||||||
|
"lazyloadPlaceholderEnable": false,
|
||||||
|
"preloadBackgroundData": false,
|
||||||
|
"autoAudits": false,
|
||||||
|
"uglifyFileName": false,
|
||||||
|
"uploadWithSourceMap": true,
|
||||||
|
"enhance": true,
|
||||||
|
"useMultiFrameRuntime": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmManually": false,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"minifyWXSS": true,
|
||||||
|
"useStaticServer": true,
|
||||||
|
"showES6CompileOption": false,
|
||||||
|
"checkInvalidKey": true,
|
||||||
|
"compileHotReLoad": true,
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
},
|
||||||
|
"disableUseStrict": false,
|
||||||
|
"useCompilerPlugins": false
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram"
|
"compileType": "miniprogram",
|
||||||
}
|
"libVersion": "2.24.5",
|
||||||
|
"srcMiniprogramRoot": "dist/",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
12
src/api/mine.ts
Normal file
12
src/api/mine.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { useRequest } from "@/use/useHttp"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户资产
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const userassets = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/user/assets`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
@ -5,12 +5,12 @@
|
|||||||
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
||||||
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
||||||
export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
||||||
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
|
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
|
||||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||||
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
||||||
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `http://192.168.1.224:50002/lymarket` // 添
|
export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
|
||||||
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
||||||
|
|
||||||
// CDN
|
// CDN
|
||||||
|
@ -55,9 +55,9 @@ export default ()=>{
|
|||||||
const rules = {
|
const rules = {
|
||||||
name: [{
|
name: [{
|
||||||
message: "请输入正确收货人姓名",
|
message: "请输入正确收货人姓名",
|
||||||
validator: (value:any, rule:any)=>{ // 自定义验证,返回true表示匹配到了(错误)
|
// validator: (value:any, rule:any)=>{ // 自定义验证,返回true表示匹配到了(错误)
|
||||||
return value.length>5;
|
// return value.length>5;
|
||||||
}
|
// }
|
||||||
}],
|
}],
|
||||||
phone: [{
|
phone: [{
|
||||||
message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
|
message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import FromListCertification from "@/components/FromListCertification"
|
import FromListCertification from "@/components/FromListCertification"
|
||||||
import { Button, Image, Input, NavigationBar, Navigator, Text, Textarea, View } from "@tarojs/components"
|
import { Button, Image, Input, NavigationBar, Navigator, Text, Textarea, View } from "@tarojs/components"
|
||||||
import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
|
import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
|
||||||
import {certificationSaveApi, certificationDetailApi} from "@/api/certification"
|
import { certificationSaveApi, certificationDetailApi } from "@/api/certification"
|
||||||
import { useEffect, useRef, useState } from "react"
|
import { useEffect, useRef, useState } from "react"
|
||||||
import { alert, retrieval } from "@/common/common"
|
import { alert, retrieval } from "@/common/common"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
@ -13,19 +13,19 @@ import SelectEnterpriseType from "./components/SelectEnterpriseType"
|
|||||||
import { useSelector } from "@/reducers/hooks";
|
import { useSelector } from "@/reducers/hooks";
|
||||||
import useLogin from "@/use/useLogin";
|
import useLogin from "@/use/useLogin";
|
||||||
|
|
||||||
export default ()=>{
|
export default () => {
|
||||||
const { getAdminUserInfo } = useLogin();
|
const { getAdminUserInfo } = useLogin();
|
||||||
const {adminUserInfo} = useSelector(state => state.userInfo);
|
const { adminUserInfo } = useSelector(state => state.userInfo);
|
||||||
useEffect(()=>{
|
useEffect(() => {
|
||||||
initalFormData();
|
initalFormData();
|
||||||
},[]);
|
}, []);
|
||||||
// 获取认证信息
|
// 获取认证信息
|
||||||
const {fetchData: getFromData} = certificationDetailApi()
|
const { fetchData: getFromData } = certificationDetailApi()
|
||||||
const initalFormData = async ()=>{
|
const initalFormData = async () => {
|
||||||
const detail = await getFromData();
|
const detail = await getFromData();
|
||||||
setFormData({
|
setFormData({
|
||||||
...detail.data??{},
|
...detail.data ?? {},
|
||||||
legal_person_identity_url: detail?.data?.legal_person_identity_url??[],
|
legal_person_identity_url: detail?.data?.legal_person_identity_url ?? [],
|
||||||
// business_license_url: "https://test.cdn.zzfzyc.com/mall/827082e888860dd9da10f0fbb0ac3cf023081456.png"
|
// business_license_url: "https://test.cdn.zzfzyc.com/mall/827082e888860dd9da10f0fbb0ac3cf023081456.png"
|
||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
@ -36,6 +36,7 @@ export default ()=>{
|
|||||||
business_license_url: "",
|
business_license_url: "",
|
||||||
legal_person: "",
|
legal_person: "",
|
||||||
legal_person_identity: "",
|
legal_person_identity: "",
|
||||||
|
businessLicense: '',
|
||||||
legal_person_identity_url: [],
|
legal_person_identity_url: [],
|
||||||
name: ""
|
name: ""
|
||||||
});
|
});
|
||||||
@ -54,48 +55,48 @@ export default ()=>{
|
|||||||
}],
|
}],
|
||||||
legal_person_identity: [{
|
legal_person_identity: [{
|
||||||
message: "请输入正确法人身份证",
|
message: "请输入正确法人身份证",
|
||||||
regex: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
regex: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||||
}],
|
}],
|
||||||
legal_person_identity_url: [{
|
legal_person_identity_url: [{
|
||||||
message: "请上传法人身份证",
|
message: "请上传法人身份证",
|
||||||
validator: (value:any, rule:any)=>{
|
validator: (value: any, rule: any) => {
|
||||||
if(!value[0]||!value[1]){
|
if (!value[0] || !value[1]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
}
|
}
|
||||||
const {fetchData} = certificationSaveApi()
|
const { fetchData } = certificationSaveApi()
|
||||||
const handleSave = ()=>{
|
const handleSave = () => {
|
||||||
retrieval(formData, rules).then(async ()=>{
|
retrieval(formData, rules).then(async () => {
|
||||||
const result = await fetchData({...formData, authentication_type: 2})
|
const result = await fetchData({ ...formData, authentication_type: 2 })
|
||||||
if(result.success){
|
if (result.success) {
|
||||||
// Taro.eventCenter.trigger("weightList:refresh");
|
// Taro.eventCenter.trigger("weightList:refresh");
|
||||||
getAdminUserInfo();
|
getAdminUserInfo();
|
||||||
Taro.navigateBack();
|
Taro.navigateBack();
|
||||||
alert.success("保存成功");
|
alert.success("保存成功");
|
||||||
}else{
|
} else {
|
||||||
alert.error(result.msg);
|
alert.error(result.msg);
|
||||||
}
|
}
|
||||||
}).catch((message)=>{
|
}).catch((message) => {
|
||||||
alert.none(message)
|
alert.none(message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 监听表单完善
|
// 监听表单完善
|
||||||
const [hozon, setHozon] = useState(false);
|
const [hozon, setHozon] = useState(false);
|
||||||
useEffect(()=>{
|
useEffect(() => {
|
||||||
if(retrieval){
|
if (retrieval) {
|
||||||
retrieval(formData).then(()=>setHozon(true)).catch(()=>setHozon(false))
|
retrieval(formData).then(() => setHozon(true)).catch(() => setHozon(false))
|
||||||
}
|
}
|
||||||
},[formData])
|
}, [formData])
|
||||||
// 选择类型弹窗显示
|
// 选择类型弹窗显示
|
||||||
const selectTypeRef= useRef(null)
|
const selectTypeRef = useRef(null)
|
||||||
const handleSelectTypeModalShow = ()=>{
|
const handleSelectTypeModalShow = () => {
|
||||||
(selectTypeRef.current as any).setShow(true)
|
(selectTypeRef.current as any).setShow(true)
|
||||||
}
|
}
|
||||||
// 选择类型确定
|
// 选择类型确定
|
||||||
const handleSelectTypeConfirm = (item)=>{
|
const handleSelectTypeConfirm = (item) => {
|
||||||
setFormData({
|
setFormData({
|
||||||
...formData,
|
...formData,
|
||||||
authentication_type: item.id,
|
authentication_type: item.id,
|
||||||
@ -103,18 +104,18 @@ export default ()=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 上传图片
|
// 上传图片
|
||||||
const {getWxPhoto} = useUploadCDNImg();
|
const { getWxPhoto } = useUploadCDNImg();
|
||||||
const handleUploadImage = async (text: any)=>{
|
const handleUploadImage = async (text: any) => {
|
||||||
let result = await getWxPhoto('mall');
|
let result = await getWxPhoto('mall');
|
||||||
if(text=="business_license_url"){
|
if (text == "business_license_url") {
|
||||||
formData.business_license_url = IMG_CND_Prefix+(result as any).url;
|
formData.business_license_url = IMG_CND_Prefix + (result as any).url;
|
||||||
}else{
|
} else {
|
||||||
formData.legal_person_identity_url[text]=IMG_CND_Prefix+(result as any).url as never;
|
formData.legal_person_identity_url[text] = IMG_CND_Prefix + (result as any).url as never;
|
||||||
}
|
}
|
||||||
setFormData({...formData});
|
setFormData({ ...formData });
|
||||||
}
|
}
|
||||||
// 查看图片
|
// 查看图片
|
||||||
const handleViewImage = (event,url)=>{
|
const handleViewImage = (event, url) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
Taro.previewImage({
|
Taro.previewImage({
|
||||||
current: url,
|
current: url,
|
||||||
@ -124,71 +125,72 @@ export default ()=>{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="certification">
|
<View className="certification">
|
||||||
{(adminUserInfo as any)?.authentication_status==3&&<Message text={`认证不通过,原因:${(formData as any).authentication_feedback},请重新认证`}/>}
|
{(adminUserInfo as any)?.authentication_status == 3 && <Message text={`认证不通过,原因:${(formData as any).authentication_feedback},请重新认证`} />}
|
||||||
<View className="certification-content">
|
<View className="certification-content">
|
||||||
<View className="certification-title">企业认证</View>
|
<View className="certification-title">企业认证</View>
|
||||||
{/* <FromListCertification type="select" onClick={handleSelectTypeModalShow} value={(formData as any)?.authentication_type_name} label="认证类型" placeholder="企业认证"/> */}
|
{/* <FromListCertification type="select" onClick={handleSelectTypeModalShow} value={(formData as any)?.authentication_type_name} label="认证类型" placeholder="企业认证"/> */}
|
||||||
<SelectEnterpriseType ref={selectTypeRef} confirm={handleSelectTypeConfirm} />
|
<SelectEnterpriseType ref={selectTypeRef} confirm={handleSelectTypeConfirm} />
|
||||||
<FromListCertification onInput={(ev:any)=>setFormData({...formData,name:ev.detail.value})} value={formData["name"]} label="企业名称" placeholder="请输入营业执照上的企业名称" required/>
|
<FromListCertification onInput={(ev: any) => setFormData({ ...formData, name: ev.detail.value })} value={formData["name"]} label="企业名称" placeholder="请输入营业执照上的企业名称" required />
|
||||||
<FromListCertification type="select" style={{border: "0"}}label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required showIcon={false}/>
|
{/* <FromListCertification type="select" style={{border: "0"}}label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required showIcon={false}/> */}
|
||||||
<View onClick={()=>handleUploadImage("business_license_url")} className="certification-upload">
|
<FromListCertification onInput={(ev: any) => setFormData({ ...formData, businessLicense: ev.detail.value })} value={formData["businessLicense"]} style={{ border: "0" }} label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required />
|
||||||
{(formData as any)?.business_license_url?
|
<View onClick={() => handleUploadImage("business_license_url")} className="certification-upload">
|
||||||
<>
|
{(formData as any)?.business_license_url ?
|
||||||
<Text>营业执照正面</Text>
|
<>
|
||||||
<View className="certification-button">
|
<Text>营业执照正面</Text>
|
||||||
<View onClick={(e)=>handleViewImage(e,(formData as any)?.business_license_url)}>查看证件</View>
|
<View className="certification-button">
|
||||||
<View>重新上传</View>
|
<View onClick={(e) => handleViewImage(e, (formData as any)?.business_license_url)}>查看证件</View>
|
||||||
|
<View>重新上传</View>
|
||||||
|
</View>
|
||||||
|
<Image mode="aspectFit" src={(formData as any)?.business_license_url} />
|
||||||
|
</> :
|
||||||
|
<View className="certification-upload-no">
|
||||||
|
<View className="certification-upload-no-icon">+</View>
|
||||||
|
<View className="certification-upload-no-tips">上传营业执照正面</View>
|
||||||
</View>
|
</View>
|
||||||
<Image mode="aspectFit" src={(formData as any)?.business_license_url}/>
|
|
||||||
</>:
|
|
||||||
<View className="certification-upload-no">
|
|
||||||
<View className="certification-upload-no-icon">+</View>
|
|
||||||
<View className="certification-upload-no-tips">上传营业执照正面</View>
|
|
||||||
</View>
|
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="certification-content">
|
<View className="certification-content">
|
||||||
<View className="certification-title">法人认证</View>
|
<View className="certification-title">法人认证</View>
|
||||||
<FromListCertification onInput={(ev:any)=>setFormData({...formData,legal_person:ev.detail.value})} value={formData["legal_person"]} label="法人代表" placeholder="填写法人名称" required/>
|
<FromListCertification onInput={(ev: any) => setFormData({ ...formData, legal_person: ev.detail.value })} value={formData["legal_person"]} label="法人代表" placeholder="填写法人名称" required />
|
||||||
<FromListCertification style={{border: "0"}} onInput={(ev:any)=>setFormData({...formData,legal_person_identity:ev.detail.value})} value={formData["legal_person_identity"]} label="法人身份" placeholder="填写法人代表身份证号" required/>
|
<FromListCertification style={{ border: "0" }} onInput={(ev: any) => setFormData({ ...formData, legal_person_identity: ev.detail.value })} value={formData["legal_person_identity"]} label="法人身份" placeholder="填写法人代表身份证号" required />
|
||||||
<View onClick={()=>handleUploadImage(0)} className="certification-upload">
|
<View onClick={() => handleUploadImage(0)} className="certification-upload">
|
||||||
{(formData as any)?.legal_person_identity_url[0]?
|
{(formData as any)?.legal_person_identity_url[0] ?
|
||||||
<>
|
<>
|
||||||
<Text>营业执照正面</Text>
|
<Text>营业执照正面</Text>
|
||||||
<View className="certification-button">
|
<View className="certification-button">
|
||||||
<View onClick={(e)=>handleViewImage(e,(formData as any)?.legal_person_identity_url[0])}>查看证件</View>
|
<View onClick={(e) => handleViewImage(e, (formData as any)?.legal_person_identity_url[0])}>查看证件</View>
|
||||||
<View>重新上传</View>
|
<View>重新上传</View>
|
||||||
</View>
|
</View>
|
||||||
<Image mode="aspectFit" src={(formData as any)?.legal_person_identity_url[0]}/>
|
<Image mode="aspectFit" src={(formData as any)?.legal_person_identity_url[0]} />
|
||||||
</>:
|
</> :
|
||||||
<View className="certification-upload-no">
|
<View className="certification-upload-no">
|
||||||
<View className="certification-upload-no-icon">+</View>
|
<View className="certification-upload-no-icon">+</View>
|
||||||
<View className="certification-upload-no-tips">上传身份证正面</View>
|
<View className="certification-upload-no-tips">上传身份证正面</View>
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
<View onClick={()=>handleUploadImage(1)} className="certification-upload">
|
<View onClick={() => handleUploadImage(1)} className="certification-upload">
|
||||||
{(formData as any)?.legal_person_identity_url[1]?
|
{(formData as any)?.legal_person_identity_url[1] ?
|
||||||
<>
|
<>
|
||||||
<Text>营业执照正面</Text>
|
<Text>营业执照正面</Text>
|
||||||
<View className="certification-button">
|
<View className="certification-button">
|
||||||
<View onClick={(e)=>handleViewImage(e,(formData as any)?.legal_person_identity_url[1])}>查看证件</View>
|
<View onClick={(e) => handleViewImage(e, (formData as any)?.legal_person_identity_url[1])}>查看证件</View>
|
||||||
<View>重新上传</View>
|
<View>重新上传</View>
|
||||||
</View>
|
|
||||||
<Image mode="aspectFit" src={(formData as any)?.legal_person_identity_url[1]}/>
|
|
||||||
</>:
|
|
||||||
<View className="certification-upload-no">
|
|
||||||
<View className="certification-upload-no-icon">+</View>
|
|
||||||
<View className="certification-upload-no-tips">上传身份证正面</View>
|
|
||||||
</View>
|
</View>
|
||||||
}
|
<Image mode="aspectFit" src={(formData as any)?.legal_person_identity_url[1]} />
|
||||||
|
</> :
|
||||||
|
<View className="certification-upload-no">
|
||||||
|
<View className="certification-upload-no-icon">+</View>
|
||||||
|
<View className="certification-upload-no-tips">上传身份证正面</View>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="certification-footer">
|
<View className="certification-footer">
|
||||||
<View className="certification-footer-button">
|
<View className="certification-footer-button">
|
||||||
<Navigator openType="navigateBack">取消</Navigator>
|
<Navigator openType="navigateBack">取消</Navigator>
|
||||||
<View onClick={handleSave}>{[3,4].includes((adminUserInfo as any)?.authentication_status)?"重新认证":"提交"}</View>
|
<View onClick={handleSave}>{[3, 4].includes((adminUserInfo as any)?.authentication_status) ? "重新认证" : "提交"}</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {View} from '@tarojs/components'
|
import { View } from '@tarojs/components'
|
||||||
import Banner from '@/components/banner'
|
import Banner from '@/components/banner'
|
||||||
import Search from '@/components/search'
|
import Search from '@/components/search'
|
||||||
import SideBar from '@/components/sideBar'
|
import SideBar from '@/components/sideBar'
|
||||||
@ -6,16 +6,17 @@ import Product from '@/components/product'
|
|||||||
import MoveBtn from '@/components/moveBtn'
|
import MoveBtn from '@/components/moveBtn'
|
||||||
import ShopCart from '@/components/shopCart'
|
import ShopCart from '@/components/shopCart'
|
||||||
import { goLink } from '@/common/common'
|
import { goLink } from '@/common/common'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import Taro, { Events, useDidShow, usePullDownRefresh} from '@tarojs/taro'
|
import { useSelector } from "@/reducers/hooks";
|
||||||
import {GetProductKindListApi, GetProductListApi} from '@/api/material'
|
import Taro, { Events, useDidShow, usePullDownRefresh } from '@tarojs/taro'
|
||||||
|
import { GetProductKindListApi, GetProductListApi } from '@/api/material'
|
||||||
import useLogin from '@/use/useLogin'
|
import useLogin from '@/use/useLogin'
|
||||||
import { dataLoadingStatus } from '@/common/util'
|
import { dataLoadingStatus } from '@/common/util'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
|
||||||
const {checkLogin} = useLogin()
|
const { checkLogin } = useLogin()
|
||||||
useDidShow(async () => {
|
useDidShow(async () => {
|
||||||
await checkLogin()
|
await checkLogin()
|
||||||
})
|
})
|
||||||
@ -25,32 +26,33 @@ export default () => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
//获取面料种类
|
//获取面料种类
|
||||||
const [kindData, setKindData] = useState<any>({list:[], defaultId:0})
|
const [kindData, setKindData] = useState<any>({ list: [], defaultId: 0 })
|
||||||
const {fetchData} = GetProductKindListApi()
|
const { fetchData } = GetProductKindListApi()
|
||||||
const categoryList = async () => {
|
const categoryList = async () => {
|
||||||
const res = await fetchData()
|
const res = await fetchData()
|
||||||
if(res.data?.list) {
|
if (res.data?.list) {
|
||||||
setKindData({...kindData, list:res.data.list, defaultId: res.data.list[0].id})
|
setKindData({ ...kindData, list: res.data.list, defaultId: res.data.list[0].id })
|
||||||
setFiltrate({...filtrate, product_kind_id:res.data.list[0].id})
|
setFiltrate({ ...filtrate, product_kind_id: res.data.list[0].id })
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取面料列表
|
//获取面料列表
|
||||||
const [productData, setProductData] = useState({list:[], total:0})
|
const [productData, setProductData] = useState({ list: [], total: 0 })
|
||||||
const [hasMore, setHasMore] = useState(true)
|
const [hasMore, setHasMore] = useState(true)
|
||||||
const [filtrate, setFiltrate] = useState({product_kind_id:0, size: 5,page: 1})
|
const [filtrate, setFiltrate] = useState({ product_kind_id: 0, size: 5, page: 1 })
|
||||||
const pageNum = useRef({size:filtrate.size, page:filtrate.page})
|
const pageNum = useRef({ size: filtrate.size, page: filtrate.page })
|
||||||
const {fetchData: productFetchData, state: productState} = GetProductListApi()
|
const { fetchData: productFetchData, state: productState } = GetProductListApi()
|
||||||
//获取数据方法
|
//获取数据方法
|
||||||
const getProductList = async () => {
|
const getProductList = async () => {
|
||||||
const {data,total} = await productFetchData(filtrate)
|
const { data, total } = await productFetchData(filtrate)
|
||||||
setProductData({...productData,list:data.list,total})
|
setProductData({ ...productData, list: data.list, total })
|
||||||
setRefresherTriggeredStatus(() => false)
|
setRefresherTriggeredStatus(() => false)
|
||||||
}
|
}
|
||||||
//监听查询条件
|
//监听查询条件
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(filtrate.product_kind_id)
|
|
||||||
|
if (filtrate.product_kind_id)
|
||||||
getProductList()
|
getProductList()
|
||||||
}, [filtrate])
|
}, [filtrate])
|
||||||
|
|
||||||
@ -58,30 +60,30 @@ export default () => {
|
|||||||
//点击面料类型
|
//点击面料类型
|
||||||
const getProductKindId = useCallback((e) => {
|
const getProductKindId = useCallback((e) => {
|
||||||
pageNum.current.page = 1
|
pageNum.current.page = 1
|
||||||
setProductData({list:[], total:0})
|
setProductData({ list: [], total: 0 })
|
||||||
setFiltrate((list) => ({...list, size:5, product_kind_id:e.id}))
|
setFiltrate((list) => ({ ...list, size: 5, product_kind_id: e.id }))
|
||||||
// setHasMore(true)
|
// setHasMore(true)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
//上拉加载数据
|
//上拉加载数据
|
||||||
const getScrolltolower = useCallback(() => {
|
const getScrolltolower = useCallback(() => {
|
||||||
if(productData.list.length >= productData.total) {
|
if (productData.list.length >= productData.total) {
|
||||||
setHasMore(false)
|
setHasMore(false)
|
||||||
} else {
|
} else {
|
||||||
pageNum.current.page++
|
pageNum.current.page++
|
||||||
const newSize = pageNum.current.size * pageNum.current.page
|
const newSize = pageNum.current.size * pageNum.current.page
|
||||||
setFiltrate((e) => ({...e, size:newSize}))
|
setFiltrate((e) => ({ ...e, size: newSize }))
|
||||||
}
|
}
|
||||||
}, [productData])
|
}, [productData])
|
||||||
|
|
||||||
|
|
||||||
const [showShopCart, setShowShopCart] = useState(false)
|
const [showShopCart, setShowShopCart] = useState(false)
|
||||||
|
|
||||||
//列表下拉刷新
|
//列表下拉刷新
|
||||||
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
|
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
|
||||||
const getRefresherRefresh = async () => {
|
const getRefresherRefresh = async () => {
|
||||||
pageNum.current.page = 1
|
pageNum.current.page = 1
|
||||||
setFiltrate({...filtrate, size:5})
|
setFiltrate({ ...filtrate, size: 5 })
|
||||||
setHasMore(true)
|
setHasMore(true)
|
||||||
setRefresherTriggeredStatus(true)
|
setRefresherTriggeredStatus(true)
|
||||||
}
|
}
|
||||||
@ -95,26 +97,85 @@ export default () => {
|
|||||||
|
|
||||||
//数据加载状态
|
//数据加载状态
|
||||||
const statusMore = useMemo(() => {
|
const statusMore = useMemo(() => {
|
||||||
return dataLoadingStatus({list:productData.list, total: productData.total, status: productState.loading})
|
return dataLoadingStatus({ list: productData.list, total: productData.total, status: productState.loading })
|
||||||
}, [productData, productState.loading])
|
}, [productData, productState.loading])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getShow()
|
||||||
|
}, [])
|
||||||
|
// const [time, setShow] = useState(false)
|
||||||
|
//拿状态存储的东西判断
|
||||||
|
const { adminUserInfo } = useSelector(state => state.userInfo);
|
||||||
|
const getShow = () => {
|
||||||
|
if (adminUserInfo?.authentication_status === 0 || adminUserInfo?.authentication_status === 1 || adminUserInfo?.authentication_status === 2 || adminUserInfo?.authentication_status === 3) {
|
||||||
|
//倒计时弹出去认证
|
||||||
|
const countTime: any = 60
|
||||||
|
//获取倒计时的变量
|
||||||
|
var time = parseInt(countTime);
|
||||||
|
const countDown = setInterval(() => {
|
||||||
|
if (time == 0) {
|
||||||
|
Taro.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '你还未认证,认证后解锁更多功能',
|
||||||
|
cancelText: '稍后认证',
|
||||||
|
confirmText: '去认证',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
Taro.navigateTo({ url: '/pages/certification/index' })
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//清除定时器
|
||||||
|
clearInterval(countDown);
|
||||||
|
} else {
|
||||||
|
time--;
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//检查认证是否认证
|
||||||
|
const checkShow = () => {
|
||||||
|
if (adminUserInfo.authentication_status === 0 || adminUserInfo.authentication_status === 1 || adminUserInfo.authentication_status === 2 || adminUserInfo.authentication_status === 3) {
|
||||||
|
Taro.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '你还未认证,认证后解锁更多功能',
|
||||||
|
cancelText: '稍后认证',
|
||||||
|
confirmText: '去认证',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
Taro.navigateTo({ url: '/pages/certification/index' })
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
setShowShopCart(!showShopCart)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MoveBtn onClick={() => setShowShopCart(!showShopCart)}>
|
<MoveBtn onClick={() => checkShow()}>
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<Banner/>
|
<Banner />
|
||||||
<View className={styles.search}>
|
<View className={styles.search}>
|
||||||
<View className={styles.search_collect}>我的收藏</View>
|
<View className={styles.search_collect}>我的收藏</View>
|
||||||
<View className={styles.search_input} onClick={() => goLink('/pages/searchList/search')}>
|
<View className={styles.search_input} onClick={() => goLink('/pages/searchList/search')}>
|
||||||
<Search disabled={true} style={{width: '263rpx'}} />
|
<Search disabled={true} style={{ width: '263rpx' }} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.products}>
|
<View className={styles.products}>
|
||||||
<SideBar list={kindData.list} height="100%" defaultValue={kindData.defaultId} hasMore={hasMore} statusMore={statusMore} selfOnScrolltolower={getScrolltolower} sideBarOnClick={getProductKindId} heightItem={150} refresherTriggered={refresherTriggeredStatus} selfOnRefresherRefresh={() => getRefresherRefresh()}>
|
<SideBar list={kindData.list} height="100%" defaultValue={kindData.defaultId} hasMore={hasMore} statusMore={statusMore} selfOnScrolltolower={getScrolltolower} sideBarOnClick={getProductKindId} heightItem={150} refresherTriggered={refresherTriggeredStatus} selfOnRefresherRefresh={() => getRefresherRefresh()}>
|
||||||
<Product productList={productData.list}/>
|
<Product productList={productData.list} />
|
||||||
</SideBar>
|
</SideBar>
|
||||||
</View>
|
</View>
|
||||||
<View className='common_safe_area_y'></View>
|
<View className='common_safe_area_y'></View>
|
||||||
<ShopCart show={showShopCart} onClose={() => setShowShopCart(false)}/>
|
<ShopCart show={showShopCart} onClose={() => setShowShopCart(false)} />
|
||||||
</View>
|
</View>
|
||||||
</MoveBtn>
|
</MoveBtn>
|
||||||
)
|
)
|
||||||
|
@ -1,73 +1,94 @@
|
|||||||
.main{
|
.main {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
.header{
|
|
||||||
|
.header {
|
||||||
background: #68b4ff;
|
background: #68b4ff;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
height: 560px;
|
height: 560px;
|
||||||
position: relative;
|
position: relative;
|
||||||
.card-main{
|
|
||||||
|
.card-main {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.auth-suspension{
|
|
||||||
|
.auth-suspension {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;inset: 0;
|
z-index: 1;
|
||||||
|
inset: 0;
|
||||||
}
|
}
|
||||||
.header-card{
|
|
||||||
position: absolute;left: 50%;bottom: -18%;
|
.header-card {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
bottom: -18%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
.crad{
|
|
||||||
width: 702px;
|
.crad {
|
||||||
background: rgba(255,255,255,0.95);
|
width: 702px;
|
||||||
border-radius: 20px;
|
background: rgba(255, 255, 255, 0.95);
|
||||||
padding: 30px;
|
border-radius: 20px;
|
||||||
box-sizing: border-box;
|
padding: 30px;
|
||||||
box-shadow: 0px 6px 12px 0px rgba(0,0,0,0.05);
|
box-sizing: border-box;
|
||||||
|
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
.card-info{
|
|
||||||
display: flex;justify-content: space-between;
|
.card-info {
|
||||||
position: absolute;top: -15%;left: 0;right: 0;
|
display: flex;
|
||||||
width: 702px;
|
justify-content: space-between;
|
||||||
padding: 0 30px;
|
position: absolute;
|
||||||
box-sizing: border-box;
|
top: -15%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 702px;
|
||||||
|
padding: 0 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.arcd-info-left{
|
|
||||||
display: flex;align-items: flex-end;
|
.arcd-info-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
.arcd-info-left-portrait{
|
|
||||||
width: 170px;
|
.arcd-info-left-portrait {
|
||||||
height: 170px;
|
width: 170px;
|
||||||
background: rgba(0,0,0,0.00);
|
height: 170px;
|
||||||
border: 4px solid #ffffff;
|
background: rgba(0, 0, 0, 0.00);
|
||||||
border-radius: 50%;
|
border: 4px solid #ffffff;
|
||||||
overflow: hidden;
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.arcd-info-left-portrait image{
|
|
||||||
width: 100%;
|
.arcd-info-left-portrait image {
|
||||||
height: 100%;
|
width: 100%;
|
||||||
object-fit: cover;
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.arcd-info-left-desc{
|
|
||||||
margin-left: 24px;
|
.arcd-info-left-desc {
|
||||||
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
.arcd-info-left-nickname{
|
|
||||||
font-size: 44px;
|
.arcd-info-left-nickname {
|
||||||
font-weight: 700;
|
font-size: 44px;
|
||||||
color: #000000;
|
font-weight: 700;
|
||||||
display: flex;
|
color: #000000;
|
||||||
align-items: center;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.arcd-info-left-phone{
|
|
||||||
|
.arcd-info-left-phone {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
.arcd-info-left-phone button{
|
|
||||||
|
.arcd-info-left-phone button {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
@ -76,39 +97,50 @@
|
|||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
display: flex;align-items: center;justify-content: center;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.card-info-right{
|
|
||||||
font-size: 26px;
|
.card-info-right {
|
||||||
display: flex;align-items: flex-end;
|
font-size: 26px;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
.setup-icon{
|
|
||||||
|
.setup-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
.icon-wrapper{
|
|
||||||
|
.icon-wrapper {
|
||||||
font-size: 60px;
|
font-size: 60px;
|
||||||
}
|
}
|
||||||
.icon-point{
|
|
||||||
|
.icon-point {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #ff0000;
|
background: #ff0000;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;top: 0;
|
right: 0;
|
||||||
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-main{
|
.card-main {
|
||||||
margin: 20px auto 0;
|
margin: 20px auto 0;
|
||||||
}
|
}
|
||||||
.card-main-title{
|
|
||||||
display: flex;justify-content: space-between;
|
.card-main-title {
|
||||||
align-items: center;
|
display: flex;
|
||||||
border-bottom: 2px solid #dddddd;
|
justify-content: space-between;
|
||||||
padding: 0 5px 15px;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
border-bottom: 2px solid #dddddd;
|
||||||
|
padding: 0 5px 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.card-main-title text{
|
|
||||||
|
.card-main-title text {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #ababab;
|
color: #ababab;
|
||||||
@ -116,23 +148,27 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
.card-main-title-content{
|
|
||||||
display: grid;
|
.card-main-title-content {
|
||||||
grid-template-columns: repeat(5,1fr);
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 1fr);
|
||||||
}
|
}
|
||||||
.card-main-title-content-item{
|
|
||||||
font-size: 24px;
|
.card-main-title-content-item {
|
||||||
font-weight: 400;
|
font-size: 24px;
|
||||||
color: #3c3c3c;
|
font-weight: 400;
|
||||||
text-align: center;
|
color: #3c3c3c;
|
||||||
margin-top: 30px;
|
text-align: center;
|
||||||
position: relative;
|
margin-top: 30px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.card-main-title-content-item Text{
|
|
||||||
|
.card-main-title-content-item Text {
|
||||||
font-size: 56px;
|
font-size: 56px;
|
||||||
color: #3C3C3C;
|
color: #3C3C3C;
|
||||||
}
|
}
|
||||||
.card-main-title-content-item-badge{
|
|
||||||
|
.card-main-title-content-item-badge {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
background: #007aff;
|
background: #007aff;
|
||||||
@ -143,106 +179,140 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
display: flex;align-items: center;justify-content: center;
|
display: flex;
|
||||||
position: absolute;top: -10px;right: 0;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
top: -10px;
|
||||||
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.assets-title{
|
.assets-title {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #3c3c3c;
|
color: #3c3c3c;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.assets-content{
|
|
||||||
|
.assets-content {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3,1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
.assets-content>view,.assets-content>navigator{
|
|
||||||
|
.assets-content>view,
|
||||||
|
.assets-content>navigator {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.assets-content-item-top{
|
|
||||||
|
.assets-content-item-top {
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.assets-content-item-top-before{
|
|
||||||
|
.assets-content-item-top-before {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.assets-content-item-top-content{
|
|
||||||
|
.assets-content-item-top-content {
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
}
|
}
|
||||||
.assets-content-item-top-after{
|
|
||||||
|
.assets-content-item-top-after {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.assets-content-item-tips{
|
|
||||||
|
.assets-content-item-tips {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-card{
|
.main-card {
|
||||||
margin: 131px auto 0;
|
margin: 131px auto 0;
|
||||||
}
|
}
|
||||||
.card-feature{
|
|
||||||
|
.card-feature {
|
||||||
margin-bottom: 50px;
|
margin-bottom: 50px;
|
||||||
}
|
}
|
||||||
.card-main-list-content-item{
|
|
||||||
display: flex;align-items: center;
|
.card-main-list-content-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
}
|
}
|
||||||
.card-main-list-content-item-left{
|
|
||||||
|
.card-main-list-content-item-left {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
display: flex;align-items: center;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.card-main-list-content-item-left text{
|
|
||||||
|
.card-main-list-content-item-left text {
|
||||||
margin-right: 35px;
|
margin-right: 35px;
|
||||||
font-size: 56px;
|
font-size: 56px;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
.card-main-list-content-item-right text{
|
|
||||||
|
.card-main-list-content-item-right text {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth{
|
.auth {
|
||||||
margin-top: 115px;
|
margin-top: 115px;
|
||||||
}
|
}
|
||||||
.auth-top{
|
|
||||||
display: flex;align-items: center;justify-content: space-between;
|
.auth-top {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.auth-status{
|
|
||||||
|
.auth-status {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
background: #dddddd;
|
background: #dddddd;
|
||||||
border-radius: 10px 4px 0px 0px;
|
border-radius: 10px 4px 0px 0px;
|
||||||
display: flex;align-items: center;justify-content: center;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
.auth-status,.auth-status-ongoing{
|
|
||||||
|
.auth-status,
|
||||||
|
.auth-status-ongoing {
|
||||||
color: #EE7500;
|
color: #EE7500;
|
||||||
background-color: #FFE6CE;
|
background-color: #FFE6CE;
|
||||||
}
|
}
|
||||||
.auth-status,.auth-status-adopt{
|
|
||||||
|
.auth-status,
|
||||||
|
.auth-status-adopt {
|
||||||
color: #007AFF;
|
color: #007AFF;
|
||||||
background-color: #CDE5FF;
|
background-color: #CDE5FF;
|
||||||
}
|
}
|
||||||
.auth-tips{
|
|
||||||
|
.auth-tips {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.auth-tips,.auth-tips-adopt{
|
|
||||||
|
.auth-tips,
|
||||||
|
.auth-tips-adopt {
|
||||||
color: #ABABAB;
|
color: #ABABAB;
|
||||||
}
|
}
|
||||||
.auth-tips text{
|
|
||||||
|
.auth-tips text {
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
.auth-company{
|
|
||||||
|
.auth-company {
|
||||||
height: 70px;
|
height: 70px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
@ -251,35 +321,46 @@
|
|||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
display: flex;align-items: center;justify-content: center;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.auth-company,.auth-company-adopt{
|
|
||||||
|
.auth-company,
|
||||||
|
.auth-company-adopt {
|
||||||
background: #ecf5ff;
|
background: #ecf5ff;
|
||||||
border: 2px solid #cde5ff;
|
border: 2px solid #cde5ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips-modal{
|
.tips-modal {
|
||||||
background: rgba(0,0,0,0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
position: fixed;inset: 0;
|
position: fixed;
|
||||||
display: flex;justify-content: center;align-items: center;
|
inset: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.tips-modal-content{
|
|
||||||
|
.tips-modal-content {
|
||||||
width: 598px;
|
width: 598px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
animation: enlargeK 0.2s linear;
|
animation: enlargeK 0.2s linear;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes enlargeK {
|
@keyframes enlargeK {
|
||||||
0%{
|
0% {
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
}
|
}
|
||||||
100%{
|
|
||||||
|
100% {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tips-modal-title{
|
|
||||||
|
.tips-modal-title {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -287,53 +368,166 @@
|
|||||||
margin-bottom: 58px;
|
margin-bottom: 58px;
|
||||||
padding-top: 48px;
|
padding-top: 48px;
|
||||||
}
|
}
|
||||||
.tips-modal-letter{
|
|
||||||
|
.tips-modal-letter {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
padding: 0 30px;
|
padding: 0 30px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
}
|
}
|
||||||
.tips-modal-letter-text{
|
|
||||||
|
.tips-modal-letter-text {
|
||||||
text-indent: 60px;
|
text-indent: 60px;
|
||||||
}
|
}
|
||||||
.tips-modal-letter-beginn{
|
|
||||||
|
.tips-modal-letter-beginn {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
.tips-modal-letter-end{
|
|
||||||
|
.tips-modal-letter-end {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-top: 61px;
|
margin-top: 61px;
|
||||||
}
|
}
|
||||||
.tips-modal-button{
|
|
||||||
|
.tips-modal-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
border-top: 1px solid #DDDDDD;
|
border-top: 1px solid #DDDDDD;
|
||||||
margin-top: 45px;
|
margin-top: 45px;
|
||||||
}
|
}
|
||||||
.tips-modal-button button, .tips-modal-button view{
|
|
||||||
display: flex;align-items: center;justify-content: center;
|
.tips-modal-button button,
|
||||||
|
.tips-modal-button view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
.tips-modal-button button{
|
|
||||||
|
.tips-modal-button button {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-right: 1px solid #DDDDDD;
|
border-right: 1px solid #DDDDDD;
|
||||||
}
|
}
|
||||||
.tips-modal-button button::after{
|
|
||||||
|
.tips-modal-button button::after {
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
.tips-modal-button view{
|
|
||||||
|
.tips-modal-button view {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.auth-box {
|
||||||
|
width: 614px;
|
||||||
|
height: 70px;
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-radius: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-left: 18px;
|
||||||
|
padding-right: 16px;
|
||||||
|
|
||||||
|
.auth-left-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.auth-tag {
|
||||||
|
width: 86px;
|
||||||
|
height: 34px;
|
||||||
|
background: #dddddd;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-family: Microsoft YaHei, Microsoft YaHei-Regular;
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 34px;
|
||||||
|
margin-right: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-tagone {
|
||||||
|
width: 86px;
|
||||||
|
height: 34px;
|
||||||
|
background: #ffe6ce;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-family: Microsoft YaHei, Microsoft YaHei-Regular;
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 34px;
|
||||||
|
margin-right: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-tagtwo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-left: 10px;
|
||||||
|
width: 100px;
|
||||||
|
height: 32px;
|
||||||
|
background: #cde5ff;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
.iconFont-color {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30px;
|
||||||
|
margin-right: 3px;
|
||||||
|
color: #007aff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-font {
|
||||||
|
font-size: 20px;
|
||||||
|
font-family: Microsoft YaHei, Microsoft YaHei-Regular;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #007aff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tagthree {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-left: 10px;
|
||||||
|
width: 100px;
|
||||||
|
height: 32px;
|
||||||
|
background: rgba(255, 0, 0, 0.10);
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-cont {
|
||||||
|
margin-left: 16px;
|
||||||
|
font-size: 26px;
|
||||||
|
font-family: Microsoft YaHei, Microsoft YaHei-Bold;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ababab;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-contone {
|
||||||
|
margin-left: 16px;
|
||||||
|
font-size: 26px;
|
||||||
|
font-family: Microsoft YaHei, Microsoft YaHei-Bold;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #3c3c3c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -5,77 +5,87 @@ import classnames from "classnames";
|
|||||||
import { useSelector } from "@/reducers/hooks";
|
import { useSelector } from "@/reducers/hooks";
|
||||||
import { alert, goLink } from "@/common/common";
|
import { alert, goLink } from "@/common/common";
|
||||||
import useLogin from '@/use/useLogin'
|
import useLogin from '@/use/useLogin'
|
||||||
import {BASE_URL} from '@/common/constant'
|
import { BASE_URL } from '@/common/constant'
|
||||||
|
import Taro from "@tarojs/taro";
|
||||||
|
import { userassets } from "@/api/mine"
|
||||||
|
import { formatPriceDiv } from "@/common/fotmat"
|
||||||
export default () => {
|
export default () => {
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const { getSelfUserInfo } = useLogin();
|
const { getSelfUserInfo } = useLogin();
|
||||||
const {adminUserInfo} = useSelector(state => state.userInfo);
|
const { adminUserInfo } = useSelector(state => state.userInfo);
|
||||||
useEffect(()=>{
|
useEffect(() => {
|
||||||
getSelfUserInfo().then().catch(()=>{
|
getSelfUserInfo().then().catch(() => {
|
||||||
alert.none("授权失败,请授权后再使用");
|
alert.none("授权失败,请授权后再使用");
|
||||||
});
|
});
|
||||||
},[]);
|
}, []);
|
||||||
const handleAuth = async ()=>{
|
const handleAuth = async () => {
|
||||||
getSelfUserInfo().then().catch(()=>{
|
getSelfUserInfo().then().catch(() => {
|
||||||
alert.none("授权失败,请授权后再使用");
|
alert.none("授权失败,请授权后再使用");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const { fetchData, state } = userassets()
|
||||||
|
useEffect(() => {
|
||||||
|
fetchData();
|
||||||
|
}, [])
|
||||||
return (
|
return (
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<Header data={adminUserInfo} />
|
<Header data={adminUserInfo} />
|
||||||
<Assets />
|
<Assets data={state} />
|
||||||
<Main />
|
<Main />
|
||||||
{(adminUserInfo as any)?.authentication_status==1&&<Modal data={adminUserInfo}/>}
|
{/* {(adminUserInfo as any)?.authentication_status==1&&<Modal data={adminUserInfo}/>} */}
|
||||||
{/* 测试暂时添加 */}
|
{/* 测试暂时添加 */}
|
||||||
<View style={{fontSize:'26rpx', textAlign:'center'}}>{BASE_URL}</View>
|
<View style={{ fontSize: '26rpx', textAlign: 'center' }}>{BASE_URL}</View>
|
||||||
{!adminUserInfo.is_authorize_name&&<View onClick={handleAuth} className={styles["auth-suspension"]}></View>}
|
{!adminUserInfo.is_authorize_name && <View onClick={handleAuth} className={styles["auth-suspension"]}></View>}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// 提示弹窗
|
// 提示弹窗
|
||||||
const Modal = memo((props:any)=>{
|
const Modal = memo((props: any) => {
|
||||||
const {data} = props;
|
const { data } = props;
|
||||||
const [modalShow, setModalShow]=useState(true);
|
const [modalShow, setModalShow] = useState(true);
|
||||||
const handleouter = ()=>{
|
const handleouter = () => {
|
||||||
}
|
}
|
||||||
return(
|
return (
|
||||||
<>
|
<>
|
||||||
{modalShow&&
|
{modalShow &&
|
||||||
<View onClick={handleouter} catchMove className={styles['tips-modal']}>
|
<View onClick={handleouter} catchMove className={styles['tips-modal']}>
|
||||||
<View className={styles['tips-modal-content']} onClick={e=>e.stopPropagation()}>
|
<View className={styles['tips-modal-content']} onClick={e => e.stopPropagation()}>
|
||||||
<View className={styles['tips-modal-title']}>首次登录提醒</View>
|
<View className={styles['tips-modal-title']}>首次登录提醒</View>
|
||||||
<View className={styles['tips-modal-letter']}>
|
<View className={styles['tips-modal-letter']}>
|
||||||
<View className={styles['tips-modal-letter-beginn']}>To: 万丰园纺织科技</View>
|
<View className={styles['tips-modal-letter-beginn']}>To: 万丰园纺织科技</View>
|
||||||
<View className={styles['tips-modal-letter-text']}>尊敬的老朋友,欢迎你使用小程序商城;由于您是我们长期合作的伙伴,你的组织已自动为你生成,关联后可查看历史订单哟。</View>
|
<View className={styles['tips-modal-letter-text']}>尊敬的老朋友,欢迎你使用小程序商城;由于您是我们长期合作的伙伴,你的组织已自动为你生成,关联后可查看历史订单哟。</View>
|
||||||
<View className={styles['tips-modal-letter-end']}>信息错误请联系客服</View>
|
<View className={styles['tips-modal-letter-end']}>信息错误请联系客服</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles['tips-modal-button']}>
|
||||||
|
<Button hoverClass="none" openType="contact">联系客服</Button>
|
||||||
|
<View onClick={() => setModalShow(false)}>我知道</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles['tips-modal-button']}>
|
}
|
||||||
<Button hoverClass="none" openType="contact">联系客服</Button>
|
|
||||||
<View onClick={()=>setModalShow(false)}>我知道</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
}
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 头部 | 订单
|
// 头部 | 订单
|
||||||
const Header = memo((props:any) => {
|
const Header = memo((props: any) => {
|
||||||
const {data} = props;
|
const { data } = props;
|
||||||
let menu = [{ text: "待配布", icon: "icon-daipeibu", url: "/pages/orderList/index" }, { text: "待付款", icon: "icon-daifukuan", url: "/pages/orderList/index" },
|
let menu = [{ text: "待配布", icon: "icon-daipeibu", url: "/pages/orderList/index" }, { text: "待付款", icon: "icon-daifukuan", url: "/pages/orderList/index" },
|
||||||
{ text: "待发货", icon: "icon-daifahuo", url: "/pages/orderList/index" }, { text: "已发货", icon: "icon-yifahuo", url: "/pages/orderList/index" },
|
{ text: "待发货", icon: "icon-daifahuo", url: "/pages/orderList/index" }, { text: "已发货", icon: "icon-yifahuo", url: "/pages/orderList/index" },
|
||||||
{ text: "退款/售后", icon: "icon-a-tuikuanshouhou", url: "/pages/orderList/index" }];
|
{ text: "退款/售后", icon: "icon-a-tuikuanshouhou", url: "/pages/orderList/index" }];
|
||||||
const { getPhoneNumber } = useLogin();
|
const { getPhoneNumber } = useLogin();
|
||||||
const mGetPhoneNumber = (ev)=>{
|
const mGetPhoneNumber = (ev) => {
|
||||||
if(ev.detail?.code){
|
if (ev.detail?.code) {
|
||||||
getPhoneNumber(ev.detail.code);
|
getPhoneNumber(ev.detail.code);
|
||||||
}else{
|
} else {
|
||||||
alert.none("绑定失败!");
|
alert.none("绑定失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const navTo = () => {
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: '/pages/certification/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<View className={styles.header}>
|
<View className={styles.header}>
|
||||||
<View className={`${styles.crad} ${styles['header-card']}`}>
|
<View className={`${styles.crad} ${styles['header-card']}`}>
|
||||||
@ -90,7 +100,7 @@ const Header = memo((props:any) => {
|
|||||||
{data?.user_name}
|
{data?.user_name}
|
||||||
</View>
|
</View>
|
||||||
<View className={styles['arcd-info-left-phone']}>
|
<View className={styles['arcd-info-left-phone']}>
|
||||||
{data?.phone?data?.phone?.replace(data?.phone?.substring(3,7), "****"):<Button openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}>绑定手机号码</Button>}
|
{data?.phone ? data?.phone?.replace(data?.phone?.substring(3, 7), "****") : <Button openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}>绑定手机号码</Button>}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@ -106,7 +116,62 @@ const Header = memo((props:any) => {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles['auth']}>
|
<View className={styles['auth']}>
|
||||||
<View className={`${styles['auth-top']} ${data?.authentication_status==4&&"auth-tips-adopt"}`}>
|
{(data?.authentication_status == 0 || data?.authentication_status == 1) &&
|
||||||
|
<View className={styles['auth-box']} onClick={() => navTo()}>
|
||||||
|
<View className={styles['auth-left-box']}>
|
||||||
|
<View className={styles['auth-tag']}>
|
||||||
|
未认证
|
||||||
|
</View>
|
||||||
|
<View className={styles['auth-cont']}>
|
||||||
|
暂未加入或注册组织
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<Text className="iconfont icon-a-moreback"></Text>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
{(data?.authentication_status == 3) &&
|
||||||
|
<View className={styles['auth-box']} onClick={() => navTo()}>
|
||||||
|
<View className={styles['auth-left-box']}>
|
||||||
|
<View className={styles['auth-tagthree']}>
|
||||||
|
认证失败
|
||||||
|
</View>
|
||||||
|
<View className={styles['auth-cont']}>
|
||||||
|
暂未加入或注册组织
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<Text className="iconfont icon-a-moreback"></Text>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
{data?.authentication_status == 2 &&
|
||||||
|
<View className={styles['auth-box']} onClick={() => navTo()}>
|
||||||
|
<View className={styles['auth-left-box']}>
|
||||||
|
<View className={styles['auth-tagone']}>
|
||||||
|
认证中
|
||||||
|
</View>
|
||||||
|
<View className={styles['auth-contone']}>
|
||||||
|
{data?.company_name || '暂未加入或注册组织'}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<Text className="iconfont icon-a-moreback"></Text>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
{data?.authentication_status == 4 &&
|
||||||
|
<View className={styles['auth-box']} onClick={() => navTo()}>
|
||||||
|
<View className={styles['auth-left-box']}>
|
||||||
|
<View className={styles['auth-tagtwo']}>
|
||||||
|
<View className={styles['iconFont-color']}>
|
||||||
|
<Text className="iconfont icon-xtianzhangqi"></Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles['auth-font']}>已认证</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles['auth-contone']}>
|
||||||
|
{data?.company_name}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<Text className="iconfont icon-a-moreback"></Text>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
{/* <View className={`${styles['auth-top']} ${data?.authentication_status==4&&"auth-tips-adopt"}`}>
|
||||||
<View className={`${styles['auth-status']} ${data?.authentication_status==2&&styles['auth-status-ongoing']} ${data?.authentication_status==4&&styles['auth-status-adopt']}`}>
|
<View className={`${styles['auth-status']} ${data?.authentication_status==2&&styles['auth-status-ongoing']} ${data?.authentication_status==4&&styles['auth-status-adopt']}`}>
|
||||||
<Text>1</Text>
|
<Text>1</Text>
|
||||||
{data?.authentication_status==1&&"未认证"}
|
{data?.authentication_status==1&&"未认证"}
|
||||||
@ -118,13 +183,13 @@ const Header = memo((props:any) => {
|
|||||||
{data?.authentication_status==2&&<Navigator hoverClass="none" url="/pages/certification/index" className={styles['auth-tips']}>1-3个工作日,审核完成 <Text className="iconfont icon-a-moreback"/></Navigator>}
|
{data?.authentication_status==2&&<Navigator hoverClass="none" url="/pages/certification/index" className={styles['auth-tips']}>1-3个工作日,审核完成 <Text className="iconfont icon-a-moreback"/></Navigator>}
|
||||||
{data?.authentication_status==3&&<Navigator hoverClass="none" url="/pages/certification/index" className={styles['auth-tips']}>重新认证 <Text className="iconfont icon-a-moreback"/></Navigator>}
|
{data?.authentication_status==3&&<Navigator hoverClass="none" url="/pages/certification/index" className={styles['auth-tips']}>重新认证 <Text className="iconfont icon-a-moreback"/></Navigator>}
|
||||||
{data?.authentication_status==4&&<View className={styles['auth-tips']}>认证通过,可以下单啦 <Text className="iconfont icon-a-moreback"/></View>}
|
{data?.authentication_status==4&&<View className={styles['auth-tips']}>认证通过,可以下单啦 <Text className="iconfont icon-a-moreback"/></View>}
|
||||||
</View>
|
</View> */}
|
||||||
<View className={`${styles['auth-company']} ${data?.authentication_status==4&&"auth-tips-adopt"}`}>
|
{/* <View className={`${styles['auth-company']} ${data?.authentication_status==4&&"auth-tips-adopt"}`}>
|
||||||
{data?.authentication_status==1&&"暂未加入或注册组织"}
|
{data?.authentication_status==1&&"暂未加入或注册组织"}
|
||||||
{data?.authentication_status==2&&data?.company_name}
|
{data?.authentication_status==2&&data?.company_name}
|
||||||
{data?.authentication_status==3&&data?.company_name}
|
{data?.authentication_status==3&&data?.company_name}
|
||||||
{data?.authentication_status==4&&data?.company_name}
|
{data?.authentication_status==4&&data?.company_name}
|
||||||
</View>
|
</View> */}
|
||||||
</View>
|
</View>
|
||||||
<View className={styles['card-main']}>
|
<View className={styles['card-main']}>
|
||||||
<View className={styles['card-main-title']}>
|
<View className={styles['card-main-title']}>
|
||||||
@ -138,7 +203,7 @@ const Header = memo((props:any) => {
|
|||||||
<Navigator hoverClass="none" url={item.url} className={styles['card-main-title-content-item']}>
|
<Navigator hoverClass="none" url={item.url} className={styles['card-main-title-content-item']}>
|
||||||
<Text className={`iconfont ${item.icon}`}></Text>
|
<Text className={`iconfont ${item.icon}`}></Text>
|
||||||
<View>{item.text}</View>
|
<View>{item.text}</View>
|
||||||
<View className={styles['card-main-title-content-item-badge']}>{index==2?"99+":10}</View>
|
<View className={styles['card-main-title-content-item-badge']}>{index == 2 ? "99+" : 10}</View>
|
||||||
</Navigator>
|
</Navigator>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -149,9 +214,9 @@ const Header = memo((props:any) => {
|
|||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 我的资产
|
// 我的资产
|
||||||
const Assets = () => {
|
const Assets = (props: any) => {
|
||||||
|
console.log(props, 'propsprops')
|
||||||
return (
|
return (
|
||||||
<View className={`${styles.assets} ${styles.crad} ${styles['main-card']}`}>
|
<View className={`${styles.assets} ${styles.crad} ${styles['main-card']}`}>
|
||||||
<View className={`${styles['assets-title']}`}>我的资产</View>
|
<View className={`${styles['assets-title']}`}>我的资产</View>
|
||||||
@ -159,14 +224,14 @@ const Assets = () => {
|
|||||||
<Navigator hoverClass="none" url="/pages/depositBeforehand/index">
|
<Navigator hoverClass="none" url="/pages/depositBeforehand/index">
|
||||||
<View className={`${styles['assets-content-item-top']}`}>
|
<View className={`${styles['assets-content-item-top']}`}>
|
||||||
<Text className={`${styles['assets-content-item-top-before']}`}>¥</Text>
|
<Text className={`${styles['assets-content-item-top-before']}`}>¥</Text>
|
||||||
<Text className={`${styles['assets-content-item-top-content']}`}>0</Text>
|
<Text className={`${styles['assets-content-item-top-content']}`}>{formatPriceDiv(props.data.data.wallet_money || 0)}</Text>
|
||||||
<Text className={`${styles['assets-content-item-top-after']}`}>.20</Text>
|
{/* <Text className={`${styles['assets-content-item-top-after']}`}>{props.wallet_money || 0}</Text> */}
|
||||||
</View>
|
</View>
|
||||||
<Text className={`${styles['assets-content-item-tips']}`}>预存款</Text>
|
<Text className={`${styles['assets-content-item-tips']}`}>预存款</Text>
|
||||||
</Navigator>
|
</Navigator>
|
||||||
<View>
|
<View>
|
||||||
<View className={`${styles['assets-content-item-top']}`}>
|
<View className={`${styles['assets-content-item-top']}`}>
|
||||||
<Text className={`${styles['assets-content-item-top-content']}`}>4</Text>
|
<Text className={`${styles['assets-content-item-top-content']}`}>{props.data.data.coupon_count || 0}</Text>
|
||||||
<Text className={`${styles['assets-content-item-top-after']}`}>张</Text>
|
<Text className={`${styles['assets-content-item-top-after']}`}>张</Text>
|
||||||
</View>
|
</View>
|
||||||
<Text className={`${styles['assets-content-item-tips']}`}>优惠券</Text>
|
<Text className={`${styles['assets-content-item-tips']}`}>优惠券</Text>
|
||||||
@ -174,8 +239,8 @@ const Assets = () => {
|
|||||||
<Navigator hoverClass="none" url="/pages/creditLine/index">
|
<Navigator hoverClass="none" url="/pages/creditLine/index">
|
||||||
<View className={`${styles['assets-content-item-top']}`}>
|
<View className={`${styles['assets-content-item-top']}`}>
|
||||||
<Text className={`${styles['assets-content-item-top-before']}`}>¥</Text>
|
<Text className={`${styles['assets-content-item-top-before']}`}>¥</Text>
|
||||||
<Text className={`${styles['assets-content-item-top-content']}`}>99999</Text>
|
<Text className={`${styles['assets-content-item-top-content']}`}>{formatPriceDiv(props.data.data.credit_line || 0)}</Text>
|
||||||
<Text className={`${styles['assets-content-item-top-after']}`}>.-00</Text>
|
{/* <Text className={`${styles['assets-content-item-top-after']}`}>.-00</Text> */}
|
||||||
</View>
|
</View>
|
||||||
<Text className={`${styles['assets-content-item-tips']}`}>授信额度</Text>
|
<Text className={`${styles['assets-content-item-tips']}`}>授信额度</Text>
|
||||||
</Navigator>
|
</Navigator>
|
||||||
@ -186,9 +251,9 @@ const Assets = () => {
|
|||||||
|
|
||||||
// 功能
|
// 功能
|
||||||
const Main = memo(() => {
|
const Main = memo(() => {
|
||||||
let menu = [{ text: "地址管理", icon: "icon-shoucang",url: "/pages/addressManager/index" },{ text: "码单管理", icon: "icon-shoucang",url: "/pages/weightList/index" },
|
let menu = [{ text: "地址管理", icon: "icon-shoucang", url: "/pages/addressManager/index" }, { text: "码单管理", icon: "icon-shoucang", url: "/pages/weightList/index" },
|
||||||
{ text: "我的收藏", icon: "icon-shoucang" }, { text: "颜色对比", icon: "icon-yanseduibi" },
|
{ text: "我的收藏", icon: "icon-shoucang" }, { text: "颜色对比", icon: "icon-yanseduibi" },
|
||||||
{ text: "分享推广", icon: "icon-fenxiang" }, { text: "团队邀请", icon: "icon-yaoqingtuandui" }]
|
{ text: "分享推广", icon: "icon-fenxiang" }, { text: "团队邀请", icon: "icon-yaoqingtuandui" }]
|
||||||
return (
|
return (
|
||||||
<View className={`${styles.crad} ${styles['card-main']} ${styles['card-feature']}`}>
|
<View className={`${styles.crad} ${styles['card-main']} ${styles['card-feature']}`}>
|
||||||
<View className={styles['card-main-list-content']}>
|
<View className={styles['card-main-list-content']}>
|
||||||
|
@ -13,105 +13,105 @@ import { useSelector } from "@/reducers/hooks";
|
|||||||
import useUploadCDNImg from "@/use/useUploadImage";
|
import useUploadCDNImg from "@/use/useUploadImage";
|
||||||
import { IMG_CND_Prefix } from "@/common/constant";
|
import { IMG_CND_Prefix } from "@/common/constant";
|
||||||
|
|
||||||
export default ()=>{
|
export default () => {
|
||||||
const { getPhoneNumber, getAdminUserInfo } = useLogin();
|
const { getPhoneNumber, getAdminUserInfo } = useLogin();
|
||||||
const {adminUserInfo} = useSelector(state => state.userInfo);
|
const { adminUserInfo } = useSelector(state => state.userInfo);
|
||||||
// 用户信息
|
// 用户信息
|
||||||
useEffect(()=>{
|
useEffect(() => {
|
||||||
setFormData({
|
setFormData({
|
||||||
...formData,
|
...formData,
|
||||||
...adminUserInfo as any,
|
...adminUserInfo as any,
|
||||||
});
|
});
|
||||||
}, [adminUserInfo]);
|
}, [adminUserInfo]);
|
||||||
useEffect(()=>{
|
useEffect(() => {
|
||||||
setFormData({
|
setFormData({
|
||||||
...adminUserInfo as any,
|
...adminUserInfo as any,
|
||||||
company_type_index: 0
|
company_type_index: 0
|
||||||
});
|
});
|
||||||
getCompanyTypeData();
|
getCompanyTypeData();
|
||||||
},[])
|
}, [])
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
user_name: "麦兜"
|
user_name: "麦兜"
|
||||||
});
|
});
|
||||||
// 昵称修改保存
|
// 昵称修改保存
|
||||||
const { fetchData: realNameUpdateFetch } = realNameUpdateApi();
|
const { fetchData: realNameUpdateFetch } = realNameUpdateApi();
|
||||||
const rules = {
|
const rules = {
|
||||||
text: [{
|
text: [{
|
||||||
message: "请输入"
|
message: "请输入"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
const {fetchData: saveFetch} = companyUpdateApi();
|
const { fetchData: saveFetch } = companyUpdateApi();
|
||||||
const {fetchData: getCompanyFetch} = companyDetailApi();
|
const { fetchData: getCompanyFetch } = companyDetailApi();
|
||||||
const handleTextareaSave = async (text, type)=>{
|
const handleTextareaSave = async (text, type) => {
|
||||||
retrieval({text},rules).then(async ()=>{
|
retrieval({ text }, rules).then(async () => {
|
||||||
let result;
|
let result;
|
||||||
if(type=="Ickname"){
|
if (type == "Ickname") {
|
||||||
result = await realNameUpdateFetch({real_name: text});
|
result = await realNameUpdateFetch({ real_name: text });
|
||||||
}else{
|
} else {
|
||||||
const params = await getCompanyFetch();
|
const params = await getCompanyFetch();
|
||||||
result = await saveFetch({
|
result = await saveFetch({
|
||||||
...params.data,
|
...params.data,
|
||||||
company_name: text
|
company_name: text
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(result.success){
|
if (result.success) {
|
||||||
getAdminUserInfo();
|
getAdminUserInfo();
|
||||||
(ModifyIcknameEl.current as any).setModalShow(false);
|
(ModifyIcknameEl.current as any).setModalShow(false);
|
||||||
(ModifyCompanyNameEl.current as any).setModalShow(false)
|
(ModifyCompanyNameEl.current as any).setModalShow(false)
|
||||||
alert.success("保存成功");
|
alert.success("保存成功");
|
||||||
}else{
|
} else {
|
||||||
alert.none(result.msg);
|
alert.none(result.msg);
|
||||||
}
|
}
|
||||||
}).catch(message=>{
|
}).catch(message => {
|
||||||
alert.none(message);
|
alert.none(message);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// Taro.eventCenter.on('message:detail', (message) => console.log(message))
|
// Taro.eventCenter.on('message:detail', (message) => console.log(message))
|
||||||
// 面面跳转
|
// 面面跳转
|
||||||
const onNavigate = (url:string)=>{
|
const onNavigate = (url: string) => {
|
||||||
goLink(url);
|
goLink(url);
|
||||||
}
|
}
|
||||||
// 肖像编辑
|
// 肖像编辑
|
||||||
const { fetchData: portraitUpdateFetch } = portraitUpdateApi();
|
const { fetchData: portraitUpdateFetch } = portraitUpdateApi();
|
||||||
const {getWxPhoto} = useUploadCDNImg();
|
const { getWxPhoto } = useUploadCDNImg();
|
||||||
const handleSelectRortrait = ()=>{
|
const handleSelectRortrait = () => {
|
||||||
Taro.showModal({
|
Taro.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "是否确定更改头像?",
|
content: "是否确定更改头像?",
|
||||||
showCancel: true,
|
showCancel: true,
|
||||||
async success(ev){
|
async success(ev) {
|
||||||
if(ev.confirm){
|
if (ev.confirm) {
|
||||||
let result = await getWxPhoto('mall');
|
let result = await getWxPhoto('mall');
|
||||||
const portraitUpdateResult = await portraitUpdateFetch({
|
const portraitUpdateResult = await portraitUpdateFetch({
|
||||||
avatar_url: IMG_CND_Prefix+(result as any).url
|
avatar_url: IMG_CND_Prefix + (result as any).url
|
||||||
});
|
});
|
||||||
if(portraitUpdateResult.success){
|
if (portraitUpdateResult.success) {
|
||||||
getAdminUserInfo();
|
getAdminUserInfo();
|
||||||
alert.success("保存成功");
|
alert.success("保存成功");
|
||||||
}else{
|
} else {
|
||||||
alert.none(portraitUpdateResult.msg);
|
alert.none(portraitUpdateResult.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const mGetPhoneNumber = (ev)=>{
|
const mGetPhoneNumber = (ev) => {
|
||||||
if(ev.detail?.code){
|
if (ev.detail?.code) {
|
||||||
getPhoneNumber(ev.detail.code);
|
getPhoneNumber(ev.detail.code);
|
||||||
}else{
|
} else {
|
||||||
alert.none("绑定失败!");
|
alert.none("绑定失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const ModifyIcknameEl = useRef(null);
|
const ModifyIcknameEl = useRef(null);
|
||||||
const ModifyCompanyNameEl = useRef(null);
|
const ModifyCompanyNameEl = useRef(null);
|
||||||
// 获取企业类型
|
// 获取企业类型
|
||||||
const { fetchData: companyTypeFetch, state: companyTypeData } = companyTypeApi();
|
const { fetchData: companyTypeFetch, state: companyTypeData } = companyTypeApi();
|
||||||
const getCompanyTypeData = async ()=>{
|
const getCompanyTypeData = async () => {
|
||||||
const reuslt = await companyTypeFetch();
|
const reuslt = await companyTypeFetch();
|
||||||
if(reuslt.success){
|
if (reuslt.success) {
|
||||||
reuslt.data?.list?.every((item,index)=>{
|
reuslt.data?.list?.every((item, index) => {
|
||||||
if(item.id==(adminUserInfo as any).purchaser_type){
|
if (item.id == (adminUserInfo as any).purchaser_type) {
|
||||||
setFormData({
|
setFormData({
|
||||||
...adminUserInfo as any,
|
...adminUserInfo as any,
|
||||||
company_type_index: index
|
company_type_index: index
|
||||||
@ -123,19 +123,19 @@ export default ()=>{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 修改企业类型
|
// 修改企业类型
|
||||||
const handleCompanyType = async (ev)=>{
|
const handleCompanyType = async (ev) => {
|
||||||
const {value} = ev.detail;
|
const { value } = ev.detail;
|
||||||
const item = companyTypeData.data.list&&companyTypeData.data.list[value];
|
const item = companyTypeData.data.list && companyTypeData.data.list[value];
|
||||||
if(item){
|
if (item) {
|
||||||
const params = await getCompanyFetch();
|
const params = await getCompanyFetch();
|
||||||
const result = await saveFetch({
|
const result = await saveFetch({
|
||||||
...params.data,
|
...params.data,
|
||||||
purchaser_type: item.id
|
purchaser_type: item.id
|
||||||
});
|
});
|
||||||
if(result.success){
|
if (result.success) {
|
||||||
getAdminUserInfo();
|
getAdminUserInfo();
|
||||||
alert.success("保存成功")
|
alert.success("保存成功")
|
||||||
}else{
|
} else {
|
||||||
alert.none(result.msg);
|
alert.none(result.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,46 +144,46 @@ export default ()=>{
|
|||||||
return (
|
return (
|
||||||
<View className="user-edit">
|
<View className="user-edit">
|
||||||
<View onClick={handleSelectRortrait} className="user-edit-portrait">
|
<View onClick={handleSelectRortrait} className="user-edit-portrait">
|
||||||
<Image src={(formData as any)?.avatar_url}/>
|
<Image src={(formData as any)?.avatar_url} />
|
||||||
<View>点击编辑头像</View>
|
<View>点击编辑头像</View>
|
||||||
</View>
|
</View>
|
||||||
<View className="user-edit-content">
|
<View className="user-edit-content">
|
||||||
<View className="user-edit-content-title"><Text/> 个人资料</View>
|
<View className="user-edit-content-title"><Text /> 个人资料</View>
|
||||||
<UserEditList onClick={()=>(ModifyIcknameEl.current as any).setModalShow(true)} data={(formData as any)?.user_name} label="昵称" placeholder="请输入" icon=""/>
|
<UserEditList onClick={() => (ModifyIcknameEl.current as any).setModalShow(true)} data={(formData as any)?.user_name} label="昵称" placeholder="请输入" icon="" />
|
||||||
<UserEditList label="手机号" placeholder="去绑定" icon="">
|
<UserEditList label="手机号" placeholder="去绑定" icon="">
|
||||||
{((formData as any)?.phone)?<View className="user-edit-content-phone">
|
{((formData as any)?.phone) ? <View className="user-edit-content-phone">
|
||||||
<View>{(formData as any)?.phone}</View>
|
<View>{(formData as any)?.phone}</View>
|
||||||
<Text>已绑定</Text>
|
<Text>已绑定</Text>
|
||||||
</View>:
|
</View> :
|
||||||
<Button className="user-edit-content-bindphone" openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}>去绑定</Button>
|
<Button className="user-edit-content-bindphone" openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}>去绑定</Button>
|
||||||
}
|
}
|
||||||
</UserEditList>
|
</UserEditList>
|
||||||
</View>
|
</View>
|
||||||
<View className="user-edit-content">
|
<View className="user-edit-content">
|
||||||
<View className="user-edit-content-title"><Text/> 组织资料</View>
|
<View className="user-edit-content-title"><Text /> 组织资料</View>
|
||||||
<UserEditList onClick={()=>(ModifyCompanyNameEl.current as any).setModalShow(true)} data={(formData as any)?.company_name} label="名称" placeholder="待绑定" icon=""/>
|
<UserEditList onClick={() => (ModifyCompanyNameEl.current as any).setModalShow(true)} data={(formData as any)?.company_name} label="名称" placeholder="待绑定" icon="" />
|
||||||
<UserEditList label="类型" placeholder="完善公司/组织信息" icon="">
|
<UserEditList label="类型" placeholder="完善公司/组织信息" icon="">
|
||||||
<Picker mode="selector" range={(companyTypeData.data as any).list as any} rangeKey="name" value={(formData as any)?.company_type_index} onChange={handleCompanyType}>
|
<Picker mode="selector" range={(companyTypeData.data as any).list as any} rangeKey="name" value={(formData as any)?.company_type_index} onChange={handleCompanyType}>
|
||||||
{(companyTypeData.data as any).list&&(companyTypeData.data as any).list[(formData as any)?.company_type_index].name}
|
{(companyTypeData.data as any).list && (companyTypeData.data as any).list[(formData as any)?.company_type_index].name}
|
||||||
</Picker>
|
</Picker>
|
||||||
</UserEditList>
|
</UserEditList>
|
||||||
<UserEditList onClick={()=>onNavigate("/pages/certification/index")} label="我的认证" placeholder="待绑定" icon="">
|
<UserEditList onClick={() => onNavigate("/pages/certification/index")} label="我的认证" placeholder="待绑定" icon="">
|
||||||
<View className={`user-edit-content-company ${(formData as any)?.authentication_status==4&&"user-edit-content-company-adopt"}`}>
|
<View className={`user-edit-content-company ${(formData as any)?.authentication_status == 4 && "user-edit-content-company-adopt"}`}>
|
||||||
<Text className="iconfont "/> {(formData as any)?.authentication_status==4?"已认证":"未认证"}
|
<Text className="iconfont " /> {(formData as any)?.authentication_status == 4 ? "已认证" : "未认证"}
|
||||||
</View>
|
</View>
|
||||||
</UserEditList>
|
</UserEditList>
|
||||||
<UserEditList label="创建人" data={(formData as any)?.founder_user_name} placeholder="完善公司/组织信息" icon=""/>
|
<UserEditList label="创建人" data={(formData as any)?.founder_user_name} placeholder="完善公司/组织信息" icon="" useIcon="true" />
|
||||||
</View>
|
</View>
|
||||||
<Button hoverClass="none" className="user-edit-logout">退出当前账号</Button>
|
{/* <Button hoverClass="none" className="user-edit-logout">退出当前账号</Button> */}
|
||||||
|
|
||||||
<ModifyModal title="修改昵称" ref={ModifyIcknameEl} value={(formData as any)?.user_name} save={(value)=>handleTextareaSave(value, "Ickname")}/>
|
<ModifyModal title="修改昵称" ref={ModifyIcknameEl} value={(formData as any)?.user_name} save={(value) => handleTextareaSave(value, "Ickname")} />
|
||||||
<ModifyModal title="修改名称" ref={ModifyCompanyNameEl} value={(formData as any)?.company_name} save={(value)=>handleTextareaSave(value, "companyName")}/>
|
<ModifyModal title="修改名称" ref={ModifyCompanyNameEl} value={(formData as any)?.company_name} save={(value) => handleTextareaSave(value, "companyName")} />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 列表
|
// 列表
|
||||||
const UserEditList = memo((props:any)=>{
|
const UserEditList = memo((props: any) => {
|
||||||
return (
|
return (
|
||||||
<View onClick={props.onClick} className="user-edit-list">
|
<View onClick={props.onClick} className="user-edit-list">
|
||||||
<View className="user-edit-list-left">
|
<View className="user-edit-list-left">
|
||||||
@ -192,12 +192,15 @@ const UserEditList = memo((props:any)=>{
|
|||||||
<View className="user-edit-list-right">
|
<View className="user-edit-list-right">
|
||||||
<View>
|
<View>
|
||||||
{
|
{
|
||||||
props.children?props.children:
|
props.children ? props.children :
|
||||||
props.data?props.data:
|
props.data ? props.data :
|
||||||
<View className="user-edit-list-right-placeholder">{props.placeholder}</View>
|
<View className="user-edit-list-right-placeholder">{props.placeholder}</View>
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
<Text className="iconfont icon-a-moreback"></Text>
|
{
|
||||||
|
!props.useIcon &&
|
||||||
|
<Text className="iconfont icon-a-moreback"></Text>
|
||||||
|
}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -41,6 +41,7 @@ export type UserAdminParam = {
|
|||||||
is_authorize_name?: false|true,
|
is_authorize_name?: false|true,
|
||||||
is_authorize_phone?: false|true,
|
is_authorize_phone?: false|true,
|
||||||
phone?:string,
|
phone?:string,
|
||||||
|
authentication_status?:number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SortCodeParam = {
|
export type SortCodeParam = {
|
||||||
|
63
yarn.lock
63
yarn.lock
@ -1231,6 +1231,29 @@
|
|||||||
"schema-utils" "^2.6.5"
|
"schema-utils" "^2.6.5"
|
||||||
"source-map" "^0.7.3"
|
"source-map" "^0.7.3"
|
||||||
|
|
||||||
|
"@prefresh/babel-plugin@^0.4.0":
|
||||||
|
"integrity" "sha512-fYAWbU1WDSLn108kKY4eDaaeUcnszFqXjgaGKYXNZ5NLulpRTpsrY+Sbfo9q8LDpWrBpqIgzjrwNnvglWI1xNQ=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@prefresh/babel-plugin/-/babel-plugin-0.4.3.tgz"
|
||||||
|
"version" "0.4.3"
|
||||||
|
|
||||||
|
"@prefresh/core@^1.3.3":
|
||||||
|
"integrity" "sha512-s7iNsnyJ3lZEUrYIgmVIB/hKtp4U6mdD91a31Zg7Q8M49O0x2KThrbrMQYraoDDrs4STdFB8Zv6bceUguOoX1A=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@prefresh/core/-/core-1.3.4.tgz"
|
||||||
|
"version" "1.3.4"
|
||||||
|
|
||||||
|
"@prefresh/utils@^1.1.2":
|
||||||
|
"integrity" "sha512-Mb9abhJTOV4yCfkXrMrcgFiFT7MfNOw8sDa+XyZBdq/Ai2p4Zyxqsb3EgHLOEdHpMj6J9aiZ54W8H6FTam1u+A=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@prefresh/utils/-/utils-1.1.3.tgz"
|
||||||
|
"version" "1.1.3"
|
||||||
|
|
||||||
|
"@prefresh/webpack@^3.2.3":
|
||||||
|
"integrity" "sha512-uT+A7ZuA7fuuUPNEde6Gmzr4oFnzreW9xw6iqw01nPpDiv46o6YWq1j0oGCbdffzHl3fBpcgkPuY07vIfmZ9Lg=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@prefresh/webpack/-/webpack-3.3.3.tgz"
|
||||||
|
"version" "3.3.3"
|
||||||
|
dependencies:
|
||||||
|
"@prefresh/core" "^1.3.3"
|
||||||
|
"@prefresh/utils" "^1.1.2"
|
||||||
|
|
||||||
"@stencil/core@2.4.0":
|
"@stencil/core@2.4.0":
|
||||||
"integrity" "sha512-gU6+Yyd6O0KrCSS/O6j8KKqmRo+/Dcs2fI0+APCpbAWK+nqhwDISpdnSEfGDCLMoAC08XOZCycBRk2K1VGnEcg=="
|
"integrity" "sha512-gU6+Yyd6O0KrCSS/O6j8KKqmRo+/Dcs2fI0+APCpbAWK+nqhwDISpdnSEfGDCLMoAC08XOZCycBRk2K1VGnEcg=="
|
||||||
"resolved" "https://registry.npmjs.org/@stencil/core/-/core-2.4.0.tgz"
|
"resolved" "https://registry.npmjs.org/@stencil/core/-/core-2.4.0.tgz"
|
||||||
@ -1345,6 +1368,18 @@
|
|||||||
"webpack-format-messages" "^2.0.5"
|
"webpack-format-messages" "^2.0.5"
|
||||||
"yauzl" "2.10.0"
|
"yauzl" "2.10.0"
|
||||||
|
|
||||||
|
"@tarojs/plugin-framework-react@^3.4.12":
|
||||||
|
"integrity" "sha512-kc03rvuotgQ2q7gYM9rjy7IV1tjT4ZcbdfdVs2e7olpdXcY9d4x1OqF3vYy+FT/f6WXgf/xs7cBa8Btw3J44iQ=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@tarojs/plugin-framework-react/-/plugin-framework-react-3.4.12.tgz"
|
||||||
|
"version" "3.4.12"
|
||||||
|
dependencies:
|
||||||
|
"@pmmmwh/react-refresh-webpack-plugin" "0.4.3"
|
||||||
|
"@prefresh/webpack" "^3.2.3"
|
||||||
|
"@tarojs/runtime" "3.4.12"
|
||||||
|
"@tarojs/shared" "3.4.12"
|
||||||
|
"acorn" "^8.0.4"
|
||||||
|
"acorn-walk" "^8.0.0"
|
||||||
|
|
||||||
"@tarojs/plugin-platform-alipay@3.3.10":
|
"@tarojs/plugin-platform-alipay@3.3.10":
|
||||||
"integrity" "sha512-hbsCk++etkRsi/IQNEIY4R94dwqtTSVB/1sBfgbtuzVe0fOSbrlfwFwzJOrE131CnAXmI9sWiCF/MTy0qCKWjA=="
|
"integrity" "sha512-hbsCk++etkRsi/IQNEIY4R94dwqtTSVB/1sBfgbtuzVe0fOSbrlfwFwzJOrE131CnAXmI9sWiCF/MTy0qCKWjA=="
|
||||||
"resolved" "https://registry.npmjs.org/@tarojs/plugin-platform-alipay/-/plugin-platform-alipay-3.3.10.tgz"
|
"resolved" "https://registry.npmjs.org/@tarojs/plugin-platform-alipay/-/plugin-platform-alipay-3.3.10.tgz"
|
||||||
@ -1436,6 +1471,16 @@
|
|||||||
"lodash-es" "4.17.15"
|
"lodash-es" "4.17.15"
|
||||||
"reflect-metadata" "^0.1.13"
|
"reflect-metadata" "^0.1.13"
|
||||||
|
|
||||||
|
"@tarojs/runtime@3.4.12":
|
||||||
|
"integrity" "sha512-4bQIXoiMRQa0xzma4nm4MAmLpPtcZLOalmW/X8WtPjAVqENZ8o3FE2lZMHjhv62HhvyHf+XZWWk/V+VzAhjcGQ=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@tarojs/runtime/-/runtime-3.4.12.tgz"
|
||||||
|
"version" "3.4.12"
|
||||||
|
dependencies:
|
||||||
|
"@tarojs/shared" "3.4.12"
|
||||||
|
"inversify" "5.1.1"
|
||||||
|
"lodash-es" "4.17.15"
|
||||||
|
"reflect-metadata" "^0.1.13"
|
||||||
|
|
||||||
"@tarojs/service@3.3.10":
|
"@tarojs/service@3.3.10":
|
||||||
"integrity" "sha512-r2vcLDFfovVv2kJ1RMPGoH7pgk8kNFMCTDgoWXbZxpddmpbO7Q1QYVP3EDNykgidnMVfw2cKnEkQdyTSsh+lbA=="
|
"integrity" "sha512-r2vcLDFfovVv2kJ1RMPGoH7pgk8kNFMCTDgoWXbZxpddmpbO7Q1QYVP3EDNykgidnMVfw2cKnEkQdyTSsh+lbA=="
|
||||||
"resolved" "https://registry.npmjs.org/@tarojs/service/-/service-3.3.10.tgz"
|
"resolved" "https://registry.npmjs.org/@tarojs/service/-/service-3.3.10.tgz"
|
||||||
@ -1455,6 +1500,11 @@
|
|||||||
"resolved" "https://registry.npmjs.org/@tarojs/shared/-/shared-3.3.10.tgz"
|
"resolved" "https://registry.npmjs.org/@tarojs/shared/-/shared-3.3.10.tgz"
|
||||||
"version" "3.3.10"
|
"version" "3.3.10"
|
||||||
|
|
||||||
|
"@tarojs/shared@3.4.12":
|
||||||
|
"integrity" "sha512-ELpEOA7Uzr5rQujfSmVS+ugTO22ZP8j3vi2AfrwJKg7zit1kZcBnDUIsN6+3Es3Vnp1oXsyQobWrgn30xYt2Ug=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/@tarojs/shared/-/shared-3.4.12.tgz"
|
||||||
|
"version" "3.4.12"
|
||||||
|
|
||||||
"@tarojs/taro-h5@3.3.10":
|
"@tarojs/taro-h5@3.3.10":
|
||||||
"integrity" "sha512-hBVr0Ee7rGTD+cuK5ugPUHwbD0L9qOwMKHqMyUzqAb8LS6aYF3aIFDwVbCYx77ZgtpGZFUqXnpDCvnHofWVyTg=="
|
"integrity" "sha512-hBVr0Ee7rGTD+cuK5ugPUHwbD0L9qOwMKHqMyUzqAb8LS6aYF3aIFDwVbCYx77ZgtpGZFUqXnpDCvnHofWVyTg=="
|
||||||
"resolved" "https://registry.npmjs.org/@tarojs/taro-h5/-/taro-h5-3.3.10.tgz"
|
"resolved" "https://registry.npmjs.org/@tarojs/taro-h5/-/taro-h5-3.3.10.tgz"
|
||||||
@ -2030,9 +2080,9 @@
|
|||||||
"version" "6.4.2"
|
"version" "6.4.2"
|
||||||
|
|
||||||
"acorn@^8.0.4":
|
"acorn@^8.0.4":
|
||||||
"integrity" "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ=="
|
"integrity" "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A=="
|
||||||
"resolved" "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz"
|
"resolved" "https://registry.npmmirror.com/acorn/-/acorn-8.7.1.tgz"
|
||||||
"version" "8.7.0"
|
"version" "8.7.1"
|
||||||
|
|
||||||
"acorn@^8.7.0":
|
"acorn@^8.7.0":
|
||||||
"integrity" "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ=="
|
"integrity" "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ=="
|
||||||
@ -3757,7 +3807,7 @@
|
|||||||
|
|
||||||
"dayjs@^1.11.3":
|
"dayjs@^1.11.3":
|
||||||
"integrity" "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A=="
|
"integrity" "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A=="
|
||||||
"resolved" "https://registry.npmjs.org/dayjs/-/dayjs-1.11.3.tgz"
|
"resolved" "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.3.tgz"
|
||||||
"version" "1.11.3"
|
"version" "1.11.3"
|
||||||
|
|
||||||
"debug@^2.2.0", "debug@^2.3.3", "debug@^2.6.0", "debug@^2.6.9", "debug@2.6.9":
|
"debug@^2.2.0", "debug@^2.3.3", "debug@^2.6.0", "debug@^2.6.9", "debug@2.6.9":
|
||||||
@ -8229,6 +8279,11 @@
|
|||||||
"source-map" "^0.6.1"
|
"source-map" "^0.6.1"
|
||||||
"supports-color" "^6.1.0"
|
"supports-color" "^6.1.0"
|
||||||
|
|
||||||
|
"preact@^10.0.0", "preact@^10.4.0":
|
||||||
|
"integrity" "sha512-AKGt0BsDSiAYzVS78jZ9qRwuorY2CoSZtf1iOC6gLb/3QyZt+fLT09aYJBjRc/BEcRc4j+j3ggERMdNE43i1LQ=="
|
||||||
|
"resolved" "https://registry.npmmirror.com/preact/-/preact-10.8.2.tgz"
|
||||||
|
"version" "10.8.2"
|
||||||
|
|
||||||
"prelude-ls@~1.1.2":
|
"prelude-ls@~1.1.2":
|
||||||
"integrity" "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
"integrity" "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||||
"resolved" "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz"
|
"resolved" "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user