在用laravel框架构建登陆模块的时候dd(session()->all())为什么没有显示信息

在用laravel框架构建登陆模块的时候session->put(..,..)赋值,dd(session()->all())为什么没有显示_token,_previous,url等信息,而且用户的登陆值死活都赋不上去。怎么回事啊?换件是XAMMP+composer搭建的文件是放在htdoc里面的。

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
求帮助:怎么又改数据日期格式
小白对数据库不了解,所以请问大家 怎么把数据库中格式为 YYYY年MM月DD日 和 YYYYMMDD(例:2020221) 的数据修改成 YYYY-MM-DD 格式。 我查到的 都是把查询出来的时间转换成YYYY-MM-DD格式,并没有修改数据。 我要对一张表里的一个列下面的值进行修改 1-YYYY年MM月DD日---->YYYY-MM-DD 2-YYYYMMDD---->YYYY-MM-DD
各位大神,js怎么把20-2-24 下午3:32这种时间转化成yyyy-MM-DD HH:mm
小弟分不多,再次谢谢各位了 各位大神,js怎么把20-2-24 下午3:32这种时间转化成yyyy-MM-DD HH:mm 各位大神,js怎么把20-2-24 下午3:32这种时间转化成yyyy-MM-DD HH:mm
bootstrap 行数控制,某一列的数据太长,以展开收缩显示
其中一列显示10条数据,多余的数据点击展开显示,点击收缩闭合。 for (var i = 0; i < b.length; i++) { var c = b[i]; if (c.Enabled == false) { Html += "<button class=\"btn btn-warning btn-xs\" type=\"button\">" + CC+"/"+DD + "</button><br/>"; } else { Html += "<button class=\"btn btn-success btn-xs\" type=\"button\">" + CC+ "/" + DD + "</button><br/>"; }
关于glide的问题有没有大神来看看!
``` Load failed for http://ceshi.cxbim.com/api/User/0a800038-1e2d-41dd-87a4-052665bdaa5a/GetAvatar with size [90x90] class com.bumptech.glide.load.engine.GlideException: Failed to load resource There was 1 cause: com.bumptech.glide.load.HttpException(Unauthorized) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE ``` 这是我的glide报错日志。首先我已经试过将http换成https了还是不行,这是后端传的图片问题还是我的问题。他们是用流的形式上传的图片。有没人知道怎么操作???
shiro session使用redis存储
场景:使用redis存储shiro的session 当根据sessionId从redis中获取session对象时应返回null ``` try { if (null != sessionId) { byte[] bytes = robertRedisClient.get(redisSerializer.serialize(SHIRO_SESSION + sessionId.toString())); if (1 > bytes.length) { return null; } return (Session) redisSerializer.deserialize(bytes); } return null; } catch (Exception e) { log.error("获取shiro的session时发生异常,异常详细信息:\n {}", ExceptionUtils.getStackTrace(e)); return null; } ``` 问题:1、后台日志上可以看到nullpointexception,可也有新session创建的日志输出 ``` 2019-05-06 16:41:46.583 [XNIO-1 task-6] ERROR- com.robert.auth.session.RedisSessionDao - 获取shiro的session时发生异常,异常详细信息: java.lang.NullPointerException at com.robert.auth.session.RedisSessionDao.doReadSession(RedisSessionDao.java:54) at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.readSession(AbstractSessionDAO.java:168) 2019-05-06 16:41:46.583 [XNIO-1 task-6] DEBUG- com.robert.auth.session.RedisSessionDao - 新增一个session:3dfe4f26-ddb2-4b1e-9fc0-fa772cd60dd8 2019-05-06 16:41:46.583 [XNIO-1 task-6] DEBUG- com.robert.auth.session.RedisSessionDao - 创建session的host:192.168.0.221,session主键:3dfe4f26-ddb2-4b1e-9fc0-fa772cd60dd8,最后访问时间:Mon May 06 16:41:46 CST 2019 2019-05-06 16:41:46.584 [XNIO-1 task-6] DEBUG- com.robert.auth.redis.RobertRedisClient - 向redis中写数据:key-shiro-session:3dfe4f26-ddb2-4b1e-9fc0-fa772cd60dd8,value-...,timeout-1800 2019-05-06 16:41:46.585 [XNIO-1 task-6] DEBUG- com.robert.auth.session.RedisSessionDao - 更新shiro session :3dfe4f26-ddb2-4b1e-9fc0-fa772cd60dd8 2019-05-06 16:41:46.585 [XNIO-1 task-6] DEBUG- com.robert.auth.session.RedisSessionDao - 创建session的host:192.168.0.221,session主键:3dfe4f26-ddb2-4b1e-9fc0-fa772cd60dd8,最后访问时间:Mon May 06 16:41:46 CST 2019 2019-05-06 16:41:46.585 [XNIO-1 task-6] DEBUG- com.robert.auth.redis.RobertRedisClient - 向redis中写数据:key-shiro-session:3dfe4f26-ddb2-4b1e-9fc0-fa772cd60dd8,value-...,timeout-1800 ``` 2、客户端获取不到请求响应
通过python request模块模拟手机提交企业微信表单问题
手机版填写页面如下 ![图片说明](https://img-ask.csdn.net/upload/202003/21/1584766206_109821.jpg) 然后我通过fiddler抓包,抓到提交链接,想通过post直接提交,但无奈一直提交不成功,抓到的信息如下 ``` POST https://doc.weixin.qq.com/form/share?f=json HTTP/1.1 Host: doc.weixin.qq.com Content-Type: multipart/form-data; boundary=----WebKitFormBoundary0nQoOej921mBaAuX Origin: https://doc.weixin.qq.com Accept-Encoding: br, gzip, deflate Cookie: tdoc_sid=AMM3UAAibUsGPjBvAHMwcQAA; tdoc_skey=1688851793715907&b7c983fede0c309d329c96609308ad43CAESIEL1u9VJLkQlZC9omVnIxuJVQVCuBYTg-fSIMv9AalvU; tdoc_vid=1688851793715907; xm_data_ticket=CAESIEL1u9VJLkQlZC9omVnIxuJVQVCuBYTg-fSIMv9AalvU; wwapp.cst=859E6EA21BC7EAB3813E67EC6C12CE47DDDC930F08AE69E8662155724C8A9420F72500E7234C7F6490CA8022487D0CE8; wwapp.deviceid=DD8736FD-BD47-4ECC-B248-F48206FED5AA; wwapp.st=ED137002C8A85B417465AD60BBB415DEF815E26B8879257C3D6F117515042789D5381AB23350D847250617FEE7E6B75F1C2A98F2D8E3A93F1C2535F85811E41F702F3A1E5BCE1A26FB49F0876C753743B7EE75D2B1A6BDBC020A21EAA0F47BF90AE9359F22114DD179A7813DEDE8F8C45EF6342D4BC9E26ECD97731097F7DFE85C5C369A818293CEB854E7A2E49A78E5FDD83A5DEBB100F52D6D0071CCFF2310; wwapp.vid=1688851793715907; xm_lang=zh-cn Connection: keep-alive Accept: application/json, text/plain, */* User-Agent: Mozilla/5.0 (iPad; CPU OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 wxwork/3.0.7 MicroMessenger/7.0.1 Language/zh Referer: https://doc.weixin.qq.com/ Content-Length: 1159 Accept-Language: zh-cn ------WebKitFormBoundary0nQoOej921mBaAuX Content-Disposition: form-data; name="key" ------WebKitFormBoundary0nQoOej921mBaAuX Content-Disposition: form-data; name="type" 3 ------WebKitFormBoundary0nQoOej921mBaAuX Content-Disposition: form-data; name="form_id" ADQAfwd7AAk_ADQAfwd7-AkAAcALwY_AHMYglWYoEARE1584633600 ------WebKitFormBoundary0nQoOej921mBaAuX Content-Disposition: form-data; name="form_reply" {"items":[{"question_id":1,"text_reply":"佛山","option_reply":[]},{"question_id":2,"text_reply":"2018094343138","option_reply":[]},{"question_id":3,"text_reply":"","option_reply":[2]},{"question_id":4,"text_reply":"","option_reply":[2]},{"question_id":5,"text_reply":"","option_reply":[1]},{"question_id":6,"text_reply":"","option_reply":[]},{"question_id":7,"text_reply":"","option_reply":[]},{"question_id":8,"text_reply":"","option_reply":[2]},{"question_id":9,"text_reply":"","option_reply":[2]}]} ------WebKitFormBoundary0nQoOej921mBaAuX Content-Disposition: form-data; name="f" json ------WebKitFormBoundary0nQoOej921mBaAuX Content-Disposition: form-data; name="source" ------WebKitFormBoundary0nQoOej921mBaAuX-- ``` 上面的form reply字段就是要填的信息 代码应该怎么写 我是这样请求的 ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584812622_457304.png) 实在想不通 错在哪里
spring cloud下 ajax请求和浏览器请求两者session不一致
项目是用spring cloud搭建的,实现了基于redis的session共享,不同服务间能实现session共享, 每次浏览器访问的session是:64cc5a22-32b2-4307-9a72-46972a5a5c3e 每次ajax访问的session是:dd07154d-6865-4bd7-986e-212141ee81cf 两者不一致,请高手帮忙!
用PHP给MySQL插入一段BLOG产生Fatal Error且没有任何提示,为啥?
如题,没有任何错误提示。尝试过用statment和直接query的方式,都无效…… ``` // 我自己的文件函数,大概类似file_get_contents() $fdata = $SYS->FileIO->file_read($_FILES['mediafile']['tmp_name']); // 建立一个statement,$DB也是自己写的类,反正_CONNECTER就是mysqli实例了 $stmt = mysqli_prepare($DB->_CONNECTER, "INSERT INTO filedata (checksum, filesize, fileext, uploadtime, filedata) VALUES (?, ?, ?, ?, ?)"); // 绑定变量 mysqli_stmt_bind_param($stmt, "sissb", $checksum, $_FILES['mediafile']['size'], $fileext, date('Y-m-d H:i:s'), $DB->_CONNECTER->real_escape_string($fdata)); 执行 mysqli_stmt_execute($stmt); 关闭statement mysqli_stmt_close($stmt); ``` 然后就甩给我一个500错误。看PHP的error log没有任何详细提示,完整log就是这样: > [Sun Apr 05 21:15:17 2020] [error] [client 111.196.2.224] PHP Fatal error: Query Errors:\nINSERT INTO GDMN_filedata (checksum, filesize, fileext, uploadtime, filedata) VALUES ('fcbb8d2c6bd3561d54ecde7289982d56', 153727193, 'mp4', '2020-04-05 21:14:34', '\\0\\0\\0 ftypisom\\0\\0\x02\\0isomiso2avc1mp41\\0\\0\\0\bfree\t\x1e\xc6Lmdat\xde\x02\\0Lavc58.54.100\\0B \b\xc1\x188\\0\\0\\0\x0c\x06\\0\x07\x80u0\\0\\0\x03\\0@\x80\\0\\0\\0\b\x06\x01\x04\\0\\0\b\x10\x80\\0\\0\x0fwe\xb8\x04\x17\xff\xf3\x03a\xeb\x7f2\xbcD~\xf12\xe26\xa9\xc3T\xfe\xc4)\xceK,\x0e\xd1m\\"\xcc\xf0b\xb9\xc7\xd8\x0cU\x13Z-\xdeq@m)\xc0\xa0\\n\xb4\xbd\xb8\xdf\xd5\xa9\xd7\x85\xbb\xee\x06F\xb3_\xf3\xf8.\x0c\xd84n3EJ\xde\\0\\0\x03\\0\\0\x03\\0\\0\x03\\0\x01\xb0\xbe\xa1\xa2\xb7\xc0\x06\xdf$\x06\xd4f\xd7\xda\xa1<P\xeb\xec\xdf\xcc\x1d{\xb2M\va\x8e;\xeb\xc3\v\x8c\xfax\xab\xd9\xde\xec)\xcb\xb5\xf6/,\x03\xfea,\x97\xb5L\xcf\x03\x856\xe6/?E\xc3\xd2\xb2\xf9s\x1e\xa0\xed\xe0\xd7\x94\x9e\xa9mS\x89\x9b\xe3\xb6P\x9c@c\xfe\xaf\x93\xdf\x1c\xb1V\x8c\xba\b\xb0\xab\xd9I\x1cr\xc9\xe5\xb9 ~0\xc6\x82\xd0me\x0e\xe0\xe2\x8d:w-\xcf\xa3\xe2\xfd\\'\xc8\x9fdqp\xca\x9d\x9bT\x8fx\\r\x90\tr\xf7_\x7fn\xc2 Ms\xba\x01;Q\x1f\xe7\x84\xf4\xea\xb3\x82\x95X\x8f\xa1\xed\xfe\xd4\xd3i\xae\xd2\x83Pg5VA\xc4\xfc?8\xd0\xfaYG\xc0\xc5\xd0t\xd1\xb2W\x81\xf5\xe7\xb7\xb9\x18\xb8)\xb3\xa1M\\0\xec\xec\xc6!8\xd1]/\x17\xeb\xcfN\xc6h\xf0~\xd6\xd0\xf3\x85\x8b\xa3\xd21u\x7fJf\xe9\b\x18\xbd\x1f\vh\xdcV)\\"\xc2\xa6\x16\x8c\xa0d\xa7\xe6 u\xd5\x94\x10\x11v_l\xdd\xd7d\x1ds\x04q\xc6\x80Q\x1d\xc2#\xc33mxHV\x85)\xbb\x9f\xff\xfd\xb3\xde\xb7G\x101h%\t\x13\xd9<\xeb/tO.\\0U\xa8\x7f\x91b\x13\x92\x03./yd\xddgd\xb3\xcejh\xfbm+\xa8\xe5l+\\\\1\xfa\xa9\x0fN\xb3\xfaT/\xd2\xb7\xb5\x07\x9eM\xc13\xbc\xf4SVD\xb1cV7\x99\xa7S\xc8\xed\xc8b~\xa9\x19C\xb3A)Rp\\n\x8f\x9e\x94\xeb\xe4\xe8e\xf4:\xae7\x96\xeck\x15\x9c\xf5\xb8\xce\xa5\x02\x19\xcb\xfa\xa4\xad\x19\x0c\xdb\xf4\x12\\n\x90}\x0f\xdf7n\\'\x8b*8&Qs;\xc1\x15\xee@\x9ac\xdd\xf9\xb0eGN?\xdd\xc4\x17<\x1b\x96\x06h\xc0N-\xc4V\xcb\xfd\b\xe7\xcd\xf1\x07\xbd{\xc0b\xcc\x17\x98\xeb\xf8\xdc}&\xfd\x1e\x13\x89L\xdd\xfb\xcc-\xee\xe1\\0V\xcaBp\x02\\\\\xdex\xa9\xfd\xa0\x8a-\xdec\x7f\x16\xcd\x0c\xf14\xd4:=\x9c\xf2\xfb\xcc\xc3A\xef\xdfl\x14\x8a\xcb\xa7\xf5\x97\x05\x1f\xc9\xe3\x11\xb5\x84\x86\xe9\xc8|`\x90\x8c\x18B\xf3\xd1w6S\x82y\x879\x1e\x8e\xa0\xc1\x16\xac$n\x9eM\x99\x84\x1e\xd4>:#\x074\xacJ\xff\xb36p\xb4\x9c\xbaX\x81\xf3\x955@\xba\xb8H\xfc\\r\xdb\x9c6\x87\xdc[\xb6Ev\xe7\x89+\xdb\x90\xf5\x80\\0\\0\x03\\0\x84=J\xd4\xaa\xb9\xd3\x15\\r\x98\xf5| in /data/www/vip.gdmn/ysqj/mini/jt/includes/ob.mysqli.php on line 51, referer: https://servicewechat.com/wx2c9334cdeea730dd/devtools/page-frame.html 这是个mp4文件,我上传别的mp4都没问题,就这个文件会出错,肯定不是upload file size或max allowed packet之类的错误,比这个大的都没问题,唯独就这个。 鉴于这个情况,我也想过可能是这个文件里有特殊字符,可是real_escape_string过了,也不行。 还有别的思路吗?谢谢!
input框已经填入了值,可是在js里面获取却没有没有值
![图片说明](https://img-ask.csdn.net/upload/202004/03/1585905741_39195.jpg) 这是JSP代码 ``` <div class="layui-col-xs4"> <label class="layui-form-label">申请现场联系人</label> <div class="layui-input-block"> <input type="text" name="permitSiteContact" id="permitSiteContact" class="layui-input" style="border: 1px solid #c2c2c2; "> </div> </div> ``` ``` <div class="layui-col-xs4"> <label class="layui-form-label">申请许可时间</label> <div class="layui-input-block"> <input class="Wdate" type="text" id="permitTime" name="permitTime" style="width: 100%;" onClick="permitTimeFun(this)"> </div> </div> ``` ``` function permitTimeFun(element){ WdatePicker({ el:element, dateFmt:'yyyy-MM-dd HH:mm', onpicked:function(){ logform.preview(); } }) } ``` 我写了好几种这样获取的代码 都为空 ``` $("#permitSiteContact").val(); var value = document.getElementById('permitSiteContact').value;//获取input值 ``` ![图片说明](https://img-ask.csdn.net/upload/202004/03/1585906187_128280.jpg) 各位大神我需要怎么写呢,救救小弟,谢谢大家
(求助帖)mybatis碰到Mapped Statements collection does not contain value for怎么解决
在网上查过答案,命名空间,接口啥的都一致,文件夹也一致,其他的也没啥问题,我朋友和我一样的代码都能运行,我的报错。 具体报错 ``` org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for cn/youwo/dao/UserMapper.findById ### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for cn/youwo/dao/UserMapper.findById at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62) at cn.youwo.dao.UsersMapperTest.findById(UsersMapperTest.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for cn/youwo/dao/UserMapper.findById at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:775) at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:615) at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:608) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:103) ... 25 more ``` 项目文件图 ![图片说明](https://img-ask.csdn.net/upload/202003/31/1585626689_310097.png) UserM和Test两个文件忽略,那是我用注解法写的,可以运行 src/cn/youwo/ bean/Users ``` package cn.youwo.bean; import java.util.Date; public class Users { private int id; private String nickname; private String realname; private String pwd; private String phone; private String email; private String address; private Date createTime; private int type; private String realid; public int getId() { return id; } public void setId(int id) { this.id = id; } ...... } ``` dao/UsersMapper和UsersMapper.xml ``` package cn.youwo.dao; import cn.youwo.bean.Users; import java.util.List; public interface UsersMapper { Users findById(int id); Users findByName(String name); List<Users>findAll(); void add(Users user); void update(Users user); void delete(int id); } ``` ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!--!DOCTYPE configuration SYSTEM "mybatis-3-config.dtd" --> <mapper namespace="cn.youwo.dao.UsersMapper"> <select id="findById" resultType="cn.youwo.bean.Users" parameterType="int"> select   id,   nickname,   realname,   pwd,   phone,   email,   address,   create_time createTime,   type,   realid   from n_users where id=#{id} </select> </mapper> ``` mybatis-config.xml ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <properties resource="jdbc.properties"/> <!--指定什么阶段=开发阶段=测试阶段=生产阶段--> <environments default="development"> <environment id="development"> <!--事务管理器--> <transactionManager type="JDBC"/> <!--数据源--> <dataSource type="POOLED"> <property name="driver" value="${jdbc.driver}"/> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </dataSource> </environment> </environments> <mappers> <mapper resource="cn/youwo/dao/UsersMapper.xml"/> <!--<mapper class="cn.youwo.dao.UsersM"/>--> </mappers> </configuration> ``` test/cn/youwo/dao/UsersMapperTest ``` package cn.youwo.dao; import cn.youwo.bean.Users; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.junit.Assert; import org.junit.Test; import java.io.InputStream; import java.text.SimpleDateFormat; public class UsersMapperTest { static final String CONFIG_FILE="mybatis-config.xml"; private static SqlSessionFactory factory; static { SqlSessionFactoryBuilder builder=new SqlSessionFactoryBuilder(); try { InputStream inputStream = Resources.getResourceAsStream(CONFIG_FILE); factory=builder.build(inputStream); } catch (Exception e) { e.printStackTrace(); } } @Test public void findById(){ SqlSession session = factory.openSession(); Users user = session.selectOne("cn/youwo/dao/UserMapper.findById",2); session.close(); Assert.assertNotNull(user); Assert.assertEquals("匿名",user.getNickname()); Assert.assertEquals("123",user.getPwd()); SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd"); String srt=df.format(user.getCreateTime()); Assert.assertEquals("2020-03-21",srt); } } ```
Java 运行时异常,java.lang.NullPointerException
最近在刚刚学Java,刚刚学完继承和多态,现在在做一个作业遇到了困难。 我简单的说一下,父类Vegetable,子类Tomato继承父类,子类有构造方法Tomato(String name,boolean isProtected,Date d) 这是父类Vegetable的定义: ``` package Pixel; import java.util.Date; public class Vegetable { String name; public int SerialNumber;//每个植物的序列号 public int productivity; static int id=0; Date WhentoGrow; public Vegetable(String name) { this.name=name; id++; } } ``` 子类: ``` package Pixel; import java.text.SimpleDateFormat; import java.text.DecimalFormat; import java.util.Date; public class Tomato extends Vegetable { boolean isProtected=true; public Tomato(String name,boolean Protected,Date d) { super(name); this.WhentoGrow=d; this.SerialNumber=super.id; isProtected=Protected; if(isProtected)productivity=10; else productivity=5; } private long GrowCycle=6*3600*1000 ;//一个番茄长6小时长出 SimpleDateFormat When = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); final long millis=WhentoGrow.getTime(); final long harvestmillis=millis+GrowCycle; } ``` 在另一个class中做测试: ``` package Pixel; import java.util.Date; public class test { @SuppressWarnings("deprecation") public static void main(String []args) { Date t1=new Date(120,4,3,19,30,00); Date t2=new Date(120,4,3,19,30,00); //System.out.println(t1.getTime()); Tomato fanqie=new Tomato("fanqie",true,t1); Tomato fanqie2=new Tomato("fanqie",false,t2); } } ``` 通过t1t2做参数d来构造番茄1,番茄二,编辑器此时没有报错,但是当我运行的时候他就报错了,错误信息是java.lang.NullPointerException,并提示问题语句在于Tomato 文件里面的this.WhentoGrow=d这句话。 上网查过了,基本上就是说某个类没有具体实例化,但是我这里的t1,t2都应new过了啊 真的很苦恼,求大神指教啊!
c++日期类程序填空求大佬帮忙!
//自定义一个简单的日期类 #include <iostream #include <cstdlib #include <cstring using namespace std; const static int a[]={31,31,28,31,30,31,30,31,31,30,31,30,31}; //--------------------开始:日期类定义------------------- _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ ...... _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ //--------------------结束:日期类定义------------------- //----------------开始:日期类成员函数定义--------------- _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ ...... _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ //---------------结束:日期类成员函数定义---------------- //>>>>>>>>>>>>>>>>>>>>>主函数开始<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< int main() { Date d1; //使用缺省值(200.1.1)构造函数定义一个日期对象 //用三个存取(访问)函数输出d1 cout<<"(Default Constructor)Date d1;----->"<<'{'<<d1.getYear()<<'.' <<d1.getMonth()<<'.'<<d1.getDay()<<'}'<<endl; //用输出成员函数输出d1 cout<<"(Default Constructor)Date d1;----->"; d1.showDate(); cout<<endl<<endl; Date d2(2015,2,29); //使用非法日期构造函数定义对象,日期对象将被置为默认值。 //合法日期:年>0,1<=月<12,1<=日<=指定年、月的天数 cout<<"Date d2(2015,2,29);----->"; d2.showDate(); cout<<endl; Date d3(2008,11,30); //使用普通构造函数定义对象 cout<<"Date d3(2008,11,30);----->"; d3.showDate(); cout<<endl; //设置日期(使用三个整数:年、月、日) //如果给定的日期为非法日期则不修改原有的日期值 d3.setDate(2008,13,8); cout<<"d3.setDate(2008,13,8);----->"; int y,m,d; d3.getDate(y,m,d); //获得d3对应的日期值 cout<<'{'<<y<<'.'<<m<<'.'<<d<<'}'<<endl; //测试非法日期的几种典型情况。 d3.setDate(2016,2,29); cout<<"d3.setDate(2016,2,29);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,2,0); cout<<"d3.setDate(2016,2,0);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,11,-1); cout<<"d3.setDate(2016,11,-1);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,11,31); cout<<"d3.setDate(2016,11,31);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,00,11); cout<<"d3.setDate(2016,00,11);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,13,11); cout<<"d3.setDate(2016,13,11);----->"; d3.showDate(); cout<<endl; d3.setDate(0,11,11); cout<<"d3.setDate(0,11,11);----->"; d3.showDate(); cout<<endl; d3.setDate(-123,11,11); cout<<"d3.setDate(-123,11,11);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,12,0); cout<<"d3.setDate(2016,12,0);----->"; d3.showDate(); cout<<endl; d3.setDate(2016,12,32); cout<<"d3.setDate(2016,12,32);----->"; d3.showDate(); cout<<endl; d3.setDate(2008,8,8); cout<<"d3.setDate(2008,8,8);----->"; d3.showDate(); cout<<endl<<endl; //用字符串构造日期,(类型)转换构造函数 //日期串可以指定也可以不指定世纪(默认为21世纪) //日期分隔符可以是"."或"/"或"-"三者之一 //date_format(日期格式)="yyyy.mm.dd"或"dd.mm.yyyy"或"mm.dd.yyyy" //日期默认格式为中国格式:"yyyy.mm.dd" Date d4("10/27/06","mm/dd/yyyy"); cout<<"Date d4(\"10/27/06\",\"mm/dd/yyyy\");----->"; d4.showDate(); cout<<endl; Date d5("6.3.3"); //日期串长度错误[6,10]! cout<<"Date d5(\"6.3.3\");----->"; d5.showDate(); cout<<endl; Date d6("06_3_3"); //日期分隔符只能是“.”或“/”或“-”三者之一! cout<<"Date d6(\"06_3_3\");----->"; d6.showDate(); cout<<endl; Date d7("06.3-3"); //两个日期分隔符必须一致! cout<<"Date d7(\"06.3-3\");----->"; d7.showDate(); cout<<endl; Date d8("06.3.3"); //默认为21世纪 cout<<"Date d8(\"06.3.3\");----->"; d8.showDate(); cout<<endl; Date d9("10/28/1990","mm.dd.yyyy"); cout<<"Date d9(\"10/28/1990\",\"mm.dd.yyyy\");----->"; d9.showDate(); cout<<endl; d9.setDate("10-31-1980","dd-mm-yyyy"); cout<<"d9.setDate(\"10-31-1980\",\"dd-mm-yyyy\");----->"; d9.showDate(); cout<<endl; d9.setDate("10-31-1980","mm-dd-yyyy"); cout<<"d9.setDate(\"10-31-1980\",\"mm-dd-yyyy\");----->"; d9.showDate(); cout<<endl; d9.setDate("06-3-19"); cout<<"d9.setDate(\"06-3-19\");----->"; d9.showDate(); cout<<endl<<endl; d9="1960.11.11"; cout<<"d9=\"1960.11.11\";----->"; d9.showDate(); cout<<endl; d9=Date("1980-12-12"); cout<<"d9=Date(\"1980-12-12\");----->"; d9.showDate(); cout<<endl; Date d10("80/10/10"); cout<<"Date d10(\"80/10/10\");----->"; d10.showDate(); cout<<endl<<endl; d2.setDate(1984,7,1); cout<<"d2.setDate(1984,7,1);----->"; d2.showDate(); cout<<endl; //计算日期+整数(值可为正、负和零) d2.addDay(0); cout<<"d2.addDay(0);----->"; d2.showDate(); cout<<endl; d2.addDay(-1390); cout<<"d2.addDay(-1390);----->"; d2.showDate(); cout<<endl; d2.setDate(1990,2,5); cout<<"d2.setDate(1990,2,5);----->"; d2.showDate(); cout<<endl; d2.addDay(9488); cout<<"d2.addDay(9488);----->"; d2.showDate(); cout<<endl; d2.setDate(1990,9,10); cout<<"d2.setDate(1990,9,10);----->"; d2.showDate(); cout<<endl; d2.addDay(9271); cout<<"d2.addDay(9271);----->"; d2.showDate(); cout<<endl<<endl; d2.setDate(1984,7,1); d3.setDate(1980,9,10); cout<<"d2:"; d2.showDate(); cout<<",d3:"; d3.showDate(); cout<<",d2-d3="<<d2.dateSubDate(d3)<<endl; d2.setDate(1990,2,5); d3.setDate(2016,1,28); cout<<"d2:"; d2.showDate(); cout<<",d3:"; d3.showDate(); //计算日期-日期的值(值可为正、负和零) cout<<",d2-d3="<<d2.dateSubDate(d3)<<endl; d2.setDate(1990,9,10); d3.setDate(2016,1,28); cout<<"d2:"; d2.showDate(); cout<<",d3:"; d3.showDate(); cout<<",d2-d3="<<d2.dateSubDate(d3)<<endl; return 0; } //>>>>>>>>>>>>>>>>>>>>>主函数结束<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 输入 无 输出 见“参考输出”。 输入样例 1 无 输出样例 1 (Default Constructor)Date d1;----->{2000.1.1} (Default Constructor)Date d1;----->{2000.1.1} Date d2(2015,2,29);----->{2000.1.1} Date d3(2008,11,30);----->{2008.11.30} d3.setDate(2008,13,8);----->{2008.11.30} d3.setDate(2016,2,29);----->{2016.2.29} d3.setDate(2016,2,0);----->{2016.2.29} d3.setDate(2016,11,-1);----->{2016.2.29} d3.setDate(2016,11,31);----->{2016.2.29} d3.setDate(2016,00,11);----->{2016.2.29} d3.setDate(2016,13,11);----->{2016.2.29} d3.setDate(0,11,11);----->{2016.2.29} d3.setDate(-123,11,11);----->{2016.2.29} d3.setDate(2016,12,0);----->{2016.2.29} d3.setDate(2016,12,32);----->{2016.2.29} d3.setDate(2008,8,8);----->{2008.8.8} Date d4("10/27/06","mm/dd/yyyy");----->{2006.10.27} Date d5("6.3.3");----->{2000.1.1} Date d6("06_3_3");----->{2000.1.1} Date d7("06.3-3");----->{2000.1.1} Date d8("06.3.3");----->{2006.3.3} Date d9("10/28/1990","mm.dd.yyyy");----->{1990.10.28} d9.setDate("10-31-1980","dd-mm-yyyy");----->{1990.10.28} d9.setDate("10-31-1980","mm-dd-yyyy");----->{1980.10.31} d9.setDate("06-3-19");----->{2006.3.19} d9="1960.11.11";----->{1960.11.11} d9=Date("1980-12-12");----->{1980.12.12} Date d10("80/10/10");----->{2080.10.10} d2.setDate(1984,7,1);----->{1984.7.1} d2.addDay(0);----->{1984.7.1} d2.addDay(-1390);----->{1980.9.10} d2.setDate(1990,2,5);----->{1990.2.5} d2.addDay(9488);----->{2016.1.28} d2.setDate(1990,9,10);----->{1990.9.10} d2.addDay(9271);----->{2016.1.28} d2:{1984.7.1},d3:{1980.9.10},d2-d3=1390 d2:{1990.2.5},d3:{2016.1.28},d2-d3=-9488 d2:{1990.9.10},d3:{2016.1.28},d2-d3=-9271
MahApps.Metro编写程序出现无可用源的错误
![图片说明](https://img-ask.csdn.net/upload/202004/03/1585897045_653692.png)![图片说明](https://img-ask.csdn.net/upload/202004/03/1585897054_504687.png) ![图片说明](https://img-ask.csdn.net/upload/202004/03/1585897192_85963.png) 源文件信息: 为“C:\projects\mahapps-metro\src\MahApps.Metro\Behaviours\GlowWindowBehavior.cs”查找源。Checksum: SHA1 {ae e7 79 dd 25 4e 8e 72 43 68 80 a2 a c6 33 ec 8e de 21 f4} 文件“C:\projects\mahapps-metro\src\MahApps.Metro\Behaviours\GlowWindowBehavior.cs”不存在。 正在脚本文档中查找“C:\projects\mahapps-metro\src\MahApps.Metro\Behaviours\GlowWindowBehavior.cs”... 正在项目中查找“C:\projects\mahapps-metro\src\MahApps.Metro\Behaviours\GlowWindowBehavior.cs”。 在项目中未找到该文件。 正在目录“C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\”中查看... 正在目录“C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\vccorlib\”中查看... 正在目录“C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc\”中查看... 正在目录“C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl\”中查看... 正在目录“C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include”中查看... 活动解决方案的调试源文件设置指明调试器不会要求用户查找文件: C:\projects\mahapps-metro\src\MahApps.Metro\Behaviours\GlowWindowBehavior.cs。 调试器未能找到源文件“C:\projects\mahapps-metro\src\MahApps.Metro\Behaviours\GlowWindowBehavior.cs”。 用的vs2012开发WPF程序,通过NuGet下载的MahApps.Metro,进行编程,然后调试时一直出现这个错误。 怎么解决,有没有知道。
如何把yyyy-MM-dd:HH-mm-ss 转换yyyy-MM-dd:HH显示
如题。用SimpleDateFormat("yyyy-MM-dd:HH")格式化yyyy-MM-dd:HH-mm好像不行,是否要使用string方法截取?
vi中删除当前行至文件尾的内容,ndd中n大于实际删除行数,会不会有问题?
比如一个文件100行,想删除93-100行,我会在第93行处输入10dd(反正是要删除当前行至文件尾的内容,懒得数到底需要删几行),想问下这里输入的数字10大于实际删除的行数会不会有问题?我的这种操作和用dG是一样的吗?
python3.7使用pip安装dlib失败,已使用pip安装cmake和boost
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib Using cached https://pypi.tuna.tsinghua.edu.cn/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz (3.2 MB) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error ERROR: Command errored out with exit status 1: 以下是错误原因 command: 'd:\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Ray\AppData\Local\Temp\pip-wheel-s_easgnt' cwd: C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\ Complete output (149 lines): running bdist_wheel running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=d:\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: Visual Studio 15 2017 -- The C compiler identification is MSVC 19.16.27034.0 -- The CXX compiler identification is MSVC 19.16.27034.0 -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: D:/Python/Python37/python.exe (found version "3.7.6") -- Found PythonLibs: D:/Python/Python37/libs/Python37.lib -- pybind11 v2.2.2 -- Using CMake version: 3.16.3 -- Compiling dlib version: 19.19.0 -- SSE4 instructions can be executed by the host processor. -- AVX instructions can be executed by the host processor. -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- Enabling AVX instructions -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") -- DID NOT FIND CUDA -- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA -- C++11 activated. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/build/temp.win-amd64-3.7/Release Invoking CMake build: 'cmake --build . --config Release -- /m' 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 15.9.21+g9802d43bc3 版权所有(C) Microsoft Corporation。保留所有权利。 D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目录 下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\ZERO_CHECK.vcxproj] Checking Build System D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目录 下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] Building Custom Rule C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/dlib/CMakeLists.txt base64_kernel_1.cpp bigint_kernel_1.cpp bigint_kernel_2.cpp bit_stream_kernel_1.cpp entropy_decoder_kernel_1.cpp entropy_decoder_kernel_2.cpp entropy_encoder_kernel_1.cpp entropy_encoder_kernel_2.cpp md5_kernel_1.cpp tokenizer_kernel_1.cpp unicode.cpp image_dataset_metadata.cpp mnist.cpp global_function_search.cpp kalman_filter.cpp test_for_odr_violations.cpp auto.cpp sockets_kernel_1.cpp c:\users\ray\appdata\local\temp\pip-install-adkry0ue\dlib\dlib\sockets\../dlib_basic_cpp_build_tutorial.txt(1): fatal error C1189: #error: "Don't write #include <dlib/all/source.cpp> in your code." (编译源文件 C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\dlib\sockets\sockets_kernel_1.cpp) [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] bsp.cpp dir_nav_kernel_1.cpp dir_nav_kernel_2.cpp dir_nav_extensions.cpp linker_kernel_1.cpp extra_logger_headers.cpp logger_kernel_1.cpp logger_config_file.cpp misc_api_kernel_1.cpp misc_api_kernel_2.cpp sockets_extensions.cpp sockets_kernel_2.cpp sockstreambuf.cpp sockstreambuf_unbuffered.cpp server_kernel.cpp server_iostream.cpp server_http.cpp multithreaded_object_extension.cpp threaded_object_extension.cpp threads_kernel_1.cpp threads_kernel_2.cpp threads_kernel_shared.cpp thread_pool_extension.cpp async.cpp timer.cpp stack_trace.cpp cpu_dlib.cpp tensor_tools.cpp fonts.cpp widgets.cpp drawable.cpp canvas_drawing.cpp style.cpp base_widgets.cpp gui_core_kernel_1.cpp gui_core_kernel_2.cpp png_loader.cpp save_png.cpp jpeg_loader.cpp save_jpeg.cpp Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 261, in <module> 'Topic :: Software Development', File "d:\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "d:\python\python37\lib\distutils\core.py", line 148, in setup dist.run_commands() File "d:\python\python37\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\site-packages\wheel\bdist_wheel.py", line 223, in run self.run_command('build') File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 135, in run self.build_extension(ext) File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 175, in build_extension subprocess.check_call(cmake_build, cwd=build_folder) File "d:\python\python37\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1. ---------------------------------------- ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'd:\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ray\AppData\Local\Temp\pip-record-70rug5ub\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\python37\Include\dlib' cwd: C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\ Complete output (151 lines): running install running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=d:\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: Visual Studio 15 2017 -- The C compiler identification is MSVC 19.16.27034.0 -- The CXX compiler identification is MSVC 19.16.27034.0 -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: D:/Python/Python37/python.exe (found version "3.7.6") -- Found PythonLibs: D:/Python/Python37/libs/Python37.lib -- pybind11 v2.2.2 -- Using CMake version: 3.16.3 -- Compiling dlib version: 19.19.0 -- SSE4 instructions can be executed by the host processor. -- AVX instructions can be executed by the host processor. -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- Enabling AVX instructions -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") -- DID NOT FIND CUDA -- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA -- C++11 activated. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/build/temp.win-amd64-3.7/Release Invoking CMake build: 'cmake --build . --config Release -- /m' 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 15.9.21+g9802d43bc3 版权所有(C) Microsoft Corporation。保留所有权利。 D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目 录下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\ZERO_CHECK.vcxproj] Checking Build System D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目 录下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] Building Custom Rule C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/dlib/CMakeLists.txt base64_kernel_1.cpp bigint_kernel_1.cpp bigint_kernel_2.cpp bit_stream_kernel_1.cpp entropy_decoder_kernel_1.cpp entropy_decoder_kernel_2.cpp entropy_encoder_kernel_1.cpp entropy_encoder_kernel_2.cpp md5_kernel_1.cpp tokenizer_kernel_1.cpp unicode.cpp image_dataset_metadata.cpp mnist.cpp global_function_search.cpp kalman_filter.cpp test_for_odr_violations.cpp auto.cpp sockets_kernel_1.cpp c:\users\ray\appdata\local\temp\pip-install-adkry0ue\dlib\dlib\sockets\../dlib_basic_cpp_build_tutorial.txt(1): fatal error C1189: #error: "Don't write #include <dlib/all/source.cpp> in your code." (编译源文件 C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\dlib\sockets\sockets_kernel_1.cpp) [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] bsp.cpp dir_nav_kernel_1.cpp dir_nav_kernel_2.cpp dir_nav_extensions.cpp linker_kernel_1.cpp extra_logger_headers.cpp logger_kernel_1.cpp logger_config_file.cpp misc_api_kernel_1.cpp misc_api_kernel_2.cpp sockets_extensions.cpp sockets_kernel_2.cpp sockstreambuf.cpp sockstreambuf_unbuffered.cpp server_kernel.cpp server_iostream.cpp server_http.cpp multithreaded_object_extension.cpp threaded_object_extension.cpp threads_kernel_1.cpp threads_kernel_2.cpp threads_kernel_shared.cpp thread_pool_extension.cpp async.cpp timer.cpp stack_trace.cpp cpu_dlib.cpp tensor_tools.cpp fonts.cpp widgets.cpp drawable.cpp canvas_drawing.cpp style.cpp base_widgets.cpp gui_core_kernel_1.cpp gui_core_kernel_2.cpp png_loader.cpp save_png.cpp jpeg_loader.cpp save_jpeg.cpp Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 261, in <module> 'Topic :: Software Development', File "d:\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "d:\python\python37\lib\distutils\core.py", line 148, in setup dist.run_commands() File "d:\python\python37\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "d:\python\python37\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 135, in run self.build_extension(ext) File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 175, in build_extension subprocess.check_call(cmake_build, cwd=build_folder) File "d:\python\python37\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: 'd:\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ray\AppData\Local\Temp\pip-record-70rug5ub\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\python37\Include\dlib' Check the logs for full command output.
求助:html只能在微信浏览器打开,调用微信接口问题?
大家好 ,新手请教两个个问题 1.网页上输入域名的时候 直接访问了public目录下面的index.html 没有访问index.php 这个是tp模块默认的设置么? 2.这个怎么设置的index.html只能在微信端打开,我应该怎么解除,让他在普通浏览器也能正常打开呢? 个人觉得原因:1.它直接通过index.html里的js调用了微信授权,需要把js里的微信授权取消。但是我没能找到js里微信授权在哪里。 下么是图片: ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584857161_740465.jpg) ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584856909_155952.png) 下么是其中一个js代码: 1.index.5d79cff.js ``` (function(e){function n(n){for(var a,i,s=n[0],u=n[1],c=n[2],l=0,d=[];l<s.length;l++)i=s[l],o[i]&&d.push(o[i][0]),o[i]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(e[a]=u[a]);g&&g(n);while(d.length)d.shift()();return r.push.apply(r,c||[]),t()}function t(){for(var e,n=0;n<r.length;n++){for(var t=r[n],a=!0,i=1;i<t.length;i++){var u=t[i];0!==o[u]&&(a=!1)}a&&(r.splice(n--,1),e=s(s.s=t[0]))}return e}var a={},o={index:0},r=[];function i(e){return s.p+"static/js/"+({"pages-aboutUs-aboutUs":"pages-aboutUs-aboutUs","pages-buyLesson-buyLesson":"pages-buyLesson-buyLesson","pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail":"pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail","pages-cargoDetail-cargoDetail":"pages-cargoDetail-cargoDetail","pages-questionDetail-questionDetail":"pages-questionDetail-questionDetail","pages-feedback-feedback":"pages-feedback-feedback","pages-login-login":"pages-login-login","pages-partiPost-partiPost":"pages-partiPost-partiPost","pages-payOrder-payOrder":"pages-payOrder-payOrder","pages-searchDetails-searchDetails":"pages-searchDetails-searchDetails","pages-tabbar-drycargo-drycargo":"pages-tabbar-drycargo-drycargo","pages-tabbar-mine-mine":"pages-tabbar-mine-mine","pages-tabbar-question-question":"pages-tabbar-question-question","pages-tabbar-release-release":"pages-tabbar-release-release","pages-tabbar-search-search":"pages-tabbar-search-search","pages-teacherDetail-teacherDetail":"pages-teacherDetail-teacherDetail","pages-userinfo-userinfo":"pages-userinfo-userinfo"}[e]||e)+"."+{"pages-aboutUs-aboutUs":"f00552b3","pages-buyLesson-buyLesson":"6bf6a2ae","pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail":"35e61b5d","pages-cargoDetail-cargoDetail":"9f2898d6","pages-questionDetail-questionDetail":"9c645e70","pages-feedback-feedback":"e2280327","pages-login-login":"d7b4ab6c","pages-partiPost-partiPost":"78de4437","pages-payOrder-payOrder":"8718e180","pages-searchDetails-searchDetails":"7710a11b","pages-tabbar-drycargo-drycargo":"1312f8dd","pages-tabbar-mine-mine":"f44636f9","pages-tabbar-question-question":"8d8629a7","pages-tabbar-release-release":"fdfe539f","pages-tabbar-search-search":"2c50eba0","pages-teacherDetail-teacherDetail":"65279f5c","pages-userinfo-userinfo":"38dd4057"}[e]+".js"}function s(n){if(a[n])return a[n].exports;var t=a[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(e){var n=[],t=o[e];if(0!==t)if(t)n.push(t[2]);else{var a=new Promise(function(n,a){t=o[e]=[n,a]});n.push(t[2]=a);var r,u=document.createElement("script");u.charset="utf-8",u.timeout=120,s.nc&&u.setAttribute("nonce",s.nc),u.src=i(e),r=function(n){u.onerror=u.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var a=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src,i=new Error("Loading chunk "+e+" failed.\n("+a+": "+r+")");i.type=a,i.request=r,t[1](i)}o[e]=void 0}};var c=setTimeout(function(){r({type:"timeout",target:u})},12e4);u.onerror=u.onload=r,document.head.appendChild(u)}return Promise.all(n)},s.m=e,s.c=a,s.d=function(e,n,t){s.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,n){if(1&n&&(e=s(e)),8&n)return e;if(4&n&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(s.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)s.d(t,a,function(n){return e[n]}.bind(null,a));return t},s.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(n,"a",n),n},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},s.p="/",s.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],c=u.push.bind(u);u.push=n,u=u.slice();for(var l=0;l<u.length;l++)n(u[l]);var g=c;r.push([0,"chunk-vendors"]),t()})({0:function(e,n,t){e.exports=t("1e48")},"0538":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.mock=n.http=void 0;var o=a(t("795b")),r=a(t("cebc")),i=a(t("42e7")),s=new i.default;n.mock=s,s.setConfig(function(e){return e.baseUrl="https://www.fastmock.site/mock/09d86ed8a861337ae7da96bbb47bc39e/shoppage",e.header=(0,r.default)({},e.header),e}),s.interceptor.request(function(e,n){return e}),s.validateStatus=function(e){return 200===e},s.interceptor.response(function(e){if(1===e.data.error_code)return e.data},function(e){return e});var u=new i.default;n.http=u,u.setConfig(function(e){return e.baseUrl="http://xinghuo.com/index.php/index/",e.header=(0,r.default)({},e.header),e}),u.validateStatus=function(e){return 200===e},u.interceptor.response(function(e){return 200!==e.statusCode?o.default.reject(e):(1===e.data.code||(102===e.data.code?uni.reLaunch({url:"/pages/common/login/login"}):uni.showToast({title:e.data.msg||"加载中",icon:"none"})),o.default.resolve(e.data))},function(e){return e})},"0831":function(e,n,t){"use strict";t.r(n);var a=t("ac83"),o=t("1333");for(var r in o)"default"!==r&&function(e){t.d(n,e,function(){return o[e]})}(r);t("9578");var i,s=t("f0c5"),u=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);n["default"]=u.exports},1333:function(e,n,t){"use strict";t.r(n);var a=t("bc27"),o=t.n(a);for(var r in a)"default"!==r&&function(e){t.d(n,e,function(){return a[e]})}(r);n["default"]=o.a},"1e48":function(e,n,t){"use strict";var a=t("e54b"),o=t("288e"),r=o(t("cebc"));t("cadf"),t("551c"),t("097d"),t("356c"),t("1c31"),t("921b");var i=o(t("e143")),s=o(t("0831")),u=o(t("48a2")),c=a(t("3322")),l=o(t("b90f"));i.default.config.productionTip=!1,i.default.prototype.$api=c,i.default.prototype.websiteUrl="http://xinghuo.tanfangzi.cn",i.default.prototype.getImgUrl=function(e){return this.websiteUrl+e},i.default.prototype.isLogin=function(e){var n=uni.getStorageSync("userInfo");return!!n&&n.token},i.default.prototype.$store=u.default,i.default.prototype.$api=c,i.default.prototype.$utils=l.default,s.default.mpType="app";var g=new i.default((0,r.default)({},s.default));g.$mount()},"279b":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={pages:{"pages/tabbar/search/search":{navigationBarTitleText:"搜索",navigationStyle:"custom"},"pages/login/login":{navigationBarTitleText:"登录",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"},"pages/tabbar/question/question":{navigationBarTitleText:"问答",navigationStyle:"custom"},"pages/tabbar/drycargo/drycargo":{navigationBarTitleText:"干货",navigationStyle:"custom"},"pages/tabbar/release/release":{navigationBarTitleText:"发布帖子",navigationStyle:"custom"},"pages/tabbar/mine/mine":{navigationBarTitleText:"我的",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"},"pages/searchDetails/searchDetails":{navigationBarTitleText:"搜索",navigationStyle:"custom"},"pages/cargoDetail/cargoDetail":{navigationBarTitleText:"干货详情",navigationStyle:"custom"},"pages/teacherDetail/teacherDetail":{navigationBarTitleText:"讲师详情",navigationStyle:"custom"},"pages/userinfo/userinfo":{navigationBarTitleText:"个人资料",navigationStyle:"custom"},"pages/aboutUs/aboutUs":{navigationBarTitleText:"关于我们",navigationStyle:"custom"},"pages/feedback/feedback":{navigationBarTitleText:"意见反馈",navigationStyle:"custom"},"pages/buyLesson/buyLesson":{navigationBarTitleText:"购买课程",navigationStyle:"custom"},"pages/partiPost/partiPost":{navigationBarTitleText:"参与帖子",navigationStyle:"custom"},"pages/questionDetail/questionDetail":{navigationBarTitleText:"帖子详情",navigationStyle:"custom"},"pages/payOrder/payOrder":{navigationBarTitleText:"支付",navigationStyle:"custom"}},globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"}};n.default=a},3322:function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.go=i,n.usersave=n.topay=n.order=n.buy=n.purchase=n.openid=n.userinfo=n.suggestion=n.mydata=n.bannerpost=n.about=n.phone=n.comment=n.videodeta=n.video=n.issue=n.postdeta=n.searchvideo=n.post=n.banner=void 0;var o=a(t("f499")),r=t("0538");function i(e,n){n?(n=(0,o.default)(n),uni.navigateTo({url:"/pages/"+e+"/"+e+"?data="+n})):uni.navigateTo({url:"/pages/"+e+"/"+e})}var s=function(e){return r.http.post("banner/index",e||{})};n.banner=s;var u=function(e){return r.http.post("video/post",e||{})};n.post=u;var c=function(e){return r.http.post("video/search_video",e||{})};n.searchvideo=c;var l=function(e){return r.http.post("video/postdeta",e||{})};n.postdeta=l;var g=function(e){return r.http.post("video/issue",e||{})};n.issue=g;var d=function(e){return r.http.post("video/video",e||{})};n.video=d;var p=function(e){return r.http.post("video/videodeta",e||{})};n.videodeta=p;var f=function(e){return r.http.post("video/comment",e||{})};n.comment=f;var y=function(e){return r.http.post("banner/phone",e||{})};n.phone=y;var b=function(e){return r.http.post("banner/about",e||{})};n.about=b;var m=function(e){return r.http.post("banner/post",e||{})};n.bannerpost=m;var h=function(e){return r.http.post("banner/mydata",e||{})};n.mydata=h;var _=function(e){return r.http.post("banner/suggestion",e||{})};n.suggestion=_;var v=function(e){return r.http.post("banner/user_info",e||{})};n.userinfo=v;var C=function(e){return r.http.post("banner/openid",e||{})};n.openid=C;var T=function(e){return r.http.post("banner/purchase",e||{})};n.purchase=T;var S=function(e){return r.http.post("video/buy",e||{})};n.buy=S;var D=function(e){return r.http.post("video/order",e||{})};n.order=D;var x=function(e){return r.http.post("video/to_pay",e||{})};n.topay=x;var w=function(e){return r.http.post("banner/user_save",e||{})};n.usersave=w},"356c":function(e,n,t){"use strict";(function(e){var n=t("288e"),a=n(t("5176")),o=n(t("e143"));e["____14021FC____"]=!0,delete e["____14021FC____"],e.__uniConfig={globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},tabBar:{borderStyle:"black",backgroundColor:"#FFFFFF",color:"#333333",selectedColor:"#333333",list:[{pagePath:"pages/tabbar/search/search",iconPath:"static/tabbar/taba1.png",selectedIconPath:"static/tabbar/taba2.png",text:"搜索",redDot:!1,badge:""},{pagePath:"pages/tabbar/question/question",iconPath:"static/tabbar/tabb1.png",selectedIconPath:"static/tabbar/tabb2.png",text:"问答",redDot:!1,badge:""},{pagePath:"pages/tabbar/drycargo/drycargo",iconPath:"static/tabbar/tabc1.png",selectedIconPath:"static/tabbar/tabc2.png",text:"干货",redDot:!1,badge:""},{pagePath:"pages/tabbar/mine/mine",iconPath:"static/tabbar/tabd1.png",selectedIconPath:"static/tabbar/tabd2.png",text:"我的",redDot:!1,badge:""}]}},e.__uniConfig.router={mode:"hash",base:"/"},e.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:3e3},e.__uniConfig.debug=!1,e.__uniConfig.networkTimeout={request:6e3,connectSocket:6e3,uploadFile:6e3,downloadFile:6e3},e.__uniConfig.sdkConfigs={},e.__uniConfig.qqMapKey="XVXBZ-NDMC4-JOGUS-XGIEE-QVHDZ-AMFV2",e.__uniConfig.nvue={"flex-direction":"column"},o.default.component("pages-tabbar-search-search",function(e){var n={component:t.e("pages-tabbar-search-search").then(function(){return e(t("ef27"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-login-login",function(e){var n={component:t.e("pages-login-login").then(function(){return e(t("31d9"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-question-question",function(e){var n={component:t.e("pages-tabbar-question-question").then(function(){return e(t("3c6e"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-drycargo-drycargo",function(e){var n={component:t.e("pages-tabbar-drycargo-drycargo").then(function(){return e(t("3b16"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-release-release",function(e){var n={component:t.e("pages-tabbar-release-release").then(function(){return e(t("9932"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-mine-mine",function(e){var n={component:t.e("pages-tabbar-mine-mine").then(function(){return e(t("6d8f"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-searchDetails-searchDetails",function(e){var n={component:t.e("pages-searchDetails-searchDetails").then(function(){return e(t("4d92"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-cargoDetail-cargoDetail",function(e){var n={component:Promise.all([t.e("pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail"),t.e("pages-cargoDetail-cargoDetail")]).then(function(){return e(t("0c29"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-teacherDetail-teacherDetail",function(e){var n={component:t.e("pages-teacherDetail-teacherDetail").then(function(){return e(t("b00e"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-userinfo-userinfo",function(e){var n={component:t.e("pages-userinfo-userinfo").then(function(){return e(t("d13d"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-aboutUs-aboutUs",function(e){var n={component:t.e("pages-aboutUs-aboutUs").then(function(){return e(t("e582"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-feedback-feedback",function(e){var n={component:t.e("pages-feedback-feedback").then(function(){return e(t("b75c"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-buyLesson-buyLesson",function(e){var n={component:t.e("pages-buyLesson-buyLesson").then(function(){return e(t("c589"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-partiPost-partiPost",function(e){var n={component:t.e("pages-partiPost-partiPost").then(function(){return e(t("93e6"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-questionDetail-questionDetail",function(e){var n={component:Promise.all([t.e("pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail"),t.e("pages-questionDetail-questionDetail")]).then(function(){return e(t("0553"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-payOrder-payOrder",function(e){var n={component:t.e("pages-payOrder-payOrder").then(function(){return e(t("5404"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),e.__uniRoutes=[{path:"/",alias:"/pages/tabbar/search/search",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0},__uniConfig.globalStyle,{navigationBarTitleText:"搜索",navigationStyle:"custom"})},[e("pages-tabbar-search-search",{slot:"page"})])}},meta:{id:1,name:"pages-tabbar-search-search",isNVue:!1,pagePath:"pages/tabbar/search/search",isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0,windowTop:0}},{path:"/pages/login/login",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"登录",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"})},[e("pages-login-login",{slot:"page"})])}},meta:{name:"pages-login-login",isNVue:!1,pagePath:"pages/login/login",windowTop:0}},{path:"/pages/tabbar/question/question",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:1},__uniConfig.globalStyle,{navigationBarTitleText:"问答",navigationStyle:"custom"})},[e("pages-tabbar-question-question",{slot:"page"})])}},meta:{id:2,name:"pages-tabbar-question-question",isNVue:!1,pagePath:"pages/tabbar/question/question",isQuit:!0,isTabBar:!0,tabBarIndex:1,windowTop:0}},{path:"/pages/tabbar/drycargo/drycargo",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:2},__uniConfig.globalStyle,{navigationBarTitleText:"干货",navigationStyle:"custom"})},[e("pages-tabbar-drycargo-drycargo",{slot:"page"})])}},meta:{id:3,name:"pages-tabbar-drycargo-drycargo",isNVue:!1,pagePath:"pages/tabbar/drycargo/drycargo",isQuit:!0,isTabBar:!0,tabBarIndex:2,windowTop:0}},{path:"/pages/tabbar/release/release",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"发布帖子",navigationStyle:"custom"})},[e("pages-tabbar-release-release",{slot:"page"})])}},meta:{name:"pages-tabbar-release-release",isNVue:!1,pagePath:"pages/tabbar/release/release",windowTop:0}},{path:"/pages/tabbar/mine/mine",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:3},__uniConfig.globalStyle,{navigationBarTitleText:"我的",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"})},[e("pages-tabbar-mine-mine",{slot:"page"})])}},meta:{id:4,name:"pages-tabbar-mine-mine",isNVue:!1,pagePath:"pages/tabbar/mine/mine",isQuit:!0,isTabBar:!0,tabBarIndex:3,windowTop:0}},{path:"/pages/searchDetails/searchDetails",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"搜索",navigationStyle:"custom"})},[e("pages-searchDetails-searchDetails",{slot:"page"})])}},meta:{name:"pages-searchDetails-searchDetails",isNVue:!1,pagePath:"pages/searchDetails/searchDetails",windowTop:0}},{path:"/pages/cargoDetail/cargoDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"干货详情",navigationStyle:"custom"})},[e("pages-cargoDetail-cargoDetail",{slot:"page"})])}},meta:{name:"pages-cargoDetail-cargoDetail",isNVue:!1,pagePath:"pages/cargoDetail/cargoDetail",windowTop:0}},{path:"/pages/teacherDetail/teacherDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"讲师详情",navigationStyle:"custom"})},[e("pages-teacherDetail-teacherDetail",{slot:"page"})])}},meta:{name:"pages-teacherDetail-teacherDetail",isNVue:!1,pagePath:"pages/teacherDetail/teacherDetail",windowTop:0}},{path:"/pages/userinfo/userinfo",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"个人资料",navigationStyle:"custom"})},[e("pages-userinfo-userinfo",{slot:"page"})])}},meta:{name:"pages-userinfo-userinfo",isNVue:!1,pagePath:"pages/userinfo/userinfo",windowTop:0}},{path:"/pages/aboutUs/aboutUs",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"关于我们",navigationStyle:"custom"})},[e("pages-aboutUs-aboutUs",{slot:"page"})])}},meta:{name:"pages-aboutUs-aboutUs",isNVue:!1,pagePath:"pages/aboutUs/aboutUs",windowTop:0}},{path:"/pages/feedback/feedback",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"意见反馈",navigationStyle:"custom"})},[e("pages-feedback-feedback",{slot:"page"})])}},meta:{name:"pages-feedback-feedback",isNVue:!1,pagePath:"pages/feedback/feedback",windowTop:0}},{path:"/pages/buyLesson/buyLesson",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"购买课程",navigationStyle:"custom"})},[e("pages-buyLesson-buyLesson",{slot:"page"})])}},meta:{name:"pages-buyLesson-buyLesson",isNVue:!1,pagePath:"pages/buyLesson/buyLesson",windowTop:0}},{path:"/pages/partiPost/partiPost",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"参与帖子",navigationStyle:"custom"})},[e("pages-partiPost-partiPost",{slot:"page"})])}},meta:{name:"pages-partiPost-partiPost",isNVue:!1,pagePath:"pages/partiPost/partiPost",windowTop:0}},{path:"/pages/questionDetail/questionDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"帖子详情",navigationStyle:"custom"})},[e("pages-questionDetail-questionDetail",{slot:"page"})])}},meta:{name:"pages-questionDetail-questionDetail",isNVue:!1,pagePath:"pages/questionDetail/questionDetail",windowTop:0}},{path:"/pages/payOrder/payOrder",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"支付",navigationStyle:"custom"})},[e("pages-payOrder-payOrder",{slot:"page"})])}},meta:{name:"pages-payOrder-payOrder",isNVue:!1,pagePath:"pages/payOrder/payOrder",windowTop:0}},{path:"/preview-image",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-preview-image",{slot:"page"})])}},meta:{name:"preview-image",pagePath:"/preview-image"}},{path:"/choose-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-choose-location",{slot:"page"})])}},meta:{name:"choose-location",pagePath:"/choose-location"}},{path:"/open-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-open-location",{slot:"page"})])}},meta:{name:"open-location",pagePath:"/open-location"}}]}).call(this,t("c8ba"))},"42e7":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("a4bb"));t("ac6a");var r=a(t("f499")),i=a(t("cebc")),s=a(t("795b"));t("96cf");var u=a(t("3b8d")),c=a(t("d225")),l=a(t("b0b4")),g=a(t("bd86")),d=function(){function e(){var n=this;(0,c.default)(this,e),(0,g.default)(this,"config",{baseUrl:"",header:{"content-type":"application/json;charset=UTF-8"},method:"GET",dataType:"json",responseType:"text"}),(0,g.default)(this,"interceptor",{request:function(e){e&&(n.requestBeforeFun=e)},response:function(e,t){e&&t&&(n.requestComFun=e,n.requestComFail=t)}})}return(0,l.default)(e,[{key:"requestBeforeFun",value:function(e){return e}},{key:"requestComFun",value:function(e){return e}},{key:"requestComFail",value:function(e){return e}},{key:"validateStatus",value:function(e){return 200===e}},{key:"setConfig",value:function(e){this.config=e(this.config)}},{key:"request",value:function(){var n=(0,u.default)(regeneratorRuntime.mark(function n(){var t,a=this,o=arguments;return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},t.baseUrl=this.config.baseUrl,t.dataType=t.dataType||this.config.dataType,t.responseType=t.responseType||this.config.responseType,t.url=t.url||"",t.data=t.data||{},t.params=t.params||{},t.header=t.header||this.config.header,t.method=t.method||this.config.method,n.abrupt("return",new s.default(function(n,o){var s=!0,u={};t.complete=function(e){e.config=u,a.validateStatus(e.statusCode)?(e=a.requestComFun(e),n(e)):(e=a.requestComFail(e),o(e))};var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"handle cancel",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,a={errMsg:e,config:n};o(a),s=!1};u=(0,i.default)({},a.requestBeforeFun(t,c));var l=(0,i.default)({},u);if(s){var g=e.posUrl(t.url)?t.url:t.baseUrl+t.url;if("{}"!==(0,r.default)(t.params)){var d=e.addQueryString(t.params);g+=-1===g.indexOf("?")?"?".concat(d):"&".concat(d)}l.url=g,uni.request(l)}}));case 10:case"end":return n.stop()}},n,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"get",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request((0,i.default)({url:e,method:"GET"},n))}},{key:"post",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"POST"},t))}},{key:"put",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"PUT"},t))}},{key:"delete",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"DELETE"},t))}},{key:"connect",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"CONNECT"},t))}},{key:"head",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"HEAD"},t))}},{key:"options",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"OPTIONS"},t))}},{key:"trace",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"TRACE"},t))}},{key:"upload",value:function(n,t){var a=this,o=t.filePath,r=t.name,u=t.header,c=t.formData;return new s.default(function(t,s){var l=!0,g={},d={baseUrl:a.config.baseUrl,url:n,filePath:o,method:"UPLOAD",name:r,header:u||a.config.header,formData:c,complete:function(e){e.config=g,200===e.statusCode?(e=a.requestComFun(e),t(e)):(e=a.requestComFail(e),s(e))}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"handle cancel",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,t={errMsg:e,config:n};s(t),l=!1};g=(0,i.default)({},a.requestBeforeFun(d,p));var f=(0,i.default)({},g);l&&(f.url=e.posUrl(n)?n:a.config.baseUrl+n,uni.uploadFile(f))})}}],[{key:"posUrl",value:function(e){return/(http|https):\/\/([\w.]+\/?)\S*/.test(e)}},{key:"addQueryString",value:function(e){var n="";return(0,o.default)(e).forEach(function(t){n+=t+"="+e[t]+"&"}),n.substring(0,n.length-1)}}]),e}();n.default=d},"48a2":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("e143")),r=a(t("2f62"));o.default.use(r.default);var i=new r.default.Store({state:{hasLogin:!1,userInfo:{},address:{},coords:{},isWeixin:"",openid:""},mutations:{login:function(e,n){e.hasLogin=!0,e.userInfo=n,uni.setStorage({key:"userInfo",data:n})},logout:function(e){e.hasLogin=!1,e.userInfo={},uni.removeStorage({key:"userInfo"})},addressinfo:function(e,n){e.address=n,uni.setStorage({key:"address",data:n})},coordsinfo:function(e,n){e.coords=n,uni.setStorage({key:"coords",data:n})},isweixin:function(e,n){console.log(n),e.isWeixin=n},setopenid:function(e,n){e.openid=n,uni.setStorage({key:"openid",data:n})}},actions:{}}),s=i;n.default=s},"56c3":function(e,n,t){var a=t("ef9f");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=t("4f06").default;o("0afb4e03",a,!0,{sourceMap:!1,shadowMode:!1})},"6e05":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={appid:"__UNI__14021FC"};n.default=a},9578:function(e,n,t){"use strict";var a=t("56c3"),o=t.n(a);o.a},ac83:function(e,n,t){"use strict";var a,o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("App",{attrs:{keepAliveInclude:e.keepAliveInclude}})},r=[];t.d(n,"b",function(){return o}),t.d(n,"c",function(){return r}),t.d(n,"a",function(){return a})},b90f:function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("795b"));t("6762");var r=["133","149","153","173","177","180","181","189","199","130","131","132","145","155","156","166","171","175","176","185","186","166","134","135","136","137","138","139","147","150","151","152","157","158","159","172","178","182","183","184","187","188","198"],i=function(e){return 11===e.length&&r.includes(e.slice(0,3))},s=function(e){return new o.default(function(n,t){var a=newTestPhone(e+"");a?n(a):(uni.toast({title:"手机号格式不正确",icon:"none"}),t(a))})},u=function(e){var n=e.title,t=e.icon,a=void 0===t?"success":t,r=e.duration,i=void 0===r?1500:r;return new o.default(function(e,t){uni.showToast({title:n,icon:a,duration:i,success:function(){setTimeout(function(){e()},i)},fail:function(){t()}})})},c={test_phone:i,verifyPhone:s,toast:u};n.default=c},bc27:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};n.default=a},ef9f:function(e,n,t){n=e.exports=t("2350")(!1),n.push([e.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n/*每个页面公共css */.container{font-size:%?30?%}.flex{display:-webkit-box;display:-webkit-flex;display:flex}.flex1{-webkit-box-flex:1;-webkit-flex:1;flex:1}.fdc{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.jcsb{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.jcc{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.jcfe{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.aic{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.por{position:relative}.pof{position:fixed}.poa{position:absolute}.tac{text-align:center}.line{width:100%;height:%?16?%;background-color:#f7f7f7}.bxsbb{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ellipsiss{\r\n\t/* width: 300upx; */overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.nodata{padding:%?100?%;text-align:center}.ylf-button{margin:%?200?% auto;width:%?611?%;height:%?98?%;line-height:%?98?%;border-radius:%?98?%;font-size:$y-fs40;text-align:center;color:#fff;background-color:#60abfc}",""])}}); ```
进不去第三个for循环 print("2")都输出不了
pyhton代码 ``` import time import re import codecs from selenium import webdriver from pony.orm import * db = Database() class Star(db.Entity): id = PrimaryKey(int, column='id', auto=True) name = Optional(str, column='name') gender = Optional(str, column='gender') href = Optional(str, column='href') year = Optional(int, column='year') month = Optional(int, column='month') day = Optional(int, column='day') xz = Optional(str, column='xz') html = Optional(str, column='html') address = Optional(str, column='address') height = Optional(int, column='height') # db.generate_mapping() time.sleep(1) db.bind(provider = 'sqlite', filename = 'e:/python/star.sqlite') db.generate_mapping(create_tables = True) set_sql_debug(True) #打开网页 driver = webdriver.Chrome() url = 'https://www.baidu.com/s?wd=%E6%98%8E%E6%98%9F&rsv_spt=1&rsv_iqid=0xbe4b76860031fb66&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=&tn=baiduhome_pg&ch=&rsv_enter=1&rsv_dl=ib&inputT=2978' driver.get(url) #点击女 driver.find_element_by_xpath("//div[@id='1']/div/div/div/div[2]/p/span[4]").click() #点击内地 driver.find_element_by_xpath("//div[@id='1']/div/div/div/div[2]/p[2]/span[3]").click() time.sleep(1) f1 = True while f1 == True: html = driver.page_source reobj = re.compile(r'<p class="c-gap-top-small"><a href="([\d\D]*?)" title="(.{1,20})" target="_blank">[\d\D]*?</a></p>')#采集每个明星的href for match in reobj.finditer(html): hrefs = match.group(1) driver2 = webdriver.Chrome() url2 = 'https://www.baidu.com' + hrefs driver2.get(url2)#打开浏览器进入明星的链接 names = match.group(2) html2 = driver2.page_source reobj4 = re.compile(r"""<div class="result-op c-container xpath-log" srcid="1547"[\d\D]*?<h3 class="t c-gap-bottom-small"> <a href="([\d\D]*?)" target="_blank"><em>.{1,30}</em>_(.{4})</a> </h3>""") for match4 in reobj4.finditer(html2): if match4.group(2) == "百度百科":#判断点击改明星链接之后是否有该明星的百度百科 driver3 = webdriver.Chrome() url3 = match4.group(1) driver2.quit()#关闭明星链接的浏览器 driver3.get(url3)#进入明星百度百科的链接 time.sleep(1) html3 = driver3.page_source reobj3 = re.compile(r"""<dt class="basicInfo-item name">星&nbsp;&nbsp;&nbsp;&nbsp;座</dt> <dd class="basicInfo-item value"> ([\d\D]*?) </dd> <dt class="basicInfo-item name">血&nbsp;&nbsp;&nbsp;&nbsp;型</dt> <dd class="basicInfo-item value"> A型 </dd> <dt class="basicInfo-item name">[\d\D]*? <dd class="basicInfo-item value"> ([\d\D]*?) </dd> [\d\D]*?ss="basicInfo-item name">出生地</dt> <dd class="basicInfo-item value"> ([\d\D]*?) </dd> <dt class="basicInfo-item name">出生日期</dt> <dd class="basicInfo-item value"> ([\d\D]*?)年([\d\D]*?)月([\d\D]*?)日[\d\D]*?</dd>""") for match3 in reobj3.finditer(html3): print("2") #新增一条数据 s = Star(name = names,gender = "女",href = hrefs,year = match3.group(6),month = match3.group(7),day = match3.group(8),xz = match3.group(1),html = html3,address = match3.group(5),height = match3.group(3)) db.commit() driver3.quit()#关闭明星百度百科链接的浏览器 #判断下一页按钮是否存在,若存在则点击下一页 list = [] reobj2 = re.compile(r'<span class="opui-page-next OP_LOG_BTN" style="display: ([\d\D]*?)">下一页</span>') for match2 in reobj2.finditer(html): list.append(match2.group(1)) if len(list)>0: f1 = False else: driver.find_element_by_xpath("//div[@id='1']/div/div/div[2]/div[2]/p/span[6]").click()#点击下一页 time.sleep(1) f.close() ```
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
我在支付宝花了1分钟,查到了女朋友的开房记录!
在大数据时代下,不管你做什么都会留下蛛丝马迹,只要学会把各种软件运用到极致,捉奸简直轻而易举。今天就来给大家分享一下,什么叫大数据抓出轨。据史料证明,马爸爸年轻时曾被...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
20道你必须要背会的微服务面试题,面试一定会被问到
写在前面: 在学习springcloud之前大家一定要先了解下,常见的面试题有那块,然后我们带着问题去学习这个微服务技术,那么就会更加理解springcloud技术。如果你已经学了springcloud,那么在准备面试的时候,一定要看看看这些面试题。 文章目录1、什么是微服务?2、微服务之间是如何通讯的?3、springcloud 与dubbo有哪些区别?4、请谈谈对SpringBoot 和S...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
最全最强!世界大学计算机专业排名总结!
我正在参与CSDN200进20,希望得到您的支持,扫码续投票5次。感谢您! (为表示感谢,您投票后私信我,我把我总结的人工智能手推笔记和思维导图发送给您,感谢!) 目录 泰晤士高等教育世界大学排名 QS 世界大学排名 US News 世界大学排名 世界大学学术排名(Academic Ranking of World Universities) 泰晤士高等教育世界大学排名 中国共...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
使用 Python 和百度语音识别生成视频字幕
文章目录从视频中提取音频根据静音对音频分段使用百度语音识别获取 Access Token使用 Raw 数据进行合成生成字幕总结 从视频中提取音频 安装 moviepy pip install moviepy 相关代码: audio_file = work_path + '\\out.wav' video = VideoFileClip(video_file) video.audio.write_...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
那个在阿里养猪的工程师,5年了……
简介: 在阿里,走过1825天,没有趴下,依旧斗志满满,被称为“五年陈”。他们会被授予一枚戒指,过程就叫做“授戒仪式”。今天,咱们听听阿里的那些“五年陈”们的故事。 下一个五年,猪圈见! 我就是那个在养猪场里敲代码的工程师,一年多前我和20位工程师去了四川的猪场,出发前总架构师慷慨激昂的说:同学们,中国的养猪产业将因为我们而改变。但到了猪场,发现根本不是那么回事:要个WIFI,没有;...
为什么程序猿都不愿意去外包?
分享外包的组织架构,盈利模式,亲身经历,以及根据一些外包朋友的反馈,写了这篇文章 ,希望对正在找工作的老铁有所帮助
Java校招入职华为,半年后我跑路了
何来 我,一个双非本科弟弟,有幸在 19 届的秋招中得到前东家华为(以下简称 hw)的赏识,当时秋招签订就业协议,说是入了某 java bg,之后一系列组织架构调整原因等等让人无法理解的神操作,最终毕业前夕,被通知调往其他 bg 做嵌入式开发(纯 C 语言)。 由于已至于校招末尾,之前拿到的其他 offer 又无法再收回,一时感到无力回天,只得默默接受。 毕业后,直接入职开始了嵌入式苦旅,由于从未...
世界上有哪些代码量很少,但很牛逼很经典的算法或项目案例?
点击上方蓝字设为星标下面开始今天的学习~今天分享四个代码量很少,但很牛逼很经典的算法或项目案例。1、no code 项目地址:https://github.com/kelseyhight...
Python全栈 Linux基础之3.Linux常用命令
Linux对文件(包括目录)有很多常用命令,可以加快开发效率:ls是列出当前目录下的文件列表,选项有-a、-l、-h,还可以使用通配符;c功能是跳转目录,可以使用相对路径和绝对路径;mkdir命令创建一个新的目录,有-p选项,rm删除文件或目录,有-f、-r选项;cp用于复制文件,有-i、-r选项,tree命令可以将目录结构显示出来(树状显示),有-d选项,mv用来移动文件/目录,有-i选项;cat查看文件内容,more分屏显示文件内容,grep搜索内容;>、>>将执行结果重定向到一个文件;|用于管道输出。
立即提问