反馈修改-0715

master
Lee-1203 2022-07-15 18:29:01 +08:00
parent 5c4d0efde4
commit 1473cb77ed
78 changed files with 646 additions and 549 deletions

View File

@ -228,6 +228,25 @@ page {background-color: #eaeaea;}
position: sticky;
left: 0;
z-index: 99;
overflow-x: auto;
}
.nav-list-bg::-webkit-scrollbar{
width: 0;
height: 0;
opacity: 0;
}
.nav-list-bg .pull-nav-btns{
justify-content: start !important;
}
.nav-list-bg .pull-nav-btns .btn{
width: 180rpx !important;
margin: 0 20rpx !important;
}
.nav-list-bg .pull-nav-btns .btn:first-child{
margin-left: 0 !important;
}
.nav-list-bg .pull-nav-btns .btn:last-child{
margin-right: 0 !important;
}
.news-list-bg{
padding: 10rpx 30rpx;
@ -501,7 +520,7 @@ page {background-color: #eaeaea;}
margin-right: 30rpx;
}
.collection-btn.active{
width: 70rpx;
width: 74rpx;
}
.collection-btn image{
width: 45rpx;
@ -1018,7 +1037,7 @@ video#my-video{
.vip-box-bg{
box-sizing: border-box;
width: 100%;
padding: 0 80rpx;
padding: 30rpx 80rpx 0;
position: fixed;
left: 0;
top: 50%;
@ -1031,6 +1050,24 @@ video#my-video{
background-color: #FFFFFF;
border-radius: 28rpx;
padding: 40rpx 60rpx;
position: relative;
}
.vip-box .vip-close{
display: flex;
justify-content: center;
align-items: center;
width: 60rpx;
height: 60rpx;
background-color: #d9d9d9;
border-radius: 100%;
position: absolute;
top: -30rpx;
right: -30rpx;
}
.vip-box .vip-close>text{
font-size: 30rpx;
transform: scaleX(1.3);
color: #FFFFFF;
}
.vip-box .title{
font-size: 32rpx;
@ -1043,7 +1080,7 @@ video#my-video{
}
.vip-box .vip-item .tips{
font-size: 28rpx;
color: #000000;
color: #666666;
line-height: 1.5;
margin-bottom: 10rpx;
}
@ -1054,28 +1091,20 @@ video#my-video{
.vip-box .input{
box-sizing: border-box;
width: 100%;
height: 60rpx;
padding: 0 10rpx;
border: 2rpx solid #c9c9c9;
height: 86rpx;
border-bottom: 2rpx solid #c9c9c9;
font-size: 28rpx;
color: #666666;
color: #000000;
}
.vip-box .vip-btns{
display: flex;
align-items: center;
justify-content: center;
.vip-box .btn{
width: 100%;
margin-top: 50rpx;
}
.vip-box .vip-btns .btn{
width: 150rpx;
background-color: #0073bc;
border-radius: 10rpx;
border-radius: 30rpx;
font-size: 30rpx;
line-height: 60rpx;
line-height: 96rpx;
text-align: center;
color: #FFFFFF;
margin: 0 30rpx;
margin-top: 70rpx;
}
.vip-box .vip-btns .btn:first-child{
background-color: #c9c9c9;
@ -1146,7 +1175,7 @@ video#my-video{
.edit-box-bg{
box-sizing: border-box;
width: 100%;
padding: 0 80rpx;
padding: 30rpx 45rpx 0;
position: fixed;
left: 0;
top: 50%;
@ -1158,7 +1187,25 @@ video#my-video{
width: 100%;
background-color: #FFFFFF;
border-radius: 28rpx;
padding: 40rpx 60rpx;
padding: 58rpx;
position: relative
}
.edit-box .edit-close{
display: flex;
justify-content: center;
align-items: center;
width: 60rpx;
height: 60rpx;
background-color: #d9d9d9;
border-radius: 100%;
position: absolute;
top: -30rpx;
right: -30rpx;
}
.edit-box .edit-close>text{
font-size: 30rpx;
transform: scaleX(1.3);
color: #FFFFFF;
}
.edit-box .title{
font-size: 32rpx;
@ -1171,7 +1218,7 @@ video#my-video{
font-size: 28rpx;
line-height: 1.5;
margin-bottom: 20rpx;
color: #999999;
color: #666666;
}
.edit-box .subtitle>text{
color: #d50000;
@ -1181,37 +1228,25 @@ video#my-video{
.edit-box .textarea{
box-sizing: border-box;
width: 100%;
height: 60rpx;
padding: 0 10rpx;
border: 2rpx solid #c9c9c9;
height: 86rpx;
border-bottom: 2rpx solid #c9c9c9;
font-size: 28rpx;
color: #000000;
}
.edit-box .textarea{
height: 150rpx;
padding: 10rpx;
padding: 10rpx 0;
line-height: 1.8;
}
.edit-box .edit-btns{
display: flex;
align-items: center;
justify-content: center;
.edit-box .btn{
width: 100%;
margin-top: 50rpx;
}
.edit-box .edit-btns .btn{
width: 150rpx;
background-color: #0073bc;
border-radius: 10rpx;
border-radius: 30rpx;
font-size: 30rpx;
line-height: 60rpx;
line-height: 96rpx;
text-align: center;
color: #FFFFFF;
margin: 0 30rpx;
}
.edit-box .edit-btns .btn:first-child{
background-color: #c9c9c9;
color: #000000;
margin-top: 70rpx;
}
/* 免责声明 */

View File

@ -1,5 +1,5 @@
<template>
<view class="pull-nav-btns" :class="type=='radio'?'search-btns':''">
<view class="pull-nav-btns" :class="type=='radio'?'search-btns':''" :style="{width:newWidth}">
<view @tap="chooseEv(index,item.id)" :class="currentIndex==index?'radio-btn active':'radio-btn'" v-for="(item,index) in list" v-if="type=='radio'">
<view class="radio"></view>
<text>{{item.name}}</text>
@ -25,11 +25,18 @@
maxNum:{
type:Number,
default:2
},
newWidth:{
type:String,
default:''
}
},
data(){
return {
currentIndex:0, //
left:'',
scrollLeft:'0px',
width:uni.getSystemInfoSync().windowWidth,
}
},
methods:{
@ -50,6 +57,7 @@
display: flex;
justify-content: center;
align-items: center;
min-width: 100%;
padding: 25rpx 0;
}

View File

@ -9,12 +9,12 @@
</view>
<view class="shop-txt">
<view class="shop-txt-top">
<view class="title">{{item.title}}</view>
<view class="title clips2">{{item.title}}</view>
<view class="specs clips2">规格{{item.customTitle==''?item.skuName:item.customTitle}}</view>
</view>
<view class="shop-txt-bottom">
<!-- 商品价格 -->
<view class="price">{{vipPrice?$toolAll.tools.changeNum(item.price):$toolAll.tools.changeNum(item.original_price)}}</view>
<view class="price">{{vipPrice?item.price:item.original_price}}</view>
<!-- 商品数量 -->
<view class="num">
<!-- 减数量 -->
@ -34,7 +34,7 @@
<view class="change-all">
<label class="label" @tap="chooseAll"><radio :checked="allChoose" color="#0073bc" style="transform: scale(.8);"/><text>全选</text></label>
<view class="all-price">
<view class="price">合计<span>{{$toolAll.tools.changeNum(allPrice)}}</span></view>
<view class="price">合计<span>{{allPrice}}</span></view>
<view class="btn" :style="{background: !buyNum ? '#cccccc' : '#0073bc'}" @tap="submitEv">{{allPrice==0 ? '' : ` (${buyNum})`}}</view>
</view>
</view>
@ -77,51 +77,6 @@
default:0
}
},
computed: {
windowWidth() {
return uni.getSystemInfoSync().windowWidth;
},
//
allPrice() {
let allPrice = 0;
this.listData.forEach(item=>{
if(item.ifcheck) {
if(this.vipPrice){
allPrice += this.$toolAll.tools.operationEv(item.price,item.num,'*',2)*1;
}else{
allPrice += this.$toolAll.tools.operationEv(item.original_price,item.num,'*',2)*1;
}
}
})
// return this.$toolAll.tools.addXiaoShu(allPrice);
return allPrice.toString();
},
//
buyNum() {
let buyNum = 0;
this.listData.forEach(item=>{
if(item.ifcheck) {
buyNum += 1;
}
})
return buyNum;
},
//
allChoose() {
let ifAll = false;
if(this.listData.length) {
let temparr = this.listData.filter(item=>{return item.ifcheck==false})
temparr.length==0 ? ifAll = true : ifAll = false;
}
return ifAll
},
...mapState({
footHeight: state => state.moduleA.footHeight,
}),
},
data() {
return {
listData: [],
@ -147,6 +102,51 @@
},
onShow() {
},
computed: {
windowWidth() {
return uni.getSystemInfoSync().windowWidth;
},
//
allPrice() {
let allPrice = 0;
this.listData.forEach(item=>{
if(item.ifcheck) {
if(this.vipPrice){
allPrice += item.price*item.num;
}else{
allPrice += item.original_price*item.num;
}
}
})
return this.$toolAll.tools.addXiaoShu(allPrice);
// return allPrice;
},
//
buyNum() {
let buyNum = 0;
this.listData.forEach(item=>{
if(item.ifcheck) {
buyNum += 1;
}
})
return buyNum;
},
//
allChoose() {
let ifAll = false;
if(this.listData.length) {
let temparr = this.listData.filter(item=>{return item.ifcheck==false})
temparr.length==0 ? ifAll = true : ifAll = false;
}
return ifAll
},
...mapState({
footHeight: state => state.moduleA.footHeight,
}),
},
methods: {
getList(){
@ -178,8 +178,8 @@
skuName: item.sku.sku_name,
is_series:item.spu.is_series,
slide_x: 0,
price:parseInt(item.sku.sku_price),
original_price: parseInt(item.sku.sku_original_price),
price:item.sku.sku_price,
original_price: item.sku.sku_original_price,
num:item.num,
ifcheck:this.skuId==item.sku_id ? true : false,
ifExit:true,
@ -197,6 +197,10 @@
// this.listData.push({id: 1,image: 'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title: '',content: '',slide_x: 0,price:199,num:1,ifcheck:false,ifExit:true,ifShow:true})
// }
},
//
chooseEv(index) {
this.listData[index].ifcheck = !this.listData[index].ifcheck;
},
//
chooseAll(){
let exit = this.listData.filter(item=>item.ifcheck==false);
@ -231,10 +235,7 @@
})
}
},
//
chooseEv(index) {
this.listData[index].ifcheck = !this.listData[index].ifcheck;
},
//
addCutEv(index,num) {
if(this.listData[index].slide_x==0){

View File

@ -5,7 +5,7 @@
<view class="pull-all-bg" v-show="isShow" @tap="closeMore"></view>
<view class="company-top" v-if="businessId==0"></view>
<view class="company" :style="{'top':topHieght+'px'}" v-if="businessId==0">
<input type="text" :value="companyList[companyIndex].name?'工厂选择:'+ companyList[companyIndex].name:''" @tap="openMore">
<input type="text" :value="companyList[companyIndex].name?'工厂选择:'+ companyList[companyIndex].name:''" @tap="openMore" disabled>
<view class="company-list" v-if="isShow">
<view @tap="checkValue(index,item.id)" class="company-item" :class="companyIndex == index?'cur':''" v-for="(item,index) in companyList">{{item.name}}</view>
</view>
@ -77,6 +77,7 @@
}
},
onShow() {
this.companyIndex = 0;
if(this.cacheBusinessId !== -1){
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
if(res.code == 0){

View File

@ -38,10 +38,9 @@
<!-- 疑难解答&行业资讯 -->
<view class="index-news">
<nav-tab :list="navTabList" :maxNum="1" @chooseEv="chooseEv"></nav-tab>
<pull-list :list="articleList" @toDetail="toArticleDetail"></pull-list>
<pull-list :list="askList" @toDetail="toArticleDetail" v-if="isLoading && showIndex==0"></pull-list>
<pull-list :list="articleList" @toDetail="toArticleDetail" v-if="isLoading && showIndex==1"></pull-list>
</view>
<!-- 暂无更多内容 -->
<view class="more-txt" v-if="totalAll == total"></view>
<!-- 购物车btn -->
<enter-cart></enter-cart>
<!-- 底部tab -->
@ -80,16 +79,14 @@
recommendList:[], //
productList:[],//
articleNavId:'',//id
askList:[], //
articleList:[], //
navTabList:[],//
currentIndex:0, //
page:1, //
size:5, //
total:0, //
totalAll:-1,//
ifLoading:true,
indexTitle:'',//
cacheBusinessId:-1, //id
isLoading:false,
showIndex:0, //
}
},
computed:{
@ -192,41 +189,68 @@
getArticleNav(){
this.$requst.get('/api/archives/category').then(res=>{
if(res.code == 0){
let newArr = [];
res.data.forEach(item=>{
let obj = {
id:item.id,
name:item.title
}
this.navTabList.push(obj)
newArr.push(obj)
})
this.articleNavId = this.navTabList[0].id;
this.navTabList = newArr;
//
this.getAskList();
this.getArticleList();
}
})
},
//
chooseEv(index,id){
if(this.currentIndex !== index){
this.articleList = [];
this.page = 1;
this.total = 0;
this.totalAll = -1;
this.currentIndex = index;
this.articleNavId = id;
//
this.getArticleList();
if(this.showIndex !== index){
this.showIndex = index;
}
},
//
getAskList(){
uni.showLoading({
title: '加载中'
});
this.isLoading = false;
let params = {
page:this.page,
size:this.size,
category_id:this.navTabList[0].id
}
this.$requst.get('/api/archives/list',params).then(res=>{
if(res.code == 0){
this.total = res.data.total;
let newArr = [];
res.data.list.forEach(item=>{
let obj = {
id:item.id,
title:item.title,
time:this.dateFormat(item.published_at.replace(/-/g,'/')),
src:item.cover
}
newArr.push(obj)
})
this.askList = newArr;
}
uni.hideLoading();
this.isLoading = true;
})
},
//
getArticleList(){
uni.showLoading({
title: '加载中'
});
this.isLoading = false;
let params = {
page:this.page,
size:this.size,
category_id:this.articleNavId
category_id:this.navTabList[1].id
}
this.$requst.get('/api/archives/list',params).then(res=>{
if(res.code == 0){
@ -242,11 +266,9 @@
newArr.push(obj)
})
this.articleList = newArr;
if(this.articleList.length == this.total){
this.totalAll = this.total;
}
}
uni.hideLoading();
this.isLoading = true;
})
},
//

View File

@ -2,18 +2,18 @@
<view class="pad-b140">
<status-nav :ifReturn="true" navBarTitle="套件简介" :marginBottom="0"></status-nav>
<!-- 商品轮播图 -->
<view class="shop-img">
<view class="shop-img" v-if="isLoading">
<swiper-pu newRadius="0" :bannerList="kitBanner" newHeight="505rpx" newBottom="35rpx" :isplay='isplay'></swiper-pu>
</view>
<!-- 商品概述 -->
<view class="shop-summary kit-summary">
<view class="shop-summary kit-summary" v-if="isLoading">
<view class="shop-title">{{kitDetail.name}}</view>
<view class="shop-txt flex">
<view class="left">
<view class="kit-compose">{{kitDetail.subtitle}}</view>
<view class="shop-customized">{{kitDetail.customized==1?'可定制':'不可定制'}}</view>
<view class="shop-pric">{{$toolAll.tools.changeNum(parseInt(kitDetail.original_price))}}</view>
<view class="shop-pric-vip" v-if="vipPrice"><text>会员价</text>{{$toolAll.tools.changeNum(parseInt(kitDetail.price))}}</view>
<view class="shop-customized">{{kitDetail.tag}}</view>
<view class="shop-pric">{{kitDetail.original_price}}</view>
<view class="shop-pric-vip" v-if="vipPrice"><text>会员价</text>{{kitDetail.price}}</view>
</view>
<view class="right flex">
<view class="collection-btn flex" :class="kitDetail.is_collected == 1?'active':''" @tap="collectionEv(kitDetail.id)">
@ -29,7 +29,7 @@
</view>
</view>
<!-- 套件包含 -->
<view class="kit-contain">
<view class="kit-contain" v-if="isLoading">
<view class="contain-h2">套件包含</view>
<view class="contain-list flex">
<view class="contain-item" @tap="toDetail(item.id)" v-for="(item,index) in kitDetail.series" :key="index">
@ -41,7 +41,7 @@
</view>
</view>
<!-- 底部按钮 -->
<view class="shop-btns flex">
<view class="shop-btns flex" v-if="isLoading">
<view class="btn" @tap="joinCart(specsIndex)"></view>
<view class="btn" @tap="buyNow(specsIndex)"></view>
</view>
@ -80,6 +80,7 @@
id:'' ,//id
vipPrice:false,//
cacheBusinessId:-1, //id
isLoading:false,
}
},
computed:{
@ -89,6 +90,7 @@
},
onLoad(op) {
if(op !== ''){
this.id = op.id;
if(op.business_id){
this.cacheBusinessId = op.business_id;
}
@ -98,13 +100,11 @@
if(this.cacheBusinessId !== -1){
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
if(res.code == 0){
this.id = op.id;
this.getKitDetail(this.id);
userInfoEv();
}
})
}else{
this.id = op.id;
this.getKitDetail(this.id);
userInfoEv();
}
@ -133,7 +133,9 @@
uni.showLoading({
title: '加载中'
});
this.isLoading=false;
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
console.log(res,99999)
if(res.code==0) {
this.kitDetail = res.data.detail; //
this.kitSku = res.data.sku; //
@ -147,6 +149,7 @@
this.kitBanner = newArr; //
}
uni.hideLoading();
this.isLoading=true;
})
},
//

View File

@ -3,11 +3,11 @@
<status-nav :ifReturn="false" navBarTitle="套件" :marginBottom="20"></status-nav>
<!-- 套件列表 -->
<view class="kit-list">
<view class="kit-item" @tap.stop="toDetail(item.id)" v-for="(item,index) in kitList" :key="index">
<view class="kit-item" @tap.stop="toDetail(item.id)" v-for="(item,index) in kitList" :key="index" v-if="isLoading">
<view class="kit-title">{{item.name}}</view>
<view class="kit-compose">
<text v-for="(item1,index1) in item.series" :key="index1">{{item1.name}}+</text>
<text>组合</text>
<text v-for="(item1,index1) in item.series" :key="index1">{{item1.name}}</text>
<!-- <text>组合</text> -->
</view>
<view class="kit-img">
<image :src="item.cover" mode="widthFix"></image>
@ -58,6 +58,7 @@
category_id:0, //id
sort:'new', //
cacheBusinessId:-1, //id
isLoading:false,
}
},
computed:{
@ -74,11 +75,13 @@
if(this.cacheBusinessId !== -1){
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
if(res.code == 0){
this.kitList = [];
this.getKitEv();
userInfoEv();
}
})
}else{
this.kitList = [];
this.getKitEv();
userInfoEv();
}
@ -110,6 +113,7 @@
uni.showLoading({
title: '加载中'
});
this.isLoading =false;
let params = {
page:this.page,
size:this.size,
@ -135,6 +139,7 @@
}
}
uni.hideLoading();
this.isLoading =true;
})
},
//

View File

@ -23,49 +23,22 @@
</view>
<!-- 其他资料 -->
<view class="my-content">
<view class="item flex" v-for="(item,index) in listData" :key="index" @tap.stop="toMore(index)" v-if="index<=5">
<view class="item flex" v-for="(item,index) in listData" :key="index" @tap.stop="toMore(index)" v-if="showObj.indexOf(index.toString())!=-1">
<view class="left flex">
<view class="flex">
<view class="img flex">
<image :src="item.imgSrc" :style="{width:item.iconWidth+'rpx',height:item.iconHeight+'rpx'}" mode="widthFix"></image>
</view>
<view class="title">{{item.titele}}</view>
<view class="title">{{businessCode!==''&&index==1?'会员码':item.titele}}</view>
</view>
<view class="tips" v-if="index==1"></view>
<view class="tips" v-if="index==1">{{businessCode!==''?businessCode:''}}</view>
<view class="tips" v-if="index==2"></view>
</view>
<view class="right">
<view class="more">
<image src="/static/public/icon-my-more.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="item flex" v-for="(item,index) in listData" :key="index" @tap.stop="toMore(index)" v-if="businessCode!=='' && index==6">
<view class="left flex">
<view class="flex">
<view class="img flex">
<image :src="item.imgSrc" :style="{width:item.iconWidth+'rpx',height:item.iconHeight+'rpx'}" mode="widthFix"></image>
</view>
<view class="title">{{item.titele}}</view>
</view>
</view>
<view class="right">
<view class="btn flex" :class="showVip=='true'?'show':''" v-if="index == 6" @tap.stop="changeShowVip">
<view class="circular"></view>
</view>
</view>
</view>
<view class="item flex" v-for="(item,index) in listData" :key="index" @tap.stop="toMore(index)" v-if="index==7">
<view class="left flex">
<view class="flex">
<view class="img flex">
<image :src="item.imgSrc" :style="{width:item.iconWidth+'rpx',height:item.iconHeight+'rpx'}" mode="widthFix"></image>
</view>
<view class="title">{{item.titele}}</view>
</view>
</view>
<view class="right">
<view class="more">
<view class="more" :style="{opacity:index==1&&businessCode!==''?0:1}" v-else>
<image src="/static/public/icon-my-more.png" mode="widthFix"></image>
</view>
</view>
@ -83,41 +56,37 @@
<view class="pull-all-bg" v-show="isVip||isChecked"></view>
<view class="vip-box-bg" v-if="isVip">
<view class="vip-box">
<view class="vip-close" @tap="closeEv"><text>X</text></view>
<view class="title">会员申请</view>
<view class="vip-list">
<view class="vip-item">
<view class="tips">姓名<text>*</text></view>
<input class="input" type="text" v-model="myName" placeholder="请输入姓名" placeholder-color="#c9c9c9">
<input class="input" type="text" v-model="myName" placeholder="请输入姓名" placeholder-style="color:#000000">
</view>
<view class="vip-item">
<view class="tips">电话<text>*</text></view>
<input class="input" type="number" v-model="myPhone" placeholder="请输入电话" placeholder-color="#c9c9c9">
<input class="input" type="number" v-model="myPhone" placeholder="请输入电话" placeholder-style="color:#000000">
</view>
<view class="vip-item">
<view class="tips">邀请人姓名</view>
<input class="input" type="text" v-model="inviteeName" placeholder="请输入邀请人姓名" placeholder-color="#c9c9c9">
<input class="input" type="text" v-model="inviteeName" placeholder="请输入邀请人姓名" placeholder-style="color:#000000">
</view>
<view class="vip-item">
<view class="tips">邀请人会员码</view>
<input class="input" type="text" v-model="inviteeCode" placeholder="请输入邀请人会员码" placeholder-color="#c9c9c9">
<input class="input" type="text" v-model="inviteeCode" placeholder="请输入邀请人会员码" placeholder-style="color:#000000">
</view>
</view>
<view class="vip-btns">
<view class="btn" @tap="closeEv"></view>
<view class="btn" @tap="submitEv"></view>
</view>
<view class="btn" @tap="submitEv"></view>
</view>
</view>
<!-- 验证会员码 -->
<view class="edit-box-bg" v-if="isChecked">
<view class="edit-box">
<view class="edit-close" @tap="closeCheck()"><text>X</text></view>
<view class="title">验证会员码</view>
<view class="subtitle">会员码<text>*</text></view>
<input class="input" type="text" v-model="vipCode" placeholder="请输入会员码" placeholder-color="#c9c9c9">
<view class="edit-btns">
<view class="btn" @tap="closeCheck"></view>
<view class="btn" @tap="checkCode"></view>
</view>
<input class="input" type="text" v-model="vipCode" placeholder="请输入会员邀请码" placeholder-style="color:#000000">
<view class="btn" @tap="checkCode"></view>
</view>
</view>
<!-- 购物车btn -->
@ -173,6 +142,7 @@
vipCode:'', //
isChecked:false, //
cacheBusinessId:-1, //id
showObj:'0123457', //Index
}
},
onReachBottom() {
@ -225,6 +195,9 @@
this.myOrder[1].num = newArr.ordered,
this.myOrder[2].num = newArr.completed,
this.myOrder[3].num = newArr.closed
if(this.businessCode!==''){
this.showObj='0134567'
}
}
uni.hideLoading();
})
@ -265,7 +238,9 @@
})
}
if(index == 1){
this.isChecked = true;
if(this.businessCode == ''){
this.isChecked = true;
}
}
if(index == 2){
this.isVip =true;
@ -341,6 +316,7 @@
this.$requst.post('/api/user/check-code',{code:this.vipCode}).then(res=>{
if(res.code==0) {
this.$toolAll.tools.showToast('验证成功');
this.getUserInfo(); //
this.closeCheck(); //
}else{
this.$toolAll.tools.showToast(res.msg);

View File

@ -6,7 +6,7 @@
<nav-tab :list="navTabList" @chooseEv="chooseEv"></nav-tab>
</view>
<!-- 列表 -->
<view class="news-list-bg">
<view class="news-list-bg" v-if="isLoading">
<pull-list :list="collectionList" :collection="1" :isShop="isShop" @toDetail="toArticleDetail" @collectionEv="collectionEv"></pull-list>
</view>
<!-- 暂无更多内容 -->
@ -44,6 +44,7 @@
totalAll:-1, //
isShop:true, //
cacheBusinessId:-1, //id
isLoading:false,
}
},
computed:{
@ -60,11 +61,13 @@
if(this.cacheBusinessId !== -1){
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
if(res.code == 0){
this.collectionList = [];
this.getCollectionList();
userInfoEv();
}
})
}else{
this.collectionList = [];
this.getCollectionList();
userInfoEv();
}
@ -115,6 +118,7 @@
page:this.page,
size:this.size
}
this.isLoading =false;
if(this.currentIndex == 0){
uni.showLoading({
title: '加载中'
@ -138,6 +142,7 @@
}
}
uni.hideLoading();
this.isLoading =true;
})
}
if(this.currentIndex == 1){
@ -150,15 +155,18 @@
id:item.id,
src:item.cover,
title:item.title,
time:this.dateFormat(item.published_at.replace(/-/g,'/'))
time:this.dateFormat(item.published_at.replace(/-/g,'/')),
}
newArr.push(obj)
})
this.collectionList = this.collectionList.concat(newArr);
console.log(this.collectionList,1212121)
if(this.collectionList.length == this.total){
this.totalAll = this.total;
}
}
uni.hideLoading();
this.isLoading =true;
})
}
},

View File

@ -2,7 +2,7 @@
<view>
<status-nav :ifReturn="true" navBarTitle="新闻详情" :marginBottom="0"></status-nav>
<!-- 新闻视频 -->
<view class="news-video-img" v-if="articleDetail.video">
<view class="news-video-img" v-if="articleDetail.video && isLoading">
<image :src="articleDetail.cover" mode="widthFix"></image>
<view class="news-video-btn" @tap.stop="playEv(articleDetail.video)">
<image src="/static/public/icon-suspend.png" mode="widthFix" v-if="videoPlay"></image>
@ -10,10 +10,10 @@
</view>
</view>
<!-- 视频弹窗 -->
<view class="news-video-content" v-if="videoPlay" :style="{width:newWidth+'px'}"></view>
<view class="news-video-content" v-if="videoPlay" :style="{width:newWidth+'px'}" @tap="closeVideo" style="background-color: rgba(0,0,0,1);"></view>
<video id="my-video" controls :src="articleDetail.video" v-if="videoPlay" @fullscreenchange="screenChange" :style="{width:newWidth+'px'}"></video>
<!-- 新闻概述 -->
<view class="shop-summary news-summary">
<view class="shop-summary news-summary" v-if="isLoading">
<view class="shop-title">{{articleDetail.title}}</view>
<view class="shop-txt news-txt flex">
<view class="left">
@ -34,7 +34,7 @@
</view>
</view>
<!-- 新闻详情 -->
<view class="shop-detail news-detail">
<view class="shop-detail news-detail" v-if="isLoading">
<rich-text :nodes="content"></rich-text>
</view>
</view>
@ -60,6 +60,7 @@
time:'', //
content:'',//
cacheBusinessId:-1, //id
isLoading:false,
}
},
computed:{
@ -114,6 +115,10 @@
this.videoPlay = false; //
}
},
closeVideo(){
//退
this.videoPlay = false; //
},
//
collectionEv(){
@ -130,6 +135,7 @@
uni.showLoading({
title: '加载中'
});
this.isLoading =false;
this.$requst.post('/api/archives/detail',{id:id}).then(res=>{
if(res.code==0) {
// console.log(res,'')
@ -138,6 +144,7 @@
this.content = this.$toolAll.tools.escape2Html(res.data.content)
}
uni.hideLoading();
this.isLoading =true;
})
},
//

View File

@ -2,9 +2,9 @@
<view class="pad-b150">
<status-nav :ifReturn="false" navBarTitle="资讯" :marginBottom="0"></status-nav>
<view class="nav-list-bg" :style="{top:newTop+'px'}">
<nav-tab :list="navTabList" @chooseEv="chooseEv"></nav-tab>
<nav-tab :list="navTabList" :maxNum="5" @chooseEv="chooseEv" :newWidth="newWidth"></nav-tab>
</view>
<view class="news-list-bg">
<view class="news-list-bg" v-if="isLoading">
<pull-list :list="articleList" :collection="0" @toDetail="toArticleDetail"></pull-list>
</view>
<!-- 暂无更多内容 -->
@ -46,6 +46,8 @@
total:0, //
totalAll:-1,//
cacheBusinessId:-1, //id
isLoading:false,
newWidth:'',
}
},
computed:{
@ -62,11 +64,13 @@
if(this.cacheBusinessId !== -1){
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
if(res.code == 0){
this.articleList=[];
this.getArticleNav();
userInfoEv();
}
})
}else{
this.articleList=[];
this.getArticleNav();
userInfoEv();
}
@ -96,13 +100,16 @@
getArticleNav(){
this.$requst.get('/api/archives/category').then(res=>{
if(res.code == 0){
let newArr = [];
res.data.forEach(item=>{
let obj = {
id:item.id,
name:item.title
}
this.navTabList.push(obj)
newArr.push(obj)
})
this.navTabList = newArr;
this.newWidth = this.navTabList.length*220-20+'rpx';
this.articleNavId = this.navTabList[0].id;
//
this.getArticleList();
@ -125,6 +132,7 @@
uni.showLoading({
title: '加载中'
});
this.isLoading =false;
let params = {
page:this.page,
size:this.size,
@ -149,6 +157,7 @@
}
}
uni.hideLoading();
this.isLoading =true;
})
},
//

View File

@ -125,10 +125,15 @@
uni.navigateTo({
url:`/pagesA/cart/finish?id=${res.data.id}&coding=${res.data.coding}`
})
setTimeout(()=>{
this.flag = true;
},1200)
}else{
console.log(res.msg,'提示信息')
this.$toolAll.tools.showToast(res.msg);
this.flag = true;
setTimeout(()=>{
this.flag = true;
},1200)
}
})
}

View File

@ -2,7 +2,7 @@
<view class="pad-b140">
<status-nav :ifReturn="true" navBarTitle="订单详情" :marginBottom="0"></status-nav>
<!-- 订单简介 -->
<view class="order-info-bg">
<view class="order-info-bg" v-if="isLoading">
<view class="order-info">
<view class="flex">
<text>订单编号</text>
@ -19,7 +19,7 @@
</view>
</view>
<!-- 订单信息 -->
<view class="order-list">
<view class="order-list" v-if="isLoading">
<view class="order-item order-item-detail">
<view class="order-information">订单信息</view>
<view class="item-bg">
@ -29,19 +29,19 @@
<view class="title">{{item.spu_name}}</view>
<view class="specs clips2">规格{{item.custom_title}}</view>
<view class="price flex">
<text>{{$toolAll.tools.changeNum(parseInt(item.price))}}</text>
<text>{{item.price}}</text>
<view><text>x</text>{{item.num}}</view>
</view>
</view>
</view>
</view>
<view class="total-price total-price-detail flex">
<text>总价{{$toolAll.tools.changeNum(parseInt(orderDetail.original_price))}}</text>
<text>总价{{orderDetail.original_price}}</text>
</view>
</view>
</view>
<!-- 联系方式 -->
<view class="contact-info-bg">
<view class="contact-info-bg" v-if="isLoading">
<view class="contact-info">
<view class="title">联系方式</view>
<view class="name">
@ -79,6 +79,7 @@
ifLoading:false,
id:0, //id
cacheBusinessId:-1, //id
isLoading:false,
}
},
onLoad(op) {
@ -122,11 +123,13 @@
uni.showLoading({
title: '加载中'
});
this.isLoading =false;
this.$requst.get('/api/user/order-detail',{id:this.id}).then(res=>{
if(res.code==0){
this.orderDetail = res.data;
}
uni.hideLoading();
this.isLoading =true;
})
},

View File

@ -7,7 +7,7 @@
</view>
<!-- 订单列表 -->
<view class="order-list">
<view class="order-item" @tap.stop="toDetail(item.id)" v-for="(item,index) in orderList" :key="index">
<view class="order-item" @tap.stop="toDetail(item.id)" v-for="(item,index) in orderList" :key="index" v-if="isLoading">
<view class="order-code flex">
<text>订单号{{item.coding}}</text>
<text class="status">{{item.status_text}}</text>
@ -19,14 +19,14 @@
<view class="title">{{item1.spu_name}}</view>
<view class="specs clips2">规格{{item1.custom_title}}</view>
<view class="price flex">
<text>{{$toolAll.tools.changeNum(parseInt(item1.price))}}</text>
<text>{{item1.price}}</text>
<view><text>x</text>{{item1.num}}</view>
</view>
</view>
</view>
</view>
<view class="total-price flex">
<text>合计{{$toolAll.tools.changeNum(item.original_price)}}</text>
<text>合计{{item.original_price}}</text>
<view class="btn" @tap.stop="cancleEv(item.coding)" v-if="item.status == 'ordered'"></view>
<view class="btn cur" @tap.stop="buyAgain(index)" v-if="item.status == 'completed' || item.status == 'closed'"></view>
</view>
@ -66,6 +66,7 @@
size: 10,
tag: 'all',
cacheBusinessId:-1, //id
isLoading:false,
}
},
onLoad(op) {
@ -128,6 +129,7 @@
uni.showLoading({
title: '加载中'
});
this.isLoading =false;
let params = {
page: this.page,
size: this.size,
@ -142,7 +144,7 @@
let obj = {
id: item.id, //id
coding: item.coding, //
original_price: parseInt(item.original_price), //
original_price: item.original_price, //
status: item.status, //
status_text: item.status_text, //
skus: item.skus //
@ -155,6 +157,7 @@
}
}
uni.hideLoading();
this.isLoading =true;
})
},
//

View File

@ -2,17 +2,17 @@
<view class="pad-b140">
<status-nav :ifReturn="true" navBarTitle="商品简介" :marginBottom="0"></status-nav>
<!-- 商品轮播图 -->
<view class="shop-img">
<view class="shop-img" v-if="isLoading">
<swiper-pu newRadius="0" :bannerList="shopBanner" newHeight="505rpx" newBottom="35rpx" :isplay='isplay'></swiper-pu>
</view>
<!-- 商品概述 -->
<view class="shop-summary">
<view class="shop-summary" v-if="isLoading">
<view class="shop-title">{{shopDetail.name}}</view>
<view class="shop-txt flex">
<view class="left">
<view class="shop-customized">{{shopDetail.tag==''?'':shopDetail.tag}}</view>
<view class="shop-pric">{{$toolAll.tools.changeNum(parseInt(shopDetail.original_price))}}</view>
<view class="shop-pric-vip" v-if="vipPrice"><text>会员价</text>{{$toolAll.tools.changeNum(parseInt(shopDetail.price))}}</view>
<view class="shop-pric">{{shopDetail.original_price}}</view>
<view class="shop-pric-vip" v-if="vipPrice"><text>会员价</text>{{shopDetail.price}}</view>
</view>
<view class="right flex">
<view class="collection-btn flex" :class="shopDetail.is_collected == 1?'active':''" @tap="collectionEv(shopDetail.id)">
@ -61,11 +61,11 @@
<view class="specs-detail-bg" v-if="isShow">
<view class="specs-detail">
<view class="close-specs" @tap="closeSpecs"><image src="/static/public/icon-close.png" mode="widthFix"></image></view>
<view class="price">{{$toolAll.tools.changeNum(parseInt(shopDetail.original_price))}}</view>
<view class="price" v-if="vipPrice"><text>会员价</text>{{$toolAll.tools.changeNum(parseInt(shopDetail.price))}}</view>
<view class="price">{{shopDetail.original_price}}</view>
<view class="price" v-if="vipPrice"><text>会员价</text>{{shopDetail.price}}</view>
<view class="specs-ul">
<text>规格</text>
<view class="specs-li flex" @tap="changeSpecs(index)" :class="specsIndex == index?'checked':''" v-for="(item,index) in shopSku" :key="index">{{item.custom_title}} {{item.cycle}}</view>
<view class="specs-li flex" @tap="changeSpecs(index)" :class="specsIndex == index?'checked':''" v-for="(item,index) in shopSku" :key="index">{{item.custom_title}} {{item.cycle!==''?''+item.cycle:''}}</view>
</view>
<view class="specs-detail-btn" @tap="buyNow(specsIndex)" v-if="changeBtns"></view>
<view class="specs-detail-btn" @tap="joinCart(specsIndex)" v-else></view>
@ -110,6 +110,7 @@
changeBtns:false, //
vipPrice:false, //
cacheBusinessId:-1, //id
isLoading:false,
}
},
computed:{
@ -187,6 +188,7 @@
uni.showLoading({
title: '加载中'
});
this.isLoading = false;
this.$requst.get('/api/spu/detail',{id:id}).then(res=>{
if(res.code==0) {
console.log(res,'详情')
@ -202,6 +204,7 @@
this.shopBanner = newArr; //
}
uni.hideLoading();
this.isLoading = true;
})
},
//
@ -247,6 +250,7 @@
if(this.$toolAll.tools.judgeAuth()) {
this.$requst.post('/api/order/shopping-cart-add',{sku_id:this.shopSku[index].id,num:1}).then(res=>{
if(res.code==0) {
getCartNum();
//
this.closeSpecs();
uni.navigateTo({

View File

@ -82,11 +82,13 @@
if(this.cacheBusinessId !== -1){
this.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{
if(res.code == 0){
this.shopList = [];
this.getShopScreen(); //
userInfoEv();
}
})
}else{
this.shopList = [];
this.getShopScreen(); //
userInfoEv();
}
@ -116,6 +118,7 @@
checkSort(index){
this.sortIndex = index;
this.sort = this.sortList[this.sortIndex].value;
this.shopList = [];
//
this.closeSort();
//
@ -138,6 +141,7 @@
checkCate(index){
this.cateIndex = index;
this.category_id = this.cateList[this.cateIndex].value;
this.shopList = [];
//
this.closeCate();
//
@ -180,12 +184,13 @@
});
this.ifLoading = true;
let params = {
business_id:this.company_id,
page:this.page,
size:this.size,
category_id:this.category_id,
sort:this.sort
}
this.$requst.post('/api/spu/list',params).then(res=>{
this.$requst.get('/api/spu/list',params).then(res=>{
if(res.code==0) {
this.total = res.data.total;
let newArr = [];

View File

@ -48,16 +48,14 @@
</view>
<!-- 修改弹窗 -->
<view class="pull-all-bg" v-show="isOpen" @tap="closeEdit"></view>
<view class="edit-box-bg"v-if="isOpen">
<view class="edit-box-bg" v-if="isOpen">
<view class="edit-box">
<view class="edit-close" @tap="closeEdit"><text>X</text></view>
<view class="title">{{title}}</view>
<view class="subtitle">{{subtitle}}</view>
<input class="input" type="text" v-model="msg" :placeholder="placeholder" placeholder-color="#c9c9c9" v-if="type=='input'">
<textarea class="textarea" v-model="msg" :placeholder="placeholder" placeholder-color="#c9c9c9" v-if="type=='textarea'"></textarea>
<view class="edit-btns">
<view class="btn" @tap="closeEdit"></view>
<view class="btn" @tap="submitEdit(field,msg)"></view>
</view>
<input class="input" type="text" v-model="msg" :placeholder="placeholder" placeholder-style="color:#000000" v-if="type=='input'">
<textarea class="textarea" v-model="msg" :placeholder="placeholder" placeholder-style="color:#000000" v-if="type=='textarea'"></textarea>
<view class="btn" @tap="submitEdit(field,msg)"></view>
</view>
</view>
</view>
@ -136,7 +134,7 @@
if(type == 'real_name'){
this.title = '姓名';
this.subtitle = '姓名';
this.placeholder = this.realName;
this.placeholder = this.realName==''?'请输入姓名':'this.realName';
this.isOpen = true;
this.type='input';
this.field = 'real_name';
@ -144,7 +142,7 @@
if(type == 'mobile'){
this.title = '电话';
this.subtitle = '电话';
this.placeholder = this.mobile;
this.placeholder = this.mobile==''?'请输入电话':this.mobile;
this.isOpen = true;
this.type='input';
this.field = 'mobile';
@ -152,7 +150,7 @@
if(type == 'area'){
this.title = '联系地址';
this.subtitle = '联系地址';
this.placeholder = this.area;
this.placeholder = this.area==''?'请输入联系地址':this.area;
this.isOpen = true;
this.type='input';
this.field = 'area';
@ -160,7 +158,7 @@
if(type == 'address'){
this.title = '详细地址';
this.subtitle = '详细地址';
this.placeholder = this.address;
this.placeholder = this.address==''?'请输入详细地址':this.address;
this.isOpen = true;
this.type='textarea';
this.field = 'address';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -790,6 +790,25 @@ page {background-color: #eaeaea;}
position: sticky;
left: 0;
z-index: 99;
overflow-x: auto;
}
.nav-list-bg::-webkit-scrollbar{
width: 0;
height: 0;
opacity: 0;
}
.nav-list-bg .pull-nav-btns{
justify-content: start !important;
}
.nav-list-bg .pull-nav-btns .btn{
width: 180rpx !important;
margin: 0 20rpx !important;
}
.nav-list-bg .pull-nav-btns .btn:first-child{
margin-left: 0 !important;
}
.nav-list-bg .pull-nav-btns .btn:last-child{
margin-right: 0 !important;
}
.news-list-bg{
padding: 10rpx 30rpx;
@ -1062,7 +1081,7 @@ page {background-color: #eaeaea;}
margin-right: 30rpx;
}
.collection-btn.active{
width: 70rpx;
width: 74rpx;
}
.collection-btn image{
width: 45rpx;
@ -1572,7 +1591,7 @@ video#my-video{
.vip-box-bg{
box-sizing: border-box;
width: 100%;
padding: 0 80rpx;
padding: 30rpx 80rpx 0;
position: fixed;
left: 0;
top: 50%;
@ -1586,6 +1605,25 @@ video#my-video{
background-color: #FFFFFF;
border-radius: 28rpx;
padding: 40rpx 60rpx;
position: relative;
}
.vip-box .vip-close{
display: flex;
justify-content: center;
align-items: center;
width: 60rpx;
height: 60rpx;
background-color: #d9d9d9;
border-radius: 100%;
position: absolute;
top: -30rpx;
right: -30rpx;
}
.vip-box .vip-close>text{
font-size: 30rpx;
-webkit-transform: scaleX(1.3);
transform: scaleX(1.3);
color: #FFFFFF;
}
.vip-box .title{
font-size: 32rpx;
@ -1598,7 +1636,7 @@ video#my-video{
}
.vip-box .vip-item .tips{
font-size: 28rpx;
color: #000000;
color: #666666;
line-height: 1.5;
margin-bottom: 10rpx;
}
@ -1609,28 +1647,20 @@ video#my-video{
.vip-box .input{
box-sizing: border-box;
width: 100%;
height: 60rpx;
padding: 0 10rpx;
border: 2rpx solid #c9c9c9;
height: 86rpx;
border-bottom: 2rpx solid #c9c9c9;
font-size: 28rpx;
color: #666666;
color: #000000;
}
.vip-box .vip-btns{
display: flex;
align-items: center;
justify-content: center;
.vip-box .btn{
width: 100%;
margin-top: 50rpx;
}
.vip-box .vip-btns .btn{
width: 150rpx;
background-color: #0073bc;
border-radius: 10rpx;
border-radius: 30rpx;
font-size: 30rpx;
line-height: 60rpx;
line-height: 96rpx;
text-align: center;
color: #FFFFFF;
margin: 0 30rpx;
margin-top: 70rpx;
}
.vip-box .vip-btns .btn:first-child{
background-color: #c9c9c9;
@ -1697,7 +1727,7 @@ video#my-video{
.edit-box-bg{
box-sizing: border-box;
width: 100%;
padding: 0 80rpx;
padding: 30rpx 45rpx 0;
position: fixed;
left: 0;
top: 50%;
@ -1710,7 +1740,26 @@ video#my-video{
width: 100%;
background-color: #FFFFFF;
border-radius: 28rpx;
padding: 40rpx 60rpx;
padding: 58rpx;
position: relative
}
.edit-box .edit-close{
display: flex;
justify-content: center;
align-items: center;
width: 60rpx;
height: 60rpx;
background-color: #d9d9d9;
border-radius: 100%;
position: absolute;
top: -30rpx;
right: -30rpx;
}
.edit-box .edit-close>text{
font-size: 30rpx;
-webkit-transform: scaleX(1.3);
transform: scaleX(1.3);
color: #FFFFFF;
}
.edit-box .title{
font-size: 32rpx;
@ -1723,7 +1772,7 @@ video#my-video{
font-size: 28rpx;
line-height: 1.5;
margin-bottom: 20rpx;
color: #999999;
color: #666666;
}
.edit-box .subtitle>text{
color: #d50000;
@ -1733,37 +1782,25 @@ video#my-video{
.edit-box .textarea{
box-sizing: border-box;
width: 100%;
height: 60rpx;
padding: 0 10rpx;
border: 2rpx solid #c9c9c9;
height: 86rpx;
border-bottom: 2rpx solid #c9c9c9;
font-size: 28rpx;
color: #000000;
}
.edit-box .textarea{
height: 150rpx;
padding: 10rpx;
padding: 10rpx 0;
line-height: 1.8;
}
.edit-box .edit-btns{
display: flex;
align-items: center;
justify-content: center;
.edit-box .btn{
width: 100%;
margin-top: 50rpx;
}
.edit-box .edit-btns .btn{
width: 150rpx;
background-color: #0073bc;
border-radius: 10rpx;
border-radius: 30rpx;
font-size: 30rpx;
line-height: 60rpx;
line-height: 96rpx;
text-align: center;
color: #FFFFFF;
margin: 0 30rpx;
}
.edit-box .edit-btns .btn:first-child{
background-color: #c9c9c9;
color: #000000;
margin-top: 70rpx;
}
/* 免责声明 */

View File

@ -114,7 +114,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
//
//
//
@ -140,13 +140,20 @@ var _default2 =
//展现方式
maxNum: {
type: Number,
default: 2 } },
default: 2 },
newWidth: {
type: String,
default: '' } },
data: function data() {
return {
currentIndex: 0 //当前位置
};
currentIndex: 0, //当前位置
left: '',
scrollLeft: '0px',
width: uni.getSystemInfoSync().windowWidth };
},
methods: {
// 导航选择事件
@ -157,6 +164,7 @@ var _default2 =
this.$emit('chooseEv', index, id);
}
} } };exports.default = _default2;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ }),

View File

@ -1 +1 @@
<view class="{{['pull-nav-btns','data-v-2197f1dc',type=='radio'?'search-btns':'']}}"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index"><block wx:if="{{type=='radio'}}"><view data-event-opts="{{[['tap',[['chooseEv',[index,'$0'],[[['list','',index,'id']]]]]]]}}" class="{{['data-v-2197f1dc',currentIndex==index?'radio-btn active':'radio-btn']}}" bindtap="__e"><view class="radio data-v-2197f1dc"></view><text class="data-v-2197f1dc">{{item.name}}</text></view></block></block><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index"><block wx:if="{{type=='list'&&index<=maxNum}}"><view data-event-opts="{{[['tap',[['chooseEv',[index,'$0'],[[['list','',index,'id']]]]]]]}}" class="{{['data-v-2197f1dc',currentIndex==index?'btn active':'btn']}}" bindtap="__e">{{item.name}}</view></block></block></view>
<view class="{{['pull-nav-btns','data-v-2197f1dc',type=='radio'?'search-btns':'']}}" style="{{'width:'+(newWidth)+';'}}"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index"><block wx:if="{{type=='radio'}}"><view data-event-opts="{{[['tap',[['chooseEv',[index,'$0'],[[['list','',index,'id']]]]]]]}}" class="{{['data-v-2197f1dc',currentIndex==index?'radio-btn active':'radio-btn']}}" bindtap="__e"><view class="radio data-v-2197f1dc"></view><text class="data-v-2197f1dc">{{item.name}}</text></view></block></block><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index"><block wx:if="{{type=='list'&&index<=maxNum}}"><view data-event-opts="{{[['tap',[['chooseEv',[index,'$0'],[[['list','',index,'id']]]]]]]}}" class="{{['data-v-2197f1dc',currentIndex==index?'btn active':'btn']}}" bindtap="__e">{{item.name}}</view></block></block></view>

View File

@ -3,6 +3,7 @@
display: flex;
justify-content: center;
align-items: center;
min-width: 100%;
padding: 25rpx 0;
}
.pull-nav-btns .btn.data-v-2197f1dc {

View File

@ -81,30 +81,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l0 = _vm.__map(_vm.listData, function(item, index) {
var $orig = _vm.__get_orig(item)
var g0 = _vm.vipPrice ? _vm.$toolAll.tools.changeNum(item.price) : null
var g1 = !_vm.vipPrice
? _vm.$toolAll.tools.changeNum(item.original_price)
: null
return {
$orig: $orig,
g0: g0,
g1: g1
}
})
var g2 = _vm.$toolAll.tools.changeNum(_vm.allPrice)
_vm.$mp.data = Object.assign(
{},
{
$root: {
l0: l0,
g2: g2
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -217,51 +193,6 @@ var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 9);function o
default: 0 } },
computed: _objectSpread({
windowWidth: function windowWidth() {
return uni.getSystemInfoSync().windowWidth;
},
// 总价及合计
allPrice: function allPrice() {var _this = this;
var allPrice = 0;
this.listData.forEach(function (item) {
if (item.ifcheck) {
if (_this.vipPrice) {
allPrice += _this.$toolAll.tools.operationEv(item.price, item.num, '*', 2) * 1;
} else {
allPrice += _this.$toolAll.tools.operationEv(item.original_price, item.num, '*', 2) * 1;
}
}
});
// return this.$toolAll.tools.addXiaoShu(allPrice);
return allPrice.toString();
},
// 要删除的数量
buyNum: function buyNum() {
var buyNum = 0;
this.listData.forEach(function (item) {
if (item.ifcheck) {
buyNum += 1;
}
});
return buyNum;
},
// 全选
allChoose: function allChoose() {
var ifAll = false;
if (this.listData.length) {
var temparr = this.listData.filter(function (item) {return item.ifcheck == false;});
temparr.length == 0 ? ifAll = true : ifAll = false;
}
return ifAll;
} },
(0, _vuex.mapState)({
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
data: function data() {
return {
listData: [],
@ -288,6 +219,51 @@ var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 9);function o
onShow: function onShow() {
},
computed: _objectSpread({
windowWidth: function windowWidth() {
return uni.getSystemInfoSync().windowWidth;
},
// 总价及合计
allPrice: function allPrice() {var _this = this;
var allPrice = 0;
this.listData.forEach(function (item) {
if (item.ifcheck) {
if (_this.vipPrice) {
allPrice += item.price * item.num;
} else {
allPrice += item.original_price * item.num;
}
}
});
return this.$toolAll.tools.addXiaoShu(allPrice);
// return allPrice;
},
// 要删除的数量
buyNum: function buyNum() {
var buyNum = 0;
this.listData.forEach(function (item) {
if (item.ifcheck) {
buyNum += 1;
}
});
return buyNum;
},
// 全选
allChoose: function allChoose() {
var ifAll = false;
if (this.listData.length) {
var temparr = this.listData.filter(function (item) {return item.ifcheck == false;});
temparr.length == 0 ? ifAll = true : ifAll = false;
}
return ifAll;
} },
(0, _vuex.mapState)({
footHeight: function footHeight(state) {return state.moduleA.footHeight;} })),
methods: {
getList: function getList() {var _this2 = this;
uni.showLoading();
@ -318,8 +294,8 @@ var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 9);function o
skuName: item.sku.sku_name,
is_series: item.spu.is_series,
slide_x: 0,
price: parseInt(item.sku.sku_price),
original_price: parseInt(item.sku.sku_original_price),
price: item.sku.sku_price,
original_price: item.sku.sku_original_price,
num: item.num,
ifcheck: _this2.skuId == item.sku_id ? true : false,
ifExit: true,
@ -337,6 +313,10 @@ var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 9);function o
// this.listData.push({id: 1,image: 'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',title: '标题',content: '描述描述描述描述描述描述',slide_x: 0,price:199,num:1,ifcheck:false,ifExit:true,ifShow:true})
// }
},
// 选中事件
chooseEv: function chooseEv(index) {
this.listData[index].ifcheck = !this.listData[index].ifcheck;
},
// 全选事件
chooseAll: function chooseAll() {
var exit = this.listData.filter(function (item) {return item.ifcheck == false;});
@ -371,10 +351,7 @@ var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 9);function o
}
},
// 选中事件
chooseEv: function chooseEv(index) {
this.listData[index].ifcheck = !this.listData[index].ifcheck;
},
// 数量加减事件
addCutEv: function addCutEv(index, num) {var _this3 = this;
if (this.listData[index].slide_x == 0) {

View File

@ -1 +1 @@
<view class="data-v-48b8e4cc"><view class="slide-list data-v-48b8e4cc"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="slide-item data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['clickItemMethod',['$0'],[[['listData','',index]]]]]]]}}" class="slide-item-li data-v-48b8e4cc" bindtap="__e"><label class="radio data-v-48b8e4cc"><radio checked="{{item.$orig.ifcheck}}" color="#0073bc" data-event-opts="{{[['tap',[['chooseEv',[index]]]]]}}" catchtap="__e" class="data-v-48b8e4cc"></radio></label><view data-event-opts="{{[['tap',[['goDetail',['$0','$1'],[[['listData','',index,'spuId']],[['listData','',index,'is_series']]]]]]]}}" class="shop-img data-v-48b8e4cc" bindtap="__e"><image src="{{item.$orig.image}}" mode="widthFix" class="data-v-48b8e4cc"></image></view><view class="shop-txt data-v-48b8e4cc"><view class="shop-txt-top data-v-48b8e4cc"><view class="title data-v-48b8e4cc">{{item.$orig.title}}</view><view class="specs clips2 data-v-48b8e4cc">{{"规格:"+(item.$orig.customTitle==''?item.$orig.skuName:item.$orig.customTitle)}}</view></view><view class="shop-txt-bottom data-v-48b8e4cc"><view class="price data-v-48b8e4cc">{{"¥"+(vipPrice?item.g0:item.g1)}}</view><view class="num data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['addCutEv',[index,0]]]]]}}" class="icon icon-cut count-btn _i data-v-48b8e4cc" style="{{'background-color:'+(item.$orig.num==minNum||item.$orig.slide_x!=0?'#d3d3d3':'#0073bc')+';'}}" catchtap="__e"></view><input class="input data-v-48b8e4cc" type="digit" disabled="{{item.$orig.slide_x!=0}}" data-event-opts="{{[['blur',[['blurEv',[index,'$event']]]],['focus',[['focusEv',['$0'],[[['listData','',index,'num']]]]]],['input',[['__set_model',['$0','num','$event',[]],[[['listData','',index]]]]]]]}}" value="{{item.$orig.num}}" bindblur="__e" bindfocus="__e" bindinput="__e"/><view data-event-opts="{{[['tap',[['addCutEv',[index,1]]]]]}}" class="icon icon-add count-btn _i data-v-48b8e4cc" style="{{'background-color:'+(item.$orig.num==maxNum||item.$orig.slide_x!=0?'#d3d3d3':'#0073bc')+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view><view class="change-all data-v-48b8e4cc"><label data-event-opts="{{[['tap',[['chooseAll',['$event']]]]]}}" class="label data-v-48b8e4cc" bindtap="__e"><radio style="transform:scale(.8);" checked="{{allChoose}}" color="#0073bc" class="data-v-48b8e4cc"></radio><text class="data-v-48b8e4cc">全选</text></label><view class="all-price data-v-48b8e4cc"><view class="price data-v-48b8e4cc">合计:<label class="_span data-v-48b8e4cc">{{"¥"+$root.g2}}</label></view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn data-v-48b8e4cc" style="{{'background:'+(!buyNum?'#cccccc':'#0073bc')+';'}}" bindtap="__e">{{allPrice==0?'去购物':'提交订单 ('+buyNum+')'}}</view></view></view><block wx:if="{{listData.length!=0&&total==listData.length}}"><view class="data-v-48b8e4cc"><pitera vue-id="ce62b2a8-1" textStr="—— 到底啦 ——" class="data-v-48b8e4cc" bind:__l="__l"></pitera></view></block><block wx:if="{{!ifLoading&&!listData.length}}"><nothing-page vue-id="ce62b2a8-2" content="您的购物车,空空如也(*^▽^*)" class="data-v-48b8e4cc" bind:__l="__l"></nothing-page></block></view>
<view class="data-v-48b8e4cc"><view class="slide-list data-v-48b8e4cc"><block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="slide-item data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['clickItemMethod',['$0'],[[['listData','',index]]]]]]]}}" class="slide-item-li data-v-48b8e4cc" bindtap="__e"><label class="radio data-v-48b8e4cc"><radio checked="{{item.ifcheck}}" color="#0073bc" data-event-opts="{{[['tap',[['chooseEv',[index]]]]]}}" catchtap="__e" class="data-v-48b8e4cc"></radio></label><view data-event-opts="{{[['tap',[['goDetail',['$0','$1'],[[['listData','',index,'spuId']],[['listData','',index,'is_series']]]]]]]}}" class="shop-img data-v-48b8e4cc" bindtap="__e"><image src="{{item.image}}" mode="widthFix" class="data-v-48b8e4cc"></image></view><view class="shop-txt data-v-48b8e4cc"><view class="shop-txt-top data-v-48b8e4cc"><view class="title clips2 data-v-48b8e4cc">{{item.title}}</view><view class="specs clips2 data-v-48b8e4cc">{{"规格:"+(item.customTitle==''?item.skuName:item.customTitle)}}</view></view><view class="shop-txt-bottom data-v-48b8e4cc"><view class="price data-v-48b8e4cc">{{"¥"+(vipPrice?item.price:item.original_price)}}</view><view class="num data-v-48b8e4cc"><view data-event-opts="{{[['tap',[['addCutEv',[index,0]]]]]}}" class="icon icon-cut count-btn _i data-v-48b8e4cc" style="{{'background-color:'+(item.num==minNum||item.slide_x!=0?'#d3d3d3':'#0073bc')+';'}}" catchtap="__e"></view><input class="input data-v-48b8e4cc" type="digit" disabled="{{item.slide_x!=0}}" data-event-opts="{{[['blur',[['blurEv',[index,'$event']]]],['focus',[['focusEv',['$0'],[[['listData','',index,'num']]]]]],['input',[['__set_model',['$0','num','$event',[]],[[['listData','',index]]]]]]]}}" value="{{item.num}}" bindblur="__e" bindfocus="__e" bindinput="__e"/><view data-event-opts="{{[['tap',[['addCutEv',[index,1]]]]]}}" class="icon icon-add count-btn _i data-v-48b8e4cc" style="{{'background-color:'+(item.num==maxNum||item.slide_x!=0?'#d3d3d3':'#0073bc')+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view><view class="change-all data-v-48b8e4cc"><label data-event-opts="{{[['tap',[['chooseAll',['$event']]]]]}}" class="label data-v-48b8e4cc" bindtap="__e"><radio style="transform:scale(.8);" checked="{{allChoose}}" color="#0073bc" class="data-v-48b8e4cc"></radio><text class="data-v-48b8e4cc">全选</text></label><view class="all-price data-v-48b8e4cc"><view class="price data-v-48b8e4cc">合计:<label class="_span data-v-48b8e4cc">{{"¥"+allPrice}}</label></view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn data-v-48b8e4cc" style="{{'background:'+(!buyNum?'#cccccc':'#0073bc')+';'}}" bindtap="__e">{{allPrice==0?'去购物':'提交订单 ('+buyNum+')'}}</view></view></view><block wx:if="{{listData.length!=0&&total==listData.length}}"><view class="data-v-48b8e4cc"><pitera vue-id="ce62b2a8-1" textStr="—— 到底啦 ——" class="data-v-48b8e4cc" bind:__l="__l"></pitera></view></block><block wx:if="{{!ifLoading&&!listData.length}}"><nothing-page vue-id="ce62b2a8-2" content="您的购物车,空空如也(*^▽^*)" class="data-v-48b8e4cc" bind:__l="__l"></nothing-page></block></view>

View File

@ -235,6 +235,7 @@ var _default = {
}
},
onShow: function onShow() {var _this = this;
this.companyIndex = 0;
if (this.cacheBusinessId !== -1) {
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
if (res.code == 0) {

View File

@ -1 +1 @@
<view class="pad-b150"><status-nav vue-id="c7684662-1" ifReturn="{{false}}" navBarTitle="分类" marginBottom="{{0}}" bind:__l="__l"></status-nav><view data-event-opts="{{[['tap',[['closeMore',['$event']]]]]}}" hidden="{{!(isShow)}}" class="pull-all-bg" bindtap="__e"></view><block wx:if="{{businessId==0}}"><view class="company-top"></view></block><block wx:if="{{businessId==0}}"><view class="company" style="{{'top:'+(topHieght+'px')+';'}}"><input type="text" data-event-opts="{{[['tap',[['openMore',['$event']]]]]}}" value="{{companyList[companyIndex].name?'工厂选择:'+companyList[companyIndex].name:''}}" bindtap="__e"/><block wx:if="{{isShow}}"><view class="company-list"><block wx:for="{{companyList}}" wx:for-item="item" wx:for-index="index"><view data-event-opts="{{[['tap',[['checkValue',[index,'$0'],[[['companyList','',index,'id']]]]]]]}}" class="{{['company-item',companyIndex==index?'cur':'']}}" bindtap="__e">{{item.name}}</view></block></view></block></view></block><block wx:if="{{cateList.length>0}}"><view class="{{['cate-nav-bg',businessId==0?'':'to-top']}}" style="{{'height:'+(scrollHeight+'px')+';'+('top:'+(topHieght+'px')+';')}}"><view class="cate-nav"><block wx:for="{{cateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeCate',[index,'$0'],[[['cateList','',index,'id']]]]]]]}}" class="{{['cate-nav-item',cateIndex==index?'active':'']}}" bindtap="__e">{{item.title}}</view></block></view></view></block><scroll-view class="{{['shop-list-bg',businessId==0?'':'to-top']}}"><view class="shop-list flex"><block wx:for="{{secondList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toShop',['$0'],[[['secondList','',index,'id']]]]]]]}}" class="shop-item" bindtap="__e"><view class="img flex"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt clips1">{{item.title}}</view></view></block></view><block wx:if="{{secondList.length==0&&isTips}}"><view class="tips">---没有更多分类---</view></block></scroll-view><block wx:if="{{cateList.length==0}}"><view class="cate-nothing-tips">---该商户没有分类---</view></block><enter-cart vue-id="c7684662-2" bind:__l="__l"></enter-cart><foot-tab vue-id="c7684662-3" current="1" bind:__l="__l"></foot-tab></view>
<view class="pad-b150"><status-nav vue-id="c7684662-1" ifReturn="{{false}}" navBarTitle="分类" marginBottom="{{0}}" bind:__l="__l"></status-nav><view data-event-opts="{{[['tap',[['closeMore',['$event']]]]]}}" hidden="{{!(isShow)}}" class="pull-all-bg" bindtap="__e"></view><block wx:if="{{businessId==0}}"><view class="company-top"></view></block><block wx:if="{{businessId==0}}"><view class="company" style="{{'top:'+(topHieght+'px')+';'}}"><input type="text" disabled="{{true}}" data-event-opts="{{[['tap',[['openMore',['$event']]]]]}}" value="{{companyList[companyIndex].name?'工厂选择:'+companyList[companyIndex].name:''}}" bindtap="__e"/><block wx:if="{{isShow}}"><view class="company-list"><block wx:for="{{companyList}}" wx:for-item="item" wx:for-index="index"><view data-event-opts="{{[['tap',[['checkValue',[index,'$0'],[[['companyList','',index,'id']]]]]]]}}" class="{{['company-item',companyIndex==index?'cur':'']}}" bindtap="__e">{{item.name}}</view></block></view></block></view></block><block wx:if="{{cateList.length>0}}"><view class="{{['cate-nav-bg',businessId==0?'':'to-top']}}" style="{{'height:'+(scrollHeight+'px')+';'+('top:'+(topHieght+'px')+';')}}"><view class="cate-nav"><block wx:for="{{cateList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeCate',[index,'$0'],[[['cateList','',index,'id']]]]]]]}}" class="{{['cate-nav-item',cateIndex==index?'active':'']}}" bindtap="__e">{{item.title}}</view></block></view></view></block><scroll-view class="{{['shop-list-bg',businessId==0?'':'to-top']}}"><view class="shop-list flex"><block wx:for="{{secondList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toShop',['$0'],[[['secondList','',index,'id']]]]]]]}}" class="shop-item" bindtap="__e"><view class="img flex"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="txt clips1">{{item.title}}</view></view></block></view><block wx:if="{{secondList.length==0&&isTips}}"><view class="tips">---没有更多分类---</view></block></scroll-view><block wx:if="{{cateList.length==0}}"><view class="cate-nothing-tips">---该商户没有分类---</view></block><enter-cart vue-id="c7684662-2" bind:__l="__l"></enter-cart><foot-tab vue-id="c7684662-3" current="1" bind:__l="__l"></foot-tab></view>

View File

@ -221,7 +221,6 @@ __webpack_require__.r(__webpack_exports__);
var _publicApi = __webpack_require__(/*! @/jsFile/public-api.js */ 9);
@ -247,16 +246,14 @@ var _default = {
recommendList: [], //推荐列表
productList: [], // 产品列表
articleNavId: '', //文章导航id
askList: [], //疑难解答列表
articleList: [], //文章列表
navTabList: [], //导航列表
currentIndex: 0, //当前位置
page: 1, //第几页
size: 5, //查询条数
total: 0, //数量
totalAll: -1, //总数
ifLoading: true,
indexTitle: '', //标题
cacheBusinessId: -1 //商户id
cacheBusinessId: -1, //商户id
isLoading: false,
showIndex: 0 //文章显示位置
};
},
computed: _objectSpread({},
@ -359,41 +356,37 @@ var _default = {
getArticleNav: function getArticleNav() {var _this5 = this;
this.$requst.get('/api/archives/category').then(function (res) {
if (res.code == 0) {
var newArr = [];
res.data.forEach(function (item) {
var obj = {
id: item.id,
name: item.title };
_this5.navTabList.push(obj);
newArr.push(obj);
});
_this5.articleNavId = _this5.navTabList[0].id;
_this5.navTabList = newArr;
// 获取文章列表
_this5.getAskList();
_this5.getArticleList();
}
});
},
// 切换事件
chooseEv: function chooseEv(index, id) {
if (this.currentIndex !== index) {
this.articleList = [];
this.page = 1;
this.total = 0;
this.totalAll = -1;
this.currentIndex = index;
this.articleNavId = id;
// 获取文章列表
this.getArticleList();
if (this.showIndex !== index) {
this.showIndex = index;
}
},
// 获取文章列表
getArticleList: function getArticleList() {var _this6 = this;
// 获取疑难解答列表
getAskList: function getAskList() {var _this6 = this;
uni.showLoading({
title: '加载中' });
this.isLoading = false;
var params = {
page: this.page,
size: this.size,
category_id: this.articleNavId };
category_id: this.navTabList[0].id };
this.$requst.get('/api/archives/list', params).then(function (res) {
if (res.code == 0) {
@ -408,12 +401,41 @@ var _default = {
newArr.push(obj);
});
_this6.articleList = newArr;
if (_this6.articleList.length == _this6.total) {
_this6.totalAll = _this6.total;
}
_this6.askList = newArr;
}
uni.hideLoading();
_this6.isLoading = true;
});
},
// 获取文章列表
getArticleList: function getArticleList() {var _this7 = this;
uni.showLoading({
title: '加载中' });
this.isLoading = false;
var params = {
page: this.page,
size: this.size,
category_id: this.navTabList[1].id };
this.$requst.get('/api/archives/list', params).then(function (res) {
if (res.code == 0) {
_this7.total = res.data.total;
var newArr = [];
res.data.list.forEach(function (item) {
var obj = {
id: item.id,
title: item.title,
time: _this7.dateFormat(item.published_at.replace(/-/g, '/')),
src: item.cover };
newArr.push(obj);
});
_this7.articleList = newArr;
}
uni.hideLoading();
_this7.isLoading = true;
});
},
// 时间格式转换

View File

@ -1 +1 @@
<block wx:if="{{!ifLoading}}"><view class="pad-b150 data-v-6b1f4146"><status-nav vue-id="f8c7e56e-1" ifReturn="{{false}}" navBarTitle="{{indexTitle}}" marginBottom="{{0}}" class="data-v-6b1f4146" bind:__l="__l"></status-nav><view class="search-bg data-v-6b1f4146"><view class="search flex data-v-6b1f4146"><image class="search-img data-v-6b1f4146" src="/static/public/icon-search.png" mode="widthFix"></image><input class="search-input data-v-6b1f4146" type="text" placeholder="请输入关键词" placeholder-style="color: #666666" data-event-opts="{{[['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindinput="__e"/><view class="search-line data-v-6b1f4146"></view><view data-event-opts="{{[['tap',[['toSearch',['$event']]]]]}}" class="search-btn flex data-v-6b1f4146" bindtap="__e">搜索</view></view></view><view class="banner data-v-6b1f4146"><swiper-pu vue-id="f8c7e56e-2" newRadius="0" bannerList="{{bannerList}}" newHeight="372rpx" newBottom="20rpx" isplay="{{isplay}}" class="data-v-6b1f4146" bind:__l="__l"></swiper-pu></view><view class="flag-list flex data-v-6b1f4146"><block wx:for="{{recommendList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toLink',['$0'],[[['recommendList','',index,'url']]]]]]]}}" class="flag-item data-v-6b1f4146" bindtap="__e"><view class="flag-img data-v-6b1f4146"><image class="search-img data-v-6b1f4146" src="{{item.src}}" mode="widthFix"></image></view><view class="flag-txt clips1 data-v-6b1f4146">{{item.title}}</view></view></block></view><block wx:for="{{productList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="index-product-list data-v-6b1f4146"><view class="product-list-title flex data-v-6b1f4146"><view class="txt data-v-6b1f4146"><text class="data-v-6b1f4146">{{item.title}}</text><view class="line data-v-6b1f4146"></view></view><view data-event-opts="{{[['tap',[['toMore',['$event']]]]]}}" class="more data-v-6b1f4146" bindtap="__e"><image src="/static/public/icon-more.png" mode="widthFix" class="data-v-6b1f4146"></image></view></view><product-list vue-id="{{'f8c7e56e-3-'+index}}" list="{{item.goods}}" newWidth="{{item.goods.length*460-490+'rpx'}}" data-event-opts="{{[['^toDetail',[['toShopDetail']]]]}}" bind:toDetail="__e" class="data-v-6b1f4146" bind:__l="__l"></product-list></view></block><view class="index-news data-v-6b1f4146"><nav-tab vue-id="f8c7e56e-4" list="{{navTabList}}" maxNum="{{1}}" data-event-opts="{{[['^chooseEv',[['chooseEv']]]]}}" bind:chooseEv="__e" class="data-v-6b1f4146" bind:__l="__l"></nav-tab><pull-list vue-id="f8c7e56e-5" list="{{articleList}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]]]}}" bind:toDetail="__e" class="data-v-6b1f4146" bind:__l="__l"></pull-list></view><block wx:if="{{totalAll==total}}"><view class="more-txt data-v-6b1f4146">暂无更多内容</view></block><enter-cart vue-id="f8c7e56e-6" class="data-v-6b1f4146" bind:__l="__l"></enter-cart><foot-tab vue-id="f8c7e56e-7" class="data-v-6b1f4146" bind:__l="__l"></foot-tab></view></block>
<block wx:if="{{!ifLoading}}"><view class="pad-b150 data-v-6b1f4146"><status-nav vue-id="f8c7e56e-1" ifReturn="{{false}}" navBarTitle="{{indexTitle}}" marginBottom="{{0}}" class="data-v-6b1f4146" bind:__l="__l"></status-nav><view class="search-bg data-v-6b1f4146"><view class="search flex data-v-6b1f4146"><image class="search-img data-v-6b1f4146" src="/static/public/icon-search.png" mode="widthFix"></image><input class="search-input data-v-6b1f4146" type="text" placeholder="请输入关键词" placeholder-style="color: #666666" data-event-opts="{{[['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindinput="__e"/><view class="search-line data-v-6b1f4146"></view><view data-event-opts="{{[['tap',[['toSearch',['$event']]]]]}}" class="search-btn flex data-v-6b1f4146" bindtap="__e">搜索</view></view></view><view class="banner data-v-6b1f4146"><swiper-pu vue-id="f8c7e56e-2" newRadius="0" bannerList="{{bannerList}}" newHeight="372rpx" newBottom="20rpx" isplay="{{isplay}}" class="data-v-6b1f4146" bind:__l="__l"></swiper-pu></view><view class="flag-list flex data-v-6b1f4146"><block wx:for="{{recommendList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toLink',['$0'],[[['recommendList','',index,'url']]]]]]]}}" class="flag-item data-v-6b1f4146" bindtap="__e"><view class="flag-img data-v-6b1f4146"><image class="search-img data-v-6b1f4146" src="{{item.src}}" mode="widthFix"></image></view><view class="flag-txt clips1 data-v-6b1f4146">{{item.title}}</view></view></block></view><block wx:for="{{productList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="index-product-list data-v-6b1f4146"><view class="product-list-title flex data-v-6b1f4146"><view class="txt data-v-6b1f4146"><text class="data-v-6b1f4146">{{item.title}}</text><view class="line data-v-6b1f4146"></view></view><view data-event-opts="{{[['tap',[['toMore',['$event']]]]]}}" class="more data-v-6b1f4146" bindtap="__e"><image src="/static/public/icon-more.png" mode="widthFix" class="data-v-6b1f4146"></image></view></view><product-list vue-id="{{'f8c7e56e-3-'+index}}" list="{{item.goods}}" newWidth="{{item.goods.length*460-490+'rpx'}}" data-event-opts="{{[['^toDetail',[['toShopDetail']]]]}}" bind:toDetail="__e" class="data-v-6b1f4146" bind:__l="__l"></product-list></view></block><view class="index-news data-v-6b1f4146"><nav-tab vue-id="f8c7e56e-4" list="{{navTabList}}" maxNum="{{1}}" data-event-opts="{{[['^chooseEv',[['chooseEv']]]]}}" bind:chooseEv="__e" class="data-v-6b1f4146" bind:__l="__l"></nav-tab><block wx:if="{{isLoading&&showIndex==0}}"><pull-list vue-id="f8c7e56e-5" list="{{askList}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]]]}}" bind:toDetail="__e" class="data-v-6b1f4146" bind:__l="__l"></pull-list></block><block wx:if="{{isLoading&&showIndex==1}}"><pull-list vue-id="f8c7e56e-6" list="{{articleList}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]]]}}" bind:toDetail="__e" class="data-v-6b1f4146" bind:__l="__l"></pull-list></block></view><enter-cart vue-id="f8c7e56e-7" class="data-v-6b1f4146" bind:__l="__l"></enter-cart><foot-tab vue-id="f8c7e56e-8" class="data-v-6b1f4146" bind:__l="__l"></foot-tab></view></block>

View File

@ -123,19 +123,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var g0 = _vm.$toolAll.tools.changeNum(parseInt(_vm.kitDetail.original_price))
var g1 = _vm.vipPrice
? _vm.$toolAll.tools.changeNum(parseInt(_vm.kitDetail.price))
: null
_vm.$mp.data = Object.assign(
{},
{
$root: {
g0: g0,
g1: g1
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -250,8 +237,9 @@ var _default = {
action: 'collect', //收藏类型
id: '', //套件id
vipPrice: false, // 是否显示会员价
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
computed: _objectSpread({},
(0, _vuex.mapState)({
@ -260,6 +248,7 @@ var _default = {
onLoad: function onLoad(op) {
if (op !== '') {
this.id = op.id;
if (op.business_id) {
this.cacheBusinessId = op.business_id;
}
@ -269,13 +258,11 @@ var _default = {
if (this.cacheBusinessId !== -1) {
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
if (res.code == 0) {
_this.id = op.id;
_this.getKitDetail(_this.id);
(0, _publicApi.userInfoEv)();
}
});
} else {
this.id = op.id;
this.getKitDetail(this.id);
(0, _publicApi.userInfoEv)();
}
@ -304,7 +291,9 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
console.log(res, 99999);
if (res.code == 0) {
_this2.kitDetail = res.data.detail; //套件详情
_this2.kitSku = res.data.sku; //套件规格
@ -318,6 +307,7 @@ var _default = {
_this2.kitBanner = newArr; //详情轮播图
}
uni.hideLoading();
_this2.isLoading = true;
});
},
//收藏

View File

@ -1 +1 @@
<view class="pad-b140"><status-nav vue-id="6c2aabf4-1" ifReturn="{{true}}" navBarTitle="套件简介" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="shop-img"><swiper-pu vue-id="6c2aabf4-2" newRadius="0" bannerList="{{kitBanner}}" newHeight="505rpx" newBottom="35rpx" isplay="{{isplay}}" bind:__l="__l"></swiper-pu></view><view class="shop-summary kit-summary"><view class="shop-title">{{kitDetail.name}}</view><view class="shop-txt flex"><view class="left"><view class="kit-compose">{{kitDetail.subtitle}}</view><view class="shop-customized">{{kitDetail.customized==1?'可定制':'不可定制'}}</view><view class="shop-pric">{{"¥"+$root.g0}}</view><block wx:if="{{vipPrice}}"><view class="shop-pric-vip"><text>会员价:</text>{{"¥"+$root.g1}}</view></block></view><view class="right flex"><view data-event-opts="{{[['tap',[['collectionEv',['$0'],['kitDetail.id']]]]]}}" class="{{['collection-btn','flex',kitDetail.is_collected==1?'active':'']}}" bindtap="__e"><image src="/static/public/icon-collection.png" mode="widthFix"></image><text>{{kitDetail.is_collected==1?'已收藏':'收藏'}}</text></view><view class="share-btn flex"><image src="/static/public/icon-share.png" mode="widthFix"></image><text>分享</text><button plain="true" data-name="shareBtn" open-type="share"></button></view></view></view></view><view class="kit-contain"><view class="contain-h2">套件包含</view><view class="contain-list flex"><block wx:for="{{kitDetail.series}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['kitDetail.series','',index,'id']]]]]]]}}" class="contain-item" bindtap="__e"><view class="contain-img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="contain-title clips2">{{item.name}}</view></view></block></view></view><view class="shop-btns flex"><view data-event-opts="{{[['tap',[['joinCart',['$0'],['specsIndex']]]]]}}" class="btn" bindtap="__e">加入购物车</view><view data-event-opts="{{[['tap',[['buyNow',['$0'],['specsIndex']]]]]}}" class="btn" bindtap="__e">立即购买</view></view><enter-cart vue-id="6c2aabf4-3" bottom="{{335}}" bind:__l="__l"></enter-cart><customer-service vue-id="6c2aabf4-4" bind:__l="__l"></customer-service></view>
<view class="pad-b140"><status-nav vue-id="6c2aabf4-1" ifReturn="{{true}}" navBarTitle="套件简介" marginBottom="{{0}}" bind:__l="__l"></status-nav><block wx:if="{{isLoading}}"><view class="shop-img"><swiper-pu vue-id="6c2aabf4-2" newRadius="0" bannerList="{{kitBanner}}" newHeight="505rpx" newBottom="35rpx" isplay="{{isplay}}" bind:__l="__l"></swiper-pu></view></block><block wx:if="{{isLoading}}"><view class="shop-summary kit-summary"><view class="shop-title">{{kitDetail.name}}</view><view class="shop-txt flex"><view class="left"><view class="kit-compose">{{kitDetail.subtitle}}</view><view class="shop-customized">{{kitDetail.tag}}</view><view class="shop-pric">{{"¥"+kitDetail.original_price}}</view><block wx:if="{{vipPrice}}"><view class="shop-pric-vip"><text>会员价:</text>{{"¥"+kitDetail.price}}</view></block></view><view class="right flex"><view data-event-opts="{{[['tap',[['collectionEv',['$0'],['kitDetail.id']]]]]}}" class="{{['collection-btn','flex',kitDetail.is_collected==1?'active':'']}}" bindtap="__e"><image src="/static/public/icon-collection.png" mode="widthFix"></image><text>{{kitDetail.is_collected==1?'已收藏':'收藏'}}</text></view><view class="share-btn flex"><image src="/static/public/icon-share.png" mode="widthFix"></image><text>分享</text><button plain="true" data-name="shareBtn" open-type="share"></button></view></view></view></view></block><block wx:if="{{isLoading}}"><view class="kit-contain"><view class="contain-h2">套件包含</view><view class="contain-list flex"><block wx:for="{{kitDetail.series}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['kitDetail.series','',index,'id']]]]]]]}}" class="contain-item" bindtap="__e"><view class="contain-img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="contain-title clips2">{{item.name}}</view></view></block></view></view></block><block wx:if="{{isLoading}}"><view class="shop-btns flex"><view data-event-opts="{{[['tap',[['joinCart',['$0'],['specsIndex']]]]]}}" class="btn" bindtap="__e">加入购物车</view><view data-event-opts="{{[['tap',[['buyNow',['$0'],['specsIndex']]]]]}}" class="btn" bindtap="__e">立即购买</view></view></block><enter-cart vue-id="6c2aabf4-3" bottom="{{335}}" bind:__l="__l"></enter-cart><customer-service vue-id="6c2aabf4-4" bind:__l="__l"></customer-service></view>

View File

@ -215,8 +215,9 @@ var _default = {
totalAll: -1, //计算总数
category_id: 0, //分类id
sort: 'new', //排序
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
computed: _objectSpread({},
(0, _vuex.mapState)({
@ -232,11 +233,13 @@ var _default = {
if (this.cacheBusinessId !== -1) {
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
if (res.code == 0) {
_this.kitList = [];
_this.getKitEv();
(0, _publicApi.userInfoEv)();
}
});
} else {
this.kitList = [];
this.getKitEv();
(0, _publicApi.userInfoEv)();
}
@ -268,6 +271,7 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
var params = {
page: this.page,
size: this.size,
@ -293,6 +297,7 @@ var _default = {
}
}
uni.hideLoading();
_this2.isLoading = true;
});
},
// 跳转详情页

View File

@ -1 +1 @@
<view class="pad-b150"><status-nav vue-id="2b600381-1" ifReturn="{{false}}" navBarTitle="套件" marginBottom="{{20}}" bind:__l="__l"></status-nav><view class="kit-list"><block wx:for="{{kitList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['kitList','',index,'id']]]]]]]}}" class="kit-item" catchtap="__e"><view class="kit-title">{{item.name}}</view><view class="kit-compose"><block wx:for="{{item.series}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><text>{{item1.name+"+"}}</text></block><text>组合</text></view><view class="kit-img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="compose-list-bg"><block wx:if="{{item.series.length>0}}"><view class="compose-list flex" style="{{'width:'+(item.series.length*270-22+'rpx')+';'}}"><block wx:for="{{item.series}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"><view class="compose-item"><view class="compose-img"><image src="{{item2.cover}}" mode="widthFix"></image></view><view class="compose-title clips1">{{item2.name}}</view></view></block></view></block></view></view></block></view><block wx:if="{{totalAll==total}}"><view class="more-txt">暂无更多内容</view></block><enter-cart vue-id="2b600381-2" bind:__l="__l"></enter-cart><foot-tab vue-id="2b600381-3" current="2" bind:__l="__l"></foot-tab></view>
<view class="pad-b150"><status-nav vue-id="2b600381-1" ifReturn="{{false}}" navBarTitle="套件" marginBottom="{{20}}" bind:__l="__l"></status-nav><view class="kit-list"><block wx:for="{{kitList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{isLoading}}"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['kitList','',index,'id']]]]]]]}}" class="kit-item" catchtap="__e"><view class="kit-title">{{item.name}}</view><view class="kit-compose"><block wx:for="{{item.series}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><text>{{item1.name}}</text></block></view><view class="kit-img"><image src="{{item.cover}}" mode="widthFix"></image></view><view class="compose-list-bg"><block wx:if="{{item.series.length>0}}"><view class="compose-list flex" style="{{'width:'+(item.series.length*270-22+'rpx')+';'}}"><block wx:for="{{item.series}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"><view class="compose-item"><view class="compose-img"><image src="{{item2.cover}}" mode="widthFix"></image></view><view class="compose-title clips1">{{item2.name}}</view></view></block></view></block></view></view></block></block></view><block wx:if="{{totalAll==total}}"><view class="more-txt">暂无更多内容</view></block><enter-cart vue-id="2b600381-2" bind:__l="__l"></enter-cart><foot-tab vue-id="2b600381-3" current="2" bind:__l="__l"></foot-tab></view>

View File

@ -123,6 +123,24 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l0 = _vm.__map(_vm.listData, function(item, index) {
var $orig = _vm.__get_orig(item)
var g0 = _vm.showObj.indexOf(index.toString())
return {
$orig: $orig,
g0: g0
}
})
_vm.$mp.data = Object.assign(
{},
{
$root: {
l0: l0
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -237,37 +255,6 @@ __webpack_require__.r(__webpack_exports__);
@ -330,7 +317,8 @@ var _default = {
flag: true,
vipCode: '', //会员码
isChecked: false, //验证会员码
cacheBusinessId: -1 //商户id
cacheBusinessId: -1, //商户id
showObj: '0123457' //隐藏Index
};
},
onReachBottom: function onReachBottom() {
@ -383,6 +371,9 @@ var _default = {
_this2.myOrder[1].num = newArr.ordered,
_this2.myOrder[2].num = newArr.completed,
_this2.myOrder[3].num = newArr.closed;
if (_this2.businessCode !== '') {
_this2.showObj = '0134567';
}
}
uni.hideLoading();
});
@ -423,7 +414,9 @@ var _default = {
}
if (index == 1) {
this.isChecked = true;
if (this.businessCode == '') {
this.isChecked = true;
}
}
if (index == 2) {
this.isVip = true;
@ -499,6 +492,7 @@ var _default = {
this.$requst.post('/api/user/check-code', { code: this.vipCode }).then(function (res) {
if (res.code == 0) {
_this6.$toolAll.tools.showToast('验证成功');
_this6.getUserInfo(); //刷新个人信息
_this6.closeCheck(); //清除验证信息
} else {
_this6.$toolAll.tools.showToast(res.msg);

File diff suppressed because one or more lines are too long

View File

@ -201,8 +201,9 @@ var _default = {
total: 0, //总数
totalAll: -1, //计算总数
isShop: true, //是否商品
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
computed: _objectSpread({},
(0, _vuex.mapState)({
@ -218,11 +219,13 @@ var _default = {
if (this.cacheBusinessId !== -1) {
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
if (res.code == 0) {
_this.collectionList = [];
_this.getCollectionList();
(0, _publicApi.userInfoEv)();
}
});
} else {
this.collectionList = [];
this.getCollectionList();
(0, _publicApi.userInfoEv)();
}
@ -273,6 +276,7 @@ var _default = {
page: this.page,
size: this.size };
this.isLoading = false;
if (this.currentIndex == 0) {
uni.showLoading({
title: '加载中' });
@ -296,6 +300,7 @@ var _default = {
}
}
uni.hideLoading();
_this2.isLoading = true;
});
}
if (this.currentIndex == 1) {
@ -313,10 +318,13 @@ var _default = {
newArr.push(obj);
});
_this2.collectionList = _this2.collectionList.concat(newArr);
console.log(_this2.collectionList, 1212121);
if (_this2.collectionList.length == _this2.total) {
_this2.totalAll = _this2.total;
}
}
uni.hideLoading();
_this2.isLoading = true;
});
}
},

View File

@ -1 +1 @@
<view><status-nav vue-id="2acca338-1" ifReturn="{{true}}" navBarTitle="收藏" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="nav-list-bg" style="{{'top:'+(newTop+'px')+';'}}"><nav-tab vue-id="2acca338-2" list="{{navTabList}}" data-event-opts="{{[['^chooseEv',[['chooseEv']]]]}}" bind:chooseEv="__e" bind:__l="__l"></nav-tab></view><view class="news-list-bg"><pull-list vue-id="2acca338-3" list="{{collectionList}}" collection="{{1}}" isShop="{{isShop}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]],['^collectionEv',[['collectionEv']]]]}}" bind:toDetail="__e" bind:collectionEv="__e" bind:__l="__l"></pull-list></view><block wx:if="{{total!==0&&totalAll==total}}"><view class="more-txt more-txt-other">暂无更多内容</view></block><block wx:if="{{total==0&&totalAll==total}}"><nothing-page vue-id="2acca338-4" content="还没有相关收藏哟(*^▽^*)" bind:__l="__l"></nothing-page></block></view>
<view><status-nav vue-id="2acca338-1" ifReturn="{{true}}" navBarTitle="收藏" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="nav-list-bg" style="{{'top:'+(newTop+'px')+';'}}"><nav-tab vue-id="2acca338-2" list="{{navTabList}}" data-event-opts="{{[['^chooseEv',[['chooseEv']]]]}}" bind:chooseEv="__e" bind:__l="__l"></nav-tab></view><block wx:if="{{isLoading}}"><view class="news-list-bg"><pull-list vue-id="2acca338-3" list="{{collectionList}}" collection="{{1}}" isShop="{{isShop}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]],['^collectionEv',[['collectionEv']]]]}}" bind:toDetail="__e" bind:collectionEv="__e" bind:__l="__l"></pull-list></view></block><block wx:if="{{total!==0&&totalAll==total}}"><view class="more-txt more-txt-other">暂无更多内容</view></block><block wx:if="{{total==0&&totalAll==total}}"><nothing-page vue-id="2acca338-4" content="还没有相关收藏哟(*^▽^*)" bind:__l="__l"></nothing-page></block></view>

View File

@ -191,8 +191,9 @@ var _default = {
action: 'collect', //收藏类型
time: '', //发布时间
content: '', //文章内容
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
computed: {},
@ -246,6 +247,10 @@ var _default = {
this.videoPlay = false; // 隐藏播放盒子
}
},
closeVideo: function closeVideo() {
//退出全屏
this.videoPlay = false; // 隐藏播放盒子
},
//收藏
collectionEv: function collectionEv() {
@ -262,6 +267,7 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
this.$requst.post('/api/archives/detail', { id: id }).then(function (res) {
if (res.code == 0) {
// console.log(res,'文章详情')
@ -270,6 +276,7 @@ var _default = {
_this2.content = _this2.$toolAll.tools.escape2Html(res.data.content);
}
uni.hideLoading();
_this2.isLoading = true;
});
},
// 时间格式转换

View File

@ -1 +1 @@
<view><status-nav vue-id="62ffe691-1" ifReturn="{{true}}" navBarTitle="新闻详情" marginBottom="{{0}}" bind:__l="__l"></status-nav><block wx:if="{{articleDetail.video}}"><view class="news-video-img"><image src="{{articleDetail.cover}}" mode="widthFix"></image><view data-event-opts="{{[['tap',[['playEv',['$0'],['articleDetail.video']]]]]}}" class="news-video-btn" catchtap="__e"><block wx:if="{{videoPlay}}"><image src="/static/public/icon-suspend.png" mode="widthFix"></image></block><block wx:else><image src="/static/public/icon-play.png" mode="widthFix"></image></block></view></view></block><block wx:if="{{videoPlay}}"><view class="news-video-content" style="{{'width:'+(newWidth+'px')+';'}}"></view></block><block wx:if="{{videoPlay}}"><video style="{{'width:'+(newWidth+'px')+';'}}" id="my-video" controls="{{true}}" src="{{articleDetail.video}}" data-event-opts="{{[['fullscreenchange',[['screenChange',['$event']]]]]}}" bindfullscreenchange="__e"></video></block><view class="shop-summary news-summary"><view class="shop-title">{{articleDetail.title}}</view><view class="shop-txt news-txt flex"><view class="left"><view class="news-author">{{"作者:"+articleDetail.author}}</view><view class="news-time">{{"发布时间:"+time}}</view></view><view class="right flex"><view data-event-opts="{{[['tap',[['collectionEv',['$0'],['articleDetail.id']]]]]}}" class="{{['collection-btn','flex',articleDetail.is_collected==1?'active':'']}}" bindtap="__e"><image src="/static/public/icon-collection.png" mode="widthFix"></image><text>{{articleDetail.is_collected==1?'已收藏':'收藏'}}</text></view><view class="share-btn flex"><image src="/static/public/icon-share.png" mode="widthFix"></image><text>分享</text><button plain="true" data-name="shareBtn" open-type="share"></button></view></view></view></view><view class="shop-detail news-detail"><rich-text nodes="{{content}}"></rich-text></view></view>
<view><status-nav vue-id="62ffe691-1" ifReturn="{{true}}" navBarTitle="新闻详情" marginBottom="{{0}}" bind:__l="__l"></status-nav><block wx:if="{{articleDetail.video&&isLoading}}"><view class="news-video-img"><image src="{{articleDetail.cover}}" mode="widthFix"></image><view data-event-opts="{{[['tap',[['playEv',['$0'],['articleDetail.video']]]]]}}" class="news-video-btn" catchtap="__e"><block wx:if="{{videoPlay}}"><image src="/static/public/icon-suspend.png" mode="widthFix"></image></block><block wx:else><image src="/static/public/icon-play.png" mode="widthFix"></image></block></view></view></block><block wx:if="{{videoPlay}}"><view data-event-opts="{{[['tap',[['closeVideo',['$event']]]]]}}" class="news-video-content" style="{{'background-color:rgba(0,0,0,1);'+('width:'+(newWidth+'px')+';')}}" bindtap="__e"></view></block><block wx:if="{{videoPlay}}"><video style="{{'width:'+(newWidth+'px')+';'}}" id="my-video" controls="{{true}}" src="{{articleDetail.video}}" data-event-opts="{{[['fullscreenchange',[['screenChange',['$event']]]]]}}" bindfullscreenchange="__e"></video></block><block wx:if="{{isLoading}}"><view class="shop-summary news-summary"><view class="shop-title">{{articleDetail.title}}</view><view class="shop-txt news-txt flex"><view class="left"><view class="news-author">{{"作者:"+articleDetail.author}}</view><view class="news-time">{{"发布时间:"+time}}</view></view><view class="right flex"><view data-event-opts="{{[['tap',[['collectionEv',['$0'],['articleDetail.id']]]]]}}" class="{{['collection-btn','flex',articleDetail.is_collected==1?'active':'']}}" bindtap="__e"><image src="/static/public/icon-collection.png" mode="widthFix"></image><text>{{articleDetail.is_collected==1?'已收藏':'收藏'}}</text></view><view class="share-btn flex"><image src="/static/public/icon-share.png" mode="widthFix"></image><text>分享</text><button plain="true" data-name="shareBtn" open-type="share"></button></view></view></view></view></block><block wx:if="{{isLoading}}"><view class="shop-detail news-detail"><rich-text nodes="{{content}}"></rich-text></view></block></view>

View File

@ -198,7 +198,7 @@ var _default = {
footTab: footTab },
data: function data() {
return {
return _defineProperty({
scrollHeight: uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50,
newWidth: uni.getSystemInfoSync().windowWidth,
newTop: uni.getSystemInfoSync().statusBarHeight + 50,
@ -209,8 +209,10 @@ var _default = {
size: 10, //查询条数
total: 0, //总数
totalAll: -1, //总数
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false }, "newWidth",
'');
},
computed: _objectSpread({},
(0, _vuex.mapState)({
@ -226,11 +228,13 @@ var _default = {
if (this.cacheBusinessId !== -1) {
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
if (res.code == 0) {
_this.articleList = [];
_this.getArticleNav();
(0, _publicApi.userInfoEv)();
}
});
} else {
this.articleList = [];
this.getArticleNav();
(0, _publicApi.userInfoEv)();
}
@ -260,13 +264,16 @@ var _default = {
getArticleNav: function getArticleNav() {var _this2 = this;
this.$requst.get('/api/archives/category').then(function (res) {
if (res.code == 0) {
var newArr = [];
res.data.forEach(function (item) {
var obj = {
id: item.id,
name: item.title };
_this2.navTabList.push(obj);
newArr.push(obj);
});
_this2.navTabList = newArr;
_this2.newWidth = _this2.navTabList.length * 220 - 20 + 'rpx';
_this2.articleNavId = _this2.navTabList[0].id;
// 获取文章列表
_this2.getArticleList();
@ -289,6 +296,7 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
var params = {
page: this.page,
size: this.size,
@ -313,6 +321,7 @@ var _default = {
}
}
uni.hideLoading();
_this3.isLoading = true;
});
},
// 时间格式转换

View File

@ -1 +1 @@
<view class="pad-b150"><status-nav vue-id="08fb4b62-1" ifReturn="{{false}}" navBarTitle="资讯" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="nav-list-bg" style="{{'top:'+(newTop+'px')+';'}}"><nav-tab vue-id="08fb4b62-2" list="{{navTabList}}" data-event-opts="{{[['^chooseEv',[['chooseEv']]]]}}" bind:chooseEv="__e" bind:__l="__l"></nav-tab></view><view class="news-list-bg"><pull-list vue-id="08fb4b62-3" list="{{articleList}}" collection="{{0}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]]]}}" bind:toDetail="__e" bind:__l="__l"></pull-list></view><block wx:if="{{totalAll==total}}"><view class="more-txt">暂无更多内容</view></block><enter-cart vue-id="08fb4b62-4" bind:__l="__l"></enter-cart><foot-tab vue-id="08fb4b62-5" current="3" bind:__l="__l"></foot-tab></view>
<view class="pad-b150"><status-nav vue-id="08fb4b62-1" ifReturn="{{false}}" navBarTitle="资讯" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="nav-list-bg" style="{{'top:'+(newTop+'px')+';'}}"><nav-tab vue-id="08fb4b62-2" list="{{navTabList}}" maxNum="{{5}}" newWidth="{{newWidth}}" data-event-opts="{{[['^chooseEv',[['chooseEv']]]]}}" bind:chooseEv="__e" bind:__l="__l"></nav-tab></view><block wx:if="{{isLoading}}"><view class="news-list-bg"><pull-list vue-id="08fb4b62-3" list="{{articleList}}" collection="{{0}}" data-event-opts="{{[['^toDetail',[['toArticleDetail']]]]}}" bind:toDetail="__e" bind:__l="__l"></pull-list></view></block><block wx:if="{{totalAll==total}}"><view class="more-txt">暂无更多内容</view></block><enter-cart vue-id="08fb4b62-4" bind:__l="__l"></enter-cart><foot-tab vue-id="08fb4b62-5" current="3" bind:__l="__l"></foot-tab></view>

View File

@ -257,10 +257,15 @@ function getDate(type) {
uni.navigateTo({
url: "/pagesA/cart/finish?id=".concat(res.data.id, "&coding=").concat(res.data.coding) });
setTimeout(function () {
_this3.flag = true;
}, 1200);
} else {
console.log(res.msg, '提示信息');
_this3.$toolAll.tools.showToast(res.msg);
_this3.flag = true;
setTimeout(function () {
_this3.flag = true;
}, 1200);
}
});
}

View File

@ -120,28 +120,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l0 = _vm.__map(_vm.orderDetail.skus, function(item, index) {
var $orig = _vm.__get_orig(item)
var g0 = _vm.$toolAll.tools.changeNum(parseInt(item.price))
return {
$orig: $orig,
g0: g0
}
})
var g1 = _vm.$toolAll.tools.changeNum(
parseInt(_vm.orderDetail.original_price)
)
_vm.$mp.data = Object.assign(
{},
{
$root: {
l0: l0,
g1: g1
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -255,8 +233,9 @@ var _default = {
flag: true,
ifLoading: false,
id: 0, //订单id
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
onLoad: function onLoad(op) {
if (op.id !== '') {
@ -299,11 +278,13 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {
if (res.code == 0) {
_this2.orderDetail = res.data;
}
uni.hideLoading();
_this2.isLoading = true;
});
},

View File

@ -1 +1 @@
<view class="pad-b140 data-v-35bf19e6"><status-nav vue-id="fbb6b840-1" ifReturn="{{true}}" navBarTitle="订单详情" marginBottom="{{0}}" class="data-v-35bf19e6" bind:__l="__l"></status-nav><view class="order-info-bg data-v-35bf19e6"><view class="order-info data-v-35bf19e6"><view class="flex data-v-35bf19e6"><text class="data-v-35bf19e6">订单编号</text><text class="data-v-35bf19e6">{{orderDetail.coding}}</text></view><view class="flex data-v-35bf19e6"><text class="data-v-35bf19e6">下单时间</text><text class="data-v-35bf19e6">{{orderDetail.created_at}}</text></view><view class="flex data-v-35bf19e6"><text class="data-v-35bf19e6">订单状态</text><text class="data-v-35bf19e6">{{orderDetail.status_text}}</text></view></view></view><view class="order-list data-v-35bf19e6"><view class="order-item order-item-detail data-v-35bf19e6"><view class="order-information data-v-35bf19e6">订单信息</view><view class="item-bg data-v-35bf19e6"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0','$1'],[[['orderDetail.skus','',index,'spu_id']],[['orderDetail.skus','',index,'is_series']]]]]]]}}" class="item flex data-v-35bf19e6" bindtap="__e"><view class="img data-v-35bf19e6"><image src="{{item.$orig.spu_cover}}" mode="widthFix" class="data-v-35bf19e6"></image></view><view class="txt data-v-35bf19e6"><view class="title data-v-35bf19e6">{{item.$orig.spu_name}}</view><view class="specs clips2 data-v-35bf19e6">{{"规格:"+item.$orig.custom_title}}</view><view class="price flex data-v-35bf19e6"><text class="data-v-35bf19e6">{{"¥"+item.g0}}</text><view class="data-v-35bf19e6"><text class="data-v-35bf19e6">x</text>{{item.$orig.num}}</view></view></view></view></block></view><view class="total-price total-price-detail flex data-v-35bf19e6"><text class="data-v-35bf19e6">{{"总价:¥"+$root.g1}}</text></view></view></view><view class="contact-info-bg data-v-35bf19e6"><view class="contact-info data-v-35bf19e6"><view class="title data-v-35bf19e6">联系方式</view><view class="name data-v-35bf19e6"><text class="data-v-35bf19e6">{{orderDetail.contact}}</text><text class="data-v-35bf19e6">{{orderDetail.phone}}</text></view><view class="item data-v-35bf19e6">{{orderDetail.address}}</view><block wx:if="{{orderDetail.remarks!==''}}"><view class="item data-v-35bf19e6">{{"希望到货时间:"+orderDetail.remarks}}</view></block></view></view><view class="shop-btns order-btns flex data-v-35bf19e6"><block wx:if="{{orderDetail.status=='ordered'}}"><view data-event-opts="{{[['tap',[['cancleEv',['$event']]]]]}}" class="btn btn-grey data-v-35bf19e6" bindtap="__e">取消订单</view></block><block wx:if="{{orderDetail.status=='completed'||orderDetail.status=='closed'}}"><view data-event-opts="{{[['tap',[['buyAgain',['$event']]]]]}}" class="btn data-v-35bf19e6" bindtap="__e">再次购买</view></block></view><customer-service vue-id="fbb6b840-2" class="data-v-35bf19e6" bind:__l="__l"></customer-service></view>
<view class="pad-b140 data-v-35bf19e6"><status-nav vue-id="fbb6b840-1" ifReturn="{{true}}" navBarTitle="订单详情" marginBottom="{{0}}" class="data-v-35bf19e6" bind:__l="__l"></status-nav><block wx:if="{{isLoading}}"><view class="order-info-bg data-v-35bf19e6"><view class="order-info data-v-35bf19e6"><view class="flex data-v-35bf19e6"><text class="data-v-35bf19e6">订单编号</text><text class="data-v-35bf19e6">{{orderDetail.coding}}</text></view><view class="flex data-v-35bf19e6"><text class="data-v-35bf19e6">下单时间</text><text class="data-v-35bf19e6">{{orderDetail.created_at}}</text></view><view class="flex data-v-35bf19e6"><text class="data-v-35bf19e6">订单状态</text><text class="data-v-35bf19e6">{{orderDetail.status_text}}</text></view></view></view></block><block wx:if="{{isLoading}}"><view class="order-list data-v-35bf19e6"><view class="order-item order-item-detail data-v-35bf19e6"><view class="order-information data-v-35bf19e6">订单信息</view><view class="item-bg data-v-35bf19e6"><block wx:for="{{orderDetail.skus}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0','$1'],[[['orderDetail.skus','',index,'spu_id']],[['orderDetail.skus','',index,'is_series']]]]]]]}}" class="item flex data-v-35bf19e6" bindtap="__e"><view class="img data-v-35bf19e6"><image src="{{item.spu_cover}}" mode="widthFix" class="data-v-35bf19e6"></image></view><view class="txt data-v-35bf19e6"><view class="title data-v-35bf19e6">{{item.spu_name}}</view><view class="specs clips2 data-v-35bf19e6">{{"规格:"+item.custom_title}}</view><view class="price flex data-v-35bf19e6"><text class="data-v-35bf19e6">{{"¥"+item.price}}</text><view class="data-v-35bf19e6"><text class="data-v-35bf19e6">x</text>{{item.num}}</view></view></view></view></block></view><view class="total-price total-price-detail flex data-v-35bf19e6"><text class="data-v-35bf19e6">{{"总价:¥"+orderDetail.original_price}}</text></view></view></view></block><block wx:if="{{isLoading}}"><view class="contact-info-bg data-v-35bf19e6"><view class="contact-info data-v-35bf19e6"><view class="title data-v-35bf19e6">联系方式</view><view class="name data-v-35bf19e6"><text class="data-v-35bf19e6">{{orderDetail.contact}}</text><text class="data-v-35bf19e6">{{orderDetail.phone}}</text></view><view class="item data-v-35bf19e6">{{orderDetail.address}}</view><block wx:if="{{orderDetail.remarks!==''}}"><view class="item data-v-35bf19e6">{{"希望到货时间:"+orderDetail.remarks}}</view></block></view></view></block><view class="shop-btns order-btns flex data-v-35bf19e6"><block wx:if="{{orderDetail.status=='ordered'}}"><view data-event-opts="{{[['tap',[['cancleEv',['$event']]]]]}}" class="btn btn-grey data-v-35bf19e6" bindtap="__e">取消订单</view></block><block wx:if="{{orderDetail.status=='completed'||orderDetail.status=='closed'}}"><view data-event-opts="{{[['tap',[['buyAgain',['$event']]]]]}}" class="btn data-v-35bf19e6" bindtap="__e">再次购买</view></block></view><customer-service vue-id="fbb6b840-2" class="data-v-35bf19e6" bind:__l="__l"></customer-service></view>

View File

@ -97,35 +97,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l1 = _vm.__map(_vm.orderList, function(item, index) {
var $orig = _vm.__get_orig(item)
var l0 = _vm.__map(item.skus, function(item1, index1) {
var $orig = _vm.__get_orig(item1)
var g0 = _vm.$toolAll.tools.changeNum(parseInt(item1.price))
return {
$orig: $orig,
g0: g0
}
})
var g1 = _vm.$toolAll.tools.changeNum(item.original_price)
return {
$orig: $orig,
l0: l0,
g1: g1
}
})
_vm.$mp.data = Object.assign(
{},
{
$root: {
l1: l1
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -226,8 +197,9 @@ var _default = {
page: 1,
size: 10,
tag: 'all',
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
onLoad: function onLoad(op) {
if (op.tag !== '') {
@ -289,6 +261,7 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
var params = {
page: this.page,
size: this.size,
@ -303,7 +276,7 @@ var _default = {
var obj = {
id: item.id, //id
coding: item.coding, //订单号
original_price: parseInt(item.original_price), //总价
original_price: item.original_price, //总价
status: item.status, //订单状态英文
status_text: item.status_text, //订单状态中文
skus: item.skus //订单详情
@ -316,6 +289,7 @@ var _default = {
}
}
uni.hideLoading();
_this2.isLoading = true;
});
},
// 去详情

View File

@ -1 +1 @@
<view class="data-v-0d5a9fc9"><status-nav vue-id="c40c4b46-1" ifReturn="{{true}}" navBarTitle="订单管理" marginBottom="{{0}}" class="data-v-0d5a9fc9" bind:__l="__l"></status-nav><view class="order-nav flex data-v-0d5a9fc9" style="{{'top:'+(newTop+'px')+';'}}"><block wx:for="{{orderNav}}" wx:for-item="item" wx:for-index="index"><view data-event-opts="{{[['tap',[['changeNav',[index,'$0'],[[['orderNav','',index,'tag']]]]]]]}}" class="{{['item','data-v-0d5a9fc9',activeIndex==index?'cur':'']}}" bindtap="__e">{{item.title}}</view></block></view><view class="order-list data-v-0d5a9fc9"><block wx:for="{{$root.l1}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['orderList','',index,'id']]]]]]]}}" class="order-item data-v-0d5a9fc9" catchtap="__e"><view class="order-code flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"订单号:"+item.$orig.coding}}</text><text class="status data-v-0d5a9fc9">{{item.$orig.status_text}}</text></view><view class="item-bg data-v-0d5a9fc9"><block wx:for="{{item.l0}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="item flex data-v-0d5a9fc9"><view class="img data-v-0d5a9fc9"><image src="{{item1.$orig.spu_cover}}" mode="widthFix" class="data-v-0d5a9fc9"></image></view><view class="txt data-v-0d5a9fc9"><view class="title data-v-0d5a9fc9">{{item1.$orig.spu_name}}</view><view class="specs clips2 data-v-0d5a9fc9">{{"规格:"+item1.$orig.custom_title}}</view><view class="price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"¥"+item1.g0}}</text><view class="data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">x</text>{{item1.$orig.num}}</view></view></view></view></block></view><view class="total-price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"合计:¥"+item.g1}}</text><block wx:if="{{item.$orig.status=='ordered'}}"><view data-event-opts="{{[['tap',[['cancleEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn data-v-0d5a9fc9" catchtap="__e">取消订单</view></block><block wx:if="{{item.$orig.status=='completed'||item.$orig.status=='closed'}}"><view data-event-opts="{{[['tap',[['buyAgain',[index]]]]]}}" class="btn cur data-v-0d5a9fc9" catchtap="__e">再次购买</view></block></view></view></block></view><block wx:if="{{total!==0&&totalAll==total}}"><view class="more-txt data-v-0d5a9fc9" style="padding-bottom:40rpx;">—— 到底啦 ——</view></block><block wx:if="{{total==0&&totalAll==total}}"><nothing-page vue-id="c40c4b46-2" content="还没有相关订单哟(*^▽^*)" class="data-v-0d5a9fc9" bind:__l="__l"></nothing-page></block></view>
<view class="data-v-0d5a9fc9"><status-nav vue-id="c40c4b46-1" ifReturn="{{true}}" navBarTitle="订单管理" marginBottom="{{0}}" class="data-v-0d5a9fc9" bind:__l="__l"></status-nav><view class="order-nav flex data-v-0d5a9fc9" style="{{'top:'+(newTop+'px')+';'}}"><block wx:for="{{orderNav}}" wx:for-item="item" wx:for-index="index"><view data-event-opts="{{[['tap',[['changeNav',[index,'$0'],[[['orderNav','',index,'tag']]]]]]]}}" class="{{['item','data-v-0d5a9fc9',activeIndex==index?'cur':'']}}" bindtap="__e">{{item.title}}</view></block></view><view class="order-list data-v-0d5a9fc9"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><block wx:if="{{isLoading}}"><view data-event-opts="{{[['tap',[['toDetail',['$0'],[[['orderList','',index,'id']]]]]]]}}" class="order-item data-v-0d5a9fc9" catchtap="__e"><view class="order-code flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"订单号:"+item.coding}}</text><text class="status data-v-0d5a9fc9">{{item.status_text}}</text></view><view class="item-bg data-v-0d5a9fc9"><block wx:for="{{item.skus}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="item flex data-v-0d5a9fc9"><view class="img data-v-0d5a9fc9"><image src="{{item1.spu_cover}}" mode="widthFix" class="data-v-0d5a9fc9"></image></view><view class="txt data-v-0d5a9fc9"><view class="title data-v-0d5a9fc9">{{item1.spu_name}}</view><view class="specs clips2 data-v-0d5a9fc9">{{"规格:"+item1.custom_title}}</view><view class="price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"¥"+item1.price}}</text><view class="data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">x</text>{{item1.num}}</view></view></view></view></block></view><view class="total-price flex data-v-0d5a9fc9"><text class="data-v-0d5a9fc9">{{"合计:¥"+item.original_price}}</text><block wx:if="{{item.status=='ordered'}}"><view data-event-opts="{{[['tap',[['cancleEv',['$0'],[[['orderList','',index,'coding']]]]]]]}}" class="btn data-v-0d5a9fc9" catchtap="__e">取消订单</view></block><block wx:if="{{item.status=='completed'||item.status=='closed'}}"><view data-event-opts="{{[['tap',[['buyAgain',[index]]]]]}}" class="btn cur data-v-0d5a9fc9" catchtap="__e">再次购买</view></block></view></view></block></block></view><block wx:if="{{total!==0&&totalAll==total}}"><view class="more-txt data-v-0d5a9fc9" style="padding-bottom:40rpx;">—— 到底啦 ——</view></block><block wx:if="{{total==0&&totalAll==total}}"><nothing-page vue-id="c40c4b46-2" content="还没有相关订单哟(*^▽^*)" class="data-v-0d5a9fc9" bind:__l="__l"></nothing-page></block></view>

View File

@ -123,28 +123,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var g0 = _vm.$toolAll.tools.changeNum(parseInt(_vm.shopDetail.original_price))
var g1 = _vm.vipPrice
? _vm.$toolAll.tools.changeNum(parseInt(_vm.shopDetail.price))
: null
var g2 = _vm.isShow
? _vm.$toolAll.tools.changeNum(parseInt(_vm.shopDetail.original_price))
: null
var g3 =
_vm.isShow && _vm.vipPrice
? _vm.$toolAll.tools.changeNum(parseInt(_vm.shopDetail.price))
: null
_vm.$mp.data = Object.assign(
{},
{
$root: {
g0: g0,
g1: g1,
g2: g2,
g3: g3
}
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -289,8 +267,9 @@ var _default = {
action: 'collect', //收藏类型
changeBtns: false, //按钮选择
vipPrice: false, //显示会员价
cacheBusinessId: -1 //商户id
};
cacheBusinessId: -1, //商户id
isLoading: false };
},
computed: _objectSpread({},
(0, _vuex.mapState)({
@ -367,6 +346,7 @@ var _default = {
uni.showLoading({
title: '加载中' });
this.isLoading = false;
this.$requst.get('/api/spu/detail', { id: id }).then(function (res) {
if (res.code == 0) {
console.log(res, '详情');
@ -382,6 +362,7 @@ var _default = {
_this2.shopBanner = newArr; //详情轮播图
}
uni.hideLoading();
_this2.isLoading = true;
});
},
//收藏
@ -427,6 +408,7 @@ var _default = {
if (this.$toolAll.tools.judgeAuth()) {
this.$requst.post('/api/order/shopping-cart-add', { sku_id: this.shopSku[index].id, num: 1 }).then(function (res) {
if (res.code == 0) {
(0, _publicApi.getCartNum)();
// 关闭弹窗
_this5.closeSpecs();
uni.navigateTo({

View File

@ -1 +1 @@
<view class="pad-b140"><status-nav vue-id="d5d4c780-1" ifReturn="{{true}}" navBarTitle="商品简介" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="shop-img"><swiper-pu vue-id="d5d4c780-2" newRadius="0" bannerList="{{shopBanner}}" newHeight="505rpx" newBottom="35rpx" isplay="{{isplay}}" bind:__l="__l"></swiper-pu></view><view class="shop-summary"><view class="shop-title">{{shopDetail.name}}</view><view class="shop-txt flex"><view class="left"><view class="shop-customized">{{shopDetail.tag==''?'':shopDetail.tag}}</view><view class="shop-pric">{{"¥"+$root.g0}}</view><block wx:if="{{vipPrice}}"><view class="shop-pric-vip"><text>会员价:</text>{{"¥"+$root.g1}}</view></block></view><view class="right flex"><view data-event-opts="{{[['tap',[['collectionEv',['$0'],['shopDetail.id']]]]]}}" class="{{['collection-btn','flex',shopDetail.is_collected==1?'active':'']}}" bindtap="__e"><image src="/static/public/icon-collection.png" mode></image><text>{{shopDetail.is_collected==1?'已收藏':'收藏'}}</text></view><view class="share-btn flex"><image src="/static/public/icon-share.png" mode></image><text>分享</text><button plain="true" data-name="shareBtn" open-type="share"></button></view></view></view><view data-event-opts="{{[['tap',[['openSpecs',[1]]]]]}}" class="specs-btn flex" bindtap="__e"><image src="/static/public/icon-specs.png" mode="widthFix"></image><text>规格:查看详细规格</text><image src="/static/public/icon-more.png" mode="widthFix"></image></view></view><view class="shop-detail"><view class="shop-detail-tab flex"><block wx:for="{{shopDetailTab}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeDetail',[index]]]]]}}" class="{{['tab-btn',showCurrent==index?'cur':'']}}" bindtap="__e">{{item}}</view></block></view><view class="shop-detail-txt"><block wx:if="{{showCurrent==0}}"><view class="txt-box"><rich-text nodes="{{shopDetail.content}}"></rich-text></view></block><block wx:if="{{showCurrent==1}}"><view class="txt-box"><view><rich-text nodes="{{shopDetail.params}}"></rich-text></view></view></block></view></view><block wx:if="{{source=='shop'}}"><view class="shop-btns flex"><view data-event-opts="{{[['tap',[['openSpecs',[0]]]]]}}" class="btn" bindtap="__e">加入购物车</view><view data-event-opts="{{[['tap',[['openSpecs',[1]]]]]}}" class="btn" bindtap="__e">立即购买</view></view></block><block wx:if="{{source=='kit'}}"><view class="kit-shop-btns"><view data-event-opts="{{[['tap',[['backEv',['$event']]]]]}}" class="btn" bindtap="__e">返回套件继续购买</view></view></block><block wx:if="{{isShow}}"><view data-event-opts="{{[['tap',[['closeSpecs',['$event']]]]]}}" class="pull-all-bg" bindtap="__e"></view></block><block wx:if="{{isShow}}"><view class="specs-detail-bg"><view class="specs-detail"><view data-event-opts="{{[['tap',[['closeSpecs',['$event']]]]]}}" class="close-specs" bindtap="__e"><image src="/static/public/icon-close.png" mode="widthFix"></image></view><view class="price">{{"¥"+$root.g2}}</view><block wx:if="{{vipPrice}}"><view class="price"><text>会员价:</text>{{"¥"+$root.g3}}</view></block><view class="specs-ul"><text>规格</text><block wx:for="{{shopSku}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeSpecs',[index]]]]]}}" class="{{['specs-li','flex',specsIndex==index?'checked':'']}}" bindtap="__e">{{item.custom_title+" 供货周期:"+item.cycle}}</view></block></view><block wx:if="{{changeBtns}}"><view data-event-opts="{{[['tap',[['buyNow',['$0'],['specsIndex']]]]]}}" class="specs-detail-btn" bindtap="__e">立即购买</view></block><block wx:else><view data-event-opts="{{[['tap',[['joinCart',['$0'],['specsIndex']]]]]}}" class="specs-detail-btn" bindtap="__e">加入购物车</view></block></view></view></block><enter-cart vue-id="d5d4c780-3" bottom="{{335}}" bind:__l="__l"></enter-cart><customer-service vue-id="d5d4c780-4" bind:__l="__l"></customer-service></view>
<view class="pad-b140"><status-nav vue-id="d5d4c780-1" ifReturn="{{true}}" navBarTitle="商品简介" marginBottom="{{0}}" bind:__l="__l"></status-nav><block wx:if="{{isLoading}}"><view class="shop-img"><swiper-pu vue-id="d5d4c780-2" newRadius="0" bannerList="{{shopBanner}}" newHeight="505rpx" newBottom="35rpx" isplay="{{isplay}}" bind:__l="__l"></swiper-pu></view></block><block wx:if="{{isLoading}}"><view class="shop-summary"><view class="shop-title">{{shopDetail.name}}</view><view class="shop-txt flex"><view class="left"><view class="shop-customized">{{shopDetail.tag==''?'':shopDetail.tag}}</view><view class="shop-pric">{{"¥"+shopDetail.original_price}}</view><block wx:if="{{vipPrice}}"><view class="shop-pric-vip"><text>会员价:</text>{{"¥"+shopDetail.price}}</view></block></view><view class="right flex"><view data-event-opts="{{[['tap',[['collectionEv',['$0'],['shopDetail.id']]]]]}}" class="{{['collection-btn','flex',shopDetail.is_collected==1?'active':'']}}" bindtap="__e"><image src="/static/public/icon-collection.png" mode></image><text>{{shopDetail.is_collected==1?'已收藏':'收藏'}}</text></view><view class="share-btn flex"><image src="/static/public/icon-share.png" mode></image><text>分享</text><button plain="true" data-name="shareBtn" open-type="share"></button></view></view></view><view data-event-opts="{{[['tap',[['openSpecs',[1]]]]]}}" class="specs-btn flex" bindtap="__e"><image src="/static/public/icon-specs.png" mode="widthFix"></image><text>规格:查看详细规格</text><image src="/static/public/icon-more.png" mode="widthFix"></image></view></view></block><view class="shop-detail"><view class="shop-detail-tab flex"><block wx:for="{{shopDetailTab}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeDetail',[index]]]]]}}" class="{{['tab-btn',showCurrent==index?'cur':'']}}" bindtap="__e">{{item}}</view></block></view><view class="shop-detail-txt"><block wx:if="{{showCurrent==0}}"><view class="txt-box"><rich-text nodes="{{shopDetail.content}}"></rich-text></view></block><block wx:if="{{showCurrent==1}}"><view class="txt-box"><view><rich-text nodes="{{shopDetail.params}}"></rich-text></view></view></block></view></view><block wx:if="{{source=='shop'}}"><view class="shop-btns flex"><view data-event-opts="{{[['tap',[['openSpecs',[0]]]]]}}" class="btn" bindtap="__e">加入购物车</view><view data-event-opts="{{[['tap',[['openSpecs',[1]]]]]}}" class="btn" bindtap="__e">立即购买</view></view></block><block wx:if="{{source=='kit'}}"><view class="kit-shop-btns"><view data-event-opts="{{[['tap',[['backEv',['$event']]]]]}}" class="btn" bindtap="__e">返回套件继续购买</view></view></block><block wx:if="{{isShow}}"><view data-event-opts="{{[['tap',[['closeSpecs',['$event']]]]]}}" class="pull-all-bg" bindtap="__e"></view></block><block wx:if="{{isShow}}"><view class="specs-detail-bg"><view class="specs-detail"><view data-event-opts="{{[['tap',[['closeSpecs',['$event']]]]]}}" class="close-specs" bindtap="__e"><image src="/static/public/icon-close.png" mode="widthFix"></image></view><view class="price">{{"¥"+shopDetail.original_price}}</view><block wx:if="{{vipPrice}}"><view class="price"><text>会员价:</text>{{"¥"+shopDetail.price}}</view></block><view class="specs-ul"><text>规格</text><block wx:for="{{shopSku}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['changeSpecs',[index]]]]]}}" class="{{['specs-li','flex',specsIndex==index?'checked':'']}}" bindtap="__e">{{item.custom_title+" "+(item.cycle!==''?'供货周期:'+item.cycle:'')}}</view></block></view><block wx:if="{{changeBtns}}"><view data-event-opts="{{[['tap',[['buyNow',['$0'],['specsIndex']]]]]}}" class="specs-detail-btn" bindtap="__e">立即购买</view></block><block wx:else><view data-event-opts="{{[['tap',[['joinCart',['$0'],['specsIndex']]]]]}}" class="specs-detail-btn" bindtap="__e">加入购物车</view></block></view></view></block><enter-cart vue-id="d5d4c780-3" bottom="{{335}}" bind:__l="__l"></enter-cart><customer-service vue-id="d5d4c780-4" bind:__l="__l"></customer-service></view>

View File

@ -135,11 +135,13 @@ var _default = {
if (this.cacheBusinessId !== -1) {
this.$requst.post('/api/index/change-business', { business_id: this.cacheBusinessId }).then(function (res) {
if (res.code == 0) {
_this.shopList = [];
_this.getShopScreen(); //查询商品分类
(0, _publicApi.userInfoEv)();
}
});
} else {
this.shopList = [];
this.getShopScreen(); //查询商品分类
(0, _publicApi.userInfoEv)();
}
@ -169,6 +171,7 @@ var _default = {
checkSort: function checkSort(index) {
this.sortIndex = index;
this.sort = this.sortList[this.sortIndex].value;
this.shopList = [];
// 关闭厂家选择
this.closeSort();
//查询商品列表
@ -191,6 +194,7 @@ var _default = {
checkCate: function checkCate(index) {
this.cateIndex = index;
this.category_id = this.cateList[this.cateIndex].value;
this.shopList = [];
// 关闭厂家选择
this.closeCate();
//查询商品列表
@ -233,12 +237,13 @@ var _default = {
this.ifLoading = true;
var params = {
business_id: this.company_id,
page: this.page,
size: this.size,
category_id: this.category_id,
sort: this.sort };
this.$requst.post('/api/spu/list', params).then(function (res) {
this.$requst.get('/api/spu/list', params).then(function (res) {
if (res.code == 0) {
_this3.total = res.data.total;
var newArr = [];

View File

@ -192,8 +192,6 @@ __webpack_require__.r(__webpack_exports__);
@ -268,7 +266,7 @@ var _default = {
if (type == 'real_name') {
this.title = '姓名';
this.subtitle = '姓名';
this.placeholder = this.realName;
this.placeholder = this.realName == '' ? '请输入姓名' : 'this.realName';
this.isOpen = true;
this.type = 'input';
this.field = 'real_name';
@ -276,7 +274,7 @@ var _default = {
if (type == 'mobile') {
this.title = '电话';
this.subtitle = '电话';
this.placeholder = this.mobile;
this.placeholder = this.mobile == '' ? '请输入电话' : this.mobile;
this.isOpen = true;
this.type = 'input';
this.field = 'mobile';
@ -284,7 +282,7 @@ var _default = {
if (type == 'area') {
this.title = '联系地址';
this.subtitle = '联系地址';
this.placeholder = this.area;
this.placeholder = this.area == '' ? '请输入联系地址' : this.area;
this.isOpen = true;
this.type = 'input';
this.field = 'area';
@ -292,7 +290,7 @@ var _default = {
if (type == 'address') {
this.title = '详细地址';
this.subtitle = '详细地址';
this.placeholder = this.address;
this.placeholder = this.address == '' ? '请输入详细地址' : this.address;
this.isOpen = true;
this.type = 'textarea';
this.field = 'address';

View File

@ -1 +1 @@
<view class="{{[editRealName&editMobile&editArea&editAddress?'':'pad-b150']}}"><status-nav vue-id="54360644-1" ifReturn="{{true}}" navBarTitle="个人中心" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="ucenter"><view class="item flex"><view class="title">头像</view><view class="img"><image src="{{headImgUrl}}" mode="widthFix"></image></view></view><view class="item flex"><view class="title">昵称</view><view class="msg">{{nickName}}</view></view><view data-event-opts="{{[['tap',[['openEdit',['real_name']]]]]}}" class="item flex" bindtap="__e"><view class="title">真实姓名</view><input class="msg" type="text" disabled="true" data-event-opts="{{[['input',[['__set_model',['','realName','$event',[]]]]]]}}" value="{{realName}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view></view><view class="item flex" style="position:relative;"><view class="title">联系电话</view><input class="msg" type="number" disabled="true" data-event-opts="{{[['input',[['__set_model',['','mobile','$event',[]]]]]]}}" value="{{mobile}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view><button class="get-phone-btn" open-type="getPhoneNumber" data-event-opts="{{[['getphonenumber',[['onGetPhoneNumber',['$event']]]]]}}" bindgetphonenumber="__e"></button></view><view data-event-opts="{{[['tap',[['openEdit',['area']]]]]}}" class="item flex" bindtap="__e"><view class="title">联系地址</view><input class="msg" type="text" disabled="true" data-event-opts="{{[['input',[['__set_model',['','area','$event',[]]]]]]}}" value="{{area}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view></view><view data-event-opts="{{[['tap',[['openEdit',['address']]]]]}}" class="item flex" bindtap="__e"><view class="title">详细地址</view><input class="msg" type="text" disabled="true" data-event-opts="{{[['input',[['__set_model',['','address','$event',[]]]]]]}}" value="{{address}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view></view><block wx:if="{{businessCode!==''}}"><view class="item flex"><view class="title">会员码</view><view class="msg">{{businessCode}}</view></view></block></view><view data-event-opts="{{[['tap',[['closeEdit',['$event']]]]]}}" hidden="{{!(isOpen)}}" class="pull-all-bg" bindtap="__e"></view><block wx:if="{{isOpen}}"><view class="edit-box-bg"><view class="edit-box"><view class="title">{{title}}</view><view class="subtitle">{{subtitle}}</view><block wx:if="{{type=='input'}}"><input class="input" type="text" placeholder="{{placeholder}}" placeholder-color="#c9c9c9" data-event-opts="{{[['input',[['__set_model',['','msg','$event',[]]]]]]}}" value="{{msg}}" bindinput="__e"/></block><block wx:if="{{type=='textarea'}}"><textarea class="textarea" placeholder="{{placeholder}}" placeholder-color="#c9c9c9" data-event-opts="{{[['input',[['__set_model',['','msg','$event',[]]]]]]}}" value="{{msg}}" bindinput="__e"></textarea></block><view class="edit-btns"><view data-event-opts="{{[['tap',[['closeEdit',['$event']]]]]}}" class="btn" bindtap="__e">取消</view><view data-event-opts="{{[['tap',[['submitEdit',['$0','$1'],['field','msg']]]]]}}" class="btn" bindtap="__e">确认</view></view></view></view></block></view>
<view class="{{[editRealName&editMobile&editArea&editAddress?'':'pad-b150']}}"><status-nav vue-id="54360644-1" ifReturn="{{true}}" navBarTitle="个人中心" marginBottom="{{0}}" bind:__l="__l"></status-nav><view class="ucenter"><view class="item flex"><view class="title">头像</view><view class="img"><image src="{{headImgUrl}}" mode="widthFix"></image></view></view><view class="item flex"><view class="title">昵称</view><view class="msg">{{nickName}}</view></view><view data-event-opts="{{[['tap',[['openEdit',['real_name']]]]]}}" class="item flex" bindtap="__e"><view class="title">真实姓名</view><input class="msg" type="text" disabled="true" data-event-opts="{{[['input',[['__set_model',['','realName','$event',[]]]]]]}}" value="{{realName}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view></view><view class="item flex" style="position:relative;"><view class="title">联系电话</view><input class="msg" type="number" disabled="true" data-event-opts="{{[['input',[['__set_model',['','mobile','$event',[]]]]]]}}" value="{{mobile}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view><button class="get-phone-btn" open-type="getPhoneNumber" data-event-opts="{{[['getphonenumber',[['onGetPhoneNumber',['$event']]]]]}}" bindgetphonenumber="__e"></button></view><view data-event-opts="{{[['tap',[['openEdit',['area']]]]]}}" class="item flex" bindtap="__e"><view class="title">联系地址</view><input class="msg" type="text" disabled="true" data-event-opts="{{[['input',[['__set_model',['','area','$event',[]]]]]]}}" value="{{area}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view></view><view data-event-opts="{{[['tap',[['openEdit',['address']]]]]}}" class="item flex" bindtap="__e"><view class="title">详细地址</view><input class="msg" type="text" disabled="true" data-event-opts="{{[['input',[['__set_model',['','address','$event',[]]]]]]}}" value="{{address}}" bindinput="__e"/><view class="more"><image src="/static/public/icon-my-more.png" mode="widthFix"></image></view></view><block wx:if="{{businessCode!==''}}"><view class="item flex"><view class="title">会员码</view><view class="msg">{{businessCode}}</view></view></block></view><view data-event-opts="{{[['tap',[['closeEdit',['$event']]]]]}}" hidden="{{!(isOpen)}}" class="pull-all-bg" bindtap="__e"></view><block wx:if="{{isOpen}}"><view class="edit-box-bg"><view class="edit-box"><view data-event-opts="{{[['tap',[['closeEdit',['$event']]]]]}}" class="edit-close" bindtap="__e"><text>X</text></view><view class="title">{{title}}</view><view class="subtitle">{{subtitle}}</view><block wx:if="{{type=='input'}}"><input class="input" type="text" placeholder="{{placeholder}}" placeholder-style="color:#000000" data-event-opts="{{[['input',[['__set_model',['','msg','$event',[]]]]]]}}" value="{{msg}}" bindinput="__e"/></block><block wx:if="{{type=='textarea'}}"><textarea class="textarea" placeholder="{{placeholder}}" placeholder-style="color:#000000" data-event-opts="{{[['input',[['__set_model',['','msg','$event',[]]]]]]}}" value="{{msg}}" bindinput="__e"></textarea></block><view data-event-opts="{{[['tap',[['submitEdit',['$0','$1'],['field','msg']]]]]}}" class="btn" bindtap="__e">确认</view></view></view></block></view>