Commit 3aca39eb by 姜雷

合并地址冲突

parents 69a7f778 5f7b0ed3
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
"private": true, "private": true,
"description": "", "description": "",
"scripts": { "scripts": {
"build:weapp": "cross-env NODE_ENV=product npx @tarojs/cli build --type weapp", "build:weapp": "taro build --type weapp",
"build:swan": "npx @tarojs/cli build --type swan", "build:swan": "taro build --type swan",
"build:alipay": "npx @tarojs/cli build --type alipay", "build:alipay": "taro build --type alipay",
"build:tt": "npx @tarojs/cli build --type tt", "build:tt": "taro build --type tt",
"build:h5": "npx @tarojs/cli build --type h5", "build:h5": "taro build --type h5",
"build:rn": "npx @tarojs/cli build --type rn", "build:rn": "taro build --type rn",
"dev:weapp": "npx @tarojs/cli build --type weapp -- --watch", "dev:weapp": "npm run build:weapp -- --watch",
"dev:swan": "npm run build:swan -- --watch", "dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch", "dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch", "dev:tt": "npm run build:tt -- --watch",
......
import { customerFetch, ResponseDataEntity } from '.'; import { customerFetch, ResponseDataEntity, oldBaseFetch } from '.';
export class LoginParams { export class LoginParams {
/** 登陆标识 */ /** 登陆标识 */
...@@ -48,8 +48,9 @@ type RegisiterPramas = { ...@@ -48,8 +48,9 @@ type RegisiterPramas = {
// type RegisiterReponseData = {}; // type RegisiterReponseData = {};
export const wxUserRegister = (entity: RegisiterPramas) => export const wxUserRegister = (entity: RegisiterPramas) =>
customerFetch({ oldBaseFetch({
url: '/dcxy/wechat/applet/register/', // url: '/dcxy/wechat/applet/register/',
url: '/dcxy/api/customer/wxmini/register',
method: 'POST', method: 'POST',
data: entity, data: entity,
}); });
......
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
SCHOOL_MAIN_URL, SCHOOL_MAIN_URL,
LogoutCode, LogoutCode,
SuccessCode, SuccessCode,
OLD_BASE_SERVER_URL,
} from '../constants/index'; } from '../constants/index';
export type ResponseDataEntity<T> = { export type ResponseDataEntity<T> = {
...@@ -54,6 +55,7 @@ const createFetch = (basePath: string) => { ...@@ -54,6 +55,7 @@ const createFetch = (basePath: string) => {
}; };
export const baseFetch = createFetch(BASE_SERVER_URL); export const baseFetch = createFetch(BASE_SERVER_URL);
export const oldBaseFetch = createFetch(OLD_BASE_SERVER_URL);
export const customerFetch = createFetch(CUSTOMER_SERVER_URL); export const customerFetch = createFetch(CUSTOMER_SERVER_URL);
export const schoolMainFetch = createFetch(SCHOOL_MAIN_URL); export const schoolMainFetch = createFetch(SCHOOL_MAIN_URL);
......
...@@ -5,6 +5,7 @@ import { getVcode, getImageVcode } from '../../api/vcode'; ...@@ -5,6 +5,7 @@ import { getVcode, getImageVcode } from '../../api/vcode';
import Modal from '../Modal/Modal'; import Modal from '../Modal/Modal';
import './Vcode.scss'; import './Vcode.scss';
import { ResponseDataEntity } from 'src/api'; import { ResponseDataEntity } from 'src/api';
import { ResendTime } from '@/constants';
type PageOwnProps = { type PageOwnProps = {
positionNum: string; positionNum: string;
...@@ -35,7 +36,7 @@ class Vcode extends Component { ...@@ -35,7 +36,7 @@ class Vcode extends Component {
this.state = { this.state = {
defaultText: props.text ? props.text : '获取验证码', defaultText: props.text ? props.text : '获取验证码',
counting: false, counting: false,
count: 10, count: ResendTime,
timer: null, timer: null,
showImgBox: false, showImgBox: false,
vcode: null, vcode: null,
...@@ -61,13 +62,13 @@ class Vcode extends Component { ...@@ -61,13 +62,13 @@ class Vcode extends Component {
this.setState({ this.setState({
vcode: data, vcode: data,
}); });
this.renderImg(data); this.drawImg(data);
}) })
.catch(console.error); .catch(console.error);
this.setState({ this.setState({
showImgBox: true, showImgBox: true,
}); });
// this.renderImg(1234); // this.drawImg(1234);
} else { } else {
Taro.showToast({ Taro.showToast({
title: '输入正确的手机号', title: '输入正确的手机号',
...@@ -86,7 +87,7 @@ class Vcode extends Component { ...@@ -86,7 +87,7 @@ class Vcode extends Component {
}); });
} }
renderImg(vcode: number) { drawImg(vcode: number) {
const ctx = Taro.createCanvasContext('Vcode', this.$scope); const ctx = Taro.createCanvasContext('Vcode', this.$scope);
ctx.setFillStyle('#6180f4'); ctx.setFillStyle('#6180f4');
ctx.fillRect(0, 0, 73, 38); ctx.fillRect(0, 0, 73, 38);
......
...@@ -2,8 +2,10 @@ export const APP_ID = 'wxf5912b79bba23663'; ...@@ -2,8 +2,10 @@ export const APP_ID = 'wxf5912b79bba23663';
export const SuccessCode = 1000; export const SuccessCode = 1000;
export const LogoutCode = -2; export const LogoutCode = -2;
export const NotRegisterCode = 1005; export const NotRegisterCode = 1005;
export const ResendTime = 10;
export const BASE_SERVER_URL = 'https://ex-test-dcxy-base-app.168cad.top'; export const BASE_SERVER_URL = 'https://ex-test-dcxy-base-app.168cad.top';
export const OLD_BASE_SERVER_URL = 'https://in-test-selfbase.168cad.top';
export const CUSTOMER_SERVER_URL = export const CUSTOMER_SERVER_URL =
'https://ex-test-dcxy-customer-app.168cad.top'; 'https://ex-test-dcxy-customer-app.168cad.top';
export const SCHOOL_MAIN_URL = export const SCHOOL_MAIN_URL =
......
...@@ -73,4 +73,8 @@ page { ...@@ -73,4 +73,8 @@ page {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
.warnning {
margin: 80px 20px 0;
color: #f10000;
}
} }
...@@ -200,9 +200,13 @@ class BarCode extends Component { ...@@ -200,9 +200,13 @@ class BarCode extends Component {
} }
drawBarCode() { drawBarCode() {
const { userinfo } = this.props; const { userinfo } = this.props;
let idBar = userinfo.idBar.substring(0, userinfo.idBar.length - 2) + '04'; if (userinfo.idBar && userinfo.idBar.length > 2) {
wxbarcode.barcode('BarCode', idBar, 646, 188); let idBar = userinfo.idBar.substring(0, userinfo.idBar.length - 2) + '04';
wxbarcode.barcode('BarCodeBig', idBar, 700, 364); wxbarcode.barcode('BarCode', idBar, 646, 188);
wxbarcode.barcode('BarCodeBig', idBar, 700, 364);
} else {
this.refreshCodeBar();
}
} }
toggleBigBarCode() { toggleBigBarCode() {
...@@ -277,6 +281,10 @@ class BarCode extends Component { ...@@ -277,6 +281,10 @@ class BarCode extends Component {
/> />
</View> </View>
</View> </View>
<View className='warnning'>
如扫描条码终端无响应,请刷新条码后重试!
</View>
</View> </View>
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment