diff --git a/src/app.config.ts b/src/app.config.ts index fe66225..067f8ee 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -186,6 +186,12 @@ export default { "index", ] }, + { + root: "pages/bindSalesman", + pages: [ + "index", + ] + }, ] } diff --git a/src/common/constant.js b/src/common/constant.js index 346a828..4b55726 100644 --- a/src/common/constant.js +++ b/src/common/constant.js @@ -4,7 +4,7 @@ // export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:40001/lymarket` // export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 -export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 +// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 // export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发 // export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发 @@ -12,7 +12,7 @@ export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 // export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 // export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 -// export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰 +export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰 // CDN // 生成密钥 diff --git a/src/common/fotmat.js b/src/common/fotmat.js index 9625cad..0e76e3c 100644 --- a/src/common/fotmat.js +++ b/src/common/fotmat.js @@ -167,7 +167,8 @@ export const isLabImage = (imgurl, rgb, suffix="!w200") => { */ export const numberWithCommas = ({number = 0, digit = 2}) => { if(!isNaN(Number(number))) { - return parseFloat(number).toFixed(digit).replace(/\B(? void +} +export default ({show, onClose}:params) => { + const onCustomer = async () => { + let res = await Taro.showModal({ + title: '是否拨打服务热线', + confirmText: '拨打', + content: '(0757) 8270 6695', + cancelText: '取消', + }) + if(res.confirm) { + Taro.makePhoneCall({ + phoneNumber: '(0757)82706695' + }) + } + } + + const onConfirm = () => { + onClose?.() + // goLink('/') + } + return ( + <> + {show&& + + + + + + 提示 + 暂未开通下单权限功能,稍后有客服联系您,请注意接收电话。 + + + onConfirm()}>输入邀请码 + onCustomer()}>联系客服 + + + + } + + ) + +} \ No newline at end of file diff --git a/src/components/orderBtns/index.tsx b/src/components/orderBtns/index.tsx index 280e2a2..64b018e 100644 --- a/src/components/orderBtns/index.tsx +++ b/src/components/orderBtns/index.tsx @@ -111,8 +111,9 @@ export default memo(({orderInfo, onClick}:Param) => { validatarFunc: (orderInfo) => { let orderStatus = [ SaleOrderStatusAlreadyReceipt.value, + SaleOrderStatusRefund.value ] - return orderStatus.includes(orderInfo.status) + return orderInfo.av_return_roll&& orderStatus.includes(orderInfo.status) } }, { diff --git a/src/components/shopCart/index.module.scss b/src/components/shopCart/index.module.scss index 7efbac4..cfed7b8 100644 --- a/src/components/shopCart/index.module.scss +++ b/src/components/shopCart/index.module.scss @@ -26,6 +26,7 @@ display: flex; justify-content: space-between; padding: 0 30px; + box-sizing: border-box; .search_item{ width: 200px; height: 55px; @@ -40,6 +41,7 @@ border: 2px solid $color_main; background-color: #ecf5ff; color: $color_main; + box-sizing: border-box; } } .con{ diff --git a/src/components/shopCart/index.tsx b/src/components/shopCart/index.tsx index 916c367..f1c46d1 100644 --- a/src/components/shopCart/index.tsx +++ b/src/components/shopCart/index.tsx @@ -220,8 +220,8 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => { all_count += item.sale_mode == 0?item.roll: (item.length) } }) - let all_count_text = selectIndex == 0?all_count + '条': (all_count/100) + '米' - return {price: Number(formatPriceDiv(estimate_amount)).toFixed(2), countText: `已选${product_list.size}种面料,${color_count}个颜色,共${all_count_text}`, color_count} + let all_count_text = selectIndex == 0?all_count + ' 条': (all_count/100) + ' 米' + return {price: Number(formatPriceDiv(estimate_amount)).toFixed(2), countText: `已选 ${product_list.size} 种面料,${color_count} 个颜色,共 ${all_count_text}`, color_count} },[list, checkboxData]) diff --git a/src/pages/bindSalesman/component/successBind/index.module.scss b/src/pages/bindSalesman/component/successBind/index.module.scss new file mode 100644 index 0000000..31c0382 --- /dev/null +++ b/src/pages/bindSalesman/component/successBind/index.module.scss @@ -0,0 +1,49 @@ +.bindSalesman_main{ + width: 100%; + height: 100vh; + position: fixed; + left:0; + top:0; + .bindSalesman_pop{ + width: 654px; + height: 900px; + border-radius: 40px; + display: flex; + flex-direction: column; + align-items: center; + position:absolute; + margin:auto; + left: 0; + right: 0; + bottom: 0; + top: 0; + bottom: 0; + z-index: 1999; + .bindSalesman_header{ + width: 654px; + height: 654px; + image{ + width: 100%; + height: 100%; + border-radius: 40px 40px 0 0; + } + } + .btns{ + width: 488px; + height: 104px; + image{ + width: 100%; + } + } + } + .bindSalesman_mask{ + z-index: 99; + position: absolute; + left:0; + top:0; + width: 100%; + height: 100%; + opacity: 0.8; + background: #000000; + } +} \ No newline at end of file diff --git a/src/pages/bindSalesman/component/successBind/index.tsx b/src/pages/bindSalesman/component/successBind/index.tsx new file mode 100644 index 0000000..8d431f5 --- /dev/null +++ b/src/pages/bindSalesman/component/successBind/index.tsx @@ -0,0 +1,48 @@ +import { Image, Swiper, SwiperItem, Text, View } from "@tarojs/components" +import styles from './index.module.scss' +import { formatImgUrl } from "@/common/fotmat" +import Taro from "@tarojs/taro"; +import { goLink } from "@/common/common"; +import CloseBtn from "@/components/closeBtn"; +import { useEffect, useState } from "react"; + +type params = { + show?: true|false, + onClose?: () => void +} +export default ({show = false, onClose}:params) => { + const [showPop, setShowPop] = useState(false) + useEffect(() => { + if(show !== undefined) setShowPop(() => show) + }, [show]) + const onClick = async (val) => { + onClose?.() + setShowPop(() => false) + if(val == 1) { + goLink('/pages/depositBeforehand/index') + } else { + goLink('/pages/index/index', {}, 'switchTab') + } + } + const onCloseEven = () => { + setShowPop(() => false) + onClose?.() + } + return ( + <> + {showPop&& + + onClick(1)}> + + + onClick(2)}> + + + {/* */} + + + } + + ) + +} \ No newline at end of file diff --git a/src/pages/bindSalesman/index.config.ts b/src/pages/bindSalesman/index.config.ts new file mode 100644 index 0000000..3f25181 --- /dev/null +++ b/src/pages/bindSalesman/index.config.ts @@ -0,0 +1,4 @@ +export default { + navigationBarTitleText: '邀请码', + enableShareAppMessage: true, +} diff --git a/src/pages/bindSalesman/index.module.scss b/src/pages/bindSalesman/index.module.scss new file mode 100644 index 0000000..ae9fd1d --- /dev/null +++ b/src/pages/bindSalesman/index.module.scss @@ -0,0 +1,69 @@ +.bindSalesmanPage_main{ + display: flex; + flex-direction: column; + align-items: center; + .header_image{ + width: 240px; + height: 188px; + padding: 50px 0; + image{ + width: 100%; + height: 100%; + } + } + .inputCode{ + width: 670px; + height: 106px; + background: #f6f6f6; + border: 2px solid #f0f0f0; + border-radius: 20px; + display: flex; + align-items: center; + padding: 20px 0 20px 30px; + box-sizing: border-box; + position: relative; + input{ + flex:1; + z-index: 0; + } + .scan_code{ + width: 101px; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + border-left: 1PX solid #ccc; + .miconfont{ + font-size: 50px; + color: #007AFF; + } + } + .close_btn{ + padding: 0 20px; + } + } + .btns{ + width: 670px; + height: 90px; + opacity: 0.6; + background: linear-gradient(41deg,#007aff, #4fa6ff 86%, #68b4ff 100%); + border-radius: 46px; + text-align: center; + line-height: 90px; + color: #fff; + margin-top: 50px; + } + .message{ + padding: 150px 30px 20px 30px; + color: #ABABAB; + font-size: 28px; + text{ + display: block; + margin-bottom: 30px; + &:nth-child(1) { + text-align: center; + font-weight: 700; + } + } + } +} \ No newline at end of file diff --git a/src/pages/bindSalesman/index.tsx b/src/pages/bindSalesman/index.tsx new file mode 100644 index 0000000..2555b77 --- /dev/null +++ b/src/pages/bindSalesman/index.tsx @@ -0,0 +1,76 @@ +import { Image, Input, Text, View } from '@tarojs/components' +import styles from './index.module.scss' +import useLogin from '@/use/useLogin' +import classnames from "classnames"; +import { formatImgUrl } from '@/common/fotmat' +import { useEffect, useState } from 'react'; +import { alert } from '@/common/common'; +import CloseBtn from '@/components/closeBtn'; +import SuccessBind from './component/successBind'; +import Taro, { useDidShow } from "@tarojs/taro"; +export default () => { + useLogin() + + useDidShow(() => { + onClipboardData() + }) + + const [submitData, setSubmitData] = useState({ + code: '', + }) + + const onSubmit = () => { + if(!submitData.code) alert.error('请输入邀请码') + } + + const onInputCode = (e) => { + setSubmitData((val) => ({...val, code:e.detail.value})) + } + + const oncloseEven = () => { + setSubmitData((val) => ({...val, code:''})) + } + + const onScanCode = () => { + Taro.scanCode({ + success: (res) => { + console.log(res) + } + }) + } + + //获取粘贴版内容 + const onClipboardData = () => { + Taro.getClipboardData({ + success: function (res){ + console.log('res.data:::', res.data) + } + }) + } + + return ( + + + + + + onInputCode(e)}/> + + {submitData.code&&} + + onScanCode()}> + + + + 提交 + + 温馨提示 + 1. 新用户授权手机号码后,7天内可以输入邀请码,超过时间不能输入。 + 2. 一个手机只能输入一次邀请码。输入邀请码。 + + + + + ) +} + diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 2fdf212..9a4ee91 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -12,6 +12,8 @@ import Taro, { Events, useDidShow, usePullDownRefresh } from '@tarojs/taro' import { GetProductKindListApi, GetProductListApi } from '@/api/material' import useLogin from '@/use/useLogin' import { dataLoadingStatus } from '@/common/util' +import BindSalesman from '@/components/bindSalesmanPopup' +import BindSalesmanPopup from '@/components/bindSalesmanPopup' export default () => { @@ -105,7 +107,9 @@ export default () => { setShowShopCart(false)} /> + + ) } diff --git a/src/pages/searchList/hightSearchList.module.scss b/src/pages/searchList/hightSearchList.module.scss index a8f6bce..3f47d29 100644 --- a/src/pages/searchList/hightSearchList.module.scss +++ b/src/pages/searchList/hightSearchList.module.scss @@ -174,7 +174,7 @@ } .color_num { background: rgba(0,0,0, 0.5); - border-radius: 0px 50px 0px 0px; + border-radius: 0px 50px 0px 30px; font-size: $font_size_min; color: #fff; position: absolute; diff --git a/src/pages/searchList/hightSearchList.tsx b/src/pages/searchList/hightSearchList.tsx index 8f80bb9..a829398 100644 --- a/src/pages/searchList/hightSearchList.tsx +++ b/src/pages/searchList/hightSearchList.tsx @@ -203,7 +203,7 @@ export default () => { return goLinkPage(item)}> - {(item.product_color_code)}# + {(item.product_color_code)} {formatHashTag(item.product_code, item.product_name)}