作者 朱振飞

1212

... ... @@ -10,7 +10,7 @@
<view class='goods_flex'>
<view class='price'>¥{{item.price}}</view>
<view class="lineprice">¥{{item.line_price}}</view>
<view class="lineprice" wx:if="{{item.line_price!=null}}">¥{{item.line_price}}</view>
<view class='sell'>已卖出{{item.sales}}件</view>
</view>
... ... @@ -20,13 +20,10 @@
<view class='goods_flex' wx:else>
<!-- <view class='score'>积分</view> -->
<view class='price'>¥{{item.price}}</view>
<view class="lineprice">¥{{item.line_price}}</view>
<view class="lineprice" wx:if="{{item.line_price!=null}}">¥{{item.line_price}}</view>
<view class='sell'>已卖出{{item.sales}}件</view>
</view>
</view>
<view class="pink_cover" wx:if="{{item.sold==0}}" />
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -16,14 +16,14 @@ Page({
let pid = e.currentTarget.dataset.id
let title = e.currentTarget.dataset.title
wx.navigateTo({
url: '/pages/search/search_result/search_result?title=' + title + '&pid=' + pid
url: 'packageA/pages/search/search_result/search_result?title=' + title + '&pid=' + pid
})
},
//查看商品详情
look_detail(e){
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
})
},
... ... @@ -31,7 +31,7 @@ Page({
look_detailk(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/taocandetail/taocandetail?id=' + id
url: '/packageA/pages/taocandetail/taocandetail?id=' + id
})
},
//点击分类
... ...
... ... @@ -13,7 +13,7 @@
<view class='left'>
<view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view>
<view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view>
<!-- <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> -->
</view>
... ...
... ... @@ -421,23 +421,46 @@ Page({
})
} else {
let login_new = wx.getStorageSync('login');
let gh_login = wx.getStorageSync('gh_login');
let loginType = wx.getStorageSync('entrance_type');
if(loginType == 1){
if (login_new == 0) {
wx.showModal({
title: '提示',
content: '您还不是会员',
content: '请绑定账户后操作',
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {
}
}
})
return false
}
}else{
if (gh_login == 0) {
wx.showModal({
title: '提示',
content: '请绑定账户后操作',
success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/packageA/pages/login/login',
})
} else if (res.cancel) {}
} else if (res.cancel) {
}
}
})
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
... ... @@ -586,7 +609,8 @@ Page({
//获取页面信息
get_info(pid, type) { //type 1为小标题 2为小标题下的小分类
wx.showLoading({
title: '加载中'
title: '加载中',
mask: true
})
let that = this
let url = app.interface.index
... ... @@ -627,6 +651,7 @@ Page({
good_list(pid, c_index) {
wx.showLoading({
title: '加载中',
mask: true
})
let that = this
let url = app.interface.good_list
... ... @@ -640,10 +665,15 @@ Page({
params.paynum = that.data.paynum
}
app.post(url, params).then((res) => {
let list = res.msg;
for(let obj of list){
obj.sales = obj.paynum
}
if (that.data.page == 1) {
wx.hideLoading()
that.setData({
shop_arr: res.msg
shop_arr: list
})
} else {
if (res.msg.length == 0) {
... ... @@ -655,7 +685,7 @@ Page({
setTimeout(() => {
wx.hideLoading()
that.setData({
shop_arr: that.data.shop_arr.concat(res.msg)
shop_arr: that.data.shop_arr.concat(list)
})
}, 1000)
}
... ...
... ... @@ -3,6 +3,6 @@
"usingComponents": {
"concat": "/packageA/Components/concat/concat",
"Model_item": "/packageA/Components/Model_item/Model_item",
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
"v-tab-bar": "/custom-tab-bar/index"
}
}
\ No newline at end of file
... ...
... ... @@ -336,6 +336,7 @@ image {
.real_goods {
background: #f9f9f9;
padding-bottom: 40rpx;
}
.fenlei {
... ...
{
"navigationBarTitleText": "消息列表",
"usingComponents": {
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
"v-tab-bar": "/custom-tab-bar/index"
}
}
\ No newline at end of file
... ...
... ... @@ -53,7 +53,14 @@ page {
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 400;
color: #ccc;
margin-top: 200rpx;
color: #666;
margin-top: 400rpx;
text-align: center;
}
\ No newline at end of file
... ...
... ... @@ -13,6 +13,7 @@ Page({
interval: 3000,
duration: 1500,
kuaidi:'',
noBind: false,
selected:3,
list:[{
        pagePath: "/packageA/pages/index/index",
... ... @@ -44,9 +45,18 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let type = wx.getStorageSync('entrance_type');
let ghBind = wx.getStorageSync('gh_login');
let login = wx.getStorageSync('login');
this.setData({
noBind: (type==1&&login==0)?true:(type==2&&ghBind == 0)?true: false
})
},
goToBind(){
wx.navigateTo({
url: '/packageA/pages/login/login',
})
},
//获取最新物流
getnewwuliu(){
let that = this
... ... @@ -110,10 +120,11 @@ Page({
// 跳转页面(订单,收藏,积分,地址,关于)
jumpListFun(e) {
console.log(e)
let t = this;
let type = e.currentTarget.dataset.i;
let index = e.currentTarget.dataset.t;
if (wx.getStorageSync("token") && wx.getStorageSync("login") == 1 && index != 5) {
if (wx.getStorageSync("token") && !this.data.noBind && index != 5) {
if (index == 1) {
// 跳转订单列表
... ... @@ -162,12 +173,12 @@ Page({
return false
}
let login_new=wx.getStorageSync('login');
if(login_new==0){
if(this.data.noBind){
wx.showModal({
title: '提示',
content: '您还不是会员',
content: '请绑定账号后操作',
confirmText:'去绑定',
cancelText:'取消',
success(res) {
if (res.confirm) {
wx.navigateTo({
... ... @@ -276,7 +287,7 @@ Page({
//获取个人信息 自己写的
// t.getInfoFun()
if (wx.getStorageSync("token") && wx.getStorageSync("login") == 1) {
if (wx.getStorageSync("token")) {
t.setData({
no_login: false
})
... ...
... ... @@ -2,6 +2,6 @@
"navigationBarTitleText": "个人中心",
"usingComponents": {
"concat": "/Components/concat/concat",
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
"v-tab-bar": "/custom-tab-bar/index"
}
}
\ No newline at end of file
... ...
... ... @@ -6,14 +6,18 @@
<view class="tips_word">点击登录</view>
</view>
<!-- 登录 -->
<view class="right" wx:else>
<view class="right" bindtap="goToBind" wx:else>
<view class="name_box">
<view class="name">{{obj.user_name}}
<!-- <view class="id">ID {{obj.id_card}}</view> -->
</view>
</view>
<!-- <view class="company">{{obj.competition}}</view> -->
<view class="info_box">
<view class="info_box" wx:if="{{noBind}}">
<view class="bindNote">点击绑定账号</view>
</view>
<view class="info_box" wx:else>
<view>{{obj.job?obj.job:'暂无'}}</view>
<!-- <view>{{obj.section?obj.section:'暂无'}}</view> -->
<view>{{obj.tel}}</view>
... ...
... ... @@ -11,7 +11,9 @@ page {
display: flex;
align-items: center;
}
.bindNote{
font-size: 30rpx;
}
.avator {
width: 142rpx;
height: 142rpx;
... ...
... ... @@ -8,7 +8,6 @@ Page({
success: false,
fail: false,
name: '',
addressId: 0,
tel: '',
area: '',
... ...
... ... @@ -228,7 +228,7 @@ Page({
// 退换货跳转页面详情
jumpReturnFun(e) {
wx.navigateTo({
url: '/pages/order/return_goods/return_goods?d=' + e.currentTarget.dataset.d + "&&t=" + e.currentTarget.dataset.t,
url: '/packageA/pages/order/return_goods/return_goods?d=' + e.currentTarget.dataset.d + "&&t=" + e.currentTarget.dataset.t,
})
},
... ...
... ... @@ -104,10 +104,14 @@ Page({
params.paynum = that.data.paynum
}
app.post(url, params).then((res) => {
let list = res.msg;
for(let obj of list){
obj.sales = obj.paynum
}
if (that.data.page == 1) {
wx.hideLoading()
that.setData({
shop_arr: res.msg
shop_arr: list
})
that.pageScrollToBottom()
} else {
... ... @@ -120,7 +124,7 @@ Page({
setTimeout(() => {
wx.hideLoading()
that.setData({
shop_arr: that.data.shop_arr.concat(res.msg)
shop_arr: that.data.shop_arr.concat(list)
})
}, 1000)
}
... ...
... ... @@ -11,8 +11,8 @@ Page({
all_num: 0, //总数量
token:'',
login_new:'',
selected:2,
listarr:[{
selected: 2,
itemMenu:[{
        pagePath: "/packageA/pages/index/index",
        text: "商品",
        iconPath: "/images/tabbar/icon_75.png",
... ... @@ -36,6 +36,7 @@ Page({
        iconPath"/images/tabbar/icon_71.png",
        selectedIconPath"/images/tabbar/icon_72.png"
      }]
},
//删除商品
... ... @@ -184,9 +185,7 @@ Page({
},
//去结算
submit(){
let that = this;
let that = this
if (that.data.all_num == 0){
wx.showToast({
title: '请先选择商品',
... ... @@ -195,13 +194,6 @@ submit(){
})
return
}
if(app.globalData.status==0){
wx.showToast({
title: '您已被拉黑',
icon:'none'
})
return false
}
let list = that.data.list
let info = []
for (let obj of list) {
... ...
... ... @@ -3,6 +3,6 @@
"usingComponents": {
"concat": "/Components/concat/concat",
"shop_item": "/Components/shop_item/shop_item",
"v-tab-bar": "/custom-tab-bar/custom-tab-bar"
"v-tab-bar": "/custom-tab-bar/index"
}
}
\ No newline at end of file
... ...
<block wx:if="{{no_login}}">
<navigator class="no_login" catchtap="go_login" url="/packageA/pages/register/register" hover-class="none">请先登录</navigator>
<navigator class="no_login" catchtap="go_login" url="/pages/register/register" hover-class="none">请先登录</navigator>
</block>
<block wx:elif="{{login_new==''}}">
<navigator class="no_login" catchtap="go_login" url="/packageA/pages/login/login" hover-class="none">请先绑定会员</navigator>
<navigator class="no_login" catchtap="go_login" url="/pages/login/login" hover-class="none">请先绑定后操作,点击绑定</navigator>
</block>
... ... @@ -26,4 +26,5 @@
</view>
<concat/>
</block>
<v-tab-bar selected="{{selected}}" text="2" list="{{listarr}}"></v-tab-bar>
\ No newline at end of file
<v-tab-bar selected="{{selected}}" text="2" list="{{itemMenu}}"></v-tab-bar>
\ No newline at end of file
... ...
... ... @@ -6,8 +6,8 @@ page {
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 400;
color: #ccc;
margin-top: 200rpx;
color: #666;
margin-top: 400rpx;
text-align: center;
}
.content {
... ... @@ -34,7 +34,7 @@ page {
background: #fff;
position: fixed;
left: 0;
bottom: 0;
bottom: 100rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
... ...
... ... @@ -87,13 +87,13 @@ Page({
num: that.data.num
}
wx.navigateTo({
url: '/pages/order/order?type=3' + '&info=' + JSON.stringify(info) + '&id=' + that.data.info.id
url: '/packageA/pages/order/order?type=3' + '&info=' + JSON.stringify(info) + '&id=' + that.data.info.id
})
},
//去查看购物车
go_car() {
wx.switchTab({
url: '/pages/shop_cart/shop_cart'
wx.redirectTo({
url: '/packageA/pages/shop_cart/shop_cart'
})
},
//收藏
... ...