修改bug
parent
53f457bb51
commit
5fb3964ed4
6
App.vue
6
App.vue
|
@ -13,11 +13,13 @@
|
||||||
},
|
},
|
||||||
onShow: ()=> {
|
onShow: ()=> {
|
||||||
if(uni.getStorageSync('token')){
|
if(uni.getStorageSync('token')){
|
||||||
|
toolAll.tools.refreshToken();//刷新token
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onHide: ()=> {
|
onHide: ()=> {
|
||||||
|
if(uni.getStorageSync('token')){
|
||||||
|
toolAll.tools.refreshToken();//刷新token
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -68,6 +68,8 @@
|
||||||
uni.setStorageSync('skuList',params.sku_list);
|
uni.setStorageSync('skuList',params.sku_list);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$toolAll.tools.showToast('库存不足');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除对象中某个字段
|
// 删除对象中某个字段
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
<view class="posAll bac5 disjcac" v-if="ifLogistics">
|
<view class="posAll bac5 disjcac" v-if="ifLogistics">
|
||||||
<view class="bacf radius12 tips-box pad-zy30 animated" :class="ifAnimated?'bounceInDown':'bounceOutDown'">
|
<view class="bacf radius12 tips-box pad-zy30 animated" :class="ifAnimated?'bounceInDown':'bounceOutDown'">
|
||||||
<view class="bbot pad-s30 pad-x20 tcenter fon28 bold col26">{{tipsTitle}}</view>
|
<view class="bbot pad-s30 pad-x20 tcenter fon28 bold col26">{{tipsTitle}}</view>
|
||||||
<view class="fon22 col26 disjcac fc mar-sx30" v-if="showType==1">
|
<view class="fon22 col26 disjcac mar-sx30" v-if="showType==1">
|
||||||
<view class="disac" style="width: 60%;">
|
<view class="flexs" style="width: 120rpx;">
|
||||||
<view class="flexs" style="width: 120rpx;">物流公司</view>
|
<view class="">物流公司</view>
|
||||||
<view class="">{{logisticsObj.express_name}}</view>
|
<view class="mar-s20">物流单号</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disac mar-s20" style="width: 60%;">
|
<view class="">
|
||||||
<view class="flexs" style="width: 120rpx;">物流单号</view>
|
<view class="">{{logisticsObj.express_name}}</view>
|
||||||
<view class="">{{logisticsObj.express_number}}</view>
|
<view class="mar-s20 clips1">{{logisticsObj.express_number}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon22 col26 disjcac mar-sx40" v-if="showType==2 || showType==3 || showType==4">
|
<view class="fon22 col26 disjcac mar-sx40" v-if="showType==2 || showType==3 || showType==4">
|
||||||
|
|
|
@ -68,6 +68,9 @@ const checkError = (e) => {
|
||||||
refreshTokenPage();
|
refreshTokenPage();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
setTimeout(()=>{
|
||||||
|
flag = true;
|
||||||
|
},2000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,6 +116,7 @@ const request = (method, url, options) => {
|
||||||
// 接口调用成功
|
// 接口调用成功
|
||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
} else {
|
} else {
|
||||||
|
reject(res);
|
||||||
// 接口返回错误信息
|
// 接口返回错误信息
|
||||||
checkError(res);
|
checkError(res);
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,7 +392,42 @@ const tools = {
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
// #endif
|
// #endif
|
||||||
|
},
|
||||||
|
timeToken:null,
|
||||||
|
// 开启一个半小时刷新token
|
||||||
|
refreshToken(){
|
||||||
|
clearInterval(this.timeToken);
|
||||||
|
// 调用登录事件
|
||||||
|
this.loginEv();
|
||||||
|
this.timeToken = setInterval(()=>{
|
||||||
|
// 调用登录事件
|
||||||
|
this.loginEv();
|
||||||
|
},600000*9)
|
||||||
|
},
|
||||||
|
// 登录事件
|
||||||
|
loginEv(){
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: (res)=> {
|
||||||
|
var params = {code:res.code}
|
||||||
|
uni.request({
|
||||||
|
url: `${uni.getStorageSync('hostapi')}/api/user/login`,
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
success: res => {
|
||||||
|
if(res.data.data.token!=''){
|
||||||
|
uni.setStorageSync('token',res.data.data.token); // 缓存token
|
||||||
|
uni.setStorageSync('openid',res.data.data.openid)//缓存openid
|
||||||
|
uni.setStorageSync('expire',res.data.data.expire); // 缓存失效时间(时间戳格式)
|
||||||
|
uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号
|
||||||
|
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
||||||
|
uni.setStorageSync('invite_code',res.data.data.invite_code)//缓存用户邀请码
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
tools
|
tools
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20">
|
<view class="pad-zy20">
|
||||||
<list ref="refcourse" @goDetail="goDetail"></list>
|
<list ref="refcourse" @goDetail="goDetail"></list>
|
||||||
<view class="" v-if="noMore">
|
<view class="" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > $refs.refcourse.list.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -48,6 +48,7 @@
|
||||||
size:10,
|
size:10,
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false,//是否没有更多
|
noMore:false,//是否没有更多
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -80,7 +81,9 @@
|
||||||
// 如果分类列表不为空
|
// 如果分类列表不为空
|
||||||
if(this.dataList.length){
|
if(this.dataList.length){
|
||||||
// 设置分类id
|
// 设置分类id
|
||||||
|
if(!this.classId){
|
||||||
this.classId = this.dataList[0].id;
|
this.classId = this.dataList[0].id;
|
||||||
|
}
|
||||||
// 调用获取课程列表
|
// 调用获取课程列表
|
||||||
this.getCourseList();
|
this.getCourseList();
|
||||||
}
|
}
|
||||||
|
@ -88,6 +91,7 @@
|
||||||
},
|
},
|
||||||
// 获取课程列表
|
// 获取课程列表
|
||||||
getCourseList(){
|
getCourseList(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
category_id:this.classId,
|
category_id:this.classId,
|
||||||
page:this.page,
|
page:this.page,
|
||||||
|
@ -104,6 +108,7 @@
|
||||||
if(this.total==this.$refs.refcourse.list.length && this.page!=1){
|
if(this.total==this.$refs.refcourse.list.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<view class="disjbac colf pad-zy40 mar-sx30">
|
<view class="disjbac colf pad-zy40 mar-sx30">
|
||||||
<view class="disac">
|
<view class="disac">
|
||||||
<image class="radius_100 flexs" :src="userInfo.headimgurl" mode="aspectFill" lazy-load style="width: 100rpx;height: 100rpx;border: 6rpx solid #FFFFFF;background-color: #FFFFFF;"></image>
|
<image class="radius_100 flexs" :src="userInfo.headimgurl" mode="aspectFill" lazy-load style="width: 100rpx;height: 100rpx;border: 6rpx solid #FFFFFF;background-color: #FFFFFF;"></image>
|
||||||
<view class="fon32 mar-z20">{{userInfo.nickname}}</view>
|
<view class="fon32 mar-z20 clips1">{{userInfo.nickname}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disac pad-zy12 pad-sx8 radius4" style="border: 2rpx solid #fccf6d;" @tap="$toolAll.tools.goPage('/pagesA/my-sign/my-sign')">
|
<view class="disac pad-zy12 pad-sx8 radius4 flexs" style="border: 2rpx solid #fccf6d;" @tap="$toolAll.tools.goPage('/pagesA/my-sign/my-sign')">
|
||||||
<image src="/static/tabbar/icon-rili.png" mode="" style="width: 24rpx;height: 24rpx;" lazy-load></image>
|
<image src="/static/tabbar/icon-rili.png" mode="" style="width: 24rpx;height: 24rpx;" lazy-load></image>
|
||||||
<view class="fon24 mar-z10">签到</view>
|
<view class="fon24 mar-z10">签到</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -84,9 +84,6 @@
|
||||||
this.$requst.get('/api/user/info').then(res=>{
|
this.$requst.get('/api/user/info').then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
this.userInfo = res.data;
|
this.userInfo = res.data;
|
||||||
if(this.userInfo.position==0 && this.funList.length==8){
|
|
||||||
this.funList.splice(7,1);
|
|
||||||
}
|
|
||||||
uni.setStorageSync('userInfo',this.userInfo);
|
uni.setStorageSync('userInfo',this.userInfo);
|
||||||
}
|
}
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
@ -106,7 +103,7 @@
|
||||||
'',
|
'',
|
||||||
]
|
]
|
||||||
if(index==7){
|
if(index==7){
|
||||||
list[7] = ['','/pagesB/second-level/second-level' ,'/pagesA/my-extend/my-extend'][this.userInfo.position]
|
list[7] = ['/pagesA/my-extend/my-extend','/pagesB/second-level/second-level?level=1','/pagesB/second-level/second-level?level=2' ][this.userInfo.position]
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:list[index]
|
url:list[index]
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
<view class="fon20" style="color: #bbb4b3;" @tap="goMore(0)">更多+</view>
|
<view class="fon20" style="color: #bbb4b3;" @tap="goMore(0)">更多+</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="radius8 bacf pad10 boxshow1 mar-x30" v-for="(item,index) in videoList" :key="index">
|
<view class="radius8 bacf pad10 boxshow1 mar-x30" v-for="(item,index) in videoList" :key="index">
|
||||||
<view class="posir disjcac">
|
<view @tap="palyVideo(index)" class="posir disjcac">
|
||||||
<image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image>
|
<image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image>
|
||||||
<image @tap="palyVideo(index)" class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
<image class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon24 pad-sx16 disjcac" style="color: #262626;">
|
<view class="fon24 pad-sx16 disjcac" style="color: #262626;">
|
||||||
<view class="clips2">{{item.title}}</view>
|
<view class="clips2">{{item.title}}</view>
|
||||||
|
|
|
@ -7,12 +7,14 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20">
|
<view class="pad-zy20">
|
||||||
<list ref="refproduct" @goDetail="goDetail"></list>
|
<list ref="refproduct" @goDetail="goDetail"></list>
|
||||||
<view class="" v-if="noMore">
|
<view class="" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > $refs.refproduct.list.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
|
<!-- 购物车图标 -->
|
||||||
|
<image @tap="goCart" class="posi" src="/static/tabbar/icon-cart.png" mode="" lazy-load style="width: 79rpx;height: 79rpx;right: 20rpx;bottom: 160rpx;"></image>
|
||||||
<!-- 底部tab -->
|
<!-- 底部tab -->
|
||||||
<foot-tab current="1"></foot-tab>
|
<foot-tab current="1"></foot-tab>
|
||||||
</view>
|
</view>
|
||||||
|
@ -41,6 +43,7 @@
|
||||||
size:10,
|
size:10,
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false,//是否没有更多
|
noMore:false,//是否没有更多
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -85,6 +88,7 @@
|
||||||
},
|
},
|
||||||
// 获取商品产品列表
|
// 获取商品产品列表
|
||||||
getProductList(){
|
getProductList(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
category_id:this.classId,
|
category_id:this.classId,
|
||||||
page:this.page,
|
page:this.page,
|
||||||
|
@ -100,6 +104,7 @@
|
||||||
if(this.total==this.$refs.refproduct.list.length && this.page!=1){
|
if(this.total==this.$refs.refproduct.list.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -110,6 +115,12 @@
|
||||||
url:`/pagesB/shop-detail/shop-detail?id=${id}`
|
url:`/pagesB/shop-detail/shop-detail?id=${id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 前往购物车
|
||||||
|
goCart(){
|
||||||
|
if(this.$toolAll.tools.judgeAuth()) {
|
||||||
|
this.$toolAll.tools.goPage('/pagesB/cart/cart')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<status-container :ifReturn="false" titlet="视频列表">
|
<status-container :ifReturn="false" titlet="视频列表">
|
||||||
<view slot="content" style="margin-top: -20rpx;">
|
<view slot="content" style="margin-top: -20rpx;" v-if="loading">
|
||||||
<view class="posi-sticky" :style="{top:newtop+'px'}">
|
<view class="posi-sticky" :style="{top:newtop+'px'}">
|
||||||
<view class="pad-sx26 pad-zy20" style="box-shadow: 0 3rpx 20rpx rgba(0, 0, 0, 0.1);">
|
<view class="pad-sx26 pad-zy20" style="box-shadow: 0 3rpx 20rpx rgba(0, 0, 0, 0.1);">
|
||||||
<view class="radius40 pad-sx2 disjbac pad-zy20" style="background-color: #fff6f5;border: 2rpx solid #ece6e6;">
|
<view class="radius40 pad-sx2 disjbac pad-zy20" style="background-color: #fff6f5;border: 2rpx solid #ece6e6;">
|
||||||
|
@ -14,9 +14,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20">
|
<view class="pad-zy20">
|
||||||
<view class="radius8 bacf pad10 boxshow1 mar-s30" v-for="(item,index) in dataList" :key="index">
|
<view class="radius8 bacf pad10 boxshow1 mar-s30" v-for="(item,index) in dataList" :key="index">
|
||||||
<view class="posir disjcac">
|
<view @tap="palyVideo(index)" class="posir disjcac">
|
||||||
<image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100 animated fadeIn" lazy-load></image>
|
<image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100 animated fadeIn" lazy-load></image>
|
||||||
<image @tap="palyVideo(index)" class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
<image class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy10">
|
<view class="pad-zy10">
|
||||||
<view class="fon24 pad-sx16 clips2" style="color: #262626;">{{item.title}}</view>
|
<view class="fon24 pad-sx16 clips2" style="color: #262626;">{{item.title}}</view>
|
||||||
|
@ -28,9 +28,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="noMore">
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
|
@ -57,7 +55,8 @@
|
||||||
size:20,
|
size:20,
|
||||||
total:0,
|
total:0,
|
||||||
keyword:'',
|
keyword:'',
|
||||||
noMore:false
|
noMore:false,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
@ -72,6 +71,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 获取视频列表
|
// 获取视频列表
|
||||||
getVideoList(){
|
getVideoList(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
keyword:this.keyword,
|
keyword:this.keyword,
|
||||||
page:this.page,
|
page:this.page,
|
||||||
|
@ -86,6 +86,7 @@
|
||||||
if(this.total==this.dataList.length && this.page!=1){
|
if(this.total==this.dataList.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20" v-if="noMore">
|
<view class="pad-zy20" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
|
@ -76,7 +76,8 @@
|
||||||
page:1,
|
page:1,
|
||||||
size:20,
|
size:20,
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false
|
noMore:false,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
@ -122,6 +123,7 @@
|
||||||
},
|
},
|
||||||
// 获取优惠券列表
|
// 获取优惠券列表
|
||||||
getCouponList(){
|
getCouponList(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
status:this.status,
|
status:this.status,
|
||||||
page:this.page,
|
page:this.page,
|
||||||
|
@ -135,6 +137,7 @@
|
||||||
if(this.total==this.dataList.length && this.page!=1){
|
if(this.total==this.dataList.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20" v-if="noMore">
|
<view class="" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
size:20,
|
size:20,
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false,
|
noMore:false,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -60,6 +61,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 获取课程列表
|
// 获取课程列表
|
||||||
getCouresList(){
|
getCouresList(){
|
||||||
|
this.loading = false;
|
||||||
this.$requst.get('/api/user/course').then(res=>{
|
this.$requst.get('/api/user/course').then(res=>{
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
if(this.page==1){this.dataList=[];}
|
if(this.page==1){this.dataList=[];}
|
||||||
|
@ -67,6 +69,7 @@
|
||||||
if(this.total==this.dataList.length && this.page!=1){
|
if(this.total==this.dataList.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="noMore">
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
<view class="fon20" style="color: #8b8b8b;">{{item.created_at}}</view>
|
<view class="fon20" style="color: #8b8b8b;">{{item.created_at}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20" v-if="noMore">
|
<view class="" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
|
@ -61,7 +61,8 @@
|
||||||
size:20,
|
size:20,
|
||||||
type:'',
|
type:'',
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false
|
noMore:false,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -83,6 +84,7 @@
|
||||||
},
|
},
|
||||||
// 获取积分列表
|
// 获取积分列表
|
||||||
getIntegral(){
|
getIntegral(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
type:this.type,
|
type:this.type,
|
||||||
page:this.page,
|
page:this.page,
|
||||||
|
@ -96,6 +98,7 @@
|
||||||
if(this.total==this.dataList.length && this.page!=1){
|
if(this.total==this.dataList.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-zy20" v-if="noMore">
|
<view class="" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
|
@ -59,7 +59,8 @@
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false,
|
noMore:false,
|
||||||
orderList:[],
|
orderList:[],
|
||||||
flag:true
|
flag:true,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -102,6 +103,7 @@
|
||||||
},
|
},
|
||||||
// 获取我的订单列表
|
// 获取我的订单列表
|
||||||
getOrderList(){
|
getOrderList(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
page:this.page,
|
page:this.page,
|
||||||
size:this.size,
|
size:this.size,
|
||||||
|
@ -115,6 +117,7 @@
|
||||||
if(this.total==this.orderList.length && this.page!=1){
|
if(this.total==this.orderList.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<view class="pad-zy30">
|
<view class="pad-zy30">
|
||||||
<view class="disjbac" style="background: linear-gradient(to bottom, #fefcfc 0%, #f8efed 100%);border-radius: 24rpx 24rpx 0 0;">
|
<view class="disjbac" style="background: linear-gradient(to bottom, #fefcfc 0%, #f8efed 100%);border-radius: 24rpx 24rpx 0 0;">
|
||||||
<view class="disjcac fc fon24 pad-sx30 width100" :class="item.is_today==1?'activeDay':''" v-for="(item,index) in signList" :key="index">
|
<view class="disjcac fc fon24 pad-sx30 width100" :class="item.is_today==1?'activeDay':''" v-for="(item,index) in signList" :key="index">
|
||||||
<view class="">{{item.score}}</view>
|
<view class="">+{{item.score}}</view>
|
||||||
<view class="mar-s10">{{item.key}}</view>
|
<view class="mar-s10">{{item.key}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
<view slot="content">
|
<view slot="content">
|
||||||
<view class="pad-zy20">
|
<view class="pad-zy20">
|
||||||
<view class="radius8 bacf pad10 boxshow1 mar-s30" v-for="(item,index) in dataList" :key="index">
|
<view class="radius8 bacf pad10 boxshow1 mar-s30" v-for="(item,index) in dataList" :key="index">
|
||||||
<view class="posir disjcac">
|
<view @tap="palyVideo(index)" class="posir disjcac">
|
||||||
<!-- <image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image> -->
|
<!-- <image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image> -->
|
||||||
<video :src="item.video" :controls="false" object-fit="contain" :show-center-play-btn="false" style="height: 388rpx;" class="width100"></video>
|
<video :src="item.video" :controls="false" object-fit="contain" :show-center-play-btn="false" style="height: 388rpx;" class="width100"></video>
|
||||||
<image @tap="palyVideo(index)" class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
<image class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon24 pad20" style="color: #7f7f7f;">{{item.created_at.split('-').join('.')}}</view>
|
<view class="fon24 pad20" style="color: #7f7f7f;">{{item.created_at.split('-').join('.')}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="noMore">
|
<view class="" v-if="loading">
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -33,7 +33,8 @@
|
||||||
page:1,
|
page:1,
|
||||||
size:10,
|
size:10,
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false
|
noMore:false,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getPractice(){
|
getPractice(){
|
||||||
|
this.loading = false;
|
||||||
let params = {
|
let params = {
|
||||||
page:this.page,
|
page:this.page,
|
||||||
size:this.size
|
size:this.size
|
||||||
|
@ -60,6 +62,7 @@
|
||||||
if(this.total == this.dataList.length && this.page!=1){
|
if(this.total == this.dataList.length && this.page!=1){
|
||||||
this.noMore = true;
|
this.noMore = true;
|
||||||
}
|
}
|
||||||
|
this.loading = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -36,9 +36,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
<view class="">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<customCoupon ref="refCoupon" :currentPrice="courseInfo.original_total" @confrimEv="confrimEv"></customCoupon>
|
<customCoupon ref="refCoupon" :currentPrice="courseInfo.original_total" @confrimEv="confrimEv"></customCoupon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -74,7 +71,7 @@
|
||||||
}
|
}
|
||||||
// 商品金额减优惠券抵扣
|
// 商品金额减优惠券抵扣
|
||||||
newPrice = this.$toolAll.tools.operationEv(newPrice,this.couponInfo.coupon_price,'-',2);
|
newPrice = this.$toolAll.tools.operationEv(newPrice,this.couponInfo.coupon_price,'-',2);
|
||||||
return newPrice;
|
return newPrice < 0 ? 0 : newPrice;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -103,6 +100,7 @@
|
||||||
this.$requst.post('/api/order/create',params).then(res=>{
|
this.$requst.post('/api/order/create',params).then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
let info = res.data;
|
let info = res.data;
|
||||||
|
if(info.status!='paid' && info.status!='completed'){
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
appId:info.payment_params.appId,//appId
|
appId:info.payment_params.appId,//appId
|
||||||
|
@ -112,16 +110,7 @@
|
||||||
signType: info.payment_params.signType,//MD5
|
signType: info.payment_params.signType,//MD5
|
||||||
paySign: info.payment_params.sign,//签名
|
paySign: info.payment_params.sign,//签名
|
||||||
success:(result)=> {
|
success:(result)=> {
|
||||||
this.$requst.post('/api/order/paid',{order_coding:info.coding}).then(res=>{
|
this.implementEv(info.coding);
|
||||||
if(res.code==0){
|
|
||||||
this.$toolAll.tools.showToast('支付成功(*^▽^*)');
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.reLaunch({
|
|
||||||
url:'/pages/tabbar/course/course'
|
|
||||||
})
|
|
||||||
},1500)
|
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
fail:()=> {
|
fail:()=> {
|
||||||
this.$toolAll.tools.showToast('支付已取消o(╥﹏╥)o');
|
this.$toolAll.tools.showToast('支付已取消o(╥﹏╥)o');
|
||||||
|
@ -130,11 +119,25 @@
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.implementEv(info.coding);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 支付成功接口
|
||||||
|
implementEv(coding){
|
||||||
|
this.$requst.post('/api/order/paid',{order_coding:coding}).then(res=>{
|
||||||
|
if(res.code==0){
|
||||||
|
this.$toolAll.tools.showToast('支付成功(*^▽^*)');
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack({delta:1})
|
||||||
|
},1000)
|
||||||
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,8 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let params = {
|
let params = {
|
||||||
sku_list:newList
|
sku_list:newList,
|
||||||
|
score_deduct:1
|
||||||
};
|
};
|
||||||
this.$requst.post('/api/order/prepare-info',params).then(res=>{
|
this.$requst.post('/api/order/prepare-info',params).then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
this.$requst.post('/api/order/create',params).then(res=>{
|
this.$requst.post('/api/order/create',params).then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
let info = res.data;
|
let info = res.data;
|
||||||
if(info.status!='completed'){
|
if(info.status!='completed' && info.status!='paid'){
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'wxpay',
|
provider: 'wxpay',
|
||||||
appId:info.payment_params.appId,//appId
|
appId:info.payment_params.appId,//appId
|
||||||
|
@ -155,16 +155,7 @@
|
||||||
signType: info.payment_params.signType,//MD5
|
signType: info.payment_params.signType,//MD5
|
||||||
paySign: info.payment_params.sign,//签名
|
paySign: info.payment_params.sign,//签名
|
||||||
success:(result)=> {
|
success:(result)=> {
|
||||||
this.$requst.post('/api/order/paid',{order_coding:info.coding}).then(res=>{
|
this.implementEv(info.coding);
|
||||||
if(res.code==0){
|
|
||||||
this.$toolAll.tools.showToast('支付成功(*^▽^*)');
|
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/pagesA/my-order/my-order'
|
|
||||||
})
|
|
||||||
},1000)
|
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
fail:()=> {
|
fail:()=> {
|
||||||
this.$toolAll.tools.showToast('支付已取消o(╥﹏╥)o');
|
this.$toolAll.tools.showToast('支付已取消o(╥﹏╥)o');
|
||||||
|
@ -174,16 +165,13 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$toolAll.tools.showToast('支付成功(*^▽^*)');
|
this.implementEv(info.coding);
|
||||||
setTimeout(()=>{
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/pagesA/my-order/my-order'
|
|
||||||
})
|
|
||||||
},1000)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
}
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
this.flag = true;
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.flag = true;
|
this.flag = true;
|
||||||
|
@ -195,6 +183,19 @@
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 支付成功接口
|
||||||
|
implementEv(coding){
|
||||||
|
this.$requst.post('/api/order/paid',{order_coding:coding}).then(res=>{
|
||||||
|
if(res.code==0){
|
||||||
|
this.$toolAll.tools.showToast('支付成功(*^▽^*)');
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pagesA/my-order/my-order'
|
||||||
|
})
|
||||||
|
},1000)
|
||||||
|
} else this.$toolAll.tools.showToast(res.msg);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
<view v-if="isLoading" slot="content" style="margin-top: -20rpx;">
|
<view v-if="isLoading" slot="content" style="margin-top: -20rpx;">
|
||||||
<view class="bacf">
|
<view class="bacf">
|
||||||
<view class="fon32 tcenter pad-s50">{{couresDetail.name}}</view>
|
<view class="fon32 tcenter pad-s50">{{couresDetail.name}}</view>
|
||||||
<view class="pad30 posir disjcac">
|
<view @tap="playVideo" class="pad30 posir disjcac">
|
||||||
<image :src="couresDetail.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image>
|
<image :src="couresDetail.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image>
|
||||||
<image @tap="playVideo" class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
<image class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="mar-zy30 bbot pad-x10">
|
<view class="mar-zy30 bbot pad-x10">
|
||||||
<span class="fon28 bold posir pad-x10">
|
<span class="fon28 bold posir pad-x10">
|
||||||
|
@ -54,9 +54,8 @@
|
||||||
// 底部组件
|
// 底部组件
|
||||||
import footTab from '@/components/foot-tabs/foot-tab.vue';
|
import footTab from '@/components/foot-tabs/foot-tab.vue';
|
||||||
import list from '@/components/list.vue';
|
import list from '@/components/list.vue';
|
||||||
import pitera from '@/components/nothing/pitera.vue';
|
|
||||||
export default {
|
export default {
|
||||||
components:{'foot-tab' :footTab,list,pitera},
|
components:{'foot-tab' :footTab,list},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
richText:'', //
|
richText:'', //
|
||||||
|
@ -83,7 +82,7 @@
|
||||||
this.id = op.id;
|
this.id = op.id;
|
||||||
this.classId = op.category_id;
|
this.classId = op.category_id;
|
||||||
// 获取课程详情
|
// 获取课程详情
|
||||||
this.getCouresDetail(op.id);
|
this.getCouresDetail(this.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
|
@ -97,6 +96,8 @@
|
||||||
onShow() {
|
onShow() {
|
||||||
uni.removeStorageSync('courseInfo');
|
uni.removeStorageSync('courseInfo');
|
||||||
uni.removeStorageSync('skuList');
|
uni.removeStorageSync('skuList');
|
||||||
|
// 获取课程详情
|
||||||
|
this.getCouresDetail(this.id);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取课程详情
|
// 获取课程详情
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<view @tap="confirmReceipt(orderDetail.id)" v-if="orderDetail.status=='shipped' || orderDetail.status=='paid'" class="fon26 radius30 disjcac" style="border: 2rpx solid #f37717;color: #f37717;border-color:#f37717;width: 204rpx;height: 62rpx;">确认收货</view>
|
<view @tap="confirmReceipt(orderDetail.id)" v-if="orderDetail.status=='shipped' || orderDetail.status=='paid'" class="fon26 radius30 disjcac" style="border: 2rpx solid #f37717;color: #f37717;border-color:#f37717;width: 204rpx;height: 62rpx;">确认收货</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bacf mar-s20 pad-x20 boxshow2">
|
<view class="bacf mar-s20 pad-x20 boxshow2">
|
||||||
<view @tap="$toolAll.tools.goPage(`/pagesB/order-detail/order-detail?id=${0}`)" class="bbot disac pad30 col26" v-for="(item,index) in orderDetail.skus" :key="index">
|
<view @tap="$toolAll.tools.goPage(`/pagesB/shop-detail/shop-detail?id=${item.spu_id}`)" class="bbot disac pad30 col26" v-for="(item,index) in orderDetail.skus" :key="index">
|
||||||
<image class="flexs mar-y20" :src="item.spu_cover" style="width: 192rpx;height: 134rpx;" mode="aspectFill" lazy-load></image>
|
<image class="flexs mar-y20" :src="item.spu_cover" style="width: 192rpx;height: 134rpx;" mode="aspectFill" lazy-load></image>
|
||||||
<view class="fon24 width100 disjbac fc" style="height: 134rpx;">
|
<view class="fon24 width100 disjbac fc" style="height: 134rpx;">
|
||||||
<view class="dis width100">
|
<view class="dis width100">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="disjbac fon24 col26 pad-sx20 pad-zy10">
|
<view class="disjbac fon24 col26 pad-sx20 pad-zy10">
|
||||||
<view class="">代理登记</view>
|
<view class="">代理登记</view>
|
||||||
<view class="">二级</view>
|
<view class="">{{['','一','二'][levelIndex]}}级</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjbac pad-x20 pad-zy10">
|
<view class="disjbac pad-x20 pad-zy10">
|
||||||
<view class="fon22 col26">我的佣金</view>
|
<view class="fon22 col26">我的佣金</view>
|
||||||
|
@ -31,9 +31,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="noMore">
|
<pitera :textStr="`${noMore && total > dataList.length?'上滑加载更多':'到底了'}~~`" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
||||||
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</status-container>
|
</status-container>
|
||||||
</view>
|
</view>
|
||||||
|
@ -55,14 +53,15 @@
|
||||||
total:0,
|
total:0,
|
||||||
noMore:false,
|
noMore:false,
|
||||||
personCode:'',
|
personCode:'',
|
||||||
loading:false,
|
|
||||||
//二维码相关参数
|
//二维码相关参数
|
||||||
textstr:`https://chuanwujia.com/share?invite_code=${uni.getStorageSync('invite_code')}`,
|
textstr:`https://chuanwujia.com/share?invite_code=${uni.getStorageSync('invite_code')}`,
|
||||||
scoreInfo:''
|
scoreInfo:'',
|
||||||
|
levelIndex:1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(op) {
|
||||||
this.loading = true;
|
this.levelIndex = op.level*1;
|
||||||
|
console.log(this.levelIndex);
|
||||||
this.getExtend();
|
this.getExtend();
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|
|
@ -60,11 +60,10 @@
|
||||||
// 底部组件
|
// 底部组件
|
||||||
import footTab from '@/components/foot-tabs/foot-tab.vue';
|
import footTab from '@/components/foot-tabs/foot-tab.vue';
|
||||||
import list from '@/components/list.vue';
|
import list from '@/components/list.vue';
|
||||||
import pitera from '@/components/nothing/pitera.vue';
|
|
||||||
import swiperPu from '@/components/swipers/swiper-pu.vue';
|
import swiperPu from '@/components/swipers/swiper-pu.vue';
|
||||||
import buyPopu from '@/components/buy-popu.vue';
|
import buyPopu from '@/components/buy-popu.vue';
|
||||||
export default {
|
export default {
|
||||||
components:{'foot-tab' :footTab,list,pitera,swiperPu,buyPopu},
|
components:{'foot-tab' :footTab,list,swiperPu,buyPopu},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
richText:'',
|
richText:'',
|
||||||
|
@ -145,27 +144,27 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 商品规格
|
// 商品规格
|
||||||
// this.$requst.get('/api/spu/spec',{id:this.shopId}).then(resspec=>{
|
this.$requst.get('/api/spu/spec',{id:this.shopId}).then(resspec=>{
|
||||||
// if(resspec.code==0){
|
if(resspec.code==0){
|
||||||
// //
|
//
|
||||||
// this.ifDetail = true;
|
this.ifDetail = true;
|
||||||
// // 所有规格列表
|
// 所有规格列表
|
||||||
// this.specList = resspec.data.spec;
|
this.specList = resspec.data.spec;
|
||||||
// // 默认规格
|
// 默认规格
|
||||||
// this.moSpecList = resspec.data.sku.indexes.split('-');
|
this.moSpecList = resspec.data.sku.indexes.split('-');
|
||||||
// // 存在规格
|
// 存在规格
|
||||||
// this.haveSpecList = resspec.data.sku_list;
|
this.haveSpecList = resspec.data.sku_list;
|
||||||
// this.shopList.push({
|
this.shopList.push({
|
||||||
// sku_list:[
|
sku_list:[
|
||||||
// {
|
{
|
||||||
// sku_coding:resspec.data.sku.coding,
|
sku_coding:resspec.data.sku.coding,
|
||||||
// num:1,
|
num:1,
|
||||||
// sku_id:resspec.data.sku.id
|
sku_id:resspec.data.sku.id
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -230,11 +229,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除对象中某个字段
|
// 删除对象中某个字段
|
||||||
// objField(field){
|
objField(field){
|
||||||
// let newObj = JSON.parse(JSON.stringify(this.shopList[0].sku_list[0]));
|
let newObj = JSON.parse(JSON.stringify(this.shopList[0].sku_list[0]));
|
||||||
// delete newObj[field];
|
delete newObj[field];
|
||||||
// return newObj;
|
return newObj;
|
||||||
// },
|
},
|
||||||
// 前往购物车
|
// 前往购物车
|
||||||
goCart(){
|
goCart(){
|
||||||
if(this.$toolAll.tools.judgeAuth()) {
|
if(this.$toolAll.tools.judgeAuth()) {
|
||||||
|
|
Loading…
Reference in New Issue