|
@@ -1,7 +1,7 @@
|
|
|
import Buttons from "@/components/basic/Buttons";
|
|
import Buttons from "@/components/basic/Buttons";
|
|
|
import { delSession } from "@/services/common";
|
|
import { delSession } from "@/services/common";
|
|
|
import { clear, logout } from "@/services/user";
|
|
import { clear, logout } from "@/services/user";
|
|
|
-import { View, Text, Image,Switch } from "@tarojs/components";
|
|
|
|
|
|
|
+import { View, Text, Image, Switch } from "@tarojs/components";
|
|
|
import Taro, { useDidShow } from "@tarojs/taro";
|
|
import Taro, { useDidShow } from "@tarojs/taro";
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
|
import './Profile.scss'
|
|
import './Profile.scss'
|
|
@@ -12,20 +12,21 @@ import { useTranslation } from "react-i18next";
|
|
|
import TableCell from "@/components/layout/TableCell";
|
|
import TableCell from "@/components/layout/TableCell";
|
|
|
import { useEffect, useState } from "react";
|
|
import { useEffect, useState } from "react";
|
|
|
|
|
|
|
|
|
|
+
|
|
|
export default function Page() {
|
|
export default function Page() {
|
|
|
const dispatch = useDispatch();
|
|
const dispatch = useDispatch();
|
|
|
const { t } = useTranslation()
|
|
const { t } = useTranslation()
|
|
|
const user = useSelector((state: any) => state.user);
|
|
const user = useSelector((state: any) => state.user);
|
|
|
- const [switchOn,setSwitchOn] = useState(false)
|
|
|
|
|
|
|
+ const [switchOn, setSwitchOn] = useState(false)
|
|
|
|
|
|
|
|
- useEffect(()=>{
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
var status = Taro.getStorageSync('isDebug')
|
|
var status = Taro.getStorageSync('isDebug')
|
|
|
setSwitchOn(status)
|
|
setSwitchOn(status)
|
|
|
- },[])
|
|
|
|
|
|
|
+ }, [])
|
|
|
|
|
|
|
|
- function switchChanged(e){
|
|
|
|
|
|
|
+ function switchChanged(e) {
|
|
|
setSwitchOn(e.detail.value)
|
|
setSwitchOn(e.detail.value)
|
|
|
- Taro.setStorageSync('isDebug',e.detail.value)
|
|
|
|
|
|
|
+ Taro.setStorageSync('isDebug', e.detail.value)
|
|
|
global.isDebug = e.detail.value
|
|
global.isDebug = e.detail.value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -147,10 +148,58 @@ export default function Page() {
|
|
|
}
|
|
}
|
|
|
{
|
|
{
|
|
|
user.isLogin && user.test_user && <TableCell title="走查模式" >
|
|
user.isLogin && user.test_user && <TableCell title="走查模式" >
|
|
|
- <Switch checked={switchOn} onChange={switchChanged}/>
|
|
|
|
|
|
|
+ <Switch checked={switchOn} onChange={switchChanged} />
|
|
|
</TableCell>
|
|
</TableCell>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ {/* <Text>未更改前的1px线</Text>
|
|
|
|
|
+ <View style={{ marginLeft: 100 }}>
|
|
|
|
|
+ <View className="px2Height" />
|
|
|
|
|
+ <View className="px2Width" />
|
|
|
|
|
+ <View className="px2Height" />
|
|
|
|
|
+ <View className="px2Width" />
|
|
|
|
|
+ <View className="px2Height" />
|
|
|
|
|
+ <View className="px2Width" />
|
|
|
|
|
+ <View className="px2Height" />
|
|
|
|
|
+ <View className="px2Width" />
|
|
|
|
|
+ <View className="px2Height" />
|
|
|
|
|
+ <View className="px2Width" />
|
|
|
|
|
+ <View className="px2Height" />
|
|
|
|
|
+ <View className="px2Width" />
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <Text>更改后的1px线</Text>
|
|
|
|
|
+ <View style={{ marginLeft: 100 }}>
|
|
|
|
|
+ <View className="px1Height" />
|
|
|
|
|
+ <View className="px1Width" />
|
|
|
|
|
+ <View className="px1Height" />
|
|
|
|
|
+ <View className="px1Width" />
|
|
|
|
|
+ <View className="px1Height" />
|
|
|
|
|
+ <View className="px1Width" />
|
|
|
|
|
+ <View className="px1Height" />
|
|
|
|
|
+ <View className="px1Width" />
|
|
|
|
|
+ <View className="px1Height" />
|
|
|
|
|
+ <View className="px1Width" />
|
|
|
|
|
+ <View className="px1Height" />
|
|
|
|
|
+ <View className="px1Width" />
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <Text>Svg Demo</Text>
|
|
|
|
|
+ <View style={{ background: 'red', width: 30, height: 30 }}>
|
|
|
|
|
+
|
|
|
|
|
+ <mysvg src='<svg t="1701751531644" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3687" width="200" height="200"><path d="M509.92 843.84C325.504 843.84 176 694.32 176 509.92 176 325.504 325.504 176 509.92 176c184.416 0 333.92 149.504 333.92 333.92 0 184.416-149.504 333.92-333.92 333.92z m0-48c157.904 0 285.92-128.016 285.92-285.92C795.84 352 667.808 224 509.92 224 352 224 224 352 224 509.92c0 157.904 128 285.92 285.92 285.92z" fill="#5A626A" p-id="3548"></path></svg>
|
|
|
|
|
+' colors={['blue']} />
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <View style={{ background: 'red', width: 30, height: 30 }}>
|
|
|
|
|
+
|
|
|
|
|
+ <mysvg src='<svg t="1701751531644" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3687" width="200" height="200"><path d="M509.92 843.84C325.504 843.84 176 694.32 176 509.92 176 325.504 325.504 176 509.92 176c184.416 0 333.92 149.504 333.92 333.92 0 184.416-149.504 333.92-333.92 333.92z m0-48c157.904 0 285.92-128.016 285.92-285.92C795.84 352 667.808 224 509.92 224 352 224 224 352 224 509.92c0 157.904 128 285.92 285.92 285.92z" fill="#5A626A" p-id="3548"></path></svg>
|
|
|
|
|
+' colors={['yellow']} />
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <View style={{ background: 'red', width: 30, height: 30 }}>
|
|
|
|
|
+
|
|
|
|
|
+ <mysvg src='<svg t="1701751531644" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3687" width="200" height="200"><path d="M509.92 843.84C325.504 843.84 176 694.32 176 509.92 176 325.504 325.504 176 509.92 176c184.416 0 333.92 149.504 333.92 333.92 0 184.416-149.504 333.92-333.92 333.92z m0-48c157.904 0 285.92-128.016 285.92-285.92C795.84 352 667.808 224 509.92 224 352 224 224 352 224 509.92c0 157.904 128 285.92 285.92 285.92z" fill="#5A626A" p-id="3548"></path></svg>
|
|
|
|
|
+' colors={['gray']} />
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <View style={{ height: 200,display:'flex',flexShrink:0 }} /> */}
|
|
|
|
|
+
|
|
|
</View>
|
|
</View>
|
|
|
}
|
|
}
|
|
|
|
|
|