作者 lihongjuan

11111

... ... @@ -27,14 +27,14 @@ Component({
})
setTimeout(function(){
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
},1500)
return false
}
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/shop_detail/shop_detail?id=' + id
url: '/packageA/pages/shop_detail/shop_detail?id=' + id
})
},
},
... ...
... ... @@ -9,22 +9,21 @@
<view wx:if="{{item.price2!=null}}">
<view class='goods_flex'>
<view class='score'>积分</view>
<view class='price'>{{item.price2}}</view>
<view class='price'>¥{{item.goods_price}}</view>
<view class="lineprice">¥{{item.line_price}}</view>
<view class='sell'>已卖出{{item.paynum}}件</view>
<view class='sell'>已卖出{{item.sales}}件</view>
</view>
<!-- <view class='oldprice'>{{item.price}}</view> -->
</view>
<view class='goods_flex' wx:else>
<view class='score'>积分</view>
<view class='price'>{{item.price}}</view>
<view class='sell'>已卖出{{item.paynum}}件</view>
<!-- <view class='score'>积分</view> -->
<view class='price'>¥{{item.goods_price}}</view>
<view class="lineprice">¥{{item.line_price}}</view>
<view class='sell'>已卖出{{item.sales}}件</view>
</view>
</view>
... ...
... ... @@ -6,6 +6,7 @@
flex-wrap: wrap;
padding: 8rpx 0 20rpx;
box-sizing: border-box;
margin-bottom:120rpx;
}
.real_goods_item {
... ... @@ -90,7 +91,7 @@
}
.price {
font-size: 36rpx;
font-size:30rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(242, 0, 0, 1);
... ... @@ -118,3 +119,10 @@
font-size: 24rpx;
text-decoration: line-through
}
.lineprice{
color: rgba(156, 156, 156, 1);
text-decoration: line-through;
font-size: 20rpx;
margin-right:5rpx;
}
\ No newline at end of file
... ...
... ... @@ -68,6 +68,30 @@
"text": "我的",
"iconPath": "images/tabbar/icon_71.png",
"selectedIconPath": "images/tabbar/icon_72.png"
},
{
"pagePath": "packageA/pages/index/index",
"text": "商品",
"iconPath": "images/tabbar/icon_75.png",
"selectedIconPath": "images/tabbar/icon_68.png"
},
{
"pagePath": "packageA/pages/message/message",
"text": "消息",
"iconPath": "images/tabbar/message.png",
"selectedIconPath": "images/tabbar/messageactive.png"
},
{
"pagePath": "packageA/pages/shop_cart/shop_cart",
"text": "购物车",
"iconPath": "images/tabbar/icon_70.png",
"selectedIconPath": "images/tabbar/icon_73.png"
},
{
"pagePath": "packageA/pages/my/my",
"text": "我的",
"iconPath": "images/tabbar/icon_71.png",
"selectedIconPath": "images/tabbar/icon_72.png"
}
],
"selectedColor": "#05091A"
... ...
... ... @@ -31,7 +31,39 @@ Page({
status2: '',
title2: '',
scrollTop:'',
pid:''
pid:'',
logok:'',
selected:0,
list:[{
        pagePath: "/packageA/pages/index/index",
        text: "商品",
        iconPath: "/images/tabbar/icon_75.png",
        selectedIconPath: "/images/tabbar/icon_68.png"
      },
      {
        pagePath: "/packageA/pages/message/message",
        text: "消息",
        iconPath: "/images/tabbar/message.png",
        selectedIconPath: "/images/tabbar/messageactive.png"
      },
      {
        pagePath: "/packageA/pages/shop_cart/shop_cart",
        text: "购物车",
        iconPath: "/images/tabbar/icon_70.png",
        selectedIconPath: "/images/tabbar/icon_73.png"
      },
      {
        pagePath"/packageA/pages/my/my",
        text"我的",
        iconPath"/images/tabbar/icon_71.png",
        selectedIconPath"/images/tabbar/icon_72.png"
      }],
category_id1:'',
sort:'',
keyword:'',
shop_arr:[],
pricesheng:false,
xiaoliang:false
},
scroll(e) {
... ... @@ -66,11 +98,11 @@ if( app.globalData.index==undefined){
this.get_shopnum()
this.getmessagelist();
console.log('998867',this.data.pid)
if(this.data.pid){
this.get_info(this.data.pid, 2);
}else{
this.get_info(0, 1);
}
// if(this.data.pid){
// this.get_info(this.data.pid, 2);
// }else{
// this.get_info(0, 1);
// }
// 获取活动专区
this.getzhuanqulist();
... ... @@ -83,9 +115,33 @@ if( app.globalData.index==undefined){
}
//控制显示隐藏
this.ishow()
// 我写的项目
// 获取一级分类
this.getonkind();
// 获取商品列表
this.getgoodlist()
},
// 获取一级分类
getonkind(){
let that= this;
let url="/sundry/get_category"
app.postk(url, {}).then((r) => {
console.log('商品分类',r)
let obj = {
name: '首页',
id: ''
}
r.data.unshift(obj)
that.setData({
nav_arr: r.data
})
})
},
// 获取个人信息
getInfoFun() {
let that= this;
... ... @@ -112,7 +168,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
} else if (res.cancel) {
}
... ... @@ -138,7 +194,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
... ... @@ -150,7 +206,7 @@ if( app.globalData.index==undefined){
}
wx.navigateTo({
url: '/pages/xianshi/xianshi?title2='+this.data.title2,
url: '/packageA/pages/xianshi/xianshi?title2='+this.data.title2,
})
}
... ... @@ -257,15 +313,15 @@ if( app.globalData.index==undefined){
//获取活动专区列表
getzhuanqulist() {
let that = this
let url = '/activity/get_all';
let url = '/activity/get_list';
let data = {
}
app.post(url, data, "POST").then((r) => {
app.postk(url, data, "POST").then((r) => {
console.log(r)
that.setData({
activity: r.msg
activity: r.data
})
console.log(that.data.activity)
... ... @@ -289,7 +345,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
} else if (res.cancel) {
}
... ... @@ -306,7 +362,7 @@ if( app.globalData.index==undefined){
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
... ... @@ -316,7 +372,7 @@ if( app.globalData.index==undefined){
return false
}
wx.navigateTo({
url: '/pages/zhuanqu/zhuanqu?id=' + id,
url: '/packageA/pages/zhuanqu/zhuanqu?id=' + id,
})
}
... ... @@ -331,7 +387,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
} else if (res.cancel) {
}
... ... @@ -350,7 +406,7 @@ if( app.globalData.index==undefined){
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
... ... @@ -360,7 +416,7 @@ if( app.globalData.index==undefined){
return false
}
wx.navigateTo({
url: '/pages/classify/classify',
url: '/packageA/pages/classify/classify',
})
},
//展示所有的小分类
... ... @@ -379,7 +435,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
} else if (res.cancel) {
}
... ... @@ -396,7 +452,7 @@ if( app.globalData.index==undefined){
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
... ... @@ -406,11 +462,16 @@ if( app.globalData.index==undefined){
return false
}
let title = this.data.nav_arr[this.data.nav_index].name
let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0
let pid = this.data.nav_arr[this.data.nav_index].id
let category_id2=e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/search/search_result/search_result?title=' + title + "&index=" + index + '&pid=' + pid
url: '/packageA/pages/search/search_result/search_result?title=' + title + '&category_id2=' + category_id2
})
// let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0
// let pid = this.data.nav_arr[this.data.nav_index].id
// wx.navigateTo({
// url: '/packageA/pages/search/search_result/search_result?title=' + title + "&index=" + index + '&pid=' + pid
// })
}
},
... ... @@ -432,7 +493,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
} else if (res.cancel) {
}
... ... @@ -447,7 +508,7 @@ if( app.globalData.index==undefined){
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
... ... @@ -458,12 +519,12 @@ if( app.globalData.index==undefined){
}
if (style == 2) {
wx.navigateTo({
url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src
url: '/packageA/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src
})
} else {
wx.navigateTo({
url: '/pages/shop_detail/shop_detail?id=' + id
})
// wx.navigateTo({
// url: '/packageA/pages/shop_detail/shop_detail?id=' + id
// })
}
}
... ... @@ -475,67 +536,129 @@ if( app.globalData.index==undefined){
// 排序
reorder(e) {
let that = this
let index = Number(e.currentTarget.dataset.index)
if (index == 1) {
if (that.data.price == "price") {
that.setData({
price: 'price desc'
page:1,
shop_arr:[]
})
} else {
let index = Number(e.currentTarget.dataset.index);
that.setData({
price: 'price'
c_index:index,
sort:index
})
}
} else if (index == 2) {
if (that.data.paynum == "paynum") {
that.setData({
paynum: 'paynum desc'
if(index==1){
this.setData({
pricesheng:!this.data.pricesheng
})
} else {
that.setData({
paynum: 'paynum'
if(this.data.pricesheng==true){
this.setData({
sort:1
})
}else{
this.setData({
sort:2
})
}
}
if(this.data.index==2){
this.setData({
c_index: e.currentTarget.dataset.index,
page: 1,
page_type: false
xiaoliang:!this.data.xiaoliang
})
//调用排序接口
this.good_list(this.data.pid, e.currentTarget.dataset.index)
},
if(this.data.xiaoliang==true){
this.setData({
sort:3
})
}else{
this.setData({
sort:4
})
}
}
that.getgoodlist()
// let that = this
// let index = Number(e.currentTarget.dataset.index)
// if (index == 1) {
// if (that.data.price == "price") {
// that.setData({
// price: 'price desc'
// })
// } else {
// that.setData({
// price: 'price'
// })
// }
// } else if (index == 2) {
// if (that.data.paynum == "paynum") {
// that.setData({
// paynum: 'paynum desc'
// })
// } else {
// that.setData({
// paynum: 'paynum'
// })
// }
// }
// this.setData({
// c_index: e.currentTarget.dataset.index,
// page: 1,
// page_type: false
// })
// //调用排序接口
// this.good_list(this.data.pid, e.currentTarget.dataset.index)
},
// 选择一级分类
select_nav(e) {
let index = Number(e.currentTarget.dataset.index)
let id = e.currentTarget.dataset.id;
let newclass_arr=this.data.nav_arr[index].child
this.setData({
pid:id
})
category_id1:id,
class_arr:newclass_arr,
nav_index:index
})
},
// 获取商品列表
getgoodlist(){
let that=this;
let url = '/goods/get_goods'
let param={
category_id1:this.data.category_id1,
sort:this.data.sort,
keyword:this.data.keyword,
page:this.data.page,
pageNum:10
}
app.postk(url, param).then((res) => {
if(that.data.page>1){
if(res.data.length==0){
wx.showToast({
title:'没有更多了~',
icon:'none'
})
}else{
this.setData({
scrollTop: 0
shop_arr:that.data.shop_arr.concat(res.data)
})
if (index == this.data.nav_index) {
return
} else {
}
}else{
this.setData({
nav_index: index,
page: 1,
page_type: false,
c_index: 0, //筛选分类下标
price: 'price desc', //价格排序方式
paynum: 'paynum desc' //销量排序方式
shop_arr:that.data.shop_arr.concat(res.data)
})
this.get_info(id, 2)
}
console.log(that.data.shop_arr,'轮播图')
})
},
// 轮播图
get_banner() {
let url = app.interface.banner
app.post(url, {}).then((res) => {
let url = '/sundry/get_slide'
app.postk(url, {}).then((res) => {
console.log(res,'轮播图')
this.setData({
imgurl: res.msg
imgurl: res.data
})
})
},
... ... @@ -553,45 +676,45 @@ if( app.globalData.index==undefined){
})
},
//获取页面信息
get_info(pid, type) { //type 1为小标题 2为小标题下的小分类
wx.showLoading({
title: '加载中'
})
let that = this
let url = app.interface.index
let params = {
pid: pid
}
app.post(url, params).then((res) => {
console.log('88776654', res)
wx.hideLoading()
if (type == 1) {
let obj = {
name: '首页',
id: ''
}
res.msg.unshift(obj)
that.setData({
nav_arr: res.msg
})
that.get_info(res.msg[0].id, 2)
} else if (type == 2) {
console.log('666', res)
// get_info(pid, type) { //type 1为小标题 2为小标题下的小分类
// wx.showLoading({
// title: '加载中'
// })
// let that = this
// let url = app.interface.index
// let params = {
// pid: pid
// }
// app.post(url, params).then((res) => {
// console.log('88776654', res)
// wx.hideLoading()
// if (type == 1) {
// let obj = {
// name: '全部',
// name: '首页',
// id: ''
// }
// res.msg.unshift(obj)
that.setData({
class_arr: res.msg,
cid: ''
})
that.good_list(pid, that.data.c_index)
}
}).catch((er) => {
wx.hideLoading()
})
},
// that.setData({
// nav_arr: res.data
// })
// that.get_info(res.msg[0].id, 2)
// } else if (type == 2) {
// console.log('666', res)
// // let obj = {
// // name: '全部',
// // id: ''
// // }
// // res.msg.unshift(obj)
// that.setData({
// class_arr: res.data,
// cid: ''
// })
// that.good_list(pid, that.data.c_index)
// }
// }).catch((er) => {
// wx.hideLoading()
// })
// },
//获取商品列表
good_list(pid, c_index) {
wx.showLoading({
... ... @@ -712,7 +835,9 @@ if( app.globalData.index==undefined){
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.setData({
logok:app.globalData.baseUrlimg+"assets/img/cb2ad36a391388f19f5f912fa021f8f.png"
})
this.get_banner()
console.log(app.globalData.index)
if(app.globalData.index==0){
... ... @@ -727,9 +852,9 @@ if( app.globalData.index==undefined){
this.getmessagelist();
console.log('998867',this.data.pid)
if(this.data.pid){
this.get_info(this.data.pid, 2);
// this.get_info(this.data.pid, 2);
}else{
this.get_info(0, 1);
// this.get_info(0, 1);
}
//控制显示隐藏
... ... @@ -761,39 +886,46 @@ if( app.globalData.index==undefined){
},
loadMore(e){
console.log(e)
let that = this
if (that.data.page_type) {
wx.showToast({
title: '暂无更多数据',
icon: 'none',
duration: 1000
})
return
}
that.setData({
page: that.data.page + 1
let newpage=this.data.page;
newpage++;
this.setData({
page:newpage
})
that.good_list(that.data.pid, that.data.c_index)
this.getgoodlist()
// console.log(e)
// let that = this
// if (that.data.page_type) {
// wx.showToast({
// title: '暂无更多数据',
// icon: 'none',
// duration: 1000
// })
// return
// }
// that.setData({
// page: that.data.page + 1
// })
// that.good_list(that.data.pid, that.data.c_index)
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
console.log(43898438493)
let that = this
if (that.data.page_type) {
wx.showToast({
title: '暂无更多数据',
icon: 'none',
duration: 1000
})
return
}
that.setData({
page: that.data.page + 1
})
that.good_list(that.data.pid, that.data.c_index)
// console.log(43898438493)
// let that = this
// if (that.data.page_type) {
// wx.showToast({
// title: '暂无更多数据',
// icon: 'none',
// duration: 1000
// })
// return
// }
// that.setData({
// page: that.data.page + 1
// })
// that.good_list(that.data.pid, that.data.c_index)
},
/**
... ...
{
"navigationBarTitleText": "首页",
"usingComponents": {
"concat": "/Components/concat/concat",
"Model_item": "/Components/Model_item/Model_item"
"concat": "/packageA/Components/concat/concat",
"Model_item": "/packageA/Components/Model_item/Model_item",
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
}
}
\ No newline at end of file
... ...
... ... @@ -8,7 +8,8 @@
</view>
<view class='list' wx:if="{{nav_index!=0}}">
<view class='list_item' wx:if="{{index < length_num}}" wx:for="{{class_arr}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" catchtap="look_item">
<!-- wx:if="{{index < length_num}}" -->
<view class='list_item' wx:for="{{class_arr}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" catchtap="look_item">
<view class='item'>
<view class='item_img'>
<image src='{{item.image}}' mode='aspectFill' />
... ... @@ -85,7 +86,7 @@
</view> -->
<view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}" bindtap="moremiao">
<view class="neigouimg">
<image src="/images/neigouk.png" ></image>
<image src="{{logok}}" ></image>
</view>
</view>
</view>
... ... @@ -140,3 +141,4 @@
<concat />
</view>
</scroll-view>
<v-tab-bar selected="{{selected}}" text="2" list="{{list}}"></v-tab-bar>
\ No newline at end of file
... ...
... ... @@ -532,3 +532,5 @@ image {
display:flex;
justify-content: center;
}
... ...
... ... @@ -9,7 +9,32 @@ Page({
page: 1,
messagelist: [],
token:'',
login_new:''
login_new:'',
selected:1,
list:[{
        pagePath: "/packageA/pages/index/index",
        text: "商品",
        iconPath: "/images/tabbar/icon_75.png",
        selectedIconPath: "/images/tabbar/icon_68.png"
      },
      {
        pagePath: "/packageA/pages/message/message",
        text: "消息",
        iconPath: "/images/tabbar/message.png",
        selectedIconPath: "/images/tabbar/messageactive.png"
      },
      {
        pagePath: "/packageA/pages/shop_cart/shop_cart",
        text: "购物车",
        iconPath: "/images/tabbar/icon_70.png",
        selectedIconPath: "/images/tabbar/icon_73.png"
      },
      {
        pagePath"/packageA/pages/my/my",
        text"我的",
        iconPath"/images/tabbar/icon_71.png",
        selectedIconPath"/images/tabbar/icon_72.png"
      }]
},
/**
... ...
{
"navigationBarTitleText": "消息列表"
"navigationBarTitleText": "消息列表",
"usingComponents": {
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
}
}
\ No newline at end of file
... ...
... ... @@ -22,3 +22,4 @@
</view>
</block>
<v-tab-bar selected="{{selected}}" text="2" list="{{list}}"></v-tab-bar>
\ No newline at end of file
... ...
... ... @@ -12,7 +12,32 @@ Page({
autoplay: true,
interval: 3000,
duration: 1500,
kuaidi:''
kuaidi:'',
selected:3,
list:[{
        pagePath: "/packageA/pages/index/index",
        text: "商品",
        iconPath: "/images/tabbar/icon_75.png",
        selectedIconPath: "/images/tabbar/icon_68.png"
      },
      {
        pagePath: "/packageA/pages/message/message",
        text: "消息",
        iconPath: "/images/tabbar/message.png",
        selectedIconPath: "/images/tabbar/messageactive.png"
      },
      {
        pagePath: "/packageA/pages/shop_cart/shop_cart",
        text: "购物车",
        iconPath: "/images/tabbar/icon_70.png",
        selectedIconPath: "/images/tabbar/icon_73.png"
      },
      {
        pagePath"/packageA/pages/my/my",
        text"我的",
        iconPath"/images/tabbar/icon_71.png",
        selectedIconPath"/images/tabbar/icon_72.png"
      }]
},
/**
... ... @@ -48,7 +73,7 @@ Page({
let ordernum = e.currentTarget.dataset.ordernum;
console.log(ordernum)
wx.navigateTo({
url: '/pages/logistics/logistics?order=' + ordernum
url: '/packageA/pages/logistics/logistics?order=' + ordernum
})
},
... ... @@ -78,7 +103,7 @@ Page({
toLoginFun() {
if (this.data.no_login) {
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
}
},
... ... @@ -93,33 +118,33 @@ Page({
if (index == 1) {
// 跳转订单列表
wx.navigateTo({
url: '/pages/order/order_list/order_list?type=' + type,
url: '/packageA/pages/order/order_list/order_list?type=' + type,
})
} else if (index == 2) {
// 跳转收藏列表
wx.navigateTo({
url: '/pages/Collection/collection',
url: '/packageA/pages/Collection/collection',
})
} else if (index == 3) {
// 跳转积分列表
wx.navigateTo({
url: '/pages/my/my_integral/my_integral',
url: '/packageA/pages/my/my_integral/my_integral',
})
} else if (index == 4) {
// 跳转地址列表
wx.navigateTo({
url: '/pages/address/address',
url: '/packageA/pages/address/address',
})
} else if (index == 6) {
// 跳转地址列表
wx.navigateTo({
url: '/pages/zuji/zuji',
url: '/packageA/pages/zuji/zuji',
})
}
} else if (wx.getStorageSync("token") && index == 5) {
// 跳转关于列表
wx.navigateTo({
url: '/pages/my/about_us/about_us',
url: '/packageA/pages/my/about_us/about_us',
})
} else {
let token=wx.getStorageSync('token');
... ... @@ -130,7 +155,7 @@ Page({
})
setTimeout(function(){
wx.navigateTo({
url: '/pages/register/register',
url: '/packageA/pages/register/register',
})
},1500)
... ... @@ -146,7 +171,7 @@ Page({
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/login/login',
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
... ...
{
"navigationBarTitleText": "个人中心",
"usingComponents": {
"concat": "/Components/concat/concat"
"concat": "/Components/concat/concat",
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
}
}
\ No newline at end of file
... ...
... ... @@ -130,3 +130,4 @@
</view>
<concat />
</block>
<v-tab-bar selected="{{selected}}" text="2" list="{{list}}"></v-tab-bar>
\ No newline at end of file
... ...
... ... @@ -9,7 +9,12 @@ Page({
page: 1,
c_index: 0, //筛选分类下标
price: 'price desc', //价格排序方式
paynum: 'paynum desc' //销量排序方式
paynum: 'paynum desc' ,//销量排序方式
category_id2:'',
shop_arr:[],
keyword:'',
sort:''
},
... ... @@ -134,30 +139,67 @@ Page({
wx.setNavigationBarTitle({
title: options.title ? options.title : '搜索'
})
if (options.index){
this.setData({
nav_index: Number(options.index),
nav_type: true,
pid: options.pid
category_id2:options.category_id2
})
this.get_info(options.pid)
} else {
if (options.name){
this.setData({
cid: options.name,
search_type: true
this.getgoodlist()
// if (options.index){
// this.setData({
// nav_index: Number(options.index),
// nav_type: true,
// pid: options.pid
// })
// this.get_info(options.pid)
// } else {
// if (options.name){
// this.setData({
// cid: options.name,
// search_type: true
// })
// this.good_list(options.name, 0)
// } else {
// this.setData({
// cid: options.pid
// })
// this.good_list(options.pid, 0)
// }
// }
},
getgoodlist(){
let that=this;
let url = '/goods/get_goods'
let param={
category_id2:this.data.category_id2,
sort:this.data.sort,
keyword:this.data.keyword,
page:this.data.page,
pageNum:10
}
app.postk(url, param).then((res) => {
if(that.data.page>1){
if(res.data.length==0){
wx.showToast({
title:'没有更多了~',
icon:'none'
})
this.good_list(options.name, 0)
} else {
}else{
this.setData({
cid: options.pid
shop_arr:that.data.shop_arr.concat(res.data)
})
this.good_list(options.pid, 0)
}
}else{
this.setData({
shop_arr:that.data.shop_arr.concat(res.data)
})
}
console.log(that.data.shop_arr,'轮播图')
})
},
/**
... ...
... ... @@ -10,7 +10,31 @@ Page({
integral: 0, //总积分
all_num: 0, //总数量
token:'',
login_new:''
login_new:'',
listarr:[{
        pagePath: "/packageA/pages/index/index",
        text: "商品",
        iconPath: "/images/tabbar/icon_75.png",
        selectedIconPath: "/images/tabbar/icon_68.png"
      },
      {
        pagePath: "/packageA/pages/message/message",
        text: "消息",
        iconPath: "/images/tabbar/message.png",
        selectedIconPath: "/images/tabbar/messageactive.png"
      },
      {
        pagePath: "/packageA/pages/shop_cart/shop_cart",
        text: "购物车",
        iconPath: "/images/tabbar/icon_70.png",
        selectedIconPath: "/images/tabbar/icon_73.png"
      },
      {
        pagePath"/packageA/pages/my/my",
        text"我的",
        iconPath"/images/tabbar/icon_71.png",
        selectedIconPath"/images/tabbar/icon_72.png"
      }]
},
//删除商品
... ...
... ... @@ -2,6 +2,7 @@
"navigationBarTitleText": "购物车",
"usingComponents": {
"concat": "/Components/concat/concat",
"shop_item": "/Components/shop_item/shop_item"
"shop_item": "/Components/shop_item/shop_item",
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
}
}
\ No newline at end of file
... ...
... ... @@ -26,3 +26,4 @@
</view>
<concat/>
</block>
<v-tab-bar selected="{{selected}}" text="2" list="{{listarr}}"></v-tab-bar>
\ No newline at end of file
... ...
... ... @@ -98,7 +98,7 @@ Page({
getmorelist(){
let that = this
let url = '/activity/get_product';
let url = '/activity/get_detail';
let data = {
activity_id:that.data.activeid,
page: that.data.page,
... ... @@ -106,7 +106,7 @@ Page({
order:that.data.order,
}
app.post(url, data, "POST").then((r) => {
app.postk(url, data, "POST").then((r) => {
console.log(r)
that.setData({
activelist: that.data.activelist.concat(r.msg)
... ...