|
@@ -7,6 +7,15 @@ $(window).on('resize', function () {
|
|
|
window.location.reload();
|
|
|
});
|
|
|
|
|
|
+function getUrlParam(name) {
|
|
|
+ var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
|
+ var r = decodeURIComponent(window.location.search).substr(1).match(reg);
|
|
|
+ if (r != null) {
|
|
|
+ return (r[2])
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+}
|
|
|
+
|
|
|
//美业资料库列表
|
|
|
var beautyArchive = new Vue({
|
|
|
el: '#beautyArchive',
|
|
@@ -46,9 +55,12 @@ var beautyArchive = new Vue({
|
|
|
if (val) return;
|
|
|
this.openSearch = false;
|
|
|
this.listQuery.keyword = '';
|
|
|
- this.getList();
|
|
|
+ // this.getList();
|
|
|
}
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.keyword = this.listQuery.keyword = getUrlParam('keyword') || ''
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getList();
|
|
|
this.initAuthInputComplete();
|
|
@@ -156,8 +168,8 @@ var beautyArchive = new Vue({
|
|
|
this.listQuery.pageNum = 1;
|
|
|
this.productList = [];
|
|
|
this.openSearch = true;
|
|
|
- this.getList();
|
|
|
- console.log(this.listQuery.keyword);
|
|
|
+ // this.getList();
|
|
|
+ open('/document/beauty-archive.html?keyword=' + this.listQuery.keyword, '_self')
|
|
|
},
|
|
|
//跳转到商品详情
|
|
|
handleToDetail: function (product) {
|