1
This commit is contained in:
commit
069303de80
@ -32,3 +32,25 @@ import { useRequest } from "@/use/useHttp"
|
|||||||
method: "get",
|
method: "get",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址编辑
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const addressEditApi = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/address`,
|
||||||
|
method: "put",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址删除
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const addressDeleteApi = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/address`,
|
||||||
|
method: "delete",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
13
src/api/subjectMaterial.ts
Normal file
13
src/api/subjectMaterial.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { useRequest } from "@/use/useHttp"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专题列表
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const GetSubjectList = () => {
|
||||||
|
return useRequest({
|
||||||
|
url: `/v1/mall/subject/list`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -98,6 +98,12 @@ export default {
|
|||||||
"index",
|
"index",
|
||||||
"comfirm"
|
"comfirm"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
root: "pages/editOrder",
|
||||||
|
pages: [
|
||||||
|
"index",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
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 = `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.165:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `http://192.168.1.224:50002/lymarket` // 添
|
// export const BASE_URL = `http://192.168.1.224:50002/lymarket` // 添
|
||||||
|
|
||||||
// CDN
|
// CDN
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
border: 1px solid #68b4ff;
|
border: 1px solid #68b4ff;
|
||||||
box-shadow: 0px 0px 10px 0px rgba(0,122,255,0.27);
|
box-shadow: 0px 0px 10px 0px rgba(0,122,255,0.27);
|
||||||
}
|
}
|
||||||
|
.address-list:first-child{
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
.address-list:last-child{
|
.address-list:last-child{
|
||||||
margin-bottom: 300px;
|
margin-bottom: 300px;
|
||||||
}
|
}
|
||||||
|
@ -2,34 +2,81 @@
|
|||||||
import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components"
|
import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components"
|
||||||
import { memo, useEffect, useState } from "react"
|
import { memo, useEffect, useState } from "react"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
import {addressListApi} from "@/api/addressManager"
|
import {addressListApi,addressDeleteApi} from "@/api/addressManager"
|
||||||
import { useDidShow } from "@tarojs/taro"
|
import { alert } from "@/common/common"
|
||||||
|
import Taro, { showModal } from "@tarojs/taro"
|
||||||
|
|
||||||
interface Params{
|
interface Params{
|
||||||
refresherEnabled?: boolean,//是否开启刷新
|
refresherEnabled?: boolean,//是否开启刷新
|
||||||
onSelect?: (item:any,index:number)=>void,//列表选择
|
onSelect?: (item:any,index:number)=>void,//列表选择
|
||||||
|
addButtonEnabled?: boolean, //是否显示添加按钮
|
||||||
|
focusBorderEnabled?: boolean, //焦点显示蓝色边框
|
||||||
|
id?: number, //默认选择值
|
||||||
}
|
}
|
||||||
|
|
||||||
// 地址列表
|
// 地址列表
|
||||||
const AddressList = memo((props:Params)=>{
|
const AddressList = memo((props:Params)=>{
|
||||||
|
const {addButtonEnabled=true,focusBorderEnabled=false} = props;
|
||||||
const {fetchData, state} = addressListApi()
|
const {fetchData, state} = addressListApi()
|
||||||
// 获取数据
|
// 获取数据
|
||||||
const getData = ()=>{
|
const getData = async ()=>{
|
||||||
fetchData();
|
const result = await fetchData();
|
||||||
|
if(props.id){
|
||||||
|
setFocusId(props.id as any);
|
||||||
|
}else{
|
||||||
|
result.data.list?.every(item=>{
|
||||||
|
if(item.is_default){
|
||||||
|
setFocusId(item.id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
getData();
|
getData();
|
||||||
|
// 监听刷新
|
||||||
|
Taro.eventCenter.on("addressList:refresh", getData);
|
||||||
|
return ()=>{
|
||||||
|
Taro.eventCenter.off("addressList:refresh", getData);
|
||||||
|
}
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
// 处理刷新
|
// 处理刷新
|
||||||
const [refreshState, setRefreshState] = useState(false);
|
const [refreshState, setRefreshState] = useState(false);
|
||||||
const handleRefresh = async ()=>{
|
const handleRefresh = async ()=>{
|
||||||
setRefreshState(true);
|
setRefreshState(true);
|
||||||
await fetchData();
|
await getData();
|
||||||
setRefreshState(false);
|
setRefreshState(false);
|
||||||
}
|
}
|
||||||
const data = Array.from({length:15});
|
const data = Array.from({length:15});
|
||||||
|
// 焦点
|
||||||
|
const [focusId, setFocusId] = useState();
|
||||||
|
// 列表选择
|
||||||
|
const handleSelect = (item: any, index: number)=>{
|
||||||
|
props.onSelect&&props.onSelect(item,index);
|
||||||
|
if(focusBorderEnabled){
|
||||||
|
setFocusId(item?.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 删除地址
|
||||||
|
const {fetchData: deleteFetch} = addressDeleteApi()
|
||||||
|
const handleDelete = (item:any)=>{
|
||||||
|
showModal(({
|
||||||
|
title: "提示",
|
||||||
|
content: "是否删除地址?",
|
||||||
|
async success(ev){
|
||||||
|
if(ev.confirm){
|
||||||
|
const result = await deleteFetch({id:item.id});
|
||||||
|
if(result.success){
|
||||||
|
alert.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}else{
|
||||||
|
alert.success(result.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="address-scroll-view">
|
<View className="address-scroll-view">
|
||||||
@ -40,7 +87,7 @@ const AddressList = memo((props:Params)=>{
|
|||||||
// data.length>0?
|
// data.length>0?
|
||||||
// data.map((item,index)=>{
|
// data.map((item,index)=>{
|
||||||
return(
|
return(
|
||||||
<View onClick={()=>props.onSelect&&props.onSelect(item,index)} className={`address-list ${item.is_default&&'address-active'}`}>
|
<View onLongPress={()=>handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${focusId==item.id&&'address-active'}`}>
|
||||||
<View className="address-user">
|
<View className="address-user">
|
||||||
{item.name}
|
{item.name}
|
||||||
{
|
{
|
||||||
@ -53,7 +100,7 @@ const AddressList = memo((props:Params)=>{
|
|||||||
{/* **省**市**区**街道****仓库 */}
|
{/* **省**市**区**街道****仓库 */}
|
||||||
{item.province_name+item.city_name+item.district_name} {item.address_detail}
|
{item.province_name+item.city_name+item.district_name} {item.address_detail}
|
||||||
{
|
{
|
||||||
item.is_default&&<Text className="address-list-phone">{item.phone}</Text>
|
item.is_default&&<Text className="address-list-phone">{item.phone.replace(item.phone.substring(3,7), "****")}</Text>
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
<Navigator url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">
|
<Navigator url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">
|
||||||
@ -63,7 +110,7 @@ const AddressList = memo((props:Params)=>{
|
|||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}):
|
}):
|
||||||
<View className="address-no-data">暂未添加地址</View>
|
addButtonEnabled&&<View className="address-no-data">暂未添加地址</View>
|
||||||
}
|
}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<Navigator url="/pages/addressAdd/index?type=add" hoverClass="none" className="add-address">添加收货地址</Navigator>
|
<Navigator url="/pages/addressAdd/index?type=add" hoverClass="none" className="add-address">添加收货地址</Navigator>
|
||||||
|
@ -33,7 +33,6 @@ export default memo((props: Params) => {
|
|||||||
}
|
}
|
||||||
return {}
|
return {}
|
||||||
}, [showBorder])
|
}, [showBorder])
|
||||||
console.log('searchInput::')
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.searchInput_main} style={stylen}>
|
<View className={styles.searchInput_main} style={stylen}>
|
||||||
{showTitle&&<View className={styles.searchInput_title}>{title}</View>}
|
{showTitle&&<View className={styles.searchInput_title}>{title}</View>}
|
||||||
|
@ -6,7 +6,7 @@ import { Button, Input, Text, Textarea, View } from "@tarojs/components"
|
|||||||
import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
|
import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
import {addressAddApi, addressDetailApi} from "@/api/addressManager"
|
import {addressAddApi, addressDetailApi,addressEditApi} from "@/api/addressManager"
|
||||||
|
|
||||||
export default ()=>{
|
export default ()=>{
|
||||||
const [showSiteModal, setShowSiteModal] = useState(false);
|
const [showSiteModal, setShowSiteModal] = useState(false);
|
||||||
@ -15,7 +15,7 @@ export default ()=>{
|
|||||||
if(type=="add"){
|
if(type=="add"){
|
||||||
setNavigationBarTitle({title:"新增收货地址"})
|
setNavigationBarTitle({title:"新增收货地址"})
|
||||||
}else{
|
}else{
|
||||||
// initalFormData();
|
initalFormData();
|
||||||
setNavigationBarTitle({title:"编辑收货地址"})
|
setNavigationBarTitle({title:"编辑收货地址"})
|
||||||
}
|
}
|
||||||
},[])
|
},[])
|
||||||
@ -23,19 +23,24 @@ export default ()=>{
|
|||||||
const {fetchData: getFromData} = addressDetailApi()
|
const {fetchData: getFromData} = addressDetailApi()
|
||||||
const initalFormData = async ()=>{
|
const initalFormData = async ()=>{
|
||||||
const detail = await getFromData({id});
|
const detail = await getFromData({id});
|
||||||
const siteArray = []
|
const { province_id,province_name,city_id,city_name,district_id,district_name } = detail.data;
|
||||||
// setFormData({
|
const siteArray = [{id: province_id, name: province_name}];
|
||||||
// name: detail.data.name,
|
city_id&&siteArray.push({id: city_id, name: city_name});
|
||||||
// phone: detail.data.phone,
|
district_id&&siteArray.push({id: district_id, name: district_name});
|
||||||
// site: detail.data.,
|
setFormData({
|
||||||
// siteArray: [],
|
name: detail.data.name,
|
||||||
// district_id: detail.data.district_id,
|
phone: detail.data.phone,
|
||||||
// address_detail: detail.data.address_detail,
|
site: siteArray.map(item=>item.name).join(" "),
|
||||||
// is_default: false
|
siteArray: siteArray as any,
|
||||||
// })
|
district_id: detail.data.district_id,
|
||||||
|
address_detail: detail.data.address_detail,
|
||||||
|
is_default: detail.data.is_default,
|
||||||
|
id: detail.data.id,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const {fetchData, state} = addressAddApi()
|
const {fetchData} = addressAddApi()
|
||||||
|
const {fetchData: editFetch} = addressEditApi()
|
||||||
// 保存
|
// 保存
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
name: "",
|
name: "",
|
||||||
@ -44,7 +49,8 @@ export default ()=>{
|
|||||||
siteArray: [],
|
siteArray: [],
|
||||||
district_id:"",
|
district_id:"",
|
||||||
address_detail: "",
|
address_detail: "",
|
||||||
is_default: false
|
is_default: false,
|
||||||
|
id: 0
|
||||||
})
|
})
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{
|
name: [{
|
||||||
@ -62,20 +68,27 @@ export default ()=>{
|
|||||||
}
|
}
|
||||||
const handleSave = ()=>{
|
const handleSave = ()=>{
|
||||||
retrieval(formData, rules).then(async ()=>{
|
retrieval(formData, rules).then(async ()=>{
|
||||||
const result = await fetchData({
|
const result = type=="add"?await fetchData({
|
||||||
name: formData.name,
|
name: formData.name,
|
||||||
phone:formData.phone,
|
phone:formData.phone,
|
||||||
site:formData.site,
|
|
||||||
district_id:formData.district_id,
|
district_id:formData.district_id,
|
||||||
address_detail: formData.address_detail,
|
address_detail: formData.address_detail,
|
||||||
is_default: formData.is_default
|
is_default: formData.is_default
|
||||||
|
}):await editFetch({
|
||||||
|
name: formData.name,
|
||||||
|
phone:formData.phone,
|
||||||
|
district_id:formData.district_id,
|
||||||
|
address_detail: formData.address_detail,
|
||||||
|
is_default: formData.is_default,
|
||||||
|
id: formData.id
|
||||||
});
|
});
|
||||||
if(result.success){
|
if(result.success){
|
||||||
alert.success("保存成功")
|
Taro.eventCenter.trigger("addressList:refresh");
|
||||||
|
Taro.navigateBack();
|
||||||
|
alert.success("保存成功");
|
||||||
}else{
|
}else{
|
||||||
alert.error(result.msg);
|
alert.error(result.msg);
|
||||||
}
|
}
|
||||||
// Taro.navigateBack();
|
|
||||||
}).catch((message)=>{
|
}).catch((message)=>{
|
||||||
alert.none(message)
|
alert.none(message)
|
||||||
})
|
})
|
||||||
@ -89,8 +102,6 @@ export default ()=>{
|
|||||||
},[formData])
|
},[formData])
|
||||||
// 设置选择地址
|
// 设置选择地址
|
||||||
const handleSetSite = (ev:any)=>{
|
const handleSetSite = (ev:any)=>{
|
||||||
console.log(ev);
|
|
||||||
|
|
||||||
if(ev.length>=3){
|
if(ev.length>=3){
|
||||||
setFormData({
|
setFormData({
|
||||||
...formData,
|
...formData,
|
||||||
@ -122,7 +133,7 @@ export default ()=>{
|
|||||||
<Button style={{"background": hozon?'#007aff':''}} hoverClass="none" className={`add-address-save`} onClick={handleSave}>
|
<Button style={{"background": hozon?'#007aff':''}} hoverClass="none" className={`add-address-save`} onClick={handleSave}>
|
||||||
保存
|
保存
|
||||||
</Button>
|
</Button>
|
||||||
<Address addressOnSelect={handleSetSite} defaultValue={[ {name: "广东省", id: 193, level: 2}, {name: "佛山市", id: 202, level:3}, {name: "高明区", id: 204, level:4}]} addressOnClose={()=>setShowSiteModal(false)} show={showSiteModal}/>
|
<Address addressOnSelect={handleSetSite} defaultValue={formData.siteArray} addressOnClose={()=>setShowSiteModal(false)} show={showSiteModal}/>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,12 @@ import classnames from "classnames";
|
|||||||
import Search from '@/components/search'
|
import Search from '@/components/search'
|
||||||
import Product from '@/components/product'
|
import Product from '@/components/product'
|
||||||
import InfiniteScroll from '@/components/infiniteScroll'
|
import InfiniteScroll from '@/components/infiniteScroll'
|
||||||
import Popup from "@/components/popup";
|
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Filter from "./components/filter";
|
import Filter from "./components/filter";
|
||||||
import Tabs from "@/components/tabs";
|
|
||||||
import SortBtn from "@/components/sortBtn";
|
import SortBtn from "@/components/sortBtn";
|
||||||
|
import SelectData from "../searchList/components/selectData";
|
||||||
|
import {GetSubjectList} from '@/api/subjectMaterial'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const [showPopup, setShowPopup] = useState(false)
|
const [showPopup, setShowPopup] = useState(false)
|
||||||
@ -23,6 +23,19 @@ export default () => {
|
|||||||
{title: '系列', value:9},
|
{title: '系列', value:9},
|
||||||
{title: '系列', value:10},
|
{title: '系列', value:10},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getSubjectList()
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
//获取专题
|
||||||
|
const [list, setList] = useState<any>([])
|
||||||
|
const {fetchData} = GetSubjectList()
|
||||||
|
const getSubjectList = async () => {
|
||||||
|
let res = await fetchData()
|
||||||
|
console.log('res::', res)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<View className={styles.search}>
|
<View className={styles.search}>
|
||||||
@ -40,7 +53,7 @@ export default () => {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.filter_btns}>
|
<View className={styles.filter_btns}>
|
||||||
<Tabs list={selectList} style={{}}/>
|
<SelectData list={selectList}/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.list}>
|
<View className={styles.list}>
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
.order_title{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20px 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 116px;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
text{
|
||||||
|
flex:1;
|
||||||
|
font-size: $font_size;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.order_status{
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
width: 148px;
|
||||||
|
height: 55px;
|
||||||
|
color: $color_font_three;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 55px;
|
||||||
|
font-size: $font_size_medium;
|
||||||
|
border-radius: 30px;
|
||||||
|
&:nth-last-child(1) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.order_status_selected{
|
||||||
|
color: $color_main;
|
||||||
|
border: 1px solid $color_main;
|
||||||
|
}
|
||||||
|
}
|
28
src/pages/editOrder/components/shipmentMode/index.tsx
Normal file
28
src/pages/editOrder/components/shipmentMode/index.tsx
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { Text, View } from "@tarojs/components"
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
import classnames from "classnames";
|
||||||
|
import { memo, useRef, useState } from "react";
|
||||||
|
|
||||||
|
type Param = {
|
||||||
|
onSelect?:(val:number) => void
|
||||||
|
}
|
||||||
|
export default memo(({onSelect}: Param) => {
|
||||||
|
//收货方法 1:自提,2:物流
|
||||||
|
const shipmentMode = useRef([
|
||||||
|
{value:1, label:'上门自提', selected:false},
|
||||||
|
{value:2, label:'物流', selected:false}
|
||||||
|
])
|
||||||
|
const [selectValue, setSelectValue] = useState()
|
||||||
|
const selectShipmentMode = (value) => {
|
||||||
|
setSelectValue(() => value)
|
||||||
|
onSelect?.(value)
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<View className={styles.order_title}>
|
||||||
|
<Text>收货方式</Text>
|
||||||
|
{shipmentMode.current.map(item => {
|
||||||
|
return <View className={classnames(styles.order_status, (selectValue == item.value)&&styles.order_status_selected)} onClick={() => selectShipmentMode(item.value)}>{item.label}</View>
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
})
|
5
src/pages/editOrder/index.config.ts
Normal file
5
src/pages/editOrder/index.config.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
navigationBarTitleText: '电子商城',
|
||||||
|
enablePullDownRefresh: true,
|
||||||
|
backgroundTextStyle: 'dark'
|
||||||
|
}
|
86
src/pages/editOrder/index.module.scss
Normal file
86
src/pages/editOrder/index.module.scss
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
.order_edit_main{
|
||||||
|
min-height: 100%;
|
||||||
|
background-color:$color_bg_one;
|
||||||
|
padding-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.title_msg{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 0 20px;
|
||||||
|
border-radius: 20px;
|
||||||
|
.miconfont{
|
||||||
|
font-size: 50px;
|
||||||
|
color: $color_main;
|
||||||
|
}
|
||||||
|
.title_msg_con{
|
||||||
|
font-size: 23px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 30px;
|
||||||
|
text{
|
||||||
|
&:nth-child(1) {
|
||||||
|
color: $color_main;
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
color: $color_font_three;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.shipmentMode_con{
|
||||||
|
margin: 0 20px;
|
||||||
|
}
|
||||||
|
.old_address{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 30px 20px 60px 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.old_address_text{
|
||||||
|
font-weight: 700;
|
||||||
|
&:nth-of-type(1) {
|
||||||
|
padding-bottom: 30px;
|
||||||
|
font-size: $font_size_big;
|
||||||
|
}
|
||||||
|
&:nth-of-type(2) {
|
||||||
|
padding-bottom: 30px;
|
||||||
|
font-size: $font_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.userInfo{
|
||||||
|
display: flex;
|
||||||
|
font-size: $font_size;
|
||||||
|
color: $color_font_three;
|
||||||
|
align-items: center;
|
||||||
|
.userInfo_text{
|
||||||
|
font-size: $font_size;
|
||||||
|
&:nth-child(2) {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select_address_con{
|
||||||
|
flex:1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 30px 30px 0px 0px;
|
||||||
|
.title{
|
||||||
|
font-size: $font_size;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
.address_list{
|
||||||
|
flex:1;
|
||||||
|
height: 0;
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
47
src/pages/editOrder/index.tsx
Normal file
47
src/pages/editOrder/index.tsx
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { Text, View } from "@tarojs/components"
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
import classnames from "classnames";
|
||||||
|
import { useCallback, useRef, useState } from "react";
|
||||||
|
import ShipmentMode from "./components/shipmentMode";
|
||||||
|
import AddressList from "@/components/AddressList";
|
||||||
|
export default () => {
|
||||||
|
//提交的数据
|
||||||
|
const [submitData, setSubmitData] = useState({
|
||||||
|
address_id:0,
|
||||||
|
id:0,
|
||||||
|
shipment_mode: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
//获取收货方法
|
||||||
|
const getShipmentMode = useCallback((num) => {
|
||||||
|
setSubmitData((val) => ({...val, shipment_mode:num}))
|
||||||
|
}, [])
|
||||||
|
return (
|
||||||
|
<View className={styles.order_edit_main}>
|
||||||
|
<View className={classnames(styles.title_msg)}>
|
||||||
|
<Text className={classnames(styles.miconfont, 'iconfont icon-tick-pressed')}></Text>
|
||||||
|
<View className={styles.title_msg_con}>
|
||||||
|
<Text>修改收货地址可能会影响发货时效</Text>
|
||||||
|
<Text>若商品已发货,则不能修改</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.shipmentMode_con}>
|
||||||
|
<ShipmentMode onSelect={getShipmentMode}/>
|
||||||
|
</View>
|
||||||
|
<View className={styles.old_address}>
|
||||||
|
<Text className={styles.old_address_text}>原地址:</Text>
|
||||||
|
<Text className={styles.old_address_text}>广东省 佛山市 禅城区 张槎街道 清风路1988号麦兜的大 大仓库</Text>
|
||||||
|
<View className={styles.userInfo}>
|
||||||
|
<Text className={styles.userInfo_text}>陈先生</Text>
|
||||||
|
<Text className={styles.userInfo_text}>1818877790</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.select_address_con}>
|
||||||
|
<View className={styles.title}>重新选择收货地址</View>
|
||||||
|
<View className={styles.address_list}>
|
||||||
|
<AddressList focusBorderEnabled={true} addButtonEnabled={false}/>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
@ -1,5 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '电子商城',
|
navigationBarTitleText: '修改地址',
|
||||||
enablePullDownRefresh: true,
|
|
||||||
backgroundTextStyle: 'dark'
|
|
||||||
}
|
}
|
||||||
|
@ -9,11 +9,8 @@ import { goLink } from '@/common/common'
|
|||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import Taro, { Events, useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
|
import Taro, { Events, useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
|
||||||
import useManualPullDownRefresh from '@/use/useManualPullDownRefresh'
|
|
||||||
|
|
||||||
import {GetProductKindListApi, GetProductListApi} from '@/api/material'
|
import {GetProductKindListApi, GetProductListApi} from '@/api/material'
|
||||||
import useLogin from '@/use/useLogin'
|
import useLogin from '@/use/useLogin'
|
||||||
import LoadingCard from '@/components/loadingCard'
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
|
||||||
|
@ -41,10 +41,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 20px;
|
padding: 20px;
|
||||||
height: 116px;
|
min-height: 116px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
.order_desc_con{
|
.order_desc_con{
|
||||||
width: 150px;
|
width: 150px;
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
|
@ -15,6 +15,7 @@ import styles from './comfirm.module.scss'
|
|||||||
import { getParam } from "@/common/system";
|
import { getParam } from "@/common/system";
|
||||||
import useLogin from "@/use/useLogin";
|
import useLogin from "@/use/useLogin";
|
||||||
import { alert, goLink } from "@/common/common";
|
import { alert, goLink } from "@/common/common";
|
||||||
|
import ShipmentMode from "../editOrder/components/shipmentMode";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const {checkLogin} = useLogin()
|
const {checkLogin} = useLogin()
|
||||||
@ -121,14 +122,9 @@ import { alert, goLink } from "@/common/common";
|
|||||||
setSubmitOrderData((val) => ({...val, address_id:e.id}))
|
setSubmitOrderData((val) => ({...val, address_id:e.id}))
|
||||||
}
|
}
|
||||||
|
|
||||||
//收货方法 1:自提,2:物流
|
const selectShipmentMode = useCallback((value) => {
|
||||||
const shipmentMode = useRef([
|
|
||||||
{value:1, label:'上门自提', selected:false},
|
|
||||||
{value:2, label:'物流', selected:false}
|
|
||||||
])
|
|
||||||
const selectShipmentMode = (value) => {
|
|
||||||
setSubmitOrderData((val) => ({...val, shipment_mode:value}))
|
setSubmitOrderData((val) => ({...val, shipment_mode:value}))
|
||||||
}
|
}, [])
|
||||||
|
|
||||||
//获取备注
|
//获取备注
|
||||||
const getRemark = useCallback((e) => {
|
const getRemark = useCallback((e) => {
|
||||||
@ -171,12 +167,7 @@ import { alert, goLink } from "@/common/common";
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
<View className={styles.order_title}>
|
<ShipmentMode onSelect={selectShipmentMode}/>
|
||||||
<Text>收货方式</Text>
|
|
||||||
{shipmentMode.current.map(item => {
|
|
||||||
return <View className={classnames(styles.order_status, (submitOrderData?.shipment_mode == item.value)&&styles.order_status_selected)} onClick={() => selectShipmentMode(item.value)}>{item.label}</View>
|
|
||||||
})}
|
|
||||||
</View>
|
|
||||||
<AddressInfo onSelect={(e) => getAddress(e)} defaultValue={defaultAddress}/>
|
<AddressInfo onSelect={(e) => getAddress(e)} defaultValue={defaultAddress}/>
|
||||||
<KindList value={formatPreViewOrderMemo}/>
|
<KindList value={formatPreViewOrderMemo}/>
|
||||||
<View className={styles.order_desc} onClick={() => setShowDesc(true)}>
|
<View className={styles.order_desc} onClick={() => setShowDesc(true)}>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
.order_address_icon{
|
.order_address_icon{
|
||||||
font-size: 60px;
|
font-size: 76px;
|
||||||
color: $color_main;
|
color: $color_main;
|
||||||
}
|
}
|
||||||
.order_address_text_con{
|
.order_address_text_con{
|
||||||
@ -16,21 +16,37 @@
|
|||||||
padding: 0 30px;
|
padding: 0 30px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.order_address_text_title{
|
.order_address_text_title{
|
||||||
font-size: $font_size;
|
font-size: $font_size_medium;
|
||||||
font-weight: 700;
|
margin-top: 10px;
|
||||||
@include common_ellipsis;
|
@include common_ellipsis;
|
||||||
}
|
}
|
||||||
.order_address_text_name{
|
.order_address_text_name{
|
||||||
margin-top: 20px;
|
|
||||||
color: $color_font_three;
|
align-items: center;
|
||||||
font-size: $font_size_medium;
|
|
||||||
text{
|
text{
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
|
color: #000;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: $color_font_one;
|
||||||
margin-right: 40px;
|
margin-right: 40px;
|
||||||
}
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
color: $color_font_one;
|
||||||
|
font-size: $font_size_medium;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.updateBtn{
|
||||||
|
font-size: $font_size_medium;
|
||||||
|
color: $color_font_three;
|
||||||
|
width: 96px;
|
||||||
|
height: 52px;
|
||||||
|
border: 2px solid #dddddd;
|
||||||
|
border-radius: 28px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 52px;
|
||||||
|
}
|
||||||
.order_address_text_no{
|
.order_address_text_no{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
|
@ -15,11 +15,12 @@ export type AddressInfoParam = {
|
|||||||
phone: string
|
phone: string
|
||||||
}
|
}
|
||||||
type Param = {
|
type Param = {
|
||||||
onSelect?: (val:any) => void,
|
onSelect?: (val:any) => void, //选择
|
||||||
defaultValue?: AddressInfoParam|null
|
defaultValue?: AddressInfoParam|null //默认值
|
||||||
|
disabled?: false|true //true禁用后只用于展示
|
||||||
}
|
}
|
||||||
|
|
||||||
export default memo(({onSelect, defaultValue = null}: Param) => {
|
export default memo(({onSelect, defaultValue = null, disabled = false}: Param) => {
|
||||||
const [showAddressList, setShowAddressList] = useState(false)
|
const [showAddressList, setShowAddressList] = useState(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -36,31 +37,40 @@ export default memo(({onSelect, defaultValue = null}: Param) => {
|
|||||||
|
|
||||||
//地址格式
|
//地址格式
|
||||||
const formatAddress = useMemo(() => {
|
const formatAddress = useMemo(() => {
|
||||||
if(userInfo) {
|
if(userInfo)
|
||||||
console.log('userInfo::',userInfo)
|
|
||||||
return userInfo.province_name + userInfo.city_name + userInfo.district_name + userInfo.address_detail
|
return userInfo.province_name + userInfo.city_name + userInfo.district_name + userInfo.address_detail
|
||||||
}
|
|
||||||
}, [userInfo])
|
}, [userInfo])
|
||||||
|
|
||||||
|
const changeShow = () => {
|
||||||
|
if(!disabled)
|
||||||
|
setShowAddressList(() => true)
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<View className={styles.order_address} onClick={() => setShowAddressList(true)}>
|
<View className={styles.order_address} onClick={() => changeShow()}>
|
||||||
<View className={classnames(styles.order_address_icon, 'iconfont icon-daohang')}></View>
|
<View className={classnames(styles.order_address_icon, 'iconfont icon-daohang')}></View>
|
||||||
{!userInfo&&<View className={styles.order_address_text_no}>请选择收货地址及信息</View>||
|
{!userInfo&&
|
||||||
<View className={styles.order_address_text_con}>
|
<>
|
||||||
<View className={styles.order_address_text_title}>{formatAddress}</View>
|
<View className={styles.order_address_text_no}>请选择收货地址及信息</View>
|
||||||
<View className={styles.order_address_text_name}>
|
<View className={classnames(styles.order_address_more_icon, 'iconfont icon-a-moreback')}></View>
|
||||||
<Text>{userInfo?.name}</Text>
|
</>
|
||||||
<Text>{userInfo?.phone}</Text>
|
||<>
|
||||||
|
<View className={styles.order_address_text_con}>
|
||||||
|
<View className={styles.order_address_text_name}>
|
||||||
|
<Text>{userInfo?.name}</Text>
|
||||||
|
<Text>{userInfo?.phone}</Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles.order_address_text_title}>{formatAddress}</View>
|
||||||
</View>
|
</View>
|
||||||
</View>}
|
<View className={styles.updateBtn}>修改</View>
|
||||||
<View className={classnames(styles.order_address_more_icon, 'iconfont icon-a-moreback')}></View>
|
</>}
|
||||||
</View>
|
</View>
|
||||||
<Popup show={showAddressList} showTitle={false} onClose={() => setShowAddressList(false)}>
|
{!disabled&&<Popup show={showAddressList} showTitle={false} onClose={() => setShowAddressList(false)}>
|
||||||
<View className={styles.order_address_list}>
|
<View className={styles.order_address_list}>
|
||||||
<View className={styles.order_address_title}>请选择收货地址</View>
|
<View className={styles.order_address_title}>请选择收货地址</View>
|
||||||
<AddressList onSelect={(item) => getAddress(item)}/>
|
<AddressList onSelect={(item) => getAddress(item)}/>
|
||||||
</View>
|
</View>
|
||||||
</Popup>
|
</Popup>}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
@ -1,23 +1,69 @@
|
|||||||
.order_price{
|
.order_price{
|
||||||
font-weight: 700;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
&:nth-last-child(n+2) {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
.order_price_text{
|
.order_price_text{
|
||||||
font-size: $font_size_medium;
|
font-size: $font_size_medium;
|
||||||
margin-right: 10px;
|
// margin-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
.iconfont_msg{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.miconfont{
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.message{
|
||||||
|
position: absolute;
|
||||||
|
top: -50px;
|
||||||
|
background: #A8B3BD;
|
||||||
|
z-index: 9;
|
||||||
|
min-height: 50px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
&::before{
|
||||||
|
z-index: 1;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -7px;
|
||||||
|
left: 10px;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
content: " ";
|
||||||
|
transform: rotate(45deg);
|
||||||
|
background: #A8B3BD;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.emphasis{
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
.order_price_num{
|
.order_price_num{
|
||||||
|
color: $color_main;
|
||||||
|
font-weight: 700;
|
||||||
text{
|
text{
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
font-size: $font_size_min;
|
font-size: $font_size_min;
|
||||||
}
|
}
|
||||||
&:nth-child(2) {
|
&:nth-child(2) {
|
||||||
font-size: $font_size_big;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
&:nth-child(3) {
|
&:nth-child(3) {
|
||||||
font-size: $font_size_medium;
|
font-size: $font_size_medium;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.emphasis_num{
|
||||||
|
text{
|
||||||
|
&:nth-child(2) {
|
||||||
|
font-size: $font_size_big;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,12 +1,13 @@
|
|||||||
import { Text, View } from "@tarojs/components"
|
import { Text, View } from "@tarojs/components"
|
||||||
import { useCallback, useEffect, useMemo } from "react"
|
import { memo, useCallback, useEffect, useMemo } from "react"
|
||||||
import {formatKbPrice} from '@/common/common'
|
import {formatKbPrice} from '@/common/common'
|
||||||
|
import classnames from "classnames";
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
type Param = {
|
type Param = {
|
||||||
style?: Object,
|
style?: Object,
|
||||||
number?: number
|
number?: number
|
||||||
}
|
}
|
||||||
export default ({style, number = 0}:Param) => {
|
export default memo(({style, number = 0}:Param) => {
|
||||||
const priceDom = useCallback(() => {
|
const priceDom = useCallback(() => {
|
||||||
let res = number.toFixed(2).split('.')
|
let res = number.toFixed(2).split('.')
|
||||||
let int_num = parseInt(res[0]) + ''
|
let int_num = parseInt(res[0]) + ''
|
||||||
@ -20,11 +21,43 @@ export default ({style, number = 0}:Param) => {
|
|||||||
)
|
)
|
||||||
}, [number])
|
}, [number])
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_price}>
|
<>
|
||||||
<Text className={styles.order_price_text}>预估金额</Text>
|
<View className={styles.order_price}>
|
||||||
<View className={styles.order_price_num} style={style}>
|
<View className={styles.order_price_text}>
|
||||||
{priceDom()}
|
<Text>合计金额</Text>
|
||||||
|
<View className={styles.iconfont_msg}>
|
||||||
|
<Text className={classnames(styles.miconfont, 'iconfont icon-a-tuikuanshouhou')}></Text>
|
||||||
|
{/* <View className={classnames(styles.message)}>123123123121212312312312312</View> */}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.order_price_num} style={style}>
|
||||||
|
{priceDom()}
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
<View className={styles.order_price}>
|
||||||
|
<View className={styles.order_price_text}>
|
||||||
|
<Text>空差优惠</Text>
|
||||||
|
<View className={styles.iconfont_msg}>
|
||||||
|
<Text className={classnames(styles.miconfont, 'iconfont icon-a-tuikuanshouhou')}></Text>
|
||||||
|
{/* <View className={classnames(styles.message)}>123123123121212312312312312</View> */}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.order_price_num} style={style}>
|
||||||
|
{priceDom()}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.order_price}>
|
||||||
|
<View className={classnames(styles.order_price_text, styles.emphasis)}>
|
||||||
|
<Text>应付金额</Text>
|
||||||
|
<View className={styles.iconfont_msg}>
|
||||||
|
<Text className={classnames(styles.miconfont, 'iconfont icon-a-tuikuanshouhou')}></Text>
|
||||||
|
{/* <View className={classnames(styles.message)}>123123123121212312312312312</View> */}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={classnames(styles.order_price_num, styles.emphasis_num)} style={style}>
|
||||||
|
{priceDom()}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
})
|
@ -65,7 +65,6 @@ export default memo(({value}:{value:OrderParam|null}) => {
|
|||||||
}
|
}
|
||||||
<View className={styles.order_estimated_amount}>
|
<View className={styles.order_estimated_amount}>
|
||||||
<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)}/>
|
<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)}/>
|
||||||
{/* <View className={styles.order_price_des}>(按照25kg/条, 预估金额)</View> */}
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
background-color: $color_main;
|
background-color: $color_main;
|
||||||
}
|
}
|
||||||
.order_status_line{
|
.order_status_line{
|
||||||
border-left: 4px solid $color_main;
|
border-left: 2px solid $color_main;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
left: 10px;
|
left: 13px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { Text, View } from "@tarojs/components"
|
import { Image, Text, View } from "@tarojs/components"
|
||||||
import { memo, useState } from "react"
|
import { memo, useState } from "react"
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
|
||||||
type Param = {
|
type Param = {
|
||||||
title: string,
|
title: string,
|
||||||
time: string,
|
time: string,
|
||||||
@ -37,6 +36,9 @@ export default memo(({list = []}:{list?:Param[]}) => {
|
|||||||
<Text>{showMore&&'收起物流详情'||'点击查看更多物流详情'}</Text>
|
<Text>{showMore&&'收起物流详情'||'点击查看更多物流详情'}</Text>
|
||||||
<Text className={classnames('iconfont icon-a-moreback', styles.miconfonts, showMore&&styles.open_miconfonts)}></Text>
|
<Text className={classnames('iconfont icon-a-moreback', styles.miconfonts, showMore&&styles.open_miconfonts)}></Text>
|
||||||
</View>}
|
</View>}
|
||||||
|
<View className={styles.tag}>
|
||||||
|
<Image src='./styles/image/hkfk.png' />
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
33
src/pages/order/components/shipmentMode/index.module.scss
Normal file
33
src/pages/order/components/shipmentMode/index.module.scss
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
.order_title{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20px 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 116px;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
text{
|
||||||
|
flex:1;
|
||||||
|
font-size: $font_size;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.order_status{
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
width: 148px;
|
||||||
|
height: 55px;
|
||||||
|
color: $color_font_three;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 55px;
|
||||||
|
font-size: $font_size_medium;
|
||||||
|
border-radius: 30px;
|
||||||
|
&:nth-last-child(1) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.order_status_selected{
|
||||||
|
color: $color_main;
|
||||||
|
border: 1px solid $color_main;
|
||||||
|
}
|
||||||
|
}
|
28
src/pages/order/components/shipmentMode/index.tsx
Normal file
28
src/pages/order/components/shipmentMode/index.tsx
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { Text, View } from "@tarojs/components"
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
import classnames from "classnames";
|
||||||
|
import { memo, useRef, useState } from "react";
|
||||||
|
|
||||||
|
type Param = {
|
||||||
|
onSelect?:(val:number) => void
|
||||||
|
}
|
||||||
|
export default memo(({onSelect}: Param) => {
|
||||||
|
//收货方法 1:自提,2:物流
|
||||||
|
const shipmentMode = useRef([
|
||||||
|
{value:1, label:'上门自提', selected:false},
|
||||||
|
{value:2, label:'物流', selected:false}
|
||||||
|
])
|
||||||
|
const [selectValue, setSelectValue] = useState()
|
||||||
|
const selectShipmentMode = (value) => {
|
||||||
|
setSelectValue(() => value)
|
||||||
|
onSelect?.(value)
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<View className={styles.order_title}>
|
||||||
|
<Text>收货方式</Text>
|
||||||
|
{shipmentMode.current.map(item => {
|
||||||
|
return <View className={classnames(styles.order_status, (selectValue == item.value)&&styles.order_status_selected)} onClick={() => selectShipmentMode(item.value)}>{item.label}</View>
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
})
|
39
src/pages/order/components/weightMemo/index.module.scss
Normal file
39
src/pages/order/components/weightMemo/index.module.scss
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
.weight_memo{
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 0 20px;
|
||||||
|
.weight_memo_item{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 130px;
|
||||||
|
&:nth-child(1) {
|
||||||
|
border-bottom: 1px solid #f3f3f3;
|
||||||
|
}
|
||||||
|
.title, .desc{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: $font_size;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.desc{
|
||||||
|
color: $color_font_two;
|
||||||
|
font-size: $font_size_medium;
|
||||||
|
}
|
||||||
|
.miconfont_check, .miconfont_custom{
|
||||||
|
font-size: 37px;
|
||||||
|
color: $color_main;
|
||||||
|
font-weight: normal;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
.miconfont_custom{
|
||||||
|
color:#FFC300;
|
||||||
|
}
|
||||||
|
.miconfont_more{
|
||||||
|
font-size: 30px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
src/pages/order/components/weightMemo/index.tsx
Normal file
36
src/pages/order/components/weightMemo/index.tsx
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import Popup from "@/components/popup"
|
||||||
|
import { Text, Textarea, View } from "@tarojs/components"
|
||||||
|
import { memo, useCallback, useState } from "react"
|
||||||
|
import styles from './index.module.scss'
|
||||||
|
import classnames from "classnames";
|
||||||
|
|
||||||
|
type Param = {
|
||||||
|
onCheck?: () => void
|
||||||
|
onCustom?: () => void
|
||||||
|
}
|
||||||
|
export default memo(({onCheck, onCustom}:Param) => {
|
||||||
|
return (
|
||||||
|
<View className={styles.weight_memo}>
|
||||||
|
<View className={styles.weight_memo_item} onClick={() => onCheck?.()}>
|
||||||
|
<View className={styles.title}>
|
||||||
|
<Text className={classnames("iconfont icon-a-yuanmadanmadanguanli", styles.miconfont_check)}></Text>
|
||||||
|
<Text>陆盈纺织</Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles.desc}>
|
||||||
|
<Text>查看原码单</Text>
|
||||||
|
<Text className={classnames("iconfont icon-a-moreback", styles.miconfont_more)}></Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View className={styles.weight_memo_item} onClick={() => onCustom?.()}>
|
||||||
|
<View className={styles.title}>
|
||||||
|
<Text className={classnames("iconfont icon-a-yuanmadanmadanguanli", styles.miconfont_custom)}></Text>
|
||||||
|
<Text>我的码单</Text>
|
||||||
|
</View>
|
||||||
|
<View className={styles.desc}>
|
||||||
|
<Text>自定义</Text>
|
||||||
|
<Text className={classnames("iconfont icon-a-moreback", styles.miconfont_more)}></Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
})
|
@ -37,19 +37,24 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 20px;
|
padding: 20px;
|
||||||
height: 116px;
|
min-height: 116px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
.order_desc_con{
|
.order_desc_con{
|
||||||
flex:1;
|
width: 150px;
|
||||||
font-size: $font_size;
|
font-size: $font_size;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
.order_desc_text{
|
.order_desc_text, .order_desc_text_hint{
|
||||||
font-size: $font_size_medium;
|
font-size: $font_size_medium;
|
||||||
color: $color_font_two;
|
color: $color_font_two;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
flex:1;
|
||||||
|
}
|
||||||
|
.order_desc_text_hint{
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
.miconfont{
|
.miconfont{
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@ -61,7 +66,7 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
justify-content: space-between;
|
justify-content: flex-end;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 175px;
|
height: 175px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -74,13 +79,12 @@
|
|||||||
.order_btn {
|
.order_btn {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
opacity: 0.6;
|
border: 2px solid #dddddd;
|
||||||
background: linear-gradient(38deg,#007aff, #4fa6ff 100%, #68b4ff 100%);
|
|
||||||
border-radius: 46px;
|
border-radius: 46px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #fff;
|
color: $color_font_three;
|
||||||
}
|
}
|
||||||
.order_number_desc{
|
.order_number_desc{
|
||||||
font-size: $font_size_medium;
|
font-size: $font_size_medium;
|
||||||
@ -115,4 +119,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.weight_memo_con{
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
import { GetSaleOrderDetailApi } from "@/api/order";
|
import { GetSaleOrderDetailApi } from "@/api/order";
|
||||||
|
import { goLink } from "@/common/common";
|
||||||
import { formatDateTime, formatPriceDiv } from "@/common/fotmat";
|
import { formatDateTime, formatPriceDiv } from "@/common/fotmat";
|
||||||
import Popup from "@/components/popup";
|
import Popup from "@/components/popup";
|
||||||
import SearchInput from "@/components/searchInput";
|
import SearchInput from "@/components/searchInput";
|
||||||
@ -7,10 +8,10 @@ import Taro, { useRouter } from "@tarojs/taro";
|
|||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import AddressInfo from "./components/addressInfo";
|
import AddressInfo from "./components/addressInfo";
|
||||||
import EstimatedAmount from "./components/estimatedAmount";
|
|
||||||
import KindList from "./components/kindList";
|
import KindList from "./components/kindList";
|
||||||
import OrderState from "./components/orderState";
|
import OrderState from "./components/orderState";
|
||||||
import Remark from "./components/remark";
|
import Remark from "./components/remark";
|
||||||
|
import WeightMemo from "./components/weightMemo";
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
@ -58,7 +59,7 @@ import styles from './index.module.scss'
|
|||||||
if (orderDetail.sale_mode == 1 || orderDetail.sale_mode == 2) num_count = Number(num_count / 100);
|
if (orderDetail.sale_mode == 1 || orderDetail.sale_mode == 2) num_count = Number(num_count / 100);
|
||||||
setFormatDetailOrder({
|
setFormatDetailOrder({
|
||||||
estimate_amount: orderDetail.estimate_amount, //预估金额
|
estimate_amount: orderDetail.estimate_amount, //预估金额
|
||||||
estimate_weight: orderDetail.estimate_weight,
|
estimate_weight: orderDetail.estimate_weight,
|
||||||
sale_mode: orderDetail.sale_mode,
|
sale_mode: orderDetail.sale_mode,
|
||||||
sale_mode_name: orderDetail.sale_mode_name,
|
sale_mode_name: orderDetail.sale_mode_name,
|
||||||
colo_count: orderDetail.color_list.length, //颜色数量
|
colo_count: orderDetail.color_list.length, //颜色数量
|
||||||
@ -76,7 +77,7 @@ import styles from './index.module.scss'
|
|||||||
//复制功能
|
//复制功能
|
||||||
const clipboardData = () => {
|
const clipboardData = () => {
|
||||||
Taro.setClipboardData({
|
Taro.setClipboardData({
|
||||||
data: '123123121321',
|
data: orderDetail?.order_no||'',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@ -110,12 +111,20 @@ import styles from './index.module.scss'
|
|||||||
setShowDesc(() => false)
|
setShowDesc(() => false)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
//修改地址
|
||||||
|
const changeAddress = useCallback(() => {
|
||||||
|
goLink('/pages/editOrder/index', {id: router.params.id})
|
||||||
|
}, [router.params])
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_main}>
|
<View className={styles.order_main}>
|
||||||
|
<View className={styles.weight_memo_con}>
|
||||||
|
<WeightMemo/>
|
||||||
|
</View>
|
||||||
<OrderState />
|
<OrderState />
|
||||||
<AddressInfo defaultValue={defaultAddress}/>
|
<View onClick={() => changeAddress()}>
|
||||||
|
<AddressInfo defaultValue={defaultAddress} disabled={true} />
|
||||||
|
</View>
|
||||||
<KindList value={formatPreViewOrderMemo}/>
|
<KindList value={formatPreViewOrderMemo}/>
|
||||||
|
|
||||||
<View className={styles.order_info} >
|
<View className={styles.order_info} >
|
||||||
<View className={styles.order_info_title}>订单信息</View>
|
<View className={styles.order_info_title}>订单信息</View>
|
||||||
<SearchInput showBorder={false} title='单号'>
|
<SearchInput showBorder={false} title='单号'>
|
||||||
@ -127,6 +136,9 @@ import styles from './index.module.scss'
|
|||||||
<SearchInput showBorder={false} title='下单时间'>
|
<SearchInput showBorder={false} title='下单时间'>
|
||||||
<Text>{formatDateTime(orderDetail?.create_time)}</Text>
|
<Text>{formatDateTime(orderDetail?.create_time)}</Text>
|
||||||
</SearchInput>
|
</SearchInput>
|
||||||
|
<SearchInput showBorder={false} title='付款时间'>
|
||||||
|
<Text>{formatDateTime(orderDetail?.create_time)}</Text>
|
||||||
|
</SearchInput>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.order_desc} onClick={() => setShowDesc(true)}>
|
<View className={styles.order_desc} onClick={() => setShowDesc(true)}>
|
||||||
<View className={styles.order_desc_con}>订单备注</View>
|
<View className={styles.order_desc_con}>订单备注</View>
|
||||||
@ -137,7 +149,6 @@ import styles from './index.module.scss'
|
|||||||
<View className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></View>
|
<View className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.submit_order}>
|
<View className={styles.submit_order}>
|
||||||
|
|
||||||
<View className={styles.order_btn}>取消订单</View>
|
<View className={styles.order_btn}>取消订单</View>
|
||||||
</View>
|
</View>
|
||||||
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)} >
|
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)} >
|
||||||
|
@ -1,539 +0,0 @@
|
|||||||
/* Logo 字体 */
|
|
||||||
@font-face {
|
|
||||||
font-family: "iconfont logo";
|
|
||||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
|
||||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
|
||||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
font-family: "iconfont logo";
|
|
||||||
font-size: 160px;
|
|
||||||
font-style: normal;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* tabs */
|
|
||||||
.nav-tabs {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tabs .nav-more {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
height: 42px;
|
|
||||||
line-height: 42px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tabs {
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tabs li {
|
|
||||||
cursor: pointer;
|
|
||||||
width: 100px;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 16px;
|
|
||||||
border-bottom: 2px solid transparent;
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
|
||||||
margin-bottom: -1px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#tabs .active {
|
|
||||||
border-bottom-color: #f00;
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-container .content {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 页面布局 */
|
|
||||||
.main {
|
|
||||||
padding: 30px 100px;
|
|
||||||
width: 960px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main .logo {
|
|
||||||
color: #333;
|
|
||||||
text-align: left;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
line-height: 1;
|
|
||||||
height: 110px;
|
|
||||||
margin-top: -50px;
|
|
||||||
overflow: hidden;
|
|
||||||
*zoom: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main .logo a {
|
|
||||||
font-size: 160px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helps {
|
|
||||||
margin-top: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helps pre {
|
|
||||||
padding: 20px;
|
|
||||||
margin: 10px 0;
|
|
||||||
border: solid 1px #e7e1cd;
|
|
||||||
background-color: #fffdef;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists {
|
|
||||||
width: 100% !important;
|
|
||||||
overflow: hidden;
|
|
||||||
*zoom: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists li {
|
|
||||||
width: 100px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-right: 20px;
|
|
||||||
text-align: center;
|
|
||||||
list-style: none !important;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists li .code-name {
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists .icon {
|
|
||||||
display: block;
|
|
||||||
height: 100px;
|
|
||||||
line-height: 100px;
|
|
||||||
font-size: 42px;
|
|
||||||
margin: 10px auto;
|
|
||||||
color: #333;
|
|
||||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
|
||||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
|
||||||
transition: font-size 0.25s linear, width 0.25s linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists .icon:hover {
|
|
||||||
font-size: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists .svg-icon {
|
|
||||||
/* 通过设置 font-size 来改变图标大小 */
|
|
||||||
width: 1em;
|
|
||||||
/* 图标和文字相邻时,垂直对齐 */
|
|
||||||
vertical-align: -0.15em;
|
|
||||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
|
||||||
fill: currentColor;
|
|
||||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
|
||||||
normalize.css 中也包含这行 */
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon_lists li .name,
|
|
||||||
.icon_lists li .code-name {
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* markdown 样式 */
|
|
||||||
.markdown {
|
|
||||||
color: #666;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.highlight {
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown img {
|
|
||||||
vertical-align: middle;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h1 {
|
|
||||||
color: #404040;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 40px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h2,
|
|
||||||
.markdown h3,
|
|
||||||
.markdown h4,
|
|
||||||
.markdown h5,
|
|
||||||
.markdown h6 {
|
|
||||||
color: #404040;
|
|
||||||
margin: 1.6em 0 0.6em 0;
|
|
||||||
font-weight: 500;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h2 {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h3 {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h4 {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h5 {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h6 {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown hr {
|
|
||||||
height: 1px;
|
|
||||||
border: 0;
|
|
||||||
background: #e9e9e9;
|
|
||||||
margin: 16px 0;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown p {
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>p,
|
|
||||||
.markdown>blockquote,
|
|
||||||
.markdown>.highlight,
|
|
||||||
.markdown>ol,
|
|
||||||
.markdown>ul {
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown ul>li {
|
|
||||||
list-style: circle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>ul li,
|
|
||||||
.markdown blockquote ul>li {
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>ul li p,
|
|
||||||
.markdown>ol li p {
|
|
||||||
margin: 0.6em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown ol>li {
|
|
||||||
list-style: decimal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>ol li,
|
|
||||||
.markdown blockquote ol>li {
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown code {
|
|
||||||
margin: 0 3px;
|
|
||||||
padding: 0 5px;
|
|
||||||
background: #eee;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown strong,
|
|
||||||
.markdown b {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0px;
|
|
||||||
empty-cells: show;
|
|
||||||
border: 1px solid #e9e9e9;
|
|
||||||
width: 95%;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>table th {
|
|
||||||
white-space: nowrap;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>table th,
|
|
||||||
.markdown>table td {
|
|
||||||
border: 1px solid #e9e9e9;
|
|
||||||
padding: 8px 16px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>table th {
|
|
||||||
background: #F7F7F7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown blockquote {
|
|
||||||
font-size: 90%;
|
|
||||||
color: #999;
|
|
||||||
border-left: 4px solid #e9e9e9;
|
|
||||||
padding-left: 0.8em;
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown blockquote p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown .anchor {
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown .waiting {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown h1:hover .anchor,
|
|
||||||
.markdown h2:hover .anchor,
|
|
||||||
.markdown h3:hover .anchor,
|
|
||||||
.markdown h4:hover .anchor,
|
|
||||||
.markdown h5:hover .anchor,
|
|
||||||
.markdown h6:hover .anchor {
|
|
||||||
opacity: 1;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown>br,
|
|
||||||
.markdown>p>br {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.hljs {
|
|
||||||
display: block;
|
|
||||||
background: white;
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #333333;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-comment,
|
|
||||||
.hljs-meta {
|
|
||||||
color: #969896;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-string,
|
|
||||||
.hljs-variable,
|
|
||||||
.hljs-template-variable,
|
|
||||||
.hljs-strong,
|
|
||||||
.hljs-emphasis,
|
|
||||||
.hljs-quote {
|
|
||||||
color: #df5000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.hljs-selector-tag,
|
|
||||||
.hljs-type {
|
|
||||||
color: #a71d5d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-literal,
|
|
||||||
.hljs-symbol,
|
|
||||||
.hljs-bullet,
|
|
||||||
.hljs-attribute {
|
|
||||||
color: #0086b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-section,
|
|
||||||
.hljs-name {
|
|
||||||
color: #63a35c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-tag {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-title,
|
|
||||||
.hljs-attr,
|
|
||||||
.hljs-selector-id,
|
|
||||||
.hljs-selector-class,
|
|
||||||
.hljs-selector-attr,
|
|
||||||
.hljs-selector-pseudo {
|
|
||||||
color: #795da3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-addition {
|
|
||||||
color: #55a532;
|
|
||||||
background-color: #eaffea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-deletion {
|
|
||||||
color: #bd2c00;
|
|
||||||
background-color: #ffecec;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-link {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 代码高亮 */
|
|
||||||
/* PrismJS 1.15.0
|
|
||||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
|
||||||
/**
|
|
||||||
* prism.js default theme for JavaScript, CSS and HTML
|
|
||||||
* Based on dabblet (http://dabblet.com)
|
|
||||||
* @author Lea Verou
|
|
||||||
*/
|
|
||||||
code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
color: black;
|
|
||||||
background: none;
|
|
||||||
text-shadow: 0 1px white;
|
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
||||||
text-align: left;
|
|
||||||
white-space: pre;
|
|
||||||
word-spacing: normal;
|
|
||||||
word-break: normal;
|
|
||||||
word-wrap: normal;
|
|
||||||
line-height: 1.5;
|
|
||||||
|
|
||||||
-moz-tab-size: 4;
|
|
||||||
-o-tab-size: 4;
|
|
||||||
tab-size: 4;
|
|
||||||
|
|
||||||
-webkit-hyphens: none;
|
|
||||||
-moz-hyphens: none;
|
|
||||||
-ms-hyphens: none;
|
|
||||||
hyphens: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre[class*="language-"]::-moz-selection,
|
|
||||||
pre[class*="language-"] ::-moz-selection,
|
|
||||||
code[class*="language-"]::-moz-selection,
|
|
||||||
code[class*="language-"] ::-moz-selection {
|
|
||||||
text-shadow: none;
|
|
||||||
background: #b3d4fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre[class*="language-"]::selection,
|
|
||||||
pre[class*="language-"] ::selection,
|
|
||||||
code[class*="language-"]::selection,
|
|
||||||
code[class*="language-"] ::selection {
|
|
||||||
text-shadow: none;
|
|
||||||
background: #b3d4fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
|
|
||||||
code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code blocks */
|
|
||||||
pre[class*="language-"] {
|
|
||||||
padding: 1em;
|
|
||||||
margin: .5em 0;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:not(pre)>code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
background: #f5f2f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Inline code */
|
|
||||||
:not(pre)>code[class*="language-"] {
|
|
||||||
padding: .1em;
|
|
||||||
border-radius: .3em;
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.comment,
|
|
||||||
.token.prolog,
|
|
||||||
.token.doctype,
|
|
||||||
.token.cdata {
|
|
||||||
color: slategray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.punctuation {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.namespace {
|
|
||||||
opacity: .7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.property,
|
|
||||||
.token.tag,
|
|
||||||
.token.boolean,
|
|
||||||
.token.number,
|
|
||||||
.token.constant,
|
|
||||||
.token.symbol,
|
|
||||||
.token.deleted {
|
|
||||||
color: #905;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.selector,
|
|
||||||
.token.attr-name,
|
|
||||||
.token.string,
|
|
||||||
.token.char,
|
|
||||||
.token.builtin,
|
|
||||||
.token.inserted {
|
|
||||||
color: #690;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.operator,
|
|
||||||
.token.entity,
|
|
||||||
.token.url,
|
|
||||||
.language-css .token.string,
|
|
||||||
.style .token.string {
|
|
||||||
color: #9a6e3a;
|
|
||||||
background: hsla(0, 0%, 100%, .5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.atrule,
|
|
||||||
.token.attr-value,
|
|
||||||
.token.keyword {
|
|
||||||
color: #07a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.function,
|
|
||||||
.token.class-name {
|
|
||||||
color: #DD4A68;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.regex,
|
|
||||||
.token.important,
|
|
||||||
.token.variable {
|
|
||||||
color: #e90;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.important,
|
|
||||||
.token.bold {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.italic {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.entity {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
@ -1,901 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<title>iconfont Demo</title>
|
|
||||||
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
|
|
||||||
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/>
|
|
||||||
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
|
|
||||||
<link rel="stylesheet" href="demo.css">
|
|
||||||
<link rel="stylesheet" href="iconfont.css">
|
|
||||||
<script src="iconfont.js"></script>
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
|
|
||||||
<!-- 代码高亮 -->
|
|
||||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
|
|
||||||
<style>
|
|
||||||
.main .logo {
|
|
||||||
margin-top: 0;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main .logo a {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main .logo .sub-title {
|
|
||||||
margin-left: 0.5em;
|
|
||||||
font-size: 22px;
|
|
||||||
color: #fff;
|
|
||||||
background: linear-gradient(-45deg, #3967FF, #B500FE);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="main">
|
|
||||||
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
|
|
||||||
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
|
|
||||||
|
|
||||||
</a></h1>
|
|
||||||
<div class="nav-tabs">
|
|
||||||
<ul id="tabs" class="dib-box">
|
|
||||||
<li class="dib active"><span>Unicode</span></li>
|
|
||||||
<li class="dib"><span>Font class</span></li>
|
|
||||||
<li class="dib"><span>Symbol</span></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=2987621" target="_blank" class="nav-more">查看项目</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="tab-container">
|
|
||||||
<div class="content unicode" style="display: block;">
|
|
||||||
<ul class="icon_lists dib-box">
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">导航</div>
|
|
||||||
<div class="code-name">&#xe664;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">删除</div>
|
|
||||||
<div class="code-name">&#xe663;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">已发货</div>
|
|
||||||
<div class="code-name">&#xe65b;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">待配布</div>
|
|
||||||
<div class="code-name">&#xe662;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">邀请团队</div>
|
|
||||||
<div class="code-name">&#xe65a;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">退款、售后</div>
|
|
||||||
<div class="code-name">&#xe65c;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">待付款</div>
|
|
||||||
<div class="code-name">&#xe65d;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">设置</div>
|
|
||||||
<div class="code-name">&#xe65e;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">颜色对比</div>
|
|
||||||
<div class="code-name">&#xe65f;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">待发货</div>
|
|
||||||
<div class="code-name">&#xe660;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">包裹</div>
|
|
||||||
<div class="code-name">&#xe661;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">tick-pressed</div>
|
|
||||||
<div class="code-name">&#xe652;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">我的-pressed</div>
|
|
||||||
<div class="code-name">&#xe655;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">分类-pressed</div>
|
|
||||||
<div class="code-name">&#xe656;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">搜索</div>
|
|
||||||
<div class="code-name">&#xe647;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">分享</div>
|
|
||||||
<div class="code-name">&#xe648;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">筛选</div>
|
|
||||||
<div class="code-name">&#xe649;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">购物车</div>
|
|
||||||
<div class="code-name">&#xe64a;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">清空</div>
|
|
||||||
<div class="code-name">&#xe64c;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">加</div>
|
|
||||||
<div class="code-name">&#xe64d;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">减</div>
|
|
||||||
<div class="code-name">&#xe64e;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">收藏-pressed</div>
|
|
||||||
<div class="code-name">&#xe64f;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">收藏</div>
|
|
||||||
<div class="code-name">&#xe650;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">phone</div>
|
|
||||||
<div class="code-name">&#xe651;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">tick</div>
|
|
||||||
<div class="code-name">&#xe653;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">more,back</div>
|
|
||||||
<div class="code-name">&#xe654;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">分类</div>
|
|
||||||
<div class="code-name">&#xe657;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">编辑</div>
|
|
||||||
<div class="code-name">&#xe658;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">我的</div>
|
|
||||||
<div class="code-name">&#xe659;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">排序,升序</div>
|
|
||||||
<div class="code-name">&#xea4c;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont"></span>
|
|
||||||
<div class="name">排序,降序</div>
|
|
||||||
<div class="code-name">&#xea4d;</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div class="article markdown">
|
|
||||||
<h2 id="unicode-">Unicode 引用</h2>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
|
|
||||||
<ul>
|
|
||||||
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
|
|
||||||
<li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
|
|
||||||
</ul>
|
|
||||||
<blockquote>
|
|
||||||
<p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
|
|
||||||
</blockquote>
|
|
||||||
<p>Unicode 使用步骤如下:</p>
|
|
||||||
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
|
|
||||||
<pre><code class="language-css"
|
|
||||||
>@font-face {
|
|
||||||
font-family: 'iconfont';
|
|
||||||
src: url('iconfont.woff2?t=1652427368246') format('woff2'),
|
|
||||||
url('iconfont.woff?t=1652427368246') format('woff'),
|
|
||||||
url('iconfont.ttf?t=1652427368246') format('truetype');
|
|
||||||
}
|
|
||||||
</code></pre>
|
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
|
||||||
<pre><code class="language-css"
|
|
||||||
>.iconfont {
|
|
||||||
font-family: "iconfont" !important;
|
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
}
|
|
||||||
</code></pre>
|
|
||||||
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
|
|
||||||
<pre>
|
|
||||||
<code class="language-html"
|
|
||||||
><span class="iconfont">&#x33;</span>
|
|
||||||
</code></pre>
|
|
||||||
<blockquote>
|
|
||||||
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
|
||||||
</blockquote>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="content font-class">
|
|
||||||
<ul class="icon_lists dib-box">
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-daohang"></span>
|
|
||||||
<div class="name">
|
|
||||||
导航
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-daohang
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-shanchu"></span>
|
|
||||||
<div class="name">
|
|
||||||
删除
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-shanchu
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-yifahuo"></span>
|
|
||||||
<div class="name">
|
|
||||||
已发货
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-yifahuo
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-daipeibu"></span>
|
|
||||||
<div class="name">
|
|
||||||
待配布
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-daipeibu
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-yaoqingtuandui"></span>
|
|
||||||
<div class="name">
|
|
||||||
邀请团队
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-yaoqingtuandui
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-a-tuikuanshouhou"></span>
|
|
||||||
<div class="name">
|
|
||||||
退款、售后
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-a-tuikuanshouhou
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-daifukuan"></span>
|
|
||||||
<div class="name">
|
|
||||||
待付款
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-daifukuan
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-shezhi"></span>
|
|
||||||
<div class="name">
|
|
||||||
设置
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-shezhi
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-yanseduibi"></span>
|
|
||||||
<div class="name">
|
|
||||||
颜色对比
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-yanseduibi
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-daifahuo"></span>
|
|
||||||
<div class="name">
|
|
||||||
待发货
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-daifahuo
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-baoguo"></span>
|
|
||||||
<div class="name">
|
|
||||||
包裹
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-baoguo
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-tick-pressed"></span>
|
|
||||||
<div class="name">
|
|
||||||
tick-pressed
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-tick-pressed
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-wode-pressed"></span>
|
|
||||||
<div class="name">
|
|
||||||
我的-pressed
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-wode-pressed
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-fenlei-pressed"></span>
|
|
||||||
<div class="name">
|
|
||||||
分类-pressed
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-fenlei-pressed
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-sousuo"></span>
|
|
||||||
<div class="name">
|
|
||||||
搜索
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-sousuo
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-fenxiang"></span>
|
|
||||||
<div class="name">
|
|
||||||
分享
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-fenxiang
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-shaixuan"></span>
|
|
||||||
<div class="name">
|
|
||||||
筛选
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-shaixuan
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-gouwuche"></span>
|
|
||||||
<div class="name">
|
|
||||||
购物车
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-gouwuche
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-qingkong"></span>
|
|
||||||
<div class="name">
|
|
||||||
清空
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-qingkong
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-jia"></span>
|
|
||||||
<div class="name">
|
|
||||||
加
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-jia
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-jian"></span>
|
|
||||||
<div class="name">
|
|
||||||
减
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-jian
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-shoucang-pressed"></span>
|
|
||||||
<div class="name">
|
|
||||||
收藏-pressed
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-shoucang-pressed
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-shoucang"></span>
|
|
||||||
<div class="name">
|
|
||||||
收藏
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-shoucang
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-phone"></span>
|
|
||||||
<div class="name">
|
|
||||||
phone
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-phone
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-tick"></span>
|
|
||||||
<div class="name">
|
|
||||||
tick
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-tick
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-a-moreback"></span>
|
|
||||||
<div class="name">
|
|
||||||
more,back
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-a-moreback
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-fenlei"></span>
|
|
||||||
<div class="name">
|
|
||||||
分类
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-fenlei
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-bianji"></span>
|
|
||||||
<div class="name">
|
|
||||||
编辑
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-bianji
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-wode"></span>
|
|
||||||
<div class="name">
|
|
||||||
我的
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-wode
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-sort-up-full"></span>
|
|
||||||
<div class="name">
|
|
||||||
排序,升序
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-sort-up-full
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<span class="icon iconfont icon-sort-down-full"></span>
|
|
||||||
<div class="name">
|
|
||||||
排序,降序
|
|
||||||
</div>
|
|
||||||
<div class="code-name">.icon-sort-down-full
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div class="article markdown">
|
|
||||||
<h2 id="font-class-">font-class 引用</h2>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
|
|
||||||
<p>与 Unicode 使用方式相比,具有如下特点:</p>
|
|
||||||
<ul>
|
|
||||||
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
|
|
||||||
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
|
|
||||||
</ul>
|
|
||||||
<p>使用步骤如下:</p>
|
|
||||||
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
|
|
||||||
<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css">
|
|
||||||
</code></pre>
|
|
||||||
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
|
|
||||||
<pre><code class="language-html"><span class="iconfont icon-xxx"></span>
|
|
||||||
</code></pre>
|
|
||||||
<blockquote>
|
|
||||||
<p>"
|
|
||||||
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
|
||||||
</blockquote>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="content symbol">
|
|
||||||
<ul class="icon_lists dib-box">
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-daohang"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">导航</div>
|
|
||||||
<div class="code-name">#icon-daohang</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-shanchu"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">删除</div>
|
|
||||||
<div class="code-name">#icon-shanchu</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-yifahuo"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">已发货</div>
|
|
||||||
<div class="code-name">#icon-yifahuo</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-daipeibu"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">待配布</div>
|
|
||||||
<div class="code-name">#icon-daipeibu</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-yaoqingtuandui"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">邀请团队</div>
|
|
||||||
<div class="code-name">#icon-yaoqingtuandui</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-a-tuikuanshouhou"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">退款、售后</div>
|
|
||||||
<div class="code-name">#icon-a-tuikuanshouhou</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-daifukuan"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">待付款</div>
|
|
||||||
<div class="code-name">#icon-daifukuan</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-shezhi"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">设置</div>
|
|
||||||
<div class="code-name">#icon-shezhi</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-yanseduibi"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">颜色对比</div>
|
|
||||||
<div class="code-name">#icon-yanseduibi</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-daifahuo"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">待发货</div>
|
|
||||||
<div class="code-name">#icon-daifahuo</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-baoguo"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">包裹</div>
|
|
||||||
<div class="code-name">#icon-baoguo</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-tick-pressed"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">tick-pressed</div>
|
|
||||||
<div class="code-name">#icon-tick-pressed</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-wode-pressed"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">我的-pressed</div>
|
|
||||||
<div class="code-name">#icon-wode-pressed</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-fenlei-pressed"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">分类-pressed</div>
|
|
||||||
<div class="code-name">#icon-fenlei-pressed</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-sousuo"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">搜索</div>
|
|
||||||
<div class="code-name">#icon-sousuo</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-fenxiang"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">分享</div>
|
|
||||||
<div class="code-name">#icon-fenxiang</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-shaixuan"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">筛选</div>
|
|
||||||
<div class="code-name">#icon-shaixuan</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-gouwuche"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">购物车</div>
|
|
||||||
<div class="code-name">#icon-gouwuche</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-qingkong"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">清空</div>
|
|
||||||
<div class="code-name">#icon-qingkong</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-jia"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">加</div>
|
|
||||||
<div class="code-name">#icon-jia</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-jian"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">减</div>
|
|
||||||
<div class="code-name">#icon-jian</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-shoucang-pressed"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">收藏-pressed</div>
|
|
||||||
<div class="code-name">#icon-shoucang-pressed</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-shoucang"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">收藏</div>
|
|
||||||
<div class="code-name">#icon-shoucang</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-phone"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">phone</div>
|
|
||||||
<div class="code-name">#icon-phone</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-tick"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">tick</div>
|
|
||||||
<div class="code-name">#icon-tick</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-a-moreback"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">more,back</div>
|
|
||||||
<div class="code-name">#icon-a-moreback</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-fenlei"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">分类</div>
|
|
||||||
<div class="code-name">#icon-fenlei</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-bianji"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">编辑</div>
|
|
||||||
<div class="code-name">#icon-bianji</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-wode"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">我的</div>
|
|
||||||
<div class="code-name">#icon-wode</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-sort-up-full"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">排序,升序</div>
|
|
||||||
<div class="code-name">#icon-sort-up-full</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="dib">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-sort-down-full"></use>
|
|
||||||
</svg>
|
|
||||||
<div class="name">排序,降序</div>
|
|
||||||
<div class="code-name">#icon-sort-down-full</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div class="article markdown">
|
|
||||||
<h2 id="symbol-">Symbol 引用</h2>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
|
|
||||||
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
|
|
||||||
<ul>
|
|
||||||
<li>支持多色图标了,不再受单色限制。</li>
|
|
||||||
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
|
|
||||||
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
|
|
||||||
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
|
|
||||||
</ul>
|
|
||||||
<p>使用步骤如下:</p>
|
|
||||||
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
|
|
||||||
<pre><code class="language-html"><script src="./iconfont.js"></script>
|
|
||||||
</code></pre>
|
|
||||||
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
|
|
||||||
<pre><code class="language-html"><style>
|
|
||||||
.icon {
|
|
||||||
width: 1em;
|
|
||||||
height: 1em;
|
|
||||||
vertical-align: -0.15em;
|
|
||||||
fill: currentColor;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</code></pre>
|
|
||||||
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
|
|
||||||
<pre><code class="language-html"><svg class="icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-xxx"></use>
|
|
||||||
</svg>
|
|
||||||
</code></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
$('.tab-container .content:first').show()
|
|
||||||
|
|
||||||
$('#tabs li').click(function (e) {
|
|
||||||
var tabContent = $('.tab-container .content')
|
|
||||||
var index = $(this).index()
|
|
||||||
|
|
||||||
if ($(this).hasClass('active')) {
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
$('#tabs li').removeClass('active')
|
|
||||||
$(this).addClass('active')
|
|
||||||
|
|
||||||
tabContent.hide().eq(index).fadeIn()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,139 +0,0 @@
|
|||||||
@font-face {
|
|
||||||
font-family: "iconfont"; /* Project id 2987621 */
|
|
||||||
src: url('iconfont.woff2?t=1652427368246') format('woff2'),
|
|
||||||
url('iconfont.woff?t=1652427368246') format('woff'),
|
|
||||||
url('iconfont.ttf?t=1652427368246') format('truetype');
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-family: "iconfont" !important;
|
|
||||||
font-size: 16px;
|
|
||||||
font-style: normal;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-daohang:before {
|
|
||||||
content: "\e664";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-shanchu:before {
|
|
||||||
content: "\e663";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-yifahuo:before {
|
|
||||||
content: "\e65b";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-daipeibu:before {
|
|
||||||
content: "\e662";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-yaoqingtuandui:before {
|
|
||||||
content: "\e65a";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-a-tuikuanshouhou:before {
|
|
||||||
content: "\e65c";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-daifukuan:before {
|
|
||||||
content: "\e65d";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-shezhi:before {
|
|
||||||
content: "\e65e";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-yanseduibi:before {
|
|
||||||
content: "\e65f";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-daifahuo:before {
|
|
||||||
content: "\e660";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-baoguo:before {
|
|
||||||
content: "\e661";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-tick-pressed:before {
|
|
||||||
content: "\e652";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-wode-pressed:before {
|
|
||||||
content: "\e655";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-fenlei-pressed:before {
|
|
||||||
content: "\e656";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-sousuo:before {
|
|
||||||
content: "\e647";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-fenxiang:before {
|
|
||||||
content: "\e648";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-shaixuan:before {
|
|
||||||
content: "\e649";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-gouwuche:before {
|
|
||||||
content: "\e64a";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-qingkong:before {
|
|
||||||
content: "\e64c";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-jia:before {
|
|
||||||
content: "\e64d";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-jian:before {
|
|
||||||
content: "\e64e";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-shoucang-pressed:before {
|
|
||||||
content: "\e64f";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-shoucang:before {
|
|
||||||
content: "\e650";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-phone:before {
|
|
||||||
content: "\e651";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-tick:before {
|
|
||||||
content: "\e653";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-a-moreback:before {
|
|
||||||
content: "\e654";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-fenlei:before {
|
|
||||||
content: "\e657";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-bianji:before {
|
|
||||||
content: "\e658";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-wode:before {
|
|
||||||
content: "\e659";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-sort-up-full:before {
|
|
||||||
content: "\ea4c";
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-sort-down-full:before {
|
|
||||||
content: "\ea4d";
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
@ -1,226 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "2987621",
|
|
||||||
"name": "电子商城",
|
|
||||||
"font_family": "iconfont",
|
|
||||||
"css_prefix_text": "icon-",
|
|
||||||
"description": "",
|
|
||||||
"glyphs": [
|
|
||||||
{
|
|
||||||
"icon_id": "29692046",
|
|
||||||
"name": "导航",
|
|
||||||
"font_class": "daohang",
|
|
||||||
"unicode": "e664",
|
|
||||||
"unicode_decimal": 58980
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29588731",
|
|
||||||
"name": "删除",
|
|
||||||
"font_class": "shanchu",
|
|
||||||
"unicode": "e663",
|
|
||||||
"unicode_decimal": 58979
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29349174",
|
|
||||||
"name": "已发货",
|
|
||||||
"font_class": "yifahuo",
|
|
||||||
"unicode": "e65b",
|
|
||||||
"unicode_decimal": 58971
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29349143",
|
|
||||||
"name": "待配布",
|
|
||||||
"font_class": "daipeibu",
|
|
||||||
"unicode": "e662",
|
|
||||||
"unicode_decimal": 58978
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346808",
|
|
||||||
"name": "邀请团队",
|
|
||||||
"font_class": "yaoqingtuandui",
|
|
||||||
"unicode": "e65a",
|
|
||||||
"unicode_decimal": 58970
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346810",
|
|
||||||
"name": "退款、售后",
|
|
||||||
"font_class": "a-tuikuanshouhou",
|
|
||||||
"unicode": "e65c",
|
|
||||||
"unicode_decimal": 58972
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346811",
|
|
||||||
"name": "待付款",
|
|
||||||
"font_class": "daifukuan",
|
|
||||||
"unicode": "e65d",
|
|
||||||
"unicode_decimal": 58973
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346812",
|
|
||||||
"name": "设置",
|
|
||||||
"font_class": "shezhi",
|
|
||||||
"unicode": "e65e",
|
|
||||||
"unicode_decimal": 58974
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346813",
|
|
||||||
"name": "颜色对比",
|
|
||||||
"font_class": "yanseduibi",
|
|
||||||
"unicode": "e65f",
|
|
||||||
"unicode_decimal": 58975
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346814",
|
|
||||||
"name": "待发货",
|
|
||||||
"font_class": "daifahuo",
|
|
||||||
"unicode": "e660",
|
|
||||||
"unicode_decimal": 58976
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29346815",
|
|
||||||
"name": "包裹",
|
|
||||||
"font_class": "baoguo",
|
|
||||||
"unicode": "e661",
|
|
||||||
"unicode_decimal": 58977
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240262",
|
|
||||||
"name": "tick-pressed",
|
|
||||||
"font_class": "tick-pressed",
|
|
||||||
"unicode": "e652",
|
|
||||||
"unicode_decimal": 58962
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240263",
|
|
||||||
"name": "我的-pressed",
|
|
||||||
"font_class": "wode-pressed",
|
|
||||||
"unicode": "e655",
|
|
||||||
"unicode_decimal": 58965
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240264",
|
|
||||||
"name": "分类-pressed",
|
|
||||||
"font_class": "fenlei-pressed",
|
|
||||||
"unicode": "e656",
|
|
||||||
"unicode_decimal": 58966
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240057",
|
|
||||||
"name": "搜索",
|
|
||||||
"font_class": "sousuo",
|
|
||||||
"unicode": "e647",
|
|
||||||
"unicode_decimal": 58951
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240058",
|
|
||||||
"name": "分享",
|
|
||||||
"font_class": "fenxiang",
|
|
||||||
"unicode": "e648",
|
|
||||||
"unicode_decimal": 58952
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240059",
|
|
||||||
"name": "筛选",
|
|
||||||
"font_class": "shaixuan",
|
|
||||||
"unicode": "e649",
|
|
||||||
"unicode_decimal": 58953
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240060",
|
|
||||||
"name": "购物车",
|
|
||||||
"font_class": "gouwuche",
|
|
||||||
"unicode": "e64a",
|
|
||||||
"unicode_decimal": 58954
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240062",
|
|
||||||
"name": "清空",
|
|
||||||
"font_class": "qingkong",
|
|
||||||
"unicode": "e64c",
|
|
||||||
"unicode_decimal": 58956
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240063",
|
|
||||||
"name": "加",
|
|
||||||
"font_class": "jia",
|
|
||||||
"unicode": "e64d",
|
|
||||||
"unicode_decimal": 58957
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240064",
|
|
||||||
"name": "减",
|
|
||||||
"font_class": "jian",
|
|
||||||
"unicode": "e64e",
|
|
||||||
"unicode_decimal": 58958
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240065",
|
|
||||||
"name": "收藏-pressed",
|
|
||||||
"font_class": "shoucang-pressed",
|
|
||||||
"unicode": "e64f",
|
|
||||||
"unicode_decimal": 58959
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240066",
|
|
||||||
"name": "收藏",
|
|
||||||
"font_class": "shoucang",
|
|
||||||
"unicode": "e650",
|
|
||||||
"unicode_decimal": 58960
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240067",
|
|
||||||
"name": "phone",
|
|
||||||
"font_class": "phone",
|
|
||||||
"unicode": "e651",
|
|
||||||
"unicode_decimal": 58961
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240069",
|
|
||||||
"name": "tick",
|
|
||||||
"font_class": "tick",
|
|
||||||
"unicode": "e653",
|
|
||||||
"unicode_decimal": 58963
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240070",
|
|
||||||
"name": "more,back",
|
|
||||||
"font_class": "a-moreback",
|
|
||||||
"unicode": "e654",
|
|
||||||
"unicode_decimal": 58964
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240073",
|
|
||||||
"name": "分类",
|
|
||||||
"font_class": "fenlei",
|
|
||||||
"unicode": "e657",
|
|
||||||
"unicode_decimal": 58967
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240074",
|
|
||||||
"name": "编辑",
|
|
||||||
"font_class": "bianji",
|
|
||||||
"unicode": "e658",
|
|
||||||
"unicode_decimal": 58968
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "29240075",
|
|
||||||
"name": "我的",
|
|
||||||
"font_class": "wode",
|
|
||||||
"unicode": "e659",
|
|
||||||
"unicode_decimal": 58969
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "18174913",
|
|
||||||
"name": "排序,升序",
|
|
||||||
"font_class": "sort-up-full",
|
|
||||||
"unicode": "ea4c",
|
|
||||||
"unicode_decimal": 59980
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"icon_id": "18174920",
|
|
||||||
"name": "排序,降序",
|
|
||||||
"font_class": "sort-down-full",
|
|
||||||
"unicode": "ea4d",
|
|
||||||
"unicode_decimal": 59981
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2987621 */
|
font-family: "iconfont"; /* Project id 2987621 */
|
||||||
src: url('iconfont.ttf?t=1652427368246') format('truetype');
|
src: url('iconfont.ttf?t=1652868058352') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -11,6 +11,22 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-zhuyi:before {
|
||||||
|
content: "\e668";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-zhushi:before {
|
||||||
|
content: "\e667";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-zidingyimadan:before {
|
||||||
|
content: "\e665";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-yuanmadanmadanguanli:before {
|
||||||
|
content: "\e666";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-daohang:before {
|
.icon-daohang:before {
|
||||||
content: "\e664";
|
content: "\e664";
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
BIN
src/styles/image/hdfk.png
Normal file
BIN
src/styles/image/hdfk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
src/styles/image/seven.png
Normal file
BIN
src/styles/image/seven.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Loading…
x
Reference in New Issue
Block a user