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