代码优化-0715
parent
258c8f1f74
commit
5c4d0efde4
|
@ -63,6 +63,7 @@
|
|||
ifLoading:false,
|
||||
businessId:0, //分类id
|
||||
isTips:false, //是否提示
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -72,7 +73,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getUserInfo();
|
||||
userInfoEv();
|
||||
|
@ -82,9 +88,6 @@
|
|||
this.getUserInfo();
|
||||
userInfoEv();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onReachBottom(e) {
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
totalAll:-1,//总数
|
||||
ifLoading:true,
|
||||
indexTitle:'',//标题
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -98,7 +99,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getHomeData();
|
||||
this.getArticleNav();
|
||||
|
@ -110,8 +116,7 @@
|
|||
this.getArticleNav();
|
||||
this.userInfoEv();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.playTimer = setTimeout(()=>{
|
||||
this.isplay = true;
|
||||
},2000)
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
action:'collect', //收藏类型
|
||||
id:'' ,//套件id
|
||||
vipPrice:false,// 是否显示会员价
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -89,7 +90,13 @@
|
|||
onLoad(op) {
|
||||
if(op !== ''){
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.id = op.id;
|
||||
this.getKitDetail(this.id);
|
||||
|
@ -101,9 +108,7 @@
|
|||
this.getKitDetail(this.id);
|
||||
userInfoEv();
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
if(uni.getStorageSync('business_code')!=='' && uni.getStorageSync('showVip')=='true'){
|
||||
this.vipPrice = true;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
totalAll:-1, //计算总数
|
||||
category_id:0, //分类id
|
||||
sort:'new', //排序
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -66,7 +67,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getKitEv();
|
||||
userInfoEv();
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
flag:true,
|
||||
vipCode:'', //会员码
|
||||
isChecked:false, //验证会员码
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
|
@ -182,7 +183,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getUserInfo();
|
||||
this.getCustomer();
|
||||
|
@ -194,8 +200,7 @@
|
|||
this.getCustomer();
|
||||
userInfoEv();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
if(uni.getStorageSync('showVip')){
|
||||
this.showVip = uni.getStorageSync('showVip');
|
||||
}else{
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
total:0, //总数
|
||||
totalAll:-1, //计算总数
|
||||
isShop:true, //是否商品
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -52,7 +53,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getCollectionList();
|
||||
userInfoEv();
|
||||
|
@ -62,9 +68,6 @@
|
|||
this.getCollectionList();
|
||||
userInfoEv();
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
||||
},
|
||||
onReachBottom(e) {
|
||||
if(this.collectionList.length<this.total){
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
action:'collect', //收藏类型
|
||||
time:'', //发布时间
|
||||
content:'',//文章内容
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -67,7 +68,12 @@
|
|||
onLoad(op) {
|
||||
this.id = op.id;
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getDetail(this.id);
|
||||
userInfoEv();
|
||||
|
@ -78,9 +84,6 @@
|
|||
userInfoEv();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// getNewsDetail()
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage(res) {
|
||||
let path = uni.getStorageSync('page-path-options')+'&business_id='+uni.getStorageSync('business_id');
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
size:10, //查询条数
|
||||
total:0, //总数
|
||||
totalAll:-1,//总数
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -54,7 +55,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getArticleNav();
|
||||
userInfoEv();
|
||||
|
|
|
@ -78,11 +78,17 @@
|
|||
}),
|
||||
startDate: getDate('start'),
|
||||
endDate: getDate('end'),
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getUserInfo()
|
||||
}
|
||||
|
@ -90,9 +96,6 @@
|
|||
}else{
|
||||
this.getUserInfo()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取默认信息
|
||||
|
|
|
@ -78,14 +78,20 @@
|
|||
flag:true,
|
||||
ifLoading:false,
|
||||
id:0, //订单id
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.id !== ''){
|
||||
this.id = op.id;
|
||||
}
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getOrderDetail();
|
||||
userInfoEv();
|
||||
|
|
|
@ -64,7 +64,8 @@
|
|||
totalAll:-1,
|
||||
page: 1,
|
||||
size: 10,
|
||||
tag: 'all'
|
||||
tag: 'all',
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
|
@ -75,7 +76,12 @@
|
|||
this.activeIndex = op.index;
|
||||
}
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getOrderList();
|
||||
userInfoEv();
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
action:'collect', //收藏类型
|
||||
changeBtns:false, //按钮选择
|
||||
vipPrice:false, //显示会员价
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -121,7 +122,13 @@
|
|||
this.source = op.source;
|
||||
this.id = op.id;
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getDetail(this.id);
|
||||
userInfoEv();
|
||||
|
@ -131,9 +138,7 @@
|
|||
this.getDetail(this.id);
|
||||
userInfoEv();
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
if(uni.getStorageSync('business_code')!=='' && uni.getStorageSync('showVip')=='true'){
|
||||
this.vipPrice = true;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
size:10, //数量
|
||||
total:0, //总数
|
||||
totalAll:-1, //计算总数
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -74,7 +75,12 @@
|
|||
this.category_id = op.category_id;
|
||||
this.company_id = op.company_id;
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getShopScreen(); //查询商品分类
|
||||
userInfoEv();
|
||||
|
|
|
@ -41,11 +41,17 @@
|
|||
iconPath: '/static/public/icon-addr.png'
|
||||
}],
|
||||
aboutData:'',
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getAboutData();
|
||||
userInfoEv();
|
||||
|
|
|
@ -23,11 +23,17 @@
|
|||
return {
|
||||
disclaimersHeight: `calc(100vh - ${uni.getSystemInfoSync().statusBarHeight + 50}px)`,
|
||||
disclaimers:'',
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getDisclaimers();
|
||||
userInfoEv();
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
type:'input',
|
||||
placeholder:'', //默认信息
|
||||
headImg:'', //缓存头像链接
|
||||
cacheBusinessId:-1, //商户id
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -95,7 +96,12 @@
|
|||
},
|
||||
onLoad(op) {
|
||||
if(op.business_id){
|
||||
this.$requst.post('/api/index/change-business',{business_id:op.business_id}).then(res=>{
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.cacheBusinessId !== -1){
|
||||
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
|
||||
if(res.code == 0){
|
||||
this.getUserData();
|
||||
userInfoEv();
|
||||
|
@ -106,8 +112,6 @@
|
|||
userInfoEv();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getUserData(){
|
||||
|
|
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
|
@ -220,7 +220,8 @@ var _default = {
|
|||
flag: true,
|
||||
ifLoading: false,
|
||||
businessId: 0, //分类id
|
||||
isTips: false //是否提示
|
||||
isTips: false, //是否提示
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -228,9 +229,14 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getUserInfo();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
@ -240,9 +246,6 @@ var _default = {
|
|||
this.getUserInfo();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
||||
},
|
||||
onReachBottom: function onReachBottom(e) {
|
||||
|
||||
|
|
|
@ -255,7 +255,8 @@ var _default = {
|
|||
total: 0, //数量
|
||||
totalAll: -1, //总数
|
||||
ifLoading: true,
|
||||
indexTitle: '' //标题
|
||||
indexTitle: '', //标题
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -263,9 +264,14 @@ var _default = {
|
|||
geList: function geList(state) {return state.moduleA.geList;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getHomeData();
|
||||
_this.getArticleNav();
|
||||
|
@ -277,10 +283,9 @@ var _default = {
|
|||
this.getArticleNav();
|
||||
this.userInfoEv();
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this2 = this;
|
||||
|
||||
this.playTimer = setTimeout(function () {
|
||||
_this2.isplay = true;
|
||||
_this.isplay = true;
|
||||
}, 2000);
|
||||
},
|
||||
onReady: function onReady() {
|
||||
|
@ -312,25 +317,25 @@ var _default = {
|
|||
},
|
||||
methods: {
|
||||
// 查询用户信息
|
||||
userInfoEv: function userInfoEv() {var _this3 = this;
|
||||
userInfoEv: function userInfoEv() {var _this2 = this;
|
||||
this.$requst.get('/api/user/info').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
uni.setStorageSync('business_id', res.data.business_id);
|
||||
uni.setStorageSync('business_code', res.data.business_code);
|
||||
_this3.getCompanyList(res.data.business_id);
|
||||
_this2.getCompanyList(res.data.business_id);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询工厂列表
|
||||
getCompanyList: function getCompanyList(business_id) {var _this4 = this;
|
||||
getCompanyList: function getCompanyList(business_id) {var _this3 = this;
|
||||
this.$requst.post('/api/business/info', { business_id: business_id }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this4.indexTitle = res.data.alias;
|
||||
_this3.indexTitle = res.data.alias;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取首页数据
|
||||
getHomeData: function getHomeData() {var _this5 = this;
|
||||
getHomeData: function getHomeData() {var _this4 = this;
|
||||
this.$requst.get('/api/index/home').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
var bannerArr = [];
|
||||
|
@ -343,15 +348,15 @@ var _default = {
|
|||
|
||||
bannerArr.push(obj);
|
||||
});
|
||||
_this5.bannerList = bannerArr;
|
||||
_this5.recommendList = res.data['banner-next-2'];
|
||||
_this5.productList = res.data.spu;
|
||||
_this5.ifLoading = false;
|
||||
_this4.bannerList = bannerArr;
|
||||
_this4.recommendList = res.data['banner-next-2'];
|
||||
_this4.productList = res.data.spu;
|
||||
_this4.ifLoading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取文章栏目
|
||||
getArticleNav: function getArticleNav() {var _this6 = this;
|
||||
getArticleNav: function getArticleNav() {var _this5 = this;
|
||||
this.$requst.get('/api/archives/category').then(function (res) {
|
||||
if (res.code == 0) {
|
||||
res.data.forEach(function (item) {
|
||||
|
@ -359,11 +364,11 @@ var _default = {
|
|||
id: item.id,
|
||||
name: item.title };
|
||||
|
||||
_this6.navTabList.push(obj);
|
||||
_this5.navTabList.push(obj);
|
||||
});
|
||||
_this6.articleNavId = _this6.navTabList[0].id;
|
||||
_this5.articleNavId = _this5.navTabList[0].id;
|
||||
// 获取文章列表
|
||||
_this6.getArticleList();
|
||||
_this5.getArticleList();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -381,7 +386,7 @@ var _default = {
|
|||
}
|
||||
},
|
||||
// 获取文章列表
|
||||
getArticleList: function getArticleList() {var _this7 = this;
|
||||
getArticleList: function getArticleList() {var _this6 = this;
|
||||
uni.showLoading({
|
||||
title: '加载中' });
|
||||
|
||||
|
@ -392,20 +397,20 @@ var _default = {
|
|||
|
||||
this.$requst.get('/api/archives/list', params).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this7.total = res.data.total;
|
||||
_this6.total = res.data.total;
|
||||
var newArr = [];
|
||||
res.data.list.forEach(function (item) {
|
||||
var obj = {
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
time: _this7.dateFormat(item.published_at.replace(/-/g, '/')),
|
||||
time: _this6.dateFormat(item.published_at.replace(/-/g, '/')),
|
||||
src: item.cover };
|
||||
|
||||
newArr.push(obj);
|
||||
});
|
||||
_this7.articleList = newArr;
|
||||
if (_this7.articleList.length == _this7.total) {
|
||||
_this7.totalAll = _this7.total;
|
||||
_this6.articleList = newArr;
|
||||
if (_this6.articleList.length == _this6.total) {
|
||||
_this6.totalAll = _this6.total;
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
|
|
@ -249,7 +249,8 @@ var _default = {
|
|||
kitBanner: [], //套件轮播
|
||||
action: 'collect', //收藏类型
|
||||
id: '', //套件id
|
||||
vipPrice: false // 是否显示会员价
|
||||
vipPrice: false, // 是否显示会员价
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -257,10 +258,16 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op !== '') {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.id = op.id;
|
||||
_this.getKitDetail(_this.id);
|
||||
|
@ -272,9 +279,7 @@ var _default = {
|
|||
this.getKitDetail(this.id);
|
||||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
||||
if (uni.getStorageSync('business_code') !== '' && uni.getStorageSync('showVip') == 'true') {
|
||||
this.vipPrice = true;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,8 @@ var _default = {
|
|||
total: 0, //总数
|
||||
totalAll: -1, //计算总数
|
||||
category_id: 0, //分类id
|
||||
sort: 'new' //排序
|
||||
sort: 'new', //排序
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -222,9 +223,14 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getKitEv();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -329,7 +329,8 @@ var _default = {
|
|||
inviteeCode: '', //会员码
|
||||
flag: true,
|
||||
vipCode: '', //会员码
|
||||
isChecked: false //验证会员码
|
||||
isChecked: false, //验证会员码
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
onReachBottom: function onReachBottom() {
|
||||
|
@ -338,9 +339,14 @@ var _default = {
|
|||
onHide: function onHide() {
|
||||
|
||||
},
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getUserInfo();
|
||||
_this.getCustomer();
|
||||
|
@ -352,8 +358,7 @@ var _default = {
|
|||
this.getCustomer();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
||||
if (uni.getStorageSync('showVip')) {
|
||||
this.showVip = uni.getStorageSync('showVip');
|
||||
} else {
|
||||
|
|
|
@ -200,7 +200,8 @@ var _default = {
|
|||
size: 10, //查询条数
|
||||
total: 0, //总数
|
||||
totalAll: -1, //计算总数
|
||||
isShop: true //是否商品
|
||||
isShop: true, //是否商品
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -208,9 +209,14 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getCollectionList();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
@ -220,9 +226,6 @@ var _default = {
|
|||
this.getCollectionList();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
},
|
||||
onReady: function onReady() {
|
||||
|
||||
},
|
||||
onReachBottom: function onReachBottom(e) {
|
||||
if (this.collectionList.length < this.total) {
|
||||
|
|
|
@ -190,16 +190,22 @@ var _default = {
|
|||
id: '', //文章id
|
||||
action: 'collect', //收藏类型
|
||||
time: '', //发布时间
|
||||
content: '' //文章内容
|
||||
content: '', //文章内容
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
this.id = op.id;
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getDetail(_this.id);
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
@ -210,9 +216,6 @@ var _default = {
|
|||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
// getNewsDetail()
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage: function onShareAppMessage(res) {
|
||||
var path = uni.getStorageSync('page-path-options') + '&business_id=' + uni.getStorageSync('business_id');
|
||||
|
|
|
@ -208,7 +208,8 @@ var _default = {
|
|||
page: 1, //第几页
|
||||
size: 10, //查询条数
|
||||
total: 0, //总数
|
||||
totalAll: -1 //总数
|
||||
totalAll: -1, //总数
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -216,9 +217,14 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getArticleNav();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -209,12 +209,18 @@ function getDate(type) {
|
|||
format: true }),
|
||||
|
||||
startDate: getDate('start'),
|
||||
endDate: getDate('end') };
|
||||
|
||||
endDate: getDate('end'),
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getUserInfo();
|
||||
}
|
||||
|
@ -222,9 +228,6 @@ function getDate(type) {
|
|||
} else {
|
||||
this.getUserInfo();
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取默认信息
|
||||
|
|
|
@ -254,15 +254,21 @@ var _default = {
|
|||
orderDetail: {}, //订单详情
|
||||
flag: true,
|
||||
ifLoading: false,
|
||||
id: 0 //订单id
|
||||
id: 0, //订单id
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.id !== '') {
|
||||
this.id = op.id;
|
||||
}
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getOrderDetail();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -225,10 +225,11 @@ var _default = {
|
|||
totalAll: -1,
|
||||
page: 1,
|
||||
size: 10,
|
||||
tag: 'all' };
|
||||
|
||||
tag: 'all',
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.tag !== '') {
|
||||
this.tag = op.tag;
|
||||
}
|
||||
|
@ -236,7 +237,12 @@ var _default = {
|
|||
this.activeIndex = op.index;
|
||||
}
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getOrderList();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -288,7 +288,8 @@ var _default = {
|
|||
id: 0, //商品、套件id
|
||||
action: 'collect', //收藏类型
|
||||
changeBtns: false, //按钮选择
|
||||
vipPrice: false //显示会员价
|
||||
vipPrice: false, //显示会员价
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: _objectSpread({},
|
||||
|
@ -296,12 +297,18 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op !== '') {
|
||||
this.source = op.source;
|
||||
this.id = op.id;
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getDetail(_this.id);
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
@ -311,9 +318,7 @@ var _default = {
|
|||
this.getDetail(this.id);
|
||||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
||||
if (uni.getStorageSync('business_code') !== '' && uni.getStorageSync('showVip') == 'true') {
|
||||
this.vipPrice = true;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ var _default = {
|
|||
page: 1, //页数
|
||||
size: 10 }, _defineProperty(_ref, "total",
|
||||
0), _defineProperty(_ref, "totalAll",
|
||||
-1), _defineProperty(_ref, "cacheBusinessId",
|
||||
-1), _ref;
|
||||
|
||||
},
|
||||
|
@ -123,11 +124,16 @@ var _default = {
|
|||
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
this.category_id = op.category_id;
|
||||
this.company_id = op.company_id;
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getShopScreen(); //查询商品分类
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -172,12 +172,18 @@ var _default = {
|
|||
longitude: 116.39742,
|
||||
iconPath: '/static/public/icon-addr.png' }],
|
||||
|
||||
aboutData: '' };
|
||||
|
||||
aboutData: '',
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getAboutData();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -154,12 +154,18 @@ var _default = {
|
|||
data: function data() {
|
||||
return {
|
||||
disclaimersHeight: "calc(100vh - ".concat(uni.getSystemInfoSync().statusBarHeight + 50, "px)"),
|
||||
disclaimers: '' };
|
||||
|
||||
disclaimers: '',
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getDisclaimers();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
|
|
@ -219,15 +219,21 @@ var _default = {
|
|||
field: '', //修改位置
|
||||
type: 'input',
|
||||
placeholder: '', //默认信息
|
||||
headImg: '' //缓存头像链接
|
||||
headImg: '', //缓存头像链接
|
||||
cacheBusinessId: -1 //商户id
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
||||
|
||||
onLoad: function onLoad(op) {var _this = this;
|
||||
onLoad: function onLoad(op) {
|
||||
if (op.business_id) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: op.business_id }).then(function (res) {
|
||||
this.cacheBusinessId = op.business_id;
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {var _this = this;
|
||||
if (this.cacheBusinessId !== -1) {
|
||||
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
|
||||
if (res.code == 0) {
|
||||
_this.getUserData();
|
||||
(0, _publicApi.userInfoEv)();
|
||||
|
@ -238,8 +244,6 @@ var _default = {
|
|||
(0, _publicApi.userInfoEv)();
|
||||
}
|
||||
},
|
||||
onShow: function onShow() {
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getUserData: function getUserData() {var _this2 = this;
|
||||
|
|
|
@ -23,6 +23,13 @@
|
|||
"query": "business_id=6",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "pages/tabbar/my/my",
|
||||
"query": "business_id=0",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue