细节优化-0714

master
Lee-1203 2022-07-14 10:00:23 +08:00
parent f984d76d37
commit 514308d783
61 changed files with 143 additions and 83 deletions

View File

@ -105,7 +105,9 @@
methods: {
//
getUserInfo(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/user/info').then(res=>{
if(res.code==0) {
this.businessId = res.data.business_id;

View File

@ -197,7 +197,9 @@
},
//
getArticleList(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
let params = {
page:this.page,
size:this.size,
@ -211,7 +213,7 @@
let obj = {
id:item.id,
title:item.title,
time:this.dateFormat(item.published_at),
time:this.dateFormat(item.published_at.replace(/-/g,'/')),
src:item.cover
}
newArr.push(obj)

View File

@ -125,7 +125,9 @@
methods: {
//
getKitDetail(id){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
if(res.code==0) {
this.kitDetail = res.data.detail; //

View File

@ -101,7 +101,9 @@
methods: {
//
getKitEv(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
let params = {
page:this.page,
size:this.size,

View File

@ -205,7 +205,9 @@
methods: {
//
getUserInfo(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/user/info').then(res=>{
console.log(res,'用户信息')
if(res.code==0) {

View File

@ -113,7 +113,9 @@
size:this.size
}
if(this.currentIndex == 0){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/spu/collection',params).then(res=>{
if(res.code == 0){
this.total = res.data.total;
@ -145,7 +147,7 @@
id:item.id,
src:item.cover,
title:item.title,
time:this.dateFormat(item.published_at)
time:this.dateFormat(item.published_at.replace(/-/g,'/'))
}
newArr.push(obj)
})

View File

@ -124,12 +124,14 @@
},
//
getDetail(id){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.post('/api/archives/detail',{id:id}).then(res=>{
if(res.code==0) {
console.log(res,'文章详情')
// console.log(res,'')
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)
}
uni.hideLoading();

View File

@ -116,7 +116,9 @@
},
//
getArticleList(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
let params = {
page:this.page,
size:this.size,
@ -130,7 +132,7 @@
let obj = {
id:item.id,
title:item.title,
time:this.dateFormat(item.published_at),
time:this.dateFormat(item.published_at.replace(/-/g,'/')),
src:item.cover
}
newArr.push(obj)

View File

@ -113,7 +113,9 @@
methods: {
//
getOrderDetail(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/user/order-detail',{id:this.id}).then(res=>{
if(res.code==0){
this.orderDetail = res.data;

View File

@ -119,7 +119,9 @@
},
//
getOrderList(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
let params = {
page: this.page,
size: this.size,

View File

@ -179,7 +179,9 @@
},
//
getDetail(id){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
if(res.code==0) {
console.log(res,'详情')

View File

@ -167,7 +167,9 @@
//
getShopList(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.ifLoading = true;
let params = {
page:this.page,

View File

@ -73,7 +73,9 @@
methods: {
//
getAboutData(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/index/about').then(res=>{
if(res.code==0){
this.aboutData = this.$toolAll.tools.escape2Html(res.data.content);

View File

@ -41,7 +41,9 @@
methods: {
//
getDisclaimers(){
uni.showLoading();
uni.showLoading({
title: '加载中'
});
this.$requst.get('/api/index/statement').then(res=>{
if(res.code==0){
this.disclaimers = this.$toolAll.tools.escape2Html(res.data.content);

View File

@ -137,12 +137,8 @@
//
changeKeyword(keyword){
this.keywords =keyword;
let isRequest = uni.getStorageSync('isRequest');
if(isRequest){
this.getSearchList();
this.getHistory();
}
},
//
clearHistory(){
@ -167,6 +163,9 @@
let params = {
keyword:this.keywords
}
uni.showLoading({
title: '加载中'
});
if(this.currentIndex == 0){
this.$requst.get('/api/spu/list',params).then(res=>{
if(res.code == 0){
@ -211,6 +210,7 @@
}
})
}
uni.hideLoading();
},
//
dateFormat (dateData) {

View File

@ -113,7 +113,7 @@
getUserData(){
uni.showLoading();
this.$requst.get('/api/user/info').then(res=>{
console.log(res,'用户信息')
// console.log(res,'')
if(res.code==0) {
this.headImgUrl = res.data.headimgurl;
this.nickName = res.data.nickname;
@ -230,7 +230,9 @@
},
//
uploadImg(){
uni.showLoading();
uni.showLoading({
title: '上传中'
});
this.$requst.upload('/api/file/upload/image',{path:this.headImg}).then(res=>{
if(res.code==0) {
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

View File

@ -263,7 +263,9 @@ var _default = {
methods: {
// 获取用户信息
getUserInfo: function getUserInfo() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/user/info').then(function (res) {
if (res.code == 0) {
_this2.businessId = res.data.business_id;

View File

@ -364,7 +364,9 @@ var _default = {
},
// 获取文章列表
getArticleList: function getArticleList() {var _this5 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
var params = {
page: this.page,
size: this.size,
@ -378,7 +380,7 @@ var _default = {
var obj = {
id: item.id,
title: item.title,
time: _this5.dateFormat(item.published_at),
time: _this5.dateFormat(item.published_at.replace(/-/g, '/')),
src: item.cover };
newArr.push(obj);

View File

@ -296,7 +296,9 @@ var _default = {
methods: {
//查询套件详情
getKitDetail: function getKitDetail(id) {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
if (res.code == 0) {
_this2.kitDetail = res.data.detail; //套件详情

View File

@ -259,7 +259,9 @@ var _default = {
methods: {
// 查询套件列表
getKitEv: function getKitEv() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
var params = {
page: this.page,
size: this.size,

View File

@ -363,7 +363,9 @@ var _default = {
methods: {
// 获取用户信息
getUserInfo: function getUserInfo() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/user/info').then(function (res) {
console.log(res, '用户信息');
if (res.code == 0) {

View File

@ -271,7 +271,9 @@ var _default = {
size: this.size };
if (this.currentIndex == 0) {
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/spu/collection', params).then(function (res) {
if (res.code == 0) {
_this2.total = res.data.total;
@ -303,7 +305,7 @@ var _default = {
id: item.id,
src: item.cover,
title: item.title,
time: _this2.dateFormat(item.published_at) };
time: _this2.dateFormat(item.published_at.replace(/-/g, '/')) };
newArr.push(obj);
});

View File

@ -256,12 +256,14 @@ var _default = {
},
// 查询文章详情
getDetail: function getDetail(id) {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.post('/api/archives/detail', { id: id }).then(function (res) {
if (res.code == 0) {
console.log(res, '文章详情');
// console.log(res,'文章详情')
_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);
}
uni.hideLoading();

View File

@ -280,7 +280,9 @@ var _default = {
},
// 获取疑难解答、行业资讯列表
getArticleList: function getArticleList() {var _this3 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
var params = {
page: this.page,
size: this.size,
@ -294,7 +296,7 @@ var _default = {
var obj = {
id: item.id,
title: item.title,
time: _this3.dateFormat(item.published_at),
time: _this3.dateFormat(item.published_at.replace(/-/g, '/')),
src: item.cover };
newArr.push(obj);

View File

@ -290,7 +290,9 @@ var _default = {
methods: {
// 查询订单详情
getOrderDetail: function getOrderDetail() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {
if (res.code == 0) {
_this2.orderDetail = res.data;

View File

@ -280,7 +280,9 @@ var _default = {
},
// 获取订单列表
getOrderList: function getOrderList() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
var params = {
page: this.page,
size: this.size,

View File

@ -359,7 +359,9 @@ var _default = {
},
//查询商品详情
getDetail: function getDetail(id) {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
if (res.code == 0) {
console.log(res, '详情');

View File

@ -220,7 +220,9 @@ var _default = {
// 查询商品列表
getShopList: function getShopList() {var _this3 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.ifLoading = true;
var params = {
page: this.page,

View File

@ -205,7 +205,9 @@ var _default = {
methods: {
// 查询关于我们
getAboutData: function getAboutData() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/index/about').then(function (res) {
if (res.code == 0) {
_this2.aboutData = _this2.$toolAll.tools.escape2Html(res.data.content);

View File

@ -173,7 +173,9 @@ var _default = {
methods: {
// 查询免责声明
getDisclaimers: function getDisclaimers() {var _this2 = this;
uni.showLoading();
uni.showLoading({
title: '加载中' });
this.$requst.get('/api/index/statement').then(function (res) {
if (res.code == 0) {
_this2.disclaimers = _this2.$toolAll.tools.escape2Html(res.data.content);

View File

@ -295,12 +295,8 @@ var _default = {
// 选择历史搜索
changeKeyword: function changeKeyword(keyword) {
this.keywords = keyword;
var isRequest = uni.getStorageSync('isRequest');
if (isRequest) {
this.getSearchList();
this.getHistory();
}
},
// 清空历史搜索
clearHistory: function clearHistory() {var _this2 = this;
@ -325,6 +321,9 @@ var _default = {
var params = {
keyword: this.keywords };
uni.showLoading({
title: '加载中' });
if (this.currentIndex == 0) {
this.$requst.get('/api/spu/list', params).then(function (res) {
if (res.code == 0) {
@ -369,6 +368,7 @@ var _default = {
}
});
}
uni.hideLoading();
},
// 时间格式转换
dateFormat: function dateFormat(dateData) {

View File

@ -245,7 +245,7 @@ var _default = {
getUserData: function getUserData() {var _this2 = this;
uni.showLoading();
this.$requst.get('/api/user/info').then(function (res) {
console.log(res, '用户信息');
// console.log(res,'用户信息')
if (res.code == 0) {
_this2.headImgUrl = res.data.headimgurl;
_this2.nickName = res.data.nickname;
@ -362,7 +362,9 @@ var _default = {
},
// 上传图片
uploadImg: function uploadImg() {var _this6 = this;
uni.showLoading();
uni.showLoading({
title: '上传中' });
this.$requst.upload('/api/file/upload/image', { path: this.headImg }).then(function (res) {
if (res.code == 0) {
_this6.headImgUrl = _this6.$hostHttp + res.data.src;