diff --git a/App.vue b/App.vue index b761e0a..efb6719 100644 --- a/App.vue +++ b/App.vue @@ -14,14 +14,15 @@ url: this.globalData.hostapi +'/api/user/login', data:{code:res.code}, success: (result) => { - console.log(result); - uni.setStorageSync('userId',result.data.account_id); - uni.setStorageSync('token',result.data.data.token);//缓存token - uni.setStorageSync('openid',result.data.data.openid);//缓存openid - uni.setStorageSync('expire',result.data.data.expire);//缓存失效时间(时间戳格式) - uni.setStorageSync('phone_active',result.data.data.phone_active);//是否授权手机号 - uni.setStorageSync('is_active',result.data.data.is_active);//是否授权头像和昵称 - uni.setStorageSync('invite_code',result.data.data.invite_code);//缓存邀请码 + if(result.data.data.is_active) { + uni.setStorageSync('userId',result.data.account_id); + uni.setStorageSync('token',result.data.data.token);//缓存token + uni.setStorageSync('openid',result.data.data.openid);//缓存openid + uni.setStorageSync('expire',result.data.data.expire);//缓存失效时间(时间戳格式) + uni.setStorageSync('phone_active',result.data.data.phone_active);//是否授权手机号 + uni.setStorageSync('is_active',result.data.data.is_active);//是否授权头像和昵称 + uni.setStorageSync('invite_code',result.data.data.invite_code);//缓存邀请码 + } } }) } diff --git a/components/function-list/gong-ge/gong-ge-function.vue b/components/function-list/gong-ge/gong-ge-function.vue index 84e9dd5..1f6ad0f 100644 --- a/components/function-list/gong-ge/gong-ge-function.vue +++ b/components/function-list/gong-ge/gong-ge-function.vue @@ -2,8 +2,9 @@ - + + {{item.num}} {{item.title}} @@ -18,13 +19,13 @@ type:Array, default:()=>{ return [ - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题一'}, - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题二'}, - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题三'}, - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题四'}, - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题五'}, - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题五'}, - {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题五'}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题一',num:0}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题二',num:0}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题三',num:0}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题四',num:0}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题五',num:0}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题五',num:0}, + {url:'',iconsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',iconWidth:60,iconHeight:60,title:'标题五',num:0}, ] } }, diff --git a/components/list/list-one.vue b/components/list/list-one.vue index 0d19ea7..8726480 100644 --- a/components/list/list-one.vue +++ b/components/list/list-one.vue @@ -2,7 +2,7 @@ {{title}} - + @@ -10,7 +10,7 @@ {{item.title}} ¥{{item.price}} - + @@ -46,22 +46,25 @@ data() { return { dataList:[ - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖入海盐太妃糖入海盐太妃糖入海盐太妃糖入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖入海盐太妃糖入海盐太妃糖入海盐太妃糖入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, + {id:1,skuId:1,imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title:'人气热销-16入海盐太妃糖',price:'2,000'}, ], ifLoading:false, total:0 }; }, + mounted() { + this.getList(); + }, methods:{ moreEv() { this.ifLoading = true; @@ -70,16 +73,42 @@ this.ifLoading = false; console.log(this.total); },2000) - console.log('触底了'); + }, + // 列表查询 + getList(){ + this.$requst.post('/api/spu/home').then(res=>{ + if(res.code) { + if(res.data.list.length) { + res.data.list.forEach(item=>{ + let obj = { + id:item.id, + skuId:item.skuId, + imgsrc:item.cover, + title:item.name, + price:this.$toolAll.tools.changeNum(parseInt(item.original_price)+'') + } + this.dataList.push(obj); + }) + } + } + }) }, // 加入购物车 addCartEv(id) { - this.$toolAll.tools.showToast('加入购物车成功(*^▽^*)') + if(this.$toolAll.tools.judgeAuth()) { + this.$requst.post('/api/order/shopping-cart-add',{sku_id:id,num:1}).then(res=>{ + if(res.code==0) { + this.$toolAll.tools.showToast('加入购物车成功(*^▽^*)') + } else { + this.$toolAll.tools.showToast(res.msg) + } + }) + } }, // 去详情 goDetail(id) { uni.navigateTo({ - url:'/pagesB/shop-detail/shop-detail' + url:`/pagesB/shop-detail/shop-detail?id=${id}` }) } } diff --git a/jsFile/tools.js b/jsFile/tools.js index 5fe4a07..870d194 100644 --- a/jsFile/tools.js +++ b/jsFile/tools.js @@ -383,7 +383,6 @@ const tools = { judgeAuth(){ let auth = false; clearTimeout(this.authTimer); - console.log(uni.getStorageSync('token'),1234); if(!uni.getStorageSync('token')) { this.showToast('请授权登录'); this.authTimer = setTimeout(()=>{ diff --git a/pages/tabbar/cate/cate.vue b/pages/tabbar/cate/cate.vue index e9cfae5..e137a8c 100644 --- a/pages/tabbar/cate/cate.vue +++ b/pages/tabbar/cate/cate.vue @@ -7,7 +7,7 @@ {{item.title}} @@ -23,8 +23,8 @@ {{item.title}} - ¥{{$toolAll.tools.changeNum(item.price)}} - + ¥{{item.price}} + 立即选购 @@ -52,7 +52,7 @@ import swiperTabJl from '@/components/swiper-tab/swiper-tab-jl.vue'; // 底部组件 import footTab from '@/components/foot-tabs/foot-tab.vue'; - import { mapState,mapGetters,mapMutations } from 'vuex'//引入mapState + import { mapState } from 'vuex'//引入mapState export default { components:{ 'foot-tab' :footTab, @@ -66,16 +66,16 @@ scrollHeight:uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50, newWidth:uni.getSystemInfoSync().windowWidth, cateList:[ - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, - {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, + // {id:1,title:'推荐套装'}, ], secendCateList:[ {title:'标题一'}, @@ -90,22 +90,25 @@ ], activeIndex:0, dataList:[ - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题',price:199}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, - {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题',price:199}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, + // {imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', title:'标题标题标题标题标题标题标题',price:20000}, ], + page:1, + size:10, total:0, flag:true, - ifLoading:false + ifLoading:false, + pid:''//分类id } }, computed:{ @@ -114,29 +117,71 @@ }), }, onLoad(op) { - // 获取元素宽 - const query = wx.createSelectorQuery().in(this) - query.select('.cate-left-box').boundingClientRect((rect) => { - this.newWidth = this.newWidth - rect.width - 20; - }).exec() console.log(this.footHeight); this.scrollHeight = this.scrollHeight - this.footHeight; if(op.index) { this.current = op.index; } + this.checkShopCate(); }, methods: { + // 查询商品列表 + checkShopList(id){ + this.ifLoading = true; + let params = { + page:this.page,// query 否 1 页数 + size:this.size,// query 否 10 每页数量 + pid:id + } + this.$requst.post('/api/spu/list',params).then(res=>{ + if(res.code==0) { + this.total = res.data.total; + if(this.page==1) this.dataList = []; + if(res.data.list.length) { + res.data.list.forEach(item=>{ + let obj = { + id:item.id, + imgsrc:item.cover, + title:item.name, + price:this.$toolAll.tools.changeNum(parseInt(item.price)+'') + } + this.dataList.push(obj); + }) + } + } + this.ifLoading = false; + }) + }, + // 查询左侧分类列表 + checkShopCate(){ + this.$requst.post('/api/spu/category').then(res=>{ + if(res.code==0) { + this.cateList = res.data; + setTimeout(()=>{ + // 获取元素宽 + const query = wx.createSelectorQuery().in(this) + query.select('.cate-left-box').boundingClientRect((rect) => { + this.newWidth = this.newWidth - rect.width - 20; + }).exec() + },200) + this.pid = this.cateList[0].id; + this.checkShopList(this.cateList[0].id); + } + }) + }, scrollBottomEv(){ console.log('触底了'); - this.ifLoading = true; - setTimeout(()=>{ - this.total = this.dataList.length; - this.ifLoading = false; - },2000) + if(this.total!=this.dataList.length) { + this.page++; + this.checkShopList(this.pid); + } }, // 一级分类选择 - chooseCate(index) { + chooseCate(index,id) { this.current = index; + this.page = 1; + this.pid = id; + this.checkShopList(id); }, goDetail(id) { uni.navigateTo({ @@ -144,7 +189,13 @@ }) }, addCartEv(id) { - this.$toolAll.tools.showToast('加入购物车成功(*^▽^*)') + this.$requst.post('/api/order/shopping-cart-add',{sku_id:id,num:1}).then(res=>{ + if(res.code==0) { + this.$toolAll.tools.showToast('加入购物车成功(*^▽^*)') + } else { + this.$toolAll.tools.showToast(res.msg) + } + }) }, // tab点击事件 clickTab(index){ diff --git a/pages/tabbar/my/my.vue b/pages/tabbar/my/my.vue index c7d3233..568cbf6 100644 --- a/pages/tabbar/my/my.vue +++ b/pages/tabbar/my/my.vue @@ -3,8 +3,8 @@ - - Anita Rose + + {{userName}} @@ -27,9 +27,10 @@ - 请扫描二维码添加微信告知您的订单号并支付定金 ,发货前请支付尾款。 + + 保存二维码 @@ -59,10 +60,10 @@ padt:uni.getSystemInfoSync().statusBarHeight + 50, headHeight:'',//头部导航高 list:[ - {url:'',iconsrc:'/static/public/icon-payment.png',iconWidth:50,iconHeight:44,title:'已下单'}, - {url:'',iconsrc:'/static/public/icon-send-goods.png',iconWidth:46,iconHeight:40,title:'制作中'}, - {url:'',iconsrc:'/static/public/icon-take.png',iconWidth:48,iconHeight:42,title:'已发货'}, - {url:'',iconsrc:'/static/public/icon-finish.png',iconWidth:49,iconHeight:44,title:'已完成'}, + {url:'',iconsrc:'/static/public/icon-payment.png',iconWidth:50,iconHeight:44,title:'已下单',num:0}, + {url:'',iconsrc:'/static/public/icon-send-goods.png',iconWidth:46,iconHeight:40,title:'制作中',num:0}, + {url:'',iconsrc:'/static/public/icon-take.png',iconWidth:48,iconHeight:42,title:'已发货',num:0}, + {url:'',iconsrc:'/static/public/icon-finish.png',iconWidth:49,iconHeight:44,title:'已完成',num:0}, ], list1: [ {url:'/pagesA/order-list/order-list',iconsrc:'',iconWidth:60,iconHeight:60,title:'我的订单',content:'全部订单',contentColor:'#999999',ifNext:true}, @@ -74,7 +75,10 @@ {url:'/pagesB/business-profile/business-profile',iconsrc:'/static/public/icon-aboutus.png',iconWidth:34,iconHeight:32,title:'商家简介',content:'',contentColor:'#999999',ifNext:true}, ], ifWx:false, - imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg' + imgsrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg', + userImg:'', + userName:'', + addwxcontent:'' } }, onReachBottom() { @@ -83,14 +87,35 @@ onHide() { this.ifWx = false; }, + onShow() { + this.getUserInfo(); + }, onLoad() { // 缓存状态栏+标题栏的高度 const query = wx.createSelectorQuery().in(this) query.select('.head-box').boundingClientRect((rect) => { this.headHeight = rect.height - this.padt; - }).exec() + }).exec(); + this.$requst.get('/api/index/add-wechat').then(res=>{ + if(res.code==0) { + this.addwxcontent = this.$toolAll.tools.escape2Html(res.data.content); + this.imgsrc = getApp().globalData.hostapi + res.data.wechat; + } + }) }, methods: { + getUserInfo(){ + this.$requst.get('/api/user/info').then(res=>{ + if(res.code==0) { + this.userImg = res.data.headimgurl; + this.userName = res.data.nickname; + this.list[0].num = res.data.order_count.paid; + this.list[1].num = res.data.order_count.waiting; + this.list[2].num = res.data.order_count.shipped; + + } + }) + }, chooseEv(obj) { if(obj.url) { uni.navigateTo({ diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue index 5350685..ee39af5 100644 --- a/pages/tabbar/pagehome/pagehome.vue +++ b/pages/tabbar/pagehome/pagehome.vue @@ -62,7 +62,6 @@ } }, onReachBottom(e) { - console.log(e); this.$refs.listhome.moreEv(); }, onHide() { @@ -82,15 +81,17 @@ }, methods: { chooseGe(obj) { - let exist = obj.url.slice(0,18); - if(exist=='/pages/tabbar/cate') { - uni.reLaunch({ - url:obj.url - }) - } else { - uni.navigateTo({ - url:obj.url - }) + if(this.$toolAll.tools.judgeAuth()) { + let exist = obj.url.slice(0,18); + if(exist=='/pages/tabbar/cate') { + uni.reLaunch({ + url:obj.url + }) + } else { + uni.navigateTo({ + url:obj.url + }) + } } }, goSearch(){ diff --git a/pagesB/business-profile/business-profile.vue b/pagesB/business-profile/business-profile.vue index 450ffce..be1894f 100644 --- a/pagesB/business-profile/business-profile.vue +++ b/pagesB/business-profile/business-profile.vue @@ -3,8 +3,8 @@ - - {{name}} + + {{company_name}} {{phone}}({{username}}) {{address}} @@ -27,26 +27,33 @@ richText:'', lat:'', lng:'', - name:'', + company_name:'', address:'' } }, + onLoad() { + this.checkAboutUs(); + }, methods: { // 查询关于我们信息 checkAboutUs(){ this.$requst.post('/api/index/about').then(res=>{ if(res.code==0){ - this.lat = res.data.lat; - this.lng = res.data.lon; - this.richText = this.$toolAll.tools.escape2Html(res.data.content); - this.address = res.data.address; + let obj = res.data; + this.lat = obj.lat; + this.lng = obj.lon; + this.phone = obj.phone + this.username = obj.contacts; + this.richText = this.$toolAll.tools.escape2Html(obj.content); + this.address = obj.address; + this.company_name = obj.company_name; } else { this.$toolAll.tools.showToast(res.msg); } }) }, goThere(){ - this.$toolAll.tools.goThere(this.lat,this.lng,this.name,this.address); + this.$toolAll.tools.goThere(this.lat,this.lng,this.company_name,this.address); } } } diff --git a/pagesB/buy-read/buy-read.vue b/pagesB/buy-read/buy-read.vue index 7effa41..40bd0cf 100644 --- a/pagesB/buy-read/buy-read.vue +++ b/pagesB/buy-read/buy-read.vue @@ -2,7 +2,7 @@ - + @@ -12,11 +12,17 @@ export default { data(){ return { - + richText:'' } }, onLoad() { - + this.$requst.post('/api/index/purchaseinstructions').then(res=>{ + if(res.code==0){ + this.richText = this.$toolAll.tools.escape2Html(res.data.content); + } else { + this.$toolAll.tools.showToast(res.msg); + } + }) } } diff --git a/pagesB/disclaimers/disclaimers.vue b/pagesB/disclaimers/disclaimers.vue index a598391..24b169f 100644 --- a/pagesB/disclaimers/disclaimers.vue +++ b/pagesB/disclaimers/disclaimers.vue @@ -16,7 +16,7 @@ } }, onLoad() { - + this.checkDisclaimerEv(); }, methods: { // 查询免责声明信息 diff --git a/pagesB/login/login.vue b/pagesB/login/login.vue index 5e4eb4b..3abb58c 100644 --- a/pagesB/login/login.vue +++ b/pagesB/login/login.vue @@ -7,7 +7,7 @@