add:目录分包

master
blak-kong 2 years ago
parent 27779daff9
commit fdf863b105

@ -371,7 +371,7 @@ export default class Instrument extends Component<any, any> {
msg("绑定成功"); msg("绑定成功");
setTimeout(() => { setTimeout(() => {
setStorageSync("instrument_detail", JSON.stringify(channelInfo)); setStorageSync("instrument_detail", JSON.stringify(channelInfo));
go("/pages/instrument/intro?id=" + channelInfo.id); go("/instrument/pages/instrument/intro?id=" + channelInfo.id);
}, 1000); }, 1000);
} else if (res.data.code === 202) { } else if (res.data.code === 202) {
this.changeBindBox(); this.changeBindBox();
@ -403,7 +403,7 @@ export default class Instrument extends Component<any, any> {
msg("绑定成功"); msg("绑定成功");
setStorageSync("instrument_detail", JSON.stringify(channelInfo)); setStorageSync("instrument_detail", JSON.stringify(channelInfo));
setTimeout(() => { setTimeout(() => {
go("/pages/instrument/intro?id=" + channelInfo.id); go("/instrument/pages/instrument/intro?id=" + channelInfo.id);
}, 1000); }, 1000);
} else if (res.data.code === 202) { } else if (res.data.code === 202) {
this.changeBindBox(); this.changeBindBox();
@ -529,7 +529,7 @@ export default class Instrument extends Component<any, any> {
confirm={this.closeDev} confirm={this.closeDev}
/> */} /> */}
<Navbar <Navbar
titleSlot='仪器绑定' titleSlot="仪器绑定"
isBack isBack
isCustomBack isCustomBack
customBack={this.customBack} customBack={this.customBack}
@ -546,74 +546,74 @@ export default class Instrument extends Component<any, any> {
/> />
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title='提示' title="提示"
content='序列号库仍在更新,请联系微信助手' content="序列号库仍在更新,请联系微信助手"
confirmButtonText='知道了' confirmButtonText="知道了"
textAlgin='center' textAlgin="center"
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm} confirm={this.onBindErrorConfirm}
></PopupAlert> ></PopupAlert>
<PopupAlert <PopupAlert
isShow={isBindingError203} isShow={isBindingError203}
title='提示' title="提示"
content='序列码已被别人绑定,请联系微信助手' content="序列码已被别人绑定,请联系微信助手"
confirmButtonText='知道了' confirmButtonText="知道了"
textAlgin='center' textAlgin="center"
close={this.onBindErrorClose203} close={this.onBindErrorClose203}
confirm={this.onBindErrorConfirm203} confirm={this.onBindErrorConfirm203}
></PopupAlert> ></PopupAlert>
<PopupAlert <PopupAlert
isShow={isBindingCheckError} isShow={isBindingCheckError}
title='提示' title="提示"
content='您选择的仪器有误,请重新选择确认' content="您选择的仪器有误,请重新选择确认"
confirmButtonText='知道了' confirmButtonText="知道了"
textAlgin='center' textAlgin="center"
close={this.onBindCheckErrorClose} close={this.onBindCheckErrorClose}
confirm={this.onBindCheckErrorClose} confirm={this.onBindCheckErrorClose}
></PopupAlert> ></PopupAlert>
</View> </View>
<Canvas <Canvas
style='position: fixed;left:-10000px;max-width: 1024px;max-height: 768px;' style="position: fixed;left:-10000px;max-width: 1024px;max-height: 768px;"
id='compressImage' id="compressImage"
canvasId='compressImage' canvasId="compressImage"
type='2d' type="2d"
></Canvas> ></Canvas>
<View></View> <View></View>
<View className='main'> <View className="main">
<View className='top'> <View className="top">
<View className='top_title'></View> <View className="top_title"></View>
<View className='top_tips'> <View className="top_tips">
</View> </View>
<View className='top_tips'></View> <View className="top_tips"></View>
</View> </View>
<View className='banner_list'> <View className="banner_list">
{inputType === 1 ? ( {inputType === 1 ? (
<Video <Video
className='banner_item' className="banner_item"
autoplay autoplay
loop loop
objectFit='cover' objectFit="cover"
enablePlayGesture enablePlayGesture
showFullscreenBtn={false} showFullscreenBtn={false}
playBtnPosition='center' playBtnPosition="center"
src={channelInfo.manualCodeBinding} src={channelInfo.manualCodeBinding}
/> />
) : ( ) : (
<Image <Image
className='banner_item' className="banner_item"
src={channelInfo.scanCodeBinding} src={channelInfo.scanCodeBinding}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
)} )}
</View> </View>
<View className='form'> <View className="form">
<View className='form_item is-instrument'> <View className="form_item is-instrument">
<View className='label_box'> <View className="label_box">
<View <View
className='label' className="label"
style='font-size: 32rpx; margin: 0 0 0rpx 2rpx' style="font-size: 32rpx; margin: 0 0 0rpx 2rpx"
> >
<Text style={{ color: "#EB5858", marginLeft: "20rpx" }}> <Text style={{ color: "#EB5858", marginLeft: "20rpx" }}>
@ -624,10 +624,10 @@ export default class Instrument extends Component<any, any> {
<ScrollView <ScrollView
scrollX scrollX
className='instrument_list' className="instrument_list"
style='width: 100%; white-space: nowrap;' style="width: 100%; white-space: nowrap;"
scrollIntoView={"scroll" + channelInfo.id} scrollIntoView={"scroll" + channelInfo.id}
scrollIntoViewAlignment='center' scrollIntoViewAlignment="center"
> >
{equipmentList.length > 0 && {equipmentList.length > 0 &&
equipmentList.map((item, index) => { equipmentList.map((item, index) => {
@ -641,11 +641,11 @@ export default class Instrument extends Component<any, any> {
onClick={this.onSelectChange.bind(this, item)} onClick={this.onSelectChange.bind(this, item)}
> >
<Image <Image
className='instrument_img' className="instrument_img"
src={item.banner} src={item.banner}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
<View className='desc'>{item.name}</View> <View className="desc">{item.name}</View>
</View> </View>
); );
})} })}
@ -659,8 +659,8 @@ export default class Instrument extends Component<any, any> {
)} )}
</ScrollView> </ScrollView>
</View> </View>
<View className='form_item is-tab'> <View className="form_item is-tab">
<View className='tab_list'> <View className="tab_list">
<View <View
className={classnames("tab_item", { className={classnames("tab_item", {
"is-active": inputType === 1, "is-active": inputType === 1,
@ -668,7 +668,7 @@ export default class Instrument extends Component<any, any> {
onClick={this.onTabTap.bind(this, 1)} onClick={this.onTabTap.bind(this, 1)}
> >
<Text></Text> <Text></Text>
<View className='tab_active_line'></View> <View className="tab_active_line"></View>
</View> </View>
{channelInfo.isScanCode === 1 && ( {channelInfo.isScanCode === 1 && (
<View <View
@ -678,7 +678,7 @@ export default class Instrument extends Component<any, any> {
onClick={this.onTabTap.bind(this, 2)} onClick={this.onTabTap.bind(this, 2)}
> >
<Text></Text> <Text></Text>
<View className='tab_active_line'></View> <View className="tab_active_line"></View>
</View> </View>
)} )}
</View> </View>
@ -686,38 +686,38 @@ export default class Instrument extends Component<any, any> {
{inputType == 1 && ( {inputType == 1 && (
<Block> <Block>
<View className='inputCode_box'> <View className="inputCode_box">
<View className='form_item is-inputCode'> <View className="form_item is-inputCode">
<View className='label_box'> <View className="label_box">
<View className='label'> <View className="label">
<Text style={{ color: "#EB5858", marginLeft: "20rpx" }}> <Text style={{ color: "#EB5858", marginLeft: "20rpx" }}>
* *
</Text> </Text>
</View> </View>
<View className='label_text' onClick={this.onTipShow}> <View className="label_text" onClick={this.onTipShow}>
<Text className='label-tips'></Text> <Text className="label-tips"></Text>
<Image <Image
className='right_icon' className="right_icon"
src={require("@/img/index-right.png")} src={require("@/img/index-right.png")}
mode='aspectFill' mode="aspectFill"
/> />
</View> </View>
</View> </View>
<View className='ipt_box'> <View className="ipt_box">
<Input <Input
maxlength={50} maxlength={50}
className='ipt' className="ipt"
placeholder='例如FR10*********1' placeholder="例如FR10*********1"
placeholder-style={style} placeholder-style={style}
onInput={this.onSerial} onInput={this.onSerial}
value={channelInfo.serialCode} value={channelInfo.serialCode}
></Input> ></Input>
</View> </View>
</View> </View>
<View className='form_item'> <View className="form_item">
<View className='label_box'> <View className="label_box">
<View className='label'> <View className="label">
<Text style={{ color: "#EB5858", marginLeft: "20rpx" }}> <Text style={{ color: "#EB5858", marginLeft: "20rpx" }}>
* *
@ -725,20 +725,20 @@ export default class Instrument extends Component<any, any> {
</View> </View>
</View> </View>
<View <View
className='photo_box' className="photo_box"
onClick={this.onChangeImg.bind(this)} onClick={this.onChangeImg.bind(this)}
> >
{channelInfo.serialImage && ( {channelInfo.serialImage && (
<Image <Image
src={channelInfo.serialImage} src={channelInfo.serialImage}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
)} )}
{!channelInfo.serialImage && ( {!channelInfo.serialImage && (
<Image <Image
className='add' className="add"
src={require("@/img/welcome/add.png")} src={require("@/img/welcome/add.png")}
mode='aspectFit' mode="aspectFit"
></Image> ></Image>
)} )}
</View> </View>
@ -748,10 +748,10 @@ export default class Instrument extends Component<any, any> {
)} )}
</View> </View>
</View> </View>
<View className='footer'> <View className="footer">
{inputType == 1 && ( {inputType == 1 && (
<View <View
className='btn' className="btn"
onClick={throttle(this.onSubmit.bind(this), 300)} onClick={throttle(this.onSubmit.bind(this), 300)}
> >
@ -759,9 +759,9 @@ export default class Instrument extends Component<any, any> {
)} )}
{inputType == 2 && ( {inputType == 2 && (
<View className='btn footer-btn-scan' onClick={this.onScanTap}> <View className="btn footer-btn-scan" onClick={this.onScanTap}>
<Image <Image
className='footer-btn-scan-img' className="footer-btn-scan-img"
src={require("@/img/icon-scan.png")} src={require("@/img/icon-scan.png")}
></Image> ></Image>

@ -92,17 +92,17 @@ export default class InstrumentManage extends Component<any, any> {
setStorageSync("instrument_detail", item); setStorageSync("instrument_detail", item);
let bindid = item.id; let bindid = item.id;
go("/pages/instrument/intro?id=" + bindid); go("/instrument/pages/instrument/intro?id=" + bindid);
}; };
goBind = (item) => { goBind = (item) => {
let bindid = item.id; let bindid = item.id;
go("/pages/instrument/instrument?isOnly=true&id=" + bindid); // 只显示当前仪器内容 go("/instrument/pages/instrument/instrument?isOnly=true&id=" + bindid); // 只显示当前仪器内容
}; };
goBindInfo = (item) => { goBindInfo = (item) => {
// let bindid = item.id; // let bindid = item.id;
setStorageSync("instrument_detail", item); setStorageSync("instrument_detail", item);
go("/pages/instrument_detail/index"); go("/instrument/pages/instrument_detail/index");
}; };
lesgobuy = (item) => { lesgobuy = (item) => {

@ -44,7 +44,7 @@ export default class Activity extends Component<any, any> {
return ( return (
<Block> <Block>
<View>{name}</View> <View>{name}</View>
<View className="main"></View> <View className="main"></View>
</Block> </Block>
); );
} }

@ -44,7 +44,7 @@ export default class Detect extends Component<any, any> {
return ( return (
<Block> <Block>
<View>{name}</View> <View>{name}</View>
<View className="main"></View> <View className="main"></View>
</Block> </Block>
); );
} }

@ -420,7 +420,7 @@ class Index extends Component<any, any> {
}; };
GetSiteAddTag = async (id) => { GetSiteAddTag = async (id) => {
go("/recoding/pages/moisture_test_report/moisture_test_report") go("/recoding/pages/moisture_test_report/moisture_test_report");
let res = await GetSiteAddTag(id); let res = await GetSiteAddTag(id);
if (res.data.code === 200) { if (res.data.code === 200) {
console.log("点击自动上报,不需要逻辑处理"); console.log("点击自动上报,不需要逻辑处理");
@ -441,7 +441,7 @@ class Index extends Component<any, any> {
msg("您已绑定所有设备"); msg("您已绑定所有设备");
return; return;
} }
go("/pages/instrument/instrument"); go("/instrument/pages/instrument/instrument");
} }
}; };
@ -493,7 +493,7 @@ class Index extends Component<any, any> {
const { url } = e.currentTarget.dataset; const { url } = e.currentTarget.dataset;
if (this.isRegister()) { if (this.isRegister()) {
if (url === "/pages/instrument/instrument") { if (url === "/instrument/pages/instrument/instrument") {
let { data } = await InstrumentInfo.unbindingInstrumentInfoList(); let { data } = await InstrumentInfo.unbindingInstrumentInfoList();
console.log(data, "查看未绑定设备"); console.log(data, "查看未绑定设备");
if (data.data.length === 0) { if (data.data.length === 0) {
@ -781,7 +781,7 @@ class Index extends Component<any, any> {
if (res.data.code === 200) { if (res.data.code === 200) {
console.log("res.data.data", res.data.data); console.log("res.data.data", res.data.data);
if (res.data.data.length > 0) { if (res.data.data.length > 0) {
go("/pages/instrument/intro??customBack=true&id=" + id); go("/instrument/pages/instrument/intro??customBack=true&id=" + id);
} else { } else {
this.bindingInstrumentList(); this.bindingInstrumentList();
} }
@ -1349,7 +1349,7 @@ class Index extends Component<any, any> {
<View className="title"></View> <View className="title"></View>
<View <View
className="txt_box flex jcenter aitems" className="txt_box flex jcenter aitems"
data-url="/pages/instrument/instrument" data-url="/instrument/pages/instrument/instrument"
onClick={this.gourl} onClick={this.gourl}
> >
<Image <Image

@ -267,7 +267,7 @@ class UserInfo extends Component<any, any> {
} }
let isInstrumentJump = Taro.getStorageSync("isInstrumentJump"); let isInstrumentJump = Taro.getStorageSync("isInstrumentJump");
if (isInstrumentJump === "true") { if (isInstrumentJump === "true") {
go("/pages/instrument/instrument"); go("/instrument/pages/instrument/instrument");
} else { } else {
Taro.switchTab({ Taro.switchTab({
url: "/pages/user/user", url: "/pages/user/user",

Loading…
Cancel
Save