diff --git a/project.config.json b/project.config.json
index d98974e..9f2fb2a 100644
--- a/project.config.json
+++ b/project.config.json
@@ -2,7 +2,7 @@
"miniprogramRoot": "./dist",
"projectname": "EShop",
"description": "电子商城",
- "appid": "touristappid",
+ "appid": "wx68d92d7cbf0b6963",
"setting": {
"urlCheck": true,
"es6": false,
diff --git a/src/app.config.ts b/src/app.config.ts
index 61bd39e..21286b2 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -158,6 +158,12 @@ export default {
pages: [
"index",
]
+ },
+ {
+ root: "pages/certification",
+ pages: [
+ "index",
+ ]
}
]
}
diff --git a/src/components/AddressList/index.scss b/src/components/AddressList/index.scss
index 5f8cd5b..8c6198c 100644
--- a/src/components/AddressList/index.scss
+++ b/src/components/AddressList/index.scss
@@ -6,7 +6,9 @@
height: 100%;
box-sizing: border-box;
}
-
+ .address-scroll-view-content{
+ padding-bottom: 300px;
+ }
.address-list{
width: 704px;
height: 156px;
@@ -17,6 +19,7 @@
box-sizing: border-box;
margin: 18px auto 0;
border: 1px solid #ffffff;
+ border: 1px solid rgba(0,0,0,0.16);
}
.address-active{
border: 1px solid #68b4ff;
@@ -25,7 +28,7 @@
.address-list:first-child{
margin-top: 0;
}
- .address-list:last-child{
+ .address-list-last{
margin-bottom: 300px;
}
.address-user{
@@ -54,6 +57,9 @@
color: #ababab;
margin-left: 30px;
}
+ .address-edit{
+ padding: 10px;
+ }
.address-edit .icon-bianji{
font-size: 40px;
}
@@ -62,6 +68,13 @@
font-size: 24px;
font-weight: 400;
color: #3c3c3c;
+ display: flex;
+ width: 100%;
+ }
+ .address-list-info view{
+ max-width: 60%;
+ text-overflow: ellipsis;
+ overflow: hidden;white-space: nowrap;
}
.address-list-bottom{
display: flex;justify-content: space-between;
@@ -76,7 +89,7 @@
font-weight: 400;
color: #ffffff;
display: flex;align-items: center;justify-content: center;
- position: absolute;bottom: 8%;left: 50%;
+ position: absolute;bottom: 4%;left: 50%;
transform: translateX(-50%);
}
.address-no-data{
diff --git a/src/components/AddressList/index.tsx b/src/components/AddressList/index.tsx
index e412e63..b2066a0 100644
--- a/src/components/AddressList/index.tsx
+++ b/src/components/AddressList/index.tsx
@@ -81,37 +81,40 @@ const AddressList = memo((props:Params)=>{
return (
- {
- state?.data?.list?.length>0?
- state?.data?.list?.map((item,index)=>{
- // data.length>0?
- // data.map((item,index)=>{
- return(
- handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${focusId==item.id&&'address-active'}`}>
-
- {item.name}
- {
- item.is_default?默认:
- {item.phone}
- }
-
-
-
- {/* **省**市**区**街道****仓库 */}
- {item.province_name+item.city_name+item.district_name} {item.address_detail}
+
+ {
+ state?.data?.list?.length>0?
+ state?.data?.list?.map((item,index)=>{
+ // data.length>0?
+ // data.map((item,index)=>{
+ return(
+ handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${focusId==item.id&&'address-active'}`}>
+
+ {item.name}
{
- item.is_default&&{item.phone.replace(item.phone.substring(3,7), "****")}
+ item.is_default?默认:
+ {item.phone.replace(item.phone.substring(4,7), "****")}
}
-
-
-
+
+
+ {item.province_name+item.city_name+item.district_name}
+ {/* {item.address_detail} */}
+
+ {
+ item.is_default&&{item.phone.replace(item.phone.substring(4,7), "****")}
+ }
+
+ e.stopPropagation()} url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">
+
+
+
-
- );
- }):
- 暂未添加地址
- }
+ );
+ }):
+ 暂未添加地址
+ }
+
{addButtonEnabled&&添加收货地址}
diff --git a/src/components/FromList/index.scss b/src/components/FromList/index.scss
index e820f47..969922e 100644
--- a/src/components/FromList/index.scss
+++ b/src/components/FromList/index.scss
@@ -9,6 +9,11 @@
color: #000000;
margin-top: 20px;
}
+ .form-list-label-required::before{
+ content: "*";
+ color: #FF0000;
+ font-size: 28px;
+ }
.form-list-right{
width: 506px;
font-size: 26px;
diff --git a/src/components/FromList/index.tsx b/src/components/FromList/index.tsx
index 8df1c6c..0af11d4 100644
--- a/src/components/FromList/index.tsx
+++ b/src/components/FromList/index.tsx
@@ -10,20 +10,24 @@ interface ListParams{
placeholder?:string, // 提示文本
children?: any, // 插槽
type?: string // 类型:1.input,2.textarea,3.select
- value?: any
+ value?: any,
+ style?: object, //整行样式
+ labelStyle?: object, // label样式
+ contentStyle?: object,
+ required?: boolean
}
// 表单列表
const FromList = memo((props:ListParams)=>{
- const {type="input",value=""} = props;
+ const {type="input",value="",style={},labelStyle={},contentStyle={},required=false} = props;
return (
-
- {props.label}
+
+ {props.label}
{
props.children??
-
+
{
type=="input"?
diff --git a/src/components/FromListCertification/index.scss b/src/components/FromListCertification/index.scss
new file mode 100644
index 0000000..fc0ed5a
--- /dev/null
+++ b/src/components/FromListCertification/index.scss
@@ -0,0 +1,95 @@
+.From-list-certification{
+ display: flex;
+ justify-content: space-between;
+ margin: 0 30px;
+ border-bottom: 1px solid #F0F0F0;
+ padding: 15px 0;
+
+ .From-list-certification-label{
+ font-size: 28px;
+ font-weight: 400;
+ color: #000000;
+ margin-top: 20px;
+ width: 150px;
+ border-right: 1px solid #F0F0F0;
+ }
+ .From-list-certification-label-required::before{
+ content: "*";
+ color: #FF0000;
+ font-size: 28px;
+ }
+ .From-list-certification-right{
+ width: 506px;
+ font-size: 26px;
+ font-weight: 400;
+ }
+ .From-list-certification-right-meet{
+ width: 506px;
+ min-height: 45px;
+ border-radius: 20px;
+ box-sizing: border-box;
+ padding: 10px 20px;
+ display: flex;justify-content: space-between;
+ align-items: center;
+ }
+ .From-list-certification-input{
+ width: 100%;
+ display: flex;align-items: center;
+ }
+ .From-list-certification-input view{
+ height: 100%;
+ padding: 0 10px;
+ box-sizing: border-box;
+ }
+ .From-list-certification-input text{
+ width: 30px;
+ min-width: 30px;
+ height: 30px;
+ background: rgba(0,0,0,0.3);
+ border-radius: 50%;
+ font-size: 18px;
+ display: flex;align-items: center;
+ justify-content: center;
+ flex: 1;
+ color: white;
+ }
+ .From-list-certification-right input,.From-list-certification-right textarea{
+ // flex: 0 0 auto;
+ min-height: 100%;
+ width: 100%;
+ color: #000000;
+ }
+ .From-list-certification-right textarea{
+ height: 186px;
+ border-radius: 10px;
+ padding: 10px 0;
+ }
+ .From-list-certification-right .phcolor{
+ color: #ababab;
+ }
+ .From-list-certification-right-placeholder{
+ color: #ababab;
+ }
+ .From-list-certification-right-enter .icon-a-moreback{
+ font-size: 28px;
+ }
+ .add-address-default{
+ display: flex;align-items: center;justify-content: space-between;
+ margin: 70px 30px 0;
+ font-size: 26px;
+ font-weight: 700;
+ color: #000000;
+ }
+
+ .add-address-save{
+ width: 668px;
+ height: 82px;
+ background: #007aff;
+ border-radius: 40px;
+ font-size: 32px;
+ font-weight: 400;
+ color: #ffffff;
+ display: flex;align-items: center;justify-content: center;
+ margin: 620px auto 0;
+ }
+}
\ No newline at end of file
diff --git a/src/components/FromListCertification/index.tsx b/src/components/FromListCertification/index.tsx
new file mode 100644
index 0000000..3017860
--- /dev/null
+++ b/src/components/FromListCertification/index.tsx
@@ -0,0 +1,60 @@
+
+import { Input, Text, Textarea, View } from "@tarojs/components"
+import { memo } from "react"
+import "./index.scss"
+
+interface ListParams{
+ label: string, //左边label
+ onInput?: (ev:Object)=>void, // 输入框输入
+ onClick?:()=>any, //点击列表
+ placeholder?:string, // 提示文本
+ children?: any, // 插槽
+ type?: string // 类型:1.input,2.textarea,3.select
+ value?: any,
+ style?: object, //整行样式
+ labelStyle?: object, // label样式
+ contentStyle?: object,
+ required?: boolean
+}
+
+// 表单列表
+const FromList = memo((props:ListParams)=>{
+ const {type="input",value="",style={},labelStyle={},contentStyle={},required=false} = props;
+
+ return (
+
+ {props.label}
+
+ {
+ props.children??
+
+ {
+ type=="input"?
+
+
+ {value&&
+ props.onInput&&props.onInput({detail: {value: ""}})} className="iconfont icon-qingkong"/>
+ }
+ :
+ type=="textarea"?:
+ <>
+ {
+ props.value?{value}:
+
+ {props.placeholder}
+
+ }
+
+ >
+ }
+
+ }
+
+
+ )
+})
+
+const A = ()=>{
+
+}
+export default FromList;
\ No newline at end of file
diff --git a/src/components/Message/index.scss b/src/components/Message/index.scss
new file mode 100644
index 0000000..97f968b
--- /dev/null
+++ b/src/components/Message/index.scss
@@ -0,0 +1,16 @@
+.message-custom-tips{
+ width: 100%;
+ height: 66px;
+ background: #FFE6CE;
+ border: 2px solid #ffe6ce;
+ padding: 0 30px;
+ display: flex;align-items: center;
+ font-size: 24px;
+ font-weight: 400;
+ box-sizing: border-box;
+ color: #EE7500;
+ text{
+ margin-right: 10px;
+ font-size: 30px;
+ }
+}
\ No newline at end of file
diff --git a/src/components/Message/index.tsx b/src/components/Message/index.tsx
new file mode 100644
index 0000000..caaa032
--- /dev/null
+++ b/src/components/Message/index.tsx
@@ -0,0 +1,19 @@
+
+import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components"
+import { memo } from "react"
+import "./index.scss"
+
+interface Params{
+ text: String,//提示信息
+}
+
+// 消息提示
+const Message = memo((props:Params)=>{
+ return (
+
+ {props.text}
+
+ )
+})
+
+export default Message;
\ No newline at end of file
diff --git a/src/pages/addressAdd/index.scss b/src/pages/addressAdd/index.scss
index b229c8b..8443556 100644
--- a/src/pages/addressAdd/index.scss
+++ b/src/pages/addressAdd/index.scss
@@ -40,6 +40,8 @@
font-weight: 400;
color: #ffffff;
display: flex;align-items: center;justify-content: center;
- margin: 620px auto 0;
+ // margin: 620px auto 0;
+ position: fixed;left: 50%;bottom: 50px;
+ transform: translateX(-50%);
}
}
\ No newline at end of file
diff --git a/src/pages/addressAdd/index.tsx b/src/pages/addressAdd/index.tsx
index 0399a4d..fbc2b16 100644
--- a/src/pages/addressAdd/index.tsx
+++ b/src/pages/addressAdd/index.tsx
@@ -54,7 +54,10 @@ export default ()=>{
})
const rules = {
name: [{
- message: "请输入收货人姓名"
+ message: "请输入正确收货人姓名",
+ validator: (value:any, rule:any)=>{ // 自定义验证,返回true表示匹配到了(错误)
+ return value.length>5;
+ }
}],
phone: [{
message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
diff --git a/src/pages/certification/index.config.ts b/src/pages/certification/index.config.ts
new file mode 100644
index 0000000..b645668
--- /dev/null
+++ b/src/pages/certification/index.config.ts
@@ -0,0 +1,4 @@
+export default {
+ navigationBarTitleText: '认证信息',
+ enableShareAppMessage: true,
+}
diff --git a/src/pages/certification/index.scss b/src/pages/certification/index.scss
new file mode 100644
index 0000000..441d16b
--- /dev/null
+++ b/src/pages/certification/index.scss
@@ -0,0 +1,104 @@
+.certification{
+ display: flex;
+ flex-direction: column;
+ background-color: #F0F0F0;
+ padding-bottom: 300px;
+ .certification-content{
+ background-color: white;
+ padding-bottom: 50px;
+ }
+ .certification-content:nth-of-type(3){
+ margin-top: 18px;
+ }
+ .certification-title{
+ font-size: 26px;
+ font-weight: 700;
+ margin-left: 30px;
+ padding-top: 40px;
+ color: #000000;
+ // border-top: 18px solid #F0F0F0;
+ }
+ .certification-upload{
+ width: 642px;
+ height: 316px;
+ border: 10px solid #cde5ff;
+ border-radius: 30px;
+ margin: 0 auto;
+ display: flex;align-items: center;justify-content: center;
+ font-size: 34px;
+ font-weight: 700;
+ color: #68b4ff;
+ background-color: #ECF5FF;
+ position: relative;
+ margin-top: 60px;
+ }
+ .certification-upload text{
+ margin-bottom: 60px;
+ }
+ .certification-upload-no{
+ display: flex;flex-direction: column;align-items: center;
+ }
+ .certification-upload-no-icon{
+ width: 104px;
+ height: 104px;
+ background: #68b4ff;
+ box-shadow: 0px 0px 12px 0px #68b4ff;
+ display: flex;align-items: center;justify-content: center;
+ border-radius: 50%;
+ color: white;
+ }
+ .certification-upload-no-tips{
+ margin-top: 30px;
+ border-radius: 30px;
+ font-size: 24px;
+ font-weight: 400;
+ color: #000000;
+ }
+ .certification-button{
+ position: absolute;bottom: -10px;left: -10px;right: -10px;
+ background-color: #858A8F;
+ display: flex;
+ height: 86px;
+ border-radius: 0 0 30px 30px;
+ }
+ .certification-button view{
+ flex: 1;
+ display: flex;align-items: center;justify-content: center;
+ font-size: 24px;
+ font-weight: 400;
+ color: #ffffff;
+ }
+ .certification-button view:first-child{
+ border-right: 1px solid #CCCCCC;
+ }
+ .certification-footer{
+ width: 750px;
+ height: 174px;
+ background: #ffffff;
+ box-shadow: 6px 0px 12px 0px rgba(0,0,0,0.16);
+ position: fixed;bottom: 0;left: 0;right: 0;
+ width: 100%;
+ display: flex;align-items: center;justify-content: center;
+ }
+ .certification-footer-button{
+ width: 696px;
+ height: 82px;
+ background: #ffffff;
+ border: 2px solid #cde5ff;
+ display: flex;
+ border-radius: 40px;
+ box-sizing: border-box;
+ overflow: hidden;
+ }
+ .certification-footer-button view{
+ flex: 1;
+ display: flex;align-items: center;justify-content: center;
+ font-size: 32px;
+ font-weight: 400;
+ color: #007aff;
+ }
+ .certification-footer-button view:last-child{
+ color: white;
+ background-color: #007AFF;
+ }
+}
\ No newline at end of file
diff --git a/src/pages/certification/index.tsx b/src/pages/certification/index.tsx
new file mode 100644
index 0000000..0d0767d
--- /dev/null
+++ b/src/pages/certification/index.tsx
@@ -0,0 +1,135 @@
+
+import FromListCertification from "@/components/FromListCertification"
+import { Button, Input, Text, Textarea, View } from "@tarojs/components"
+import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
+import {weightAddApi, weightDetailApi,weightEditApi} from "@/api/weightList"
+import { useEffect, useState } from "react"
+import { alert, retrieval } from "@/common/common"
+import "./index.scss"
+import Message from "@/components/Message"
+
+export default ()=>{
+ const {type,id} = useRouter().params;
+ useEffect(()=>{
+ if(type=="add"){
+ setNavigationBarTitle({title:"添加码单信息"})
+ }else{
+ initalFormData();
+ setNavigationBarTitle({title:"修改码单信息"})
+ }
+ },[]);
+ // 获取编辑码单信息
+ const {fetchData: getFromData} = weightDetailApi()
+ const initalFormData = async ()=>{
+ const detail = await getFromData({id});
+ setFormData({
+ title: detail.data.title,
+ purchaser_name: detail.data.purchaser_name,
+ phone: detail.data.phone,
+ is_default: detail.data.is_default,
+ id: detail.data.id,
+ })
+ }
+ // 保存
+ const [formData, setFormData] = useState({
+ title: "",
+ purchaser_name: "",
+ phone: "",
+ is_default: false,
+ id: 0
+ })
+ const rules = {
+ title: [{
+ message: "请输入抬头"
+ }],
+ purchaser_name: [{
+ message: "请输入客户名称"
+ }],
+ phone: [{
+ message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
+ }]
+ }
+ const {fetchData} = weightAddApi()
+ const {fetchData: editFetch} = weightEditApi()
+ const handleSave = ()=>{
+ retrieval(formData, rules).then(async ()=>{
+ const result = type=="add"?await fetchData({
+ title: formData.title,
+ purchaser_name: formData.purchaser_name,
+ phone: formData.phone,
+ is_default: formData.is_default,
+ }):await editFetch({
+ title: formData.title,
+ purchaser_name: formData.purchaser_name,
+ phone: formData.phone,
+ is_default: formData.is_default,
+ id: formData.id
+ });
+ if(result.success){
+ Taro.eventCenter.trigger("weightList:refresh");
+ Taro.navigateBack();
+ alert.success("保存成功");
+ }else{
+ alert.error(result.msg);
+ }
+ }).catch((message)=>{
+ alert.none(message)
+ })
+ }
+ // 监听表单完善
+ const [hozon, setHozon] = useState(false);
+ useEffect(()=>{
+ if(retrieval){
+ retrieval(formData).then(()=>setHozon(true)).catch(()=>setHozon(false))
+ }
+ },[formData])
+
+ return (
+
+
+
+ 企业认证
+ setFormData({...formData,title:ev.detail.value})}
+ value={formData["title"]} label="认证类型" placeholder="企业认证"/>
+ setFormData({...formData,title:ev.detail.value})} value={formData["title"]} label="企业名称" placeholder="请输入营业执照上的企业名称" required/>
+ setFormData({...formData,title:ev.detail.value})} value={formData["title"]} label="企业营业" placeholder="注册号、统一社会信用代码、组织机构代码" required/>
+
+ {/* 营业执照正面
+
+ 查看证件
+ 重新上传
+ */}
+
+ +
+ 上传营业执照下面
+
+
+
+
+ 法人认证
+ setFormData({...formData,title:ev.detail.value})} value={formData["title"]} label="法人代表" placeholder="填写法人名称" required/>
+ setFormData({...formData,title:ev.detail.value})} value={formData["title"]} label="法人身份" placeholder="填写法人代表身份证号" required/>
+
+ 身份证正面
+
+ 查看证件
+ 重新上传
+
+
+
+ 身份证反面
+
+ 查看证件
+ 重新上传
+
+
+
+
+
+ 取消
+ 提交
+
+
+
+ )
+}
diff --git a/src/pages/creditLine/index.tsx b/src/pages/creditLine/index.tsx
index e28f80b..5468d50 100644
--- a/src/pages/creditLine/index.tsx
+++ b/src/pages/creditLine/index.tsx
@@ -41,7 +41,7 @@ export default ()=>{
const credit_quota_used_line = convertPrice(formatPriceDiv(result.data.credit_quota_used_line));
const credit_quota_line = convertPrice(formatPriceDiv(result.data.credit_quota_line));
const credit_quota_available_line = convertPrice(formatPriceDiv(result.data.credit_quota_available_line));
- const progress = (credit_quota_available_line[0] / credit_quota_line[0] * 100).toFixed(0);
+ const progress = ((credit_quota_available_line[0]??0) / (credit_quota_line[0]??0) * 100).toFixed(0);
switch(Number(result.data.quota_status)){
case 0://暂未开通
@@ -162,7 +162,7 @@ const Progress = (props)=>{
},[props.progress])
const getCanvas = ()=>{
// const percentage = props.progress??0;
- const percentage = props.progress;
+ const percentage = props.progress||0;
const query = Taro.createSelectorQuery();
query.select("#myCanvas").fields({ node: true, size: true }).exec((res) => {
const canvas = res[0]?.node;
@@ -235,7 +235,7 @@ const Progress = (props)=>{
gad2.addColorStop(0, props.style?.cir?.background?.end[0]);
gad2.addColorStop(1, props.style?.cir?.background?.start[1]);
ctx.strokeStyle = gad2;
- ctx.arc(0,0,104,Math.PI*0.5,2*Math.PI/100*(percentage-25), false);
+ ctx.arc(0,0,104,Math.PI*0.4,2*Math.PI/100*(percentage-25), false);
ctx.stroke();
}
}else{
diff --git a/src/pages/user/index.module.scss b/src/pages/user/index.module.scss
index 693421b..464844d 100644
--- a/src/pages/user/index.module.scss
+++ b/src/pages/user/index.module.scss
@@ -1,13 +1,15 @@
.main{
background-color: #F8F8F8;
- height: 100vh;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
.header{
background: #68b4ff;
background-size: cover;
height: 560px;
position: relative;
.card-main{
- margin-top: 33%;
+ margin-top: 10px;
}
}
.header-card{
@@ -24,7 +26,7 @@
}
.card-info{
display: flex;justify-content: space-between;
- position: absolute;top: -16%;left: 0;right: 0;
+ position: absolute;top: -15%;left: 0;right: 0;
width: 702px;
padding: 0 30px;
box-sizing: border-box;
@@ -55,21 +57,21 @@
display: flex;
align-items: center;
}
- .arcd-info-left-certification{
- width: 94px;
- height: 28px;
- background: #C7F0DF;
- border-radius: 4px;
- display: flex;align-items: center;justify-content: center;
- font-size: 18px;
- font-weight: 400;
- color: #07C160;
- margin-left: 16px;
- }
.arcd-info-left-phone{
- font-size: 24px;
- font-weight: 400;
- color: #3c3c3c;
+ font-size: 24px;
+ font-weight: 400;
+ color: #707070;
+ }
+ .arcd-info-left-phone button{
+ padding: 0 10px;
+ height: 42px;
+ background: #ffffff;
+ border: 2px solid #cde5ff;
+ border-radius: 20px;
+ font-size: 22px;
+ font-weight: 400;
+ color: #007aff;
+ display: flex;align-items: center;justify-content: center;
}
.card-info-right{
font-size: 26px;
@@ -105,6 +107,9 @@
font-size: 22px;
font-weight: 400;
color: #ababab;
+ display: inline-block;
+ text-align: right;
+ width: 150px;
}
.card-main-title-content{
display: grid;
@@ -137,9 +142,6 @@
position: absolute;top: -10px;right: 0;
}
- .assets{
-
- }
.assets-title{
font-size: 28px;
font-weight: 700;
@@ -175,6 +177,9 @@
.main-card{
margin: 131px auto 0;
}
+ .card-feature{
+ margin-bottom: 50px;
+ }
.card-main-list-content-item{
display: flex;align-items: center;
justify-content: space-between;
@@ -195,4 +200,120 @@
.card-main-list-content-item-right text{
font-size: 30px;
}
+
+ .auth{
+ margin-top: 115px;
+ }
+ .auth-top{
+ display: flex;align-items: center;justify-content: space-between;
+ }
+ .auth-status{
+ padding: 0 10px;
+ height: 30px;
+ background: #dddddd;
+ border-radius: 10px 4px 0px 0px;
+ display: flex;align-items: center;justify-content: center;
+ font-size: 18px;
+ font-weight: 400;
+ color: #707070;
+ }
+ .auth-tips{
+ font-size: 18px;
+ font-weight: 400;
+ color: #007aff;
+ width: 150px;
+ text-align: right;
+ }
+ .auth-tips text{
+ font-size: 17px;
+ }
+ .auth-company{
+ height: 70px;
+ width: 100%;
+ background: #f6f6f6;
+ border: 2px solid #f0f0f0;
+ border-radius: 0px 10px 10px 10px;
+ font-size: 26px;
+ font-weight: 700;
+ color: #707070;
+ display: flex;align-items: center;justify-content: center;
+ }
+
+ .modal{
+ background: rgba(0,0,0,0.6);
+ position: fixed;inset: 0;
+ display: flex;justify-content: center;align-items: center;
+ }
+ .modal-content{
+ width: 598px;
+ background: #ffffff;
+ border-radius: 10px;
+ animation: enlargeK 0.2s linear;
+ overflow: hidden;
+ }
+ @keyframes enlargeK {
+ 0%{
+ transform: scale(0);
+ }
+ 100%{
+ transform: scale(1);
+ }
+ }
+ .modal-title{
+ font-size: 32px;
+ font-weight: 700;
+ text-align: center;
+ color: #000000;
+ margin-bottom: 58px;
+ padding-top: 48px;
+ }
+ .modal-letter{
+ font-size: 26px;
+ font-weight: 400;
+ color: #707070;
+ padding: 0 30px;
+ line-height: 50px;
+ }
+ .modal-letter-text{
+ text-indent: 60px;
+ }
+ .modal-letter-beginn{
+ font-size: 28px;
+ font-weight: 400;
+ color: #000000;
+ margin-bottom: 25px;
+ }
+ .modal-letter-end{
+ font-size: 26px;
+ font-weight: 400;
+ text-align: right;
+ margin-top: 61px;
+ }
+ .modal-button{
+ display: flex;
+ border-top: 1px solid #DDDDDD;
+ margin-top: 45px;
+ }
+ .modal-button button, .modal-button view{
+ display: flex;align-items: center;justify-content: center;
+ width: 50%;
+ height: 90px;
+ background-color: white;
+ }
+ .modal-button button{
+ font-size: 26px;
+ font-weight: 400;
+ color: #707070;
+ border-radius: 0;
+ border-right: 1px solid #DDDDDD;
+ }
+ .modal-button button::after{
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-button view{
+ font-size: 26px;
+ font-weight: 400;
+ color: #007aff;
+ }
}
\ No newline at end of file
diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx
index 98dec6d..1dfc6d7 100644
--- a/src/pages/user/index.tsx
+++ b/src/pages/user/index.tsx
@@ -1,30 +1,16 @@
-import { View, Image, Text, Navigator } from "@tarojs/components"
+import { View, Image, Text, Navigator, Button } from "@tarojs/components"
import { memo, useEffect, useState } from "react"
import styles from './index.module.scss'
import classnames from "classnames";
import { useSelector } from "@/reducers/hooks";
import { GetAdminUserInfoApi } from "@/api/user";
-import { goLink } from "@/common/common";
+import { alert, goLink } from "@/common/common";
export default () => {
-
- return (
-
-
-
-
-
- )
-}
-// 头部 | 订单
-const Header = memo(() => {
- let menu = [{ text: "待配布", icon: "icon-daipeibu" }, { text: "待付款", icon: "icon-daifukuan" },
- { text: "待发货", icon: "icon-daifahuo" }, { text: "已发货", icon: "icon-yifahuo" },
- { text: "退款/售后", icon: "icon-a-tuikuanshouhou" }];
// 用户信息
const { fetchData, state } = GetAdminUserInfoApi();
- const {userInfo} = useSelector(state => state.userInfo);
+ const {adminUserInfo, userInfo} = useSelector(state => state.userInfo);
const [mUserInfo, setMUserInfo] = useState({
phone: ""
});
@@ -34,10 +20,61 @@ const Header = memo(() => {
useEffect(()=>{
setMUserInfo({
...mUserInfo,
- phone: userInfo?.phone?.replace(userInfo?.phone?.substring(3,7), "****") as string
+ // phone: userInfo?.phone?.replace(userInfo?.phone?.substring(3,7), "****") as string
})
getData();
- },[])
+ },[]);
+
+ return (
+
+
+
+
+
+
+ )
+}
+const Modal = memo((props:any)=>{
+ const {data} = props;
+ const handleouter = ()=>{
+ console.log(222);
+
+ }
+ return(
+ <>
+ {!data?.is_authorize_phone&&
+
+ e.stopPropagation()}>
+ 首次登录提醒
+
+ To: 万丰园纺织科技
+ 尊敬的老朋友,欢迎你使用小程序商城;由于您是我们长期合作的伙伴,你的组织已自动为你生成,关联后可查看历史订单哟。
+ 信息错误请联系客服
+
+
+
+ 我知道
+
+
+
+ }
+ >
+ )
+})
+
+// 头部 | 订单
+const Header = memo((props:any) => {
+ const {data, userInfo} = props;
+ let menu = [{ text: "待配布", icon: "icon-daipeibu" }, { text: "待付款", icon: "icon-daifukuan" },
+ { text: "待发货", icon: "icon-daifahuo" }, { text: "已发货", icon: "icon-yifahuo" },
+ { text: "退款/售后", icon: "icon-a-tuikuanshouhou" }];
+ const getPhoneNumber = (ev)=>{
+ console.log(ev);
+ if(ev.detail?.code){
+ }else{
+ alert.none("取消了授权");
+ }
+ }
return (
@@ -45,17 +82,16 @@ const Header = memo(() => {
-
+
{/* {state.data.user_name} */}
- 麦兜
-
- 已认证
-
+ {data?.user_name}
+
+
+ {userInfo?.phone||}
- 佛山市带生纺织品有限公司
@@ -69,6 +105,18 @@ const Header = memo(() => {
+
+
+
+ 1
+ 认证不通过
+
+ 重新认证
+
+
+ 佛山市带生纺织品有限公司
+
+
订单
@@ -130,15 +178,16 @@ const Assets = () => {
// 功能
const Main = memo(() => {
- let menu = [{ text: "我的收藏", icon: "icon-shoucang" }, { text: "颜色对比", icon: "icon-yanseduibi" },
+ 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-fenxiang" }, { text: "团队邀请", icon: "icon-yaoqingtuandui" }]
return (
-
+
{
menu.map((item, index) => {
return (
-
+
{item.text}
@@ -146,7 +195,7 @@ const Main = memo(() => {
-
+
)
})
}
diff --git a/src/pages/userEdit/index.scss b/src/pages/userEdit/index.scss
index 56f8f31..c34ca9b 100644
--- a/src/pages/userEdit/index.scss
+++ b/src/pages/userEdit/index.scss
@@ -7,7 +7,6 @@
color: #ababab;
display: flex;flex-direction: column;
align-items: center;justify-content: center;
- margin-bottom: 24px;
background-color: white;
height: 300px;
}
@@ -22,8 +21,18 @@
.user-edit-content{
background-color: white;
+ margin-top: 24px;
padding: 0 30px;
}
+ .user-edit-content-title{
+ font-size: 26px;
+ font-weight: 700;
+ color: #000000;
+ padding: 40px;
+ }
+ .user-edit-content-title text{
+ margin-right: 10px;
+ }
.user-edit-list{
height: 90px;
display: flex;align-items: center;
@@ -60,7 +69,9 @@
background: #ffffff;
border: 2px solid #cde5ff;
border-radius: 40px;
- margin: 359px auto 0;
+ // margin: 359px auto 0;
+ position: fixed;left: 50%;bottom: 50px;
+ transform: translateX(-50%);
font-size: 32px;
font-weight: 400;
text-align: center;
diff --git a/src/pages/userEdit/index.tsx b/src/pages/userEdit/index.tsx
index 4064db7..62974a6 100644
--- a/src/pages/userEdit/index.tsx
+++ b/src/pages/userEdit/index.tsx
@@ -74,12 +74,18 @@ export default ()=>{
点击编辑头像
+ 个人资料
triggerList('real_name')} data={state.data.user_name} label="昵称" placeholder="请输入" icon=""/>
- onNavigate("/pages/company/index")} label="公司/组织" placeholder="请输入" icon=""/>
- onNavigate("/pages/addressManager/index")} label="地址管理" placeholder="添加 / 修改收货地址" icon=""/>
- onNavigate("/pages/weightList/index")} label="码单管理" placeholder="修改码单抬头 / 客户 / 电话等显示信息" icon=""/>
-
-
+ onNavigate("/pages/company/index")} label="手机号" placeholder="去绑定" icon=""/>
+
+
+ 组织资料
+ triggerList('real_name')} data={state.data.user_name} label="名称" placeholder="待绑定" icon=""/>
+ onNavigate("/pages/company/index")} label="类型" placeholder="完善公司/组织信息" icon=""/>
+ onNavigate("/pages/certification/index")} label="我的认证" placeholder="待绑定" icon="">
+ 已认证
+
+ onNavigate("/pages/weightList/index")} label="创建人" placeholder="完善公司/组织信息" icon=""/>
@@ -98,6 +104,7 @@ const UserEditList = memo((props:any)=>{
{
+ props.children?props.children:
props.data?props.data:
{props.placeholder}
}