Commit 3aca39eb by 姜雷

合并地址冲突

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