细节优化-0714
parent
f984d76d37
commit
514308d783
|
@ -105,7 +105,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
getUserInfo(){
|
getUserInfo(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/user/info').then(res=>{
|
this.$requst.get('/api/user/info').then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
this.businessId = res.data.business_id;
|
this.businessId = res.data.business_id;
|
||||||
|
|
|
@ -197,7 +197,9 @@
|
||||||
},
|
},
|
||||||
// 获取文章列表
|
// 获取文章列表
|
||||||
getArticleList(){
|
getArticleList(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
let params = {
|
let params = {
|
||||||
page:this.page,
|
page:this.page,
|
||||||
size:this.size,
|
size:this.size,
|
||||||
|
@ -211,7 +213,7 @@
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
title:item.title,
|
title:item.title,
|
||||||
time:this.dateFormat(item.published_at),
|
time:this.dateFormat(item.published_at.replace(/-/g,'/')),
|
||||||
src:item.cover
|
src:item.cover
|
||||||
}
|
}
|
||||||
newArr.push(obj)
|
newArr.push(obj)
|
||||||
|
|
|
@ -125,7 +125,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
//查询套件详情
|
//查询套件详情
|
||||||
getKitDetail(id){
|
getKitDetail(id){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
|
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
this.kitDetail = res.data.detail; //套件详情
|
this.kitDetail = res.data.detail; //套件详情
|
||||||
|
|
|
@ -101,7 +101,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 查询套件列表
|
// 查询套件列表
|
||||||
getKitEv(){
|
getKitEv(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
let params = {
|
let params = {
|
||||||
page:this.page,
|
page:this.page,
|
||||||
size:this.size,
|
size:this.size,
|
||||||
|
|
|
@ -205,7 +205,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
getUserInfo(){
|
getUserInfo(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/user/info').then(res=>{
|
this.$requst.get('/api/user/info').then(res=>{
|
||||||
console.log(res,'用户信息')
|
console.log(res,'用户信息')
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
|
|
|
@ -113,7 +113,9 @@
|
||||||
size:this.size
|
size:this.size
|
||||||
}
|
}
|
||||||
if(this.currentIndex == 0){
|
if(this.currentIndex == 0){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/spu/collection',params).then(res=>{
|
this.$requst.get('/api/spu/collection',params).then(res=>{
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
|
@ -145,7 +147,7 @@
|
||||||
id:item.id,
|
id:item.id,
|
||||||
src:item.cover,
|
src:item.cover,
|
||||||
title:item.title,
|
title:item.title,
|
||||||
time:this.dateFormat(item.published_at)
|
time:this.dateFormat(item.published_at.replace(/-/g,'/'))
|
||||||
}
|
}
|
||||||
newArr.push(obj)
|
newArr.push(obj)
|
||||||
})
|
})
|
||||||
|
|
|
@ -124,12 +124,14 @@
|
||||||
},
|
},
|
||||||
// 查询文章详情
|
// 查询文章详情
|
||||||
getDetail(id){
|
getDetail(id){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.post('/api/archives/detail',{id:id}).then(res=>{
|
this.$requst.post('/api/archives/detail',{id:id}).then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
console.log(res,'文章详情')
|
// console.log(res,'文章详情')
|
||||||
this.articleDetail = res.data;
|
this.articleDetail = res.data;
|
||||||
this.time = this.dateFormat(res.data.published_at)
|
this.time = this.dateFormat(res.data.published_at.replace(/-/g,'/'))
|
||||||
this.content = this.$toolAll.tools.escape2Html(res.data.content)
|
this.content = this.$toolAll.tools.escape2Html(res.data.content)
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
@ -116,7 +116,9 @@
|
||||||
},
|
},
|
||||||
// 获取疑难解答、行业资讯列表
|
// 获取疑难解答、行业资讯列表
|
||||||
getArticleList(){
|
getArticleList(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
let params = {
|
let params = {
|
||||||
page:this.page,
|
page:this.page,
|
||||||
size:this.size,
|
size:this.size,
|
||||||
|
@ -130,7 +132,7 @@
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
title:item.title,
|
title:item.title,
|
||||||
time:this.dateFormat(item.published_at),
|
time:this.dateFormat(item.published_at.replace(/-/g,'/')),
|
||||||
src:item.cover
|
src:item.cover
|
||||||
}
|
}
|
||||||
newArr.push(obj)
|
newArr.push(obj)
|
||||||
|
|
|
@ -113,7 +113,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 查询订单详情
|
// 查询订单详情
|
||||||
getOrderDetail(){
|
getOrderDetail(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/user/order-detail',{id:this.id}).then(res=>{
|
this.$requst.get('/api/user/order-detail',{id:this.id}).then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.orderDetail = res.data;
|
this.orderDetail = res.data;
|
||||||
|
|
|
@ -119,7 +119,9 @@
|
||||||
},
|
},
|
||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
getOrderList(){
|
getOrderList(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
let params = {
|
let params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
|
|
@ -179,7 +179,9 @@
|
||||||
},
|
},
|
||||||
//查询商品详情
|
//查询商品详情
|
||||||
getDetail(id){
|
getDetail(id){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
|
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
console.log(res,'详情')
|
console.log(res,'详情')
|
||||||
|
|
|
@ -167,7 +167,9 @@
|
||||||
|
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
getShopList(){
|
getShopList(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.ifLoading = true;
|
this.ifLoading = true;
|
||||||
let params = {
|
let params = {
|
||||||
page:this.page,
|
page:this.page,
|
||||||
|
|
|
@ -73,7 +73,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 查询关于我们
|
// 查询关于我们
|
||||||
getAboutData(){
|
getAboutData(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/index/about').then(res=>{
|
this.$requst.get('/api/index/about').then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.aboutData = this.$toolAll.tools.escape2Html(res.data.content);
|
this.aboutData = this.$toolAll.tools.escape2Html(res.data.content);
|
||||||
|
|
|
@ -41,7 +41,9 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 查询免责声明
|
// 查询免责声明
|
||||||
getDisclaimers(){
|
getDisclaimers(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
this.$requst.get('/api/index/statement').then(res=>{
|
this.$requst.get('/api/index/statement').then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.disclaimers = this.$toolAll.tools.escape2Html(res.data.content);
|
this.disclaimers = this.$toolAll.tools.escape2Html(res.data.content);
|
||||||
|
|
|
@ -137,12 +137,8 @@
|
||||||
// 选择历史搜索
|
// 选择历史搜索
|
||||||
changeKeyword(keyword){
|
changeKeyword(keyword){
|
||||||
this.keywords =keyword;
|
this.keywords =keyword;
|
||||||
|
this.getSearchList();
|
||||||
let isRequest = uni.getStorageSync('isRequest');
|
this.getHistory();
|
||||||
if(isRequest){
|
|
||||||
this.getSearchList();
|
|
||||||
this.getHistory();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 清空历史搜索
|
// 清空历史搜索
|
||||||
clearHistory(){
|
clearHistory(){
|
||||||
|
@ -167,6 +163,9 @@
|
||||||
let params = {
|
let params = {
|
||||||
keyword:this.keywords
|
keyword:this.keywords
|
||||||
}
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
if(this.currentIndex == 0){
|
if(this.currentIndex == 0){
|
||||||
this.$requst.get('/api/spu/list',params).then(res=>{
|
this.$requst.get('/api/spu/list',params).then(res=>{
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
|
@ -211,6 +210,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
uni.hideLoading();
|
||||||
},
|
},
|
||||||
// 时间格式转换
|
// 时间格式转换
|
||||||
dateFormat (dateData) {
|
dateFormat (dateData) {
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
getUserData(){
|
getUserData(){
|
||||||
uni.showLoading();
|
uni.showLoading();
|
||||||
this.$requst.get('/api/user/info').then(res=>{
|
this.$requst.get('/api/user/info').then(res=>{
|
||||||
console.log(res,'用户信息')
|
// console.log(res,'用户信息')
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
this.headImgUrl = res.data.headimgurl;
|
this.headImgUrl = res.data.headimgurl;
|
||||||
this.nickName = res.data.nickname;
|
this.nickName = res.data.nickname;
|
||||||
|
@ -230,7 +230,9 @@
|
||||||
},
|
},
|
||||||
// 上传图片
|
// 上传图片
|
||||||
uploadImg(){
|
uploadImg(){
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '上传中'
|
||||||
|
});
|
||||||
this.$requst.upload('/api/file/upload/image',{path:this.headImg}).then(res=>{
|
this.$requst.upload('/api/file/upload/image',{path:this.headImg}).then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
this.headImgUrl = this.$hostHttp+res.data.src;
|
this.headImgUrl = this.$hostHttp+res.data.src;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -263,7 +263,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
getUserInfo: function getUserInfo() {var _this2 = this;
|
getUserInfo: function getUserInfo() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/user/info').then(function (res) {
|
this.$requst.get('/api/user/info').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.businessId = res.data.business_id;
|
_this2.businessId = res.data.business_id;
|
||||||
|
|
|
@ -364,7 +364,9 @@ var _default = {
|
||||||
},
|
},
|
||||||
// 获取文章列表
|
// 获取文章列表
|
||||||
getArticleList: function getArticleList() {var _this5 = this;
|
getArticleList: function getArticleList() {var _this5 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
@ -378,7 +380,7 @@ var _default = {
|
||||||
var obj = {
|
var obj = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
time: _this5.dateFormat(item.published_at),
|
time: _this5.dateFormat(item.published_at.replace(/-/g, '/')),
|
||||||
src: item.cover };
|
src: item.cover };
|
||||||
|
|
||||||
newArr.push(obj);
|
newArr.push(obj);
|
||||||
|
|
|
@ -296,7 +296,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
//查询套件详情
|
//查询套件详情
|
||||||
getKitDetail: function getKitDetail(id) {var _this2 = this;
|
getKitDetail: function getKitDetail(id) {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
|
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.kitDetail = res.data.detail; //套件详情
|
_this2.kitDetail = res.data.detail; //套件详情
|
||||||
|
|
|
@ -259,7 +259,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
// 查询套件列表
|
// 查询套件列表
|
||||||
getKitEv: function getKitEv() {var _this2 = this;
|
getKitEv: function getKitEv() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
|
|
@ -363,7 +363,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
getUserInfo: function getUserInfo() {var _this2 = this;
|
getUserInfo: function getUserInfo() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/user/info').then(function (res) {
|
this.$requst.get('/api/user/info').then(function (res) {
|
||||||
console.log(res, '用户信息');
|
console.log(res, '用户信息');
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
|
@ -271,7 +271,9 @@ var _default = {
|
||||||
size: this.size };
|
size: this.size };
|
||||||
|
|
||||||
if (this.currentIndex == 0) {
|
if (this.currentIndex == 0) {
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/spu/collection', params).then(function (res) {
|
this.$requst.get('/api/spu/collection', params).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.total = res.data.total;
|
_this2.total = res.data.total;
|
||||||
|
@ -303,7 +305,7 @@ var _default = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
src: item.cover,
|
src: item.cover,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
time: _this2.dateFormat(item.published_at) };
|
time: _this2.dateFormat(item.published_at.replace(/-/g, '/')) };
|
||||||
|
|
||||||
newArr.push(obj);
|
newArr.push(obj);
|
||||||
});
|
});
|
||||||
|
|
|
@ -256,12 +256,14 @@ var _default = {
|
||||||
},
|
},
|
||||||
// 查询文章详情
|
// 查询文章详情
|
||||||
getDetail: function getDetail(id) {var _this2 = this;
|
getDetail: function getDetail(id) {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.post('/api/archives/detail', { id: id }).then(function (res) {
|
this.$requst.post('/api/archives/detail', { id: id }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '文章详情');
|
// console.log(res,'文章详情')
|
||||||
_this2.articleDetail = res.data;
|
_this2.articleDetail = res.data;
|
||||||
_this2.time = _this2.dateFormat(res.data.published_at);
|
_this2.time = _this2.dateFormat(res.data.published_at.replace(/-/g, '/'));
|
||||||
_this2.content = _this2.$toolAll.tools.escape2Html(res.data.content);
|
_this2.content = _this2.$toolAll.tools.escape2Html(res.data.content);
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
@ -280,7 +280,9 @@ var _default = {
|
||||||
},
|
},
|
||||||
// 获取疑难解答、行业资讯列表
|
// 获取疑难解答、行业资讯列表
|
||||||
getArticleList: function getArticleList() {var _this3 = this;
|
getArticleList: function getArticleList() {var _this3 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
@ -294,7 +296,7 @@ var _default = {
|
||||||
var obj = {
|
var obj = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
title: item.title,
|
title: item.title,
|
||||||
time: _this3.dateFormat(item.published_at),
|
time: _this3.dateFormat(item.published_at.replace(/-/g, '/')),
|
||||||
src: item.cover };
|
src: item.cover };
|
||||||
|
|
||||||
newArr.push(obj);
|
newArr.push(obj);
|
||||||
|
|
|
@ -290,7 +290,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
// 查询订单详情
|
// 查询订单详情
|
||||||
getOrderDetail: function getOrderDetail() {var _this2 = this;
|
getOrderDetail: function getOrderDetail() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {
|
this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.orderDetail = res.data;
|
_this2.orderDetail = res.data;
|
||||||
|
|
|
@ -280,7 +280,9 @@ var _default = {
|
||||||
},
|
},
|
||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
getOrderList: function getOrderList() {var _this2 = this;
|
getOrderList: function getOrderList() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
|
|
@ -359,7 +359,9 @@ var _default = {
|
||||||
},
|
},
|
||||||
//查询商品详情
|
//查询商品详情
|
||||||
getDetail: function getDetail(id) {var _this2 = this;
|
getDetail: function getDetail(id) {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
|
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '详情');
|
console.log(res, '详情');
|
||||||
|
|
|
@ -220,7 +220,9 @@ var _default = {
|
||||||
|
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
getShopList: function getShopList() {var _this3 = this;
|
getShopList: function getShopList() {var _this3 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.ifLoading = true;
|
this.ifLoading = true;
|
||||||
var params = {
|
var params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
|
|
|
@ -205,7 +205,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
// 查询关于我们
|
// 查询关于我们
|
||||||
getAboutData: function getAboutData() {var _this2 = this;
|
getAboutData: function getAboutData() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/index/about').then(function (res) {
|
this.$requst.get('/api/index/about').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.aboutData = _this2.$toolAll.tools.escape2Html(res.data.content);
|
_this2.aboutData = _this2.$toolAll.tools.escape2Html(res.data.content);
|
||||||
|
|
|
@ -173,7 +173,9 @@ var _default = {
|
||||||
methods: {
|
methods: {
|
||||||
// 查询免责声明
|
// 查询免责声明
|
||||||
getDisclaimers: function getDisclaimers() {var _this2 = this;
|
getDisclaimers: function getDisclaimers() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/index/statement').then(function (res) {
|
this.$requst.get('/api/index/statement').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.disclaimers = _this2.$toolAll.tools.escape2Html(res.data.content);
|
_this2.disclaimers = _this2.$toolAll.tools.escape2Html(res.data.content);
|
||||||
|
|
|
@ -295,12 +295,8 @@ var _default = {
|
||||||
// 选择历史搜索
|
// 选择历史搜索
|
||||||
changeKeyword: function changeKeyword(keyword) {
|
changeKeyword: function changeKeyword(keyword) {
|
||||||
this.keywords = keyword;
|
this.keywords = keyword;
|
||||||
|
this.getSearchList();
|
||||||
var isRequest = uni.getStorageSync('isRequest');
|
this.getHistory();
|
||||||
if (isRequest) {
|
|
||||||
this.getSearchList();
|
|
||||||
this.getHistory();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 清空历史搜索
|
// 清空历史搜索
|
||||||
clearHistory: function clearHistory() {var _this2 = this;
|
clearHistory: function clearHistory() {var _this2 = this;
|
||||||
|
@ -325,6 +321,9 @@ var _default = {
|
||||||
var params = {
|
var params = {
|
||||||
keyword: this.keywords };
|
keyword: this.keywords };
|
||||||
|
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中' });
|
||||||
|
|
||||||
if (this.currentIndex == 0) {
|
if (this.currentIndex == 0) {
|
||||||
this.$requst.get('/api/spu/list', params).then(function (res) {
|
this.$requst.get('/api/spu/list', params).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -369,6 +368,7 @@ var _default = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
uni.hideLoading();
|
||||||
},
|
},
|
||||||
// 时间格式转换
|
// 时间格式转换
|
||||||
dateFormat: function dateFormat(dateData) {
|
dateFormat: function dateFormat(dateData) {
|
||||||
|
|
|
@ -245,7 +245,7 @@ var _default = {
|
||||||
getUserData: function getUserData() {var _this2 = this;
|
getUserData: function getUserData() {var _this2 = this;
|
||||||
uni.showLoading();
|
uni.showLoading();
|
||||||
this.$requst.get('/api/user/info').then(function (res) {
|
this.$requst.get('/api/user/info').then(function (res) {
|
||||||
console.log(res, '用户信息');
|
// console.log(res,'用户信息')
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.headImgUrl = res.data.headimgurl;
|
_this2.headImgUrl = res.data.headimgurl;
|
||||||
_this2.nickName = res.data.nickname;
|
_this2.nickName = res.data.nickname;
|
||||||
|
@ -362,7 +362,9 @@ var _default = {
|
||||||
},
|
},
|
||||||
// 上传图片
|
// 上传图片
|
||||||
uploadImg: function uploadImg() {var _this6 = this;
|
uploadImg: function uploadImg() {var _this6 = this;
|
||||||
uni.showLoading();
|
uni.showLoading({
|
||||||
|
title: '上传中' });
|
||||||
|
|
||||||
this.$requst.upload('/api/file/upload/image', { path: this.headImg }).then(function (res) {
|
this.$requst.upload('/api/file/upload/image', { path: this.headImg }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this6.headImgUrl = _this6.$hostHttp + res.data.src;
|
_this6.headImgUrl = _this6.$hostHttp + res.data.src;
|
||||||
|
|
Loading…
Reference in New Issue