可以掛載多個目錄的,建議你把錯誤貼出來,還有那個'pwd'是當(dāng)前目錄的意思,你把它換成$PWD就可以運(yùn)行了,前提是你當(dāng)前目錄下有config.yml這個文件
個人覺得可能有兩方面原因:
1:沒有設(shè)置src
2.Your player is ready,只是表明video.js做好了準(zhǔn)備,但視頻資源也許因為網(wǎng)速原因,壓根就沒加載,所以this.duration()會為NAN,你可以在loadstart監(jiān)聽中獲取這個時長
mybatis 的話這個可以實現(xiàn)的, 我之前是寫過一個類似的
表結(jié)構(gòu):
CREATE TABLE `admin_menu` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`name` varchar(64) NOT NULL COMMENT '菜單名',
`parent_id` bigint(3) NOT NULL DEFAULT 0 COMMENT '父菜單的id, 如果是父菜單這個值為0',
`url` varchar(500) NOT NULL DEFAULT '' COMMENT '菜單的鏈接',
`icon` varchar(100) NOT NULL DEFAULT '' COMMENT '圖標(biāo)',
`menu_index` bigint(3) NOT NULL DEFAULT 0 COMMENT '展示的順序',
`create_time` datetime NOT NULL COMMENT '創(chuàng)建時間',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新時間',
PRIMARY KEY (`id`),
KEY `uq_id` (`id`),
KEY `uq_parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='管理后臺的菜單';
其中parentId 跟你的typeParent類似, 記錄上一級的id
AdminMenu (Model):
public class AdminMenu implements Serializable {
private static final long serialVersionUID = -6535315608269812875L;
private int id;
private String name;
private int parentId;
private String url;
private String icon;
private int menuIndex;
private Date createTime;
private Date updateTime;
private List<AdminMenu> subMenus;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getParentId() {
return parentId;
}
public void setParentId(int parentId) {
this.parentId = parentId;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public int getMenuIndex() {
return menuIndex;
}
public void setMenuIndex(int menuIndex) {
this.menuIndex = menuIndex;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public List<AdminMenu> getSubMenus() {
return subMenus;
}
public void setSubMenus(List<AdminMenu> subMenus) {
this.subMenus = subMenus;
}
@Override
public String toString() {
return JsonUtil.toJson(this);
}
}
Model的屬性跟表結(jié)構(gòu)一一對應(yīng), 最下面多了一個subMenu, 里面就是AdminMenu
下面是admin_menu.xml中的內(nèi)容
查詢SQL:
<select id="selectAllMenus" resultMap="adminMenuResult">
SELECT
id, name, parent_id, url, icon, menu_index, create_time, update_time
FROM
admin_menu
WHERE parent_id=0
ORDER BY menu_index
</select>
這里返回的就是adminMenuResult結(jié)果集:
<resultMap id="adminMenuResult" type="biz.menzil.admin.core.model.AdminMenu">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="parent_id" property="parentId"/>
<result column="url" property="url"/>
<result column="icon" property="icon"/>
<result column="menu_index" property="menuIndex"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<association property="subMenus" column="id" select="selectSubMenus"/>
</resultMap>
其中這一行是最重要的
<association property="subMenus" column="id" select="selectSubMenus"/>
這里用selectSubMenus來進(jìn)行了另一個查詢, 查詢的參數(shù)為id, 把查詢出來的結(jié)果放在Model中的subMenus屬性中.
selectSubMenus查詢SQL:
<select id="selectSubMenus" parameterType="long" resultMap="adminSubMenuResult">
select
id, name, parent_id, url, icon, menu_index, create_time, update_time
from admin_menu
where parent_id = #{id}
order by menu_index
</select>
這里就是用第一層的id來查詢有沒有子菜單. 這里的#{id}就是上面那個結(jié)果集的column參數(shù).
因為我只有兩層菜單, 所以這里用了一個新的結(jié)果集,跟上面的區(qū)別就是沒有subMenus字段.
adminSubMenuResult:
<resultMap id="adminSubMenuResult" type="biz.menzil.admin.core.model.AdminMenu">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="parent_id" property="parentId"/>
<result column="url" property="url"/>
<result column="icon" property="icon"/>
<result column="menu_index" property="menuIndex"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
如果你有三,四級的話你可以一個結(jié)果集. (第一層查詢的時候用id去查詢第二層, 第二層查詢的時候用第二層的id去查詢第三層...)
下面我貼一下整個的admin_menu.xml
<?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">
<mapper namespace="biz.menzil.admin.core.dao.AdminMenuDao">
<resultMap id="adminMenuResult" type="biz.menzil.admin.core.model.AdminMenu">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="parent_id" property="parentId"/>
<result column="url" property="url"/>
<result column="icon" property="icon"/>
<result column="menu_index" property="menuIndex"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<association property="subMenus" column="id" select="selectSubMenus"/>
</resultMap>
<resultMap id="adminSubMenuResult" type="biz.menzil.admin.core.model.AdminMenu">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="parent_id" property="parentId"/>
<result column="url" property="url"/>
<result column="icon" property="icon"/>
<result column="menu_index" property="menuIndex"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<insert id="insertAdminMenu">
INSERT INTO admin_menu(name, parent_id, url, icon, menu_index, create_time)
VALUES (
#{menu.name},
#{menu.parentId},
#{menu.url},
#{menu.icon},
#{menu.menuIndex},
NOW()
)
</insert>
<select id="selectById" resultMap="adminMenuResult">
SELECT
id, name, parent_id, url, icon, menu_index, create_time, update_time
FROM
admin_menu
WHERE id = #{id}
</select>
<select id="selectAllMenus" resultMap="adminMenuResult">
SELECT
id, name, parent_id, url, icon, menu_index, create_time, update_time
FROM
admin_menu
WHERE parent_id=0
ORDER BY menu_index
</select>
<select id="selectSubMenus" parameterType="long" resultMap="adminSubMenuResult">
select
id, name, parent_id, url, icon, menu_index, create_time, update_time
from admin_menu
where parent_id = #{id}
order by menu_index
</select>
<delete id="deleteAdminMenu">
DELETE FROM
admin_menu
WHERE id=#{id}
</delete>
<update id="updateAdminMenu" >
UPDATE admin_menu
<set>
<if test="menu.name != null and menu.name != ''">
name=#{menu.name},
</if>
<if test="menu.parentId >= 0">
parent_id=#{menu.parentId},
</if>
<if test="menu.url != null and menu.url != ''">
url=#{menu.url},
</if>
<if test="menu.icon != null and menu.icon != ''">
icon=#{menu.icon},
</if>
<if test="menu.menuIndex > 0">
menu_index=#{menu.menuIndex},
</if>
</set>
WHERE id=#{menu.id}
</update>
</mapper>可以給你要view那個element 一個id,然后用scrollIntoView 這個API:
ex:
document.getElementById('chart').scrollIntoView({block: "end"});
addCart的邏輯有問題。。判斷是否有商品,有就更新數(shù)量,沒有就添加商品。代碼大概如下:
// cartList的結(jié)構(gòu)是這樣:
// [{
// name:"橙汁",
// count:1
// },{
// name:"雪碧",
// count:1
// }]
addCart(newFood) {
//判斷是否購物車中已經(jīng)有商品,如果有就增加數(shù)量,反之加入這個商品
let foodIndex = this.cartList.findIndex(food => food.name == newFood);
//foodIndex為-1表示不存在 ,要加入商品
if (foodIndex === -1) {
cartList.push({
name: newFood,
count: 1
})
//foodIndex存在 ,更新數(shù)據(jù)
} else {
cartList[foodIndex].count++
}
}
同樣你刪除商品時,如果刪除后數(shù)量為0,就從購物車中移除。
ps: 命令規(guī)范點(diǎn)啊,carList我改成cartList了
樓主后來解決了嗎?和你遇到一樣的問題.
使用webrtc是可以的,多人的話最好從服務(wù)端考慮。
在index.html中引入,在componentDidMount()中使用,和原生一樣
寫的很明白,把src交給webpack來處理.
html不能識別webpack中的別名
轉(zhuǎn)換成require,不但可以方便書寫路徑,還能避免相對路徑在打包后錯誤的情況
這些被require的文件還會經(jīng)過各自的loader處理,例如小圖片轉(zhuǎn)base64
其實composer加載只是一種方式。
你可以直接下載Yii2的代碼包,然后拿出里面的 framework 出來用。
通過babel轉(zhuǎn)義的代碼看出來應(yīng)該是原型繼承
class A {
constructor(a) {
this.a = a;
}
getA() {
console.log(a)
}
}
class B extends A {
constructor(b) {
super()
this.b = b;
}
}
轉(zhuǎn)義后
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var A = function () {
function A(a) {
_classCallCheck(this, A);
this.a = a;
}
_createClass(A, [{
key: "getA",
value: function getA() {
console.log(a);
}
}]);
return A;
}();
var B = function (_A) {
_inherits(B, _A);
function B(b) {
_classCallCheck(this, B);
var _this = _possibleConstructorReturn(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this));
_this.b = b;
return _this;
}
return B;
}(A);new Date()是個對象startTime.setDate(startTime.getDate() + 1)這一步操作會修改掉this.searchTime[0]的值。
你應(yīng)該粘一下整個demo的code啊
解決了 ,是密碼寫上了 ,而數(shù)據(jù)庫沒有寫上
你新建一個工程打包下是否成功,如果不成功是你環(huán)境的問題。
也有可能是cordova ionic沒有安裝成功,我以前安裝成功都需要科學(xué)上網(wǎng)的。
你先打印你的parameter,然后傳json格式數(shù)據(jù),后臺$data = $this->input->post("data");
動手把多余的那行刪掉呀。
總不會 API 返回的數(shù)據(jù)就是這樣吧- -
document.forms[0].submit()
試一下
Ubuntu 下編譯你這個程序沒有出現(xiàn)你說的問題
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國制造2025”,實現(xiàn)中華民族偉大復(fù)興的升級產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。