作者 朱振飞

1212

@@ -9,8 +9,8 @@ @@ -9,8 +9,8 @@
9 <view wx:if="{{item.price2!=null}}"> 9 <view wx:if="{{item.price2!=null}}">
10 10
11 <view class='goods_flex'> 11 <view class='goods_flex'>
12 - <view class='price'>¥{{item.price}}</view>  
13 - <view class="lineprice">¥{{item.line_price}}</view> 12 + <view class='price'>¥{{item.price}}</view>
  13 + <view class="lineprice" wx:if="{{item.line_price!=null}}">¥{{item.line_price}}</view>
14 <view class='sell'>已卖出{{item.sales}}件</view> 14 <view class='sell'>已卖出{{item.sales}}件</view>
15 </view> 15 </view>
16 16
@@ -20,13 +20,10 @@ @@ -20,13 +20,10 @@
20 <view class='goods_flex' wx:else> 20 <view class='goods_flex' wx:else>
21 <!-- <view class='score'>积分</view> --> 21 <!-- <view class='score'>积分</view> -->
22 <view class='price'>¥{{item.price}}</view> 22 <view class='price'>¥{{item.price}}</view>
23 - <view class="lineprice">¥{{item.line_price}}</view> 23 + <view class="lineprice" wx:if="{{item.line_price!=null}}">¥{{item.line_price}}</view>
24 <view class='sell'>已卖出{{item.sales}}件</view> 24 <view class='sell'>已卖出{{item.sales}}件</view>
25 </view> 25 </view>
26 -  
27 - </view>  
28 - 26 + </view>
29 <view class="pink_cover" wx:if="{{item.sold==0}}" /> 27 <view class="pink_cover" wx:if="{{item.sold==0}}" />
30 -  
31 </view> 28 </view>
32 </view> 29 </view>
@@ -16,14 +16,14 @@ Page({ @@ -16,14 +16,14 @@ Page({
16 let pid = e.currentTarget.dataset.id 16 let pid = e.currentTarget.dataset.id
17 let title = e.currentTarget.dataset.title 17 let title = e.currentTarget.dataset.title
18 wx.navigateTo({ 18 wx.navigateTo({
19 - url: '/pages/search/search_result/search_result?title=' + title + '&pid=' + pid 19 + url: 'packageA/pages/search/search_result/search_result?title=' + title + '&pid=' + pid
20 }) 20 })
21 }, 21 },
22 //查看商品详情 22 //查看商品详情
23 look_detail(e){ 23 look_detail(e){
24 let id = e.currentTarget.dataset.id 24 let id = e.currentTarget.dataset.id
25 wx.navigateTo({ 25 wx.navigateTo({
26 - url: '/pages/shop_detail/shop_detail?id=' + id 26 + url: '/packageA/pages/shop_detail/shop_detail?id=' + id
27 }) 27 })
28 }, 28 },
29 29
@@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
31 look_detailk(e){ 31 look_detailk(e){
32 let id = e.currentTarget.dataset.id 32 let id = e.currentTarget.dataset.id
33 wx.navigateTo({ 33 wx.navigateTo({
34 - url: '/pages/taocandetail/taocandetail?id=' + id 34 + url: '/packageA/pages/taocandetail/taocandetail?id=' + id
35 }) 35 })
36 }, 36 },
37 //点击分类 37 //点击分类
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <view class='left'> 13 <view class='left'>
14 <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> 14 <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>
15 15
16 - <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> 16 + <!-- <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> -->
17 17
18 18
19 </view> 19 </view>
@@ -421,23 +421,46 @@ Page({ @@ -421,23 +421,46 @@ Page({
421 }) 421 })
422 } else { 422 } else {
423 let login_new = wx.getStorageSync('login'); 423 let login_new = wx.getStorageSync('login');
424 - if (login_new == 0) {  
425 - wx.showModal({  
426 - title: '提示',  
427 - content: '您还不是会员',  
428 - success(res) {  
429 - if (res.confirm) {  
430 -  
431 -  
432 - wx.navigateTo({  
433 - url: '/packageA/pages/login/login',  
434 - })  
435 - } else if (res.cancel) {}  
436 - }  
437 - })  
438 -  
439 - return false 424 + let gh_login = wx.getStorageSync('gh_login');
  425 + let loginType = wx.getStorageSync('entrance_type');
  426 + if(loginType == 1){
  427 + if (login_new == 0) {
  428 + wx.showModal({
  429 + title: '提示',
  430 + content: '请绑定账户后操作',
  431 + success(res) {
  432 + if (res.confirm) {
  433 + wx.navigateTo({
  434 + url: '/packageA/pages/login/login',
  435 + })
  436 + } else if (res.cancel) {
  437 +
  438 + }
  439 + }
  440 + })
  441 +
  442 + return false
  443 + }
  444 + }else{
  445 + if (gh_login == 0) {
  446 + wx.showModal({
  447 + title: '提示',
  448 + content: '请绑定账户后操作',
  449 + success(res) {
  450 + if (res.confirm) {
  451 + wx.navigateTo({
  452 + url: '/packageA/pages/login/login',
  453 + })
  454 + } else if (res.cancel) {
  455 +
  456 + }
  457 + }
  458 + })
  459 +
  460 + return false
  461 + }
440 } 462 }
  463 +
441 let title = this.data.nav_arr[this.data.nav_index].name 464 let title = this.data.nav_arr[this.data.nav_index].name
442 let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0 465 let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0
443 let pid = this.data.nav_arr[this.data.nav_index].id 466 let pid = this.data.nav_arr[this.data.nav_index].id
@@ -586,7 +609,8 @@ Page({ @@ -586,7 +609,8 @@ Page({
586 //获取页面信息 609 //获取页面信息
587 get_info(pid, type) { //type 1为小标题 2为小标题下的小分类 610 get_info(pid, type) { //type 1为小标题 2为小标题下的小分类
588 wx.showLoading({ 611 wx.showLoading({
589 - title: '加载中' 612 + title: '加载中',
  613 + mask: true
590 }) 614 })
591 let that = this 615 let that = this
592 let url = app.interface.index 616 let url = app.interface.index
@@ -627,6 +651,7 @@ Page({ @@ -627,6 +651,7 @@ Page({
627 good_list(pid, c_index) { 651 good_list(pid, c_index) {
628 wx.showLoading({ 652 wx.showLoading({
629 title: '加载中', 653 title: '加载中',
  654 + mask: true
630 }) 655 })
631 let that = this 656 let that = this
632 let url = app.interface.good_list 657 let url = app.interface.good_list
@@ -640,10 +665,15 @@ Page({ @@ -640,10 +665,15 @@ Page({
640 params.paynum = that.data.paynum 665 params.paynum = that.data.paynum
641 } 666 }
642 app.post(url, params).then((res) => { 667 app.post(url, params).then((res) => {
  668 + let list = res.msg;
  669 + for(let obj of list){
  670 + obj.sales = obj.paynum
  671 + }
643 if (that.data.page == 1) { 672 if (that.data.page == 1) {
644 wx.hideLoading() 673 wx.hideLoading()
  674 +
645 that.setData({ 675 that.setData({
646 - shop_arr: res.msg 676 + shop_arr: list
647 }) 677 })
648 } else { 678 } else {
649 if (res.msg.length == 0) { 679 if (res.msg.length == 0) {
@@ -655,7 +685,7 @@ Page({ @@ -655,7 +685,7 @@ Page({
655 setTimeout(() => { 685 setTimeout(() => {
656 wx.hideLoading() 686 wx.hideLoading()
657 that.setData({ 687 that.setData({
658 - shop_arr: that.data.shop_arr.concat(res.msg) 688 + shop_arr: that.data.shop_arr.concat(list)
659 }) 689 })
660 }, 1000) 690 }, 1000)
661 } 691 }
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 "usingComponents": { 3 "usingComponents": {
4 "concat": "/packageA/Components/concat/concat", 4 "concat": "/packageA/Components/concat/concat",
5 "Model_item": "/packageA/Components/Model_item/Model_item", 5 "Model_item": "/packageA/Components/Model_item/Model_item",
6 - "v-tab-bar": "/custom-tab-bar/custom-tab-bar" 6 + "v-tab-bar": "/custom-tab-bar/index"
7 } 7 }
8 -}  
  8 +}
@@ -336,6 +336,7 @@ image { @@ -336,6 +336,7 @@ image {
336 336
337 .real_goods { 337 .real_goods {
338 background: #f9f9f9; 338 background: #f9f9f9;
  339 + padding-bottom: 40rpx;
339 } 340 }
340 341
341 .fenlei { 342 .fenlei {
1 { 1 {
2 "navigationBarTitleText": "消息列表", 2 "navigationBarTitleText": "消息列表",
3 "usingComponents": { 3 "usingComponents": {
4 - "v-tab-bar": "/custom-tab-bar/custom-tab-bar" 4 + "v-tab-bar": "/custom-tab-bar/index"
5 } 5 }
6 } 6 }
@@ -53,7 +53,14 @@ page { @@ -53,7 +53,14 @@ page {
53 font-size: 36rpx; 53 font-size: 36rpx;
54 font-family: PingFang SC; 54 font-family: PingFang SC;
55 font-weight: 400; 55 font-weight: 400;
56 - color: #ccc;  
57 - margin-top: 200rpx; 56 + color: #666;
  57 + margin-top: 400rpx;
58 text-align: center; 58 text-align: center;
59 -}  
  59 +}
  60 +
  61 +
  62 +
  63 +
  64 +
  65 +
  66 +
@@ -13,6 +13,7 @@ Page({ @@ -13,6 +13,7 @@ Page({
13 interval: 3000, 13 interval: 3000,
14 duration: 1500, 14 duration: 1500,
15 kuaidi:'', 15 kuaidi:'',
  16 + noBind: false,
16 selected:3, 17 selected:3,
17 list:[{ 18 list:[{
18         pagePath: "/packageA/pages/index/index", 19         pagePath: "/packageA/pages/index/index",
@@ -44,9 +45,18 @@ Page({ @@ -44,9 +45,18 @@ Page({
44 * 生命周期函数--监听页面加载 45 * 生命周期函数--监听页面加载
45 */ 46 */
46 onLoad: function(options) { 47 onLoad: function(options) {
47 - 48 + let type = wx.getStorageSync('entrance_type');
  49 + let ghBind = wx.getStorageSync('gh_login');
  50 + let login = wx.getStorageSync('login');
  51 + this.setData({
  52 + noBind: (type==1&&login==0)?true:(type==2&&ghBind == 0)?true: false
  53 + })
  54 + },
  55 + goToBind(){
  56 + wx.navigateTo({
  57 + url: '/packageA/pages/login/login',
  58 + })
48 }, 59 },
49 -  
50 //获取最新物流 60 //获取最新物流
51 getnewwuliu(){ 61 getnewwuliu(){
52 let that = this 62 let that = this
@@ -110,10 +120,11 @@ Page({ @@ -110,10 +120,11 @@ Page({
110 120
111 // 跳转页面(订单,收藏,积分,地址,关于) 121 // 跳转页面(订单,收藏,积分,地址,关于)
112 jumpListFun(e) { 122 jumpListFun(e) {
  123 + console.log(e)
113 let t = this; 124 let t = this;
114 let type = e.currentTarget.dataset.i; 125 let type = e.currentTarget.dataset.i;
115 let index = e.currentTarget.dataset.t; 126 let index = e.currentTarget.dataset.t;
116 - if (wx.getStorageSync("token") && wx.getStorageSync("login") == 1 && index != 5) { 127 + if (wx.getStorageSync("token") && !this.data.noBind && index != 5) {
117 128
118 if (index == 1) { 129 if (index == 1) {
119 // 跳转订单列表 130 // 跳转订单列表
@@ -162,14 +173,14 @@ Page({ @@ -162,14 +173,14 @@ Page({
162 return false 173 return false
163 } 174 }
164 175
165 -  
166 - let login_new=wx.getStorageSync('login');  
167 - if(login_new==0){ 176 + if(this.data.noBind){
168 wx.showModal({ 177 wx.showModal({
169 title: '提示', 178 title: '提示',
170 - content: '您还不是会员', 179 + content: '请绑定账号后操作',
  180 + confirmText:'去绑定',
  181 + cancelText:'取消',
171 success(res) { 182 success(res) {
172 - if (res.confirm) { 183 + if (res.confirm) {
173 wx.navigateTo({ 184 wx.navigateTo({
174 url: '/packageA/pages/login/login', 185 url: '/packageA/pages/login/login',
175 }) 186 })
@@ -276,7 +287,7 @@ Page({ @@ -276,7 +287,7 @@ Page({
276 //获取个人信息 自己写的 287 //获取个人信息 自己写的
277 288
278 // t.getInfoFun() 289 // t.getInfoFun()
279 - if (wx.getStorageSync("token") && wx.getStorageSync("login") == 1) { 290 + if (wx.getStorageSync("token")) {
280 t.setData({ 291 t.setData({
281 no_login: false 292 no_login: false
282 }) 293 })
@@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
2 "navigationBarTitleText": "个人中心", 2 "navigationBarTitleText": "个人中心",
3 "usingComponents": { 3 "usingComponents": {
4 "concat": "/Components/concat/concat", 4 "concat": "/Components/concat/concat",
5 - "v-tab-bar": "/custom-tab-bar/custom-tab-bar" 5 + "v-tab-bar": "/custom-tab-bar/index"
6 } 6 }
7 } 7 }
@@ -6,14 +6,18 @@ @@ -6,14 +6,18 @@
6 <view class="tips_word">点击登录</view> 6 <view class="tips_word">点击登录</view>
7 </view> 7 </view>
8 <!-- 登录 --> 8 <!-- 登录 -->
9 - <view class="right" wx:else> 9 + <view class="right" bindtap="goToBind" wx:else>
10 <view class="name_box"> 10 <view class="name_box">
11 <view class="name">{{obj.user_name}} 11 <view class="name">{{obj.user_name}}
12 <!-- <view class="id">ID {{obj.id_card}}</view> --> 12 <!-- <view class="id">ID {{obj.id_card}}</view> -->
13 </view> 13 </view>
14 </view> 14 </view>
15 <!-- <view class="company">{{obj.competition}}</view> --> 15 <!-- <view class="company">{{obj.competition}}</view> -->
16 - <view class="info_box"> 16 +
  17 + <view class="info_box" wx:if="{{noBind}}">
  18 + <view class="bindNote">点击绑定账号</view>
  19 + </view>
  20 + <view class="info_box" wx:else>
17 <view>{{obj.job?obj.job:'暂无'}}</view> 21 <view>{{obj.job?obj.job:'暂无'}}</view>
18 <!-- <view>{{obj.section?obj.section:'暂无'}}</view> --> 22 <!-- <view>{{obj.section?obj.section:'暂无'}}</view> -->
19 <view>{{obj.tel}}</view> 23 <view>{{obj.tel}}</view>
@@ -11,7 +11,9 @@ page { @@ -11,7 +11,9 @@ page {
11 display: flex; 11 display: flex;
12 align-items: center; 12 align-items: center;
13 } 13 }
14 - 14 +.bindNote{
  15 + font-size: 30rpx;
  16 +}
15 .avator { 17 .avator {
16 width: 142rpx; 18 width: 142rpx;
17 height: 142rpx; 19 height: 142rpx;
@@ -8,7 +8,6 @@ Page({ @@ -8,7 +8,6 @@ Page({
8 success: false, 8 success: false,
9 fail: false, 9 fail: false,
10 name: '', 10 name: '',
11 -  
12 addressId: 0, 11 addressId: 0,
13 tel: '', 12 tel: '',
14 area: '', 13 area: '',
@@ -228,7 +228,7 @@ Page({ @@ -228,7 +228,7 @@ Page({
228 // 退换货跳转页面详情 228 // 退换货跳转页面详情
229 jumpReturnFun(e) { 229 jumpReturnFun(e) {
230 wx.navigateTo({ 230 wx.navigateTo({
231 - url: '/pages/order/return_goods/return_goods?d=' + e.currentTarget.dataset.d + "&&t=" + e.currentTarget.dataset.t, 231 + url: '/packageA/pages/order/return_goods/return_goods?d=' + e.currentTarget.dataset.d + "&&t=" + e.currentTarget.dataset.t,
232 }) 232 })
233 }, 233 },
234 234
@@ -104,10 +104,14 @@ Page({ @@ -104,10 +104,14 @@ Page({
104 params.paynum = that.data.paynum 104 params.paynum = that.data.paynum
105 } 105 }
106 app.post(url, params).then((res) => { 106 app.post(url, params).then((res) => {
  107 + let list = res.msg;
  108 + for(let obj of list){
  109 + obj.sales = obj.paynum
  110 + }
107 if (that.data.page == 1) { 111 if (that.data.page == 1) {
108 wx.hideLoading() 112 wx.hideLoading()
109 that.setData({ 113 that.setData({
110 - shop_arr: res.msg 114 + shop_arr: list
111 }) 115 })
112 that.pageScrollToBottom() 116 that.pageScrollToBottom()
113 } else { 117 } else {
@@ -120,7 +124,7 @@ Page({ @@ -120,7 +124,7 @@ Page({
120 setTimeout(() => { 124 setTimeout(() => {
121 wx.hideLoading() 125 wx.hideLoading()
122 that.setData({ 126 that.setData({
123 - shop_arr: that.data.shop_arr.concat(res.msg) 127 + shop_arr: that.data.shop_arr.concat(list)
124 }) 128 })
125 }, 1000) 129 }, 1000)
126 } 130 }
@@ -11,8 +11,8 @@ Page({ @@ -11,8 +11,8 @@ Page({
11 all_num: 0, //总数量 11 all_num: 0, //总数量
12 token:'', 12 token:'',
13 login_new:'', 13 login_new:'',
14 - selected:2,  
15 - listarr:[{ 14 + selected: 2,
  15 + itemMenu:[{
16         pagePath: "/packageA/pages/index/index", 16         pagePath: "/packageA/pages/index/index",
17         text: "商品", 17         text: "商品",
18         iconPath: "/images/tabbar/icon_75.png", 18         iconPath: "/images/tabbar/icon_75.png",
@@ -36,6 +36,7 @@ Page({ @@ -36,6 +36,7 @@ Page({
36         iconPath"/images/tabbar/icon_71.png", 36         iconPath"/images/tabbar/icon_71.png",
37         selectedIconPath"/images/tabbar/icon_72.png" 37         selectedIconPath"/images/tabbar/icon_72.png"
38       }] 38       }]
  39 +
39 }, 40 },
40 41
41 //删除商品 42 //删除商品
@@ -184,9 +185,7 @@ Page({ @@ -184,9 +185,7 @@ Page({
184 }, 185 },
185 //去结算 186 //去结算
186 submit(){ 187 submit(){
187 - let that = this;  
188 -  
189 - 188 + let that = this
190 if (that.data.all_num == 0){ 189 if (that.data.all_num == 0){
191 wx.showToast({ 190 wx.showToast({
192 title: '请先选择商品', 191 title: '请先选择商品',
@@ -195,13 +194,6 @@ submit(){ @@ -195,13 +194,6 @@ submit(){
195 }) 194 })
196 return 195 return
197 } 196 }
198 - if(app.globalData.status==0){  
199 - wx.showToast({  
200 - title: '您已被拉黑',  
201 - icon:'none'  
202 - })  
203 - return false  
204 - }  
205 let list = that.data.list 197 let list = that.data.list
206 let info = [] 198 let info = []
207 for (let obj of list) { 199 for (let obj of list) {
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 "usingComponents": { 3 "usingComponents": {
4 "concat": "/Components/concat/concat", 4 "concat": "/Components/concat/concat",
5 "shop_item": "/Components/shop_item/shop_item", 5 "shop_item": "/Components/shop_item/shop_item",
6 - "v-tab-bar": "/custom-tab-bar/custom-tab-bar"  
7 - } 6 + "v-tab-bar": "/custom-tab-bar/index"
  7 + }
8 } 8 }
1 <block wx:if="{{no_login}}"> 1 <block wx:if="{{no_login}}">
2 - <navigator class="no_login" catchtap="go_login" url="/packageA/pages/register/register" hover-class="none">请先登录</navigator> 2 + <navigator class="no_login" catchtap="go_login" url="/pages/register/register" hover-class="none">请先登录</navigator>
3 </block> 3 </block>
4 4
5 <block wx:elif="{{login_new==''}}"> 5 <block wx:elif="{{login_new==''}}">
6 - <navigator class="no_login" catchtap="go_login" url="/packageA/pages/login/login" hover-class="none">请先绑定会员</navigator> 6 + <navigator class="no_login" catchtap="go_login" url="/pages/login/login" hover-class="none">请先绑定后操作,点击绑定</navigator>
7 </block> 7 </block>
8 8
9 9
@@ -25,5 +25,6 @@ @@ -25,5 +25,6 @@
25 <view class="submit" bindtap="submit">结算({{all_num}})</view> 25 <view class="submit" bindtap="submit">结算({{all_num}})</view>
26 </view> 26 </view>
27 <concat/> 27 <concat/>
28 -</block>  
29 -<v-tab-bar selected="{{selected}}" text="2" list="{{listarr}}"></v-tab-bar>  
  28 +</block>
  29 +<v-tab-bar selected="{{selected}}" text="2" list="{{itemMenu}}"></v-tab-bar>
  30 +
@@ -6,8 +6,8 @@ page { @@ -6,8 +6,8 @@ page {
6 font-size: 36rpx; 6 font-size: 36rpx;
7 font-family: PingFang SC; 7 font-family: PingFang SC;
8 font-weight: 400; 8 font-weight: 400;
9 - color: #ccc;  
10 - margin-top: 200rpx; 9 + color: #666;
  10 + margin-top: 400rpx;
11 text-align: center; 11 text-align: center;
12 } 12 }
13 .content { 13 .content {
@@ -34,7 +34,7 @@ page { @@ -34,7 +34,7 @@ page {
34 background: #fff; 34 background: #fff;
35 position: fixed; 35 position: fixed;
36 left: 0; 36 left: 0;
37 - bottom: 0; 37 + bottom: 100rpx;
38 font-size: 26rpx; 38 font-size: 26rpx;
39 font-family: PingFang SC; 39 font-family: PingFang SC;
40 font-weight: 400; 40 font-weight: 400;
@@ -87,13 +87,13 @@ Page({ @@ -87,13 +87,13 @@ Page({
87 num: that.data.num 87 num: that.data.num
88 } 88 }
89 wx.navigateTo({ 89 wx.navigateTo({
90 - url: '/pages/order/order?type=3' + '&info=' + JSON.stringify(info) + '&id=' + that.data.info.id 90 + url: '/packageA/pages/order/order?type=3' + '&info=' + JSON.stringify(info) + '&id=' + that.data.info.id
91 }) 91 })
92 }, 92 },
93 //去查看购物车 93 //去查看购物车
94 go_car() { 94 go_car() {
95 - wx.switchTab({  
96 - url: '/pages/shop_cart/shop_cart' 95 + wx.redirectTo({
  96 + url: '/packageA/pages/shop_cart/shop_cart'
97 }) 97 })
98 }, 98 },
99 //收藏 99 //收藏